瀏覽代碼

审核功能

seimin 2 年之前
父節點
當前提交
da5d5da214
共有 7 個文件被更改,包括 103 次插入21 次删除
  1. 34 0
      src/custom/seiminModel.vue
  2. 3 0
      src/views/Login.vue
  3. 1 1
      src/views/closed.vue
  4. 37 9
      src/views/newIncident.vue
  5. 26 9
      src/views/processing.vue
  6. 1 1
      src/views/solved.vue
  7. 1 1
      src/views/waitConfirm.vue

+ 34 - 0
src/custom/seiminModel.vue

@@ -17,6 +17,15 @@
17 17
           >
18 18
           </cube-select>
19 19
         </div>
20
+        <!-- 选择审核人 -->
21
+        <div class="seiminModel_item">
22
+          <label>审核人<span class="red">*</span>:</label>
23
+          <cube-select
24
+            v-model="auditor"
25
+            :options="auditors"
26
+          >
27
+          </cube-select>
28
+        </div>
20 29
         <!-- <div
21 30
           class="seiminModel_item"
22 31
           v-if="(type === 'handler' && complexity != complexitySource) || type == 'now'"
@@ -58,6 +67,8 @@ export default {
58 67
       complexity: "",
59 68
       updateReason: "",
60 69
       complexityList: [],
70
+      auditor: "",
71
+      auditors: [],
61 72
       opts: {}
62 73
     };
63 74
   },
@@ -89,6 +100,7 @@ export default {
89 100
         .then(res => {
90 101
           this.complexitySource = this.complexityFn(this.category);
91 102
           this.complexity = this.complexityFn(this.category);
103
+          console.log(this.complexity)
92 104
           args.content = `您本次事件处理获得工时${this.complexitySource},如遇问题对工时进行调整`;
93 105
           res.data.forEach((v, i) => {
94 106
             this.complexityList.push({
@@ -143,8 +155,30 @@ export default {
143 155
               isVisible: true
144 156
             });
145 157
           });
158
+          // 获取审核人
159
+          this.getAuditors();
146 160
         });
147 161
     },
162
+    // 获取审核人
163
+    getAuditors(){
164
+      this.$http
165
+        .post("service/user/data/fetchDataList/user", {
166
+          "idx": 0,
167
+          "sum": 9999,
168
+          "user": {
169
+              "roledata": { rolecode: "incident manager" }
170
+          }
171
+        })
172
+        .then(res => {
173
+          if(res.data.status == 200){
174
+            let userList = res.data.list || [];
175
+            this.auditors = userList.map(v => ({
176
+              text: v.name,
177
+              value: v.id
178
+            }))
179
+          }
180
+        })
181
+    },
148 182
     // 显示弹窗
149 183
     show(args = {}) {
150 184
       this.category = args.category;

+ 3 - 0
src/views/Login.vue

@@ -183,6 +183,9 @@ export default {
183 183
               case "integralMechanism": //积分机制
184 184
                 localStorage.setItem("integralMechanism", v.valueconfig);
185 185
                 break;
186
+              case "integralRole": //积分控制角色
187
+                sessionStorage.setItem("integralRole", v.valueconfig);
188
+                break;
186 189
             }
187 190
           });
188 191
           this.roleHandler(user,requester);

+ 1 - 1
src/views/closed.vue

@@ -93,7 +93,7 @@
93 93
               <span class="fr">{{ model.incident.category.category }}</span>
94 94
             </p>
95 95
             <p>
96
-              <span class="fl">关闭代码</span>
96
+              <span class="fl">处理结果</span>
97 97
               <span class="fr">{{
98 98
                 model.incident.closecode ? model.incident.closecode.name : ""
99 99
               }}</span>

+ 37 - 9
src/views/newIncident.vue

@@ -338,6 +338,7 @@ export default {
338 338
       ifRoom: localStorage.getItem("ifRoom"), //是否增加房间号选择
339 339
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
340 340
       integralMechanism: localStorage.getItem("integralMechanism"),
341
+      integralRole: localStorage.getItem("integralRole"),
341 342
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
342 343
       name: "",
343 344
       phone: "",
@@ -370,7 +371,7 @@ export default {
370 371
         emergency: "", //紧急度
371 372
         influence: "", //影响度
372 373
         handleCategory: "", //处理方式
373
-        closecode: "", //关闭代码
374
+        closecode: "", //处理结果
374 375
         handleDescription: "", //处理方案
375 376
         knowledge: false, //是否提交知识库
376 377
         handlerUser: "", //处理人
@@ -390,7 +391,7 @@ export default {
390 391
       emergencyArr: [], //紧急度数组
391 392
       influenceArr: [], //影响度数组
392 393
       handleCategoryArr: [], //处理方式数组
393
-      closecodeArr: [], //关闭代码数组
394
+      closecodeArr: [], //处理结果数组
394 395
       handlerUserArr: [], //处理人数组
395 396
       candidateGroupsArr: [], //处理组数组
396 397
       isShowDes: false,
@@ -601,11 +602,11 @@ export default {
601 602
         {
602 603
           type: "select",
603 604
           modelKey: "closecode",
604
-          label: "关闭代码:",
605
+          label: "处理结果:",
605 606
           props: {
606 607
             options: this.closecodeArr,
607
-            title: "请选择关闭代码",
608
-            placeholder: "请选择关闭代码"
608
+            title: "请选择处理结果",
609
+            placeholder: "请选择处理结果"
609 610
           },
610 611
           rules: {
611 612
             required: true
@@ -897,7 +898,7 @@ export default {
897 898
           that.fields[11].props.options = that.handleCategoryArr;
898 899
         });
899 900
     },
900
-    // 获取关闭代码
901
+    // 获取处理结果
901 902
     getClosecode() {
902 903
       var that = this;
903 904
       this.$http
@@ -1191,9 +1192,17 @@ export default {
1191 1192
       );
1192 1193
       console.log(that.modelData.incident.category.id, this.initSjList, "事件");
1193 1194
       // debugger;//测试
1195
+      let integralRoles = [];
1196
+      let currentUserRoles = [];
1197
+      let intersection = [];
1198
+      if(this.integralMechanism == 1){
1199
+        integralRoles = sessionStorage.getItem("integralRole") ? sessionStorage.getItem("integralRole").split(',') : [];
1200
+        currentUserRoles = this.loginUser.role ? this.loginUser.role.map(v=>String(v.id)) : [];
1201
+        intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
1202
+      }
1194 1203
       if (
1195 1204
         this.order == 1 &&
1196
-        (this.integralMechanism == 1 ||
1205
+        ((this.integralMechanism == 1 && intersection.length) ||
1197 1206
           (this.integralMechanism == 2 && this.loginUser.userType.value == 2))
1198 1207
       ) {
1199 1208
         // 直接处理,积分机制
@@ -1212,6 +1221,7 @@ export default {
1212 1221
             },
1213 1222
             {
1214 1223
               click: () => {
1224
+                console.log(this.$refs.seiminModel)
1215 1225
                 if (!this.$refs.seiminModel.complexity) {
1216 1226
                   this.$createDialog({
1217 1227
                     type: "alert",
@@ -1221,6 +1231,15 @@ export default {
1221 1231
                   }).show();
1222 1232
                   return;
1223 1233
                 }
1234
+                if (!this.$refs.seiminModel.auditor) {
1235
+                  this.$createDialog({
1236
+                    type: "alert",
1237
+                    title: "操作失败",
1238
+                    content: "请选择审核人!",
1239
+                    icon: "cubeic-wrong"
1240
+                  }).show();
1241
+                  return;
1242
+                }
1224 1243
                 if (this.$refs.seiminModel.complexitySource != this.$refs.seiminModel.complexity && !this.$refs.seiminModel.updateReason.trim()) {
1225 1244
                   this.$createDialog({
1226 1245
                     type: "alert",
@@ -1283,9 +1302,17 @@ export default {
1283 1302
                 that.$refs.upload1.start();
1284 1303
               }
1285 1304
             }, 100);
1305
+            let integralRoles = [];
1306
+            let currentUserRoles = [];
1307
+            let intersection = [];
1308
+            if(this.integralMechanism == 1){
1309
+              integralRoles = sessionStorage.getItem("integralRole") ? sessionStorage.getItem("integralRole").split(',') : [];
1310
+              currentUserRoles = this.loginUser.role ? this.loginUser.role.map(v=>String(v.id)) : [];
1311
+              intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
1312
+            }
1286 1313
             if (
1287 1314
               this.order == 1 &&
1288
-              (this.integralMechanism == 1 ||
1315
+              ((this.integralMechanism == 1 && intersection.length) ||
1289 1316
                 (this.integralMechanism == 2 &&
1290 1317
                   this.loginUser.userType.value == 2))
1291 1318
             ) {
@@ -1301,6 +1328,7 @@ export default {
1301 1328
                     incidentIntegral: {
1302 1329
                       incidentId: res.data.bussId,
1303 1330
                       auditState: auditState,
1331
+                      auditUser: this.$refs.seiminModel.auditor,
1304 1332
                       handlerUser: this.loginUser.id,
1305 1333
                       handlerUserName: this.loginUser.name,
1306 1334
                       sourceScore: this.$refs.seiminModel.complexitySource,
@@ -1908,7 +1936,7 @@ export default {
1908 1936
     this.getInfluence();
1909 1937
     // 处理方式
1910 1938
     this.getHandleCategory();
1911
-    // 关闭代码
1939
+    // 处理结果
1912 1940
     this.getClosecode();
1913 1941
     // 处理人
1914 1942
     this.getHandlerUser();

+ 26 - 9
src/views/processing.vue

@@ -465,7 +465,7 @@ export default {
465 465
       selectedPlaceName: "", //地点选中名称--seimin
466 466
       model: {
467 467
         handleCategory: "", //处理方式
468
-        closecode: "", //关闭代码
468
+        closecode: "", //处理结果
469 469
         category: [], //确认事件分类
470 470
         handleDescription: "", //处理方案
471 471
         knowledge: false, //是否提交知识库
@@ -484,7 +484,7 @@ export default {
484 484
       promptingStatus: "",
485 485
       order: 1, //处理方式  1:直接处理,2:升级,3:转派,4:协同
486 486
       handleCategoryArr: [], //处理方式数组
487
-      closecodeArr: [], //关闭代码数组
487
+      closecodeArr: [], //处理结果数组
488 488
       // handlerUserArr: [], //处理人数组
489 489
       synergeticList: [], //协同对象列表
490 490
       synergeticChecked: [], //选中协同对象
@@ -536,11 +536,11 @@ export default {
536 536
         {
537 537
           type: "select",
538 538
           modelKey: "closecode",
539
-          label: "关闭代码:",
539
+          label: "处理结果:",
540 540
           props: {
541 541
             options: this.closecodeArr,
542
-            title: "请选择关闭代码",
543
-            placeholder: "请选择关闭代码"
542
+            title: "请选择处理结果",
543
+            placeholder: "请选择处理结果"
544 544
           },
545 545
           rules: {
546 546
             required: true
@@ -1091,7 +1091,7 @@ export default {
1091 1091
           that.fields[0].props.options = that.handleCategoryArr;
1092 1092
         });
1093 1093
     },
1094
-    // 获取关闭代码
1094
+    // 获取处理结果
1095 1095
     getClosecode() {
1096 1096
       var that = this;
1097 1097
       this.$http
@@ -1679,9 +1679,17 @@ export default {
1679 1679
       that.model.fileUrl = "url";
1680 1680
       that.loadShow = true;
1681 1681
       //处理中,积分机制
1682
+      let integralRoles = [];
1683
+      let currentUserRoles = [];
1684
+      let intersection = [];
1685
+      if(this.integralMechanism == 1){
1686
+        integralRoles = sessionStorage.getItem("integralRole") ? sessionStorage.getItem("integralRole").split(',') : [];
1687
+        currentUserRoles = this.loginUser.role ? this.loginUser.role.map(v=>String(v.id)) : [];
1688
+        intersection = integralRoles.filter(function (val) { return currentUserRoles.indexOf(val) > -1 })
1689
+      }
1682 1690
       if (
1683 1691
         this.order == 1 &&
1684
-        (this.integralMechanism == 1 ||
1692
+        ((this.integralMechanism == 1 && intersection.length) ||
1685 1693
           (this.integralMechanism == 2 && this.loginUser.userType.value == 2))
1686 1694
       ) {
1687 1695
         //liaomingming
@@ -1709,6 +1717,15 @@ export default {
1709 1717
                   }).show();
1710 1718
                   return;
1711 1719
                 }
1720
+                if (!this.$refs.seiminModel.auditor) {
1721
+                  this.$createDialog({
1722
+                    type: "alert",
1723
+                    title: "操作失败",
1724
+                    content: "请选择审核人!",
1725
+                    icon: "cubeic-wrong"
1726
+                  }).show();
1727
+                  return;
1728
+                }
1712 1729
                 console.log(this.$refs.seiminModel);
1713 1730
                 if (
1714 1731
                   this.$refs.seiminModel.complexitySource !=
@@ -1723,7 +1740,6 @@ export default {
1723 1740
                   }).show();
1724 1741
                   return;
1725 1742
                 }
1726
-                //liaomingming
1727 1743
                 this.$http
1728 1744
                   .post("service/common/common/getDictionary", {
1729 1745
                     key: "incident_integral_state",
@@ -1741,6 +1757,7 @@ export default {
1741 1757
                       incidentIntegral: {
1742 1758
                         incidentId: this.modelData.incident.id,
1743 1759
                         auditState: auditState,
1760
+                        auditUser: this.$refs.seiminModel.auditor,
1744 1761
                         handlerUser: this.loginUser.id,
1745 1762
                         handlerUserName: this.loginUser.name,
1746 1763
                         sourceScore: this.$refs.seiminModel.complexitySource,
@@ -1839,7 +1856,7 @@ export default {
1839 1856
     this.getImgs();
1840 1857
     // 处理方式
1841 1858
     this.getHandleCategory();
1842
-    // 关闭代码
1859
+    // 处理结果
1843 1860
     this.getClosecode();
1844 1861
     // 升级对象
1845 1862
     this.getUpUser();

+ 1 - 1
src/views/solved.vue

@@ -96,7 +96,7 @@
96 96
             }}</span>
97 97
           </p>
98 98
           <p>
99
-            <span class="fl">关闭代码</span>
99
+            <span class="fl">处理结果</span>
100 100
             <span class="fr">{{
101 101
               model.incident.closecode ? model.incident.closecode.name : ""
102 102
             }}</span>

+ 1 - 1
src/views/waitConfirm.vue

@@ -200,7 +200,7 @@
200 200
             <span class="fr showwrap">{{ model.incident.handleCategory }}</span>
201 201
           </p>
202 202
           <p>
203
-            <span class="fl">关闭代码</span>
203
+            <span class="fl">处理结果</span>
204 204
             <span class="fr">{{
205 205
               model.incident.closecode ? model.incident.closecode.name : ""
206 206
             }}</span>