apply-clients 3.4.65 → 3.4.67

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.
@@ -0,0 +1,455 @@
1
+ <template>
2
+ <div class="form-horizontal select-overspread p-10">
3
+ <validator name="v1" v-if="selectdata.f_process_id !== null">
4
+ <div class="col-xs-12 form-group app-input auto">
5
+ <label class="control-label-justify">用户编号</label>
6
+ <div class="col-xs-8">
7
+ <input class="" style="width: 100%" type="input"
8
+ v-model="selectdata.f_userinfo_id"
9
+ :value="selectdata.f_userinfo_id"
10
+ :readonly="true"
11
+ />
12
+ </div>
13
+ </div>
14
+ <div class="col-xs-12 form-group app-input auto">
15
+ <label class="control-label-justify">用户名</label>
16
+ <div class="col-xs-8">
17
+ <input class="" style="width: 100%" type="input"
18
+ v-model="selectdata.f_user_name"
19
+ :value="selectdata.f_user_name"
20
+ :readonly="true"
21
+ />
22
+ </div>
23
+ </div>
24
+ <div class="col-xs-12 form-group app-input auto">
25
+ <label class="control-label-justify">电话</label>
26
+ <div class="col-xs-8">
27
+ <input class="" style="width: 100%" type="input"
28
+ v-model="selectdata.f_user_phone"
29
+ :value="selectdata.f_user_phone"
30
+ :readonly="true"
31
+ />
32
+ </div>
33
+ </div>
34
+ <div class="col-xs-12 form-group app-input auto">
35
+ <label class="control-label-justify">地址</label>
36
+ <div class="col-xs-8">
37
+ <input class="" style="width: 100%" type="input"
38
+ v-model="selectdata.f_address + selectdata.f_address_detail"
39
+ :readonly="true"
40
+ />
41
+ </div>
42
+ </div>
43
+ <div class="col-xs-12 form-group app-input auto">
44
+ <label class="control-label-justify">派单时间</label>
45
+ <div class="col-xs-8">
46
+ <input class="" style="width: 100%" type="input"
47
+ v-model="selectdata.f_date"
48
+ :value="selectdata.f_date"
49
+ :readonly="true"
50
+ />
51
+ </div>
52
+ </div>
53
+ <div class="col-xs-12 form-group app-input auto">
54
+ <label class="control-label-justify">表号</label>
55
+ <div class="col-xs-8">
56
+ <input class="" style="width: 100%" type="input"
57
+ v-model="selectdata.f_meternumber"
58
+ :value="selectdata.f_meternumber"
59
+ :readonly="true"
60
+ />
61
+ </div>
62
+ </div>
63
+ <div class="col-xs-12 form-group app-input auto">
64
+ <label class="control-label-justify">气表分类</label>
65
+ <div class="col-xs-8">
66
+ <input class="" style="width: 100%" type="input"
67
+ v-model="selectdata.f_meter_classify"
68
+ :value="selectdata.f_meter_classify"
69
+ :readonly="true"
70
+ />
71
+ </div>
72
+ </div>
73
+ <div class="col-xs-12 form-group app-input auto">
74
+ <label class="control-label-justify">气表品牌</label>
75
+ <div class="col-xs-8">
76
+ <input class="" style="width: 100%" type="input"
77
+ v-model="selectdata.f_meter_brand"
78
+ :value="selectdata.f_meter_brand"
79
+ :readonly="true"
80
+ />
81
+ </div>
82
+ </div>
83
+ <div class="col-xs-12 form-group app-input auto">
84
+ <label class="control-label-justify">气表型号</label>
85
+ <div class="col-xs-8">
86
+ <input class="" style="width: 100%" type="input"
87
+ v-model="selectdata.f_meter_style"
88
+ :value="selectdata.f_meter_style"
89
+ :readonly="true"
90
+ />
91
+ </div>
92
+ </div>
93
+ <div class="col-xs-12 form-group app-input auto">
94
+ <label class="control-label-justify">有无隐患</label>
95
+ <div class="col-xs-8">
96
+ <input-select
97
+ class="select select_list"
98
+ :value.sync="model.f_ignition_trouble"
99
+ v-model="model.f_ignition_trouble"
100
+ :options="ignition_trouble"
101
+ :valueSingle="true"></input-select>
102
+ </div>
103
+ </div>
104
+ <div class="col-xs-12 form-group app-input auto">
105
+ <label class="control-label-justify">点火备注</label>
106
+ <div class="col-xs-8">
107
+ <input class="" style="width: 100%" type="input"
108
+ v-model="model.f_ignition_remarks"
109
+ :value="model.f_ignition_remarks"
110
+ :readonly="false"
111
+ />
112
+ </div>
113
+ </div>
114
+ <div class="col-xs-12 auto">
115
+ <accordion one-at-a-time="true">
116
+ <panel header="设备查看" :is-open="false" type="primary">
117
+ <app-devices-management :selectdata="selectdata" :mark = 1 ></app-devices-management>
118
+ </panel>
119
+ <panel header="拍照" :is-open="false" type="primary">
120
+ <app-take-pic
121
+ :blobid="selectdata.f_blobid"
122
+ :defname="selectdata.defname"
123
+ :isdelete="true"
124
+ :istakepic="true"
125
+ :istype="true">
126
+
127
+ </app-take-pic>
128
+ </panel>
129
+ </accordion>
130
+ </div>
131
+ <div class="col-xs-12 form-group auto" v-if="selectdata.f_meter_classify === '物联网表'">
132
+ <div class="col-xs-5">
133
+ <button style="width: 100%" class="btn btn-success" @click.prevent="openModal('退出强制状态')">退出强制状态</button>
134
+ </div>
135
+ <div class="col-xs-5 col-xs-offset-2">
136
+ <button style="width: 100%" class="btn btn-danger" @click.prevent="openModal('关阀')">强制关阀</button>
137
+ </div>
138
+ </div>
139
+ <div class="col-xs-12 auto">
140
+ <accordion one-at-a-time="true">
141
+ <panel header="用户签字" :is-open="false" type="primary">
142
+ <survey-user-sign
143
+ :title="'用户签字'"
144
+ :selectdata="selectdata">
145
+ </survey-user-sign>
146
+ </panel>
147
+ </accordion>
148
+ </div>
149
+ <div class="col-xs-12 form-group auto">
150
+ <button style="width: 100%" class="btn btn-warning" :disabled="!$v1.valid" @click.prevent="saveApplyVentilate">保存</button>
151
+ <button v-if="model.f_ignition_trouble === '有隐患'" style="width: 100%" class="btn btn-danger" :disabled="!$v1.valid" @click.prevent="cleanTrouble">消除隐患</button>
152
+ <button style="width: 100%" class="btn btn-success" :disabled="!$v1.valid" @click.prevent="applyVentilate">提交</button>
153
+ </div>
154
+ </validator>
155
+ </div>
156
+
157
+ <validator name="v">
158
+ <modal v-if="showModal" :show.sync="showModal" v-ref:modal :large="true" :backdrop="false">
159
+ <header slot="modal-header" class="modal-header">
160
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
161
+ <h4 class="modal-title">{{type}}操作</h4>
162
+ </header>
163
+ <article slot="modal-body" class="modal-body clearfix">
164
+ <div class="form-group row vertical-center">
165
+ <div class="col-xs-12" v-if="type !== '关阀'" :class="[$v.reason.required ? 'apply-has-error' : '']">
166
+ <input
167
+ type="checkbox"
168
+ class=""
169
+ :value.sync="boxReason"
170
+ v-model="boxReason"
171
+ :value="boxReason"
172
+ @change="changeAllChecked()"
173
+ ></input>{{ reasonOptions[0].label }}
174
+ </div>
175
+ <div class="col-xs-12" :class="[$v.reason.required ? 'apply-has-error' : '']">
176
+ <textarea rows="2" style="width: 100%;height: 100%"
177
+ :placeholder="type+'操作原因'" v-validate:reason = "['required']"
178
+ v-model="reason" :value="reason"
179
+ ></textarea>
180
+ </div>
181
+ </div>
182
+ </article>
183
+ <footer slot="modal-footer" class="modal-footer">
184
+ <button type="button" class="btn btn-primary" @click="onOffValve" :disabled="!$v.valid">确认</button>
185
+ </footer>
186
+ </modal>
187
+ </validator>
188
+ </template>
189
+ <script>
190
+ import {HttpResetClass, PagedList} from 'vue-client'
191
+ import Vue from 'vue'
192
+ import {isEmpty} from '../../Util'
193
+
194
+ export default {
195
+ title: '通气点火',
196
+ props: ['selectdata'],
197
+ data () {
198
+ return {
199
+ showModal: false,
200
+ type: null,
201
+ reason: null,
202
+ boxReason: null,
203
+ reasonOptions:[{label: '具备通气条件', value: '具备通气条件'}],
204
+ model: {
205
+ f_ignition_trouble: '',
206
+ f_ignition_remarks: ''
207
+ },
208
+ ignition_trouble:[{label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}]
209
+ }
210
+ },
211
+ ready () {
212
+ this.search()
213
+ },
214
+ methods: {
215
+ changeAllChecked(){
216
+ if (this.boxReason){
217
+ this.reason = this.reasonOptions[0].value
218
+ }else {
219
+ this.reason = ''
220
+ }
221
+ },
222
+ async applyVentilate () {
223
+ if (this.model.f_ignition_trouble === '有隐患'){
224
+ this.$showMessage("隐患未消除,无法提交")
225
+ return
226
+ }
227
+ let http = new HttpResetClass()
228
+ let data = {
229
+ selectdata: this.selectdata,
230
+ user: Vue.user
231
+ }
232
+
233
+ let res = await http.load(
234
+ 'POST',
235
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/applyVentilate`,
236
+ {data: data},
237
+ {resolveMsg: null, rejectMsg: `操作失败!!!`}
238
+ )
239
+
240
+ // 返回上层
241
+ this.$dispatch('confirm')
242
+ },
243
+ async saveApplyVentilate () {
244
+ let http = new HttpResetClass()
245
+ let data = {
246
+ selectdata: this.selectdata,
247
+ user: Vue.user,
248
+ model:this.model
249
+ }
250
+
251
+ let res = await http.load(
252
+ 'POST',
253
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveApplyVentilate`,
254
+ {data: data},
255
+ {resolveMsg: null, rejectMsg: `操作失败!!!`}
256
+ )
257
+
258
+ // 刷新
259
+ this.$dispatch('confirm')
260
+ },
261
+ async cleanTrouble () {
262
+ let http = new HttpResetClass()
263
+ let data = {
264
+ selectdata: this.selectdata,
265
+ model:this.model
266
+ }
267
+
268
+ let res = await http.load(
269
+ 'POST',
270
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/cleanTrouble`,
271
+ {data: data},
272
+ {resolveMsg: null, rejectMsg: `清除隐患操作失败!!!`}
273
+ )
274
+
275
+ // 返回上层
276
+ this.$dispatch('confirm')
277
+ },
278
+ async search(){
279
+ console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>", this.selectdata.f_process_id + 'cs' + this.selectdata.defname + 'cs' + this.selectdata.f_apply_type)
280
+ let data = {
281
+ tablename: 't_ignition_record',
282
+ condition: `f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
283
+ }
284
+ let http = new HttpResetClass()
285
+ let res = await http.load(
286
+ 'POST',
287
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applySingleTable`,
288
+ {data: data},
289
+ {resolveMsg: null, rejectMsg: '点火记录查询失败!!!'}
290
+ )
291
+ if (res.data.length > 0) {
292
+ this.model.f_ignition_trouble = res.data[0].f_ignition_trouble
293
+ this.model.f_ignition_remarks = res.data[0].f_ignition_remarks
294
+ }
295
+ },
296
+ async onOffValve () {
297
+ let http = new HttpResetClass()
298
+ let data = null
299
+ let res = null
300
+
301
+ if (this.type !== '退出强制状态') {
302
+ data = {
303
+ condition: `f_meternumber = '${this.selectdata.f_meternumber}'`,
304
+ contentData: {
305
+ isOpen: this.type === '开阀' ? 1 : 0
306
+ },
307
+ inputtor: Vue.user.name,
308
+ instructTitle: this.type,
309
+ instructType: '阀门控制',
310
+ meterBrandName: this.selectdata.f_meter_brand
311
+ }
312
+ res = await http.load(
313
+ 'POST',
314
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveInstruct`,
315
+ {data: data},
316
+ {resolveMsg: null, rejectMsg: `${this.type}失败!!!`}
317
+ )
318
+ }
319
+
320
+ data = {
321
+ f_user_id: this.selectdata.f_user_id,
322
+ f_userinfo_id: this.selectdata.f_userinfo_id,
323
+ record: {
324
+ f_filiale: Vue.user.f_fengongsi,
325
+ f_instruct_meta_data: this.type === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
326
+ f_instruct_title: this.type === '退出强制状态' ? '退出强制阀控' : '进入强制阀控',
327
+ f_instruct_type: '阀门控制',
328
+ f_meternumber: this.selectdata.f_meternumber,
329
+ f_operator: Vue.user.name,
330
+ f_outlets: this.selectdata.f_outlets,
331
+ f_reason: this.reason,
332
+ f_user_id: this.selectdata.f_user_id,
333
+ f_userinfo_id: this.selectdata.f_userinfo_id
334
+ },
335
+ state: this.type === '退出强制状态' ? 0 : 1
336
+ }
337
+
338
+ res = await http.load(
339
+ 'POST',
340
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/updateNetWorkValve`,
341
+ {data: data},
342
+ {resolveMsg: '执行成功!!!', rejectMsg: `执行失败!!!`}
343
+ )
344
+
345
+ this.closeModal()
346
+ },
347
+ openModal (type) {
348
+ this.type = type
349
+ this.showModal = true
350
+ },
351
+ closeModal () {
352
+ this.showModal = false
353
+ this.type = null
354
+
355
+ this.reason = null
356
+ }
357
+ },
358
+ events: {
359
+ },
360
+ watch: {
361
+ },
362
+ computed: {
363
+ }
364
+ }
365
+ </script>
366
+ <style scoped>
367
+ .apply-has-error {
368
+ border-bottom: 1px solid #a94442;
369
+ }
370
+ .control-label-justify {
371
+ width: 30%;
372
+ text-align: justify;
373
+ text-align-last: justify;
374
+ font-family: PingFang-SC-Bold;
375
+ float: left;
376
+ }
377
+ textarea {
378
+ padding: 8px 10px;
379
+ outline: none;
380
+ margin: 0px;
381
+ background: #FFF;
382
+ border: 1px solid #ccc;
383
+ }
384
+ textarea[readonly]{
385
+ color: #ACA899!important;
386
+ background: #FFFFFF;
387
+ border: none;
388
+ outline: none;
389
+ }
390
+ textarea:disabled{
391
+ color: #ACA899!important;
392
+ background: #FFFFFF;
393
+ border: none;
394
+ outline: none;
395
+ }
396
+ .button_spacing{margin: 0px 0px 0px 10px;}
397
+ </style>
398
+ <style lang="less">
399
+ .apply-has-error {
400
+ border-bottom: 1px solid #a94442;
401
+ }
402
+ .app-input {
403
+ label {
404
+ float: left;
405
+ }
406
+ .select {
407
+ button {
408
+ border: none;
409
+ outline: none;
410
+ text-align: left;
411
+ .btn-placeholder {
412
+ color: #ACA899
413
+ }
414
+ }
415
+ }
416
+ .datepicker {
417
+ .form-control:focus {
418
+ border: none!important;
419
+ outline: none!important;
420
+ -webkit-box-shadow: none;
421
+ box-shadow: none;
422
+ }
423
+ }
424
+ textarea {
425
+ padding: 8px 10px;
426
+ border: none;
427
+ outline: none;
428
+ margin: 0px;
429
+ }
430
+ input[readonly]{
431
+ color: #ACA899!important;
432
+ background: #FFFFFF;
433
+ border: none;
434
+ outline: none;
435
+ }
436
+ input:disabled{
437
+ color: #ACA899!important;
438
+ background: #FFFFFF;
439
+ border: none;
440
+ outline: none;
441
+ }
442
+ textarea[readonly]{
443
+ color: #ACA899!important;
444
+ background: #FFFFFF;
445
+ border: none;
446
+ outline: none;
447
+ }
448
+ textarea:disabled{
449
+ color: #ACA899!important;
450
+ background: #FFFFFF;
451
+ border: none;
452
+ outline: none;
453
+ }
454
+ }
455
+ </style>
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <div :class="showData ? 'top' : 'auto'" v-if="!showtotal">
5
+ <ignition-list v-ref:query :show-data="showData"></ignition-list>
6
+ </div>
7
+ <div v-if="showtotal">
8
+ <div class="top">
9
+ <ignition-list-manage :show-data="selectdata" :node-snapshot="true"></ignition-list-manage>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </div>
14
+
15
+ </template>
16
+ <script>
17
+ import Vue from 'vue'
18
+ import {HttpResetClass} from 'vue-client'
19
+ export default {
20
+ title: '点火派单列表',
21
+ data () {
22
+ return {
23
+ showtotal: false, // 控制详细信息显示
24
+ showData: true,
25
+ selectdata: {},
26
+ xmlname: '' // 配置文件名称
27
+ }
28
+ },
29
+ created () {
30
+ },
31
+ methods: {
32
+ // 获取页面配置json文件
33
+ async loadName () {
34
+ let data = {
35
+ workname: this.selectdata.processname
36
+ }
37
+
38
+ let res = await this.$resetpost(
39
+ 'rs/logic/ApplyGetConfigs',
40
+ {data: data},
41
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
42
+ )
43
+
44
+ Vue.prototype.$workflow_vue = res.data
45
+ }
46
+ },
47
+ events: {
48
+ 'onMessage' (data) {
49
+ console.log('接收消息')
50
+ console.log(data)
51
+ if (data.type === 'apply-task') {
52
+ this.$refs.queryuser.$refs.cp.$refs.cri.search()
53
+ }
54
+ },
55
+ async 'apply' (val) {
56
+ this.selectdata = val
57
+ this.showtotal = false
58
+
59
+ // 获取配置文件
60
+ await this.loadName()
61
+
62
+ this.$refs.query.$refs.cp.pager = false
63
+ this.showData = false
64
+
65
+ this.showtotal = true
66
+ },
67
+ 'search' () {
68
+ // 关闭详细
69
+ this.showtotal = false
70
+ // 显示列表数据
71
+ this.showData = true
72
+ // 显示分页
73
+ this.$refs.query.$refs.cp.pager = true
74
+ // 调用查询
75
+ this.$refs.query.$refs.cp.$refs.cri.search()
76
+ },
77
+ 'loadPage' () {
78
+ // 关闭详细
79
+ this.showtotal = false
80
+ // 显示列表数据
81
+ this.showData = true
82
+ // 显示分页
83
+ this.$refs.query.$refs.cp.pager = true
84
+ // 调用查询
85
+ this.$refs.query.$refs.cp.loadPage(this.$refs.query.model.pageIndex)
86
+ }
87
+ },
88
+
89
+ watch: {
90
+ }
91
+ }
92
+ </script>