apply-clients 3.4.1 → 3.4.2-FuGu-7

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 (136) 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 +85 -0
  11. package/build/webpack.baseandroid.conf.js +84 -0
  12. package/build/webpack.dev.conf.js +51 -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/dingding.html +23 -0
  19. package/dist-android/static/doc.jpg +0 -0
  20. package/dist-android/static/images/lefticon//345/215/241/346/234/215/345/212/241/347/256/241/347/220/206.png +0 -0
  21. package/dist-android/static/images/lefticon//345/221/274/345/217/253/347/263/273/347/273/237.png +0 -0
  22. package/dist-android/static/images/lefticon//345/224/256/346/260/224/346/224/266/350/264/271.png +0 -0
  23. package/dist-android/static/images/lefticon//345/233/276/345/261/2023/346/213/267/350/264/2354.png +0 -0
  24. package/dist-android/static/images/lefticon//345/233/276/345/261/202577.png +0 -0
  25. package/dist-android/static/images/lefticon//345/233/276/345/261/2028/346/213/267/350/264/23513.png +0 -0
  26. package/dist-android/static/images/lefticon//345/256/211/346/243/200/346/237/245/347/234/213.png +0 -0
  27. package/dist-android/static/images/lefticon//345/256/211/346/243/200/350/256/241/345/210/222.png +0 -0
  28. package/dist-android/static/images/lefticon//345/276/256/344/277/241/346/234/215/345/212/241.png +0 -0
  29. package/dist-android/static/images/lefticon//346/212/245/345/273/272/347/263/273/347/273/237.png +0 -0
  30. package/dist-android/static/images/lefticon//346/212/245/350/241/250/346/237/245/350/257/242.png +0 -0
  31. package/dist-android/static/images/lefticon//346/227/245/345/270/270/347/256/241/347/220/206.png +0 -0
  32. package/dist-android/static/images/lefticon//346/234/272/350/241/250/347/256/241/347/220/206.png +0 -0
  33. package/dist-android/static/images/lefticon//346/237/245/350/257/242/345/210/227/350/241/250.png +0 -0
  34. package/dist-android/static/images/lefticon//346/241/243/346/241/210/347/256/241/347/220/206.png +0 -0
  35. package/dist-android/static/images/lefticon//347/211/251/350/201/224/347/275/221/350/241/250.png +0 -0
  36. package/dist-android/static/images/lefticon//347/263/273/347/273/237/347/256/241/347/220/206.png +0 -0
  37. package/dist-android/static/images/lefticon//347/263/273/347/273/237/350/256/276/347/275/256.png +0 -0
  38. package/dist-android/static/images/lefticon//347/273/217/350/220/245/347/256/241/346/216/247.png +0 -0
  39. package/dist-android/static/images/lefticon//347/273/274/345/220/210/344/270/232/345/212/241.png +0 -0
  40. package/dist-android/static/images/lefticon//347/273/274/345/220/210/346/237/245/350/257/242.png +0 -0
  41. package/dist-android/static/images/lefticon//350/217/234/345/215/225/344/274/270/347/274/251.png +0 -0
  42. package/dist-android/static/images/lefticon//351/200/200/345/207/272/347/263/273/347/273/237.png +0 -0
  43. package/dist-android/static/imgerror.jpg +0 -0
  44. package/dist-android/static/newStyle/clear.png +0 -0
  45. package/dist-android/static/newStyle/fife.png +0 -0
  46. package/dist-android/static/newStyle/hidden.png +0 -0
  47. package/dist-android/static/newStyle/label-clear.png +0 -0
  48. package/dist-android/static/newStyle/left-img.png +0 -0
  49. package/dist-android/static/newStyle/list_ok.png +0 -0
  50. package/dist-android/static/newStyle/login-check.png +0 -0
  51. package/dist-android/static/newStyle/login-con.png +0 -0
  52. package/dist-android/static/newStyle/login-do.gif +0 -0
  53. package/dist-android/static/newStyle/login-f.png +0 -0
  54. package/dist-android/static/newStyle/login-info.png +0 -0
  55. package/dist-android/static/newStyle/login-left.png +0 -0
  56. package/dist-android/static/newStyle/login-org.png +0 -0
  57. package/dist-android/static/newStyle/login-pwd.png +0 -0
  58. package/dist-android/static/newStyle/login-user.png +0 -0
  59. package/dist-android/static/newStyle/loginbg.gif +0 -0
  60. package/dist-android/static/newStyle/loginbg1280.gif +0 -0
  61. package/dist-android/static/newStyle/loginbg1366.gif +0 -0
  62. package/dist-android/static/newStyle/setting.png +0 -0
  63. package/dist-android/static/newStyle/setting1.png +0 -0
  64. package/dist-android/static/newStyle/shirk.png +0 -0
  65. package/dist-android/static/newStyle/stretch_bottom.png +0 -0
  66. package/dist-android/static/newStyle/stretch_left.png +0 -0
  67. package/dist-android/static/newStyle/stretch_right.png +0 -0
  68. package/dist-android/static/newStyle/stretch_top.png +0 -0
  69. package/dist-android/static/newStyle/system-off.png +0 -0
  70. package/dist-android/static/pdf.jpg +0 -0
  71. package/index.html +33 -33
  72. package/package.json +2 -1
  73. package/src/AndroidApp.vue +35 -35
  74. package/src/App.vue +20 -20
  75. package/src/DingDingApp.vue +51 -0
  76. package/src/android.js +21 -21
  77. package/src/apply.js +75 -81
  78. package/src/applyAndroid.js +25 -31
  79. package/src/applyDingDing.js +12 -0
  80. package/src/components/android/AppOnetomany.vue +301 -301
  81. package/src/components/android/AppServiceView.vue +566 -566
  82. package/src/components/android/AppSign.vue +142 -142
  83. package/src/components/android/AppTakePic.vue +143 -143
  84. package/src/components/android/Process/AppExplorationUser.vue +320 -320
  85. package/src/components/android/Process/AppServiceControl.vue +757 -757
  86. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -456
  87. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
  88. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -121
  89. package/src/components/android/TaskGraph.vue +125 -125
  90. package/src/components/build/Install/ExplorationUser.vue +304 -0
  91. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -0
  92. package/src/components/product/{Process/Processes/Print → ApplyCharge}/printCharge.vue +142 -142
  93. package/src/components/product/Function/InstallFunction.vue +131 -125
  94. package/src/components/product/Function/InstallInfoSelect.vue +21 -13
  95. package/src/components/product/Function/Service/FunctionServiceControl.vue +420 -222
  96. package/src/components/product/Onetomany.vue +377 -377
  97. package/src/components/product/Process/ExplorationSelect.vue +401 -410
  98. package/src/components/product/Process/ExplorationUser.vue +138 -138
  99. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -592
  100. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -207
  101. package/src/components/product/Process/Processes/chargeManagement.vue +634 -639
  102. package/src/components/product/Process/Service/ServiceControl.vue +58 -63
  103. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  104. package/src/components/product/ServiceView.vue +631 -631
  105. package/src/components/product/Stop/StopApply.vue +105 -103
  106. package/src/components/product/Stop/StopApplyList.vue +269 -269
  107. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +7 -0
  108. package/src/components/product/Supervisory/SupervisoryControl.vue +10 -0
  109. package/src/components/product/Supervisory/SupervisoryList.vue +6 -2
  110. package/src/components/product/Supervisory/SupervisoryhCart.vue +110 -107
  111. package/src/components/product/VueUtils/ApplyUpload.vue +273 -273
  112. package/src/components/product/VueUtils/HighMeter.vue +208 -208
  113. package/src/dingding.js +20 -0
  114. package/src/expandcssAndroid.less +1034 -1034
  115. package/src/main.js +23 -23
  116. package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
  117. package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
  118. package/src/components/product/Function/functions/StopInstall.vue +0 -106
  119. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  120. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  121. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  122. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  123. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  124. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -548
  125. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -754
  126. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +0 -60
  127. package/src/filiale/yuchuan/android.js +0 -7
  128. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -528
  129. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
  130. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -395
  131. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -147
  132. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +0 -66
  133. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +0 -759
  134. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +0 -470
  135. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -879
  136. package/src/filiale/yuchuan/pc.js +0 -11
@@ -1,222 +1,420 @@
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
- export default {
8
- title: '报建功能业务控制层',
9
- props: ['selectdata'],
10
- data () {
11
- return {
12
- show_data: null, // 给通用页面显示的数据
13
- showview: false // 控制通用页面
14
- }
15
- },
16
- ready () {
17
- this.refurbish()
18
- },
19
- methods: {
20
- async refurbish () {
21
- // fields 字段填充值
22
- this.selectdata.fields.forEach(item => {
23
- if (!item.value) {
24
- item.value = null
25
- }
26
-
27
- if (item.default || item.default === 0) {
28
- item.value = item.default
29
- }
30
-
31
- if (this.selectdata[item.field]) {
32
- // 将json字符串格式化赋值给value
33
- if (String(this.selectdata[item.field]).startsWith("{")) {
34
- item.value = JSON.parse(this.selectdata[item.field])
35
- this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
36
- } else {
37
- item.value = this.selectdata[item.field]
38
- }
39
- }
40
- if (this.selectdata[item.field] === 0) {
41
- item.value = 0
42
- }
43
-
44
- // datepicker
45
- if (item.type === 'datepicker' && !item.value && item.default) {
46
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
47
- }
48
-
49
- // 如果配置类型为select,优先从参数列表获取options
50
- if (item.type === 'select') {
51
-
52
- let temp = this.$appdata.getParam(item.label)
53
-
54
- if (temp && temp.length > 0) {
55
- item.options = temp
56
- }
57
-
58
- if (item.paramLabel) {
59
- temp = this.$appdata.getParam(item.paramLabel)
60
- if (temp && temp.length > 0) {
61
- item.options = temp
62
- }
63
- }
64
- }
65
- })
66
-
67
- // 控制组件
68
- if (this.selectdata.components) {
69
- this.selectdata.components.forEach(item => {
70
- item.mark = 2
71
- })
72
- }
73
-
74
- // 初始化onetomany
75
- if (this.selectdata.onetomany) {
76
- for (const item of this.selectdata.onetomany) {
77
- let res = null
78
- if (item.queryEvent) {
79
- res = this[item.queryEvent]()
80
- } else {
81
- let data = {
82
- tablename: item.tables[0],
83
- condition: `f_process_id='${this.selectdata.f_process_id}'`
84
- }
85
- res = await this.$resetpost(
86
- 'rs/sql/singleTable',
87
- {data: data},
88
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
89
- )
90
- }
91
-
92
- item.rows = res.data
93
-
94
- // 初始化onetomany中的fields
95
- for (const field of item.fields) {
96
- if (!field.value) {
97
- if (field.value !== 0) {
98
- field.value = null
99
- }
100
- }
101
-
102
- if (field.default || field.default === 0) {
103
- field.value = field.default
104
- }
105
-
106
- // datepicker
107
- if (field.type === 'datepicker' && !field.value && field.default) {
108
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
109
- }
110
-
111
- if (field.type === 'select') {
112
- let temp = this.$appdata.getParam(field.label)
113
-
114
- if (temp && temp.length > 0) {
115
- field.options = temp
116
- }
117
-
118
- if (field.paramLabel) {
119
- temp = this.$appdata.getParam(field.paramLabel)
120
- if (temp && temp.length > 0) {
121
- item.options = temp
122
- }
123
- }
124
- }
125
- }
126
- }
127
- }
128
-
129
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
130
- let temp = JSON.parse(JSON.stringify(this.selectdata))
131
-
132
- this.show_data = temp
133
- this.$nextTick(() => {
134
- this.showview = true
135
- })
136
- }
137
- },
138
- events: {
139
- async 'pauseApply' () {
140
-
141
- let data = {
142
- data: this.show_data,
143
- user: this.$login.f
144
- }
145
-
146
- let res = await this.$resetpost(
147
- `rs/logic/pauseApply`,
148
- {data: data},
149
- {resolveMsg: null, rejectMsg: '暂定报建失败!!!'}
150
- )
151
-
152
- this.$dispatch('search')
153
- },
154
- // 获取view层button事件
155
- async 'button' (){
156
-
157
- let res = await this.$resetpost(
158
- `rs/entity/t_apply`,
159
- this.show_data,
160
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
161
- )
162
-
163
- this.$dispatch('search')
164
- },
165
- // 失去焦点出触发事件
166
- 'onchange' (index) {
167
- },
168
- 'onblur' (index) {},
169
- 'oninput' (index) {},
170
- 'initializtionView' () {},
171
- async 'onchangeModal' (index, fieldIndex) {
172
- },
173
- async 'onblurModal' (index, fieldIndex) {
174
-
175
- },
176
- async 'oninputModal' (index, fieldIndex) {
177
-
178
- },
179
- async 'onetomanydelete' (index, rowIndex) {
180
-
181
- let http = new HttpResetClass()
182
-
183
- let res = await http.load(
184
- 'DELETE',
185
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
186
- null,
187
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
188
- )
189
-
190
- this.$dispatch('breakControl', this.show_data)
191
- },
192
- async 'onetomanyupdate' (index, rowIndex) {
193
- let data = this.show_data.onetomany[index].rows[rowIndex]
194
-
195
- this.show_data.onetomany[index].fields.forEach(item => {
196
- data[item.field] = item.value
197
- })
198
- let res = await this.$resetpost(
199
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
200
- data
201
- )
202
-
203
- this.$dispatch('breakControl', this.show_data)
204
- },
205
- async 'onetomanyadd' (index) {
206
- let data = {
207
- f_process_id : this.show_data.f_process_id
208
- }
209
- this.show_data.onetomany[index].fields.forEach(item => {
210
- data[item.field] = item.value
211
- })
212
- let res = await this.$resetpost(
213
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
214
- data
215
- )
216
- this.$dispatch('breakControl', this.show_data)
217
- }
218
- },
219
- watch:{
220
- }
221
- }
222
- </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
+ export default {
8
+ title: '报建功能业务控制层',
9
+ props: ['selectdata'],
10
+ data () {
11
+ return {
12
+ show_data: null, // 给通用页面显示的数据
13
+ showview: false // 控制通用页面
14
+ }
15
+ },
16
+ ready () {
17
+ this.refurbish()
18
+ },
19
+ methods: {
20
+ async refurbish () {
21
+ // fields 字段填充值
22
+ for (const item of this.selectdata.fields) {
23
+ if (!item.value) {
24
+ item.value = null
25
+ }
26
+
27
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
28
+ if (item.eval) {
29
+ item.value = eval(item.default)
30
+ } else {
31
+ item.value = item.default
32
+ }
33
+ }
34
+
35
+ if (this.selectdata[item.field]) {
36
+ // 将json字符串格式化赋值给value
37
+ if (String(this.selectdata[item.field]).startsWith("{")) {
38
+ item.value = JSON.parse(this.selectdata[item.field])
39
+ } else {
40
+ item.value = this.selectdata[item.field]
41
+ }
42
+ }
43
+ if (this.selectdata[item.field] === 0) {
44
+ item.value = 0
45
+ }
46
+
47
+ // datepicker
48
+ if (item.type === 'datepicker' && !item.value && item.default) {
49
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
50
+ }
51
+
52
+ // 如果配置类型为select,优先从参数列表获取options
53
+ if (item.type === 'select' || item.type === 'checkbox') {
54
+ if (item.param) {
55
+ let temp = this.$appdata.getParam(item.label)
56
+
57
+ if (temp && temp.length > 0) {
58
+ item.options = temp
59
+ }
60
+
61
+ if (item.paramLabel) {
62
+ temp = this.$appdata.getParam(item.paramLabel)
63
+ if (temp && temp.length > 0) {
64
+ item.options = temp
65
+ }
66
+ }
67
+ }
68
+
69
+ if (item.ready) {
70
+ item.options = await this[item.ready]()
71
+ }
72
+ }
73
+
74
+
75
+ if (item.type === 'checkbox') {
76
+ if (this.selectdata[item.field]) {
77
+ item.value = JSON.parse(this.selectdata[item.field])
78
+ } else {
79
+ item.value = []
80
+ }
81
+ }
82
+ }
83
+
84
+ // 控制组件
85
+ if (this.selectdata.components) {
86
+ this.selectdata.components.forEach(item => {
87
+ item.mark = 2
88
+ })
89
+ }
90
+
91
+ // 初始化onetomany
92
+ if (this.selectdata.onetomany) {
93
+ for (const item of this.selectdata.onetomany) {
94
+ let res = null
95
+ if (item.queryEvent) {
96
+ res = this[item.queryEvent]()
97
+ } else {
98
+ let data = {
99
+ tablename: item.tables[0],
100
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
101
+ }
102
+ res = await this.$resetpost(
103
+ 'rs/sql/singleTable',
104
+ {data: data},
105
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
106
+ )
107
+ }
108
+
109
+ item.rows = res.data
110
+
111
+ // 初始化onetomany中的fields
112
+ for (const field of item.fields) {
113
+ if (!field.value) {
114
+ if (field.value !== 0) {
115
+ field.value = null
116
+ }
117
+ }
118
+
119
+ if (field.default || field.default === 0) {
120
+ field.value = field.default
121
+ }
122
+
123
+ // datepicker
124
+ if (field.type === 'datepicker' && !field.value && field.default) {
125
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
126
+ }
127
+
128
+ if (field.type === 'select') {
129
+ let temp = this.$appdata.getParam(field.label)
130
+
131
+ if (temp && temp.length > 0) {
132
+ field.options = temp
133
+ }
134
+
135
+ if (field.paramLabel) {
136
+ temp = this.$appdata.getParam(field.paramLabel)
137
+ if (temp && temp.length > 0) {
138
+ item.options = temp
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
147
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
148
+
149
+ this.show_data = temp
150
+ this.$nextTick(() => {
151
+ this.showview = true
152
+ })
153
+ },
154
+ // 金额转大写
155
+ smalltoBIG(n) {
156
+ let fraction = ['角', '分'];
157
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
158
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
159
+ let head = n < 0 ? '欠' : '';
160
+ n = Math.abs(n);
161
+
162
+ let s = '';
163
+
164
+ for (var i = 0; i < fraction.length; i++) {
165
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
166
+ }
167
+ s = s || '整';
168
+ n = Math.floor(n);
169
+
170
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
171
+ let p = '';
172
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
173
+ p = digit[n % 10] + unit[1][j] + p;
174
+ n = Math.floor(n / 10);
175
+ }
176
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
177
+ }
178
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
179
+ },
180
+ getLableValue(label) {
181
+ for (const item of this.show_data.fields) {
182
+ if (item.label === label && item.type !== 'number') {
183
+ return item.value || ''
184
+ }
185
+ if (item.label === label && item.type === 'number') {
186
+ return item.value || 0
187
+ }
188
+ }
189
+ },
190
+ getLableOptions(label) {
191
+ for (const item of this.show_data.fields) {
192
+ if (item.label === label) {
193
+ return item.options
194
+ }
195
+ }
196
+ },
197
+ setLabelValue(label, value) {
198
+ for (const item of this.show_data.fields) {
199
+ if (item.label === label) {
200
+ item.value = value
201
+ this.show_data[item.field] = value
202
+ }
203
+ }
204
+ },
205
+ setLabelOptions(label, options) {
206
+ for (const item of this.show_data.fields) {
207
+ if (item.label === label) {
208
+ item.options = options
209
+ }
210
+ }
211
+ },
212
+ showLabels(...labels) {
213
+ for (const item of this.show_data.fields) {
214
+ if (labels.includes(item.label)) {
215
+ item.hidden = false
216
+ }
217
+ }
218
+ },
219
+ hideLabels(...labels) {
220
+ for (const item of this.show_data.fields) {
221
+ if (labels.includes(item.label)) {
222
+ item.hidden = true
223
+ }
224
+ }
225
+ },
226
+ showButtons(...buttons) {
227
+ for (const item of this.show_data.buttons) {
228
+ if (buttons.includes(item.button_name)) {
229
+ item.hidden = false
230
+ }
231
+ }
232
+ },
233
+ hideButtons(...buttons) {
234
+ for (const item of this.show_data.buttons) {
235
+ if (buttons.includes(item.button_name)) {
236
+ item.hidden = true
237
+ }
238
+ }
239
+ },
240
+ requiredLabels(...labels) {
241
+ for (const item of this.show_data.fields) {
242
+ if (labels.includes(item.label)) {
243
+ item.required = true
244
+ }
245
+ }
246
+ },
247
+ electiveLabels(...labels) {
248
+ for (const item of this.show_data.fields) {
249
+ if (labels.includes(item.label)) {
250
+ item.required = false
251
+ }
252
+ }
253
+ },
254
+ readonlyLabels(...labels) {
255
+ for (const item of this.show_data.fields) {
256
+ if (labels.includes(item.label)) {
257
+ item.readonly = true
258
+ item.disabled = true
259
+ }
260
+ }
261
+ },
262
+ readwriteLabels(...labels) {
263
+ for (const item of this.show_data.fields) {
264
+ if (labels.includes(item.label)) {
265
+ item.readonly = false
266
+ item.disabled = false
267
+ }
268
+ }
269
+ },
270
+ disabledButtons(...buttons) {
271
+ for (const item of this.show_data.buttons) {
272
+ if (buttons.includes(item.button_name)) {
273
+ item.disabled = true
274
+ }
275
+ }
276
+ },
277
+ enableButtons(...buttons) {
278
+ for (const item of this.show_data.buttons) {
279
+ if (buttons.includes(item.button_name)) {
280
+ item.disabled = false
281
+ }
282
+ }
283
+ },
284
+ async checkDuplicate(index) {
285
+ let http = new HttpResetClass()
286
+ let data = {
287
+ tablename: 't_apply',
288
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
289
+ }
290
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
291
+ resolveMsg: null,
292
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
293
+ })
294
+ if (res.data.length > 0) {
295
+ this.show_data.fields[index].value = null
296
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
297
+ }
298
+ }
299
+ },
300
+ events: {
301
+ async 'stopApply' () {
302
+
303
+ let data = {
304
+ apply: this.show_data,
305
+ user: this.$login.f
306
+ }
307
+
308
+ let res = await this.$resetpost(
309
+ `rs/logic/stopApply`,
310
+ {data: data},
311
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
312
+ )
313
+
314
+ this.$dispatch('loadPage')
315
+ },
316
+ async 'pauseApply' () {
317
+
318
+ let data = {
319
+ apply: this.show_data,
320
+ user: this.$login.f
321
+ }
322
+
323
+ let res = await this.$resetpost(
324
+ `rs/logic/pauseApply`,
325
+ {data: data},
326
+ {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
327
+ )
328
+
329
+ this.$dispatch('loadPage')
330
+ },
331
+ // 获取view层button事件
332
+ async 'button' (){
333
+
334
+ let res = await this.$resetpost(
335
+ `rs/entity/t_apply`,
336
+ this.show_data,
337
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
338
+ )
339
+
340
+ this.$dispatch('loadPage')
341
+ },
342
+ // 失去焦点出触发事件
343
+ 'onchange' (index) {
344
+ },
345
+ 'onblur' (index) {},
346
+ 'oninput' (index) {},
347
+ 'initializtionView' () {},
348
+ async 'onchangeModal' (index, fieldIndex) {
349
+ },
350
+ async 'onblurModal' (index, fieldIndex) {
351
+
352
+ },
353
+ async 'oninputModal' (index, fieldIndex) {
354
+
355
+ },
356
+ async 'onetomanydelete' (index, rowIndex) {
357
+
358
+ let http = new HttpResetClass()
359
+
360
+ let res = await http.load(
361
+ 'DELETE',
362
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
363
+ null,
364
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
365
+ )
366
+
367
+ res = await this.$resetpost(
368
+ 'rs/entity/t_apply',
369
+ this.show_data
370
+ )
371
+
372
+ this.$dispatch('breakControl', this.show_data)
373
+ },
374
+ async 'onetomanyupdate' (index, rowIndex) {
375
+ let data = this.show_data.onetomany[index].rows[rowIndex]
376
+
377
+ this.show_data.onetomany[index].fields.forEach(item => {
378
+ data[item.field] = item.value
379
+ })
380
+ let res = await this.$resetpost(
381
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
382
+ data
383
+ )
384
+
385
+ res = await this.$resetpost(
386
+ 'rs/entity/t_apply',
387
+ this.show_data
388
+ )
389
+
390
+ this.$dispatch('breakControl', this.show_data)
391
+ },
392
+ async 'onetomanyadd' (index) {
393
+ let data = {
394
+ f_process_id : this.show_data.f_process_id,
395
+ f_operator_id: this.$login.f.id,
396
+ f_operator: this.$login.f.name,
397
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
398
+ f_orgid: this.$login.f.orgid,
399
+ f_orgname: this.$login.f.orgs
400
+ }
401
+ this.show_data.onetomany[index].fields.forEach(item => {
402
+ data[item.field] = item.value
403
+ })
404
+ let res = await this.$resetpost(
405
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
406
+ data
407
+ )
408
+
409
+ res = await this.$resetpost(
410
+ 'rs/entity/t_apply',
411
+ this.show_data
412
+ )
413
+
414
+ this.$dispatch('breakControl', this.show_data)
415
+ }
416
+ },
417
+ watch:{
418
+ }
419
+ }
420
+ </script>