Browse Source

抽离事件信息组件,增加预约时间展示

seimin 3 years ago
parent
commit
2e063b291b

+ 294 - 0
src/components/EventInformation/index.vue

@@ -0,0 +1,294 @@
1
+<template>
2
+  <div class="eventInformation">
3
+    <div class="head">
4
+      <p>
5
+        <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
6
+        事件单号:{{ model.incident.incidentsign }}
7
+        <span
8
+          :class="{
9
+            fr: true,
10
+            btn: true,
11
+            daijiedan:
12
+              model.incident.state.value == 'pending' &&
13
+              model.incident.handlerUser &&
14
+              !model.incident.candidateGroups,
15
+            daiqiangdan:
16
+              model.incident.state.value == 'pending' &&
17
+              !model.incident.handlerUser &&
18
+              model.incident.candidateGroups
19
+          }"
20
+          >{{
21
+            model.incident.state.value == "pending"
22
+              ? model.incident.handlerUser && !model.incident.candidateGroups
23
+                ? "待接单"
24
+                : "待抢单"
25
+              : model.incident.state.name
26
+          }}</span
27
+        >
28
+      </p>
29
+    </div>
30
+    <p>
31
+      <span class="fl">事件分类</span>
32
+      <span class="fr">{{ model.incident.category.category }}</span>
33
+    </p>
34
+    <p class="desc">
35
+      <span class="fl">事件描述</span>
36
+      <span class="grayFont fr" v-html="model.incident.description"></span>
37
+    </p>
38
+    <div class="shows" id="shows">
39
+      <p v-if="valConfig == 2">
40
+        <span class="fl">报修科室</span>
41
+        <span class="fr">{{
42
+          model.incident.department ? model.incident.department.dept : ""
43
+        }}</span>
44
+      </p>
45
+      <p v-if="valConfig == 1">
46
+        <span class="fl">报修人</span>
47
+        <span class="fr">{{ model.incident.requester.name }}</span>
48
+      </p>
49
+      <p v-if="valConfig == 2">
50
+        <span class="fl">联系人</span>
51
+        <span class="fr">{{ model.incident.contacts }}</span>
52
+      </p>
53
+      <p>
54
+        <span class="fl">联系电话</span>
55
+        <span class="fr" v-if="!model.incident.contactsInformation"></span>
56
+        <span class="fr" v-if="model.incident.contactsInformation"
57
+          ><a :href="'tel:' + model.incident.contactsInformation"
58
+            ><i class="iconfont icon-shouji"></i
59
+            >{{ model.incident.contactsInformation }}</a
60
+          ></span
61
+        >
62
+      </p>
63
+      <p>
64
+        <span class="fl">联系地址</span>
65
+        <span class="fr">{{ model.incident.houseNumber || "" }}</span>
66
+      </p>
67
+      <p>
68
+        <span class="fl">预约时间</span>
69
+        <span class="fr">{{ model.incident.yyTime || "" }}</span>
70
+      </p>
71
+      <p class="boeder_B">
72
+        <span class="fl">事件来源</span>
73
+        <span class="fr">{{ model.incident.source.name }}</span>
74
+      </p>
75
+      <p>
76
+        <span class="fl">受理人</span>
77
+        <span class="fr">{{
78
+          model.incident.acceptUser ? model.incident.acceptUser.name : ""
79
+        }}</span>
80
+      </p>
81
+      <p>
82
+        <span class="fl">处理人</span>
83
+        <span class="fr">{{
84
+          model.incident.handlerUser ? model.incident.handlerUser.name : ""
85
+        }}</span>
86
+      </p>
87
+      <p>
88
+        <span class="fl">处理人电话</span>
89
+        <span class="fr" v-if="!model.incident.handlerUser"></span>
90
+        <span class="fr" v-if="model.incident.handlerUser"
91
+          ><a :href="'tel:' + model.incident.handlerUser.phone"
92
+            ><i class="iconfont icon-shouji"></i
93
+            >{{ model.incident.handlerUser.phone }}</a
94
+          ></span
95
+        >
96
+      </p>
97
+      <p>
98
+        <span class="fl">优先级</span>
99
+        <span class="fr">{{
100
+          model.incident.priority ? model.incident.priority.name : ""
101
+        }}</span>
102
+      </p>
103
+      <p>
104
+        <span class="fl">逾期响应时间</span>
105
+        <span class="fr">{{ model.incident.overdueResponseDate }}</span>
106
+      </p>
107
+      <p>
108
+        <span class="fl">逾期解决时间</span>
109
+        <span class="fr">{{ model.incident.overdueTime }}</span>
110
+      </p>
111
+      <p>
112
+        <span class="fl">区域</span>
113
+        <span class="fr">{{
114
+          model.incident.place ? model.incident.place.area.area : "--"
115
+        }}</span>
116
+      </p>
117
+      <p class="boeder_B">
118
+        <span class="fl">地点</span>
119
+        <span class="fr">{{
120
+          model.incident.place ? model.incident.place.place : "--"
121
+        }}</span>
122
+      </p>
123
+      <div v-if="hcsjList.length">
124
+        <p>耗材</p>
125
+        <div class="hcTable">
126
+          <table>
127
+            <tr>
128
+              <td>耗材名称</td>
129
+              <td>价格</td>
130
+              <td>数量</td>
131
+            </tr>
132
+            <tr v-for="(item, i) in hcsjList" :key="i">
133
+              <td>{{ item.consumable.name }}</td>
134
+              <td>{{ item.extra1 }}</td>
135
+              <td>{{ item.consumablesSum }}</td>
136
+            </tr>
137
+          </table>
138
+        </div>
139
+      </div>
140
+      <p v-if="wxIncidentWithCmdb == 1">
141
+        <span class="fl">资产</span>
142
+        <span class="fr">{{ model.incident.assetId || "无" }}</span>
143
+      </p>
144
+    </div>
145
+  </div>
146
+</template>
147
+
148
+<script>
149
+export default {
150
+  name: "EventInformation",
151
+  data() {
152
+    return {
153
+      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
154
+      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
155
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
156
+      hcsjList: [] //绑定的耗材列表,展示
157
+    };
158
+  },
159
+  props: ["model", "id"],
160
+  methods: {
161
+    // 获取事件上绑定的耗材
162
+    getHcBySj() {
163
+      this.$http
164
+        .post("service/cmdb/storeList", {
165
+          data: { type: 2, source: "1627", sourceId: this.id }
166
+        })
167
+        .then(result => {
168
+          if (result.data.status == 200) {
169
+            this.hcsjList = result.data.data;
170
+          }
171
+        });
172
+    }
173
+  },
174
+  created() {
175
+    if (this.incidentWithConsumable == 1) {
176
+      this.getHcBySj();
177
+    }
178
+  }
179
+};
180
+</script>
181
+
182
+<style lang="less" scoped>
183
+.eventInformation {
184
+  .boeder_B {
185
+    border-bottom: 0.01rem solid #ccc;
186
+  }
187
+  .shows {
188
+    display: none;
189
+  }
190
+  .head {
191
+    border-bottom: 0.01rem solid #e6e6e6;
192
+    p {
193
+      padding: 0.24rem 0.3rem;
194
+      i {
195
+        color: #00559d;
196
+      }
197
+    }
198
+  }
199
+  p {
200
+    line-height: 0.4rem;
201
+    padding: 0.1rem 0.24rem;
202
+    overflow: hidden;
203
+    .overflowEllipsis2 {
204
+      margin-left: 1.96rem;
205
+    }
206
+  }
207
+  .info_hide {
208
+    padding: 0.2rem 0.24rem;
209
+    border-bottom: 0.01rem solid #e6e6e6;
210
+    .hide {
211
+      color: #00559d;
212
+    }
213
+  }
214
+  .imgs-container {
215
+    a {
216
+      color: #03c !important;
217
+      &:visited {
218
+        color: #551a8b !important;
219
+      }
220
+    }
221
+    img {
222
+      width: 1.5rem;
223
+      height: 1.5rem;
224
+      margin-right: 0.7rem;
225
+      &:nth-child(1) {
226
+        margin-left: 0.75rem;
227
+      }
228
+    }
229
+  }
230
+  .progress {
231
+    padding: 0.2rem 0.2rem;
232
+    overflow: hidden;
233
+    transition-duration: 0.2s;
234
+    transition-timing-function: linear;
235
+    &.progressHide {
236
+      height: 1.7rem;
237
+    }
238
+    .progress_info {
239
+      overflow: hidden;
240
+      margin-bottom: 0.1rem;
241
+      &:nth-last-child(1) {
242
+        .cont {
243
+          border: none !important;
244
+        }
245
+      }
246
+      .progress_info_L {
247
+        float: left;
248
+        color: #333;
249
+        max-width: 18%;
250
+      }
251
+      .progress_info_R {
252
+        float: right;
253
+        margin-left: 0.09rem;
254
+        width: 80%;
255
+        font-size: 0.25rem;
256
+        .time {
257
+          i {
258
+            margin-left: -0.15rem;
259
+            &.icon-icon_weizuo {
260
+              color: #005495;
261
+            }
262
+            &.icon-icon_zhengzaijinx {
263
+              color: #48a843;
264
+              font-size: 0.37rem;
265
+            }
266
+          }
267
+          span {
268
+            margin-left: 0.15rem;
269
+          }
270
+        }
271
+        .cont {
272
+          border-left: 1px solid #999;
273
+          padding-left: 0.4rem;
274
+          min-height: 0.4rem;
275
+          &.blue {
276
+            border-left: 1px solid #005395;
277
+          }
278
+        }
279
+
280
+        .text1 {
281
+          font-size: 0.15rem;
282
+        }
283
+        .text2 {
284
+          color: #666;
285
+          word-break: break-all;
286
+        }
287
+        p {
288
+          padding: 0;
289
+        }
290
+      }
291
+    }
292
+  }
293
+}
294
+</style>

+ 3 - 159
src/views/againAssign.vue

@@ -32,146 +32,7 @@
32 32
         <div class="label headtop" id="info">事件信息</div>
33 33
 
34 34
         <div class="info">
35
-          <div class="head">
36
-            <p>
37
-              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
38
-              事件编号:{{ model.incident.incidentsign }}
39
-              <span class="fr btn chongxinzhipai">{{
40
-                model.incident.state.name
41
-              }}</span>
42
-            </p>
43
-          </div>
44
-          <p>
45
-            <span class="fl">事件分类</span>
46
-            <span class="fr">{{ model.incident.category.category }}</span>
47
-          </p>
48
-          <!-- <p>
49
-            <span class="fl">事件主题</span>
50
-            <span class="fr">{{model.incident.title}}</span>
51
-          </p> -->
52
-          <p class="desc">
53
-            <span class="fl">事件描述</span>
54
-            <span
55
-              class="fr grayFont"
56
-              v-html="model.incident.description"
57
-            ></span>
58
-          </p>
59
-          <div class="shows" id="shows">
60
-            <p v-if="valConfig == 2">
61
-              <span class="fl">报修科室</span>
62
-              <span class="fr">{{
63
-                model.incident.department ? model.incident.department.dept : ""
64
-              }}</span>
65
-            </p>
66
-            <p v-if="valConfig == 1">
67
-              <span class="fl">报修人</span>
68
-              <span class="fr">{{ model.incident.requester.name }}</span>
69
-            </p>
70
-            <p v-if="valConfig == 2">
71
-              <span class="fl">联系人</span>
72
-              <span class="fr">{{ model.incident.contacts }}</span>
73
-            </p>
74
-            <p>
75
-              <span class="fl">联系电话</span>
76
-              <span
77
-                class="fr"
78
-                v-if="!model.incident.contactsInformation"
79
-              ></span>
80
-              <span class="fr" v-if="model.incident.contactsInformation"
81
-                ><a :href="'tel:' + model.incident.contactsInformation"
82
-                  ><i class="iconfont icon-shouji"></i
83
-                  >{{ model.incident.contactsInformation }}</a
84
-                ></span
85
-              >
86
-            </p>
87
-            <p>
88
-              <span class="fl">联系地址</span>
89
-              <span class="fr">{{ model.incident.houseNumber || "" }}</span>
90
-            </p>
91
-            <p class="boeder_B">
92
-              <span class="fl">事件来源</span>
93
-              <span class="fr">{{ model.incident.source.name }}</span>
94
-            </p>
95
-            <!-- <p>
96
-              <span class="fl">影响度</span>
97
-              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
98
-            </p>
99
-            <p>
100
-              <span class="fl">紧急度</span>
101
-              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
102
-            </p> -->
103
-            <p>
104
-              <span class="fl">受理人</span>
105
-              <span class="fr">{{
106
-                model.incident.acceptUser ? model.incident.acceptUser.name : ""
107
-              }}</span>
108
-            </p>
109
-            <p>
110
-              <span class="fl">处理人</span>
111
-              <span class="fr">{{
112
-                model.incident.handlerUser
113
-                  ? model.incident.handlerUser.name
114
-                  : ""
115
-              }}</span>
116
-            </p>
117
-            <p>
118
-              <span class="fl">处理人电话</span>
119
-              <span class="fr" v-if="!model.incident.handlerUser"></span>
120
-              <span class="fr" v-if="model.incident.handlerUser"
121
-                ><a :href="'tel:' + model.incident.handlerUser.phone"
122
-                  ><i class="iconfont icon-shouji"></i
123
-                  >{{ model.incident.handlerUser.phone }}</a
124
-                ></span
125
-              >
126
-            </p>
127
-            <p>
128
-              <span class="fl">优先级</span>
129
-              <span class="fr">{{
130
-                model.incident.priority ? model.incident.priority.name : ""
131
-              }}</span>
132
-            </p>
133
-            <p>
134
-              <span class="fl">逾期响应时间</span>
135
-              <span class="fr">{{ model.incident.overdueResponseDate }}</span>
136
-            </p>
137
-            <p>
138
-              <span class="fl">逾期解决时间</span>
139
-              <span class="fr">{{ model.incident.overdueTime }}</span>
140
-            </p>
141
-            <p>
142
-              <span class="fl">区域</span>
143
-              <span class="fr">{{
144
-                model.incident.place ? model.incident.place.area.area : "--"
145
-              }}</span>
146
-            </p>
147
-            <p class="boeder_B">
148
-              <span class="fl">地点</span>
149
-              <span class="fr">{{
150
-                model.incident.place ? model.incident.place.place : "--"
151
-              }}</span>
152
-            </p>
153
-            <div v-if="hcsjList.length">
154
-              <p>耗材</p>
155
-              <div class="hcTable">
156
-                <table>
157
-                  <tr>
158
-                    <td>耗材名称</td>
159
-                    <td>价格</td>
160
-                    <td>数量</td>
161
-                  </tr>
162
-                  <tr v-for="(item, i) in hcsjList" :key="i">
163
-                    <td>{{ item.consumable.name }}</td>
164
-                    <td>{{ item.extra1 }}</td>
165
-                    <td>{{ item.consumablesSum }}</td>
166
-                  </tr>
167
-                </table>
168
-              </div>
169
-            </div>
170
-            <p v-if="wxIncidentWithCmdb == 1">
171
-              <span class="fl">资产</span>
172
-              <span class="fr">{{ model.incident.assetId || "无" }}</span>
173
-            </p>
174
-          </div>
35
+          <EventInformation :model="model" :id="id"></EventInformation>
175 36
           <p class="info_hide">
176 37
             <span class="fl hide" @click="hides()" v-if="!item_hides"
177 38
               >展开详情 >></span
@@ -293,15 +154,12 @@
293 154
 <script>
294 155
 import LoadIng from "./../views/loading.vue";
295 156
 import PrompTing from "./../views/prompting.vue";
157
+import EventInformation from './../components/EventInformation/index.vue'
296 158
 export default {
297 159
   data() {
298 160
     return {
299 161
       id: "",
300 162
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
301
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
302
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
303
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
304
-      hcsjList: [], //绑定的耗材列表,展示
305 163
       promptingConent: "",
306 164
       promptingStatus: "",
307 165
       item_hides: false,
@@ -321,20 +179,9 @@ export default {
321 179
   components: {
322 180
     LoadIng,
323 181
     PrompTing,
182
+    EventInformation,
324 183
   },
325 184
   methods: {
326
-    // 获取事件上绑定的耗材
327
-    getHcBySj() {
328
-      this.$http
329
-        .post("service/cmdb/storeList", {
330
-          data: { type: 2, source: "1627", sourceId: this.id },
331
-        })
332
-        .then((result) => {
333
-          if (result.data.status == 200) {
334
-            this.hcsjList = result.data.data;
335
-          }
336
-        });
337
-    },
338 185
     //   获取事件数据
339 186
     getParamsData() {
340 187
       var that = this;
@@ -548,9 +395,6 @@ export default {
548 395
     this.id = this.$route.params.data.id;
549 396
     this.getParamsData();
550 397
     this.getImgs();
551
-    if (this.incidentWithConsumable == 1) {
552
-      this.getHcBySj();
553
-    }
554 398
     this.getHandlerUser();
555 399
     this.getCandidateGroups();
556 400
   },

+ 4 - 160
src/views/closed.vue

@@ -38,148 +38,9 @@
38 38
           </div>
39 39
         </div>
40 40
 
41
+        <div class="label headtop" id="info">事件信息</div>
41 42
         <div class="info">
42
-          <div class="label headtop" id="info">事件信息</div>
43
-          <div class="head">
44
-            <p>
45
-              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
46
-              事件编号:{{ model.incident.incidentsign }}
47
-              <span class="fr btn yiguanbi">{{
48
-                model.incident.state.name
49
-              }}</span>
50
-            </p>
51
-          </div>
52
-          <p>
53
-            <span class="fl">事件分类</span>
54
-            <span class="fr">{{ model.incident.category.category }}</span>
55
-          </p>
56
-          <!-- <p>
57
-            <span class="fl">事件主题</span>
58
-            <span class="fr">{{model.incident.title}}</span>
59
-          </p> -->
60
-          <p class="desc">
61
-            <span class="fl">事件描述</span>
62
-            <span
63
-              class="fr grayFont"
64
-              v-html="model.incident.description"
65
-            ></span>
66
-          </p>
67
-          <div class="shows" id="shows">
68
-            <p v-if="valConfig == 2">
69
-              <span class="fl">报修科室</span>
70
-              <span class="fr">{{
71
-                model.incident.department ? model.incident.department.dept : ""
72
-              }}</span>
73
-            </p>
74
-            <p v-if="valConfig == 1">
75
-              <span class="fl">报修人</span>
76
-              <span class="fr">{{ model.incident.requester.name }}</span>
77
-            </p>
78
-            <p v-if="valConfig == 2">
79
-              <span class="fl">联系人</span>
80
-              <span class="fr">{{ model.incident.contacts }}</span>
81
-            </p>
82
-            <p>
83
-              <span class="fl">联系电话</span>
84
-              <span
85
-                class="fr"
86
-                v-if="!model.incident.contactsInformation"
87
-              ></span>
88
-              <span class="fr" v-if="model.incident.contactsInformation"
89
-                ><a :href="'tel:' + model.incident.contactsInformation"
90
-                  ><i class="iconfont icon-shouji"></i
91
-                  >{{ model.incident.contactsInformation }}</a
92
-                ></span
93
-              >
94
-            </p>
95
-            <p>
96
-              <span class="fl">联系地址</span>
97
-              <span class="fr">{{ model.incident.houseNumber || "" }}</span>
98
-            </p>
99
-            <p class="boeder_B">
100
-              <span class="fl">事件来源</span>
101
-              <span class="fr">{{ model.incident.source.name }}</span>
102
-            </p>
103
-            <!-- <p>
104
-              <span class="fl">影响度</span>
105
-              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
106
-            </p>
107
-            <p>
108
-              <span class="fl">紧急度</span>
109
-              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
110
-            </p> -->
111
-            <p>
112
-              <span class="fl">受理人</span>
113
-              <span class="fr">{{
114
-                model.incident.acceptUser ? model.incident.acceptUser.name : ""
115
-              }}</span>
116
-            </p>
117
-            <p>
118
-              <span class="fl">处理人</span>
119
-              <span class="fr">{{
120
-                model.incident.handlerUser
121
-                  ? model.incident.handlerUser.name
122
-                  : ""
123
-              }}</span>
124
-            </p>
125
-            <p>
126
-              <span class="fl">处理人电话</span>
127
-              <span class="fr" v-if="!model.incident.handlerUser"></span>
128
-              <span class="fr" v-if="model.incident.handlerUser"
129
-                ><a :href="'tel:' + model.incident.handlerUser.phone"
130
-                  ><i class="iconfont icon-shouji"></i
131
-                  >{{ model.incident.handlerUser.phone }}</a
132
-                ></span
133
-              >
134
-            </p>
135
-            <p>
136
-              <span class="fl">优先级</span>
137
-              <span class="fr">{{
138
-                model.incident.priority ? model.incident.priority.name : ""
139
-              }}</span>
140
-            </p>
141
-            <p>
142
-              <span class="fl">逾期响应时间</span>
143
-              <span class="fr">{{ model.incident.overdueResponseDate }}</span>
144
-            </p>
145
-            <p>
146
-              <span class="fl">逾期解决时间</span>
147
-              <span class="fr">{{ model.incident.overdueTime }}</span>
148
-            </p>
149
-            <p>
150
-              <span class="fl">区域</span>
151
-              <span class="fr">{{
152
-                model.incident.place ? model.incident.place.area.area : "--"
153
-              }}</span>
154
-            </p>
155
-            <p class="boeder_B">
156
-              <span class="fl">地点</span>
157
-              <span class="fr">{{
158
-                model.incident.place ? model.incident.place.place : "--"
159
-              }}</span>
160
-            </p>
161
-            <div v-if="hcsjList.length">
162
-              <p>耗材</p>
163
-              <div class="hcTable">
164
-                <table>
165
-                  <tr>
166
-                    <td>耗材名称</td>
167
-                    <td>价格</td>
168
-                    <td>数量</td>
169
-                  </tr>
170
-                  <tr v-for="(item, i) in hcsjList" :key="i">
171
-                    <td>{{ item.consumable.name }}</td>
172
-                    <td>{{ item.extra1 }}</td>
173
-                    <td>{{ item.consumablesSum }}</td>
174
-                  </tr>
175
-                </table>
176
-              </div>
177
-            </div>
178
-            <p v-if="wxIncidentWithCmdb == 1">
179
-              <span class="fl">资产</span>
180
-              <span class="fr">{{ model.incident.assetId || "无" }}</span>
181
-            </p>
182
-          </div>
43
+          <EventInformation :model="model" :id="id"></EventInformation>
183 44
           <p class="info_hide">
184 45
             <span class="fl hide" @click="hides()" v-if="!item_hides"
185 46
               >展开详情 >></span
@@ -322,15 +183,12 @@
322 183
 </template>
323 184
 <script>
324 185
 import LoadIng from "./../views/loading.vue";
186
+import EventInformation from './../components/EventInformation/index.vue'
325 187
 export default {
326 188
   data() {
327 189
     return {
328 190
       id: "",
329 191
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
330
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
331
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
332
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
333
-      hcsjList: [], //绑定的耗材列表,展示
334 192
       selected: 1,
335 193
       options: [
336 194
         {
@@ -355,20 +213,9 @@ export default {
355 213
   },
356 214
   components: {
357 215
     LoadIng,
216
+    EventInformation,
358 217
   },
359 218
   methods: {
360
-    // 获取事件上绑定的耗材
361
-    getHcBySj() {
362
-      this.$http
363
-        .post("service/cmdb/storeList", {
364
-          data: { type: 2, source: "1627", sourceId: this.id },
365
-        })
366
-        .then((result) => {
367
-          if (result.data.status == 200) {
368
-            this.hcsjList = result.data.data;
369
-          }
370
-        });
371
-    },
372 219
     //   获取事件数据
373 220
     getParamsData() {
374 221
       var that = this;
@@ -501,9 +348,6 @@ export default {
501 348
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
502 349
     this.getParamsData();
503 350
     this.getImgs();
504
-    if (this.incidentWithConsumable == 1) {
505
-      this.getHcBySj();
506
-    }
507 351
   },
508 352
 };
509 353
 </script>

+ 3 - 169
src/views/grabSheet.vue

@@ -25,156 +25,7 @@
25 25
           <div class="label headtop" id="info">事件信息</div>
26 26
 
27 27
           <div class="info">
28
-            <div class="head">
29
-              <p>
30
-                <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
31
-                事件编号:{{
32
-                  model.incident ? model.incident.incidentsign : ""
33
-                }}
34
-                <span class="fr btn daiqiangdan">待抢单</span>
35
-              </p>
36
-            </div>
37
-            <p>
38
-              <span class="fl">事件分类</span>
39
-              <span class="fr">{{
40
-                model.incident.category.category || ""
41
-              }}</span>
42
-            </p>
43
-            <!-- <p>
44
-              <span class="fl">事件主题</span>
45
-              <span class="fr">{{model.incident.title||''}}</span>
46
-            </p> -->
47
-            <p class="desc">
48
-              <span class="fl">事件描述</span>
49
-              <span
50
-                class="fr grayFont"
51
-                v-html="model.incident.description"
52
-              ></span>
53
-            </p>
54
-            <div class="shows" id="shows">
55
-              <p v-if="valConfig == 2">
56
-                <span class="fl">报修科室</span>
57
-                <span class="fr">{{
58
-                  model.incident.department
59
-                    ? model.incident.department.dept
60
-                    : ""
61
-                }}</span>
62
-              </p>
63
-              <p v-if="valConfig == 1">
64
-                <span class="fl">报修人</span>
65
-                <span class="fr">{{ model.incident.requester.name }}</span>
66
-              </p>
67
-              <p v-if="valConfig == 2">
68
-                <span class="fl">联系人</span>
69
-                <span class="fr">{{ model.incident.contacts }}</span>
70
-              </p>
71
-              <p>
72
-                <span class="fl">联系电话</span>
73
-                <span
74
-                  class="fr"
75
-                  v-if="!model.incident.contactsInformation"
76
-                ></span>
77
-                <span class="fr" v-if="model.incident.contactsInformation"
78
-                  ><a :href="'tel:' + model.incident.contactsInformation"
79
-                    ><i class="iconfont icon-shouji"></i
80
-                    >{{ model.incident.contactsInformation }}</a
81
-                  ></span
82
-                >
83
-              </p>
84
-              <p>
85
-                <span class="fl">联系地址</span>
86
-                <span class="fr">{{
87
-                  model.incident.houseNumber || "" || ""
88
-                }}</span>
89
-              </p>
90
-              <p class="boeder_B">
91
-                <span class="fl">事件来源</span>
92
-                <span class="fr">{{ model.incident.source.name || "" }}</span>
93
-              </p>
94
-              <!-- <p>
95
-                <span class="fl">影响度</span>
96
-                <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
97
-              </p>
98
-              <p>
99
-                <span class="fl">紧急度</span>
100
-                <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
101
-              </p> -->
102
-              <p>
103
-                <span class="fl">受理人</span>
104
-                <span class="fr">{{
105
-                  model.incident.acceptUser
106
-                    ? model.incident.acceptUser.name
107
-                    : ""
108
-                }}</span>
109
-              </p>
110
-              <p>
111
-                <span class="fl">处理人</span>
112
-                <span class="fr">{{
113
-                  model.incident.handlerUser
114
-                    ? model.incident.handlerUser.name
115
-                    : ""
116
-                }}</span>
117
-              </p>
118
-              <p>
119
-                <span class="fl">处理人电话</span>
120
-                <span class="fr" v-if="!model.incident.handlerUser"></span>
121
-                <span class="fr" v-if="model.incident.handlerUser"
122
-                  ><a :href="'tel:' + model.incident.handlerUser.phone"
123
-                    ><i class="iconfont icon-shouji"></i
124
-                    >{{ model.incident.handlerUser.phone }}</a
125
-                  ></span
126
-                >
127
-              </p>
128
-              <p>
129
-                <span class="fl">优先级</span>
130
-                <span class="fr">{{
131
-                  model.incident.priority ? model.incident.priority.name : ""
132
-                }}</span>
133
-              </p>
134
-              <p>
135
-                <span class="fl">逾期响应时间</span>
136
-                <span class="fr">{{
137
-                  model.incident.overdueResponseDate || ""
138
-                }}</span>
139
-              </p>
140
-              <p>
141
-                <span class="fl">逾期解决时间</span>
142
-                <span class="fr">{{ model.incident.overdueTime || "" }}</span>
143
-              </p>
144
-              <p>
145
-                <span class="fl">区域</span>
146
-                <span class="fr">{{
147
-                  model.incident.place ? model.incident.place.area.area : "--"
148
-                }}</span>
149
-              </p>
150
-              <p class="boeder_B">
151
-                <span class="fl">地点</span>
152
-                <span class="fr">{{
153
-                  model.incident.place ? model.incident.place.place : "--"
154
-                }}</span>
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>
173
-              <p v-if="wxIncidentWithCmdb == 1">
174
-                <span class="fl">资产</span>
175
-                <span class="fr">{{ model.incident.assetId || "无" }}</span>
176
-              </p>
177
-            </div>
28
+            <EventInformation :model="model" :id="id"></EventInformation>
178 29
             <p class="info_hide">
179 30
               <span class="fl hide" @click="hides()" v-if="!item_hides"
180 31
                 >展开详情 >></span
@@ -251,15 +102,12 @@
251 102
 </template>
252 103
 <script>
253 104
 import LoadIng from "./../views/loading.vue";
105
+import EventInformation from './../components/EventInformation/index.vue'
254 106
 export default {
255 107
   data() {
256 108
     return {
257 109
       id: "",
258 110
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
259
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
260
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
261
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
262
-      hcsjList: [], //绑定的耗材列表,展示
263 111
       selected: 1,
264 112
       options: [
265 113
         {
@@ -283,18 +131,6 @@ export default {
283 131
     };
284 132
   },
285 133
   methods: {
286
-    // 获取事件上绑定的耗材
287
-    getHcBySj() {
288
-      this.$http
289
-        .post("service/cmdb/storeList", {
290
-          data: { type: 2, source: "1627", sourceId: this.id },
291
-        })
292
-        .then((result) => {
293
-          if (result.data.status == 200) {
294
-            this.hcsjList = result.data.data;
295
-          }
296
-        });
297
-    },
298 134
     //   获取事件数据
299 135
     getParamsData() {
300 136
       var that = this;
@@ -453,6 +289,7 @@ export default {
453 289
   },
454 290
   components: {
455 291
     LoadIng,
292
+    EventInformation,
456 293
   },
457 294
   created() {
458 295
     // seimin
@@ -465,9 +302,6 @@ export default {
465 302
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
466 303
     this.getParamsData();
467 304
     this.getImgs();
468
-    if (this.incidentWithConsumable == 1) {
469
-      this.getHcBySj();
470
-    }
471 305
   },
472 306
 };
473 307
 </script>

+ 3 - 194
src/views/order.vue

@@ -49,181 +49,7 @@
49 49
           <div class="label headtop" id="info">事件信息</div>
50 50
 
51 51
           <div class="info">
52
-            <div class="head">
53
-              <p>
54
-                <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
55
-                事件单号:{{ model.incident.incidentsign }}
56
-                <span
57
-                  :class="{
58
-                    fr: true,
59
-                    btn: true,
60
-                    daijiedan:
61
-                      model.incident.state.value == 'pending' &&
62
-                      model.incident.handlerUser &&
63
-                      !model.incident.candidateGroups,
64
-                    daiqiangdan:
65
-                      model.incident.state.value == 'pending' &&
66
-                      !model.incident.handlerUser &&
67
-                      model.incident.candidateGroups,
68
-                  }"
69
-                  >{{
70
-                    model.incident.state.value == "pending"
71
-                      ? model.incident.handlerUser &&
72
-                        !model.incident.candidateGroups
73
-                        ? "待接单"
74
-                        : "待抢单"
75
-                      : model.incident.state.name
76
-                  }}</span
77
-                >
78
-              </p>
79
-            </div>
80
-            <p>
81
-              <span class="fl">事件分类</span>
82
-              <span class="fr">{{ model.incident.category.category }}</span>
83
-            </p>
84
-            <!-- <p>
85
-              <span class="fl">事件主题</span>
86
-              <span class="fr">{{model.incident.title}}</span>
87
-            </p> -->
88
-            <p class="desc">
89
-              <span class="fl">事件描述</span>
90
-              <span
91
-                class="grayFont fr"
92
-                v-html="model.incident.description"
93
-              ></span>
94
-            </p>
95
-            <div class="shows" id="shows">
96
-              <p v-if="valConfig == 2">
97
-                <span class="fl">报修科室</span>
98
-                <span class="fr">{{
99
-                  model.incident.department
100
-                    ? model.incident.department.dept
101
-                    : ""
102
-                }}</span>
103
-              </p>
104
-              <p v-if="valConfig == 1">
105
-                <span class="fl">报修人</span>
106
-                <span class="fr">{{ model.incident.requester.name }}</span>
107
-              </p>
108
-              <p v-if="valConfig == 2">
109
-                <span class="fl">联系人</span>
110
-                <span class="fr">{{ model.incident.contacts }}</span>
111
-              </p>
112
-              <p>
113
-                <span class="fl">联系电话</span>
114
-                <span
115
-                  class="fr"
116
-                  v-if="!model.incident.contactsInformation"
117
-                ></span>
118
-                <span class="fr" v-if="model.incident.contactsInformation"
119
-                  ><a :href="'tel:' + model.incident.contactsInformation"
120
-                    ><i class="iconfont icon-shouji"></i
121
-                    >{{ model.incident.contactsInformation }}</a
122
-                  ></span
123
-                >
124
-              </p>
125
-              <p>
126
-                <span class="fl">联系地址</span>
127
-                <span class="fr">{{ model.incident.houseNumber || "" }}</span>
128
-              </p>
129
-              <p class="boeder_B">
130
-                <span class="fl">事件来源</span>
131
-                <span class="fr">{{ model.incident.source.name }}</span>
132
-              </p>
133
-              <!-- <p>
134
-                <span class="fl">影响度</span>
135
-                <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
136
-              </p>
137
-              <p>
138
-                <span class="fl">紧急度</span>
139
-                <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
140
-              </p> -->
141
-              <p>
142
-                <span class="fl">受理人</span>
143
-                <span class="fr">{{
144
-                  model.incident.acceptUser
145
-                    ? model.incident.acceptUser.name
146
-                    : ""
147
-                }}</span>
148
-              </p>
149
-              <p>
150
-                <span class="fl">处理人</span>
151
-                <span class="fr">{{
152
-                  model.incident.handlerUser
153
-                    ? model.incident.handlerUser.name
154
-                    : ""
155
-                }}</span>
156
-              </p>
157
-              <p>
158
-                <span class="fl">处理人电话</span>
159
-                <span class="fr" v-if="!model.incident.handlerUser"></span>
160
-                <span class="fr" v-if="model.incident.handlerUser"
161
-                  ><a :href="'tel:' + model.incident.handlerUser.phone"
162
-                    ><i class="iconfont icon-shouji"></i
163
-                    >{{ model.incident.handlerUser.phone }}</a
164
-                  ></span
165
-                >
166
-              </p>
167
-              <p>
168
-                <span class="fl">优先级</span>
169
-                <span class="fr">{{
170
-                  model.incident.priority ? model.incident.priority.name : ""
171
-                }}</span>
172
-              </p>
173
-              <p>
174
-                <span class="fl">逾期响应时间</span>
175
-                <span class="fr">{{ model.incident.overdueResponseDate }}</span>
176
-              </p>
177
-              <p>
178
-                <span class="fl">逾期解决时间</span>
179
-                <span class="fr">{{ model.incident.overdueTime }}</span>
180
-              </p>
181
-              <p>
182
-                <span class="fl">区域</span>
183
-                <span class="fr">{{
184
-                  model.incident.place ? model.incident.place.area.area : "--"
185
-                }}</span>
186
-              </p>
187
-              <p class="boeder_B">
188
-                <span class="fl">地点</span>
189
-                <span class="fr">{{
190
-                  model.incident.place ? model.incident.place.place : "--"
191
-                }}</span>
192
-              </p>
193
-              <div v-if="hcsjList.length">
194
-                <p>耗材</p>
195
-                <div class="hcTable">
196
-                  <table>
197
-                    <tr>
198
-                      <td>耗材名称</td>
199
-                      <td>价格</td>
200
-                      <td>数量</td>
201
-                    </tr>
202
-                    <tr v-for="(item, i) in hcsjList" :key="i">
203
-                      <td>{{ item.consumable.name }}</td>
204
-                      <td>{{ item.extra1 }}</td>
205
-                      <td>{{ item.consumablesSum }}</td>
206
-                    </tr>
207
-                  </table>
208
-                </div>
209
-              </div>
210
-              <p v-if="wxIncidentWithCmdb == 1">
211
-                <span class="fl">资产</span>
212
-                <span class="fr">{{ model.incident.assetId || "无" }}</span>
213
-              </p>
214
-              <!-- <p v-if="model.incident.synergeticReason">
215
-                <span class="fl" >协同原因</span>
216
-                <span class="fr">{{model.incident.synergeticReason}}</span>
217
-              </p>
218
-              <p v-if="model.isupreason">
219
-                <span class="fl">升级原因</span>
220
-                <span class="fr">{{model.isupreason}}</span>
221
-              </p>
222
-              <p v-if="model.transferReason">
223
-                <span class="fl">转派原因</span>
224
-                <span class="fr" >{{model.transferReason}}</span>
225
-              </p> -->
226
-            </div>
52
+            <EventInformation :model="model" :id="id"></EventInformation>
227 53
             <p class="info_hide">
228 54
               <span class="fl hide" @click="hides()" v-if="!item_hides"
229 55
                 >展开详情 >></span
@@ -326,13 +152,11 @@
326 152
 <script>
327 153
 import LoadIng from "./../views/loading.vue";
328 154
 import PrompTing from "./../views/prompting.vue";
155
+import EventInformation from './../components/EventInformation/index.vue'
329 156
 export default {
330 157
   data() {
331 158
     return {
332 159
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
333
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
334
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
335
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
336 160
       selected: 1,
337 161
       id: "",
338 162
       options: [
@@ -355,26 +179,14 @@ export default {
355 179
       imgs: [], //图片
356 180
       model: {}, //提交数据
357 181
       pro_hides: false, //展开/收起处理进度
358
-      hcsjList: [], //绑定的耗材列表,展示
359 182
     };
360 183
   },
361 184
   components: {
362 185
     LoadIng,
363 186
     PrompTing,
187
+    EventInformation,
364 188
   },
365 189
   methods: {
366
-    // 获取事件上绑定的耗材
367
-    getHcBySj() {
368
-      this.$http
369
-        .post("service/cmdb/storeList", {
370
-          data: { type: 2, source: "1627", sourceId: this.id },
371
-        })
372
-        .then((result) => {
373
-          if (result.data.status == 200) {
374
-            this.hcsjList = result.data.data;
375
-          }
376
-        });
377
-    },
378 190
     //   获取事件数据
379 191
     getParamsData() {
380 192
       var that = this;
@@ -560,9 +372,6 @@ export default {
560 372
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
561 373
     this.getParamsData();
562 374
     this.getImgs();
563
-    if (this.incidentWithConsumable == 1) {
564
-      this.getHcBySj();
565
-    }
566 375
   },
567 376
 };
568 377
 </script>

+ 3 - 185
src/views/processing.vue

@@ -52,169 +52,7 @@
52 52
         <div class="label headtop" id="info">事件信息</div>
53 53
 
54 54
         <div class="info">
55
-          <div class="head">
56
-            <p>
57
-              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
58
-              事件编号:{{ modelData.incident.incidentsign }}
59
-              <span class="fr btn chulizhong">{{
60
-                modelData.incident.state.name
61
-              }}</span>
62
-            </p>
63
-          </div>
64
-          <p>
65
-            <span class="fl">事件分类</span>
66
-            <span class="fr">{{ modelData.incident.category.category }}</span>
67
-          </p>
68
-          <!-- <p>
69
-            <span class="fl">事件主题</span>
70
-            <span class="fr">{{modelData.incident.title}}</span>
71
-          </p> -->
72
-          <p class="desc">
73
-            <span class="fl">事件描述</span>
74
-            <span
75
-              class="grayFont fr"
76
-              v-html="modelData.incident.description"
77
-            ></span>
78
-          </p>
79
-          <div class="shows" id="shows">
80
-            <p v-if="valConfig == 2">
81
-              <span class="fl">报修科室</span>
82
-              <span class="fr">{{
83
-                modelData.incident.department
84
-                  ? modelData.incident.department.dept
85
-                  : ""
86
-              }}</span>
87
-            </p>
88
-            <p v-if="valConfig == 1">
89
-              <span class="fl">报修人</span>
90
-              <span class="fr">{{ modelData.incident.requester.name }}</span>
91
-            </p>
92
-            <p v-if="valConfig == 2">
93
-              <span class="fl">联系人</span>
94
-              <span class="fr">{{ modelData.incident.contacts }}</span>
95
-            </p>
96
-            <p>
97
-              <span class="fl">联系电话</span>
98
-              <span
99
-                class="fr"
100
-                v-if="!modelData.incident.contactsInformation"
101
-              ></span>
102
-              <span class="fr" v-if="modelData.incident.contactsInformation"
103
-                ><a :href="'tel:' + modelData.incident.contactsInformation"
104
-                  ><i class="iconfont icon-shouji"></i
105
-                  >{{ modelData.incident.contactsInformation }}</a
106
-                ></span
107
-              >
108
-            </p>
109
-            <p>
110
-              <span class="fl">联系地址</span>
111
-              <span class="fr">{{ modelData.incident.houseNumber || "" }}</span>
112
-            </p>
113
-            <p class="boeder_B">
114
-              <span class="fl">事件来源</span>
115
-              <span class="fr">{{ modelData.incident.source.name }}</span>
116
-            </p>
117
-            <!-- <p>
118
-              <span class="fl">影响度</span>
119
-              <span class="fr">{{modelData.incident.influence?modelData.incident.influence.name:''}}</span>
120
-            </p>
121
-            <p>
122
-              <span class="fl">紧急度</span>
123
-              <span class="fr">{{modelData.incident.emergency?modelData.incident.emergency.name:''}}</span>
124
-            </p> -->
125
-            <p>
126
-              <span class="fl">受理人</span>
127
-              <span class="fr">{{
128
-                modelData.incident.acceptUser
129
-                  ? modelData.incident.acceptUser.name
130
-                  : ""
131
-              }}</span>
132
-            </p>
133
-            <p>
134
-              <span class="fl">处理人</span>
135
-              <span class="fr">{{
136
-                modelData.incident.handlerUser
137
-                  ? modelData.incident.handlerUser.name
138
-                  : ""
139
-              }}</span>
140
-            </p>
141
-            <p>
142
-              <span class="fl">处理人电话</span>
143
-              <span class="fr" v-if="!modelData.incident.handlerUser"></span>
144
-              <span class="fr" v-if="modelData.incident.handlerUser"
145
-                ><a :href="'tel:' + modelData.incident.handlerUser.phone"
146
-                  ><i class="iconfont icon-shouji"></i
147
-                  >{{ modelData.incident.handlerUser.phone }}</a
148
-                ></span
149
-              >
150
-            </p>
151
-            <p>
152
-              <span class="fl">优先级</span>
153
-              <span class="fr">{{
154
-                modelData.incident.priority
155
-                  ? modelData.incident.priority.name
156
-                  : ""
157
-              }}</span>
158
-            </p>
159
-            <p>
160
-              <span class="fl">逾期响应时间</span>
161
-              <span class="fr">{{
162
-                modelData.incident.overdueResponseDate
163
-              }}</span>
164
-            </p>
165
-            <p>
166
-              <span class="fl">逾期解决时间</span>
167
-              <span class="fr">{{ modelData.incident.overdueTime }}</span>
168
-            </p>
169
-            <p>
170
-              <span class="fl">区域</span>
171
-              <span class="fr">{{
172
-                modelData.incident.place
173
-                  ? modelData.incident.place.area.area
174
-                  : "--"
175
-              }}</span>
176
-            </p>
177
-            <p class="boeder_B">
178
-              <span class="fl">地点</span>
179
-              <span class="fr">{{
180
-                modelData.incident.place ? modelData.incident.place.place : "--"
181
-              }}</span>
182
-            </p>
183
-            <div v-if="hcsjList.length">
184
-              <p>耗材</p>
185
-              <div class="hcTable">
186
-                <table>
187
-                  <tr>
188
-                    <td>耗材名称</td>
189
-                    <td>价格</td>
190
-                    <td>数量</td>
191
-                  </tr>
192
-                  <tr v-for="(item, i) in hcsjList" :key="i">
193
-                    <td>{{ item.consumable.name }}</td>
194
-                    <td>{{ item.extra1 }}</td>
195
-                    <td>{{ item.consumablesSum }}</td>
196
-                  </tr>
197
-                </table>
198
-              </div>
199
-            </div>
200
-            <p v-if="wxIncidentWithCmdb == 1">
201
-              <span class="fl">资产</span>
202
-              <span class="fr">{{ modelData.incident.assetId || "无" }}</span>
203
-            </p>
204
-
205
-            <!-- <p v-if="modelData.incident.synergeticReason">
206
-                <span class="fl" >协同原因</span>
207
-                <span class="fr">{{modelData.incident.synergeticReason}}</span>
208
-              </p>
209
-              <p v-if="modelData.isupreason">
210
-                <span class="fl">升级原因</span>
211
-                <span class="fr">{{modelData.isupreason}}</span>
212
-              </p>
213
-              <p v-if="modelData.transferReason">
214
-                <span class="fl">转派原因</span>
215
-                <span class="fr" >{{modelData.transferReason}}</span>
216
-              </p> -->
217
-          </div>
55
+          <EventInformation :model="modelData" :id="id"></EventInformation>
218 56
           <p class="info_hide">
219 57
             <span class="fl hide" @click="hides()" v-if="!item_hides"
220 58
               >展开详情 >></span
@@ -475,6 +313,7 @@ import DatePicker from "./../components/date-picker.vue";
475 313
 import CubeExtendPopup from "./../components/extend-popup.vue";
476 314
 import LoadIng from "./../views/loading.vue";
477 315
 import PrompTing from "./../views/prompting.vue";
316
+import EventInformation from './../components/EventInformation/index.vue'
478 317
 // import HandlerLog from "./../views/handlerLog.vue";
479 318
 // import host from '../request/host'
480 319
 
@@ -587,8 +426,6 @@ export default {
587 426
     return {
588 427
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
589 428
       incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
590
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
591
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
592 429
       id: "",
593 430
       resignComment: "", //重新指派原因
594 431
       item_hides: false,
@@ -910,7 +747,6 @@ export default {
910 747
       hcList: [], //绑定的耗材列表
911 748
       idMock: 0, //自增id,mock
912 749
       hcs: [], //耗材列表
913
-      hcsjList: [], //绑定的耗材列表,展示
914 750
     };
915 751
   },
916 752
   watch: {
@@ -921,10 +757,6 @@ export default {
921 757
       },
922 758
     },
923 759
   },
924
-  components: {
925
-    LoadIng,
926
-    // HandlerLog
927
-  },
928 760
   methods: {
929 761
     // 获取耗材列表
930 762
     getHcs() {
@@ -1846,18 +1678,6 @@ export default {
1846 1678
     fileSubmitted(files) {
1847 1679
       this.action.data = { fileName: files.name };
1848 1680
     },
1849
-    // 获取事件上绑定的耗材
1850
-    getHcBySj() {
1851
-      this.$http
1852
-        .post("service/cmdb/storeList", {
1853
-          data: { type: 2, source: "1627", sourceId: this.id },
1854
-        })
1855
-        .then((result) => {
1856
-          if (result.data.status == 200) {
1857
-            this.hcsjList = result.data.data;
1858
-          }
1859
-        });
1860
-    },
1861 1681
   },
1862 1682
   created() {
1863 1683
     this.processInstanceId = this.$route.params.data
@@ -1871,9 +1691,6 @@ export default {
1871 1691
     this.action.target += this.processInstanceId;
1872 1692
     this.getParamsData();
1873 1693
     this.getHcs();
1874
-    if (this.incidentWithConsumable == 1) {
1875
-      this.getHcBySj();
1876
-    }
1877 1694
     this.getImgs();
1878 1695
     // 处理方式
1879 1696
     this.getHandleCategory();
@@ -1918,6 +1735,7 @@ export default {
1918 1735
     CubeExtendPopup,
1919 1736
     LoadIng,
1920 1737
     PrompTing,
1738
+    EventInformation,
1921 1739
     // HandlerLog
1922 1740
   },
1923 1741
 };

+ 4 - 160
src/views/solved.vue

@@ -38,148 +38,9 @@
38 38
           </div>
39 39
         </div>
40 40
 
41
+        <div class="label headtop" id="info">事件信息</div>
41 42
         <div class="info">
42
-          <div class="label headtop" id="info">事件信息</div>
43
-          <div class="head">
44
-            <p>
45
-              <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
46
-              事件编号:{{ model.incident.incidentsign }}
47
-              <span class="fr btn yijiejue">{{
48
-                model.incident.state.name
49
-              }}</span>
50
-            </p>
51
-          </div>
52
-          <p>
53
-            <span class="fl">事件分类</span>
54
-            <span class="fr">{{ model.incident.category.category }}</span>
55
-          </p>
56
-          <!-- <p>
57
-            <span class="fl">事件主题</span>
58
-            <span class="fr">{{model.incident.title}}</span>
59
-          </p> -->
60
-          <p class="desc">
61
-            <span class="fl">事件描述</span>
62
-            <span
63
-              class="grayFont fr"
64
-              v-html="model.incident.description"
65
-            ></span>
66
-          </p>
67
-          <div class="shows" id="shows">
68
-            <p v-if="valConfig == 2">
69
-              <span class="fl">报修科室</span>
70
-              <span class="fr">{{
71
-                model.incident.department ? model.incident.department.dept : ""
72
-              }}</span>
73
-            </p>
74
-            <p v-if="valConfig == 1">
75
-              <span class="fl">报修人</span>
76
-              <span class="fr">{{ model.incident.requester.name }}</span>
77
-            </p>
78
-            <p v-if="valConfig == 2">
79
-              <span class="fl">联系人</span>
80
-              <span class="fr">{{ model.incident.contacts }}</span>
81
-            </p>
82
-            <p>
83
-              <span class="fl">联系电话</span>
84
-              <span
85
-                class="fr"
86
-                v-if="!model.incident.contactsInformation"
87
-              ></span>
88
-              <span class="fr" v-if="model.incident.contactsInformation"
89
-                ><a :href="'tel:' + model.incident.contactsInformation"
90
-                  ><i class="iconfont icon-shouji"></i
91
-                  >{{ model.incident.contactsInformation }}</a
92
-                ></span
93
-              >
94
-            </p>
95
-            <p>
96
-              <span class="fl">联系地址</span>
97
-              <span class="fr">{{ model.incident.houseNumber || "" }}</span>
98
-            </p>
99
-            <p class="boeder_B">
100
-              <span class="fl">事件来源</span>
101
-              <span class="fr">{{ model.incident.source.name }}</span>
102
-            </p>
103
-            <!-- <p>
104
-              <span class="fl">影响度</span>
105
-              <span class="fr">{{model.incident.influence?model.incident.influence.name:''}}</span>
106
-            </p>
107
-            <p>
108
-              <span class="fl">紧急度</span>
109
-              <span class="fr">{{model.incident.emergency?model.incident.emergency.name:''}}</span>
110
-            </p> -->
111
-            <p>
112
-              <span class="fl">受理人</span>
113
-              <span class="fr">{{
114
-                model.incident.acceptUser ? model.incident.acceptUser.name : ""
115
-              }}</span>
116
-            </p>
117
-            <p>
118
-              <span class="fl">处理人</span>
119
-              <span class="fr">{{
120
-                model.incident.handlerUser
121
-                  ? model.incident.handlerUser.name
122
-                  : ""
123
-              }}</span>
124
-            </p>
125
-            <p>
126
-              <span class="fl">处理人电话</span>
127
-              <span class="fr" v-if="!model.incident.handlerUser"></span>
128
-              <span class="fr" v-if="model.incident.handlerUser"
129
-                ><a :href="'tel:' + model.incident.handlerUser.phone"
130
-                  ><i class="iconfont icon-shouji"></i
131
-                  >{{ model.incident.handlerUser.phone }}</a
132
-                ></span
133
-              >
134
-            </p>
135
-            <p>
136
-              <span class="fl">优先级</span>
137
-              <span class="fr">{{
138
-                model.incident.priority ? model.incident.priority.name : ""
139
-              }}</span>
140
-            </p>
141
-            <p>
142
-              <span class="fl">逾期响应时间</span>
143
-              <span class="fr">{{ model.incident.overdueResponseDate }}</span>
144
-            </p>
145
-            <p>
146
-              <span class="fl">逾期解决时间</span>
147
-              <span class="fr">{{ model.incident.overdueTime }}</span>
148
-            </p>
149
-            <p>
150
-              <span class="fl">区域</span>
151
-              <span class="fr">{{
152
-                model.incident.place ? model.incident.place.area.area : "--"
153
-              }}</span>
154
-            </p>
155
-            <p class="boeder_B">
156
-              <span class="fl">地点</span>
157
-              <span class="fr">{{
158
-                model.incident.place ? model.incident.place.place : "--"
159
-              }}</span>
160
-            </p>
161
-            <div v-if="hcsjList.length">
162
-              <p>耗材</p>
163
-              <div class="hcTable">
164
-                <table>
165
-                  <tr>
166
-                    <td>耗材名称</td>
167
-                    <td>价格</td>
168
-                    <td>数量</td>
169
-                  </tr>
170
-                  <tr v-for="(item, i) in hcsjList" :key="i">
171
-                    <td>{{ item.consumable.name }}</td>
172
-                    <td>{{ item.extra1 }}</td>
173
-                    <td>{{ item.consumablesSum }}</td>
174
-                  </tr>
175
-                </table>
176
-              </div>
177
-            </div>
178
-            <p v-if="wxIncidentWithCmdb == 1">
179
-              <span class="fl">资产</span>
180
-              <span class="fr">{{ model.incident.assetId || "无" }}</span>
181
-            </p>
182
-          </div>
43
+          <EventInformation :model="model" :id="id"></EventInformation>
183 44
           <p class="info_hide">
184 45
             <span class="fl hide" @click="hides()" v-if="!item_hides"
185 46
               >展开详情 >></span
@@ -349,16 +210,13 @@
349 210
 </template>
350 211
 <script>
351 212
 import LoadIng from "./../views/loading.vue";
213
+import EventInformation from './../components/EventInformation/index.vue'
352 214
 // import HandlerLog from "./../views/handlerLog.vue";
353 215
 export default {
354 216
   data() {
355 217
     return {
356 218
       id: "",
357 219
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
358
-      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
359
-      incidentWithConsumable: localStorage.getItem("incidentWithConsumable"), //是否绑定耗材
360
-      wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
361
-      hcsjList: [], //绑定的耗材列表,展示
362 220
       selected: 1,
363 221
       isclose: "close", //是否已解决
364 222
       iscloseArr: [
@@ -388,21 +246,10 @@ export default {
388 246
   },
389 247
   components: {
390 248
     LoadIng,
249
+    EventInformation,
391 250
     // HandlerLog
392 251
   },
393 252
   methods: {
394
-    // 获取事件上绑定的耗材
395
-    getHcBySj() {
396
-      this.$http
397
-        .post("service/cmdb/storeList", {
398
-          data: { type: 2, source: "1627", sourceId: this.id },
399
-        })
400
-        .then((result) => {
401
-          if (result.data.status == 200) {
402
-            this.hcsjList = result.data.data;
403
-          }
404
-        });
405
-    },
406 253
     //   获取事件数据
407 254
     getParamsData() {
408 255
       var that = this;
@@ -632,9 +479,6 @@ export default {
632 479
     this.getParamsData();
633 480
 
634 481
     this.getImgs();
635
-    if (this.incidentWithConsumable == 1) {
636
-      this.getHcBySj();
637
-    }
638 482
     this.getHandlerRes();
639 483
     this.getDegree();
640 484
   },