Bladeren bron

代码优化及bug解决

yukai 2 jaren geleden
bovenliggende
commit
a83732f4b9

+ 4 - 3
src/views/iot/scene/manage/component/actionType/sendNotice.vue

@@ -20,7 +20,7 @@
 
   <div class="form-item" v-for="(ph, phindex) in fromData.notice.object_temp" :key="phindex">
     <el-input v-model="ph.info" placeholder="请输入接收人信息" style="width: 320px" @input="saveData" />
-    <el-icon style="width: 32px; height: 32px; font-size: 24px" v-if="phindex == 0" @click="AddPhone(index)">
+    <el-icon style="width: 32px; height: 32px; font-size: 24px" v-if="phindex == 0" @click="AddPhone()">
       <CirclePlus />
     </el-icon>
     <el-icon style="width: 32px; height: 32px; font-size: 24px" v-if="phindex > 0" @click="DelPhone( phindex)">
@@ -37,12 +37,13 @@ const emit = defineEmits(['SetSaveData']);
 
 const { proxy } = getCurrentInstance() as any;
 const { notice_send_gateway } = proxy.useDict('notice_send_gateway');
-const sendGatewayData = ref([]);
-const noticeConfigData = ref([]);
+const sendGatewayData = ref(<testIValueType[]>[]);
+const noticeConfigData = ref(<testIValueType[]>[]);
 interface testIValueType {
   id?: string;
   key?: string;
   name?: string;
+  title?: string;
 }
 const props = defineProps({
   sourceData: {

+ 4 - 2
src/views/iot/scene/manage/component/condition.vue

@@ -19,7 +19,7 @@
             <div class="items">
               <el-button
                 style="background: #fff; color: #000;border: 1px solid #d9cde3;margin-left: 10px;margin-right: 10px;"
-                v-if="i > 0">并且</el-button>
+                v-if="(i as number)  > 0">并且</el-button>
 
               <el-popover placement="bottom" trigger="click" ref="popoverRef" v-model:visible="vo.isPopoverVisible">
                 <template #reference>
@@ -62,7 +62,7 @@
                 </div>
               </el-popover>
 
-              <el-icon size="16" v-if="i>0" @click="DelSceneItem(i, index)" style="position: relative;top: -13px;">
+              <el-icon size="16" v-if="(i as number)>0" @click="DelSceneItem(i as number, index)" style="position: relative;top: -13px;">
                 <CircleClose />
               </el-icon>
 
@@ -102,7 +102,9 @@ interface IConditionItem {
   operator?: string;
   value?: string;
 }
+
 interface Column {
+  name: string;
   termTypes: any[]; 
 }
 const props = defineProps({

+ 0 - 5
src/views/iot/scene/manage/component/sceneItem.vue

@@ -47,11 +47,6 @@
             <el-button type="success" @click="showCron()" style="margin-left: 5px;">设置</el-button>
 
           </div>
-
-
-
-
-
         </el-form-item>
       </div>
       <div class="title flex">