|
@@ -19,14 +19,12 @@
|
|
|
<a-button :class="index % 2 == 1 ? 'btn-control' : ''" v-for="(item, index) in dictCodes" :key="index"
|
|
<a-button :class="index % 2 == 1 ? 'btn-control' : ''" v-for="(item, index) in dictCodes" :key="index"
|
|
|
type="primary" @click="handlerFz(item)">{{ item.title }}</a-button>
|
|
type="primary" @click="handlerFz(item)">{{ item.title }}</a-button>
|
|
|
<a-button class="device-control-btn" type="primary" @click="handlerDeviceChoice">集控设备选择</a-button>
|
|
<a-button class="device-control-btn" type="primary" @click="handlerDeviceChoice">集控设备选择</a-button>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
<div class="content-r-container">
|
|
<div class="content-r-container">
|
|
|
<div class="content-r-box" v-for="(item, index) in infoDatas" :key="index" @click="handlerAddorDel(item)">
|
|
<div class="content-r-box" v-for="(item, index) in infoDatas" :key="index" @click="handlerAddorDel(item)">
|
|
|
<div class="box-title">
|
|
<div class="box-title">
|
|
|
<SvgIcon v-show="item.iconControl" class="title-icon" size="16" name="select-control" />
|
|
<SvgIcon v-show="item.iconControl" class="title-icon" size="16" name="select-control" />
|
|
|
|
|
+ <SvgIcon v-show="!item.iconControl" class="title-icon" size="16" name="unselect-control" />
|
|
|
<div class="title-text">{{ item.strinstallpos }}</div>
|
|
<div class="title-text">{{ item.strinstallpos }}</div>
|
|
|
<div class="title-detail" @click="handlerDetail(item.deviceID)">详情</div>
|
|
<div class="title-detail" @click="handlerDetail(item.deviceID)">详情</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -144,6 +142,8 @@ let cameraData = ref<any[]>([])
|
|
|
const dictCodes = getDictItemsByCode('gateCentralizedControl');
|
|
const dictCodes = getDictItemsByCode('gateCentralizedControl');
|
|
|
//是否开启分组
|
|
//是否开启分组
|
|
|
let isOpenFz = ref('')
|
|
let isOpenFz = ref('')
|
|
|
|
|
+//分组选中
|
|
|
|
|
+let choiceFzData=ref<any[]>([])
|
|
|
|
|
|
|
|
const setChildRef = (el, index) => {
|
|
const setChildRef = (el, index) => {
|
|
|
childRefs.value[index] = el
|
|
childRefs.value[index] = el
|
|
@@ -158,7 +158,7 @@ function handlerOpenOrClose(data) {
|
|
|
//确定
|
|
//确定
|
|
|
async function handleOk(param) {
|
|
async function handleOk(param) {
|
|
|
if (isTbOrJk.value == 'Tb') {
|
|
if (isTbOrJk.value == 'Tb') {
|
|
|
- let deviceStr = infoDatas.value.map(v => v.deviceID).join(',')
|
|
|
|
|
|
|
+ let deviceStr = isOpenFz ? choiceFzData.value.map(v => v.deviceID).join(',') : infoDatas.value.map(v => v.deviceID).join(',')
|
|
|
let paramcode = visibleStatus.value == 'open' ? 'sameTimeOpen' : 'sameTimeClose'
|
|
let paramcode = visibleStatus.value == 'open' ? 'sameTimeOpen' : 'sameTimeClose'
|
|
|
let res = await devicecontrol({ deviceids: deviceStr, paramcode: paramcode, password: param.pass || globalConfig?.simulatedPassword })
|
|
let res = await devicecontrol({ deviceids: deviceStr, paramcode: paramcode, password: param.pass || globalConfig?.simulatedPassword })
|
|
|
if (res) {
|
|
if (res) {
|
|
@@ -290,6 +290,7 @@ function handlerFz(item) {
|
|
|
infoDatas.value.forEach(el => {
|
|
infoDatas.value.forEach(el => {
|
|
|
el.iconControl = true
|
|
el.iconControl = true
|
|
|
})
|
|
})
|
|
|
|
|
+ choiceFzData.value=infoDatas.value
|
|
|
} else {
|
|
} else {
|
|
|
infoDatas.value.forEach(el => {
|
|
infoDatas.value.forEach(el => {
|
|
|
if (el.gateCentralizedControl == item.value) {
|
|
if (el.gateCentralizedControl == item.value) {
|
|
@@ -298,12 +299,14 @@ function handlerFz(item) {
|
|
|
el.iconControl = false
|
|
el.iconControl = false
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+ choiceFzData.value=infoDatas.value.filter(v=>v.gateCentralizedControl==item.value)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//分组中添加或删除元素
|
|
//分组中添加或删除元素
|
|
|
async function handlerAddorDel(item) {
|
|
async function handlerAddorDel(item) {
|
|
|
- if (isOpenFz.value ) {
|
|
|
|
|
|
|
+ if (isOpenFz.value) {
|
|
|
item.iconControl = !item.iconControl
|
|
item.iconControl = !item.iconControl
|
|
|
|
|
+ choiceFzData.value.push(item)
|
|
|
// // let res = await editDoor({ gateCentralizedControl: isOpenFz.value, id: item.deviceID })
|
|
// // let res = await editDoor({ gateCentralizedControl: isOpenFz.value, id: item.deviceID })
|
|
|
// console.log(isOpenFz.value, '开启分组并且当前点击项已有分组')
|
|
// console.log(isOpenFz.value, '开启分组并且当前点击项已有分组')
|
|
|
} else {
|
|
} else {
|