Просмотр исходного кода

绑定到事件的耗材展示

seimin лет назад: 3
Родитель
Сommit
29d553e703
9 измененных файлов с 252 добавлено и 19 удалено
  1. 13 1
      src/App.vue
  2. 1 1
      src/views/App.vue
  3. 22 11
      src/views/Login.vue
  4. 36 1
      src/views/againAssign.vue
  5. 36 1
      src/views/closed.vue
  6. 36 1
      src/views/grabSheet.vue
  7. 36 1
      src/views/order.vue
  8. 36 1
      src/views/processing.vue
  9. 36 1
      src/views/solved.vue

+ 13 - 1
src/App.vue

@@ -149,4 +149,16 @@ i.iconfont {
149 149
     color: #056a00;
150 150
   }
151 151
 }
152
-</style>
152
+.hcTable {
153
+  padding: 0.1rem 0.24rem;
154
+  table {
155
+    border-collapse: collapse;
156
+    border: 0.01rem solid #ccc;
157
+    width: 100%;
158
+    td {
159
+      border: 0.01rem solid #ccc;
160
+      text-align: center;
161
+    }
162
+  }
163
+}
164
+</style>

+ 1 - 1
src/views/App.vue

@@ -22,5 +22,5 @@ export default {
22 22
 .bgColor{
23 23
       background-color: white
24 24
   }
25
-  
25
+
26 26
 </style>

+ 22 - 11
src/views/Login.vue

@@ -46,19 +46,33 @@ export default {
46 46
   methods: {
47 47
     // 获取版本配置(报修主题:报修人/报修科室)
48 48
     getConfig() {
49
-      var that = this;
50 49
       this.$http
51 50
         .post("/service/sysinfo/data/fetchDataList/systemConfiguration", {
52 51
           idx: 0,
53 52
           sum: 1000,
54
-          systemConfiguration: { keyconfig: "repairMain" }
55 53
         })
56
-        .then(function(res) {
57
-          console.log(res);
54
+        .then((res) => {
55
+          let list = res.data.list;
56
+          let repairMain = list.find((v) => v.keyconfig == "repairMain"); //报修主体
57
+          let incidentWithConsumable = list.find(
58
+            (v) => v.keyconfig == "incidentWithConsumable"
59
+          ); //是否绑定耗材
60
+          let wxIncidentWithCmdb = list.find(
61
+            (v) => v.keyconfig == "wxIncidentWithCmdb"
62
+          ); //是否绑定资产
58 63
           localStorage.setItem(
59 64
             "valConfig",
60
-            JSON.stringify(res.data.list[0].valueconfig)
65
+            JSON.stringify(repairMain.valueconfig)
66
+          );
67
+          localStorage.setItem(
68
+            "incidentWithConsumable",
69
+            incidentWithConsumable.valueconfig
61 70
           );
71
+          localStorage.setItem(
72
+            "wxIncidentWithCmdb",
73
+            wxIncidentWithCmdb.valueconfig
74
+          );
75
+          this.$router.push({ path: "/main" });
62 76
         });
63 77
     },
64 78
     // 获取报修人登录方式
@@ -98,13 +112,12 @@ export default {
98 112
       this.$http.post("/service/auth/loginEncrypt", postData).then(res => {
99 113
         that.loading = false;
100 114
         if (res.data && res.data.state == 200) {
101
-          this.getConfig();
102 115
           localStorage.setItem("loginUser", JSON.stringify(res.data.data.user));
103 116
           localStorage.setItem(
104 117
             "login_requester",
105 118
             JSON.stringify(res.data.data.requester)
106 119
           );
107
-          this.$router.push({ path: "/main" });
120
+          this.getConfig();
108 121
         } else {
109 122
           that
110 123
             .$createDialog({
@@ -126,7 +139,6 @@ export default {
126 139
           window.location.href = res.data.url;
127 140
         } else {
128 141
           if (res.data.user) {
129
-            that.getConfig();
130 142
             localStorage.setItem(
131 143
               "loginUser",
132 144
               JSON.stringify(res.data.user.user)
@@ -135,7 +147,7 @@ export default {
135 147
               "login_requester",
136 148
               JSON.stringify(res.data.user.requester)
137 149
             );
138
-            this.$router.push({ path: "/main" });
150
+            that.getConfig();
139 151
           }
140 152
         }
141 153
       });
@@ -153,7 +165,6 @@ export default {
153 165
         that.$http.post("service/auth/wechatLoginEncrypt", code).then((res) => {
154 166
           if (res.data.state == 200) {
155 167
             if (res.data.user) {
156
-              that.getConfig();
157 168
               localStorage.setItem(
158 169
                 "loginUser",
159 170
                 JSON.stringify(res.data.user.user)
@@ -162,7 +173,7 @@ export default {
162 173
                 "login_requester",
163 174
                 JSON.stringify(res.data.user.requester)
164 175
               );
165
-              this.$router.push({ path: "/main" });
176
+              that.getConfig();
166 177
             }
167 178
           } else if (res.data.state == 501) {
168 179
             that

+ 36 - 1
src/views/againAssign.vue

@@ -139,12 +139,29 @@
139 139
                   model.incident.place ? model.incident.place.area.area : "--"
140 140
                 }}</span>
141 141
               </p>
142
-              <p>
142
+              <p class="boeder_B">
143 143
                 <span class="fl">地点</span>
144 144
                 <span class="fr">{{
145 145
                   model.incident.place ? model.incident.place.place : "--"
146 146
                 }}</span>
147 147
               </p>
148
+              <div v-if="hcsjList.length">
149
+                <p>耗材</p>
150
+                <div class="hcTable">
151
+                  <table>
152
+                    <tr>
153
+                      <td>耗材名称</td>
154
+                      <td>价格</td>
155
+                      <td>数量</td>
156
+                    </tr>
157
+                    <tr v-for="(item,i) in hcsjList" :key="i">
158
+                      <td>{{item.consumable.name}}</td>
159
+                      <td>{{item.extra1}}</td>
160
+                      <td>{{item.consumablesSum}}</td>
161
+                    </tr>
162
+                  </table>
163
+                </div>
164
+              </div>
148 165
           </div>
149 166
           <p class="info_hide">
150 167
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -273,6 +290,9 @@ export default {
273 290
       id: "",
274 291
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
275 292
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
293
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
294
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
295
+      hcsjList:[],//绑定的耗材列表,展示
276 296
       promptingConent: "",
277 297
       promptingStatus: "",
278 298
       item_hides: false,
@@ -294,6 +314,18 @@ export default {
294 314
     PrompTing
295 315
   },
296 316
   methods: {
317
+    // 获取事件上绑定的耗材
318
+    getHcBySj() {
319
+      this.$http
320
+        .post("service/cmdb/storeList", {
321
+          data: { type: 2, source: "1627", sourceId: this.id },
322
+        })
323
+        .then((result) => {
324
+          if(result.data.status == 200){
325
+            this.hcsjList = result.data.data;
326
+          }
327
+        });
328
+    },
297 329
     //   获取事件数据
298 330
     getParamsData() {
299 331
       var that = this;
@@ -496,6 +528,9 @@ export default {
496 528
     this.id = this.$route.params.data.id;
497 529
     this.getParamsData();
498 530
     this.getImgs();
531
+    if(this.incidentWithConsumable == 1){
532
+      this.getHcBySj();
533
+    }
499 534
     this.getHandlerUser();
500 535
     this.getCandidateGroups();
501 536
   }

+ 36 - 1
src/views/closed.vue

@@ -149,12 +149,29 @@
149 149
                 model.incident.place ? model.incident.place.area.area : "--"
150 150
               }}</span>
151 151
             </p>
152
-            <p>
152
+            <p class="boeder_B">
153 153
               <span class="fl">地点</span>
154 154
               <span class="fr">{{
155 155
                 model.incident.place ? model.incident.place.place : "--"
156 156
               }}</span>
157 157
             </p>
158
+            <div v-if="hcsjList.length">
159
+                <p>耗材</p>
160
+                <div class="hcTable">
161
+                  <table>
162
+                    <tr>
163
+                      <td>耗材名称</td>
164
+                      <td>价格</td>
165
+                      <td>数量</td>
166
+                    </tr>
167
+                    <tr v-for="(item,i) in hcsjList" :key="i">
168
+                      <td>{{item.consumable.name}}</td>
169
+                      <td>{{item.extra1}}</td>
170
+                      <td>{{item.consumablesSum}}</td>
171
+                    </tr>
172
+                  </table>
173
+                </div>
174
+              </div>
158 175
           </div>
159 176
           <p class="info_hide">
160 177
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -305,6 +322,9 @@ export default {
305 322
       id: "",
306 323
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
307 324
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
325
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
326
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
327
+      hcsjList:[],//绑定的耗材列表,展示
308 328
       selected: 1,
309 329
       options: [
310 330
         {
@@ -332,6 +352,18 @@ export default {
332 352
     // HandlerLog
333 353
   },
334 354
   methods: {
355
+    // 获取事件上绑定的耗材
356
+    getHcBySj() {
357
+      this.$http
358
+        .post("service/cmdb/storeList", {
359
+          data: { type: 2, source: "1627", sourceId: this.id },
360
+        })
361
+        .then((result) => {
362
+          if(result.data.status == 200){
363
+            this.hcsjList = result.data.data;
364
+          }
365
+        });
366
+    },
335 367
     //   获取事件数据
336 368
     getParamsData() {
337 369
       var that = this;
@@ -453,6 +485,9 @@ export default {
453 485
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
454 486
     this.getParamsData();
455 487
     this.getImgs();
488
+    if(this.incidentWithConsumable == 1){
489
+      this.getHcBySj();
490
+    }
456 491
   }
457 492
 };
458 493
 </script>

+ 36 - 1
src/views/grabSheet.vue

@@ -134,12 +134,29 @@
134 134
                   model.incident.place ? model.incident.place.area.area : "--"
135 135
                 }}</span>
136 136
               </p>
137
-              <p>
137
+              <p class="boeder_B">
138 138
                 <span class="fl">地点</span>
139 139
                 <span class="fr">{{
140 140
                   model.incident.place ? model.incident.place.place : "--"
141 141
                 }}</span>
142 142
               </p>
143
+              <div v-if="hcsjList.length">
144
+                <p>耗材</p>
145
+                <div class="hcTable">
146
+                  <table>
147
+                    <tr>
148
+                      <td>耗材名称</td>
149
+                      <td>价格</td>
150
+                      <td>数量</td>
151
+                    </tr>
152
+                    <tr v-for="(item,i) in hcsjList" :key="i">
153
+                      <td>{{item.consumable.name}}</td>
154
+                      <td>{{item.extra1}}</td>
155
+                      <td>{{item.consumablesSum}}</td>
156
+                    </tr>
157
+                  </table>
158
+                </div>
159
+              </div>
143 160
             </div>
144 161
             <p class="info_hide">
145 162
               <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -223,6 +240,9 @@ export default {
223 240
       id: "",
224 241
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
225 242
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
243
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
244
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
245
+      hcsjList:[],//绑定的耗材列表,展示
226 246
       selected: 1,
227 247
       options: [
228 248
         {
@@ -246,6 +266,18 @@ export default {
246 266
     };
247 267
   },
248 268
   methods: {
269
+    // 获取事件上绑定的耗材
270
+    getHcBySj() {
271
+      this.$http
272
+        .post("service/cmdb/storeList", {
273
+          data: { type: 2, source: "1627", sourceId: this.id },
274
+        })
275
+        .then((result) => {
276
+          if(result.data.status == 200){
277
+            this.hcsjList = result.data.data;
278
+          }
279
+        });
280
+    },
249 281
     //   获取事件数据
250 282
     getParamsData() {
251 283
       var that = this;
@@ -406,6 +438,9 @@ export default {
406 438
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
407 439
     this.getParamsData();
408 440
     this.getImgs();
441
+    if(this.incidentWithConsumable == 1){
442
+      this.getHcBySj();
443
+    }
409 444
   }
410 445
 };
411 446
 </script>

+ 36 - 1
src/views/order.vue

@@ -175,12 +175,29 @@
175 175
                   model.incident.place ? model.incident.place.area.area : "--"
176 176
                 }}</span>
177 177
               </p>
178
-              <p>
178
+              <p class="boeder_B">
179 179
                 <span class="fl">地点</span>
180 180
                 <span class="fr">{{
181 181
                   model.incident.place ? model.incident.place.place : "--"
182 182
                 }}</span>
183 183
               </p>
184
+              <div v-if="hcsjList.length">
185
+                <p>耗材</p>
186
+                <div class="hcTable">
187
+                  <table>
188
+                    <tr>
189
+                      <td>耗材名称</td>
190
+                      <td>价格</td>
191
+                      <td>数量</td>
192
+                    </tr>
193
+                    <tr v-for="(item,i) in hcsjList" :key="i">
194
+                      <td>{{item.consumable.name}}</td>
195
+                      <td>{{item.extra1}}</td>
196
+                      <td>{{item.consumablesSum}}</td>
197
+                    </tr>
198
+                  </table>
199
+                </div>
200
+              </div>
184 201
               <!-- <p v-if="model.incident.synergeticReason">
185 202
                 <span class="fl" >协同原因</span>
186 203
                 <span class="fr">{{model.incident.synergeticReason}}</span>
@@ -296,6 +313,9 @@ export default {
296 313
     return {
297 314
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
298 315
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
316
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
317
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
318
+      hcsjList:[],//绑定的耗材列表,展示
299 319
       selected: 1,
300 320
       id: "",
301 321
       options: [
@@ -326,6 +346,18 @@ export default {
326 346
     // HandlerLog
327 347
   },
328 348
   methods: {
349
+    // 获取事件上绑定的耗材
350
+    getHcBySj() {
351
+      this.$http
352
+        .post("service/cmdb/storeList", {
353
+          data: { type: 2, source: "1627", sourceId: this.id },
354
+        })
355
+        .then((result) => {
356
+          if(result.data.status == 200){
357
+            this.hcsjList = result.data.data;
358
+          }
359
+        });
360
+    },
329 361
     //   获取事件数据
330 362
     getParamsData() {
331 363
       var that = this;
@@ -500,6 +532,9 @@ export default {
500 532
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
501 533
     this.getParamsData();
502 534
     this.getImgs();
535
+    if(this.incidentWithConsumable == 1){
536
+      this.getHcBySj();
537
+    }
503 538
   }
504 539
 };
505 540
 </script>

+ 36 - 1
src/views/processing.vue

@@ -170,12 +170,29 @@
170 170
                   : "--"
171 171
               }}</span>
172 172
             </p>
173
-            <p>
173
+            <p class="boeder_B">
174 174
               <span class="fl">地点</span>
175 175
               <span class="fr">{{
176 176
                 modelData.incident.place ? modelData.incident.place.place : "--"
177 177
               }}</span>
178 178
             </p>
179
+            <div v-if="hcsjList.length">
180
+                <p>耗材</p>
181
+                <div class="hcTable">
182
+                  <table>
183
+                    <tr>
184
+                      <td>耗材名称</td>
185
+                      <td>价格</td>
186
+                      <td>数量</td>
187
+                    </tr>
188
+                    <tr v-for="(item,i) in hcsjList" :key="i">
189
+                      <td>{{item.consumable.name}}</td>
190
+                      <td>{{item.extra1}}</td>
191
+                      <td>{{item.consumablesSum}}</td>
192
+                    </tr>
193
+                  </table>
194
+                </div>
195
+              </div>
179 196
 
180 197
             <!-- <p v-if="modelData.incident.synergeticReason">
181 198
                 <span class="fl" >协同原因</span>
@@ -508,6 +525,9 @@ export default {
508 525
     return {
509 526
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
510 527
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
528
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
529
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
530
+      hcsjList:[],//绑定的耗材列表,展示
511 531
       id: "",
512 532
       resignComment: "", //重新指派原因
513 533
       item_hides: false,
@@ -828,6 +848,18 @@ export default {
828 848
     // HandlerLog
829 849
   },
830 850
   methods: {
851
+    // 获取事件上绑定的耗材
852
+    getHcBySj() {
853
+      this.$http
854
+        .post("service/cmdb/storeList", {
855
+          data: { type: 2, source: "1627", sourceId: this.id },
856
+        })
857
+        .then((result) => {
858
+          if(result.data.status == 200){
859
+            this.hcsjList = result.data.data;
860
+          }
861
+        });
862
+    },
831 863
     //获取区域
832 864
     getAreaList() {
833 865
       return new Promise((resolve, reject) => {
@@ -1657,6 +1689,9 @@ export default {
1657 1689
     this.action.target += this.processInstanceId;
1658 1690
     this.getParamsData();
1659 1691
     this.getImgs();
1692
+    if(this.incidentWithConsumable == 1){
1693
+      this.getHcBySj();
1694
+    }
1660 1695
     // 处理方式
1661 1696
     this.getHandleCategory();
1662 1697
     // 关闭代码

+ 36 - 1
src/views/solved.vue

@@ -147,12 +147,29 @@
147 147
                 model.incident.place ? model.incident.place.area.area : "--"
148 148
               }}</span>
149 149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151 151
               <span class="fl">地点</span>
152 152
               <span class="fr">{{
153 153
                 model.incident.place ? model.incident.place.place : "--"
154 154
               }}</span>
155 155
             </p>
156
+            <div v-if="hcsjList.length">
157
+                <p>耗材</p>
158
+                <div class="hcTable">
159
+                  <table>
160
+                    <tr>
161
+                      <td>耗材名称</td>
162
+                      <td>价格</td>
163
+                      <td>数量</td>
164
+                    </tr>
165
+                    <tr v-for="(item,i) in hcsjList" :key="i">
166
+                      <td>{{item.consumable.name}}</td>
167
+                      <td>{{item.extra1}}</td>
168
+                      <td>{{item.consumablesSum}}</td>
169
+                    </tr>
170
+                  </table>
171
+                </div>
172
+              </div>
156 173
           </div>
157 174
           <p class="info_hide">
158 175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -331,6 +348,9 @@ export default {
331 348
       id: "",
332 349
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
333 350
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
351
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
352
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
353
+      hcsjList:[],//绑定的耗材列表,展示
334 354
       selected: 1,
335 355
       isclose: "close", //是否已解决
336 356
       iscloseArr: [
@@ -363,6 +383,18 @@ export default {
363 383
     // HandlerLog
364 384
   },
365 385
   methods: {
386
+    // 获取事件上绑定的耗材
387
+    getHcBySj() {
388
+      this.$http
389
+        .post("service/cmdb/storeList", {
390
+          data: { type: 2, source: "1627", sourceId: this.id },
391
+        })
392
+        .then((result) => {
393
+          if(result.data.status == 200){
394
+            this.hcsjList = result.data.data;
395
+          }
396
+        });
397
+    },
366 398
     //   获取事件数据
367 399
     getParamsData() {
368 400
       var that = this;
@@ -577,6 +609,9 @@ export default {
577 609
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
578 610
     this.getParamsData();
579 611
     this.getImgs();
612
+    if(this.incidentWithConsumable == 1){
613
+      this.getHcBySj();
614
+    }
580 615
     this.getHandlerRes();
581 616
     this.getDegree();
582 617
   }