seimin hai 1 ano
pai
achega
9cfd228728

+ 8 - 0
config/index.js

@@ -14,6 +14,14 @@ module.exports = {
14 14
     proxyTable: {
15 15
       '/service': {//自定义名字,代表的是以下target中的内容
16 16
         // target: host.host+'/service/',//微信
17
+        target: 'http://192.168.4.240',//微信
18
+        changeOrigin: true,//是否允许跨域
19
+        // pathRewrite: {
20
+        //   '^/service': ''
21
+        // }
22
+      },
23
+      '/file': {//自定义名字,代表的是以下target中的内容
24
+        // target: host.host+'/service/',//微信
17 25
         target: 'http://192.168.3.111',//微信
18 26
         changeOrigin: true,//是否允许跨域
19 27
         // pathRewrite: {

+ 4 - 0
src/App.vue

@@ -13,6 +13,10 @@ export default {
13 13
 </script>
14 14
 
15 15
 <style lang='less'>
16
+.cube-switch .cube-switch-input:checked + .cube-switch-ui{
17
+  border-color: #005395!important;
18
+  background-color: #005395!important;
19
+}
16 20
 .cube-picker-wheel-item{
17 21
   font-size: 12px!important;
18 22
 }

+ 20 - 2
src/components/showModel/showModel.vue

@@ -39,11 +39,12 @@
39 39
             @change="changeGroup($event)"
40 40
             style="margin-top:0.2rem;"
41 41
           ></cube-select>
42
+          <cube-switch v-model="isRadioUser" style="margin-top:0.2rem;" @input="changeRadioUser" v-if="isShowRadioUser">是否指派到人</cube-switch>
42 43
           <cube-select
43 44
             v-model="selectUserId"
44 45
             :options="selectDataUser"
45 46
             placeholder="请选择指派对象"
46
-            style="margin-top:0.2rem;"
47
+            style="margin-top:0.2rem;" v-if="isRadioUser"
47 48
           ></cube-select>
48 49
         </div>
49 50
         <div v-if="textName === 'textarea'">
@@ -124,6 +125,8 @@
124 125
 export default {
125 126
   data() {
126 127
     return {
128
+      isShowRadioUser: false,
129
+      isRadioUser: false,
127 130
       consumablesNum: this.data ? (this.data.consumablesNum ? this.data.consumablesNum : 1) : 1,
128 131
       workHourNum2: this.data ? (this.data.workHourNum2 ? this.data.workHourNum2 : 1) : 1,
129 132
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
@@ -218,6 +221,11 @@ export default {
218 221
       type: String,
219 222
       default: ""
220 223
     },
224
+    // 下拉框(user)
225
+    dataObj: {
226
+      type: Object,
227
+      default: () => {}
228
+    },
221 229
     // 文本块(维修记录)
222 230
     textName: {
223 231
       type: String,
@@ -234,6 +242,9 @@ export default {
234 242
     }
235 243
   },
236 244
   methods: {
245
+    changeRadioUser(){
246
+      this.selectUserId = undefined;
247
+    },
237 248
     copyTo(value){
238 249
       this.textareaData += value;
239 250
     },
@@ -389,7 +400,7 @@ export default {
389 400
     // 确定
390 401
     ok() {
391 402
       if (this.selectName === "user") {
392
-        this.$emit("ok", this.selectUserId);
403
+        this.$emit("ok", {selectUserId: this.selectUserId, isRadioUser: this.isRadioUser, selectGroupId: this.selectGroupId});
393 404
       } else if (this.selectName === "hc_add" || this.selectName === "hc_edit") {
394 405
         this.$emit("ok", {hc: this.data.hc, consumablesNum:this.consumablesNum});
395 406
       } else if (this.selectName === "gs_edit") {
@@ -429,6 +440,13 @@ export default {
429 440
       this.getZpBranch();
430 441
       // this.getZpGroup();
431 442
       // this.getZpUser();
443
+      if(this.dataObj.state.id == 1544){
444
+        this.isShowRadioUser = false;
445
+        this.isRadioUser = true;
446
+      }else{
447
+        this.isShowRadioUser = true;
448
+        this.isRadioUser = false;
449
+      }
432 450
     }
433 451
     if (this.textName === "textarea") {
434 452
       this.getLogs();

+ 27 - 6
src/views/IncidentNewList.vue

@@ -180,6 +180,7 @@
180 180
       @cancel="cancel"
181 181
       :operate="models.operate"
182 182
       selectName="user"
183
+      :dataObj="modelsData"
183 184
     ></showModel>
184 185
     <!-- 新增维修记录弹窗 -->
185 186
     <showModel
@@ -418,9 +419,10 @@ export default {
418 419
       this.audioMask=false;
419 420
     },
420 421
     //确定
421
-    ok(selectUserId) {
422
-      console.log(selectUserId);
423
-      if (!selectUserId) {
422
+    ok(data) {
423
+      let {selectUserId, isRadioUser, selectGroupId} = data;
424
+      console.log(data);
425
+      if (isRadioUser && !selectUserId) {
424 426
         this.$createDialog({
425 427
           type: "alert",
426 428
           title: "请选择指派对象",
@@ -428,19 +430,37 @@ export default {
428 430
         }).show();
429 431
         return;
430 432
       }
433
+      if (!isRadioUser && !selectGroupId) {
434
+        this.$createDialog({
435
+          type: "alert",
436
+          title: "请选择工作组",
437
+          icon: "cubeic-warn"
438
+        }).show();
439
+        return;
440
+      }
431 441
       const toast = this.$createToast({
432 442
         txt: "Loading...",
433 443
         mask: true
434 444
       });
435 445
       toast.show();
436
-      this.$http
437
-        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, {
446
+      let postData = {};
447
+      if(isRadioUser){
448
+        postData = {
438 449
           assginee: selectUserId,
439 450
           incId: this.modelsData.assignee ? this.modelsData.id : undefined,
440 451
           handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
441 452
           incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
442 453
           taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
443
-        })
454
+        };
455
+      }else{
456
+        postData = {
457
+          group: selectGroupId,
458
+          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
459
+        };
460
+        console.log(postData)
461
+      }
462
+      this.$http
463
+        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, postData)
444 464
         .then(res => {
445 465
           toast.hide();
446 466
           this.models.disjunctor = false;
@@ -477,6 +497,7 @@ export default {
477 497
     },
478 498
     // 指派
479 499
     assign(item) {
500
+      console.log(item)
480 501
       this.modelsData = item;
481 502
       this.models = {
482 503
         disjunctor: true,

+ 26 - 6
src/views/incidentList.vue

@@ -191,6 +191,7 @@
191 191
       @cancel="cancel"
192 192
       :operate="models.operate"
193 193
       selectName="user"
194
+      :dataObj="modelsData"
194 195
     ></showModel>
195 196
     <!-- 新增维修记录弹窗 -->
196 197
     <showModel
@@ -392,9 +393,10 @@ export default {
392 393
       this.audioMask=false;
393 394
     },
394 395
     //确定
395
-    ok(selectUserId) {
396
-      console.log(selectUserId);
397
-      if (!selectUserId) {
396
+    ok(data) {
397
+      let {selectUserId, isRadioUser, selectGroupId} = data;
398
+      console.log(data);
399
+      if (isRadioUser && !selectUserId) {
398 400
         this.$createDialog({
399 401
           type: "alert",
400 402
           title: "请选择指派对象",
@@ -402,19 +404,37 @@ export default {
402 404
         }).show();
403 405
         return;
404 406
       }
407
+      if (!isRadioUser && !selectGroupId) {
408
+        this.$createDialog({
409
+          type: "alert",
410
+          title: "请选择工作组",
411
+          icon: "cubeic-warn"
412
+        }).show();
413
+        return;
414
+      }
405 415
       const toast = this.$createToast({
406 416
         txt: "Loading...",
407 417
         mask: true
408 418
       });
409 419
       toast.show();
410
-      this.$http
411
-        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, {
420
+      let postData = {};
421
+      if(isRadioUser){
422
+        postData = {
412 423
           assginee: selectUserId,
413 424
           incId: this.modelsData.assignee ? this.modelsData.id : undefined,
414 425
           handlerIncidentId: this.modelsData.state.value === 'handler' ? this.modelsData.id : undefined,
415 426
           incidentId: this.modelsData.assignee ? undefined : this.modelsData.id,
416 427
           taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
417
-        })
428
+        };
429
+      }else{
430
+        postData = {
431
+          group: selectGroupId,
432
+          taskType: this.modelsData.state.value == 'handler' ? 'handlerform' : (this.modelsData.state.value == 'pending' ? 'receiveform' : undefined)
433
+        };
434
+        console.log(postData)
435
+      }
436
+      this.$http
437
+        .post("service/bpm/bpm/delegateTask/" + this.modelsData.taskId, postData)
418 438
         .then(res => {
419 439
           toast.hide();
420 440
           this.models.disjunctor = false;