apply-clients 3.3.217 → 3.4.2

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 (121) hide show
  1. package/android.html +23 -23
  2. package/build/css-loaders.js +34 -0
  3. package/build/dev-android.js +101 -0
  4. package/build/dev-client.js +8 -0
  5. package/build/dev-server-app.js +76 -0
  6. package/build/dev-server.js +119 -0
  7. package/build/example-server.js +80 -0
  8. package/build/release.sh +28 -0
  9. package/build/utils.js +80 -0
  10. package/build/webpack.base.conf.js +84 -0
  11. package/build/webpack.baseandroid.conf.js +84 -0
  12. package/build/webpack.dev.conf.js +39 -0
  13. package/build/webpack.devandroid.conf.js +34 -0
  14. package/build/webpack.example.conf.js +49 -0
  15. package/build/webpack.prod.conf.js +60 -0
  16. package/build/webpack.prodandroid.conf.js +60 -0
  17. package/build/webpack.test.conf.js +31 -0
  18. package/index.html +33 -33
  19. package/package.json +3 -3
  20. package/src/AndroidApp.vue +35 -30
  21. package/src/App.vue +20 -20
  22. package/src/android.js +21 -21
  23. package/src/apply.js +81 -90
  24. package/src/applyAndroid.js +32 -53
  25. package/src/components/android/AppOnetomany.vue +301 -285
  26. package/src/components/android/AppServiceView.vue +566 -570
  27. package/src/components/android/AppSign.vue +142 -142
  28. package/src/components/android/AppTakePic.vue +143 -144
  29. package/src/components/android/Process/AppExplorationUser.vue +320 -270
  30. package/src/components/android/Process/AppServiceControl.vue +757 -686
  31. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -466
  32. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  33. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  34. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  35. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -115
  36. package/src/components/android/TaskGraph.vue +125 -0
  37. package/src/components/build/Install/ExplorationUser.vue +304 -0
  38. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -0
  39. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  40. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  41. package/src/components/product/Function/InstallFunction.vue +125 -122
  42. package/src/components/product/Function/InstallInfoSelect.vue +292 -318
  43. package/src/components/product/Function/Service/FunctionServiceControl.vue +222 -254
  44. package/src/components/product/Function/StopApplyCrrdList.vue +176 -0
  45. package/src/components/product/Function/functions/ApplyRecordCancel.vue +102 -0
  46. package/src/components/product/Function/functions/StopInstall.vue +106 -0
  47. package/src/components/product/Onetomany.vue +377 -296
  48. package/src/components/product/Order/OrderApply.vue +30 -30
  49. package/src/components/product/Order/OrderApplyList.vue +78 -67
  50. package/src/components/product/Order/OrderMessage.vue +11 -87
  51. package/src/components/product/Process/ExplorationSelect.vue +410 -369
  52. package/src/components/product/Process/ExplorationUser.vue +138 -128
  53. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -504
  54. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  55. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  56. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  57. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  58. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  59. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -0
  60. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -181
  61. package/src/components/product/Process/Processes/chargeManagement.vue +639 -638
  62. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  63. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  64. package/src/components/product/Process/Service/ServiceControl.vue +1254 -883
  65. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  66. package/src/components/product/ServiceView.vue +631 -741
  67. package/src/components/product/Stop/StopApply.vue +103 -103
  68. package/src/components/product/Stop/StopApplyList.vue +269 -254
  69. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -517
  70. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -108
  71. package/src/components/product/Supervisory/SupervisoryList.vue +233 -253
  72. package/src/components/product/Supervisory/SupervisoryhCart.vue +107 -124
  73. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  74. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  75. package/src/expandcssAndroid.less +1034 -517
  76. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +731 -414
  77. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -456
  78. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -0
  79. package/src/filiale/yuchuan/android/Sign/AppSignTask.vue +182 -0
  80. package/src/{components/android/Process/Processes/AppBuildSign.vue → filiale/yuchuan/android/Sign/BuildSign.vue} +50 -47
  81. package/src/filiale/yuchuan/android/Sign/ConstructSign.vue +50 -0
  82. package/src/filiale/yuchuan/android/Sign/DesignSign.vue +50 -0
  83. package/src/filiale/yuchuan/android/Sign/SupervisorSign.vue +50 -0
  84. package/src/filiale/yuchuan/android/Task/Build/BuildTsak.vue +60 -0
  85. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -0
  86. package/src/filiale/yuchuan/android.js +14 -8
  87. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -517
  88. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  89. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +270 -231
  90. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +149 -131
  91. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +67 -0
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -0
  93. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -0
  94. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +470 -0
  95. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1074 -517
  96. package/src/filiale/yuchuan/pc.js +12 -13
  97. package/src/main.js +23 -23
  98. package/src/components/android/Function/AppFunctionServiceControl.vue +0 -329
  99. package/src/components/android/Function/AppInstallFunction.vue +0 -330
  100. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  101. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  102. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  103. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  104. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  105. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  106. package/src/components/image/dwg.jpg +0 -0
  107. package/src/components/image/yasuobao.jpg +0 -0
  108. package/src/components/product/Function/Inform.vue +0 -73
  109. package/src/components/product/Function/MarketSurvey.vue +0 -81
  110. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  111. package/src/components/product/Process/ShowBackReason.vue +0 -33
  112. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  113. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  114. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  115. package/src/components/product/VueUtils/Tree.vue +0 -330
  116. package/src/filiale/wuan/android.js +0 -0
  117. package/src/filiale/wuan/pc.js +0 -4
  118. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  119. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  120. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  121. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
@@ -1,517 +1,186 @@
1
- <template>
2
- <div class="auto clearfix">
3
- <show-back-reason :selectdata="show_data"></show-back-reason>
4
- </div>
5
- <service-view v-ref:service_show :data="show_data" v-if="showview"></service-view>
6
- </template>
7
- <script>
8
- import Vue from 'vue'
9
- import {HttpResetClass} from 'vue-client'
10
- import {isEmpty} from "../../../Util";
11
- // Date格式化
12
- Date.prototype.Format = function (fmt) {
13
- var o = {
14
- 'M+': this.getMonth() + 1, // 月份
15
- 'd+': this.getDate(), //
16
- 'H+': this.getHours(), // 小时
17
- 'm+': this.getMinutes(), //
18
- 's+': this.getSeconds(), //
19
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
20
- 'S': this.getMilliseconds() // 毫秒
21
- }
22
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
23
- for (var k in o) {
24
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
25
- }
26
- return fmt
27
- }
28
- export default {
29
- title: '报建监控控制层',
30
- props: {
31
- selectdata: {
32
- type: Object
33
- },
34
- nodeSnapshot: {
35
- type: Boolean,
36
- default: false
37
- }
38
- },
39
- data() {
40
- return {
41
- data: null, // 展示的数据
42
- json_datas: null, // json配置数据结构
43
- showview: false, // 控制显示层显示
44
- show_data: null,
45
- config: {}
46
- }
47
- },
48
- created () {
49
- this.refurbish()
50
- },
51
- methods: {
52
- // 初始化模块
53
- async refurbish() {
54
- this.json_datas = this.$workflow_vue
55
- let sum = 0
56
- let jsonData = {}
57
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
58
- this.$showMessage("网络故障,请刷新页面")
59
- return
60
- }
61
- this.json_datas.activitys.forEach(item => {
62
- if (this.selectdata.defname === item.title) {
63
- jsonData = item // 拿到当前节点的json配置信息
64
- sum++ // 节点名一样的个数
65
- }
66
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
67
- })
68
- if (sum === 0) {
69
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
70
- return
71
- }
72
- if (sum > 1) {
73
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
74
- return
75
- }
76
-
77
- this.data = null
78
- this.data = jsonData
79
- this.data = Object.assign({}, this.data, this.selectdata)
80
-
81
- // fields 字段填充值
82
- for (const item of this.data.fields) {
83
- if (this.selectdata[item.field]) {
84
- item.value = this.selectdata[item.field]
85
- }
86
- if (this.selectdata[item.field] === 0) {
87
- item.value = 0
88
- }
89
-
90
- if (item.type === 'select' || item.type === 'checkbox') {
91
- if (item.param) {
92
- let temp = this.$appdata.getParam(item.label)
93
-
94
- if (temp && temp.length > 0) {
95
- item.options = temp
96
- }
97
-
98
- if (item.paramLabel) {
99
- temp = this.$appdata.getParam(item.paramLabel)
100
- if (temp && temp.length > 0) {
101
- item.options = temp
102
- }
103
- }
104
- }
105
-
106
- if (item.ready) {
107
- item.options = await this[item.ready]()
108
- }
109
- }
110
-
111
- if (item.type === 'checkbox') {
112
- if (this.selectdata[item.field]) {
113
- item.value = JSON.parse(this.selectdata[item.field])
114
- } else {
115
- item.value = []
116
- }
117
- }
118
-
119
- item.readonly = true
120
- item.disabled = true
121
- }
122
-
123
- // 控制组件
124
- if (this.data.components) {
125
- this.data.components.forEach(item => {
126
- item.mark = 1
127
- })
128
- }
129
-
130
- // onetomany 数据获取
131
- if (this.data.onetomany) {
132
- for (const item of this.data.onetomany) {
133
- let res = null
134
- if (item.queryEvent) {
135
- res = this[item.queryEvent]()
136
- } else {
137
- let data = {
138
- tablename: item.tables[0],
139
- condition: `f_process_id='${this.selectdata.f_process_id}'`
140
- }
141
- res = await this.$resetpost(
142
- 'rs/sql/singleTable',
143
- {data: data},
144
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
145
- )
146
- }
147
-
148
- item.rows = res.data
149
-
150
- // 隐藏所有操作
151
- item.hiddenOperate = true
152
- }
153
- }
154
-
155
- // 去除button
156
- this.data.buttons = null
157
-
158
- // 完成时间和完成人,部门,分公司
159
- if (this.selectdata.state === '结束') {
160
- let http = new HttpResetClass()
161
- let res = await http.load('POST', 'rs/search', {
162
- source: 'this.getInfo()',
163
- userid: this.selectdata.userid
164
- }, {resolveMsg: null, rejectMsg: null})
165
- let user = res.data
166
- this.data.operate_date = new Date(this.selectdata.finishtime).Format('yyyy-MM-dd')
167
- this.data.operator = this.selectdata.person
168
- this.data.orgs = user.orgs
169
- this.data.parentname = user.deps
170
- }
171
-
172
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
173
- let temp = JSON.parse(JSON.stringify(this.data))
174
-
175
- this.show_data = temp
176
- this.$nextTick(() => {
177
- this.showview = true
178
- })
179
- },
180
- // 金额转大写
181
- smalltoBIG(n) {
182
- let fraction = ['角', '分'];
183
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
184
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
185
- let head = n < 0 ? '欠' : '';
186
- n = Math.abs(n);
187
-
188
- let s = '';
189
-
190
- for (var i = 0; i < fraction.length; i++) {
191
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
192
- }
193
- s = s || '整';
194
- n = Math.floor(n);
195
-
196
- for (var i = 0; i < unit[0].length && n > 0; i++) {
197
- let p = '';
198
- for (var j = 0; j < unit[1].length && n > 0; j++) {
199
- p = digit[n % 10] + unit[1][j] + p;
200
- n = Math.floor(n / 10);
201
- }
202
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
203
- }
204
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
205
- },
206
- getLableValue(label) {
207
- for (const item of this.show_data.fields) {
208
- if (item.label === label && item.type !== 'number') {
209
- return item.value || ''
210
- }
211
- if (item.label === label && item.type === 'number') {
212
- return item.value || 0
213
- }
214
- }
215
- },
216
- getLableOptions(label) {
217
- for (const item of this.show_data.fields) {
218
- if (item.label === label) {
219
- return item.options
220
- }
221
- }
222
- },
223
- setLabelValue(label, value) {
224
- for (const item of this.show_data.fields) {
225
- if (item.label === label) {
226
- item.value = value
227
- this.show_data[item.field] = value
228
- }
229
- }
230
- },
231
- setLabelOptions(label, options) {
232
- for (const item of this.show_data.fields) {
233
- if (item.label === label) {
234
- item.options = options
235
- }
236
- }
237
- },
238
- async checkDuplicate(index) {
239
- let http = new HttpResetClass()
240
- let data = {
241
- tablename: 't_apply',
242
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
243
- }
244
- let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
245
- resolveMsg: null,
246
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
247
- })
248
- if (res.data.length > 0) {
249
- this.show_data.fields[index].value = null
250
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
251
- }
252
- },
253
- // 获取片区
254
- async getSliceArea () {
255
- let data = {
256
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
257
- userid: this.$login.f.id
258
- }
259
-
260
- let res = await this.$resetpost(
261
- `rs/search`,
262
- {data: data},
263
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
264
- )
265
-
266
- return res.data.map(item => {
267
- return {
268
- label: item.name,
269
- value: item.name
270
- }
271
- })
272
- },
273
- // 获取区县
274
- async getPcd () {
275
- let data = {
276
- tablename: 't_pcd',
277
- condition: `f_filialeid = '${this.$login.f.orgid}'`
278
- }
279
- let res = await this.$resetpost(
280
- `rs/sql/singleTable`,
281
- {data: data},
282
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
283
- )
284
-
285
- return res.data.map(item => {
286
- return {
287
- label: item.f_pcd,
288
- value: item.f_pcd
289
- }
290
- })
291
- },
292
- // 缴费前置
293
- chargeBefore () {
294
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
295
- this.$showAlert('费用未结清!!!', 'warning', 3000)
296
- throw null
297
- }
298
- },
299
- // 施工前置
300
- async constructionBefore () {
301
- let http = new HttpResetClass()
302
- let data = {
303
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_table_state = '待开通'`
304
- }
305
- let res = await http.load(
306
- 'POST',
307
- 'rs/sql/countApplyUserinfo',
308
- {data: data},
309
- {
310
- resolveMsg: null,
311
- rejectMsg: '安装明细查询失败!!!'
312
- })
313
- if (res.data[0].num > 0) {
314
- this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
315
- throw `还有${res.data[0].num}户未安装,无法提交`
316
- }
317
- },
318
- changePipeBuild () {
319
- if (this.selectdata.f_process_dep === '工程部') {
320
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
321
- }
322
- if (this.selectdata.f_process_dep === '运营部') {
323
- return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
324
- }
325
- },
326
- async getDevInfo () {
327
- let data = {
328
- tablename: 't_dev_info',
329
- condition: `f_orgid = '${this.$login.f.orgid}'`
330
- }
331
- let res = await this.$resetpost(
332
- `rs/sql/singleTable`,
333
- {data: data},
334
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
335
- )
336
-
337
- return res.data.map(item => {
338
- return {
339
- label: item.f_dev_name,
340
- value: item.f_dev_name
341
- }
342
- })
343
- },
344
- async getPrice (f_price_id) {
345
- console.log('=======================')
346
- console.log(f_price_id)
347
-
348
- let data = {
349
- condition: `sp.f_orgid = '${this.$login.f.orgid}'`
350
- }
351
-
352
- if (!isEmpty(f_price_id)) {
353
- data.condition = `sp.f_orgid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
354
- }
355
- let http = new HttpResetClass()
356
- let res = await http.load(
357
- 'POST',
358
- `rs/sql/applyGetPrice`,
359
- {data: data},
360
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
361
- )
362
-
363
- return res.data.map(item => {
364
- return {
365
- label: item.f_price_name,
366
- value: item
367
- }
368
- })
369
- }
370
- },
371
- events:{
372
- // 终止报建初始化·
373
- async 'stopApplyReadyEvent' () {
374
-
375
- let f_is_stop = this.getLableValue('是否终止')
376
-
377
- for (const item of this.show_data.fields) {
378
- if (f_is_stop === '是') {
379
- if (item.label === '终止原因') {
380
- item.hidden = false
381
- item.required = true
382
- }
383
- } else {
384
- if (item.label === '终止原因') {
385
- item.hidden = true
386
- item.required = false
387
- }
388
- }
389
- }
390
-
391
- if (isEmpty(this.show_data.f_parent_process_id)) {
392
- return
393
- }
394
- let data = {
395
- condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
396
- data: {
397
- id: this.$login.f.id,
398
- orgid: this.$login.f.orgid
399
- }
400
- }
401
- let res = await this.$resetpost(
402
- `rs/sql/supervisory`,
403
- {data: data},
404
- {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
405
- )
406
- this.show_data.parentApply = res.data[0]
407
- },
408
- // 通气点火初始化
409
- async 'gasReadyEvent' () {
410
- if (!isEmpty(this.show_data.f_price_id)) {
411
- let priceList = await this.getPrice(this.show_data.f_price_id)
412
- this.setLabelValue('气价名称', priceList[0].value)
413
- }
414
-
415
-
416
- // 保险初始化显示内容
417
- let f_is_insure = this.getLableValue('是否购买保险')
418
- for (const item of this.show_data.fields) {
419
- if (f_is_insure === '是') {
420
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
421
- item.hidden = false
422
- item.required = true
423
- }
424
- if (item.label === '保险备注') {
425
- item.hidden = false
426
- }
427
- } else {
428
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
429
- item.hidden = true
430
- item.required = false
431
- }
432
- if (item.label === '保险备注') {
433
- item.hidden = true
434
- }
435
- }
436
- }
437
- // 本期保费到期时间默认一年
438
- if (isEmpty(this.selectdata.f_ins_expiration_date)) {
439
- let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
440
- this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
441
- }
442
- },
443
- // 申请节点初始化
444
- 'applyReadyEvent' () {
445
- this.$getConfig(this, 'UserAddress')
446
-
447
- let f_address_type = this.show_data.f_address_type
448
-
449
- for (const item of this.show_data.fields) {
450
- if (f_address_type === '民用市区') {
451
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
452
- item.hidden = false
453
- item.required = true
454
- }
455
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
456
- item.hidden = false
457
- item.required = false
458
- }
459
- if (item.label === '地址') {
460
- item.readonly = true
461
- }
462
- }
463
- if (f_address_type === '民用乡镇') {
464
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
465
- item.hidden = false
466
- item.required = true
467
- }
468
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
469
- item.hidden = false
470
- item.required = false
471
- }
472
- if (item.label === '楼层') {
473
- item.hidden = true
474
- item.required = false
475
- }
476
- if (item.label === '地址') {
477
- item.readonly = true
478
- }
479
- }
480
- if (f_address_type === '特殊地址') {
481
- if (item.label === '区/县' || item.label === '街道/乡镇') {
482
- item.hidden = false
483
- item.required = true
484
- }
485
- if (item.label === '集收单位') {
486
- item.hidden = false
487
- item.required = false
488
- }
489
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
490
- item.hidden = true
491
- item.required = false
492
- }
493
- if (item.label === '地址') {
494
- item.readonly = false
495
- }
496
- }
497
-
498
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
499
- item.hidden = true
500
- }
501
- }
502
- },
503
- },
504
- watch: {
505
- deep: true
506
- }
507
- }
508
- </script>
509
- <style scoped>
510
- /*清除model中的浮动*/
511
- .clearfix:after,.clearfix:before{
512
- display: table;
513
- }
514
- .clearfix:after{
515
- clear: both;
516
- }
517
- </style>
1
+ <template>
2
+ <div class="auto clearfix">
3
+ <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ </div>
5
+ <service-view v-ref:service_show :data="show_data" v-if="showview"></service-view>
6
+ </template>
7
+ <script>
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ // Date格式化
11
+ Date.prototype.Format = function (fmt) {
12
+ var o = {
13
+ 'M+': this.getMonth() + 1, // 月份
14
+ 'd+': this.getDate(), //
15
+ 'H+': this.getHours(), // 小时
16
+ 'm+': this.getMinutes(), //
17
+ 's+': this.getSeconds(), //
18
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
19
+ 'S': this.getMilliseconds() // 毫秒
20
+ }
21
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
22
+ for (var k in o) {
23
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
24
+ }
25
+ return fmt
26
+ }
27
+ export default {
28
+ title: '报建监控控制层',
29
+ props: {
30
+ selectdata: {
31
+ type: Object
32
+ },
33
+ nodeSnapshot: {
34
+ type: Boolean,
35
+ default: false
36
+ }
37
+ },
38
+ data() {
39
+ return {
40
+ data: null, // 展示的数据
41
+ json_datas: null, // json配置数据结构
42
+ showview: false, // 控制显示层显示
43
+ show_data: null
44
+ }
45
+ },
46
+ created () {
47
+ this.refurbish()
48
+ },
49
+ methods: {
50
+ // 初始化模块
51
+ async refurbish() {
52
+ this.json_datas = this.$workflow_vue
53
+ let sum = 0
54
+ let jsonData = {}
55
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
56
+ this.$showMessage("网络故障,请刷新页面")
57
+ return
58
+ }
59
+ this.json_datas.activitys.forEach(item => {
60
+ if (this.selectdata.defname === item.title) {
61
+ jsonData = item // 拿到当前节点的json配置信息
62
+ sum++ // 节点名一样的个数
63
+ }
64
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
65
+ })
66
+ if (sum === 0) {
67
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
68
+ return
69
+ }
70
+ if (sum > 1) {
71
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
72
+ return
73
+ }
74
+
75
+ this.data = null
76
+ this.data = jsonData
77
+ this.data = Object.assign({}, this.data, this.selectdata)
78
+
79
+ // fields 字段填充值
80
+ this.data.fields.forEach(item => {
81
+ if (this.selectdata[item.field]) {
82
+ item.value = this.selectdata[item.field]
83
+ }
84
+ if (this.selectdata[item.field] === 0) {
85
+ item.value = 0
86
+ }
87
+ item.readonly = true
88
+ item.disabled = true
89
+ })
90
+
91
+ // 控制组件
92
+ if (this.data.components) {
93
+ this.data.components.forEach(item => {
94
+ item.mark = 1
95
+ })
96
+ }
97
+
98
+ // onetomany 数据获取
99
+ if (this.data.onetomany) {
100
+ for (const item of this.data.onetomany) {
101
+ let res = null
102
+ if (item.queryEvent) {
103
+ res = this[item.queryEvent]()
104
+ } else {
105
+ let data = {
106
+ tablename: item.tables[0],
107
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
108
+ }
109
+ res = await this.$resetpost(
110
+ 'rs/sql/singleTable',
111
+ {data: data},
112
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
113
+ )
114
+ }
115
+
116
+ item.rows = res.data
117
+
118
+ // 隐藏所有操作
119
+ item.hiddenOperate = true
120
+ }
121
+ }
122
+
123
+ // 去除button
124
+ this.data.buttons = null
125
+
126
+ // 完成时间和完成人,部门,分公司
127
+ if (this.selectdata.state === '结束') {
128
+ let http = new HttpResetClass()
129
+ let res = await http.load('POST', 'rs/search', {
130
+ source: 'this.getInfo()',
131
+ userid: this.selectdata.userid
132
+ }, {resolveMsg: null, rejectMsg: null})
133
+ let user = res.data
134
+ this.data.operate_date = new Date(this.selectdata.finishtime).Format('yyyy-MM-dd')
135
+ this.data.operator = this.selectdata.person
136
+ this.data.orgs = user.orgs
137
+ this.data.parentname = user.deps
138
+ }
139
+
140
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
141
+ let temp = JSON.parse(JSON.stringify(this.data))
142
+
143
+ this.show_data = temp
144
+ this.$nextTick(() => {
145
+ this.showview = true
146
+ })
147
+ },
148
+ // json配置数据处理
149
+ async initializtion() {
150
+ // 查询是否有当前节点快照信息,如果有使用快照数据,没有则展示最新数据
151
+ if (this.nodeSnapshot && this.data.nodeSnapshot) {
152
+ let http = new HttpResetClass()
153
+ let data = {
154
+ tablename: 't_node_snapshot',
155
+ condition: `actid = '${this.selectdata.actid}' and f_process_id='${this.selectdata.f_process_id}'`
156
+ }
157
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
158
+ resolveMsg: null,
159
+ rejectMsg: null
160
+ })
161
+ if (res.data.length > 0) {
162
+ data = JSON.parse(res.data[0].f_node_data)
163
+
164
+ this.data.fields = data.fields
165
+ this.data.onetomany = data.onetomany
166
+ this.data.title = data.title
167
+ }
168
+ }
169
+ }
170
+ },
171
+ events:{
172
+ },
173
+ watch: {
174
+ deep: true
175
+ }
176
+ }
177
+ </script>
178
+ <style scoped>
179
+ /*清除model中的浮动*/
180
+ .clearfix:after,.clearfix:before{
181
+ display: table;
182
+ }
183
+ .clearfix:after{
184
+ clear: both;
185
+ }
186
+ </style>