浏览代码

绑定到事件的耗材展示

seimin 3 年之前
父节点
当前提交
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
     color: #056a00;
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
 .bgColor{
22
 .bgColor{
23
       background-color: white
23
       background-color: white
24
   }
24
   }
25
-  
25
+
26
 </style>
26
 </style>

+ 22 - 11
src/views/Login.vue

@@ -46,19 +46,33 @@ export default {
46
   methods: {
46
   methods: {
47
     // 获取版本配置(报修主题:报修人/报修科室)
47
     // 获取版本配置(报修主题:报修人/报修科室)
48
     getConfig() {
48
     getConfig() {
49
-      var that = this;
50
       this.$http
49
       this.$http
51
         .post("/service/sysinfo/data/fetchDataList/systemConfiguration", {
50
         .post("/service/sysinfo/data/fetchDataList/systemConfiguration", {
52
           idx: 0,
51
           idx: 0,
53
           sum: 1000,
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
           localStorage.setItem(
63
           localStorage.setItem(
59
             "valConfig",
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
       this.$http.post("/service/auth/loginEncrypt", postData).then(res => {
112
       this.$http.post("/service/auth/loginEncrypt", postData).then(res => {
99
         that.loading = false;
113
         that.loading = false;
100
         if (res.data && res.data.state == 200) {
114
         if (res.data && res.data.state == 200) {
101
-          this.getConfig();
102
           localStorage.setItem("loginUser", JSON.stringify(res.data.data.user));
115
           localStorage.setItem("loginUser", JSON.stringify(res.data.data.user));
103
           localStorage.setItem(
116
           localStorage.setItem(
104
             "login_requester",
117
             "login_requester",
105
             JSON.stringify(res.data.data.requester)
118
             JSON.stringify(res.data.data.requester)
106
           );
119
           );
107
-          this.$router.push({ path: "/main" });
120
+          this.getConfig();
108
         } else {
121
         } else {
109
           that
122
           that
110
             .$createDialog({
123
             .$createDialog({
@@ -126,7 +139,6 @@ export default {
126
           window.location.href = res.data.url;
139
           window.location.href = res.data.url;
127
         } else {
140
         } else {
128
           if (res.data.user) {
141
           if (res.data.user) {
129
-            that.getConfig();
130
             localStorage.setItem(
142
             localStorage.setItem(
131
               "loginUser",
143
               "loginUser",
132
               JSON.stringify(res.data.user.user)
144
               JSON.stringify(res.data.user.user)
@@ -135,7 +147,7 @@ export default {
135
               "login_requester",
147
               "login_requester",
136
               JSON.stringify(res.data.user.requester)
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
         that.$http.post("service/auth/wechatLoginEncrypt", code).then((res) => {
165
         that.$http.post("service/auth/wechatLoginEncrypt", code).then((res) => {
154
           if (res.data.state == 200) {
166
           if (res.data.state == 200) {
155
             if (res.data.user) {
167
             if (res.data.user) {
156
-              that.getConfig();
157
               localStorage.setItem(
168
               localStorage.setItem(
158
                 "loginUser",
169
                 "loginUser",
159
                 JSON.stringify(res.data.user.user)
170
                 JSON.stringify(res.data.user.user)
@@ -162,7 +173,7 @@ export default {
162
                 "login_requester",
173
                 "login_requester",
163
                 JSON.stringify(res.data.user.requester)
174
                 JSON.stringify(res.data.user.requester)
164
               );
175
               );
165
-              this.$router.push({ path: "/main" });
176
+              that.getConfig();
166
             }
177
             }
167
           } else if (res.data.state == 501) {
178
           } else if (res.data.state == 501) {
168
             that
179
             that

+ 36 - 1
src/views/againAssign.vue

@@ -139,12 +139,29 @@
139
                   model.incident.place ? model.incident.place.area.area : "--"
139
                   model.incident.place ? model.incident.place.area.area : "--"
140
                 }}</span>
140
                 }}</span>
141
               </p>
141
               </p>
142
-              <p>
142
+              <p class="boeder_B">
143
                 <span class="fl">地点</span>
143
                 <span class="fl">地点</span>
144
                 <span class="fr">{{
144
                 <span class="fr">{{
145
                   model.incident.place ? model.incident.place.place : "--"
145
                   model.incident.place ? model.incident.place.place : "--"
146
                 }}</span>
146
                 }}</span>
147
               </p>
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
           </div>
165
           </div>
149
           <p class="info_hide">
166
           <p class="info_hide">
150
             <span class="fl hide" @click="hides()" v-if="!item_hides"
167
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -273,6 +290,9 @@ export default {
273
       id: "",
290
       id: "",
274
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
291
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
275
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
292
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
293
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
294
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
295
+      hcsjList:[],//绑定的耗材列表,展示
276
       promptingConent: "",
296
       promptingConent: "",
277
       promptingStatus: "",
297
       promptingStatus: "",
278
       item_hides: false,
298
       item_hides: false,
@@ -294,6 +314,18 @@ export default {
294
     PrompTing
314
     PrompTing
295
   },
315
   },
296
   methods: {
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
     getParamsData() {
330
     getParamsData() {
299
       var that = this;
331
       var that = this;
@@ -496,6 +528,9 @@ export default {
496
     this.id = this.$route.params.data.id;
528
     this.id = this.$route.params.data.id;
497
     this.getParamsData();
529
     this.getParamsData();
498
     this.getImgs();
530
     this.getImgs();
531
+    if(this.incidentWithConsumable == 1){
532
+      this.getHcBySj();
533
+    }
499
     this.getHandlerUser();
534
     this.getHandlerUser();
500
     this.getCandidateGroups();
535
     this.getCandidateGroups();
501
   }
536
   }

+ 36 - 1
src/views/closed.vue

@@ -149,12 +149,29 @@
149
                 model.incident.place ? model.incident.place.area.area : "--"
149
                 model.incident.place ? model.incident.place.area.area : "--"
150
               }}</span>
150
               }}</span>
151
             </p>
151
             </p>
152
-            <p>
152
+            <p class="boeder_B">
153
               <span class="fl">地点</span>
153
               <span class="fl">地点</span>
154
               <span class="fr">{{
154
               <span class="fr">{{
155
                 model.incident.place ? model.incident.place.place : "--"
155
                 model.incident.place ? model.incident.place.place : "--"
156
               }}</span>
156
               }}</span>
157
             </p>
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
           </div>
175
           </div>
159
           <p class="info_hide">
176
           <p class="info_hide">
160
             <span class="fl hide" @click="hides()" v-if="!item_hides"
177
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -305,6 +322,9 @@ export default {
305
       id: "",
322
       id: "",
306
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
323
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
307
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
324
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
325
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
326
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
327
+      hcsjList:[],//绑定的耗材列表,展示
308
       selected: 1,
328
       selected: 1,
309
       options: [
329
       options: [
310
         {
330
         {
@@ -332,6 +352,18 @@ export default {
332
     // HandlerLog
352
     // HandlerLog
333
   },
353
   },
334
   methods: {
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
     getParamsData() {
368
     getParamsData() {
337
       var that = this;
369
       var that = this;
@@ -453,6 +485,9 @@ export default {
453
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
485
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
454
     this.getParamsData();
486
     this.getParamsData();
455
     this.getImgs();
487
     this.getImgs();
488
+    if(this.incidentWithConsumable == 1){
489
+      this.getHcBySj();
490
+    }
456
   }
491
   }
457
 };
492
 };
458
 </script>
493
 </script>

+ 36 - 1
src/views/grabSheet.vue

@@ -134,12 +134,29 @@
134
                   model.incident.place ? model.incident.place.area.area : "--"
134
                   model.incident.place ? model.incident.place.area.area : "--"
135
                 }}</span>
135
                 }}</span>
136
               </p>
136
               </p>
137
-              <p>
137
+              <p class="boeder_B">
138
                 <span class="fl">地点</span>
138
                 <span class="fl">地点</span>
139
                 <span class="fr">{{
139
                 <span class="fr">{{
140
                   model.incident.place ? model.incident.place.place : "--"
140
                   model.incident.place ? model.incident.place.place : "--"
141
                 }}</span>
141
                 }}</span>
142
               </p>
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
             </div>
160
             </div>
144
             <p class="info_hide">
161
             <p class="info_hide">
145
               <span class="fl hide" @click="hides()" v-if="!item_hides"
162
               <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -223,6 +240,9 @@ export default {
223
       id: "",
240
       id: "",
224
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
241
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
225
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
242
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
243
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
244
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
245
+      hcsjList:[],//绑定的耗材列表,展示
226
       selected: 1,
246
       selected: 1,
227
       options: [
247
       options: [
228
         {
248
         {
@@ -246,6 +266,18 @@ export default {
246
     };
266
     };
247
   },
267
   },
248
   methods: {
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
     getParamsData() {
282
     getParamsData() {
251
       var that = this;
283
       var that = this;
@@ -406,6 +438,9 @@ export default {
406
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
438
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
407
     this.getParamsData();
439
     this.getParamsData();
408
     this.getImgs();
440
     this.getImgs();
441
+    if(this.incidentWithConsumable == 1){
442
+      this.getHcBySj();
443
+    }
409
   }
444
   }
410
 };
445
 };
411
 </script>
446
 </script>

+ 36 - 1
src/views/order.vue

@@ -175,12 +175,29 @@
175
                   model.incident.place ? model.incident.place.area.area : "--"
175
                   model.incident.place ? model.incident.place.area.area : "--"
176
                 }}</span>
176
                 }}</span>
177
               </p>
177
               </p>
178
-              <p>
178
+              <p class="boeder_B">
179
                 <span class="fl">地点</span>
179
                 <span class="fl">地点</span>
180
                 <span class="fr">{{
180
                 <span class="fr">{{
181
                   model.incident.place ? model.incident.place.place : "--"
181
                   model.incident.place ? model.incident.place.place : "--"
182
                 }}</span>
182
                 }}</span>
183
               </p>
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
               <!-- <p v-if="model.incident.synergeticReason">
201
               <!-- <p v-if="model.incident.synergeticReason">
185
                 <span class="fl" >协同原因</span>
202
                 <span class="fl" >协同原因</span>
186
                 <span class="fr">{{model.incident.synergeticReason}}</span>
203
                 <span class="fr">{{model.incident.synergeticReason}}</span>
@@ -296,6 +313,9 @@ export default {
296
     return {
313
     return {
297
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
314
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
298
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
315
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
316
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
317
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
318
+      hcsjList:[],//绑定的耗材列表,展示
299
       selected: 1,
319
       selected: 1,
300
       id: "",
320
       id: "",
301
       options: [
321
       options: [
@@ -326,6 +346,18 @@ export default {
326
     // HandlerLog
346
     // HandlerLog
327
   },
347
   },
328
   methods: {
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
     getParamsData() {
362
     getParamsData() {
331
       var that = this;
363
       var that = this;
@@ -500,6 +532,9 @@ export default {
500
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
532
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
501
     this.getParamsData();
533
     this.getParamsData();
502
     this.getImgs();
534
     this.getImgs();
535
+    if(this.incidentWithConsumable == 1){
536
+      this.getHcBySj();
537
+    }
503
   }
538
   }
504
 };
539
 };
505
 </script>
540
 </script>

+ 36 - 1
src/views/processing.vue

@@ -170,12 +170,29 @@
170
                   : "--"
170
                   : "--"
171
               }}</span>
171
               }}</span>
172
             </p>
172
             </p>
173
-            <p>
173
+            <p class="boeder_B">
174
               <span class="fl">地点</span>
174
               <span class="fl">地点</span>
175
               <span class="fr">{{
175
               <span class="fr">{{
176
                 modelData.incident.place ? modelData.incident.place.place : "--"
176
                 modelData.incident.place ? modelData.incident.place.place : "--"
177
               }}</span>
177
               }}</span>
178
             </p>
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
             <!-- <p v-if="modelData.incident.synergeticReason">
197
             <!-- <p v-if="modelData.incident.synergeticReason">
181
                 <span class="fl" >协同原因</span>
198
                 <span class="fl" >协同原因</span>
@@ -508,6 +525,9 @@ export default {
508
     return {
525
     return {
509
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
526
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
510
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
527
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
528
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
529
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
530
+      hcsjList:[],//绑定的耗材列表,展示
511
       id: "",
531
       id: "",
512
       resignComment: "", //重新指派原因
532
       resignComment: "", //重新指派原因
513
       item_hides: false,
533
       item_hides: false,
@@ -828,6 +848,18 @@ export default {
828
     // HandlerLog
848
     // HandlerLog
829
   },
849
   },
830
   methods: {
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
     getAreaList() {
864
     getAreaList() {
833
       return new Promise((resolve, reject) => {
865
       return new Promise((resolve, reject) => {
@@ -1657,6 +1689,9 @@ export default {
1657
     this.action.target += this.processInstanceId;
1689
     this.action.target += this.processInstanceId;
1658
     this.getParamsData();
1690
     this.getParamsData();
1659
     this.getImgs();
1691
     this.getImgs();
1692
+    if(this.incidentWithConsumable == 1){
1693
+      this.getHcBySj();
1694
+    }
1660
     // 处理方式
1695
     // 处理方式
1661
     this.getHandleCategory();
1696
     this.getHandleCategory();
1662
     // 关闭代码
1697
     // 关闭代码

+ 36 - 1
src/views/solved.vue

@@ -147,12 +147,29 @@
147
                 model.incident.place ? model.incident.place.area.area : "--"
147
                 model.incident.place ? model.incident.place.area.area : "--"
148
               }}</span>
148
               }}</span>
149
             </p>
149
             </p>
150
-            <p>
150
+            <p class="boeder_B">
151
               <span class="fl">地点</span>
151
               <span class="fl">地点</span>
152
               <span class="fr">{{
152
               <span class="fr">{{
153
                 model.incident.place ? model.incident.place.place : "--"
153
                 model.incident.place ? model.incident.place.place : "--"
154
               }}</span>
154
               }}</span>
155
             </p>
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
           </div>
173
           </div>
157
           <p class="info_hide">
174
           <p class="info_hide">
158
             <span class="fl hide" @click="hides()" v-if="!item_hides"
175
             <span class="fl hide" @click="hides()" v-if="!item_hides"
@@ -331,6 +348,9 @@ export default {
331
       id: "",
348
       id: "",
332
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
349
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
333
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
350
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
351
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
352
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
353
+      hcsjList:[],//绑定的耗材列表,展示
334
       selected: 1,
354
       selected: 1,
335
       isclose: "close", //是否已解决
355
       isclose: "close", //是否已解决
336
       iscloseArr: [
356
       iscloseArr: [
@@ -363,6 +383,18 @@ export default {
363
     // HandlerLog
383
     // HandlerLog
364
   },
384
   },
365
   methods: {
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
     getParamsData() {
399
     getParamsData() {
368
       var that = this;
400
       var that = this;
@@ -577,6 +609,9 @@ export default {
577
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
609
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
578
     this.getParamsData();
610
     this.getParamsData();
579
     this.getImgs();
611
     this.getImgs();
612
+    if(this.incidentWithConsumable == 1){
613
+      this.getHcBySj();
614
+    }
580
     this.getHandlerRes();
615
     this.getHandlerRes();
581
     this.getDegree();
616
     this.getDegree();
582
   }
617
   }