safecheck-client 3.0.33-36 → 3.0.33-38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <style scoped>
1
+ <style scoped id="printStyle">
2
2
  .img {
3
3
  border: 1px solid #9773ed;
4
4
  width: auto;
@@ -57,74 +57,14 @@ div {
57
57
  <div @click="back()">
58
58
  <img src="../../../assets/back.png" style="margin: 0px"/>
59
59
  </div>
60
- <div style="margin-top:20px">
61
- <button class="button_search" @click="updateSpotCheck('合格')">合格</button>
62
- </div>
63
- <div style="margin-top:20px">
64
- <button class="button_search" @click="NoSpotCheck">不合格</button>
65
- </div>
66
60
  </div>
67
61
  <work-busy :is-busy="loading"></work-busy>
68
62
  <div class="container-fluid" style="overflow: scroll">
69
63
  <div class="row">
70
64
  <div class="col-md-5" style="margin-right: 2%;margin-left: 2%;height: 100%;overflow: scroll">
71
65
  <div style="width: 100%;margin: auto">
72
- <table class="table table-striped table-bordered" style="margin-bottom: 6px">
73
- <thead>
74
- <tr>
75
- <th colspan="6" style="text-align: center">用户基本信息</th>
76
- </tr>
77
- </thead>
78
- <tbody>
79
- <tr>
80
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户编号:</td>
81
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_userinfo_code }}</td>
82
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户名称:</td>
83
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_user_name }}</td>
84
- </tr>
85
- <tr>
86
- <td style="text-align: center;border: #E9E9E9 solid 1px">证件号码:</td>
87
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_idnumber }}</td>
88
- <td style="text-align: center;border: #E9E9E9 solid 1px">用户类型:</td>
89
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_check_type }}</td>
90
- </tr>
91
- <tr>
92
- <td style="text-align: center;border: #E9E9E9 solid 1px">用户电话:</td>
93
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_user_phone }}</td>
94
- <td style="text-align: center;border: #E9E9E9 solid 1px">区 / 县:</td>
95
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_area }}</td>
96
- </tr>
97
- <tr>
98
- <td style="text-align: center;border: #E9E9E9 solid 1px">街 道:</td>
99
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_street }}</td>
100
- <td style="text-align: center;border: #E9E9E9 solid 1px">楼 号:</td>
101
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_building }}</td>
102
- </tr>
103
- <tr>
104
- <td style="text-align: center;border: #E9E9E9 solid 1px">单 元:</td>
105
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_unit }}</td>
106
- <td style="text-align: center;border: #E9E9E9 solid 1px">楼 层:</td>
107
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_floor }}</td>
108
- </tr>
109
- <tr>
110
- <td style="text-align: center;border: #E9E9E9 solid 1px">门 牌 号 :</td>
111
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_room }}</td>
112
- <td style="text-align: center;border: #E9E9E9 solid 1px">用户性质:</td>
113
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_userproperties }}</td>
114
- </tr>
115
- <tr>
116
- <td style="text-align: center;border: #E9E9E9 solid 1px">备注信息:</td>
117
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_comments }}</td>
118
- <td style="text-align: center;border: #E9E9E9 solid 1px">小区名称:</td>
119
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_residential_area }}</td>
120
- </tr>
121
- <tr>
122
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px">详细住址:</td>
123
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_address }}</td>
124
- </tr>
125
- </tbody>
126
- </table>
127
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
66
+ <table class="table table-striped table-bordered" style="margin-top: 40px"
67
+ v-show="paperdata.f_entry_status=='入户'">
128
68
  <thead>
129
69
  <tr>
130
70
  <th colspan="4" style="text-align: center">用户安检概况</th>
@@ -143,109 +83,100 @@ div {
143
83
  <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">燃气使用:</td>
144
84
  <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_usegas }}</td>
145
85
  </tr>
146
- <tr>
147
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">用户满意度:</td>
148
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">{{
149
- paperdata.f_client_evaluation
150
- }}
151
- </td>
152
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">安检结果:</td>
153
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">{{ ajresult }}</td>
154
- </tr>
155
86
  <tr>
156
87
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">备注:</td>
157
88
  <td colspan="3"
158
89
  style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
159
- {{ paperdata.f_remarks }}
90
+ {{ paperdata.f_repair_approved_note }}
160
91
  </td>
161
92
  </tr>
93
+ </tbody>
94
+ </table>
95
+ <table class="table table-striped table-bordered" style="margin-top: 35px"
96
+ v-show="paperdata.f_entry_status=='入户'">
97
+ <thead>
162
98
  <tr>
163
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">隐患详情:</td>
164
- <td colspan="3"
165
- style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
166
- <span v-for="deviceCollect in deviceCollects">
167
- <span class="li-font">
168
- {{ deviceCollect.name }}:{{ deviceCollect.value }}&nbsp;&nbsp;&nbsp;
169
- </span>
170
- <br>
171
- <span v-if="deviceCollect.value == '有隐患'">
172
- <lable>
173
- 隐患:
174
- </lable>
175
- <span class="li-font" v-for="val in deviceCollect.devices">
176
- {{ val }}&nbsp;&nbsp;&nbsp;
177
- </span><br>
178
- </span>
99
+ <th style="text-align: center">总体安检照片</th>
100
+ </tr>
101
+ </thead>
102
+ <tbody>
103
+ <tr>
104
+ <td style="margin: auto;text-align: center">
105
+ <div class="container" style="max-width: 550px;background: #FFFFFF">
106
+ <div class="img" v-for="img in paperdata.f_overall_imgs">
107
+ <img-self-plus :list="paperdata.f_overall_imgs " :src="img.f_overall_path" style="float: left"
108
+ width="150"
109
+ height="200"></img-self-plus>
110
+ </div>
111
+ </div>
112
+
179
113
 
180
- </span>
181
114
  </td>
182
- </tr>
183
115
 
116
+ </tr>
184
117
  </tbody>
185
118
  </table>
186
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status!='入户'">
119
+ <table class="table table-striped table-bordered" style="width: 100%"
120
+ v-show="paperdata.f_entry_status=='入户' && (paperdata.f_sign_path || f_user_path) ">
187
121
  <thead>
188
122
  <tr>
189
- <th colspan="4" style="text-align: center">用户安检概况</th>
123
+ <th style="text-align: center">用户签名照片</th>
190
124
  </tr>
191
125
  </thead>
192
126
  <tbody>
193
127
  <tr>
194
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">到达时间:</td>
195
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_onsite_time }}</td>
196
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">离开时间:</td>
197
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_offsite_time }}</td>
198
- </tr>
199
- <tr>
200
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">入户状态:</td>
201
- <td colspan="2" style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">
202
- {{ paperdata.f_entry_status }}
128
+ <td style="margin: auto;text-align: center" v-if="paperdata.f_sign_path">
129
+ <div class="container" style="max-width: 500px;background: #FFFFFF" >
130
+ <div class="img" style="float: none">
131
+ <img-self-plus :src="'rs/image/file/'+paperdata.f_sign_path" width="200" height="200"></img-self-plus>
132
+ </div>
133
+ </div>
203
134
  </td>
204
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">
205
- <button-link style="color: black" type="button" class="btn btn-link" @click="showpicture2()">
206
- {{ dev.lname }}
207
- 查看{{ data.f_entry_status }}照片
208
- </button-link>
135
+ <td style="margin: auto;text-align: center" v-if="f_user_path">
136
+ <div class="container" style="max-width: 550px;background: #FFFFFF" >
137
+ <div class="img" style="float: none">
138
+ <img-self-plus :src="'rs/image/file/'+f_user_path"
139
+ width="200"
140
+ height="200"></img-self-plus>
141
+ </div>
142
+ </div>
209
143
  </td>
210
144
  </tr>
211
-
212
145
  </tbody>
213
146
  </table>
214
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
147
+ <table class="table table-striped table-bordered"
148
+ v-show="paperdata.f_entry_status=='入户' && paperdata.f_defect_notified">
215
149
  <thead>
216
150
  <tr>
217
- <th style="text-align: center">总体安检照片</th>
151
+ <th style="text-align: center">安检通知书/隐患整改通知书</th>
218
152
  </tr>
219
153
  </thead>
220
154
  <tbody>
221
155
  <tr>
222
156
  <td style="margin: auto;text-align: center">
223
- <div class="container" style="max-width: 550px;background: #FFFFFF">
224
- <div class="img" v-for="img in paperdata.f_overall_imgs">
225
- <img-self-safe :src="img.f_overall_path" style="float: left" width="150"
226
- height="200"></img-self-safe>
157
+ <div class="container" style="max-width: 500px;background: #FFFFFF">
158
+ <div class="img" style="float: none">
159
+ <img-self-plus :src="paperdata.f_notified_path" width="486" height="300"></img-self-plus>
227
160
  </div>
228
161
  </div>
229
-
230
-
231
162
  </td>
232
-
233
163
  </tr>
234
164
  </tbody>
235
165
  </table>
236
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
166
+ <table class="table table-striped table-bordered"
167
+ v-show="paperdata.f_entry_status=='入户'&& paperdata.f_video_path">
237
168
  <thead>
238
169
  <tr>
239
- <th style="text-align: center">用户签名照片</th>
170
+ <th style="text-align: center">安检视频</th>
240
171
  </tr>
241
172
  </thead>
242
173
  <tbody>
243
174
  <tr>
244
175
  <td style="margin: auto;text-align: center">
245
176
  <div class="container" style="max-width: 500px;background: #FFFFFF">
246
- <div class="img" style="float: none">
247
- <img-self-safe :src="paperdata.f_sign_path" width="486" height="300"></img-self-safe>
248
- </div>
177
+ <video width="320" height="200" controls v-if="paperdata.f_video_path">
178
+ <source :src="paperdata.f_video_path" type="video/mp4">
179
+ </video>
249
180
  </div>
250
181
  </td>
251
182
  </tr>
@@ -275,49 +206,43 @@ div {
275
206
  <div class style="width: 1%;height: 100%;background-color: #F1F8FF;float: left;"></div>
276
207
  <div class="col-md-6" style="height: 100%;overflow: scroll">
277
208
  <div style="width: 95%;margin-left: 5%">
278
- <table class="table table-striped table-bordered" v-for="config in deviceconfig2">
279
- <thead v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
209
+ <table class="table table-striped table-bordered" v-for="config in deviceconfig2" style="margin-top: 35px">
210
+ <thead >
280
211
  <tr>
281
- <th style="text-align: center">{{ config.checkname }}</th>
212
+ <th style="text-align: center">{{ config.f_device_type }}</th>
282
213
  </tr>
283
214
  </thead>
284
- <tbody v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
285
- <tr v-for="dev in config.items">
286
- <td v-if="dev.type!='text'">
215
+ <tr v-for="dev in config.f_items">
216
+ <td>
287
217
  <div class="row">
288
218
  <div class="col-md-8" style="text-align: center;">
289
219
  <label>
290
- <button-link type="button" class="btn btn-link" @click="showpicture(config.checkname,dev.lname)"
291
- :style="isred(config.checkname,dev.lname)?'color:red':'color:black'">
292
- {{ dev.lname }}
220
+ <button-link type="button" class="btn btn-link"
221
+ :style="'color:black'">
222
+ {{ dev.f_item_name }}
293
223
  </button-link>
294
224
  </label>
295
225
  </div>
296
226
  <div class="col-md-4" style="text-align: center">
297
227
  <label style="font-weight: normal"
298
228
  v-if="dev.type!='picture'">{{
299
- getDeviceValue(config.checkname, dev.lname) ? getDeviceValue(config.checkname, dev.lname) : '无'
229
+ dev.f_item_lists[0].f_item_value
300
230
  }}</label>
301
231
  <label style="font-weight: normal" v-if="dev.type=='picture'">
302
- <div v-show="getDevicePath(config.checkname,dev.lname)">
232
+ <div v-if="dev.f_path">
303
233
  <button-link style="color: black" type="button" class="btn btn-link"
304
- @click="showpath(getDevicePath(config.checkname,dev.lname),dev.lname)">查看照片
234
+ @click="showpath('rs/image/file/'+dev.f_path)">查看照片
305
235
  </button-link>
306
236
  </div>
307
- <div v-show="!getDevicePath(config.checkname,dev.lname)">无照片</div>
237
+ <div v-else>无照片</div>
308
238
  </label>
309
239
  </div>
310
240
  </div>
311
241
  </td>
312
- <td v-if="dev.type==='text'">
313
- <label style="width: 100%;text-align: center">{{ dev.lname }}</label>
314
- </td>
315
242
  </tr>
316
- </tbody>
317
243
  </table>
318
244
  </div>
319
245
  </div>
320
-
321
246
  </div>
322
247
  </div>
323
248
  </div>
@@ -329,13 +254,13 @@ div {
329
254
  <div class="from-group">
330
255
  <div class="row">
331
256
  <div class="col-md-6">
332
- <img-self-safe v-if="showimg1" :src="showimg1" width="240" height="300"></img-self-safe>
257
+ <img-self-plus v-if="showimg1" :src="showimg1" width="240" height="300"></img-self-plus>
333
258
  </div>
334
259
  <div class="col-md-6">
335
- <img-self-safe v-if="showimg2" :src="showimg2" width="240" height="300"></img-self-safe>
260
+ <img-self-plus v-if="showimg2" :src="showimg2" width="240" height="300"></img-self-plus>
336
261
  </div>
337
262
  <div class="col-md-6" v-for="item in otherDarginShowImgs">
338
- <img-self-safe v-if="item.path" :src="item.path" width="240" height="300"></img-self-safe>
263
+ <img-self-plus v-if="item.path" :src="item.path" width="240" height="300"></img-self-plus>
339
264
  </div>
340
265
  </div>
341
266
  </div>
@@ -352,12 +277,34 @@ div {
352
277
  <div class="from-group">
353
278
  <div class="row">
354
279
  <div class="col-md-6">
355
- <img-self-safe v-if="this.paperdata.f_entry_status=='到访不遇'" :src="showimg3" width="300"
356
- height="400"></img-self-safe>
280
+ <img-self-plus v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer_path" :src="showimg3"
281
+ width="282"
282
+ height="400"></img-self-plus>
283
+ </div>
284
+ <div class="col-md-6">
285
+ <img-self-plus v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer1_path"
286
+ :src="showimg5" width="282"
287
+ height="400"></img-self-plus>
288
+ </div>
289
+ <div class="col-md-6">
290
+ <img-self-plus v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer2_path"
291
+ :src="showimg6" width="282"
292
+ height="400"></img-self-plus>
357
293
  </div>
358
294
  <div class="col-md-6">
359
- <img-self-safe v-if="this.paperdata.f_entry_status=='拒检'" :src="showimg4" width="300"
360
- height="400"></img-self-safe>
295
+ <img-self-plus v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck_path"
296
+ :src="showimg4" width="282"
297
+ height="400"></img-self-plus>
298
+ </div>
299
+ <div class="col-md-6">
300
+ <img-self-plus v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck1_path"
301
+ :src="showimg7" width="282"
302
+ height="400"></img-self-plus>
303
+ </div>
304
+ <div class="col-md-6">
305
+ <img-self-plus v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck2_path"
306
+ :src="showimg8" width="282"
307
+ height="400"></img-self-plus>
361
308
  </div>
362
309
  </div>
363
310
  </div>
@@ -366,38 +313,39 @@ div {
366
313
  <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
367
314
  </footer>
368
315
  </modal>
369
- <modal :show.sync="showSpotCheckButton" v-ref:modal backdrop="false">
370
- <header slot="modal-header" class="modal-header">
371
- 安检抽检
372
- </header>
373
- <article slot="modal-body" class="modal-body">
374
- <div class="from-group">
375
- <div class="row">
376
- <lable>抽检不合格原因</lable>
377
- <textarea v-model="spotCheckMessage"></textarea>
316
+ <modal :show.sync="showModel" :width="'50%'" :backdrop="false">
317
+ <div slot="modal-header" class="modal-header">
318
+ <h4 class="modal-title">
319
+ 安检审核备注
320
+ </h4>
321
+ </div>
322
+ <div slot="modal-body" class="modal-body">
323
+ <div class="row">
324
+ <div class="form-group col-sm-4">
325
+ <label class="font_normal_body">审核备注:</label>
326
+ <textarea v-model="message"></textarea>
378
327
  </div>
379
328
  </div>
380
- </article>
381
- <footer slot="modal-footer" class="modal-footer">
382
- <button type="button" class="btn btn-success" @click='SpotCheckSuccess'>确认</button>
383
- <button type="button" class="btn btn-success" @click='SpotCheckCancel'>取消</button>
384
- </footer>
329
+ </div>
330
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
331
+ <button class="button_search" style="margin-right: 15px" @click="auditFailOK()">确定</button>
332
+ <button class="button_search" style="margin-right: 15px" @click="auditFailCancel()">取消</button>
333
+ </div>
385
334
  </modal>
386
335
  </template>
387
336
 
388
337
  <script>
389
- import ObjConfig from '../../../utils/GerJsonObjectConfig'
338
+ import html2pdf from 'html2pdf.js'
390
339
  import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
391
340
  import Radio from 'vue-client/src/vue-strap/src/radioBtn'
392
341
  import Vue from 'vue'
393
342
  import * as Util from '../../Util'
394
- import {jsonSort} from '../../../utils/LdapHelper'
395
343
  import {HttpResetClass} from "vue-client";
396
344
 
397
345
  let asyncReady = async function (self) {
398
346
  // 获取配置信息
399
347
  try {
400
- let res = await new HttpResetClass().load('post', 'rs/sql/tel_singleTable_OrderBy', {
348
+ let res = await new HttpResetClass().load('post', 'rs/sql/safe_singleTable_OrderBy', {
401
349
  data: {
402
350
  items: 'f_dir',
403
351
  tablename: 't_organization',
@@ -407,38 +355,54 @@ let asyncReady = async function (self) {
407
355
  })/*.then(res=>{*/
408
356
  //tag
409
357
  //tag)
358
+ console.log(res)
410
359
  if (!res.data[0].f_dir) {
411
360
  self.$showMessage("该公司无组织目录,无法获取配置文件,请联系管理员确认")
412
361
  } else {
413
362
  //this.f_dir=res.data[0].f_dir
363
+ let url = self.newConfig == '是' ? '/safecheck/rs/safe_vue' : '/safecheck/rs/vue'
414
364
  try {
415
- let res1 = await new HttpResetClass().load('GET', `/safecheck/rs/vue/DevicesConfig.json?folderName=phonevues&orgDir=${res.data[0].f_dir}`, {}, {
416
- resolveMsg: null,
417
- rejectMsg: null
365
+ let res1 = await new HttpResetClass().load('GET', `${url}/DevicesConfig.json?folderName=phonevues&orgDir=${res.data[0].f_dir}`, {}, {
366
+ resolveMsg: '获取居民配置项成功!',
367
+ rejectMsg: '获取居民配置项出错!'
418
368
  })/*.then(res=>{*/
419
369
  //tag
420
370
  //this.safeConfig["民用配置项"]=Object.assign({},res.data)
371
+ if (!Vue.config.safecheck) {
372
+ Vue.config = {safecheck: {}}
373
+ }
421
374
  Vue.config.safecheck.DevicesConfig = res1.data
375
+ console.log(Vue.config.safecheck.DevicesConfig)
422
376
  /*})*/
423
- let res2 = await new HttpResetClass().load('GET', `/safecheck/rs/vue/DevicesSetConfig.json?folderName=phonevues&orgDir=${res.data[0].f_dir}`, {}, {
424
- resolveMsg: null,
425
- rejectMsg: null
377
+ let res2 = await new HttpResetClass().load('GET', `${url}/DevicesSetConfig.json?folderName=phonevues&orgDir=${res.data[0].f_dir}`, {}, {
378
+ resolveMsg: '获取非居民配置项成功!',
379
+ rejectMsg: '获取非居民配置项出错!'
426
380
  })/*.then(res=>{*/
427
381
  //tag
428
382
  //this.safeConfig["非民用配置项"]=Object.assign({},res.data)
429
- Vue.config.safecheck.DevicesSetConfig = res2.data
430
- /*}).then(res=> {
431
- })*/
432
-
383
+ Vue.config.safecheck.DevicesSetConfig = {}
433
384
  } catch (e) {
434
-
385
+ self.$showMessage("获取配置文件失败" + e)
386
+ self.loading = false
435
387
  }
436
388
  }
389
+ if (self.data.f_recheck_id) {
390
+ let res3 = await new HttpResetClass().load('post', 'rs/sql/safe_singleTable_OrderBy', {
391
+ data: {
392
+ items: '*',
393
+ tablename: 't_check_paper',
394
+ condition: `id = '${self.data.f_recheck_id}'`,
395
+ orderitem: 'id'
396
+ }
397
+ })
398
+ self.lastCheckData = res3.data[0]
399
+ }
437
400
  } catch (error) {
438
401
  // 忽略704,文件找不到异常R
439
402
  if (error.status !== 704) {
440
403
  throw error
441
404
  }
405
+ this.loading = false
442
406
  }
443
407
  }
444
408
  export default {
@@ -446,17 +410,23 @@ export default {
446
410
  props: ['f_plan_id', 'item', 'role'],
447
411
  data() {
448
412
  return {
413
+ f_user_path:'',
414
+ message: '',
415
+ showButton: false,
416
+ showModel: false,
449
417
  data: {
450
418
  f_devices: [],
451
419
  f_defect_content: ''
452
420
  },
421
+ showPdfDownload: this.$appdata.getSingleValue('安检结果pdf下载') ? this.$appdata.getSingleValue('安检结果pdf下载') : false,
422
+ lastCheckData: {},
453
423
  paperdata: {},
454
424
  picturename: '隐患照片',
455
425
  defectDevice: {},
456
426
  hasDevice: false,
457
427
  deviceCollect: {},
458
428
  deviceCollects: [],
459
- isshow: false,
429
+ isshow: true,
460
430
  ajresult: '',
461
431
  loading: true,
462
432
  imgshow: false,
@@ -467,6 +437,10 @@ export default {
467
437
  showimg2: '',
468
438
  showimg3: '',
469
439
  showimg4: '',
440
+ showimg5: '',
441
+ showimg6: '',
442
+ showimg7: '',
443
+ showimg8: '',
470
444
  hiddenDangerImgNumber: 0, //配置项中隐患照片数
471
445
  otherDarginShowImgs: [],//其他隐患图片
472
446
  startClick: false, //开始安检按钮是否可点击
@@ -482,6 +456,7 @@ export default {
482
456
  configAJ: [],
483
457
  configRQ: [],
484
458
  deviceconfig: {},
459
+ newConfig: '',
485
460
  deviceconfig2: [],
486
461
  f_devices: [],
487
462
  config: {
@@ -489,29 +464,19 @@ export default {
489
464
  "checkmust": true,
490
465
  "index": 1,
491
466
  "items": {
492
- //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
493
- "气表表号": {"index": 1, "type": "string", "readonly": true},
467
+ "基表编号": {"index": 1, "type": "string", "readonly": true},
494
468
  "气表型号": {"index": 2, "type": "string", "readonly": true},
495
469
  "气表品牌": {"index": 3, "type": "string", "readonly": true},
496
- "气表类型": {"index": 4, "type": "string", "readonly": true},
497
- "进气方向": {
498
- "index": 5,
499
- "type": "selector",
500
- "options": [{"data": "左表", "isdefault": false}, {"data": "右表", "isdefault": false}],
501
- "checkmust": true
502
- },
503
- "初始表底": {"index": 6, "type": "number", "isshow": false, "readonly": true},
504
- "上期表读数": {"index": 7, "type": "number", "readonly": true, isshow: false},
505
- "累购气量": {"index": 8, "type": "number", "readonly": true},
506
- "累购金额": {"index": 8, "type": "number", "readonly": true},
507
- "已用气量": {"index": 9, "type": "number", "checkmust": false},//基表数
508
- "已用金额": {"index": 9, "type": "number", "checkmust": false},
509
- "剩余气量": {"index": 10, "type": "number", "checkmust": false},//累购-已用
470
+ "进气方向": {"index": 4, "type": "string", "readonly": true},
471
+ "初始表底": {"index": 5, "type": "number", "isshow": false, "readonly": true},
472
+ "上期表读数": {"index": 6, "type": "number", "readonly": true, isshow: false},
473
+ "累购气量": {"index": 7, "type": "number", "readonly": true},
474
+ "已用气量": {"index": 8, "type": "number", "checkmust": false},//基表数
475
+ "剩余气量": {"index": 9, "type": "number", "checkmust": false},//累购-已用
510
476
  //显示屏数 --实际剩余气量
511
- "剩余金额": {"index": 10, "type": "number", "checkmust": false},
512
- "气量异常差值": {"index": 11, "type": "number", "readonly": true},
513
- "金额异常差值": {"index": 11, "type": "number", "readonly": true},
514
- "表箱号": {"index": 12, "type": "string", "readonly": true}
477
+ "气量异常差值": {"index": 10, "type": "number", "readonly": true},
478
+ "表箱号": {"index": 11, "type": "string", "readonly": true},
479
+ "燃气表照片": {"index": 12, "type": "picture", "checkmust": false},
515
480
  }
516
481
  // 注意,配置项的index必须与上面的固定配置保持'顺序'
517
482
  }
@@ -522,34 +487,22 @@ export default {
522
487
  "checkmust": true,
523
488
  "index": 1,
524
489
  "items": {
525
- //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
526
- "气表表号": {"index": 1, "type": "string", "readonly": true},
490
+ "基表编号": {"index": 1, "type": "string", "readonly": true},
527
491
  "气表型号": {"index": 2, "type": "string", "readonly": true},
528
492
  "气表品牌": {"index": 3, "type": "string", "readonly": true},
529
- "气表类型": {"index": 4, "type": "string", "readonly": true},
530
- "进气方向": {
531
- "index": 5,
532
- "type": "selector",
533
- "options": [{"data": "左表", "isdefault": false}, {"data": "右表", "isdefault": false}],
534
- "checkmust": true
535
- },
536
- "初始表底": {"index": 6, "type": "number", "isshow": false, "readonly": true},
537
- "上期表读数": {"index": 7, "type": "number", "readonly": true, isshow: false},
538
- "累购气量": {"index": 8, "type": "number", "readonly": true},
539
- "累购金额": {"index": 8, "type": "number", "readonly": true},
540
- "已用气量": {"index": 9, "type": "number", "checkmust": false},//基表数
541
- "已用金额": {"index": 9, "type": "number", "checkmust": false},
542
- "剩余气量": {"index": 10, "type": "number", "checkmust": false},//累购-已用
493
+ "进气方向": {"index": 4, "type": "string", "readonly": true},
494
+ "初始表底": {"index": 5, "type": "number", "isshow": false, "readonly": true},
495
+ "上期表读数": {"index": 6, "type": "number", "readonly": true, isshow: false},
496
+ "累购金额": {"index": 7, "type": "number", "readonly": true},
497
+ "已用金额": {"index": 8, "type": "number", "checkmust": false},
543
498
  //显示屏数 --实际剩余气量
544
- "剩余金额": {"index": 10, "type": "number", "checkmust": false},
545
- "气量异常差值": {"index": 11, "type": "number", "readonly": true},
546
- "金额异常差值": {"index": 11, "type": "number", "readonly": true},
547
- "表箱号": {"index": 12, "type": "string", "readonly": true}
499
+ "剩余金额": {"index": 9, "type": "number", "checkmust": false},
500
+ "金额异常差值": {"index": 10, "type": "number", "readonly": true},
501
+ "表箱号": {"index": 11, "type": "string", "readonly": true},
502
+ "燃气表照片": {"index": 12, "type": "picture", "checkmust": false},
548
503
  }
549
504
  }
550
505
  },
551
- showSpotCheckButton: false,
552
- spotCheckMessage:''
553
506
  }
554
507
  },
555
508
  components: {
@@ -572,7 +525,6 @@ export default {
572
525
  },
573
526
  set(val) {
574
527
  if (this.isStrat) {
575
- //;
576
528
  this.$goto(val, {userinfo: this.data}, 'paper-router')
577
529
  } else {
578
530
  this.$showMessage('未开始安检!')
@@ -586,38 +538,75 @@ export default {
586
538
  }
587
539
  },
588
540
  methods: {
589
- updateSpotCheck(value) {
590
- var reqData = {
591
- paperId:this.item.id,
592
- userName: this.$login.f.name,
593
- spotCheckState: '已抽检',
594
- spotCheckResult: value,
595
- spotCheckMessage:this.spotCheckMessage
541
+ exportToPDF() {
542
+ const element = document.getElementById('toPdf') // 替换为您要导出的页面元素的ID
543
+ html2pdf(element)
544
+ },
545
+
546
+ showAudit() {
547
+ var audit = this.$appdata.getSingleValue('安检审核');
548
+ if (audit == '是' && (this.item.f_approved == '未审核' || !this.item.f_approved)) {
549
+ this.showButton = true
550
+ }
551
+ },
552
+ //安检审核成功
553
+ auditSuccesss() {
554
+ this.loading = true;
555
+ var reqdata = {
556
+ audit_result: '通过',
557
+ operator: "success",
558
+ audit_time: Util.getNowDate(),
559
+ user_name: this.$login.f.name,
560
+ id: this.item.id,
561
+ f_check_item_id: this.item.f_check_item_id
596
562
  }
597
- new HttpResetClass().load('POST', 'rs/logic/updateSpotCheck', reqData).then(res => {
598
- if (res.data = 200) {
599
- this.$showMessage('安检抽检完成')
563
+ new HttpResetClass().load('POST', '/rs/logic/updateAafeAudit', {data: reqdata}, {
564
+ resolveMsg: '安检审核成功!',
565
+ rejectMsg: '安检审核出错!'
566
+ }).then((res) => {
567
+ if (res.data.code == 200) {
568
+ this.loading = false;
569
+ this.$back()
600
570
  }
601
571
  })
602
572
  },
603
- NoSpotCheck() {
604
- this.showSpotCheckButton = true
573
+ auditFail() {
574
+ this.showModel = true;
605
575
  },
606
- SpotCheckSuccess() {
607
- this.updateSpotCheck('不合格')
608
- this.spotCheckMessage = ''
609
- this.showSpotCheckButton = false
576
+ auditFailOK() {
577
+
578
+ this.loading = true;
579
+ var reqdata = {
580
+ message: this.message,
581
+ audit_result: '不通过',
582
+ operator: "fail",
583
+ audit_time: Util.getNowDate(),
584
+ user_name: this.$login.f.name,
585
+ id: this.item.id,
586
+ f_check_item_id: this.item.f_check_item_id
587
+ }
588
+ new HttpResetClass().load('POST', '/rs/logic/updateAafeAudit', {data: reqdata}, {
589
+ resolveMsg: '安检审核成功!',
590
+ rejectMsg: '安检审核出错!'
591
+ }).then((res) => {
592
+ if (res.data.code == 200) {
593
+ this.loading = false;
594
+ this.message = '';
595
+ this.showModel = false;
596
+ this.$back()
597
+ }
598
+ })
610
599
  },
611
- SpotCheckCancel() {
612
- this.spotCheckMessage = ''
613
- this.showSpotCheckButton = false
600
+ auditFailCancel() {
601
+ this.showModel = false;
602
+ this.message = '';
614
603
  },
604
+
615
605
  devicesCollect() {
616
606
  //tag
617
607
  //tag)
618
608
  //tag)
619
609
  //tag
620
-
621
610
  this.deviceCollects = []
622
611
  let checkResult = '正常'
623
612
  this.result = '正常'
@@ -634,11 +623,15 @@ export default {
634
623
  f_device_type = this.data[device][item].f_device_type
635
624
  }
636
625
  // //tag
626
+ let deviceelse = []
637
627
  let deviceInfos = []
638
628
  for (let i in this.data[device][item].f_items) {
639
629
  let defects = ''
630
+
640
631
  let items = this.data[device][item].f_items[i]
641
- if ((items.type === 'selector' || items.type === 'radio' || items.type === 'checkbox') && items.f_item_value != null && items.f_item_value instanceof Array) {
632
+
633
+
634
+ if ((items.type === 'selector' || items.type === 'radio' || items.type === 'checkbox' || items.type === 'picture') && items.f_item_value != null && items.f_item_value instanceof Array) {
642
635
  for (let i in items.f_item_value) {
643
636
  let f_item_value = items.f_item_value[i]
644
637
 
@@ -646,10 +639,19 @@ export default {
646
639
  //tag)
647
640
  //tag)
648
641
  //tag)
649
- if (!this.config[this.data[device][item].f_device_type].items[items.f_item_name]) {
642
+
643
+ if (!this.config[this.data[device][item].f_device_type].items[items.f_item_name] && (items.isdefect && (items.isdefect == 'true' || items.isdefect == true))) {
644
+ continue
645
+ }
646
+ /*if(items.f_is_defect != true && items.f_is_defect != 'true'){
650
647
  continue
648
+ }*/
649
+ if (items.f_is_defect == 'true' || items.f_is_defect == true) {
650
+ checkResult = '有隐患'
651
+ this.result = '有隐患'
652
+ defects = `${defects}:${items.f_item_value}/`
651
653
  }
652
- let options = this.config[this.data[device][item].f_device_type].items[items.f_item_name].options
654
+ /*let options = this.config[this.data[device][item].f_device_type].items[items.f_item_name].options
653
655
  for (let option in options) {
654
656
  if (options[option].data == f_item_value) {
655
657
  if (options[option].isdefect == 'true' || options[option].isdefect == true) {
@@ -659,16 +661,18 @@ export default {
659
661
  // let level = options[option].level
660
662
  }
661
663
  }
662
- }
664
+ }*/
663
665
  //tag)
664
666
  }
665
667
  if (defects != '') {
666
- deviceInfos.push(`${items.f_item_name}${defects.substring(0, defects.length - 1)}`)
668
+ console.log('有隐患items', items)
669
+ deviceInfos.push(`${items.f_item_name}${defects.substring(0, defects.length - 1)}${items.f_else ? items.f_else : ''}`)
667
670
  }
668
- } else if (items.type === 'string' && items.f_is_defect && items.f_item_value[0]) {
671
+ } else if ((items.type === 'string' || items.type === 'number') && items.f_is_defect && items.f_item_value[0]) {
669
672
  checkResult = '有隐患'
670
673
  this.result = '有隐患'
671
674
  deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
675
+
672
676
  } else if (items.f_item_name == '金额异常差值') {
673
677
  var deviation = this.$appdata.getSingleValue('金额异常差值允许误差')
674
678
  //tag
@@ -690,6 +694,17 @@ export default {
690
694
  }
691
695
  }
692
696
  }
697
+ if (!this.config[this.data[device][item].f_device_type].items[items.f_item_name]) {
698
+ // console.log('this.config[this.data[device][item].f_device_type]', this.config[this.data[device][item].f_device_type])
699
+ // console.log('this.deviceconfig2', this.deviceconfig2)
700
+ for (let dev in this.deviceconfig2) {
701
+ if (this.deviceconfig2[dev].checkname == this.data[device][item].f_device_type) {
702
+ this.deviceconfig2[dev].items.push({
703
+ lname: items.f_item_name
704
+ })
705
+ }
706
+ }
707
+ }
693
708
  //tag)
694
709
  //tag
695
710
  //tag
@@ -705,6 +720,9 @@ export default {
705
720
  this.$set('deviceCollect.name', f_device_type)
706
721
  this.$set('deviceCollect.value', checkResult)
707
722
  this.$set('deviceCollect.devices', deviceInfos)
723
+ this.$set('deviceCollect.else', deviceelse)
724
+ console.log('deviceCollect.devices', this.deviceCollect.devices)
725
+ console.log('deviceCollect.else', this.deviceCollect.else)
708
726
  //tag)
709
727
  if (this.deviceCollect.name) {
710
728
  //tag
@@ -721,8 +739,13 @@ export default {
721
739
  }
722
740
  this.ajresult = JSON.parse(this.data.f_defect_content).result
723
741
  this.showimg3 = this.data.f_noanswer_path
742
+ this.showimg5 = this.data.f_noanswer1_path
743
+ this.showimg6 = this.data.f_noanswer2_path
724
744
  this.showimg4 = this.data.f_rejectcheck_path
745
+ this.showimg7 = this.data.f_rejectcheck1_path
746
+ this.showimg8 = this.data.f_rejectcheck2_path
725
747
  this.paperdata = this.data
748
+ this.f_user_path = this.paperdata.f_user_pictures ? JSON.parse(this.paperdata.f_user_pictures)[0].f_user_path : ''
726
749
  this.loading = false
727
750
  },
728
751
  imgclose() {
@@ -863,7 +886,8 @@ export default {
863
886
  if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
864
887
  if (this.devicesAll[i][j].f_items[k].f_item_lists[0]) {
865
888
  for (let l = 0; l < this.devicesAll[i][j].f_items[k].f_item_lists.length; l++) {
866
- aa += this.devicesAll[i][j].f_items[k].f_item_lists[l].f_item_value + ' '
889
+ let val = this.devicesAll[i][j].f_items[k].f_item_lists[l].f_item_value
890
+ aa += (val === null ? '空' : val) + ' '
867
891
  }
868
892
  return aa
869
893
  }
@@ -894,7 +918,7 @@ export default {
894
918
  let keyall = Object.keys(this.data)
895
919
  for (let i = 0; i < keyall.length; i++) {
896
920
  //tag)
897
- if (keyall[i].startsWith('device') && keyall[i] != 'deviceundefined') {
921
+ if ((keyall[i].startsWith('f_devices') || keyall[i].startsWith('devices')) && keyall[i] != 'deviceundefined') {
898
922
  this.devicesAll.push(this.data[keyall[i]])
899
923
  //tag
900
924
  }
@@ -1225,106 +1249,18 @@ export default {
1225
1249
  }
1226
1250
  },
1227
1251
  ready() {
1228
- this.putDevices()
1229
- if (this.item.f_state != '未检' || this.item.f_no_checkplan == '无计划安检') {
1230
- if (this.role != 'inspect') {
1231
- let that = this
1232
- let id
1233
- if (this.role == 'view') {
1234
- id = this.item.id
1235
- } else if (this.role == 'androidview') {
1236
- id = this.item.f_paper_id
1237
- }
1238
- this.$resetpost(`rs/path/getUserinfomation`, {data: {condition: `id = '${id}'`}}).then((respanse) => {
1239
- //tag
1240
- if (respanse.data.length != 0) {
1241
- // 包含 其它 特殊处理的数组
1242
- // 对应位置
1243
-
1244
- //tag
1245
-
1246
- that.data = Object.assign(that.data, respanse.data[0])
1247
- if (respanse.data[0].f_devices) {
1248
- for (let da in that.devices) {
1249
- that.$set('data.device' + that.devices[da].n, [])
1250
- }
1251
- respanse.data[0].f_devices.forEach((item) => {
1252
- for (let de in that.devices) {
1253
- if (that.devices[de].device == item.f_device_type) {
1254
- item.f_items.forEach((f_item) => {
1255
- //tag
1256
- //tag
1257
- let itemValues = []
1258
- f_item.f_item_lists.forEach((tempItem) => {
1259
- //tag
1260
- if (tempItem.f_item_value !== 'null') {
1261
- itemValues.push(tempItem.f_item_value)
1262
- }
1263
- })
1264
- f_item.f_item_value = itemValues
1265
- })
1266
- that.data['device' + that.devices[de].n].push({
1267
- f_device_type: item.f_device_type,
1268
- f_items: item.f_items
1269
- })
1270
- }
1271
- }
1272
- })
1273
- }
1274
- Util.replaceFalse(that.data)
1275
- Util.booleanFilter(that.data)
1276
- if (this.role == 'view') {
1277
- Util.ratifyPics(that.data)
1278
- Util.ratifyPics(that.picture)
1279
- } else {
1280
- Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
1281
- }
1282
- //tag
1283
- }
1284
- // this.$goto('paper-message-blank', {userinfo:this.data,devices:this.devices,config:this.config,role:this.role}, 'self')
1285
- this.isshow = true
1286
- asyncReady(this).then(() => {
1287
- //tag
1288
- //tag)
1289
- if (this.data.f_check_type == '民用') {
1290
- this.deviceconfig = Vue.config.safecheck.DevicesConfig
1291
- if (typeof this.deviceconfig === 'string') {
1292
- this.deviceconfig = JSON.parse(this.deviceconfig)
1293
- }
1294
- //tag)
1295
- } else if (this.data.f_check_type == '非民用') {
1296
- this.deviceconfig = Vue.config.safecheck.DevicesSetConfig
1297
- if (typeof this.deviceconfig === 'string') {
1298
- this.deviceconfig = JSON.parse(this.deviceconfig)
1299
- }
1300
- //tag)
1301
- }
1302
- if (this.data.f_collection_type == '按金额') {
1303
- let aaa = Object.assign({}, this.config2["燃气表"].items, this.deviceconfig["燃气表"].items)
1304
- this.deviceconfig["燃气表"].items = aaa
1305
- //this.deviceconfig["燃气表"]=this.config2["燃气表"]
1306
- //tag)
1307
- } else {
1308
- let aaa = Object.assign({}, this.config["燃气表"].items, this.deviceconfig["燃气表"].items)
1309
- this.deviceconfig["燃气表"].items = aaa
1310
- //tag)
1311
- }
1312
- this.deviceconfig2 = ObjConfig.getObjConfig(this.deviceconfig)
1313
- this.deviceconfig2[0].items = jsonSort(this.deviceconfig2[0].items, "index")
1314
- this.deviceconfig2[1].items = jsonSort(this.deviceconfig2[1].items, "index")
1315
- this.deviceconfig2 = jsonSort(this.deviceconfig2, "index")
1316
- this.getDeviceAll()
1317
-
1252
+ setTimeout(() => {
1253
+ this.loading = false;
1254
+ }, 3000)
1255
+ this.$resetpost(`rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.id}'`}}).then((respanse) => {
1256
+ //tag
1257
+ this.paperdata = respanse.data[0]
1258
+ this.paperdata.f_overall_imgs.forEach(item=>{
1259
+ item.f_overall_path = 'rs/image/file/'+item.f_overall_path
1260
+ })
1261
+ this.deviceconfig2 = Object.assign(this.data, respanse.data[0].f_devices)
1262
+ })
1318
1263
 
1319
- })
1320
- }
1321
- ).catch(
1322
- (respanse) => {
1323
- //tag
1324
- alert('查找安检单失败')
1325
- })
1326
- }
1327
- }
1328
1264
 
1329
1265
  },
1330
1266
  watch: {