瀏覽代碼

巡检修改

seimin 3 年之前
父節點
當前提交
bc4f493065
共有 4 個文件被更改,包括 250 次插入114 次删除
  1. 147 46
      src/views/Inspection.vue
  2. 92 67
      src/views/InspectionDetail.vue
  3. 8 0
      src/views/Login.vue
  4. 3 1
      src/views/inspectionDoneDetail.vue

+ 147 - 46
src/views/Inspection.vue

@@ -11,7 +11,7 @@
11
               v-model="title"
11
               v-model="title"
12
               placeholder="搜索"
12
               placeholder="搜索"
13
               @input="searchData()"
13
               @input="searchData()"
14
-            >
14
+            />
15
           </div>
15
           </div>
16
           <button class="selectBtn fr" @click="showPicker">筛选</button>
16
           <button class="selectBtn fr" @click="showPicker">筛选</button>
17
         </div>
17
         </div>
@@ -30,31 +30,49 @@
30
               @change="stateChange()"
30
               @change="stateChange()"
31
             ></cube-select>-->
31
             ></cube-select>-->
32
             <div class="conentBox">
32
             <div class="conentBox">
33
-              <div class="conent" v-for="(item,index) in items" @click="toDetail(item)" :key="index">
33
+              <div
34
+                class="conent"
35
+                v-for="(item, index) in items"
36
+                @click="toDetail(item)"
37
+                :key="index"
38
+              >
34
                 <div class="head">
39
                 <div class="head">
35
                   <p>
40
                   <p>
36
                     <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
41
                     <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
37
-                    巡检单号:{{item.sign}}
42
+                    巡检单号:{{ item.sign }}
38
                     <span
43
                     <span
39
-                      :class="{'btn':true, 'zhixingzhong':item.state==0,'yiwancheng':item.state==1}"
40
-                    >{{item.stateName}}</span>
44
+                      :class="{
45
+                        btn: true,
46
+                        zhixingzhong: item.state == 0,
47
+                        yiwancheng: item.state == 1
48
+                      }"
49
+                      >{{ item.stateName }}</span
50
+                    >
41
                   </p>
51
                   </p>
42
                 </div>
52
                 </div>
43
                 <div class="center">
53
                 <div class="center">
44
                   <p>
54
                   <p>
45
                     <span class="fl">巡检主题:</span>
55
                     <span class="fl">巡检主题:</span>
46
-                    <span class="grayFont overflowEllipsis2">{{item.inspection.title}}</span>
56
+                    <span class="grayFont overflowEllipsis2">{{
57
+                      item.inspection.title
58
+                    }}</span>
47
                   </p>
59
                   </p>
48
                 </div>
60
                 </div>
49
                 <div class="bottom">
61
                 <div class="bottom">
50
                   <i
62
                   <i
51
-                    :class="{'iconfont':true ,'icon-yiyuqi':item.overdueType==0 ,'icon-zhengchang':item.overdueType==1,'icon-jijiang':item.overdueType==2,'newPapir':true}"
63
+                    :class="{
64
+                      iconfont: true,
65
+                      'icon-yiyuqi': item.overdueType == 0,
66
+                      'icon-zhengchang': item.overdueType == 1,
67
+                      'icon-jijiang': item.overdueType == 2,
68
+                      newPapir: true
69
+                    }"
52
                   ></i>
70
                   ></i>
53
-                  <span>逾期时间:{{item.overdueTime}}</span>
71
+                  <span>逾期时间:{{ item.overdueTime }}</span>
54
                 </div>
72
                 </div>
55
               </div>
73
               </div>
56
               <div class="wushuju" v-show="wushuju">
74
               <div class="wushuju" v-show="wushuju">
57
-                <img src="./../../static/images/wushuju.svg" alt>
75
+                <img src="./../../static/images/wushuju.svg" alt />
58
                 <p>暂无巡检</p>
76
                 <p>暂无巡检</p>
59
               </div>
77
               </div>
60
             </div>
78
             </div>
@@ -67,9 +85,14 @@
67
                 <div
85
                 <div
68
                   v-show="props.beforePullDown"
86
                   v-show="props.beforePullDown"
69
                   class="before-trigger"
87
                   class="before-trigger"
70
-                  :style="{paddingTop: props.bubbleY + 'px'}"
88
+                  :style="{ paddingTop: props.bubbleY + 'px' }"
71
                 >
89
                 >
72
-                  <span :class="{rotate: props.bubbleY > pullDownRefreshThreshold - 40}">↓</span>
90
+                  <span
91
+                    :class="{
92
+                      rotate: props.bubbleY > pullDownRefreshThreshold - 40
93
+                    }"
94
+                    >↓</span
95
+                  >
73
                 </div>
96
                 </div>
74
                 <div class="after-trigger" v-show="!props.beforePullDown">
97
                 <div class="after-trigger" v-show="!props.beforePullDown">
75
                   <div v-show="props.isPullingDown" class="loading">
98
                   <div v-show="props.isPullingDown" class="loading">
@@ -85,7 +108,7 @@
85
         </div>
108
         </div>
86
       </div>
109
       </div>
87
     </div>
110
     </div>
88
-    <load-ing v-if="!items.length&&!wushuju"></load-ing>
111
+    <load-ing v-if="!items.length && !wushuju"></load-ing>
89
   </div>
112
   </div>
90
 </template>
113
 </template>
91
 <script>
114
 <script>
@@ -101,6 +124,7 @@ export default {
101
     return {
124
     return {
102
       //   items: _foods,
125
       //   items: _foods,
103
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
126
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
127
+      menu: JSON.parse(localStorage.getItem("menu")),
104
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
128
       valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
105
       items: [],
129
       items: [],
106
       pullDownRefresh: true,
130
       pullDownRefresh: true,
@@ -128,12 +152,12 @@ export default {
128
           value: "done"
152
           value: "done"
129
         }
153
         }
130
       ],
154
       ],
131
-      stateValue: "all",
155
+      stateValue: "todo",
132
       sum: 10,
156
       sum: 10,
133
       idx: 0,
157
       idx: 0,
134
       stateClass: "",
158
       stateClass: "",
135
       loadShow: true,
159
       loadShow: true,
136
-      searching:false,
160
+      searching: false
137
     };
161
     };
138
   },
162
   },
139
   components: {
163
   components: {
@@ -176,10 +200,11 @@ export default {
176
     toDetail(item) {
200
     toDetail(item) {
177
       console.log(item);
201
       console.log(item);
178
       // return;2020年4月27日23:44:23
202
       // return;2020年4月27日23:44:23
179
-      var bxr = JSON.parse(localStorage.getItem("login_requester"));//bababa
180
-      item.processUser.name = bxr.name;
181
-      item.processUser.phone = bxr.mphone;
182
-
203
+      var bxr = JSON.parse(localStorage.getItem("login_requester")); //bababa
204
+      if(item.processUser){
205
+        item.processUser.name = bxr.name;
206
+        item.processUser.phone = bxr.mphone;
207
+      }
183
       if (item.state == 1) {
208
       if (item.state == 1) {
184
         this.$router.push({
209
         this.$router.push({
185
           name: "InspectionDoneDetail",
210
           name: "InspectionDoneDetail",
@@ -188,16 +213,77 @@ export default {
188
           }
213
           }
189
         });
214
         });
190
       } else {
215
       } else {
191
-        this.$router.push({
192
-          name: "InspectionDetail",
193
-          params: {
194
-            data: item
216
+        let chuli = false;
217
+        let chuliFlag = false;
218
+        // 判断权限
219
+        for (let i = 0; i < this.menu.length; i++) {
220
+          if (this.menu[i].link == "xunjianliebiao_chuli") {
221
+            chuli = true;
195
           }
222
           }
196
-        });
223
+        }
224
+        //判断状态和对象
225
+        if (item.inspection.dictionary.value == 1) {
226
+          // 按巡检人员
227
+          if (
228
+            item.processUser.id == this.loginUser.id &&
229
+            item.stateName == "执行中"
230
+          ) {
231
+            chuliFlag = true;
232
+          } else {
233
+            chuliFlag = false;
234
+          }
235
+        } else if (item.inspection.dictionary.value == 3) {
236
+          // 按工作组
237
+          var hasGroup = this.loginUser.group.some(v => v.id == item.group.id);
238
+          if (hasGroup && item.stateName == "执行中") {
239
+            chuliFlag = true;
240
+          } else {
241
+            chuliFlag = false;
242
+          }
243
+        } else if (item.inspection.dictionary.value == 4) {
244
+          // 系统默认
245
+          if (item.online) {
246
+            // 线上人
247
+            if (
248
+              item.processUser.id == this.loginUser.id &&
249
+              item.stateName == "执行中"
250
+            ) {
251
+              chuliFlag = true;
252
+            } else {
253
+              chuliFlag = false;
254
+            }
255
+          } else {
256
+            // 线下组
257
+            var hasGroup = this.loginUser.group.some(
258
+              v => v.id == item.group.id
259
+            );
260
+            if (hasGroup && item.stateName == "执行中") {
261
+              chuliFlag = true;
262
+            } else {
263
+              chuliFlag = false;
264
+            }
265
+          }
266
+        }
267
+        if (chuli && chuliFlag) {
268
+          this.$router.push({
269
+            name: "InspectionDetail",
270
+            params: {
271
+              data: item
272
+            }
273
+          });
274
+        } else {
275
+          this.$router.push({
276
+            name: "InspectionDoneDetail",
277
+            params: {
278
+              data: item
279
+            }
280
+          });
281
+        }
197
       }
282
       }
198
       window.localStorage.setItem("insDetailInfo", JSON.stringify(item));
283
       window.localStorage.setItem("insDetailInfo", JSON.stringify(item));
199
     },
284
     },
200
     getParamsState() {
285
     getParamsState() {
286
+      console.log(this.$route.params.state)
201
       if (this.$route.params.state) {
287
       if (this.$route.params.state) {
202
         console.log(this.$route.params.state);
288
         console.log(this.$route.params.state);
203
         this.stateValue = this.$route.params.state;
289
         this.stateValue = this.$route.params.state;
@@ -208,7 +294,7 @@ export default {
208
         this.picker = this.$createPicker({
294
         this.picker = this.$createPicker({
209
           title: "",
295
           title: "",
210
           data: [this.stateData],
296
           data: [this.stateData],
211
-          selectedIndex: this.$route.params.state ? [1] : [0],
297
+          selectedIndex: [1],
212
           onSelect: this.selectHandle,
298
           onSelect: this.selectHandle,
213
           onCancel: this.cancelHandle
299
           onCancel: this.cancelHandle
214
         });
300
         });
@@ -226,29 +312,44 @@ export default {
226
     // 搜索
312
     // 搜索
227
     searchData() {
313
     searchData() {
228
       this.items = [];
314
       this.items = [];
229
-      this.searching=true;
315
+      this.searching = true;
230
       this.getData();
316
       this.getData();
231
     },
317
     },
232
     // 获取列表
318
     // 获取列表
233
     getData() {
319
     getData() {
320
+      console.log(this.stateValue);
234
       var that = this;
321
       var that = this;
235
       // that.items.length=0;
322
       // that.items.length=0;
323
+      let postData = {
324
+        assignee: that.loginUser.id,
325
+        idx: that.idx,
326
+        sum: that.sum,
327
+        inspectionProcessActual: {
328
+          // inspection: {
329
+          //   title: that.title,
330
+          //   executeUser: { id: that.loginUser.id }
331
+          // }
332
+          typeSearch: that.title
333
+          // processUser:{
334
+          //   id:that.loginUser.id
335
+          // }
336
+        },
337
+        searchType: that.stateValue
338
+      };
339
+      if (that.stateValue === "todo") {
340
+        // 待处理添加筛选条件
341
+        console.log(postData, "2022年5月30日");
342
+        postData.candidateGroups = that.loginUser.group
343
+          .map(v => v.id)
344
+          .toString();
345
+      } else {
346
+        delete postData.candidateGroups;
347
+      }
236
       this.$http
348
       this.$http
237
-        .post("service/bpm/InspectionProcessActual/fetchServiceTasks/ALL", {
238
-          assignee: that.loginUser.id,
239
-          idx: that.idx,
240
-          sum: that.sum,
241
-          inspectionProcessActual: {
242
-            // inspection: {
243
-            //   title: that.title,
244
-            //   executeUser: { id: that.loginUser.id }
245
-            // }
246
-            processUser:{
247
-              id:that.loginUser.id
248
-            }
249
-          },
250
-          searchType: that.stateValue
251
-        })
349
+        .post(
350
+          "service/bpm/InspectionProcessActual/fetchServiceTasks/ALL",
351
+          postData
352
+        )
252
         .then(function(res) {
353
         .then(function(res) {
253
           if (res.data.data.length > 0) {
354
           if (res.data.data.length > 0) {
254
             that.wushuju = false;
355
             that.wushuju = false;
@@ -260,9 +361,9 @@ export default {
260
                 );
361
                 );
261
               }
362
               }
262
             }
363
             }
263
-            if(that.searching){
264
-              that.items =res.data.data;
265
-            }else{
364
+            if (that.searching) {
365
+              that.items = res.data.data;
366
+            } else {
266
               that.items = that.items.concat(res.data.data);
367
               that.items = that.items.concat(res.data.data);
267
             }
368
             }
268
           } else {
369
           } else {
@@ -276,7 +377,7 @@ export default {
276
       var that = this;
377
       var that = this;
277
       that.items = [];
378
       that.items = [];
278
       that.idx = 0;
379
       that.idx = 0;
279
-      that.searching=false;
380
+      that.searching = false;
280
       setTimeout(() => {
381
       setTimeout(() => {
281
         that.getData();
382
         that.getData();
282
       }, 1000);
383
       }, 1000);
@@ -284,7 +385,7 @@ export default {
284
     onPullingUp() {
385
     onPullingUp() {
285
       var that = this;
386
       var that = this;
286
       that.idx = that.idx + 1;
387
       that.idx = that.idx + 1;
287
-      that.searching=false;
388
+      that.searching = false;
288
       that.getData();
389
       that.getData();
289
     },
390
     },
290
     updatePullDownRefresh(val) {
391
     updatePullDownRefresh(val) {
@@ -432,7 +533,7 @@ export default {
432
   }
533
   }
433
 }
534
 }
434
 </style>
535
 </style>
435
-<style lang='less' scoped>
536
+<style lang="less" scoped>
436
 .bgColor {
537
 .bgColor {
437
   background-color: white;
538
   background-color: white;
438
 }
539
 }

+ 92 - 67
src/views/InspectionDetail.vue

@@ -1,64 +1,66 @@
1
 <template>
1
 <template>
2
   <div class="inspedtionDetail">
2
   <div class="inspedtionDetail">
3
-    <div class="label">巡检信息</div>
4
-    <div class="head">
5
-      <p>
6
-        <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
7
-        巡检单号
8
-        <span class="num">{{ baseInfo.sign }}</span>
9
-        <span class="btn zhixingzhong">{{ baseInfo.stateName }}</span>
10
-      </p>
11
-    </div>
12
-    <div class="info">
13
-      <p>
14
-        <span class="fl">巡检类型</span>
15
-        <span class="fr">{{ baseInfo.inspectionType.type }}</span>
16
-      </p>
17
-      <p>
18
-        <span class="fl">计划主题</span>
19
-        <span class="fr">{{ baseInfo.inspection.title }}</span>
20
-      </p>
21
-      <p>
22
-        <span class="fl">计划内容</span>
23
-        <span class="fr showwrap">{{ baseInfo.inspection.content }}</span>
24
-      </p>
25
-      <p>
26
-        <span class="fl">巡检状态</span>
27
-        <span class="fr">{{ baseInfo.stateName }}</span>
28
-      </p>
29
-      <p>
30
-        <span class="fl">巡检策略</span>
31
-        <span class="fr">{{ baseInfo.inspection.planStrategy.name }}</span>
32
-      </p>
33
-      <p>
34
-        <span class="fl">执行时长</span>
35
-        <span class="fr">{{ baseInfo.inspection.executionTime }}分钟</span>
36
-      </p>
37
-      <p>
38
-        <span class="fl">开始时间</span>
39
-        <span class="fr">{{
40
-          baseInfo.inspection.planStartTime.slice(
41
-            0,
42
-            baseInfo.inspection.planStartTime.length - 2
43
-          )
44
-        }}</span>
45
-      </p>
46
-      <p>
47
-        <span class="fl">逾期时间</span>
48
-        <span class="fr">{{ baseInfo.overdueTime }}</span>
49
-      </p>
50
-    </div>
51
-    <div class="label">巡检结果</div>
52
-    <div class="form">
53
-      <p v-for="(item, index) in forms" :key="index">
54
-        <span>{{ item.name }}:</span>
55
-        <cube-switch
56
-          v-model="param[item.key]"
57
-          :class="{ abnormal: !param[item.key] }"
58
-          :data-label="item.key"
59
-        ></cube-switch>
60
-      </p>
61
-    </div>
3
+    <template v-if="baseInfo.online !== true">
4
+      <div class="label">巡检信息</div>
5
+      <div class="head">
6
+        <p>
7
+          <i class="iconfont icon-zuixinbaoxiu newPapir"></i>
8
+          巡检单号
9
+          <span class="num">{{ baseInfo.sign }}</span>
10
+          <span class="btn zhixingzhong">{{ baseInfo.stateName }}</span>
11
+        </p>
12
+      </div>
13
+      <div class="info">
14
+        <p>
15
+          <span class="fl">巡检范围</span>
16
+          <span class="fr">{{ baseInfo.inspectionType.type }}</span>
17
+        </p>
18
+        <p>
19
+          <span class="fl">计划主题</span>
20
+          <span class="fr">{{ baseInfo.inspection.title }}</span>
21
+        </p>
22
+        <p>
23
+          <span class="fl">计划内容</span>
24
+          <span class="fr showwrap">{{ baseInfo.inspection.content }}</span>
25
+        </p>
26
+        <p>
27
+          <span class="fl">巡检状态</span>
28
+          <span class="fr">{{ baseInfo.stateName }}</span>
29
+        </p>
30
+        <p>
31
+          <span class="fl">巡检策略</span>
32
+          <span class="fr">{{ baseInfo.inspection.planStrategy.name }}</span>
33
+        </p>
34
+        <p>
35
+          <span class="fl">执行时长</span>
36
+          <span class="fr">{{ baseInfo.inspection.executionTime }}分钟</span>
37
+        </p>
38
+        <p>
39
+          <span class="fl">开始时间</span>
40
+          <span class="fr">{{
41
+            baseInfo.inspection.planStartTime.slice(
42
+              0,
43
+              baseInfo.inspection.planStartTime.length - 2
44
+            )
45
+          }}</span>
46
+        </p>
47
+        <p>
48
+          <span class="fl">逾期时间</span>
49
+          <span class="fr">{{ baseInfo.overdueTime }}</span>
50
+        </p>
51
+      </div>
52
+      <div class="label">巡检结果</div>
53
+      <div class="form">
54
+        <p v-for="(item, index) in forms" :key="index">
55
+          <span>{{ item.name }}:</span>
56
+          <cube-switch
57
+            v-model="param[item.key]"
58
+            class="abnormal"
59
+            :data-label="item.name"
60
+          ></cube-switch>
61
+        </p>
62
+      </div>
63
+    </template>
62
     <div class="label formLabel">
64
     <div class="label formLabel">
63
       {{ xj_beizhu.name }}
65
       {{ xj_beizhu.name }}
64
     </div>
66
     </div>
@@ -98,7 +100,7 @@ import { GL } from "./../http/http";
98
 export default {
100
 export default {
99
   data() {
101
   data() {
100
     return {
102
     return {
101
-      toast:null,
103
+      toast: null,
102
       action: {
104
       action: {
103
         target:
105
         target:
104
           this.$host + "/service/common/common/uploadAttachment/inspection/",
106
           this.$host + "/service/common/common/uploadAttachment/inspection/",
@@ -134,32 +136,34 @@ export default {
134
   methods: {
136
   methods: {
135
     //获取位置,经纬度
137
     //获取位置,经纬度
136
     getLocation() {
138
     getLocation() {
139
+      // this.submit("香港");
140
+      // return;
137
       // 判断是否处于微信浏览器环境
141
       // 判断是否处于微信浏览器环境
138
       if (!/MicroMessenger/i.test(window.navigator.userAgent)) {
142
       if (!/MicroMessenger/i.test(window.navigator.userAgent)) {
139
         this.$createToast({
143
         this.$createToast({
140
           txt: "请前往微信中操作",
144
           txt: "请前往微信中操作",
141
           type: "warn",
145
           type: "warn",
142
-          mask: true,
146
+          mask: true
143
         }).show();
147
         }).show();
144
         return;
148
         return;
145
       }
149
       }
146
       this.toast = this.$createToast({
150
       this.toast = this.$createToast({
147
         time: 0,
151
         time: 0,
148
         mask: true,
152
         mask: true,
149
-        txt: "正在加载中",
153
+        txt: "正在加载中"
150
       });
154
       });
151
       this.toast.show();
155
       this.toast.show();
152
       // 中南财大
156
       // 中南财大
153
       if (this.isZncd) {
157
       if (this.isZncd) {
154
         //第二个参数 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
158
         //第二个参数 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
155
-        sdk.getLocation((res) => {
159
+        sdk.getLocation(res => {
156
           // alert(JSON.stringify(res));
160
           // alert(JSON.stringify(res));
157
           // latitude
161
           // latitude
158
           // longitude
162
           // longitude
159
           this.gl(res);
163
           this.gl(res);
160
         });
164
         });
161
       } else {
165
       } else {
162
-        GL(this).then((res) => {
166
+        GL(this).then(res => {
163
           this.gl(res);
167
           this.gl(res);
164
         });
168
         });
165
       }
169
       }
@@ -172,7 +176,7 @@ export default {
172
         data: {
176
         data: {
173
           location: res.latitude + "," + res.longitude,
177
           location: res.latitude + "," + res.longitude,
174
           key: "TADBZ-IRBWU-QAXVE-2IWED-UW2F5-YVF66",
178
           key: "TADBZ-IRBWU-QAXVE-2IWED-UW2F5-YVF66",
175
-          output: "jsonp",
179
+          output: "jsonp"
176
         },
180
         },
177
         dataType: "jsonp",
181
         dataType: "jsonp",
178
         success(result) {
182
         success(result) {
@@ -180,7 +184,7 @@ export default {
180
             let address = result.result.formatted_addresses.recommend;
184
             let address = result.result.formatted_addresses.recommend;
181
             _this.submit(address);
185
             _this.submit(address);
182
           }
186
           }
183
-        },
187
+        }
184
       });
188
       });
185
     },
189
     },
186
     fileSubmitted(files) {
190
     fileSubmitted(files) {
@@ -209,7 +213,7 @@ export default {
209
       that.toast = that.$createToast({
213
       that.toast = that.$createToast({
210
         time: 0,
214
         time: 0,
211
         mask: true,
215
         mask: true,
212
-        txt: "正在加载中",
216
+        txt: "正在加载中"
213
       });
217
       });
214
       that.toast.show();
218
       that.toast.show();
215
       that.$http
219
       that.$http
@@ -260,6 +264,27 @@ export default {
260
       this.param.inspectionProcessActual = this.baseInfo;
264
       this.param.inspectionProcessActual = this.baseInfo;
261
       this.param.address = address;
265
       this.param.address = address;
262
       console.log(this.param);
266
       console.log(this.param);
267
+      if (
268
+        this.param.inspectionProcessActual.group &&
269
+        this.param.inspectionProcessActual.group.id
270
+      ) {
271
+        //处理组
272
+        this.$http
273
+          .post("/service/bpm/InspectionProcessActual/batchAssign", {
274
+            ids: this.param.inspectionProcessActual.id.toString(),
275
+            userId: this.loginUser.id
276
+          })
277
+          .then(res => {
278
+            if (res.data.status == 200) {
279
+              this.completeIt();
280
+            }
281
+          });
282
+      } else {
283
+        this.completeIt();
284
+      }
285
+    },
286
+    // 完成-公共
287
+    completeIt() {
263
       var that = this;
288
       var that = this;
264
       that.$http
289
       that.$http
265
         .post(
290
         .post(

+ 8 - 0
src/views/Login.vue

@@ -138,6 +138,10 @@ export default {
138
               "loginUser",
138
               "loginUser",
139
               JSON.stringify(res.data.data.user)
139
               JSON.stringify(res.data.data.user)
140
             );
140
             );
141
+            localStorage.setItem(
142
+              "menu",
143
+              JSON.stringify(res.data.data.menu)
144
+            );
141
             localStorage.setItem(
145
             localStorage.setItem(
142
               "login_requester",
146
               "login_requester",
143
               JSON.stringify(res.data.data.requester)
147
               JSON.stringify(res.data.data.requester)
@@ -213,6 +217,10 @@ export default {
213
         that.loading = false;
217
         that.loading = false;
214
         if (res.data && res.data.state == 200) {
218
         if (res.data && res.data.state == 200) {
215
           localStorage.setItem("loginUser", JSON.stringify(res.data.data.user));
219
           localStorage.setItem("loginUser", JSON.stringify(res.data.data.user));
220
+          localStorage.setItem(
221
+            "menu",
222
+            JSON.stringify(res.data.data.menu)
223
+          );
216
           localStorage.setItem(
224
           localStorage.setItem(
217
             "login_requester",
225
             "login_requester",
218
             JSON.stringify(res.data.data.requester)
226
             JSON.stringify(res.data.data.requester)

+ 3 - 1
src/views/inspectionDoneDetail.vue

@@ -1,5 +1,6 @@
1
 <template>
1
 <template>
2
   <div class="inspedtionDetail">
2
   <div class="inspedtionDetail">
3
+    <template v-if="baseInfo.online !== true">
3
     <div class="label">巡检信息</div>
4
     <div class="label">巡检信息</div>
4
     <div class="head">
5
     <div class="head">
5
       <p>
6
       <p>
@@ -11,7 +12,7 @@
11
     </div>
12
     </div>
12
     <div class="info">
13
     <div class="info">
13
       <p>
14
       <p>
14
-        <span class="fl">巡检类型</span>
15
+        <span class="fl">巡检范围</span>
15
         <span class="fr">{{ baseInfo.inspectionType.type }}</span>
16
         <span class="fr">{{ baseInfo.inspectionType.type }}</span>
16
       </p>
17
       </p>
17
       <p>
18
       <p>
@@ -60,6 +61,7 @@
60
         }}</span>
61
         }}</span>
61
       </p>
62
       </p>
62
     </div>
63
     </div>
64
+    </template>
63
     <div class="label">{{ xj_beizhu.name }}</div>
65
     <div class="label">{{ xj_beizhu.name }}</div>
64
     <div class="textarea_div">
66
     <div class="textarea_div">
65
       <cube-textarea
67
       <cube-textarea