liyangzheng hace 1 año
padre
commit
68c9d84483

+ 17 - 15
src/pages/components/drawModal/LineDouble.vue

@@ -55,7 +55,9 @@
                 </span>
             </template>
         </el-dialog>
-        <SureCancel v-if="sureModal" :sureModal="sureModal" :reload="reload" :checkObj="checkObj" @cancelBack="cancelBack"></SureCancel>
+        <SureCancel v-if="sureModal" :sureModal="sureModal" :reload="reload" :checkObj="checkObj"
+            @cancelBack="cancelBack">
+        </SureCancel>
     </div>
 </template>
 
@@ -145,14 +147,14 @@ export default {
             modelIds.value = props.modelId
             starts.value = props.startTarget
             ends.value = props.endTarget
-            if(props.startText==null || props.startText==''){
+            if (props.startText == null || props.startText == '') {
                 startTxt.value = starts.value.ied_type
-            }else{
+            } else {
                 startTxt.value = props.startText
             }
-            if(props.endText==null || props.endText==''){
+            if (props.endText == null || props.endText == '') {
                 endTxt.value = ends.value.ied_type
-            }else{
+            } else {
                 endTxt.value = props.endText
             }
             numStatus.value = props.numCase
@@ -168,11 +170,11 @@ export default {
                 //liling:避免提示空错误提示,res.data为空不代表接口有错误,所以先判断接口code值
                 pastLoading.value = false
                 if (res.code == 0) {
-                    if (res.data == null || res.data=="") {
+                    if (res.data == null || res.data == "") {
                         curList.value = [];
                         return;
                     }
-                    
+
                     let tmpList = [];
                     //对结果进行重排排序:将已关联到输出装置的端子排在前面
                     res.data.forEach((item, index) => {
@@ -183,7 +185,7 @@ export default {
                             tmpList.push(item)
                         }
                     })
-                    
+
                     curList.value = tmpList
                     //pastLoading.value = false
                 } else {
@@ -204,11 +206,11 @@ export default {
                 //if ( res.data) {
                 //liling:避免提示空错误提示,res.data为空不代表接口有错误,所以先判断接口code值
                 if (res.code == 0) {
-                    if (res.data == null || res.data=="") {
+                    if (res.data == null || res.data == "") {
                         outList.value = [];
                         return;
                     }
-                    
+
                     //对结果进行重排排序:将已关联到输出装置的端子排在前面
                     let tmpList = [];
                     res.data.forEach((item, index) => {
@@ -219,7 +221,7 @@ export default {
                             tmpList.push(item)
                         }
                     })
-                    
+
                     outList.value = tmpList;
                     // 将 setTimeout 移动到 then 方法中
                     setTimeout(() => {
@@ -392,7 +394,7 @@ export default {
             }
         }
         function checkChange(e) {
-            console.log(e,'eee123132');
+            console.log(e, 'eee123132');
             checkObj.value = e
             sureModal.value = true
             // if (e.length > 1) {
@@ -455,11 +457,11 @@ export default {
                 });
             }
         };
-        function cancelBack(data){
+        function cancelBack(data) {
             // 本事件处理选择框
             sureModal.value = data
             fcdaIds.value = checkObj.value.id
-            console.log(fcdaIds.value,'sad');
+            console.log(fcdaIds.value, 'sad');
             // 如果左侧未选择id,默认选择第一个
             if (leftFcda.value == '') {
                 leftFcda.value = curList.value[0].id
@@ -536,7 +538,7 @@ export default {
             checkObj,//选择的对象
         }
     },
-    components:{
+    components: {
         SureCancel,//确认取消关系组件
     }
 }

+ 5 - 1
src/pages/components/drawModal/SureCancel.vue

@@ -68,4 +68,8 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style  scoped>
+.box{
+    white-space: normal;
+}
+</style>