apply-clients 3.4.64 → 3.4.65

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.
Files changed (97) hide show
  1. package/build/dev-server.js +2 -2
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/package.json +1 -1
  53. package/src/App.vue +21 -21
  54. package/src/components/android/AppSign.vue +154 -154
  55. package/src/components/android/AppTakePic.vue +143 -143
  56. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  57. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  58. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  59. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  60. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  61. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  62. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  63. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  64. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  65. package/src/components/product/Process/ExplorationSelect.vue +482 -495
  66. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  67. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  68. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  69. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  70. package/src/components/product/Process/Service/ServiceControl.vue +1901 -1901
  71. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  72. package/src/components/product/Process/ShowBackReason.vue +33 -33
  73. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  74. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  75. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  76. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  77. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  78. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  79. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  80. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  81. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  82. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  83. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  84. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  85. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  86. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  87. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  88. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  89. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  90. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  91. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  93. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  94. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  95. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
  96. package/yarn-error.log +9976 -0
  97. package/dist.7z +0 -0
@@ -1,445 +1,445 @@
1
- <template>
2
- <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
- </template>
4
- <script>
5
- import {HttpResetClass} from 'vue-client'
6
- import Vue from 'vue'
7
- import {isEmpty} from "../../../Util";
8
- export default {
9
- title: '报建功能业务控制层',
10
- props: ['selectdata'],
11
- data () {
12
- return {
13
- show_data: null, // 给通用页面显示的数据
14
- showview: false, // 控制通用页面
15
- config: {}
16
- }
17
- },
18
- ready () {
19
- this.refurbish()
20
- },
21
- methods: {
22
- async refurbish () {
23
- // fields 字段填充值
24
- for (const item of this.selectdata.fields) {
25
- if (!item.value) {
26
- item.value = null
27
- }
28
-
29
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
30
- if (item.eval) {
31
- item.value = eval(item.default)
32
- } else {
33
- item.value = item.default
34
- }
35
- }
36
-
37
- if (this.selectdata[item.field]) {
38
- // 将json字符串格式化赋值给value
39
- if (String(this.selectdata[item.field]).startsWith("{")) {
40
- item.value = JSON.parse(this.selectdata[item.field])
41
- } else {
42
- item.value = this.selectdata[item.field]
43
- }
44
- }
45
- if (this.selectdata[item.field] === 0) {
46
- item.value = 0
47
- }
48
-
49
- // datepicker
50
- if (item.type === 'datepicker' && !item.value && item.default) {
51
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
52
- }
53
-
54
- // 如果配置类型为select,优先从参数列表获取options
55
- if (item.type === 'select' || item.type === 'checkbox') {
56
- if (item.param) {
57
- let temp = this.$appdata.getParam(item.label)
58
-
59
- if (temp && temp.length > 0) {
60
- item.options = temp
61
- }
62
-
63
- if (item.paramLabel) {
64
- temp = this.$appdata.getParam(item.paramLabel)
65
- if (temp && temp.length > 0) {
66
- item.options = temp
67
- }
68
- }
69
- }
70
-
71
- if (item.ready) {
72
- item.options = await this[item.ready]()
73
- }
74
- }
75
-
76
-
77
- if (item.type === 'checkbox') {
78
- if (this.selectdata[item.field]) {
79
- item.value = JSON.parse(this.selectdata[item.field])
80
- } else {
81
- item.value = []
82
- }
83
- }
84
- }
85
-
86
- // 控制组件
87
- if (this.selectdata.components) {
88
- this.selectdata.components.forEach(item => {
89
- item.mark = 2
90
- })
91
- }
92
-
93
- // 初始化onetomany
94
- if (this.selectdata.onetomany) {
95
- for (const item of this.selectdata.onetomany) {
96
- let res = null
97
- if (item.queryEvent) {
98
- res = this[item.queryEvent]()
99
- } else {
100
- let data = {
101
- tablename: item.tables[0],
102
- condition: `f_process_id='${this.selectdata.f_process_id}'`
103
- }
104
- res = await this.$resetpost(
105
- 'rs/sql/apply_singleTable',
106
- {data: data},
107
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
108
- )
109
- }
110
-
111
- item.rows = res.data
112
-
113
- // 初始化onetomany中的fields
114
- for (const field of item.fields) {
115
- if (!field.value) {
116
- if (field.value !== 0) {
117
- field.value = null
118
- }
119
- }
120
-
121
- if (field.default || field.default === 0) {
122
- field.value = field.default
123
- }
124
-
125
- // datepicker
126
- if (field.type === 'datepicker' && !field.value && field.default) {
127
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
128
- }
129
-
130
- if (field.type === 'select') {
131
- let temp = this.$appdata.getParam(field.label)
132
-
133
- if (temp && temp.length > 0) {
134
- field.options = temp
135
- }
136
-
137
- if (field.paramLabel) {
138
- temp = this.$appdata.getParam(field.paramLabel)
139
- if (temp && temp.length > 0) {
140
- item.options = temp
141
- }
142
- }
143
- }
144
- }
145
- }
146
- }
147
-
148
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
149
- let temp = JSON.parse(JSON.stringify(this.selectdata))
150
-
151
- this.show_data = temp
152
- this.$nextTick(() => {
153
- this.showview = true
154
- })
155
- },
156
- getLableValue(label) {
157
- for (const item of this.show_data.fields) {
158
- if (item.label === label && item.type !== 'number') {
159
- return item.value || ''
160
- }
161
- if (item.label === label && item.type === 'number') {
162
- return item.value || 0
163
- }
164
- }
165
- },
166
- getLableOptions(label) {
167
- for (const item of this.show_data.fields) {
168
- if (item.label === label) {
169
- return item.options
170
- }
171
- }
172
- },
173
- setLabelValue(label, value) {
174
- for (const item of this.show_data.fields) {
175
- if (item.label === label) {
176
- item.value = value
177
- this.show_data[item.field] = value
178
- }
179
- }
180
- },
181
- setLabelOptions(label, options) {
182
- for (const item of this.show_data.fields) {
183
- if (item.label === label) {
184
- item.options = options
185
- }
186
- }
187
- },
188
- showLabels(...labels) {
189
- for (const item of this.show_data.fields) {
190
- if (labels.includes(item.label)) {
191
- item.hidden = false
192
- }
193
- }
194
- },
195
- hideLabels(...labels) {
196
- for (const item of this.show_data.fields) {
197
- if (labels.includes(item.label)) {
198
- item.hidden = true
199
- }
200
- }
201
- },
202
- requiredLabels(...labels) {
203
- for (const item of this.show_data.fields) {
204
- if (labels.includes(item.label)) {
205
- item.required = true
206
- }
207
- }
208
- },
209
- electiveLabels(...labels) {
210
- for (const item of this.show_data.fields) {
211
- if (labels.includes(item.label)) {
212
- item.required = false
213
- }
214
- }
215
- },
216
- readonlyLabels(...labels) {
217
- for (const item of this.show_data.fields) {
218
- if (labels.includes(item.label)) {
219
- item.readonly = true
220
- item.disabled = true
221
- }
222
- }
223
- },
224
- readwriteLabels(...labels) {
225
- for (const item of this.show_data.fields) {
226
- if (labels.includes(item.label)) {
227
- item.readonly = false
228
- item.disabled = false
229
- }
230
- }
231
- }
232
- },
233
- events: {
234
- // 信息修改初始化
235
- 'modifyInfoReadyEvent' () {
236
- this.$getConfig(this, 'UserAddress')
237
-
238
- let f_address_type = this.show_data.f_address_type
239
-
240
- for (const item of this.show_data.fields) {
241
- if (f_address_type === '民用市区') {
242
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
243
- item.hidden = false
244
- item.required = true
245
- }
246
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
247
- item.hidden = false
248
- item.required = false
249
- }
250
- if (item.label === '地址') {
251
- item.readonly = true
252
- }
253
- }
254
- if (f_address_type === '民用乡镇') {
255
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
256
- item.hidden = false
257
- item.required = true
258
- }
259
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
260
- item.hidden = false
261
- item.required = false
262
- }
263
- if (item.label === '楼层') {
264
- item.hidden = true
265
- item.required = false
266
- }
267
- if (item.label === '地址') {
268
- item.readonly = true
269
- }
270
- }
271
- if (f_address_type === '特殊地址') {
272
- if (item.label === '区/县' || item.label === '街道/乡镇') {
273
- item.hidden = false
274
- item.required = true
275
- }
276
- if (item.label === '集收单位') {
277
- item.hidden = false
278
- item.required = false
279
- }
280
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
281
- item.hidden = true
282
- item.required = false
283
- }
284
- if (item.label === '地址') {
285
- item.readonly = false
286
- }
287
- }
288
- }
289
- },
290
- // 信息修改
291
- async 'modifyInfo' () {
292
- let res = await this.$resetpost(
293
- `rs/logic/modifyUserInfo`,
294
- this.show_data,
295
- {resolveMsg: null, rejectMsg: '用户信息修改失败!!!'}
296
- )
297
- this.$dispatch('loadPage')
298
- },
299
- async 'stopApply' () {
300
-
301
- let data = {
302
- data: this.show_data,
303
- user: this.$login.f
304
- }
305
-
306
- let res = await this.$resetpost(
307
- `rs/logic/stopApply`,
308
- {data: data},
309
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
310
- )
311
-
312
- this.$dispatch('loadPage')
313
- },
314
- async 'pauseApply' () {
315
-
316
- let data = {
317
- data: this.show_data,
318
- user: this.$login.f
319
- }
320
-
321
- let res = await this.$resetpost(
322
- `rs/logic/pauseApply`,
323
- {data: data},
324
- {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
325
- )
326
-
327
- this.$dispatch('loadPage')
328
- },
329
- // 获取view层button事件
330
- async 'button' (){
331
-
332
- let res = await this.$resetpost(
333
- `rs/entity/t_apply`,
334
- this.show_data,
335
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
336
- )
337
-
338
- this.$dispatch('loadPage')
339
- },
340
- // 失去焦点出触发事件
341
- 'onchange' (index) {
342
- if (this.show_data.title === '信息修改') {
343
- if (
344
- this.show_data.fields[index].label === '区/县' ||
345
- this.show_data.fields[index].label === '街道/乡镇' ||
346
- this.show_data.fields[index].label === '集收单位' ||
347
- this.show_data.fields[index].label === '楼号/组' ||
348
- this.show_data.fields[index].label === '单元/排' ||
349
- this.show_data.fields[index].label === '楼层' ||
350
- this.show_data.fields[index].label === '门牌号'
351
- ) {
352
-
353
- let f_pcd = this.getLableValue('区/县') || ''
354
- let f_street = this.getLableValue('街道/乡镇') || ''
355
- let f_residential_area = this.getLableValue('集收单位') || ''
356
- let f_building = this.getLableValue('楼号/组') || ''
357
- let f_building_suffix = f_building ? this.config.f_building_suffix : ''
358
- let f_unit = this.getLableValue('单元/排') || ''
359
- let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
360
- let f_floor = this.getLableValue('楼层') || ''
361
- let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
362
- let f_room = this.getLableValue('门牌号') || ''
363
- let f_room_suffix = f_room ? this.config.f_room_suffix : ''
364
-
365
- let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
366
- this.setLabelValue("地址", f_address)
367
- }
368
- }
369
- },
370
- 'onblur' (index) {},
371
- 'oninput' (index) {},
372
- 'initializtionView' () {},
373
- async 'onchangeModal' (index, fieldIndex) {
374
- },
375
- async 'onblurModal' (index, fieldIndex) {
376
-
377
- },
378
- async 'oninputModal' (index, fieldIndex) {
379
-
380
- },
381
- async 'onetomanydelete' (index, rowIndex) {
382
-
383
- let http = new HttpResetClass()
384
-
385
- let res = await http.load(
386
- 'DELETE',
387
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
388
- null,
389
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
390
- )
391
-
392
- res = await this.$resetpost(
393
- 'rs/entity/t_apply',
394
- this.show_data
395
- )
396
-
397
- this.$dispatch('breakControl', this.show_data)
398
- },
399
- async 'onetomanyupdate' (index, rowIndex) {
400
- let data = this.show_data.onetomany[index].rows[rowIndex]
401
-
402
- this.show_data.onetomany[index].fields.forEach(item => {
403
- data[item.field] = item.value
404
- })
405
- let res = await this.$resetpost(
406
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
407
- data
408
- )
409
-
410
- res = await this.$resetpost(
411
- 'rs/entity/t_apply',
412
- this.show_data
413
- )
414
-
415
- this.$dispatch('breakControl', this.show_data)
416
- },
417
- async 'onetomanyadd' (index) {
418
- let data = {
419
- f_process_id : this.show_data.f_process_id,
420
- f_operator_id: this.$login.f.id,
421
- f_operator: this.$login.f.name,
422
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
423
- f_orgid: this.$login.f.orgid,
424
- f_orgname: this.$login.f.orgs
425
- }
426
- this.show_data.onetomany[index].fields.forEach(item => {
427
- data[item.field] = item.value
428
- })
429
- let res = await this.$resetpost(
430
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
431
- data
432
- )
433
-
434
- res = await this.$resetpost(
435
- 'rs/entity/t_apply',
436
- this.show_data
437
- )
438
-
439
- this.$dispatch('breakControl', this.show_data)
440
- }
441
- },
442
- watch:{
443
- }
444
- }
445
- </script>
1
+ <template>
2
+ <service-view v-ref:serviceview :data="show_data" v-if="showview"></service-view>
3
+ </template>
4
+ <script>
5
+ import {HttpResetClass} from 'vue-client'
6
+ import Vue from 'vue'
7
+ import {isEmpty} from "../../../Util";
8
+ export default {
9
+ title: '报建功能业务控制层',
10
+ props: ['selectdata'],
11
+ data () {
12
+ return {
13
+ show_data: null, // 给通用页面显示的数据
14
+ showview: false, // 控制通用页面
15
+ config: {}
16
+ }
17
+ },
18
+ ready () {
19
+ this.refurbish()
20
+ },
21
+ methods: {
22
+ async refurbish () {
23
+ // fields 字段填充值
24
+ for (const item of this.selectdata.fields) {
25
+ if (!item.value) {
26
+ item.value = null
27
+ }
28
+
29
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
30
+ if (item.eval) {
31
+ item.value = eval(item.default)
32
+ } else {
33
+ item.value = item.default
34
+ }
35
+ }
36
+
37
+ if (this.selectdata[item.field]) {
38
+ // 将json字符串格式化赋值给value
39
+ if (String(this.selectdata[item.field]).startsWith("{")) {
40
+ item.value = JSON.parse(this.selectdata[item.field])
41
+ } else {
42
+ item.value = this.selectdata[item.field]
43
+ }
44
+ }
45
+ if (this.selectdata[item.field] === 0) {
46
+ item.value = 0
47
+ }
48
+
49
+ // datepicker
50
+ if (item.type === 'datepicker' && !item.value && item.default) {
51
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
52
+ }
53
+
54
+ // 如果配置类型为select,优先从参数列表获取options
55
+ if (item.type === 'select' || item.type === 'checkbox') {
56
+ if (item.param) {
57
+ let temp = this.$appdata.getParam(item.label)
58
+
59
+ if (temp && temp.length > 0) {
60
+ item.options = temp
61
+ }
62
+
63
+ if (item.paramLabel) {
64
+ temp = this.$appdata.getParam(item.paramLabel)
65
+ if (temp && temp.length > 0) {
66
+ item.options = temp
67
+ }
68
+ }
69
+ }
70
+
71
+ if (item.ready) {
72
+ item.options = await this[item.ready]()
73
+ }
74
+ }
75
+
76
+
77
+ if (item.type === 'checkbox') {
78
+ if (this.selectdata[item.field]) {
79
+ item.value = JSON.parse(this.selectdata[item.field])
80
+ } else {
81
+ item.value = []
82
+ }
83
+ }
84
+ }
85
+
86
+ // 控制组件
87
+ if (this.selectdata.components) {
88
+ this.selectdata.components.forEach(item => {
89
+ item.mark = 2
90
+ })
91
+ }
92
+
93
+ // 初始化onetomany
94
+ if (this.selectdata.onetomany) {
95
+ for (const item of this.selectdata.onetomany) {
96
+ let res = null
97
+ if (item.queryEvent) {
98
+ res = this[item.queryEvent]()
99
+ } else {
100
+ let data = {
101
+ tablename: item.tables[0],
102
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
103
+ }
104
+ res = await this.$resetpost(
105
+ 'rs/sql/apply_singleTable',
106
+ {data: data},
107
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
108
+ )
109
+ }
110
+
111
+ item.rows = res.data
112
+
113
+ // 初始化onetomany中的fields
114
+ for (const field of item.fields) {
115
+ if (!field.value) {
116
+ if (field.value !== 0) {
117
+ field.value = null
118
+ }
119
+ }
120
+
121
+ if (field.default || field.default === 0) {
122
+ field.value = field.default
123
+ }
124
+
125
+ // datepicker
126
+ if (field.type === 'datepicker' && !field.value && field.default) {
127
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
128
+ }
129
+
130
+ if (field.type === 'select') {
131
+ let temp = this.$appdata.getParam(field.label)
132
+
133
+ if (temp && temp.length > 0) {
134
+ field.options = temp
135
+ }
136
+
137
+ if (field.paramLabel) {
138
+ temp = this.$appdata.getParam(field.paramLabel)
139
+ if (temp && temp.length > 0) {
140
+ item.options = temp
141
+ }
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+
148
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
149
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
150
+
151
+ this.show_data = temp
152
+ this.$nextTick(() => {
153
+ this.showview = true
154
+ })
155
+ },
156
+ getLableValue(label) {
157
+ for (const item of this.show_data.fields) {
158
+ if (item.label === label && item.type !== 'number') {
159
+ return item.value || ''
160
+ }
161
+ if (item.label === label && item.type === 'number') {
162
+ return item.value || 0
163
+ }
164
+ }
165
+ },
166
+ getLableOptions(label) {
167
+ for (const item of this.show_data.fields) {
168
+ if (item.label === label) {
169
+ return item.options
170
+ }
171
+ }
172
+ },
173
+ setLabelValue(label, value) {
174
+ for (const item of this.show_data.fields) {
175
+ if (item.label === label) {
176
+ item.value = value
177
+ this.show_data[item.field] = value
178
+ }
179
+ }
180
+ },
181
+ setLabelOptions(label, options) {
182
+ for (const item of this.show_data.fields) {
183
+ if (item.label === label) {
184
+ item.options = options
185
+ }
186
+ }
187
+ },
188
+ showLabels(...labels) {
189
+ for (const item of this.show_data.fields) {
190
+ if (labels.includes(item.label)) {
191
+ item.hidden = false
192
+ }
193
+ }
194
+ },
195
+ hideLabels(...labels) {
196
+ for (const item of this.show_data.fields) {
197
+ if (labels.includes(item.label)) {
198
+ item.hidden = true
199
+ }
200
+ }
201
+ },
202
+ requiredLabels(...labels) {
203
+ for (const item of this.show_data.fields) {
204
+ if (labels.includes(item.label)) {
205
+ item.required = true
206
+ }
207
+ }
208
+ },
209
+ electiveLabels(...labels) {
210
+ for (const item of this.show_data.fields) {
211
+ if (labels.includes(item.label)) {
212
+ item.required = false
213
+ }
214
+ }
215
+ },
216
+ readonlyLabels(...labels) {
217
+ for (const item of this.show_data.fields) {
218
+ if (labels.includes(item.label)) {
219
+ item.readonly = true
220
+ item.disabled = true
221
+ }
222
+ }
223
+ },
224
+ readwriteLabels(...labels) {
225
+ for (const item of this.show_data.fields) {
226
+ if (labels.includes(item.label)) {
227
+ item.readonly = false
228
+ item.disabled = false
229
+ }
230
+ }
231
+ }
232
+ },
233
+ events: {
234
+ // 信息修改初始化
235
+ 'modifyInfoReadyEvent' () {
236
+ this.$getConfig(this, 'UserAddress')
237
+
238
+ let f_address_type = this.show_data.f_address_type
239
+
240
+ for (const item of this.show_data.fields) {
241
+ if (f_address_type === '民用市区') {
242
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
243
+ item.hidden = false
244
+ item.required = true
245
+ }
246
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
247
+ item.hidden = false
248
+ item.required = false
249
+ }
250
+ if (item.label === '地址') {
251
+ item.readonly = true
252
+ }
253
+ }
254
+ if (f_address_type === '民用乡镇') {
255
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
256
+ item.hidden = false
257
+ item.required = true
258
+ }
259
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
260
+ item.hidden = false
261
+ item.required = false
262
+ }
263
+ if (item.label === '楼层') {
264
+ item.hidden = true
265
+ item.required = false
266
+ }
267
+ if (item.label === '地址') {
268
+ item.readonly = true
269
+ }
270
+ }
271
+ if (f_address_type === '特殊地址') {
272
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
273
+ item.hidden = false
274
+ item.required = true
275
+ }
276
+ if (item.label === '集收单位') {
277
+ item.hidden = false
278
+ item.required = false
279
+ }
280
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
281
+ item.hidden = true
282
+ item.required = false
283
+ }
284
+ if (item.label === '地址') {
285
+ item.readonly = false
286
+ }
287
+ }
288
+ }
289
+ },
290
+ // 信息修改
291
+ async 'modifyInfo' () {
292
+ let res = await this.$resetpost(
293
+ `rs/logic/modifyUserInfo`,
294
+ this.show_data,
295
+ {resolveMsg: null, rejectMsg: '用户信息修改失败!!!'}
296
+ )
297
+ this.$dispatch('loadPage')
298
+ },
299
+ async 'stopApply' () {
300
+
301
+ let data = {
302
+ data: this.show_data,
303
+ user: this.$login.f
304
+ }
305
+
306
+ let res = await this.$resetpost(
307
+ `rs/logic/stopApply`,
308
+ {data: data},
309
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
310
+ )
311
+
312
+ this.$dispatch('loadPage')
313
+ },
314
+ async 'pauseApply' () {
315
+
316
+ let data = {
317
+ data: this.show_data,
318
+ user: this.$login.f
319
+ }
320
+
321
+ let res = await this.$resetpost(
322
+ `rs/logic/pauseApply`,
323
+ {data: data},
324
+ {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
325
+ )
326
+
327
+ this.$dispatch('loadPage')
328
+ },
329
+ // 获取view层button事件
330
+ async 'button' (){
331
+
332
+ let res = await this.$resetpost(
333
+ `rs/entity/t_apply`,
334
+ this.show_data,
335
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
336
+ )
337
+
338
+ this.$dispatch('loadPage')
339
+ },
340
+ // 失去焦点出触发事件
341
+ 'onchange' (index) {
342
+ if (this.show_data.title === '信息修改') {
343
+ if (
344
+ this.show_data.fields[index].label === '区/县' ||
345
+ this.show_data.fields[index].label === '街道/乡镇' ||
346
+ this.show_data.fields[index].label === '集收单位' ||
347
+ this.show_data.fields[index].label === '楼号/组' ||
348
+ this.show_data.fields[index].label === '单元/排' ||
349
+ this.show_data.fields[index].label === '楼层' ||
350
+ this.show_data.fields[index].label === '门牌号'
351
+ ) {
352
+
353
+ let f_pcd = this.getLableValue('区/县') || ''
354
+ let f_street = this.getLableValue('街道/乡镇') || ''
355
+ let f_residential_area = this.getLableValue('集收单位') || ''
356
+ let f_building = this.getLableValue('楼号/组') || ''
357
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
358
+ let f_unit = this.getLableValue('单元/排') || ''
359
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
360
+ let f_floor = this.getLableValue('楼层') || ''
361
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
362
+ let f_room = this.getLableValue('门牌号') || ''
363
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
364
+
365
+ let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
366
+ this.setLabelValue("地址", f_address)
367
+ }
368
+ }
369
+ },
370
+ 'onblur' (index) {},
371
+ 'oninput' (index) {},
372
+ 'initializtionView' () {},
373
+ async 'onchangeModal' (index, fieldIndex) {
374
+ },
375
+ async 'onblurModal' (index, fieldIndex) {
376
+
377
+ },
378
+ async 'oninputModal' (index, fieldIndex) {
379
+
380
+ },
381
+ async 'onetomanydelete' (index, rowIndex) {
382
+
383
+ let http = new HttpResetClass()
384
+
385
+ let res = await http.load(
386
+ 'DELETE',
387
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
388
+ null,
389
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
390
+ )
391
+
392
+ res = await this.$resetpost(
393
+ 'rs/entity/t_apply',
394
+ this.show_data
395
+ )
396
+
397
+ this.$dispatch('breakControl', this.show_data)
398
+ },
399
+ async 'onetomanyupdate' (index, rowIndex) {
400
+ let data = this.show_data.onetomany[index].rows[rowIndex]
401
+
402
+ this.show_data.onetomany[index].fields.forEach(item => {
403
+ data[item.field] = item.value
404
+ })
405
+ let res = await this.$resetpost(
406
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
407
+ data
408
+ )
409
+
410
+ res = await this.$resetpost(
411
+ 'rs/entity/t_apply',
412
+ this.show_data
413
+ )
414
+
415
+ this.$dispatch('breakControl', this.show_data)
416
+ },
417
+ async 'onetomanyadd' (index) {
418
+ let data = {
419
+ f_process_id : this.show_data.f_process_id,
420
+ f_operator_id: this.$login.f.id,
421
+ f_operator: this.$login.f.name,
422
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
423
+ f_orgid: this.$login.f.orgid,
424
+ f_orgname: this.$login.f.orgs
425
+ }
426
+ this.show_data.onetomany[index].fields.forEach(item => {
427
+ data[item.field] = item.value
428
+ })
429
+ let res = await this.$resetpost(
430
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
431
+ data
432
+ )
433
+
434
+ res = await this.$resetpost(
435
+ 'rs/entity/t_apply',
436
+ this.show_data
437
+ )
438
+
439
+ this.$dispatch('breakControl', this.show_data)
440
+ }
441
+ },
442
+ watch:{
443
+ }
444
+ }
445
+ </script>