Browse Source

处理日志改为维修记录

seimin 2 years ago
parent
commit
3a9f8480b6

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

@@ -47,18 +47,39 @@
47 47
           ></cube-select>
48 48
         </div>
49 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 81
             </div>
54 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 83
         </div>
63 84
         <!-- 耗材 -->
64 85
         <div class="select-wrap hc" v-if="selectName === 'hc_add' || selectName === 'hc_edit'">
@@ -118,13 +139,36 @@ export default {
118 139
       selectBranchId: undefined, //select选中的数据-院区
119 140
       selectDataDuty: [], //select数据-责任科室
120 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 166
   watch: {
125 167
     disjunctor(newValue) {
126 168
       if (newValue && this.textName === "textarea") {
127 169
         this.textareaData = "";
170
+        this.maintenanceMode = "";
171
+        this.estimatedNumberOfDays = "";
128 172
       }
129 173
       if (newValue && this.operate.know == "知道了") {
130 174
         this.time = 5;
@@ -174,7 +218,7 @@ export default {
174 218
       type: String,
175 219
       default: ""
176 220
     },
177
-    // 文本块(处理日志)
221
+    // 文本块(维修记录)
178 222
     textName: {
179 223
       type: String,
180 224
       default: ""
@@ -202,6 +246,16 @@ export default {
202 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 260
     changeGroup(groupId) {
207 261
       this.getZpUser(groupId);
@@ -339,7 +393,7 @@ export default {
339 393
       } else if (this.selectName === "gs_edit") {
340 394
         this.$emit("ok", {gs: this.data.gs, workHourNum2:this.workHourNum2});
341 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 397
       } else {
344 398
         this.$emit("ok");
345 399
       }
@@ -376,6 +430,7 @@ export default {
376 430
     }
377 431
     if (this.textName === "textarea") {
378 432
       this.getLogs();
433
+      this.getModes();
379 434
     }
380 435
   }
381 436
 };
@@ -390,17 +445,14 @@ export default {
390 445
   bottom: 0;
391 446
   background-color: rgba(0, 0, 0, 0.2);
392 447
   z-index: 99;
448
+  .red{
449
+    color: red;
450
+  }
393 451
 
394 452
   .tipsAll {
395
-    display: flex;
396
-    flex-wrap: wrap;
397 453
     .tips {
398 454
       word-break: break-all;
399 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 233
         .then(function (res) {
234 234
           console.log(res.data);
235 235
           that.progressInfo = res.data.data;
236
-          //处理日志startcaca
236
+          //维修记录startcaca
237 237
           if (that.model.incident.handlerLogs) {
238 238
             //添加日志
239 239
             that.model.incident.handlerLogs.forEach((v) => {
@@ -262,7 +262,7 @@ export default {
262 262
           that.progressInfo.push(jiedan);
263 263
           that.progressInfo.push(kaishi);
264 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 286
         .then(function (res) {
287 287
           console.log(res.data);
288 288
           that.progressInfo = res.data.data;
289
-          //处理日志startcaca
289
+          //维修记录startcaca
290 290
           if (that.model.incident.handlerLogs) {
291 291
             //添加日志
292 292
             that.model.incident.handlerLogs.forEach((v) => {
@@ -315,7 +315,7 @@ export default {
315 315
           that.progressInfo.push(jiedan);
316 316
           that.progressInfo.push(kaishi);
317 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 194
         .then(function (res) {
195 195
           console.log(res.data);
196 196
           that.progressInfo = res.data.data;
197
-          //处理日志startcaca
197
+          //维修记录startcaca
198 198
           if (that.model.incident.handlerLogs) {
199 199
             //添加日志
200 200
             that.model.incident.handlerLogs.forEach((v) => {
@@ -223,7 +223,7 @@ export default {
223 223
           that.progressInfo.push(jiedan);
224 224
           that.progressInfo.push(kaishi);
225 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 1
 <template>
2 2
 <div class="handlerLog">
3
-  <div class="label">处理日志</div>
3
+  <div class="label">维修记录</div>
4 4
   <table class="handlerLog__table">
5 5
     <tr>
6 6
       <td class="xh">序号</td>

+ 28 - 10
src/views/incidentList.vue

@@ -117,7 +117,7 @@
117 117
                     v-show="item.state.id === 1544"
118 118
                   >
119 119
                     <cube-button @click.stop="addHandlerLog(item)"
120
-                      >新增处理日志</cube-button
120
+                      >新增维修记录</cube-button
121 121
                     >
122 122
                   </cube-form-group>
123 123
                 </div>
@@ -171,7 +171,7 @@
171 171
       :operate="models.operate"
172 172
       selectName="user"
173 173
     ></showModel>
174
-    <!-- 新增处理日志弹窗 -->
174
+    <!-- 新增维修记录弹窗 -->
175 175
     <showModel
176 176
       :title="models1.title"
177 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 386
         this.$createDialog({
387 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 405
           icon: "cubeic-warn"
390 406
         }).show();
391 407
         return;
@@ -399,8 +415,10 @@ export default {
399 415
         .post("service/bpm/data/addData/operationLog", {
400 416
           operationLog: {
401 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 424
         .then(res => {
@@ -437,12 +455,12 @@ export default {
437 455
     cancel1() {
438 456
       this.models1.disjunctor = false;
439 457
     },
440
-    // 新增处理日志
458
+    // 新增维修记录
441 459
     addHandlerLog(item) {
442 460
       this.modelsData1 = item;
443 461
       this.models1 = {
444 462
         disjunctor: true,
445
-        title: "新增处理日志",
463
+        title: "新增维修记录",
446 464
         icon: "warn",
447 465
         operate: {
448 466
           ok: "确定",

+ 3 - 3
src/views/order.vue

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

+ 3 - 3
src/views/solved.vue

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