safecheck-client 4.0.1-94 → 4.0.1-97

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,701 +1,701 @@
1
- <style scoped>
2
- .bg {
3
- background-color: blue;
4
- height: 1px;
5
- border: 0;
6
- }
7
-
8
- .app-row {
9
- background-color: white;
10
- padding: 10px 10px 0 10px;
11
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
12
- }
13
-
14
- .search_input {
15
- border: 0;
16
- outline: none;
17
- }
18
-
19
- .font {
20
- font: 15px PingFang-SC-Medium;
21
- color: #666666;
22
- }
23
-
24
- .input-font {
25
- font: 15px PingFang-SC-Medium;
26
- color: #333333;
27
- }
28
-
29
- .btn-font {
30
- font: 600 16px PingFang-SC-Bold;
31
- color: #499EDF;
32
- }
33
-
34
- .btn-color {
35
- background-color: #FFFFFF;
36
- border-radius: 10px;
37
- border: 1px solid #499EDF;
38
- }
39
-
40
- .app-text {
41
- font-size: 12px;
42
- }
43
-
44
- .panel-self {
45
- border-radius: 10px;
46
- border: 1px solid #499EDF;
47
- background-color: #F8F8F8;
48
- }
49
-
50
- .yybtn-color {
51
- background-color: #499edf;
52
- border-radius: 4px;
53
- border: 1px solid #499EDF;
54
- color: #FFFFFF;
55
- font: 14px PingFang-SC-Bold;
56
- }
57
-
58
- .qxbtn-color {
59
- background-color: #FFFFFF;
60
- border-radius: 4px;
61
- color: #499edf;
62
- font: 14px PingFang-SC-Bold;
63
- border: 1px solid #499EDF;
64
- }
65
-
66
- .button_shrink_top {
67
- width: 35px;
68
- height: 35px;
69
- background-size: 100%;
70
- background-image: url("../../../static/newStyle/stretch_top.png")
71
- }
72
-
73
- .button_shrink_bottom {
74
- width: 35px;
75
- height: 35px;
76
- background-size: 100%;
77
- background-image: url("../../../static/newStyle/stretch_bottom.png")
78
- }
79
-
80
- .button_shrink_left {
81
- width: 35px;
82
- height: 35px;
83
- background-size: 100%;
84
- background-image: url("../../../static/newStyle/stretch_left.png")
85
- }
86
-
87
- .button_shrink_right {
88
- width: 35px;
89
- height: 35px;
90
- background-size: 100%;
91
- background-image: url("../../../static/newStyle/stretch_right.png")
92
- }
93
- </style>
94
- <template>
95
- <div style="height: auto;width: 100%">
96
- <criteria-paged :model="model" v-ref:paged>
97
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
98
- <div partial>
99
- <form>
100
- <div class="row app-row">
101
- <div class="col-xs-4">
102
- <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
103
- <label class="font text-left">用户姓名:</label>
104
- </div>
105
- <div class="col-xs-8">
106
- <input class="search_input input-font" v-model=model.f_user_name
107
- condition="tcp.f_user_name like '%{}%'"/>
108
- </div>
109
- </div>
110
- <div class="row app-row">
111
- <div class="col-xs-4">
112
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
113
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
114
- </div>
115
- <div class="col-xs-8">
116
- <input id="f_userinfo_code" class="search_input input-font"
117
- v-model=model.f_userinfo_code condition="tcp.f_userinfo_code like '%{}%'"/>
118
- </div>
119
- </div>
120
- <div class="row app-row">
121
- <div class="col-xs-4">
122
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
123
- <label for="f_userinfo_code" class="font text-left">安检人员:</label>
124
- </div>
125
- <div class="col-xs-8">
126
- <input id="f_userinfo_code" class="search_input input-font"
127
- v-model=model.f_checker_name condition="tcp.f_checker_name like '%{}%'"/>
128
- </div>
129
- </div>
130
- <div class="row app-row">
131
- <div class="col-xs-4">
132
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
133
- <label class="font text-left">用户地址:</label>
134
- </div>
135
- <div class="col-xs-8">
136
- <input class="search_input input-font"
137
- v-model=model.f_address condition="tcp.f_address like '%{}%'"/>
138
- </div>
139
- </div>
140
- <div class="row app-row">
141
- <div class="col-xs-4">
142
- <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
143
- <label for="f_state" class="font text-left">起始时间:</label>
144
- </div>
145
- <datepicker id="f_start_date"
146
- placeholder='起始时间'
147
- :value.sync="model.f_start_date"
148
- :disabled-days-of-Week="[]"
149
- v-model="model.f_start_date"
150
- class="input-font col-xs-8"
151
- :format="'yyyy-MM-dd 00:00:00'"
152
- :show-reset-button="reset" readonly="readonly">
153
- </datepicker>
154
- </div>
155
- <div class="row app-row">
156
- <div class="col-xs-4">
157
- <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
158
- <label for="f_state" class="font text-left">结束时间:</label>
159
- </div>
160
- <datepicker id="f_end_date"
161
- placeholder='结束时间'
162
- :value.sync="model.f_end_date"
163
- :disabled-days-of-Week="[]"
164
- v-model="model.f_end_date"
165
- class="input-font col-xs-8"
166
- :format="'yyyy-MM-dd 23:59:00'"
167
- :show-reset-button="reset" readonly="readonly">
168
- </datepicker>
169
- </div>
170
- <div class="row app-row">
171
- <div class="col-xs-4">
172
- <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
173
- <label for="f_user_type" class="font text-left">用户类型:</label>
174
- </div>
175
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
176
- :width="'60%'"
177
- :options='$parent.$parent.user_types' placeholder='请选择用户类型'
178
- v-model="model.f_user_type" condition="f_user_type = '{}'" close-on-select
179
- clear-button></v-select>
180
- </div>
181
- <div class="row app-row">
182
- <div class="col-xs-4">
183
- <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
184
- <label for="f_user_type" class="font text-left">隐患名称:</label>
185
- </div>
186
- <v-select id="f_user_type" :value.sync="model.f_item_name" class="input-font"
187
- :width="'60%'"
188
- :align="'right'"
189
- :options='$parent.$parent.DefectConfigs' placeholder='请选择隐患名称'
190
- v-model="model.f_item_name" condition="f_item_name = '{}'" close-on-select
191
- clear-button></v-select>
192
- </div>
193
- <div class="row text-center" style="margin-top: 20px;">
194
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
195
- @click="$parent.$parent.selfSearch">查询
196
- </button>
197
- <div style="float: right;margin-right: 3% " class="button_spacing"
198
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
199
- @click="$parent.$parent.hidden()"></div>
200
- </div>
201
- <div style="height:30px;"></div>
202
- </form>
203
- </div>
204
- </criteria>
205
- <list :model="model" partial='list'>
206
- <div partial>
207
- <div class="auto app-text" style="margin-top: 5px;">
208
- <div class="panel" style="padding: 10px 10px 5px 10px;">
209
- <div class="panel-body panel-self">
210
- <div class="col-xs-12">
211
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
212
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
213
- </div>
214
- <div class="col-xs-12">
215
- <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
216
- <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
217
- </div>
218
- <div class="col-xs-12">
219
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
220
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}</p>
221
- </div>
222
- <div class="col-xs-12">
223
- <p class="panel-title text-left font" style="width: 23%;float: left"><b>安检时间:</b></p>
224
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_create_time }}</p>
225
- </div>
226
- <div class="col-xs-12">
227
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
228
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
229
- </div>
230
- <div class="col-xs-12">
231
- <p class="panel-title text-left font" style="width: 21%;float: left"><b>所属安检:</b></p>
232
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_checker_name }}</p>
233
- </div>
234
- <div class="col-xs-6">
235
- <p class="panel-title col-xs-5 text-left font"><b>检&ensp;查&ensp;项:</b></p>
236
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_device_type }}</p>
237
- </div>
238
- <div class="col-xs-6">
239
- <p class="panel-title col-xs-5 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
240
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_name }}</p>
241
- </div>
242
- <div class="col-xs-12">
243
- <p class="panel-title col-xs-5 text-left font"><b>备注:</b></p>
244
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_comments }}</p>
245
- </div>
246
- <div class="col-xs-12">
247
- <p class="panel-title col-xs-5 text-left font"><b>隐患原因:</b></p>
248
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_value }}</p>
249
- </div>
250
-
251
- <div class="col-xs-12">
252
- <button type="button" name="button" class="btn btn-primary"
253
- style="background-color:#499edf;float: right"
254
- @click="$parent.$parent.$parent.openshowModal(row)">查看
255
- </button>
256
- <button type="button" name="button" class="btn btn-primary"
257
- style="background-color:#499edf;float: right;margin-right:10px;"
258
- @click="$parent.$parent.$parent.openshowModal1(row)">处理
259
- </button>
260
- <button type="button" name="button" class="btn btn-primary"
261
- v-if="$parent.$parent.$parent.canlook"
262
- style="background-color:#499edf;float: right"
263
- @click="$parent.$parent.$parent.showmateria(row)">添加材料
264
- </button>
265
- </div>
266
- </div>
267
- </div>
268
- </div>
269
- </div>
270
- </list>
271
- </criteria-paged>
272
- </div>
273
- <modal :show.sync="showModal">
274
- <div slot="modal-header" class="modal-header">
275
- <h4 class="modal-title">
276
- 隐患照片
277
- </h4>
278
- </div>
279
- <div slot="modal-body" class="modal-body">
280
- <div class="from-group">
281
- <div class="row">
282
- <div class="col-md-6">
283
- <img-self v-if="row.f_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_path" width="300" height="400"></img-self>
284
- <img-self v-if="row.f_p1_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p1_path" width="300" height="400"></img-self>
285
- <img-self v-if="row.f_p2_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p2_path" width="300" height="400"></img-self>
286
- </div>
287
- </div>
288
- </div>
289
- </div>
290
- <div slot="modal-footer" class="modal-footer">
291
- <button type="button" class="btn btn-default" @click="closeshowModal">确认</button>
292
- </div>
293
- </modal>
294
- <modal :show.sync="showModal1">
295
- <div slot="modal-header" class="modal-header">
296
- <h4 class="modal-title">
297
- 处理结果
298
- </h4>
299
- </div>
300
- <div slot="modal-body" class="modal-body">
301
- <div class="row" style="margin-bottom: 10px">
302
- <p class="panel-title col-xs-3 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
303
- <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_name }}</p>
304
- </div>
305
- <div class="row" style="margin-bottom: 10px">
306
- <p class="panel-title col-xs-3 text-left font"><b>隐患原因:</b></p>
307
- <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_value }}</p>
308
- </div>
309
- <div class="form-group col-sm-12">
310
- <div class="auto">
311
- <div class="panel" style="padding: 10px 10px 5px 10px;">
312
- <div class="panel-body panel-self"
313
- style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
314
- <img-self :src="deal.f_deal_path" alt="整改照片" :width="140" :height="170" capture="camera"
315
- type="file"></img-self>
316
- <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
317
- <img src="../../assets/remove.png" @click="delfile('f_deal_path', deal.f_deal_path)"></img>
318
- <button type="button" name="button" class="btn btn-primary btn-photo"
319
- @click="takePic('f_deal_path','整改照片')">拍照
320
- </button>
321
- </div>
322
- </div>
323
- <div class="panel-body panel-self"
324
- style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
325
- <img-self :src="deal.f_other_dealpath1" alt="整改照片" :width="140" :height="170" capture="camera"
326
- type="file"></img-self>
327
- <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
328
- <img src="../../assets/remove.png" @click="delfile('f_other_dealpath1', deal.f_other_dealpath1)"></img>
329
- <button type="button" name="button" class="btn btn-primary btn-photo"
330
- @click="takePic('f_other_dealpath1','整改照片')">拍照
331
- </button>
332
- </div>
333
- </div>
334
- <div class="panel-body panel-self"
335
- style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
336
- <img-self :src="deal.f_other_dealpath2" alt="整改照片" :width="140" :height="170" capture="camera"
337
- type="file"></img-self>
338
- <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
339
- <img src="../../assets/remove.png" @click="delfile('f_other_dealpath2', deal.f_other_dealpath2)"></img>
340
- <button type="button" name="button" class="btn btn-primary btn-photo"
341
- @click="takePic('f_other_dealpath2','整改照片')">拍照
342
- </button>
343
- </div>
344
- </div>
345
- </div>
346
- </div>
347
- </div>
348
- <div class="form-group col-sm-12" v-if="isNeedDealSign">
349
- <p class="panel-title text-left font" style="text-align: center">用户签名:</p>
350
- <div class="auto">
351
- <div class="panel" style="padding: 10px 10px 5px 10px;">
352
- <div class="panel-body panel-self"
353
- style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
354
- <img :src="deal.f_dealsign_path" :width="200" :height="150"/>
355
- <div class="row text-right div-photo" style="height: 50px;margin-top: 60px">
356
- <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
357
- </div>
358
- </div>
359
- </div>
360
- </div>
361
- </div>
362
- <div class="row">
363
- <div class="col-xs-2">
364
- <p class="panel-title text-left font" style="text-align: center">备注</p>
365
- </div>
366
- <div class="col-xs-9">
367
- <textarea class="input-font " v-model=deal.f_deal_remark style="width: 100%"></textarea>
368
- </div>
369
- </div>
370
- <div v-if="isCancelLimitGas" style="display: flex;align-items: end;height: 30px;gap: 10px;padding-left: 16px;">
371
- <input type="checkbox" v-model="deletebacklistisselect"/>
372
- <div style="height: 18px">取消限制该用户购气</div>
373
- </div>
374
- </div>
375
- <div slot="modal-footer" class="modal-footer">
376
- <button type="button" class="btn btn-default" @click="commitDealDefect">确认</button>
377
- <button type="button" class="btn btn-default" @click="closeshowModal1">取消</button>
378
- </div>
379
- </modal>
380
- <modal :show.sync="showmaterial" backdrop="false" style="overflow: scroll;height: 100%">
381
- <header slot="modal-header" class="modal-header text-center">
382
- <button type="button" class="close" @click="close2"><span>&times;</span></button>
383
- <h4 class="modal-title">添加材料</h4>
384
- </header>
385
- <article slot="modal-body">
386
- <appinstallation-material v-if="showmaterial" :selectdata = "selectdata"></appinstallation-material>
387
- </article>
388
- <footer slot="modal-footer"></footer>
389
- </modal>
390
- </template>
391
-
392
- <script>
393
- import Vue from 'vue'
394
- import {HttpResetClass, PagedList} from 'vue-client'
395
- import * as Util from '../Util'
396
- import AppInstallationMaterial from './AppInstallationMaterial'
397
-
398
- export default {
399
- components: {
400
- 'appinstallation-material': AppInstallationMaterial
401
- },
402
- title: '无计划安检查询',
403
- data() {
404
- return {
405
- row:{},
406
- showModal: false,
407
- showModal1: false,
408
- showimg: '',
409
- DefectConfigs:[],
410
- deal: {
411
- result: {},
412
- f_deal_path: '',
413
- f_other_dealpath1: '',
414
- f_other_dealpath2: '',
415
- f_deal_remark: '',
416
- f_dealsign_path: '', //签名
417
- f_dealer: Vue.user.name,
418
- f_dealer_id: Vue.user.id
419
- },
420
- user_types: [
421
- {label: '请选择用户类型', value: ''},
422
- {label: '民用', value: '民用'},
423
- {label: '非民用', value: '非民用'},
424
- ],
425
- f_filialeids: '',
426
- model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/AndroidDealWith`, 20, {
427
- condition: 'this.condition',
428
- f_filialeids: `'${Vue.user.orgid}'`,
429
- f_checker_id: `'${Vue.user.id}'`
430
- }),
431
- criteriaShow: false,
432
- isNeedDealSign: this.$appdata.getSingleValue('隐患处理是否需要签名') == 'true',
433
- isCancelLimitGas: this.$appdata.getSingleValue('隐患处理-取消限制购气') == '是',
434
- canlook: this.$appdata.getSingleValue('隐患处理添加材料')?true:false,
435
- deletebacklistisselect: false,
436
- selectdata:{},
437
- showmaterial:false
438
- }
439
- },
440
- ready() {
441
- this.selfSearch()
442
- this.getDefectOption()
443
- },
444
- methods: {
445
- async getDefectOption() {
446
- let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_GroupBy`, {
447
- data: {
448
- items: "di.f_item_name",
449
- tablename: "t_paper_devices pd left join t_devices_items di on pd.id = di.f_device_id",
450
- groupitem: "di.f_item_name",
451
- condition: `di.f_is_defect = 'true' and di.f_is_repaired is null`
452
- }
453
- }, {resolveMsg: null, rejectMsg: null})
454
- const DefectConfigs = [{label: '全部', value: ''}]
455
- res.data.forEach((item) => {
456
- DefectConfigs.push({label: item.f_item_name, value: item.f_item_name})
457
- })
458
- this.DefectConfigs = DefectConfigs
459
- },
460
- showmateria(row){
461
- debugger
462
- this.selectdata = {
463
- f_process_id :row.device_id,
464
- model:row
465
- }
466
- this.showmaterial = true
467
- },
468
- close2(){
469
- this.showmaterial = false
470
- this.selectdata ={}
471
- },
472
- async deletebacklist() {
473
- ////tag)
474
- let http = new HttpResetClass()
475
- ////tag
476
- let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
477
- data: {
478
- items: "*",
479
- tablename: "t_userinfo",
480
- condition: `f_userinfo_code = ${this.deal.result.f_userinfo_code}`,
481
- orderitem: "f_userinfo_code"
482
- }
483
- }, {resolveMsg: null, rejectMsg: null})
484
- ////tag)
485
- ////tag
486
- let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/backlistOperate`, {
487
- data: {
488
- "f_operat_type": "取消拉黑",
489
- "f_state": "有效",
490
- "f_user_name": this.deal.result.f_user_name,
491
- "f_comments": '',
492
- "f_operator": Vue.user.name,
493
- "f_operatorid": Vue.user.id,
494
- "f_orgid": Vue.user.orgid,
495
- "f_orgname": Vue.user.orgs,
496
- "f_depid": Vue.user.depids,
497
- "f_depname": Vue.user.deps,
498
- "f_describe": `${Vue.user.name}对用户${this.deal.result.f_user_name}进行取消拉黑`,
499
- "f_userinfo_id": {
500
- "f_userinfo_id": res1.data[0].f_userinfo_id,
501
- "f_user_state": "正常",
502
- "version": res1.data[0].version
503
- },
504
- "f_limit_times":"",
505
- "f_limit_value":""
506
- }
507
- }, {resolveMsg: null, rejectMsg: null})
508
- },
509
- // 签名回调
510
- signCallback(prop, fileName) {
511
- console.log("签名回调地址" + fileName)
512
- // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
513
- HostApp.__this__.$set('deal.f_dealsign_path', fileName)
514
- HostApp.__callback__ = null
515
- HostApp.__this__ = null
516
- },
517
- // 用户签名
518
- sign() {
519
- if (!this.deal.f_deal_path) {
520
- this.$showMessage('请先拍摄处理后照片!!!')
521
- return
522
- }
523
- this.delAudioFile('f_dealsign_path', this.deal.f_dealsign_path)
524
- let prop = 'f_dealsign_path'
525
- let idx = 'aofeng'
526
- let fileName
527
- if (!this.deal.f_dealsign_path) {
528
- fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
529
- } else {
530
- fileName = Util.getFileName(this.deal.f_dealsign_path)
531
- }
532
- HostApp.__callback__ = this.signCallback
533
- HostApp.__this__ = this
534
- HostApp.getSignature({
535
- file: fileName,
536
- requestCode: 111,
537
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
538
- })
539
- },
540
- delAudioFile(prop, fileName) {
541
- if (!fileName)
542
- return
543
- else {
544
- HostApp.delfile(fileName)
545
- this.deal[prop] = null
546
- }
547
- },
548
- commitDealDefect() {
549
- //tag
550
- //tag)
551
- // if (!this.deal.f_deal_path) {
552
- // this.$showMessage('处理后照片必须上传')
553
- // return
554
- // }
555
- if (this.isNeedDealSign && !this.deal.f_dealsign_path) {
556
- this.$showMessage('签名必须上传')
557
- return
558
- }
559
- if (this.deletebacklistisselect){
560
- this.deletebacklist()
561
- }
562
- this.deal.f_other_dealpath = this.deal.f_deal_path
563
- HostApp.__this__ = this
564
- HostApp.logicWithHint({
565
- 'logic': 'safe_dealWithDefect', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
566
- 'data': this.deal, 'backresult': 1
567
- })
568
- },
569
- commitCallBack(jo) {
570
- //tag
571
- //tag)
572
- if (jo.state == 'ok') {
573
- let ress = JSON.parse(jo.result)
574
- if (ress.code == 200) {
575
- this.$showMessage(ress.msg)
576
- this.closeshowModal1()
577
- } else {
578
- this.$showMessage(ress.msg)
579
- }
580
- } else {
581
- this.$showMessage('本地服务调用失败')
582
- }
583
- },
584
- delfile(prop, fileName) {
585
- if (fileName == Vue.nopic)
586
- return
587
- else {
588
- HostApp.delfile(fileName)
589
- this.deal[prop] = Vue.nopic
590
- }
591
- },
592
- openshowModal(val) {
593
- this.row = val
594
- this.showModal = true
595
- },
596
- closeshowModal() {
597
- this.showimg = ''
598
- this.showModal = false
599
- },
600
- openshowModal1(val) {
601
- this.deal.result = val
602
- //tag
603
- //tag
604
- this.deletebacklistisselect = false
605
- this.showModal1 = true
606
- },
607
- closeshowModal1() {
608
- this.deal = {
609
- result: {},
610
- f_deal_path: '',
611
- f_other_dealpath1: '',
612
- f_other_dealpath2: '',
613
- f_deal_remark: '',
614
- f_dealsign_path: '', //签名
615
- f_dealer: Vue.user.name,
616
- f_dealer_id: Vue.user.id
617
- }
618
- this.showModal1 = false
619
- this.selfSearch()
620
- },
621
- cameraCallBack(prop, fileName) {
622
- HostApp.__this__.$set( 'deal.'+prop+'', fileName)
623
- HostApp.__callback__ = null
624
- HostApp.__this__ = null
625
- },
626
- takePic(prop, title) {
627
- HostApp.__callback__ = this.cameraCallBack
628
- HostApp.__this__ = this
629
- let fileName
630
- if (!this.deal[prop] || this.deal[prop].includes("nopic.png")) {
631
- fileName = Util.guid() + '-' + prop + '.jpg'
632
- } else {
633
- fileName = Util.getFileName(this.deal[prop])
634
- }
635
- //tag
636
- //tag
637
- HostApp._open_a_page({
638
- type: 'boomerang',
639
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
640
- param: {
641
- file: fileName,
642
- requestCode: 111,
643
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
644
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
645
- }
646
- })
647
- },
648
- selfSearch() {
649
-
650
- let condition = "1=1 "
651
- if (this.$refs.paged.$refs.cri.model.f_user_name) {
652
- if (this.$refs.paged.$refs.cri.model.f_user_name.toString().trim()) {
653
- condition += " and tcp.f_user_name like '" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
654
- }
655
- }
656
- if (this.$refs.paged.$refs.cri.model.f_userinfo_code) {
657
- if (this.$refs.paged.$refs.cri.model.f_userinfo_code.toString().trim()) {
658
- condition += " and tcp.f_userinfo_code = '" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "'"
659
- }
660
- }
661
- if (this.$refs.paged.$refs.cri.model.f_checker_name) {
662
- if (this.$refs.paged.$refs.cri.model.f_checker_name.toString().trim()) {
663
- condition += " and tcp.f_checker_name = '" + this.$refs.paged.$refs.cri.model.f_checker_name + "'"
664
- }
665
- }
666
- if (this.$refs.paged.$refs.cri.model.f_address) {
667
- if (this.$refs.paged.$refs.cri.model.f_address.toString().trim()) {
668
- condition += " and tcp.f_address like '%" + this.$refs.paged.$refs.cri.model.f_address + "%'"
669
- }
670
- }
671
- if (this.$refs.paged.$refs.cri.model.f_start_date) {
672
- if (this.$refs.paged.$refs.cri.model.f_start_date.toString().trim()) {
673
- condition += " and tdl.f_create_time > '" + this.$refs.paged.$refs.cri.model.f_start_date + "'"
674
- }
675
- }
676
- if (this.$refs.paged.$refs.cri.model.f_end_date) {
677
- if (this.$refs.paged.$refs.cri.model.f_end_date.toString().trim()) {
678
- condition += " and tdl.f_create_time < '" + this.$refs.paged.$refs.cri.model.f_end_date + "'"
679
- }
680
- }
681
- if (this.$refs.paged.$refs.cri.model.f_user_type) {
682
- if (this.$refs.paged.$refs.cri.model.f_user_type.toString().trim()) {
683
- condition += " and f_user_type = '" + this.$refs.paged.$refs.cri.model.f_user_type + "'"
684
- }
685
- }
686
- if (this.$refs.paged.$refs.cri.model.f_item_name) {
687
- if (this.$refs.paged.$refs.cri.model.f_item_name.toString().trim()) {
688
- condition += " and f_item_name = '" + this.$refs.paged.$refs.cri.model.f_item_name + "'"
689
- }
690
- }
691
-
692
- //tag
693
- this.model.search(condition)
694
- },
695
-
696
- hidden() {
697
- this.criteriaShow = !this.criteriaShow
698
- }
699
- }
700
- }
701
- </script>
1
+ <style scoped>
2
+ .bg {
3
+ background-color: blue;
4
+ height: 1px;
5
+ border: 0;
6
+ }
7
+
8
+ .app-row {
9
+ background-color: white;
10
+ padding: 10px 10px 0 10px;
11
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
12
+ }
13
+
14
+ .search_input {
15
+ border: 0;
16
+ outline: none;
17
+ }
18
+
19
+ .font {
20
+ font: 15px PingFang-SC-Medium;
21
+ color: #666666;
22
+ }
23
+
24
+ .input-font {
25
+ font: 15px PingFang-SC-Medium;
26
+ color: #333333;
27
+ }
28
+
29
+ .btn-font {
30
+ font: 600 16px PingFang-SC-Bold;
31
+ color: #499EDF;
32
+ }
33
+
34
+ .btn-color {
35
+ background-color: #FFFFFF;
36
+ border-radius: 10px;
37
+ border: 1px solid #499EDF;
38
+ }
39
+
40
+ .app-text {
41
+ font-size: 12px;
42
+ }
43
+
44
+ .panel-self {
45
+ border-radius: 10px;
46
+ border: 1px solid #499EDF;
47
+ background-color: #F8F8F8;
48
+ }
49
+
50
+ .yybtn-color {
51
+ background-color: #499edf;
52
+ border-radius: 4px;
53
+ border: 1px solid #499EDF;
54
+ color: #FFFFFF;
55
+ font: 14px PingFang-SC-Bold;
56
+ }
57
+
58
+ .qxbtn-color {
59
+ background-color: #FFFFFF;
60
+ border-radius: 4px;
61
+ color: #499edf;
62
+ font: 14px PingFang-SC-Bold;
63
+ border: 1px solid #499EDF;
64
+ }
65
+
66
+ .button_shrink_top {
67
+ width: 35px;
68
+ height: 35px;
69
+ background-size: 100%;
70
+ background-image: url("../../../static/newStyle/stretch_top.png")
71
+ }
72
+
73
+ .button_shrink_bottom {
74
+ width: 35px;
75
+ height: 35px;
76
+ background-size: 100%;
77
+ background-image: url("../../../static/newStyle/stretch_bottom.png")
78
+ }
79
+
80
+ .button_shrink_left {
81
+ width: 35px;
82
+ height: 35px;
83
+ background-size: 100%;
84
+ background-image: url("../../../static/newStyle/stretch_left.png")
85
+ }
86
+
87
+ .button_shrink_right {
88
+ width: 35px;
89
+ height: 35px;
90
+ background-size: 100%;
91
+ background-image: url("../../../static/newStyle/stretch_right.png")
92
+ }
93
+ </style>
94
+ <template>
95
+ <div style="height: auto;width: 100%">
96
+ <criteria-paged :model="model" v-ref:paged>
97
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
98
+ <div partial>
99
+ <form>
100
+ <div class="row app-row">
101
+ <div class="col-xs-4">
102
+ <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
103
+ <label class="font text-left">用户姓名:</label>
104
+ </div>
105
+ <div class="col-xs-8">
106
+ <input class="search_input input-font" v-model=model.f_user_name
107
+ condition="tcp.f_user_name like '%{}%'"/>
108
+ </div>
109
+ </div>
110
+ <div class="row app-row">
111
+ <div class="col-xs-4">
112
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
113
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
114
+ </div>
115
+ <div class="col-xs-8">
116
+ <input id="f_userinfo_code" class="search_input input-font"
117
+ v-model=model.f_userinfo_code condition="tcp.f_userinfo_code like '%{}%'"/>
118
+ </div>
119
+ </div>
120
+ <div class="row app-row">
121
+ <div class="col-xs-4">
122
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
123
+ <label for="f_userinfo_code" class="font text-left">安检人员:</label>
124
+ </div>
125
+ <div class="col-xs-8">
126
+ <input id="f_userinfo_code" class="search_input input-font"
127
+ v-model=model.f_checker_name condition="tcp.f_checker_name like '%{}%'"/>
128
+ </div>
129
+ </div>
130
+ <div class="row app-row">
131
+ <div class="col-xs-4">
132
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
133
+ <label class="font text-left">用户地址:</label>
134
+ </div>
135
+ <div class="col-xs-8">
136
+ <input class="search_input input-font"
137
+ v-model=model.f_address condition="tcp.f_address like '%{}%'"/>
138
+ </div>
139
+ </div>
140
+ <div class="row app-row">
141
+ <div class="col-xs-4">
142
+ <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
143
+ <label for="f_state" class="font text-left">起始时间:</label>
144
+ </div>
145
+ <datepicker id="f_start_date"
146
+ placeholder='起始时间'
147
+ :value.sync="model.f_start_date"
148
+ :disabled-days-of-Week="[]"
149
+ v-model="model.f_start_date"
150
+ class="input-font col-xs-8"
151
+ :format="'yyyy-MM-dd 00:00:00'"
152
+ :show-reset-button="reset" readonly="readonly">
153
+ </datepicker>
154
+ </div>
155
+ <div class="row app-row">
156
+ <div class="col-xs-4">
157
+ <img src="../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
158
+ <label for="f_state" class="font text-left">结束时间:</label>
159
+ </div>
160
+ <datepicker id="f_end_date"
161
+ placeholder='结束时间'
162
+ :value.sync="model.f_end_date"
163
+ :disabled-days-of-Week="[]"
164
+ v-model="model.f_end_date"
165
+ class="input-font col-xs-8"
166
+ :format="'yyyy-MM-dd 23:59:00'"
167
+ :show-reset-button="reset" readonly="readonly">
168
+ </datepicker>
169
+ </div>
170
+ <div class="row app-row">
171
+ <div class="col-xs-4">
172
+ <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
173
+ <label for="f_user_type" class="font text-left">用户类型:</label>
174
+ </div>
175
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
176
+ :width="'60%'"
177
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型'
178
+ v-model="model.f_user_type" condition="f_user_type = '{}'" close-on-select
179
+ clear-button></v-select>
180
+ </div>
181
+ <div class="row app-row">
182
+ <div class="col-xs-4">
183
+ <img src="../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
184
+ <label for="f_user_type" class="font text-left">隐患名称:</label>
185
+ </div>
186
+ <v-select id="f_user_type" :value.sync="model.f_item_name" class="input-font"
187
+ :width="'60%'"
188
+ :align="'right'"
189
+ :options='$parent.$parent.DefectConfigs' placeholder='请选择隐患名称'
190
+ v-model="model.f_item_name" condition="f_item_name = '{}'" close-on-select
191
+ clear-button></v-select>
192
+ </div>
193
+ <div class="row text-center" style="margin-top: 20px;">
194
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
195
+ @click="$parent.$parent.selfSearch">查询
196
+ </button>
197
+ <div style="float: right;margin-right: 3% " class="button_spacing"
198
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
199
+ @click="$parent.$parent.hidden()"></div>
200
+ </div>
201
+ <div style="height:30px;"></div>
202
+ </form>
203
+ </div>
204
+ </criteria>
205
+ <list :model="model" partial='list'>
206
+ <div partial>
207
+ <div class="auto app-text" style="margin-top: 5px;">
208
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
209
+ <div class="panel-body panel-self">
210
+ <div class="col-xs-12">
211
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户编号:</b></p>
212
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}</p>
213
+ </div>
214
+ <div class="col-xs-12">
215
+ <p class="panel-title col-xs-5 text-left font" style="width: 21%;float: left"><b>用户名称:</b></p>
216
+ <p class="panel-title col-xs-7 text-left input-font" style="width: 79%">{{ row.f_user_name }}</p>
217
+ </div>
218
+ <div class="col-xs-12">
219
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>用户电话:</b></p>
220
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}</p>
221
+ </div>
222
+ <div class="col-xs-12">
223
+ <p class="panel-title text-left font" style="width: 23%;float: left"><b>安检时间:</b></p>
224
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_create_time }}</p>
225
+ </div>
226
+ <div class="col-xs-12">
227
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>用户地址:</b></p>
228
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_address }}</p>
229
+ </div>
230
+ <div class="col-xs-12">
231
+ <p class="panel-title text-left font" style="width: 21%;float: left"><b>所属安检:</b></p>
232
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_checker_name }}</p>
233
+ </div>
234
+ <div class="col-xs-6">
235
+ <p class="panel-title col-xs-5 text-left font"><b>检&ensp;查&ensp;项:</b></p>
236
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_device_type }}</p>
237
+ </div>
238
+ <div class="col-xs-6">
239
+ <p class="panel-title col-xs-5 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
240
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_name }}</p>
241
+ </div>
242
+ <div class="col-xs-12">
243
+ <p class="panel-title col-xs-5 text-left font"><b>备注:</b></p>
244
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_comments }}</p>
245
+ </div>
246
+ <div class="col-xs-12">
247
+ <p class="panel-title col-xs-5 text-left font"><b>隐患原因:</b></p>
248
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_item_value }}</p>
249
+ </div>
250
+
251
+ <div class="col-xs-12">
252
+ <button type="button" name="button" class="btn btn-primary"
253
+ style="background-color:#499edf;float: right"
254
+ @click="$parent.$parent.$parent.openshowModal(row)">查看
255
+ </button>
256
+ <button type="button" name="button" class="btn btn-primary"
257
+ style="background-color:#499edf;float: right;margin-right:10px;"
258
+ @click="$parent.$parent.$parent.openshowModal1(row)">处理
259
+ </button>
260
+ <button type="button" name="button" class="btn btn-primary"
261
+ v-if="$parent.$parent.$parent.canlook"
262
+ style="background-color:#499edf;float: right"
263
+ @click="$parent.$parent.$parent.showmateria(row)">添加材料
264
+ </button>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ </list>
271
+ </criteria-paged>
272
+ </div>
273
+ <modal :show.sync="showModal">
274
+ <div slot="modal-header" class="modal-header">
275
+ <h4 class="modal-title">
276
+ 隐患照片
277
+ </h4>
278
+ </div>
279
+ <div slot="modal-body" class="modal-body">
280
+ <div class="from-group">
281
+ <div class="row">
282
+ <div class="col-md-6">
283
+ <img-self v-if="row.f_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_path" width="300" height="400"></img-self>
284
+ <img-self v-if="row.f_p1_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p1_path" width="300" height="400"></img-self>
285
+ <img-self v-if="row.f_p2_path" :src="`${this.$androidUtil.getProxyUrl()}/rs/image/file/`+row.f_p2_path" width="300" height="400"></img-self>
286
+ </div>
287
+ </div>
288
+ </div>
289
+ </div>
290
+ <div slot="modal-footer" class="modal-footer">
291
+ <button type="button" class="btn btn-default" @click="closeshowModal">确认</button>
292
+ </div>
293
+ </modal>
294
+ <modal :show.sync="showModal1">
295
+ <div slot="modal-header" class="modal-header">
296
+ <h4 class="modal-title">
297
+ 处理结果
298
+ </h4>
299
+ </div>
300
+ <div slot="modal-body" class="modal-body">
301
+ <div class="row" style="margin-bottom: 10px">
302
+ <p class="panel-title col-xs-3 text-left font"><b>隐&ensp;患&ensp;项:</b></p>
303
+ <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_name }}</p>
304
+ </div>
305
+ <div class="row" style="margin-bottom: 10px">
306
+ <p class="panel-title col-xs-3 text-left font"><b>隐患原因:</b></p>
307
+ <p class="panel-title col-xs-9 text-left input-font">{{ deal.result.f_item_value }}</p>
308
+ </div>
309
+ <div class="form-group col-sm-12">
310
+ <div class="auto">
311
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
312
+ <div class="panel-body panel-self"
313
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
314
+ <img-self :src="deal.f_deal_path" alt="整改照片" :width="140" :height="170" capture="camera"
315
+ type="file"></img-self>
316
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
317
+ <img src="../../assets/remove.png" @click="delfile('f_deal_path', deal.f_deal_path)"></img>
318
+ <button type="button" name="button" class="btn btn-primary btn-photo"
319
+ @click="takePic('f_deal_path','整改照片')">拍照
320
+ </button>
321
+ </div>
322
+ </div>
323
+ <div class="panel-body panel-self"
324
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
325
+ <img-self :src="deal.f_other_dealpath1" alt="整改照片" :width="140" :height="170" capture="camera"
326
+ type="file"></img-self>
327
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
328
+ <img src="../../assets/remove.png" @click="delfile('f_other_dealpath1', deal.f_other_dealpath1)"></img>
329
+ <button type="button" name="button" class="btn btn-primary btn-photo"
330
+ @click="takePic('f_other_dealpath1','整改照片')">拍照
331
+ </button>
332
+ </div>
333
+ </div>
334
+ <div class="panel-body panel-self"
335
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
336
+ <img-self :src="deal.f_other_dealpath2" alt="整改照片" :width="140" :height="170" capture="camera"
337
+ type="file"></img-self>
338
+ <div class="row text-right div-photo" style="height: 50px;margin-top: -30px">
339
+ <img src="../../assets/remove.png" @click="delfile('f_other_dealpath2', deal.f_other_dealpath2)"></img>
340
+ <button type="button" name="button" class="btn btn-primary btn-photo"
341
+ @click="takePic('f_other_dealpath2','整改照片')">拍照
342
+ </button>
343
+ </div>
344
+ </div>
345
+ </div>
346
+ </div>
347
+ </div>
348
+ <div class="form-group col-sm-12" v-if="isNeedDealSign">
349
+ <p class="panel-title text-left font" style="text-align: center">用户签名:</p>
350
+ <div class="auto">
351
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
352
+ <div class="panel-body panel-self"
353
+ style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
354
+ <img :src="deal.f_dealsign_path" :width="200" :height="150"/>
355
+ <div class="row text-right div-photo" style="height: 50px;margin-top: 60px">
356
+ <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
357
+ </div>
358
+ </div>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ <div class="row">
363
+ <div class="col-xs-2">
364
+ <p class="panel-title text-left font" style="text-align: center">备注</p>
365
+ </div>
366
+ <div class="col-xs-9">
367
+ <textarea class="input-font " v-model=deal.f_deal_remark style="width: 100%"></textarea>
368
+ </div>
369
+ </div>
370
+ <div v-if="isCancelLimitGas" style="display: flex;align-items: end;height: 30px;gap: 10px;padding-left: 16px;">
371
+ <input type="checkbox" v-model="deletebacklistisselect"/>
372
+ <div style="height: 18px">取消限制该用户购气</div>
373
+ </div>
374
+ </div>
375
+ <div slot="modal-footer" class="modal-footer">
376
+ <button type="button" class="btn btn-default" @click="commitDealDefect">确认</button>
377
+ <button type="button" class="btn btn-default" @click="closeshowModal1">取消</button>
378
+ </div>
379
+ </modal>
380
+ <modal :show.sync="showmaterial" backdrop="false" style="overflow: scroll;height: 100%">
381
+ <header slot="modal-header" class="modal-header text-center">
382
+ <button type="button" class="close" @click="close2"><span>&times;</span></button>
383
+ <h4 class="modal-title">添加材料</h4>
384
+ </header>
385
+ <article slot="modal-body">
386
+ <appinstallation-material v-if="showmaterial" :selectdata = "selectdata"></appinstallation-material>
387
+ </article>
388
+ <footer slot="modal-footer"></footer>
389
+ </modal>
390
+ </template>
391
+
392
+ <script>
393
+ import Vue from 'vue'
394
+ import {HttpResetClass, PagedList} from 'vue-client'
395
+ import * as Util from '../Util'
396
+ import AppInstallationMaterial from './AppInstallationMaterial'
397
+
398
+ export default {
399
+ components: {
400
+ 'appinstallation-material': AppInstallationMaterial
401
+ },
402
+ title: '无计划安检查询',
403
+ data() {
404
+ return {
405
+ row:{},
406
+ showModal: false,
407
+ showModal1: false,
408
+ showimg: '',
409
+ DefectConfigs:[],
410
+ deal: {
411
+ result: {},
412
+ f_deal_path: '',
413
+ f_other_dealpath1: '',
414
+ f_other_dealpath2: '',
415
+ f_deal_remark: '',
416
+ f_dealsign_path: '', //签名
417
+ f_dealer: Vue.user.name,
418
+ f_dealer_id: Vue.user.id
419
+ },
420
+ user_types: [
421
+ {label: '请选择用户类型', value: ''},
422
+ {label: '民用', value: '民用'},
423
+ {label: '非民用', value: '非民用'},
424
+ ],
425
+ f_filialeids: '',
426
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/AndroidDealWith`, 20, {
427
+ condition: 'this.condition',
428
+ f_filialeids: `'${Vue.user.orgid}'`,
429
+ f_checker_id: `'${Vue.user.id}'`
430
+ }),
431
+ criteriaShow: false,
432
+ isNeedDealSign: this.$appdata.getSingleValue('隐患处理是否需要签名') == 'true',
433
+ isCancelLimitGas: this.$appdata.getSingleValue('隐患处理-取消限制购气') == '是',
434
+ canlook: this.$appdata.getSingleValue('隐患处理添加材料')?true:false,
435
+ deletebacklistisselect: false,
436
+ selectdata:{},
437
+ showmaterial:false
438
+ }
439
+ },
440
+ ready() {
441
+ this.selfSearch()
442
+ this.getDefectOption()
443
+ },
444
+ methods: {
445
+ async getDefectOption() {
446
+ let res = await new HttpResetClass().load("POST", `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_GroupBy`, {
447
+ data: {
448
+ items: "di.f_item_name",
449
+ tablename: "t_paper_devices pd left join t_devices_items di on pd.id = di.f_device_id",
450
+ groupitem: "di.f_item_name",
451
+ condition: `di.f_is_defect = 'true' and di.f_is_repaired is null`
452
+ }
453
+ }, {resolveMsg: null, rejectMsg: null})
454
+ const DefectConfigs = [{label: '全部', value: ''}]
455
+ res.data.forEach((item) => {
456
+ DefectConfigs.push({label: item.f_item_name, value: item.f_item_name})
457
+ })
458
+ this.DefectConfigs = DefectConfigs
459
+ },
460
+ showmateria(row){
461
+ debugger
462
+ this.selectdata = {
463
+ f_process_id :row.device_id,
464
+ model:row
465
+ }
466
+ this.showmaterial = true
467
+ },
468
+ close2(){
469
+ this.showmaterial = false
470
+ this.selectdata ={}
471
+ },
472
+ async deletebacklist() {
473
+ ////tag)
474
+ let http = new HttpResetClass()
475
+ ////tag
476
+ let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
477
+ data: {
478
+ items: "*",
479
+ tablename: "t_userinfo",
480
+ condition: `f_userinfo_code = ${this.deal.result.f_userinfo_code}`,
481
+ orderitem: "f_userinfo_code"
482
+ }
483
+ }, {resolveMsg: null, rejectMsg: null})
484
+ ////tag)
485
+ ////tag
486
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/backlistOperate`, {
487
+ data: {
488
+ "f_operat_type": "取消拉黑",
489
+ "f_state": "有效",
490
+ "f_user_name": this.deal.result.f_user_name,
491
+ "f_comments": '',
492
+ "f_operator": Vue.user.name,
493
+ "f_operatorid": Vue.user.id,
494
+ "f_orgid": Vue.user.orgid,
495
+ "f_orgname": Vue.user.orgs,
496
+ "f_depid": Vue.user.depids,
497
+ "f_depname": Vue.user.deps,
498
+ "f_describe": `${Vue.user.name}对用户${this.deal.result.f_user_name}进行取消拉黑`,
499
+ "f_userinfo_id": {
500
+ "f_userinfo_id": res1.data[0].f_userinfo_id,
501
+ "f_user_state": "正常",
502
+ "version": res1.data[0].version
503
+ },
504
+ "f_limit_times":"",
505
+ "f_limit_value":""
506
+ }
507
+ }, {resolveMsg: null, rejectMsg: null})
508
+ },
509
+ // 签名回调
510
+ signCallback(prop, fileName) {
511
+ console.log("签名回调地址" + fileName)
512
+ // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
513
+ HostApp.__this__.$set('deal.f_dealsign_path', fileName)
514
+ HostApp.__callback__ = null
515
+ HostApp.__this__ = null
516
+ },
517
+ // 用户签名
518
+ sign() {
519
+ if (!this.deal.f_deal_path) {
520
+ this.$showMessage('请先拍摄处理后照片!!!')
521
+ return
522
+ }
523
+ this.delAudioFile('f_dealsign_path', this.deal.f_dealsign_path)
524
+ let prop = 'f_dealsign_path'
525
+ let idx = 'aofeng'
526
+ let fileName
527
+ if (!this.deal.f_dealsign_path) {
528
+ fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
529
+ } else {
530
+ fileName = Util.getFileName(this.deal.f_dealsign_path)
531
+ }
532
+ HostApp.__callback__ = this.signCallback
533
+ HostApp.__this__ = this
534
+ HostApp.getSignature({
535
+ file: fileName,
536
+ requestCode: 111,
537
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
538
+ })
539
+ },
540
+ delAudioFile(prop, fileName) {
541
+ if (!fileName)
542
+ return
543
+ else {
544
+ HostApp.delfile(fileName)
545
+ this.deal[prop] = null
546
+ }
547
+ },
548
+ commitDealDefect() {
549
+ //tag
550
+ //tag)
551
+ // if (!this.deal.f_deal_path) {
552
+ // this.$showMessage('处理后照片必须上传')
553
+ // return
554
+ // }
555
+ if (this.isNeedDealSign && !this.deal.f_dealsign_path) {
556
+ this.$showMessage('签名必须上传')
557
+ return
558
+ }
559
+ if (this.deletebacklistisselect){
560
+ this.deletebacklist()
561
+ }
562
+ this.deal.f_other_dealpath = this.deal.f_deal_path
563
+ HostApp.__this__ = this
564
+ HostApp.logicWithHint({
565
+ 'logic': 'safe_dealWithDefect', 'callback': 'javascript: HostApp.__this__.commitCallBack()',
566
+ 'data': this.deal, 'backresult': 1
567
+ })
568
+ },
569
+ commitCallBack(jo) {
570
+ //tag
571
+ //tag)
572
+ if (jo.state == 'ok') {
573
+ let ress = JSON.parse(jo.result)
574
+ if (ress.code == 200) {
575
+ this.$showMessage(ress.msg)
576
+ this.closeshowModal1()
577
+ } else {
578
+ this.$showMessage(ress.msg)
579
+ }
580
+ } else {
581
+ this.$showMessage('本地服务调用失败')
582
+ }
583
+ },
584
+ delfile(prop, fileName) {
585
+ if (fileName == Vue.nopic)
586
+ return
587
+ else {
588
+ HostApp.delfile(fileName)
589
+ this.deal[prop] = Vue.nopic
590
+ }
591
+ },
592
+ openshowModal(val) {
593
+ this.row = val
594
+ this.showModal = true
595
+ },
596
+ closeshowModal() {
597
+ this.showimg = ''
598
+ this.showModal = false
599
+ },
600
+ openshowModal1(val) {
601
+ this.deal.result = val
602
+ //tag
603
+ //tag
604
+ this.deletebacklistisselect = false
605
+ this.showModal1 = true
606
+ },
607
+ closeshowModal1() {
608
+ this.deal = {
609
+ result: {},
610
+ f_deal_path: '',
611
+ f_other_dealpath1: '',
612
+ f_other_dealpath2: '',
613
+ f_deal_remark: '',
614
+ f_dealsign_path: '', //签名
615
+ f_dealer: Vue.user.name,
616
+ f_dealer_id: Vue.user.id
617
+ }
618
+ this.showModal1 = false
619
+ this.selfSearch()
620
+ },
621
+ cameraCallBack(prop, fileName) {
622
+ HostApp.__this__.$set( 'deal.'+prop+'', fileName)
623
+ HostApp.__callback__ = null
624
+ HostApp.__this__ = null
625
+ },
626
+ takePic(prop, title) {
627
+ HostApp.__callback__ = this.cameraCallBack
628
+ HostApp.__this__ = this
629
+ let fileName
630
+ if (!this.deal[prop] || this.deal[prop].includes("nopic.png")) {
631
+ fileName = Util.guid() + '-' + prop + '.jpg'
632
+ } else {
633
+ fileName = Util.getFileName(this.deal[prop])
634
+ }
635
+ //tag
636
+ //tag
637
+ HostApp._open_a_page({
638
+ type: 'boomerang',
639
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
640
+ param: {
641
+ file: fileName,
642
+ requestCode: 111,
643
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
644
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name
645
+ }
646
+ })
647
+ },
648
+ selfSearch() {
649
+
650
+ let condition = "1=1 "
651
+ if (this.$refs.paged.$refs.cri.model.f_user_name) {
652
+ if (this.$refs.paged.$refs.cri.model.f_user_name.toString().trim()) {
653
+ condition += " and tcp.f_user_name like '" + this.$refs.paged.$refs.cri.model.f_user_name + "%'"
654
+ }
655
+ }
656
+ if (this.$refs.paged.$refs.cri.model.f_userinfo_code) {
657
+ if (this.$refs.paged.$refs.cri.model.f_userinfo_code.toString().trim()) {
658
+ condition += " and tcp.f_userinfo_code = '" + this.$refs.paged.$refs.cri.model.f_userinfo_code + "'"
659
+ }
660
+ }
661
+ if (this.$refs.paged.$refs.cri.model.f_checker_name) {
662
+ if (this.$refs.paged.$refs.cri.model.f_checker_name.toString().trim()) {
663
+ condition += " and tcp.f_checker_name = '" + this.$refs.paged.$refs.cri.model.f_checker_name + "'"
664
+ }
665
+ }
666
+ if (this.$refs.paged.$refs.cri.model.f_address) {
667
+ if (this.$refs.paged.$refs.cri.model.f_address.toString().trim()) {
668
+ condition += " and tcp.f_address like '%" + this.$refs.paged.$refs.cri.model.f_address + "%'"
669
+ }
670
+ }
671
+ if (this.$refs.paged.$refs.cri.model.f_start_date) {
672
+ if (this.$refs.paged.$refs.cri.model.f_start_date.toString().trim()) {
673
+ condition += " and tdl.f_create_time > '" + this.$refs.paged.$refs.cri.model.f_start_date + "'"
674
+ }
675
+ }
676
+ if (this.$refs.paged.$refs.cri.model.f_end_date) {
677
+ if (this.$refs.paged.$refs.cri.model.f_end_date.toString().trim()) {
678
+ condition += " and tdl.f_create_time < '" + this.$refs.paged.$refs.cri.model.f_end_date + "'"
679
+ }
680
+ }
681
+ if (this.$refs.paged.$refs.cri.model.f_user_type) {
682
+ if (this.$refs.paged.$refs.cri.model.f_user_type.toString().trim()) {
683
+ condition += " and f_user_type = '" + this.$refs.paged.$refs.cri.model.f_user_type + "'"
684
+ }
685
+ }
686
+ if (this.$refs.paged.$refs.cri.model.f_item_name) {
687
+ if (this.$refs.paged.$refs.cri.model.f_item_name.toString().trim()) {
688
+ condition += " and f_item_name = '" + this.$refs.paged.$refs.cri.model.f_item_name + "'"
689
+ }
690
+ }
691
+
692
+ //tag
693
+ this.model.search(condition)
694
+ },
695
+
696
+ hidden() {
697
+ this.criteriaShow = !this.criteriaShow
698
+ }
699
+ }
700
+ }
701
+ </script>