浏览代码

审核功能

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
           </cube-select>
18
           </cube-select>
19
         </div>
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
         <!-- <div
29
         <!-- <div
21
           class="seiminModel_item"
30
           class="seiminModel_item"
22
           v-if="(type === 'handler' && complexity != complexitySource) || type == 'now'"
31
           v-if="(type === 'handler' && complexity != complexitySource) || type == 'now'"
@@ -58,6 +67,8 @@ export default {
58
       complexity: "",
67
       complexity: "",
59
       updateReason: "",
68
       updateReason: "",
60
       complexityList: [],
69
       complexityList: [],
70
+      auditor: "",
71
+      auditors: [],
61
       opts: {}
72
       opts: {}
62
     };
73
     };
63
   },
74
   },
@@ -89,6 +100,7 @@ export default {
89
         .then(res => {
100
         .then(res => {
90
           this.complexitySource = this.complexityFn(this.category);
101
           this.complexitySource = this.complexityFn(this.category);
91
           this.complexity = this.complexityFn(this.category);
102
           this.complexity = this.complexityFn(this.category);
103
+          console.log(this.complexity)
92
           args.content = `您本次事件处理获得工时${this.complexitySource},如遇问题对工时进行调整`;
104
           args.content = `您本次事件处理获得工时${this.complexitySource},如遇问题对工时进行调整`;
93
           res.data.forEach((v, i) => {
105
           res.data.forEach((v, i) => {
94
             this.complexityList.push({
106
             this.complexityList.push({
@@ -143,8 +155,30 @@ export default {
143
               isVisible: true
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
     show(args = {}) {
183
     show(args = {}) {
150
       this.category = args.category;
184
       this.category = args.category;

+ 3 - 0
src/views/Login.vue

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

+ 1 - 1
src/views/closed.vue

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

+ 37 - 9
src/views/newIncident.vue

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

+ 26 - 9
src/views/processing.vue

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

+ 1 - 1
src/views/solved.vue

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

+ 1 - 1
src/views/waitConfirm.vue

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