seimin 2 年 前
コミット
61a3e9845c
共有1 個のファイルを変更した21 個の追加2 個の削除を含む
  1. 21 2
      src/views/newIncident.vue

+ 21 - 2
src/views/newIncident.vue

@@ -124,6 +124,7 @@
124 124
             :options="handleTypes"
125 125
             position="right"
126 126
             :hollow-style="true"
127
+            @input="changeHandleTypes"
127 128
           />
128 129
         </div>
129 130
         <!-- 直接处理 begin -->
@@ -138,7 +139,7 @@
138 139
           class="btn_plcaeholde"
139 140
         ></cube-form-item>
140 141
         <cube-form-item
141
-          v-if="order == 1"
142
+          v-if="order == 1 && isShowDes"
142 143
           :field="fields[13]"
143 144
           class="btn_plcaeholde"
144 145
         ></cube-form-item>
@@ -394,6 +395,7 @@ export default {
394 395
       closecodeArr: [], //关闭代码数组
395 396
       handlerUserArr: [], //处理人数组
396 397
       candidateGroupsArr: [], //处理组数组
398
+      isShowDes: false,
397 399
       handleTypes: [
398 400
         {
399 401
           label: "直接处理",
@@ -765,6 +767,14 @@ export default {
765 767
     }
766 768
   },
767 769
   methods: {
770
+    // 切换处理方式liaomingming
771
+    changeHandleTypes() {
772
+      let reverseArr = this.model.category.filter(Boolean).reverse(); //数组翻转,取第一项不为空的
773
+      let sjId = reverseArr[0]; //事件Id baba
774
+      let sj = this.initSjList.filter(v => v.id == sjId)[0];
775
+      console.log(this.order, sj);
776
+      this.isShowDes = !(this.order == 1 && sj && sj.hasSimple == 1);
777
+    },
768 778
     getRoomData(placeId) {
769 779
       this.$http
770 780
         .post("service/user/data/fetchDataList/room", {
@@ -784,7 +794,7 @@ export default {
784 794
               item.props.options = arr;
785 795
             }
786 796
           });
787
-          console.log(this.fields)
797
+          console.log(this.fields);
788 798
           if (this.$route.params.data && this.$route.params.data.room) {
789 799
             this.model.room = this.$route.params.data.room.id;
790 800
           }
@@ -1452,6 +1462,14 @@ export default {
1452 1462
         this.model.handlerUser = "";
1453 1463
         this.model.candidateGroups = "";
1454 1464
       }
1465
+      console.log(this.order, sj.hasSimple);
1466
+      if (this.order == 1 && sj.hasSimple == 1) {
1467
+        // 直接处理 && 简单处理
1468
+        // liaomingming
1469
+        this.isShowDes = false;
1470
+      } else {
1471
+        this.isShowDes = true;
1472
+      }
1455 1473
     },
1456 1474
     // 事件分类
1457 1475
     getIncidentcategory() {
@@ -1530,6 +1548,7 @@ export default {
1530 1548
               that.model.handlerUser = "";
1531 1549
               that.model.candidateGroups = "";
1532 1550
             }
1551
+            that.model.category = [inspecInfo1.category.id];
1533 1552
           }
1534 1553
           that.categoryPicker = that.$createCascadePicker({
1535 1554
             title: "事件分类选择",