Browse Source

处理日志改为维修记录

seimin 2 years ago
parent
commit
3a9f8480b6

+ 71 - 19
src/components/showModel/showModel.vue

@@ -47,18 +47,39 @@
47
           ></cube-select>
47
           ></cube-select>
48
         </div>
48
         </div>
49
         <div v-if="textName === 'textarea'">
49
         <div v-if="textName === 'textarea'">
50
-          <div class="tipsAll">
51
-            <div class="tips" v-for="item in logs" :key="item.id" @click="copyTo(item.value)">
52
-              {{ item.value }}
50
+          <div>
51
+            <div><span class="red">*</span>维修方式:</div>
52
+            <cube-select
53
+            v-model="maintenanceMode"
54
+            :options="modes"
55
+            placeholder="请选择维修方式"
56
+            style="margin:0.2rem 0;"
57
+          ></cube-select>
58
+          </div>
59
+          <div>
60
+            <div><span class="red">*</span>预估天数:</div>
61
+            <cube-select
62
+            v-model="estimatedNumberOfDays"
63
+            :options="days"
64
+            placeholder="请选择预估天数"
65
+            style="margin:0.2rem 0;"
66
+          ></cube-select>
67
+          </div>
68
+          <div>
69
+            <div><span class="red">*</span>备注:</div>
70
+            <cube-textarea
71
+              autofocus
72
+              :maxlength="255"
73
+              v-model="textareaData"
74
+              placeholder="请填写备注"
75
+              style="border:1px solid #ececec;height:2rem;resize:none;"
76
+            ></cube-textarea>
77
+            <div class="tipsAll">
78
+              <div class="tips" v-for="item in logs" :key="item.id" @click="copyTo(item.value)">
79
+                {{ item.value }}
80
+              </div>
53
             </div>
81
             </div>
54
           </div>
82
           </div>
55
-          <cube-textarea
56
-            autofocus
57
-            :maxlength="255"
58
-            v-model="textareaData"
59
-            placeholder="请填写处理日志"
60
-            style="border:1px solid #ececec;height:2rem;resize:none;"
61
-          ></cube-textarea>
62
         </div>
83
         </div>
63
         <!-- 耗材 -->
84
         <!-- 耗材 -->
64
         <div class="select-wrap hc" v-if="selectName === 'hc_add' || selectName === 'hc_edit'">
85
         <div class="select-wrap hc" v-if="selectName === 'hc_add' || selectName === 'hc_edit'">
@@ -118,13 +139,36 @@ export default {
118
       selectBranchId: undefined, //select选中的数据-院区
139
       selectBranchId: undefined, //select选中的数据-院区
119
       selectDataDuty: [], //select数据-责任科室
140
       selectDataDuty: [], //select数据-责任科室
120
       selectDutyId: undefined, //select选中的数据-责任科室
141
       selectDutyId: undefined, //select选中的数据-责任科室
121
-      textareaData: "" //textarea的数据
142
+      textareaData: "", //textarea的数据
143
+      maintenanceMode: "", //维修方式
144
+      estimatedNumberOfDays: "", //预估天数
145
+      modes: [],//维修方式列表
146
+      modesResource: [],//维修方式列表
147
+      days: [
148
+        {text: 1, value: 1},
149
+        {text: 2, value: 2},
150
+        {text: 3, value: 3},
151
+        {text: 4, value: 4},
152
+        {text: 5, value: 5},
153
+        {text: 6, value: 6},
154
+        {text: 7, value: 7},
155
+        {text: 8, value: 8},
156
+        {text: 9, value: 9},
157
+        {text: 10, value: 10},
158
+        {text: 11, value: 11},
159
+        {text: 12, value: 12},
160
+        {text: 13, value: 13},
161
+        {text: 14, value: 14},
162
+        {text: 15, value: 15},
163
+      ],//预估天数列表
122
     };
164
     };
123
   },
165
   },
124
   watch: {
166
   watch: {
125
     disjunctor(newValue) {
167
     disjunctor(newValue) {
126
       if (newValue && this.textName === "textarea") {
168
       if (newValue && this.textName === "textarea") {
127
         this.textareaData = "";
169
         this.textareaData = "";
170
+        this.maintenanceMode = "";
171
+        this.estimatedNumberOfDays = "";
128
       }
172
       }
129
       if (newValue && this.operate.know == "知道了") {
173
       if (newValue && this.operate.know == "知道了") {
130
         this.time = 5;
174
         this.time = 5;
@@ -174,7 +218,7 @@ export default {
174
       type: String,
218
       type: String,
175
       default: ""
219
       default: ""
176
     },
220
     },
177
-    // 文本块(处理日志)
221
+    // 文本块(维修记录)
178
     textName: {
222
     textName: {
179
       type: String,
223
       type: String,
180
       default: ""
224
       default: ""
@@ -202,6 +246,16 @@ export default {
202
           this.logs = res.data.list.slice(0,2);
246
           this.logs = res.data.list.slice(0,2);
203
         });
247
         });
204
     },
248
     },
249
+    getModes() {
250
+      var postData = { idx: 0, sum: 999, dictionary: { key: "repair_type" } };
251
+      this.$http
252
+        .post("service/bpm/data/fetchDataList/dictionary", postData)
253
+        .then(res => {
254
+          res.data.list = res.data.list || [];
255
+          this.modes = res.data.list.map(v => ({text: v.name, value: v.id}));
256
+          this.modesResource = res.data.list;
257
+        });
258
+    },
205
     //选择组
259
     //选择组
206
     changeGroup(groupId) {
260
     changeGroup(groupId) {
207
       this.getZpUser(groupId);
261
       this.getZpUser(groupId);
@@ -339,7 +393,7 @@ export default {
339
       } else if (this.selectName === "gs_edit") {
393
       } else if (this.selectName === "gs_edit") {
340
         this.$emit("ok", {gs: this.data.gs, workHourNum2:this.workHourNum2});
394
         this.$emit("ok", {gs: this.data.gs, workHourNum2:this.workHourNum2});
341
       } else if (this.textName === "textarea") {
395
       } else if (this.textName === "textarea") {
342
-        this.$emit("ok", this.textareaData);
396
+        this.$emit("ok", {textareaData: this.textareaData, maintenanceMode: this.modesResource.find(v=> v.id == this.maintenanceMode), estimatedNumberOfDays: this.estimatedNumberOfDays});
343
       } else {
397
       } else {
344
         this.$emit("ok");
398
         this.$emit("ok");
345
       }
399
       }
@@ -376,6 +430,7 @@ export default {
376
     }
430
     }
377
     if (this.textName === "textarea") {
431
     if (this.textName === "textarea") {
378
       this.getLogs();
432
       this.getLogs();
433
+      this.getModes();
379
     }
434
     }
380
   }
435
   }
381
 };
436
 };
@@ -390,17 +445,14 @@ export default {
390
   bottom: 0;
445
   bottom: 0;
391
   background-color: rgba(0, 0, 0, 0.2);
446
   background-color: rgba(0, 0, 0, 0.2);
392
   z-index: 99;
447
   z-index: 99;
448
+  .red{
449
+    color: red;
450
+  }
393
 
451
 
394
   .tipsAll {
452
   .tipsAll {
395
-    display: flex;
396
-    flex-wrap: wrap;
397
     .tips {
453
     .tips {
398
       word-break: break-all;
454
       word-break: break-all;
399
       margin-bottom: 0.1rem;
455
       margin-bottom: 0.1rem;
400
-      margin-left: 0.2rem;
401
-      &:first-of-type {
402
-        margin-left: 0;
403
-      }
404
     }
456
     }
405
   }
457
   }
406
 
458
 

+ 2 - 2
src/views/againAssign.vue

@@ -233,7 +233,7 @@ export default {
233
         .then(function (res) {
233
         .then(function (res) {
234
           console.log(res.data);
234
           console.log(res.data);
235
           that.progressInfo = res.data.data;
235
           that.progressInfo = res.data.data;
236
-          //处理日志startcaca
236
+          //维修记录startcaca
237
           if (that.model.incident.handlerLogs) {
237
           if (that.model.incident.handlerLogs) {
238
             //添加日志
238
             //添加日志
239
             that.model.incident.handlerLogs.forEach((v) => {
239
             that.model.incident.handlerLogs.forEach((v) => {
@@ -262,7 +262,7 @@ export default {
262
           that.progressInfo.push(jiedan);
262
           that.progressInfo.push(jiedan);
263
           that.progressInfo.push(kaishi);
263
           that.progressInfo.push(kaishi);
264
           console.log(that.progressInfo);
264
           console.log(that.progressInfo);
265
-          //处理日志end
265
+          //维修记录end
266
         });
266
         });
267
     },
267
     },
268
     //隐藏显示详情
268
     //隐藏显示详情

+ 2 - 2
src/views/closed.vue

@@ -286,7 +286,7 @@ export default {
286
         .then(function (res) {
286
         .then(function (res) {
287
           console.log(res.data);
287
           console.log(res.data);
288
           that.progressInfo = res.data.data;
288
           that.progressInfo = res.data.data;
289
-          //处理日志startcaca
289
+          //维修记录startcaca
290
           if (that.model.incident.handlerLogs) {
290
           if (that.model.incident.handlerLogs) {
291
             //添加日志
291
             //添加日志
292
             that.model.incident.handlerLogs.forEach((v) => {
292
             that.model.incident.handlerLogs.forEach((v) => {
@@ -315,7 +315,7 @@ export default {
315
           that.progressInfo.push(jiedan);
315
           that.progressInfo.push(jiedan);
316
           that.progressInfo.push(kaishi);
316
           that.progressInfo.push(kaishi);
317
           console.log(that.progressInfo);
317
           console.log(that.progressInfo);
318
-          //处理日志end
318
+          //维修记录end
319
         });
319
         });
320
     },
320
     },
321
     //隐藏显示详情
321
     //隐藏显示详情

+ 2 - 2
src/views/grabSheet.vue

@@ -194,7 +194,7 @@ export default {
194
         .then(function (res) {
194
         .then(function (res) {
195
           console.log(res.data);
195
           console.log(res.data);
196
           that.progressInfo = res.data.data;
196
           that.progressInfo = res.data.data;
197
-          //处理日志startcaca
197
+          //维修记录startcaca
198
           if (that.model.incident.handlerLogs) {
198
           if (that.model.incident.handlerLogs) {
199
             //添加日志
199
             //添加日志
200
             that.model.incident.handlerLogs.forEach((v) => {
200
             that.model.incident.handlerLogs.forEach((v) => {
@@ -223,7 +223,7 @@ export default {
223
           that.progressInfo.push(jiedan);
223
           that.progressInfo.push(jiedan);
224
           that.progressInfo.push(kaishi);
224
           that.progressInfo.push(kaishi);
225
           console.log(that.progressInfo);
225
           console.log(that.progressInfo);
226
-          //处理日志end
226
+          //维修记录end
227
         });
227
         });
228
     },
228
     },
229
     //隐藏显示详情
229
     //隐藏显示详情

+ 1 - 1
src/views/handlerLog.vue

@@ -1,6 +1,6 @@
1
 <template>
1
 <template>
2
 <div class="handlerLog">
2
 <div class="handlerLog">
3
-  <div class="label">处理日志</div>
3
+  <div class="label">维修记录</div>
4
   <table class="handlerLog__table">
4
   <table class="handlerLog__table">
5
     <tr>
5
     <tr>
6
       <td class="xh">序号</td>
6
       <td class="xh">序号</td>

+ 28 - 10
src/views/incidentList.vue

@@ -117,7 +117,7 @@
117
                     v-show="item.state.id === 1544"
117
                     v-show="item.state.id === 1544"
118
                   >
118
                   >
119
                     <cube-button @click.stop="addHandlerLog(item)"
119
                     <cube-button @click.stop="addHandlerLog(item)"
120
-                      >新增处理日志</cube-button
120
+                      >新增维修记录</cube-button
121
                     >
121
                     >
122
                   </cube-form-group>
122
                   </cube-form-group>
123
                 </div>
123
                 </div>
@@ -171,7 +171,7 @@
171
       :operate="models.operate"
171
       :operate="models.operate"
172
       selectName="user"
172
       selectName="user"
173
     ></showModel>
173
     ></showModel>
174
-    <!-- 新增处理日志弹窗 -->
174
+    <!-- 新增维修记录弹窗 -->
175
     <showModel
175
     <showModel
176
       :title="models1.title"
176
       :title="models1.title"
177
       :icon="models1.icon"
177
       :icon="models1.icon"
@@ -380,12 +380,28 @@ export default {
380
       };
380
       };
381
     },
381
     },
382
     //确定
382
     //确定
383
-    ok1(text) {
384
-      console.log(text);
385
-      if (!text.trim()) {
383
+    ok1(obj) {
384
+      console.log(obj);
385
+      if (!obj.maintenanceMode) {
386
         this.$createDialog({
386
         this.$createDialog({
387
           type: "alert",
387
           type: "alert",
388
-          title: "请填写处理日志",
388
+          title: "请选择维修方式",
389
+          icon: "cubeic-warn"
390
+        }).show();
391
+        return;
392
+      }
393
+      if (!obj.estimatedNumberOfDays) {
394
+        this.$createDialog({
395
+          type: "alert",
396
+          title: "请选择预估天数",
397
+          icon: "cubeic-warn"
398
+        }).show();
399
+        return;
400
+      }
401
+      if (!obj.textareaData.trim()) {
402
+        this.$createDialog({
403
+          type: "alert",
404
+          title: "请填写维修记录",
389
           icon: "cubeic-warn"
405
           icon: "cubeic-warn"
390
         }).show();
406
         }).show();
391
         return;
407
         return;
@@ -399,8 +415,10 @@ export default {
399
         .post("service/bpm/data/addData/operationLog", {
415
         .post("service/bpm/data/addData/operationLog", {
400
           operationLog: {
416
           operationLog: {
401
             opType: "handlerLog",
417
             opType: "handlerLog",
402
-            opValue: text,
403
-            extra1: this.modelsData1.id
418
+            opValue: obj.textareaData,
419
+            extra1: this.modelsData1.id,
420
+            repairType: obj.maintenanceMode,
421
+            expectedDay: obj.estimatedNumberOfDays,
404
           }
422
           }
405
         })
423
         })
406
         .then(res => {
424
         .then(res => {
@@ -437,12 +455,12 @@ export default {
437
     cancel1() {
455
     cancel1() {
438
       this.models1.disjunctor = false;
456
       this.models1.disjunctor = false;
439
     },
457
     },
440
-    // 新增处理日志
458
+    // 新增维修记录
441
     addHandlerLog(item) {
459
     addHandlerLog(item) {
442
       this.modelsData1 = item;
460
       this.modelsData1 = item;
443
       this.models1 = {
461
       this.models1 = {
444
         disjunctor: true,
462
         disjunctor: true,
445
-        title: "新增处理日志",
463
+        title: "新增维修记录",
446
         icon: "warn",
464
         icon: "warn",
447
         operate: {
465
         operate: {
448
           ok: "确定",
466
           ok: "确定",

+ 3 - 3
src/views/order.vue

@@ -32,7 +32,7 @@
32
                 :class="{active:actives=='handlerLog'}"
32
                 :class="{active:actives=='handlerLog'}"
33
                 href="javascript:;"
33
                 href="javascript:;"
34
                 @click="toInfo('handlerLog')"
34
                 @click="toInfo('handlerLog')"
35
-              >处理日志</a>
35
+              >维修记录</a>
36
             </div> -->
36
             </div> -->
37
             <div
37
             <div
38
               class="fl"
38
               class="fl"
@@ -240,7 +240,7 @@ export default {
240
         .then(function (res) {
240
         .then(function (res) {
241
           console.log(res.data);
241
           console.log(res.data);
242
           that.progressInfo = res.data.data;
242
           that.progressInfo = res.data.data;
243
-          //处理日志startcaca
243
+          //维修记录startcaca
244
           if (that.model.incident.handlerLogs) {
244
           if (that.model.incident.handlerLogs) {
245
             //添加日志
245
             //添加日志
246
             that.model.incident.handlerLogs.forEach((v) => {
246
             that.model.incident.handlerLogs.forEach((v) => {
@@ -269,7 +269,7 @@ export default {
269
           that.progressInfo.push(jiedan);
269
           that.progressInfo.push(jiedan);
270
           that.progressInfo.push(kaishi);
270
           that.progressInfo.push(kaishi);
271
           console.log(that.progressInfo);
271
           console.log(that.progressInfo);
272
-          //处理日志end
272
+          //维修记录end
273
         });
273
         });
274
     },
274
     },
275
     //隐藏显示详情
275
     //隐藏显示详情

+ 8 - 8
src/views/processing.vue

@@ -23,7 +23,7 @@
23
               :class="{ active: actives == 'handlerLog' }"
23
               :class="{ active: actives == 'handlerLog' }"
24
               href="javascript:;"
24
               href="javascript:;"
25
               @click="toInfo('handlerLog')"
25
               @click="toInfo('handlerLog')"
26
-              >处理日志</a>
26
+              >维修记录</a>
27
           </div> -->
27
           </div> -->
28
           <div
28
           <div
29
             class="fl"
29
             class="fl"
@@ -295,7 +295,7 @@
295
                       <textarea
295
                       <textarea
296
                         style="margin-top:0.1rem;width:100%;"
296
                         style="margin-top:0.1rem;width:100%;"
297
                         class="titleTxtArea fl"
297
                         class="titleTxtArea fl"
298
-                        placeholder="请输入处理日志"
298
+                        placeholder="请输入维修记录"
299
                         v-model="handlerLog"
299
                         v-model="handlerLog"
300
                       ></textarea>
300
                       ></textarea>
301
                     </div>
301
                     </div>
@@ -468,7 +468,7 @@ export default {
468
         incident: {}
468
         incident: {}
469
       }, //上传的model
469
       }, //上传的model
470
       incidentTitle: "", //处理方案
470
       incidentTitle: "", //处理方案
471
-      handlerLog: "", //处理日志
471
+      handlerLog: "", //维修记录
472
       referenceInfo: {}, //引用信息
472
       referenceInfo: {}, //引用信息
473
       selectedCategoryTxt: "", //事件分类选中展示
473
       selectedCategoryTxt: "", //事件分类选中展示
474
       selectedAreaId: "", //区域选中id--seimin
474
       selectedAreaId: "", //区域选中id--seimin
@@ -754,9 +754,9 @@ export default {
754
         {
754
         {
755
           type: "textarea",
755
           type: "textarea",
756
           modelKey: "handlerLog",
756
           modelKey: "handlerLog",
757
-          label: "处理日志:",
757
+          label: "维修记录:",
758
           props: {
758
           props: {
759
-            placeholder: "请填写处理日志"
759
+            placeholder: "请填写维修记录"
760
           },
760
           },
761
           rules: {
761
           rules: {
762
             required: false
762
             required: false
@@ -1081,7 +1081,7 @@ export default {
1081
         .then(function(res) {
1081
         .then(function(res) {
1082
           console.log(res.data);
1082
           console.log(res.data);
1083
           that.progressInfo = res.data.data;
1083
           that.progressInfo = res.data.data;
1084
-          //处理日志startcaca
1084
+          //维修记录startcaca
1085
           if (that.modelData.incident.handlerLogs) {
1085
           if (that.modelData.incident.handlerLogs) {
1086
             //添加日志
1086
             //添加日志
1087
             that.modelData.incident.handlerLogs.forEach(v => {
1087
             that.modelData.incident.handlerLogs.forEach(v => {
@@ -1110,7 +1110,7 @@ export default {
1110
           that.progressInfo.push(jiedan);
1110
           that.progressInfo.push(jiedan);
1111
           that.progressInfo.push(kaishi);
1111
           that.progressInfo.push(kaishi);
1112
           console.log(that.progressInfo);
1112
           console.log(that.progressInfo);
1113
-          //处理日志end
1113
+          //维修记录end
1114
         });
1114
         });
1115
     },
1115
     },
1116
     //隐藏显示详情
1116
     //隐藏显示详情
@@ -1779,7 +1779,7 @@ export default {
1779
     },
1779
     },
1780
     handlerFn() {
1780
     handlerFn() {
1781
       let that = this;
1781
       let that = this;
1782
-      //填写了处理日志,并且是处理中状态
1782
+      //填写了维修记录,并且是处理中状态
1783
       if (
1783
       if (
1784
         that.handlerLog &&
1784
         that.handlerLog &&
1785
         that.handlerLog.trim() &&
1785
         that.handlerLog.trim() &&

+ 3 - 3
src/views/solved.vue

@@ -25,7 +25,7 @@
25
               :class="{ active: actives == 'handlerLog' }"
25
               :class="{ active: actives == 'handlerLog' }"
26
               href="javascript:;"
26
               href="javascript:;"
27
               @click="toInfo('handlerLog')"
27
               @click="toInfo('handlerLog')"
28
-              >处理日志</a
28
+              >维修记录</a
29
             >
29
             >
30
           </div> -->
30
           </div> -->
31
           <div class="fl">
31
           <div class="fl">
@@ -319,7 +319,7 @@ export default {
319
         .then(function (res) {
319
         .then(function (res) {
320
           console.log(res.data);
320
           console.log(res.data);
321
           that.progressInfo = res.data.data;
321
           that.progressInfo = res.data.data;
322
-          //处理日志startcaca
322
+          //维修记录startcaca
323
           if (that.model.incident.handlerLogs) {
323
           if (that.model.incident.handlerLogs) {
324
             //添加日志
324
             //添加日志
325
             that.model.incident.handlerLogs.forEach((v) => {
325
             that.model.incident.handlerLogs.forEach((v) => {
@@ -348,7 +348,7 @@ export default {
348
           that.progressInfo.push(jiedan);
348
           that.progressInfo.push(jiedan);
349
           that.progressInfo.push(kaishi);
349
           that.progressInfo.push(kaishi);
350
           console.log(that.progressInfo);
350
           console.log(that.progressInfo);
351
-          //处理日志end
351
+          //维修记录end
352
         });
352
         });
353
     },
353
     },
354
     // 获取结果类型
354
     // 获取结果类型