safecheck-client 3.0.30-82 → 3.0.30-83

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.
@@ -5,38 +5,33 @@
5
5
  <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
6
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
7
  <div class="row">
8
- <div class="form-group col-sm-2">
8
+ <div class="form-group col-sm-2" >
9
9
  <label class="font_normal_body">客户编号</label>
10
10
  <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
11
  style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
12
  </div>
13
- <div class="form-group col-sm-2">
13
+ <div class="form-group col-sm-2" >
14
14
  <label class="font_normal_body">客户名称</label>
15
15
  <input type="text" class="input_search" v-model="model.f_user_name"
16
16
  style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
17
  </div>
18
- <div class="form-group col-sm-2">
18
+ <div class="form-group col-sm-2" >
19
19
  <label class="font_normal_body">客户电话</label>
20
20
  <input type="text" class="input_search" v-model="model.f_user_phone"
21
21
  style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
22
  </div>
23
- <div class="form-group col-sm-2">
23
+ <div class="form-group col-sm-2" >
24
24
  <label class="font_normal_body">小&emsp;&emsp;区</label>
25
25
  <input type="text" class="input_search" v-model="model.f_residential_area"
26
26
  style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
27
27
  </div>
28
28
  <div class="form-group col-sm-4" style="display: flex; gap: 15px">
29
29
  <export-excel-safe :data="$parent.$parent.searchData"
30
- :field="$parent.$parent.excelHeaders"
31
- progress="safeGetExportProgress"
32
- sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails"
33
- template-name='安检隐患明细'></export-excel-safe>
34
- <button class="button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">
35
- 隐藏
36
- </button>
37
- <button class="button_search" @click="$parent.$parent.toRepair"
38
- v-if="$parent.$parent.canToRepair == '是'">转维修
39
- </button>
30
+ :field="$parent.$parent.excelHeaders"
31
+ progress="safeGetExportProgress"
32
+ sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细'></export-excel-safe>
33
+ <button class="button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
34
+ <button class="button_search" @click="$parent.$parent.toRepair" v-if="$parent.$parent.canToRepair == '是'">转维修</button>
40
35
  <button class="button_search" @click="search()">查询</button>
41
36
  <div class="button_spacing"
42
37
  :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
@@ -45,19 +40,19 @@
45
40
 
46
41
  </div>
47
42
  <div class="row">
48
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
49
- <role-selector-safe
50
- role-name="安检员"
51
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
52
- @re-res="$parent.$parent.getRes"
53
- :value.sync="model.f_checker_id"
54
- v-model="model.f_checker_id"
55
- :value-multiple="true"
56
- :value-close="false"
57
- condition="f_checker_name in {}">
58
- </role-selector-safe>
59
- </div>
60
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
43
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
44
+ <role-selector-safe
45
+ role-name="安检员"
46
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
47
+ @re-res="$parent.$parent.getRes"
48
+ :value.sync="model.f_checker_id"
49
+ v-model="model.f_checker_id"
50
+ :value-multiple="true"
51
+ :value-close="false"
52
+ condition="f_checker_name in {}">
53
+ </role-selector-safe>
54
+ </div>
55
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
61
56
  <label class="font_normal_body">检&ensp;查&ensp;项</label>
62
57
  <v-select :value.sync="model.f_device_type"
63
58
  v-model="model.f_device_type"
@@ -70,18 +65,18 @@
70
65
  <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
71
66
  <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
72
67
  </div>
73
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
74
- <label class="font_normal_body">隐患原因</label>
68
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
69
+ <label class="font_normal_body">隐患名称</label>
75
70
  <v-select :value.sync="model.f_item_name"
76
71
  v-model='model.f_item_name'
77
72
  style="width: 60%"
78
73
  class="select_list select"
79
74
  :options='$parent.$parent.DefectConfigs'
80
- placeholder='隐患原因'
75
+ placeholder='隐患名称'
81
76
  :multiple="true"
82
77
  condition="f_item_name in {}"></v-select>
83
78
  </div>
84
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
79
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
85
80
  <label class="font_normal_body">安检起始</label>
86
81
  <datepicker
87
82
  class="select_list select"
@@ -94,7 +89,7 @@
94
89
  condition="f_offsite_time > ='{} 00:00:00'">
95
90
  </datepicker>
96
91
  </div>
97
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
92
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
98
93
  <label class="font_normal_body">安检结束</label>
99
94
  <datepicker
100
95
  class="select_list select"
@@ -107,7 +102,7 @@
107
102
  condition="f_offsite_time <= '{} 23:59:59'">
108
103
  </datepicker>
109
104
  </div>
110
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
105
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
111
106
  <label class="font_normal_body">用户类型</label>
112
107
  <v-select :value.sync="model.f_check_type" v-model='model.f_check_type'
113
108
  :value-single="true" style="width: 60%"
@@ -116,7 +111,7 @@
116
111
  close-on-select
117
112
  condition="f_check_type = '{}'"></v-select>
118
113
  </div>
119
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
114
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
120
115
  <label class="font_normal_body">处理方式</label>
121
116
  <v-select :value.sync="model.f_deal_dispose"
122
117
  v-model='model.f_deal_dispose'
@@ -126,12 +121,12 @@
126
121
  :multiple="true"
127
122
  condition="f_deal_dispose in {}"></v-select>
128
123
  </div>
129
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
124
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
130
125
  <label class="font_normal_body">详细地址</label>
131
126
  <input type="text" class="input_search" v-model="model.f_address"
132
127
  style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
133
128
  </div>
134
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
129
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
135
130
  <label class="font_normal_body">隐患状态</label>
136
131
  <v-select :value.sync="model.f_is_repaired"
137
132
  v-model='model.f_is_repaired'
@@ -141,7 +136,7 @@
141
136
  :multiple="true"
142
137
  condition="f_is_repaired in {}"></v-select>
143
138
  </div>
144
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
139
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
145
140
  <label class="font_normal_body">处理人</label>
146
141
  <input type="text" class="input_search" v-model="model.f_repairman"
147
142
  style="width: 60%" placeholder="处理人" condition="f_repairman = '{}'">
@@ -168,7 +163,7 @@
168
163
  condition="f_repair_date<= '{}'">
169
164
  </datepicker>
170
165
  </div>
171
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
166
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
172
167
  <label class="font_normal_body">开户时间</label>
173
168
  <datepicker
174
169
  :value.sync="model.f_check_gasstart"
@@ -179,7 +174,7 @@
179
174
  condition="f_gas_date > ='{} 00:00:00'">
180
175
  </datepicker>
181
176
  </div>
182
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
177
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
183
178
  <label class="font_normal_body">开户时间</label>
184
179
  <datepicker
185
180
  :value.sync="model.f_check_gasend"
@@ -190,6 +185,34 @@
190
185
  condition="f_gas_date <= '{} 23:59:59'">
191
186
  </datepicker>
192
187
  </div>
188
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
189
+ <label class="font_normal_body">用户标签</label>
190
+ <v-select class="select_list select"
191
+ placeholder='请选择' style="width: 60%"
192
+ :value.sync="model.f_user_tags"
193
+ v-model="model.f_user_tags"
194
+ :options='$parent.$parent.userTags'
195
+ filer-key="name"
196
+ close-on-select clear-button
197
+ condition="f_user_tags='{}'"
198
+ :value-single="true">
199
+ </v-select>
200
+ </div>
201
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow" >
202
+ <label class="font_normal_body">用气类型</label>
203
+ <v-select class="select_list select"
204
+ placeholder='请选择' style="width: 60%"
205
+ :value.sync="model.f_user_gas_type"
206
+ v-model="model.f_user_gas_type"
207
+ :options='$parent.$parent.userGasType'
208
+ filer-key="name"
209
+ close-on-select clear-button
210
+ condition="f_user_gas_type='{}'"
211
+ :value-single="true">
212
+ </v-select>
213
+ </div>
214
+
215
+
193
216
  </div>
194
217
  <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
195
218
  <div slot="modal-header" class="modal-header">
@@ -210,9 +233,7 @@
210
233
  <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
211
234
  <template partial='head'>
212
235
  <tr>
213
- <th v-if="$parent.$parent.$parent.canToRepair=='是'">
214
- <nobr>选择</nobr>
215
- </th>
236
+ <th v-if="$parent.$parent.$parent.canToRepair=='是'"><nobr>选择</nobr></th>
216
237
  <th>
217
238
  <nobr>检查项</nobr>
218
239
  </th>
@@ -268,28 +289,24 @@
268
289
  </tr>
269
290
  </template>
270
291
  <template partial='body'>
271
- <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input
272
- type="checkbox"
273
- v-if="['用户自行整改', '现场已处理', '维修已处理', '转维修'].indexOf(row.f_is_repaired) == -1"
274
- @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)"
275
- @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
276
- <td style="text-align: center">{{ row.f_device_type }}</td>
277
- <td style="text-align: center">{{ row.f_item_name }}/{{ row.f_item_value }}</td>
278
- <td style="text-align: center">{{ row.f_defect_level }}</td>
279
- <td style="text-align: center">{{ row.f_userinfo_code }}</td>
280
- <td style="text-align: center">{{ row.f_user_name }}</td>
281
- <td style="text-align: center">{{ row.f_user_phone }}</td>
282
- <td style="text-align: center">{{ row.f_residential_area }}</td>
283
- <td style="text-align: center">{{ row.f_address }}</td>
284
- <td style="text-align: center">{{ row.f_offsite_time }}</td>
285
- <td style="text-align: center">{{ row.f_checker_name }}</td>
286
- <td style="text-align: center">{{ row.f_is_repaired }}</td>
287
- <td style="text-align: center">{{ row.f_repairman }}</td>
288
- <td style="text-align: center">{{ row.f_deal_dispose }}</td>
289
- <td style="text-align: center">{{ row.f_repair_date }}</td>
290
- <td style="text-align: center">{{ row.f_service_id }}</td>
291
- <td style="text-align: center">{{ row.f_handlingtype }}</td>
292
- <td style="text-align: center">{{ row.f_order_man }}</td>
292
+ <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="['用户自行整改', '现场已处理', '维修已处理', '转维修'].indexOf(row.f_is_repaired) == -1" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
293
+ <td style="text-align: center">{{row.f_device_type}}</td>
294
+ <td style="text-align: center">{{row.f_item_name}}/{{row.f_item_value}}</td>
295
+ <td style="text-align: center">{{row.f_defect_level}}</td>
296
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
297
+ <td style="text-align: center">{{row.f_user_name}}</td>
298
+ <td style="text-align: center">{{row.f_user_phone}}</td>
299
+ <td style="text-align: center">{{row.f_residential_area}}</td>
300
+ <td style="text-align: center">{{row.f_address}}</td>
301
+ <td style="text-align: center">{{row.f_offsite_time}}</td>
302
+ <td style="text-align: center">{{row.f_checker_name}}</td>
303
+ <td style="text-align: center">{{row.f_is_repaired}}</td>
304
+ <td style="text-align: center">{{row.f_repairman}}</td>
305
+ <td style="text-align: center">{{row.f_deal_dispose}}</td>
306
+ <td style="text-align: center">{{row.f_repair_date}}</td>
307
+ <td style="text-align: center">{{row.f_service_id}}</td>
308
+ <td style="text-align: center">{{row.f_handlingtype}}</td>
309
+ <td style="text-align: center">{{row.f_order_man}}</td>
293
310
  </template>
294
311
  </data-grid>
295
312
  </criteria-paged>
@@ -305,12 +322,11 @@
305
322
  <div>
306
323
 
307
324
  </div>
308
- <!-- <div v-for="(index, item) in dangerGroup">-->
325
+ <!-- <div v-for="(index, item) in dangerGroup">-->
309
326
 
310
- <!-- </div>-->
327
+ <!-- </div>-->
311
328
  <div class="row" style="margin-top: 10px">
312
- <label class="control-label font text-left"
313
- style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
329
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
314
330
  <div class="col-xs-8 col-md-8">
315
331
  <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
316
332
  :options='dispatchTypeOptions' placeholder='派发类型'
@@ -340,8 +356,7 @@
340
356
  </div>
341
357
  </div>
342
358
  <div class="row" style="margin-top: 10px">
343
- <label class="control-label font text-left"
344
- style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
359
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
345
360
  <div class="col-xs-8 col-md-8">
346
361
  <v-select :value.sync="selectData.f_repairtype" style="width:60%"
347
362
  class="select select_list"
@@ -352,7 +367,7 @@
352
367
  </div>
353
368
  </div>
354
369
  <div class="row" style="margin-top: 10px">
355
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
370
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
356
371
  <div class="col-xs-8 col-md-8">
357
372
  <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
358
373
  </div>
@@ -384,525 +399,492 @@
384
399
  </template>
385
400
 
386
401
  <script>
387
- import {PagedList} from 'vue-client'
388
- import Vue from 'vue'
389
- import co from 'co'
390
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
391
-
392
-
393
- //获取json配置文件
394
- let asyncReady = async function (self) {
395
- // 获取配置信息
396
- try {
397
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
398
- Vue.config = res.data
399
- self.getDeviceTypes(res.data)
400
- } catch (error) {
401
- // 忽略704,文件找不到异常R
402
- if (error.status !== 704) {
403
- throw error
402
+ import {PagedList} from 'vue-client'
403
+ import Vue from 'vue'
404
+ import co from 'co'
405
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
406
+ //获取json配置文件
407
+ let asyncReady = async function (self) {
408
+ // 获取配置信息
409
+ try {
410
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
411
+ Vue.config = res.data
412
+ self.getDefectInfoConfig(res.data)
413
+ } catch (error) {
414
+ // 忽略704,文件找不到异常R
415
+ if (error.status !== 704) {
416
+ throw error
417
+ }
404
418
  }
405
419
  }
406
- }
407
420
 
408
- let select = function* (self) {
409
- let http = new HttpResetClass()
410
- let getGasman = yield http.load('POST', '/rs/search', {
411
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
412
- userid: self.$login.f.id
413
- }, {resolveMsg: null, rejectMsg: null})
414
- ////tag
415
- self.checkersid.push({label: '全部', value: ''})
416
- getGasman.data.forEach((checker) => {
417
- self.checkersid.push({label: checker.name, value: checker.id})
418
- })
419
- }
420
-
421
- export default {
422
- title: '隐患明细查看',
423
- data() {
424
- let model = new PagedList('rs/sql/defectDetails', 20, {
425
- f_filialeid: 'this.f_filialeid'
421
+ let select = function* (self) {
422
+ let http = new HttpResetClass()
423
+ let getGasman = yield http.load('POST', '/rs/search', {
424
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
425
+ userid: self.$login.f.id
426
+ }, {resolveMsg: null, rejectMsg: null})
427
+ ////tag
428
+ self.checkersid.push({label: '全部', value: ''})
429
+ getGasman.data.forEach((checker) => {
430
+ self.checkersid.push({label: checker.name, value: checker.id})
426
431
  })
427
- model.f_plan_id = ''
428
- model.f_approved = ''
429
- model.f_entry = ''
430
- model.f_no_checkplan = ''
431
- model.f_check_type = ''
432
- model.f_filialeid = `('${this.$login.f.orgid}')`
433
- return {
434
- audioshow: false,
432
+ }
435
433
 
436
- model: model,
437
- deal_dispose: [{label: '全部', value: ''}, {label: '报修', value: '报修'}, {
438
- label: '现场整改',
439
- value: '现场整改'
440
- }, {label: '自行处理', value: '自行处理'}, {label: '未处理', value: '未处理'}],
441
- repairStateOptions: this.getSafeParam('隐患状态'),
442
- //searchData:searchData,
443
- excelHeaders: {
444
- 'f_device_type': '检查项',
445
- 'f_item_name': '隐患名称',
446
- 'f_userinfo_code': '客户编号',
447
- 'f_user_name': '客户姓名',
448
- 'f_user_phone': '客户电话',
449
- 'f_residential_area': '小区',
450
- 'f_address': '客户地址',
451
- 'f_offsite_time': '安检时间',
452
- 'f_checker_name': '安检员',
453
- 'f_deal_dispose': '处理方式',
454
- 'f_is_repaired': '隐患状态',
455
- 'f_repairman': '处理人',
456
- 'f_repair_date': '处理时间'
457
- },
458
- fun: this.$login.f,
459
- checkersid: [],
460
- safetype: this.getSafeParam('安检类型'),
461
- criteriaShow: false,
462
- showModal: false,
463
- f_approval_states: this.getSafeParam('安检单审核状态'),
464
- f_entry_status: this.getSafeParam('安检状态'),
465
- f_checkplans: this.getSafeParam('有无计划'),
466
- showcheckmsg: false,
467
- checkInfo: {},
468
- orderDefault: "'f_offsite_time'",
469
- orderFields: {
470
- f_offsite_time: 'no'
471
- },
472
- sliceArea: [],
473
- cbc: [],
474
- DefectConfig: '',
475
- DefectConfigs: [{label: '全部', value: ''}, {
476
- label: '金额异常差值',
477
- value: '金额异常差值'
478
- }, {label: '气量异常差值', value: '气量异常差值'}],
479
- device_types: [{label: '全部', value: ''}],
480
- f_check_type: [{label: '全部', value: ''}, {label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
481
- showModal2: false,
482
- selectData: {
483
- dispatchType: '',
484
- f_repairman: '',
485
- f_remarks: '',
486
- f_repairtype: ''
487
- },
488
- repairers: [],
489
- repairTypeOptions: this.$appdata.getParam('报修类型'),
490
- dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'}, {label: '派发给维修员', value: '派发给维修员'}],
491
- dangerGroups: [],
492
- showModal3: false,
493
- progressbarWidth: '0',
494
- canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
495
- checkes: []
496
- }
497
- },
498
- computed: {
499
- searchData() {
500
- return {condition: this.model.condition}
501
- }
502
- },
503
- methods: {
504
- isChecked(row) {
505
- return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
506
- },
507
- setCheckes(row) {
508
- let index = this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
509
- if (index < 0) {
510
- this.checkes.push(row)
511
- } else {
512
- this.checkes.splice(index, 1)
434
+ export default {
435
+ title: '隐患明细查看',
436
+ data() {
437
+ let model = new PagedList('rs/sql/defectDetails', 20,{
438
+ f_filialeid: 'this.f_filialeid'
439
+ })
440
+ model.f_plan_id = ''
441
+ model.f_approved = ''
442
+ model.f_entry = ''
443
+ model.f_no_checkplan = ''
444
+ model.f_check_type=''
445
+ model.f_filialeid = `('${this.$login.f.orgid}')`
446
+ return {
447
+ audioshow:false,
448
+ userTags:[{label: '全部', value: ''},...this.$appdata.getParam('安检用户标签')],
449
+ userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('安检用户用气类型')],
450
+ model: model,
451
+ deal_dispose:[{label:'全部',value:''},{label:'报修',value:'报修'},{label:'现场整改',value:'现场整改'},{label:'自行处理',value:'自行处理'},{label:'未处理',value:'未处理'}],
452
+ repairStateOptions: this.getSafeParam('隐患状态'),
453
+ //searchData:searchData,
454
+ excelHeaders: {
455
+ 'f_device_type': '检查项',
456
+ 'f_item_name': '隐患名称',
457
+ 'f_userinfo_code': '客户编号',
458
+ 'f_user_name': '客户姓名',
459
+ 'f_user_phone': '客户电话',
460
+ 'f_residential_area': '小区',
461
+ 'f_address': '客户地址',
462
+ 'f_offsite_time': '安检时间',
463
+ 'f_checker_name': '安检员',
464
+ 'f_deal_dispose': '处理方式',
465
+ 'f_is_repaired': '隐患状态',
466
+ 'f_repairman':'处理人',
467
+ 'f_repair_date':'处理时间'
468
+ },
469
+ fun: this.$login.f,
470
+ checkersid: [],
471
+ safetype: this.getSafeParam('安检类型'),
472
+ criteriaShow: false,
473
+ showModal: false,
474
+ f_approval_states: this.getSafeParam('安检单审核状态'),
475
+ f_entry_status:this.getSafeParam('安检状态'),
476
+ f_checkplans: this.getSafeParam('有无计划'),
477
+ showcheckmsg: false,
478
+ checkInfo: {},
479
+ orderDefault: "'f_offsite_time'",
480
+ orderFields: {
481
+ f_offsite_time: 'no'
482
+ },
483
+ sliceArea: [],
484
+ cbc:[],
485
+ DefectConfig:'' ,
486
+ DefectConfigs:[{label:'全部',value:''},{label: '金额异常差值', value: '金额异常差值'},{label: '气量异常差值', value: '气量异常差值'}],
487
+ device_types:[{label:'全部',value:''}],
488
+ f_check_type:[{label:'全部',value:''},{label:'民用',value:'民用'},{label:'非民用',value:'非民用'}],
489
+ showModal2: false,
490
+ selectData:{
491
+ dispatchType:'',
492
+ f_repairman:'',
493
+ f_remarks:'',
494
+ f_repairtype:''
495
+ },
496
+ repairers: [],
497
+ repairTypeOptions:this.$appdata.getParam('报修类型'),
498
+ dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
499
+ dangerGroups: [],
500
+ showModal3: false,
501
+ progressbarWidth:'0',
502
+ canToRepair: this.$appdata.getSingleValue('隐患明细转维修'),
503
+ checkes: []
513
504
  }
514
- console.log('this.checkes=', JSON.stringify(this.checkes))
515
505
  },
516
- toRepair() {
517
- console.log('this.checkes=', JSON.stringify(this.checkes))
518
- if (this.checkes.length == 0) {
519
- return this.$showMessage('请先选择需要转维修的隐患!')
520
- }
521
-
522
- const dangerGroups = []
523
- for (const danger of this.checkes) {
524
- let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
525
- if (i == -1) {
526
- dangerGroups.push({
527
- f_userinfo_code: danger.f_userinfo_code,
528
- dangers: []
529
- })
530
- i = dangerGroups.length - 1
531
- }
532
- dangerGroups[i].dangers.push(danger)
506
+ computed :{
507
+ searchData() {
508
+ return {condition: this.model.condition}
533
509
  }
534
- this.dangerGroups = dangerGroups
535
- console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
536
- this.showModal2 = true
537
510
  },
538
- getEmp() {
539
- let val = {
540
- source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))',
541
- userid: `${this.$login.f.id}`
542
- }
543
- let http = new HttpResetClass()
544
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
545
- if (res.data.length == 0) {
546
- this.repairers = []
547
- return
511
+ methods: {
512
+ isChecked(row) {
513
+ return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
514
+ },
515
+ setCheckes(row) {
516
+ let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
517
+ if(index<0){
518
+ this.checkes.push(row)
519
+ }else{
520
+ this.checkes.splice(index,1)
548
521
  }
549
- let str = ``
550
- res.data.forEach((item, idx, arr) => {
551
- if (idx + 1 == arr.length) {
552
- str += item.id
553
- } else {
554
- str += item.id + `','`
522
+ console.log('this.checkes=', JSON.stringify(this.checkes))
523
+ },
524
+ toRepair(){
525
+ console.log('this.checkes=', JSON.stringify(this.checkes))
526
+ if(this.checkes.length==0){
527
+ return this.$showMessage('请先选择需要转维修的隐患!')
528
+ }
529
+
530
+ const dangerGroups = []
531
+ for (const danger of this.checkes) {
532
+ let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
533
+ if (i == -1){
534
+ dangerGroups.push({
535
+ f_userinfo_code: danger.f_userinfo_code,
536
+ dangers: []
537
+ })
538
+ i = dangerGroups.length - 1
555
539
  }
556
- })
557
- let http1 = new HttpResetClass()
558
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
559
- data: {
560
- items: 'id,f_user_telephone',
561
- tablename: 't_user',
562
- condition: `id in ('${str}')`,
563
- orderitem: 'id'
540
+ dangerGroups[i].dangers.push(danger)
541
+ }
542
+ this.dangerGroups = dangerGroups
543
+ console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
544
+ this.showModal2=true
545
+ },
546
+ getEmp() {
547
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
548
+ let http = new HttpResetClass()
549
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
550
+ if (res.data.length == 0){
551
+ this.repairers= []
552
+ return
564
553
  }
565
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
566
- res.data.forEach((user) => {
567
- try {
568
- ress.data.forEach((tel, tidx, arr) => {
569
- if (user.id == tel.id) {
570
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
571
- ress.data.splice(tidx, 1)
572
- }
573
- })
574
- } catch (e) {
554
+ let str=``
555
+ res.data.forEach((item,idx,arr) => {
556
+ if(idx+1==arr.length){
557
+ str += item.id
558
+ }else{
559
+ str += item.id+`','`
575
560
  }
576
561
  })
577
- }).catch(error => {
578
- res.data.forEach((user) => {
579
- this.repairers.push({label: user.name, value: user.name})
562
+ let http1 = new HttpResetClass()
563
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
564
+ data: {
565
+ items: 'id,f_user_telephone',
566
+ tablename: 't_user',
567
+ condition: `id in ('${str}')`,
568
+ orderitem: 'id'
569
+ }
570
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
571
+ res.data.forEach((user)=>{
572
+ try {
573
+ ress.data.forEach((tel,tidx,arr)=>{
574
+ if(user.id==tel.id){
575
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
576
+ ress.data.splice(tidx,1)
577
+ }
578
+ })
579
+ }catch (e) {
580
+ }
581
+ })
582
+ }).catch(error=>{
583
+ res.data.forEach((user)=>{
584
+ this.repairers.push({label: user.name, value: user.name})
585
+ })
580
586
  })
581
- })
582
587
 
583
- })
584
- },
585
- getSiteRes(obj) {
586
- console.log('siteRes ---> ')
587
- console.log(obj)
588
- if (obj.resids[0]) {
589
- this.selectData.f_meetunit = obj.res.join('.')
590
- this.selectData.f_reciever = obj.resids.join('.')
591
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
592
- } else {
593
- this.selectData.f_meetunit = ''
594
- this.selectData.f_reciever = ''
595
- this.selectData.f_outlets = ''
596
- }
597
- },
598
- cancel1() {
599
- this.showModal2 = false
600
- this.selectData = {
601
- dispatchType: '',
602
- f_repairman: '',
603
- f_remarks: '',
604
- f_repairtype: ''
605
- }
606
- },
607
- async rectification() {
608
- if (this.selectData.dispatchType) {
609
- if (this.selectData.dispatchType == '派发给站点') {
610
- if (!this.selectData.f_reciever) {
611
- this.$showMessage('请选择部门!')
612
- return
613
- }
614
- } else {
615
- if (!this.selectData.f_repairman) {
616
- this.$showMessage('请选择维修员!')
617
- return
588
+ })
589
+ },
590
+ getSiteRes(obj) {
591
+ console.log('siteRes ---> ')
592
+ console.log(obj)
593
+ if(obj.resids[0]){
594
+ this.selectData.f_meetunit = obj.res.join('.')
595
+ this.selectData.f_reciever = obj.resids.join('.')
596
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
597
+ }else {
598
+ this.selectData.f_meetunit = ''
599
+ this.selectData.f_reciever = ''
600
+ this.selectData.f_outlets = ''
601
+ }
602
+ },
603
+ cancel1(){
604
+ this.showModal2=false
605
+ this.selectData={
606
+ dispatchType:'',
607
+ f_repairman:'',
608
+ f_remarks:'',
609
+ f_repairtype:''
610
+ }
611
+ },
612
+ async rectification(){
613
+ if(this.selectData.dispatchType){
614
+ if(this.selectData.dispatchType=='派发给站点'){
615
+ if(!this.selectData.f_reciever){
616
+ this.$showMessage('请选择部门!')
617
+ return
618
+ }
619
+ }else{
620
+ if(!this.selectData.f_repairman){
621
+ this.$showMessage('请选择维修员!')
622
+ return
623
+ }
618
624
  }
625
+ }else {
626
+ this.$showMessage('请选择派发类型!')
627
+ return
619
628
  }
620
- } else {
621
- this.$showMessage('请选择派发类型!')
622
- return
623
- }
624
629
 
625
- if (!this.selectData.f_repairtype) {
626
- this.$showMessage('请选择报修类型!')
627
- return
628
- }
629
- this.showModal3 = true
630
- let act = {}
631
- let toRepair = ''
632
- let successCount = 0
633
- if (this.selectData.dispatchType == '派发给站点') {
634
- act = {
635
- f_meetunit: this.selectData.f_meetunit,
636
- f_reciever: this.selectData.f_reciever,
637
- f_service_acitivity_type: '派单'
630
+ if(!this.selectData.f_repairtype){
631
+ this.$showMessage('请选择报修类型!')
632
+ return
638
633
  }
639
- toRepair = null
640
- } else {
641
- console.log('派发给维修员---------' + this.selectData.f_repairman)
642
- act = {f_meetunit: '', f_reciever: this.selectData.f_repairman, f_service_acitivity_type: '派单'}
643
- toRepair = '一级派单'
644
- }
645
- let rep = {
646
- loginUser: {
647
- name: this.$login.f.name,
648
- ename: this.$login.f.ename
649
- },
650
- f_meetunit: this.$login.f.deps,
651
- f_attendant: this.$login.f.name,
652
- f_outlets: this.$login.f.deps,
653
- f_remarks: this.selectData.f_remarks,
654
- f_repairtype: this.selectData.f_repairtype,
655
- toRepair: toRepair,
656
- activity: act
657
- }
658
- for (let i = 0; i < this.dangerGroups.length; i++) {
659
- let defectIdStr = ''
660
- const defectIds = []
661
- for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
662
- defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
634
+ this.showModal3=true
635
+ let act={}
636
+ let toRepair=''
637
+ let successCount=0
638
+ if(this.selectData.dispatchType=='派发给站点'){
639
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
640
+ toRepair=null
641
+ }else{
642
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
643
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
644
+ toRepair='一级派单'
663
645
  }
664
- defectIdStr = `(${defectIds.join(',')})`
665
- const data = {
666
- id: this.dangerGroups[i].dangers[0].f_paper_id,
667
- repData: rep,
668
- source: 'pc',
669
- defectIdStr: defectIdStr
646
+ let rep={
647
+ loginUser: {
648
+ name: this.$login.f.name,
649
+ ename: this.$login.f.ename
650
+ },
651
+ f_meetunit: this.$login.f.deps,
652
+ f_attendant: this.$login.f.name,
653
+ f_outlets: this.$login.f.deps,
654
+ f_remarks: this.selectData.f_remarks,
655
+ f_repairtype: this.selectData.f_repairtype,
656
+ toRepair: toRepair,
657
+ activity:act
670
658
  }
671
- console.log('data=', JSON.stringify(data))
672
- try {
673
- let result = await new HttpResetClass().load('POST', '/rs/logic/phoneUploadRectification', data, {
674
- resolveMsg: null,
675
- rejectMsg: null
676
- })
677
- if (result.data.code == 200) {
678
- successCount += result.data.successcon
679
- this.progressbarWidth = Math.ceil((i + 1) * 100 / (this.dangerGroups.length))
659
+ for(let i=0; i<this.dangerGroups.length; i++){
660
+ let defectIdStr = ''
661
+ const defectIds = []
662
+ for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
663
+ defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
680
664
  }
681
- } catch (e) {
682
- this.showModal3 = false
683
- this.$showMessage('网络异常,请稍后再试!')
684
- return
685
- }
686
- }
687
- this.showModal3 = false
688
- this.cancel1()
689
- this.$showMessage('本次转维修成功' + successCount + '单')
690
- },
691
- getDeviceTypes(val) {
692
- try {
693
- if (val.safecheck.DevicesSetConfig != undefined) {
694
- this.DefectConfig = val.safecheck.DevicesConfig
695
- for (var Key1 in this.DefectConfig) {
696
- this.device_types.push({label: Key1, value: Key1})
665
+ defectIdStr = `(${defectIds.join(',')})`
666
+ const data = {
667
+ id:this.dangerGroups[i].dangers[0].f_paper_id,
668
+ repData:rep,
669
+ source:'pc',
670
+ defectIdStr: defectIdStr
671
+ }
672
+ console.log('data=', JSON.stringify(data))
673
+ try {
674
+ let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
675
+ if (result.data.code==200) {
676
+ successCount += result.data.successcon
677
+ this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
678
+ }
679
+ }catch (e) {
680
+ this.showModal3=false
681
+ this.$showMessage('网络异常,请稍后再试!')
682
+ return
697
683
  }
698
684
  }
699
- } catch (e) {
700
- }
701
- },
702
- async getDefectInfoConfig() {
703
- var resData = await new HttpResetClass().load('POST', '/rs/sql/tel_singleTable_GroupBy', {data: {
704
- items: 'f_item_name',
705
- tablename: 't_devices_items',
706
- condition: '1=1',
707
- groupitem: 'f_item_name',
708
- }}, {
709
- warnMsg: null,
710
- resolveMsg: null
711
- })
712
- console.log(resData,12222222222222222222111111111111111111111111111111111)
713
- if (resData.data) {
714
- for (let i = 0; i < resData.data.length; i++) {
715
- this.DefectConfigs.push({label: resData.data[i].f_item_name, value: resData.data[i].f_item_name})
685
+ this.showModal3=false
686
+ this.cancel1()
687
+ this.$showMessage('本次转维修成功'+successCount+'单')
688
+ },
689
+ getDefectInfoConfig(val){
690
+ try {
691
+ if (val.safecheck.DevicesSetConfig != undefined) {
692
+ this.DefectConfig = val.safecheck.DevicesConfig
693
+ // 获取到配置项,进行遍历,获取每个隐患项
694
+ for (var Key1 in this.DefectConfig){
695
+ this.device_types.push({label:Key1,value:Key1})
696
+ for(var Key2 in this.DefectConfig[Key1].items){
697
+ this.DefectConfigs.push({label:Key2,value:Key2})
698
+ }
699
+ }
700
+ // 非民用或其他配置项加入,在进行遍历
701
+ }
702
+ }catch (e) {
703
+ //tag
716
704
  }
717
- }
718
- },
719
- showaudio() {
720
- //tag
721
- this.audioshow = !this.audioshow
722
- //tag
723
- },
724
- getmeterbook(val) {
725
- this.cbc = []
726
- this.cbc.push({
727
- label: '全部',
728
- value: ''
729
- })
730
- if (val == '') {
731
-
732
- this.cbcs.forEach(res => {
733
- this.cbc.push({
734
- label: res.f_book_name,
735
- value: res.id
736
- })
705
+ },
706
+ showaudio(){
707
+ //tag
708
+ this.audioshow=!this.audioshow
709
+ //tag
710
+ },
711
+ getmeterbook(val){
712
+ this.cbc=[]
713
+ this.cbc.push({
714
+ label:'全部',
715
+ value:''
737
716
  })
738
- } else {
739
- this.cbcs.forEach(res => {
740
- if (res.f_book_slice_area == val) {
717
+ if (val==''){
718
+
719
+ this.cbcs.forEach(res=>{
741
720
  this.cbc.push({
742
- label: res.f_book_name,
743
- value: res.id
721
+ label:res.f_book_name,
722
+ value:res.id
744
723
  })
745
- }
746
- })
747
- }
748
- },
749
- getSafeParam(val) {
750
- if (this.$appdata.getParam(val)) {
751
- return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
752
- } else {
753
- return [{label: '全部', value: ''}]
754
- }
755
-
756
- },
757
- Mreadibook(val) {
758
- ////tag
759
- ////tag
760
- this.sliceArea = []
761
- if (val) {
762
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
763
- data: {
764
- items: 'name',
765
- tablename: 't_zone',
766
- condition: `parentid in ${val}`,
767
- orderitem: 'id'
768
- }
769
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
770
- this.sliceArea.push({
771
- label: '全部',
772
- value: ''
773
724
  })
774
- res.data.forEach(ress => {
775
- this.sliceArea.push({
776
- label: ress.name,
777
- value: ress.name
778
- })
725
+ }else{
726
+ this.cbcs.forEach(res=>{
727
+ if (res.f_book_slice_area==val){
728
+ this.cbc.push({
729
+ label:res.f_book_name,
730
+ value:res.id
731
+ })
732
+ }
779
733
  })
734
+ }
735
+ },
736
+ getSafeParam(val){
737
+ if(this.$appdata.getParam(val)){
738
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
739
+ }else{
740
+ return [{label: '全部', value: ''}]
741
+ }
780
742
 
781
- })
782
- }
783
- },
784
- getAllMeterBook(val) {
785
- ////tag
786
- ////tag
787
- this.cbcs = []
788
- if (val) {
789
- new HttpResetClass().load('POST', `/rs/sql/safe_singleTable_OrderBy`, {
790
- data: {
791
- items: 'f_book_name,f_book_slice_area,id',
792
- tablename: 't_meter_book',
793
- condition: `f_filiale_id in ${val}`,
794
- orderitem: 'id'
795
- }
796
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
797
- res.data.forEach(ress => {
798
- this.cbcs.push({
799
- id: ress.id,
800
- f_book_name: ress.f_book_name,
801
- f_book_slice_area: ress.f_book_slice_area
743
+ },
744
+ Mreadibook(val){
745
+ ////tag
746
+ ////tag
747
+ this.sliceArea=[]
748
+ if (val){
749
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
750
+ items: 'name',
751
+ tablename: 't_zone',
752
+ condition: `parentid in ${val}`,
753
+ orderitem: 'id'
754
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
755
+ this.sliceArea.push({
756
+ label:'全部',
757
+ value:''
802
758
  })
759
+ res.data.forEach(ress=>{
760
+ this.sliceArea.push({
761
+ label:ress.name,
762
+ value:ress.name
763
+ })
764
+ })
765
+
803
766
  })
804
- this.cbc = []
805
- this.cbc.push({
806
- label: '全部',
807
- value: ''
808
- })
809
- this.cbcs.forEach(res => {
767
+ }
768
+ },
769
+ getAllMeterBook(val){
770
+ ////tag
771
+ ////tag
772
+ this.cbcs=[]
773
+ if (val){
774
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
775
+ items: 'f_book_name,f_book_slice_area,id',
776
+ tablename: 't_meter_book',
777
+ condition: `f_filiale_id in ${val}`,
778
+ orderitem: 'id'
779
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
780
+ res.data.forEach(ress=>{
781
+ this.cbcs.push({
782
+ id:ress.id,
783
+ f_book_name:ress.f_book_name,
784
+ f_book_slice_area:ress.f_book_slice_area
785
+ })
786
+ })
787
+ this.cbc=[]
810
788
  this.cbc.push({
811
- label: res.f_book_name,
812
- value: res.id
789
+ label:'全部',
790
+ value:''
791
+ })
792
+ this.cbcs.forEach(res=>{
793
+ this.cbc.push({
794
+ label:res.f_book_name,
795
+ value:res.id
796
+ })
813
797
  })
814
798
  })
815
- })
816
- }
817
- },
818
- getRes(obj) {
819
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
820
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
821
- this.Mreadibook(this.model.f_filialeid)
822
- this.getAllMeterBook(this.model.f_filialeid)
823
- //this.$refs.paged.$refs.criteria.search()
824
- },
799
+ }
800
+ },
801
+ getRes(obj) {
802
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
803
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
804
+ this.Mreadibook(this.model.f_filialeid)
805
+ this.getAllMeterBook(this.model.f_filialeid)
806
+ //this.$refs.paged.$refs.criteria.search()
807
+ },
825
808
 
826
- change(row) {
827
- // Vue.$login = {jwt: row.f_checker_id}
828
- asyncReady(this).then(() => {
829
- ////tag)
830
- row.f_upload_state = '已传'
831
- this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
832
- }).catch(
833
- (respanse) => {
834
- alert('获取配置文件失败')
835
- })
836
- },
837
- readConfig() {
838
- let gen = asyncReady(this)
839
- return co(gen)
840
- },
841
- showChooser() {
842
- this.showModal = true
843
- },
844
- hidden() {
845
- this.criteriaShow = !this.criteriaShow
846
- },
847
- refresh() {
848
- this.$refs.paged.$refs.criteria.search()
849
- },
850
- ok() {
851
- this.showModal = false
852
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
853
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
854
- this.model.f_check_plan = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
855
- }
856
- },
857
- cancel() {
858
- this.showModal = false
859
- this.model.f_check_plan = {f_plan_name: '', id: ''}
860
- this.model.f_plan_id = ''
861
- },
862
- print(row) {
863
- this.showcheckmsg = true
864
- this.checkInfo = row
865
- },
809
+ change(row) {
810
+ // Vue.$login = {jwt: row.f_checker_id}
811
+ asyncReady(this).then(() => {
812
+ ////tag)
813
+ row.f_upload_state = '已传'
814
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
815
+ }).catch(
816
+ (respanse) => {
817
+ alert('获取配置文件失败')
818
+ })
819
+ },
820
+ readConfig() {
821
+ let gen = asyncReady(this)
822
+ return co(gen)
823
+ },
824
+ showChooser() {
825
+ this.showModal = true
826
+ },
827
+ hidden() {
828
+ this.criteriaShow = !this.criteriaShow
829
+ },
830
+ refresh() {
831
+ this.$refs.paged.$refs.criteria.search()
832
+ },
833
+ ok() {
834
+ this.showModal = false
835
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
836
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
837
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
838
+ }
839
+ },
840
+ cancel() {
841
+ this.showModal = false
842
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
843
+ this.model.f_plan_id=''
844
+ },
845
+ print(row) {
846
+ this.showcheckmsg = true
847
+ this.checkInfo = row
848
+ },
866
849
 
867
- sort(field, rule) {
868
- // 将所有排序方式设为不排序,实现相互排斥
869
- for (let key in this.orderFields) {
870
- if (key === field) {
871
- this.orderFields[key] = rule
850
+ sort(field, rule) {
851
+ // 将所有排序方式设为不排序,实现相互排斥
852
+ for (let key in this.orderFields) {
853
+ if (key === field) {
854
+ this.orderFields[key] = rule
855
+ } else {
856
+ this.orderFields[key] = 'no'
857
+ }
858
+ }
859
+ // 如果新规则不排序,还原为默认排序
860
+ if (rule === 'no') {
861
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
872
862
  } else {
873
- this.orderFields[key] = 'no'
863
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
874
864
  }
865
+ this.search()
866
+ },
867
+ search() {
868
+ this.$refs.paged.$refs.criteria.search()
869
+ },
870
+ selfSearch(args) {
871
+ ////tag
872
+ args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
873
+ this.model.search(args.condition, args.model, args.condValue)
875
874
  }
876
- // 如果新规则不排序,还原为默认排序
877
- if (rule === 'no') {
878
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
879
- } else {
880
- this.model.paramSource.orderitem = `'${field} ${rule}'`
881
- }
882
- this.search()
883
875
  },
884
- search() {
885
- this.$refs.paged.$refs.criteria.search()
886
- },
887
- selfSearch(args) {
888
- ////tag
889
- args.condition += ` and f_filialeid in ${this.model.f_filialeid}`
890
- this.model.search(args.condition, args.model, args.condValue)
891
- }
892
- },
893
876
 
894
- ready() {
895
- this.getEmp()
896
- this.readConfig()
897
- ////tag
898
- this.function = this.f
899
- ////tag
877
+ ready() {
878
+ this.getEmp()
879
+ this.readConfig()
880
+ ////tag
881
+ this.function = this.f
882
+ ////tag
900
883
 
901
- let gen = select(this)
902
- //this.pianqu()
903
- this.Mreadibook(`('${this.$login.f.orgid}')`)
904
- co(gen)
905
- this.getDefectInfoConfig()
884
+ let gen = select(this)
885
+ //this.pianqu()
886
+ this.Mreadibook(`('${this.$login.f.orgid}')`)
887
+ co(gen)
888
+ }
906
889
  }
907
- }
908
890
  </script>