|
|
@@ -24,9 +24,9 @@
|
|
|
|
|
|
</div>
|
|
|
<div class="content-r-container">
|
|
|
- <div class="content-r-box" v-for="(item, index) in infoDatas" :key="index">
|
|
|
+ <div class="content-r-box" v-for="(item, index) in infoDatas" :key="index" @click="handlerAddorDel(item)">
|
|
|
<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" />
|
|
|
<div class="title-text">{{ item.strinstallpos }}</div>
|
|
|
<div class="title-detail" @click="handlerDetail(item.deviceID)">详情</div>
|
|
|
</div>
|
|
|
@@ -97,7 +97,7 @@ import gateSVG from './gateSVG.ssl.vue'
|
|
|
import operationModal from './operationModal.vue'
|
|
|
import DeviceControl from './deviceControl.vue'
|
|
|
import { useRouter } from 'vue-router';
|
|
|
-import { devicecontrol, insertSyncRule, GetSyncRule, controlList, confirmChoice, manualTimeSync, isPasswordCurrect, dictList } from '../airdoor.api'
|
|
|
+import { devicecontrol, insertSyncRule, GetSyncRule, controlList, confirmChoice, manualTimeSync, isPasswordCurrect, editDoor } from '../airdoor.api'
|
|
|
import { doorStatus } from '../airdoor.data'
|
|
|
// import { getModelComponent } from '../airdoor.data'
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
@@ -142,7 +142,8 @@ let cameraDetailTitle = ref('视屏墙详情信息')
|
|
|
let cameraData = ref<any[]>([])
|
|
|
//风门集控类型-字典
|
|
|
const dictCodes = getDictItemsByCode('gateCentralizedControl');
|
|
|
-let $emit=defineEmits(['toggleInfoData'])
|
|
|
+//是否开启分组
|
|
|
+let isOpenFz = ref('')
|
|
|
|
|
|
const setChildRef = (el, index) => {
|
|
|
childRefs.value[index] = el
|
|
|
@@ -284,15 +285,32 @@ function handleCancelCameraDetail(param) {
|
|
|
|
|
|
//设备集控-分组控制
|
|
|
function handlerFz(item) {
|
|
|
- infoDatas.value.forEach(el => {
|
|
|
- if (el.gateCentralizedControl == item.value) {
|
|
|
+ isOpenFz.value = item.value
|
|
|
+ if (item.value == '0') {
|
|
|
+ infoDatas.value.forEach(el => {
|
|
|
el.iconControl = true
|
|
|
- } else {
|
|
|
- el.iconControl = false
|
|
|
- }
|
|
|
- })
|
|
|
- $emit('toggleInfoData',item.value)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ infoDatas.value.forEach(el => {
|
|
|
+ if (el.gateCentralizedControl == item.value) {
|
|
|
+ el.iconControl = true
|
|
|
+ } else {
|
|
|
+ el.iconControl = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+//分组中添加或删除元素
|
|
|
+async function handlerAddorDel(item) {
|
|
|
+ if (isOpenFz.value && item.gateCentralizedControl) {
|
|
|
+ item.iconControl = !item.iconControl
|
|
|
+ // // let res = await editDoor({ gateCentralizedControl: isOpenFz.value, id: item.deviceID })
|
|
|
+ // console.log(isOpenFz.value, '开启分组并且当前点击项已有分组')
|
|
|
+ } else {
|
|
|
+ isOpenFz.value = ''
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
watch(() => props.infoData, (newV, oldV) => {
|
|
|
infoDatas.value = newV
|