apply-clients 3.4.50 → 3.4.52

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 (57) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/apply.js +113 -113
  4. package/src/applyAndroid.js +53 -53
  5. package/src/components/android/AppServiceView.vue +745 -745
  6. package/src/components/android/AppSign.vue +154 -154
  7. package/src/components/android/Process/AppExplorationUser.vue +507 -507
  8. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  9. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  10. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +482 -482
  12. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  13. package/src/components/product/Business/BusinessApply.vue +269 -269
  14. package/src/components/product/Business/CivilApply.vue +269 -269
  15. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -253
  16. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -53
  17. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -376
  18. package/src/components/product/Material/MaterialDetailed.vue +262 -262
  19. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -360
  20. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -157
  21. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -259
  22. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -168
  23. package/src/components/product/Process/ExplorationSelect.vue +495 -495
  24. package/src/components/product/Process/ExplorationUser.vue +189 -189
  25. package/src/components/product/Process/Processes/InstallationDetails.vue +610 -610
  26. package/src/components/product/Process/Processes/Print/printCharge.vue +166 -166
  27. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  28. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -211
  29. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  30. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  31. package/src/components/product/Process/Service/ServiceControl.vue +26 -21
  32. package/src/components/product/ServiceView.vue +981 -981
  33. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -137
  34. package/src/components/product/Supervisory/SupervisoryList.vue +404 -404
  35. package/src/components/product/VueUtils/ApplyUpload.vue +275 -280
  36. package/src/filiale/gehua/pc/ExplorationSelect.vue +483 -483
  37. package/src/filiale/gehua/pc/ServiceControl.vue +1929 -1929
  38. package/src/filiale/gehua/pc/SupervisoryControl.vue +137 -137
  39. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  40. package/src/filiale/gehua/pc/buildOrderList.vue +339 -0
  41. package/src/filiale/gehua/pc/printBuildOrder.vue +243 -0
  42. package/src/filiale/gehua/pc.js +3 -2
  43. package/src/filiale/guangxi/android/Process/AppExplorationUser.vue +503 -503
  44. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +470 -470
  45. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  46. package/src/filiale/guangxi/android/Process/Processes/AppInstallationDetails.vue +482 -482
  47. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  48. package/src/filiale/guangxi/android/Process/Processes/AppServiceView.vue +766 -766
  49. package/src/filiale/guangxi/android.js +9 -9
  50. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  51. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +702 -702
  52. package/src/filiale/guangxi/pc/Process/ExplorationSelect.vue +538 -538
  53. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  54. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  55. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +482 -482
  56. package/src/filiale/guangxi/pc.js +15 -15
  57. package/src/main.js +23 -23
@@ -1,981 +1,981 @@
1
- <template>
2
- <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
- <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
- <form class="form-horizontal">
5
- <div class="form-group">
6
- <div v-for="(index,item) in data.fields">
7
- <!--input-->
8
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device) && ( item.label != '证件号码')&&( item.label !== '身份证') && (item.label !== '用户电话')"
10
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
- <label :style="item.label_style ? item.label_style : ''"
12
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
- <div :style="item.value_style ? item.value_style:''"
14
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
- <input class="form-control input_view" style=""
16
- :type="item.type"
17
- v-model="data.fields[index].value"
18
- :placeholder="item.placeholder"
19
- :value="data.fields[index].value"
20
- :readonly="item.readonly"
21
- :disabled="item.disabled"
22
- @change="onchange(index)"
23
- @blur="onblur(index)"
24
- @input="oninput(index)"
25
- />
26
- </div>
27
- </div>
28
-
29
- <!--input-->
30
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
- v-if="((data.f_credentials === '军官证' ||data.f_credentials === '营业执照')&& item.label === '证件号码')"
32
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
33
- <label :style="item.label_style ? item.label_style : ''"
34
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
35
- <div :style="item.value_style ? item.value_style:''"
36
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
- <input class="form-control input_view" style=""
38
- :type="item.type"
39
- v-model="data.fields[index].value"
40
- :placeholder="item.placeholder"
41
- :value="data.fields[index].value"
42
- :readonly="item.readonly"
43
- :disabled="item.disabled"
44
- @change="onchange(index)"
45
- @blur="onblur(index)"
46
- @input="oninput(index)"
47
- />
48
- </div>
49
- </div>
50
- <!--身份证验证-->
51
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
52
- v-if="(item.label==='身份证') || (data.f_credentials === '身份证' && item.label === '证件号码')"
53
- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
54
- <label :style="item.label_style ? item.label_style : ''"
55
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
56
- <div :style="item.value_style ? item.value_style:''"
57
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
58
- <input class="form-control input_view" style=""
59
- :type="item.type"
60
- maxlength="18"
61
- v-model="data.fields[index].value"
62
- :placeholder="item.placeholder"
63
- :value="data.fields[index].value"
64
- v-validate:f_idnumber2='{identityCardValid: true}'
65
- :readonly="item.readonly"
66
- :disabled="item.disabled"
67
- @change="onchange(index)"
68
- @blur="onblur(index)"
69
- @input="oninput(index)"
70
- />
71
- </div>
72
- </div>
73
-
74
-
75
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
76
- v-if="item.label === '用户电话'"
77
- :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
78
- <label :style="item.label_style ? item.label_style : ''"
79
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
80
- <div :style="item.value_style ? item.value_style:''"
81
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
82
- <input class="form-control input_view" style=""
83
- type="number"
84
- oninput="if(value.length > 11) value=value.slice(0,11)"
85
- v-validate:f_user_phone="{minlength: 7, maxlength: 11 }"
86
- v-model="data.fields[index].value"
87
- :placeholder="item.placeholder"
88
- :value="data.fields[index].value"
89
- onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
90
- :readonly="item.readonly"
91
- :disabled="item.disabled"
92
- @change="onchange(index)"
93
- @blur="onblur(index)"
94
- @input="oninput(index)"
95
- />
96
- </div>
97
- </div>
98
-
99
-
100
-
101
- <!--时间datepicker-->
102
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
103
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
104
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
105
- <label
106
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
107
- <div :style="item.value_style ? item.value_style:''"
108
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
109
- <datepicker
110
- @change="onchange(index)"
111
- @blur="onblur(index)"
112
- :placeholder="item.placeholder"
113
- :value.sync="data.fields[index].value"
114
- :format="item.format ? item.format : 'yyyy-MM-dd'"
115
- v-model="data.fields[index].value"
116
- :readonly="item.readonly"
117
- :disabled="item.disabled"
118
- :show-reset-button="reset">
119
- </datepicker>
120
- </div>
121
- </div>
122
-
123
- <!--textarea-->
124
- <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
125
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
126
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
127
- <label :style="item.label_style ? item.label_style : ''"
128
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
129
- <div :style="item.value_style ? item.value_style:''"
130
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
131
- <textarea
132
- :readonly="item.readonly"
133
- :disabled="item.disabled"
134
- class="form-control input_view"
135
- style="width: 100%;height: 100%"
136
- :rows="item.rows"
137
- v-model="data.fields[index].value"
138
- :value="data.fields[index].value"
139
- @change="onchange(index)"
140
- @blur="onblur(index)"
141
- @input="oninput(index)"
142
- >
143
- </textarea>
144
- </div>
145
- </div>
146
-
147
- <!--select-->
148
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
149
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)"
150
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
151
- <label
152
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
153
- <div :style="item.value_style ? item.value_style:''"
154
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
155
- <input-select
156
- class="select select_list"
157
- @blur="onblur(index)"
158
- @change="onchange(index)"
159
- @select-search="selectSearch($arguments,index)"
160
- :readonly="item.readonly"
161
- :disable="item.disabled"
162
- :value.sync="data.fields[index].value"
163
- v-model="data.fields[index].value"
164
- :options='data.fields[index].options'
165
- :valueSingle="true"></input-select>
166
- </div>
167
- </div>
168
-
169
- <!--checkbox-->
170
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
171
- v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
172
- :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
173
- <label v-if="item.label"
174
- :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
175
- <div :style="item.value_style ? item.value_style:''"
176
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
177
- <label class="checkbox-inline" v-for="(index2,row) in item.options">
178
- <input type="checkbox" class=""
179
- :readonly="data.fields[index].readonly"
180
- :disabled="data.fields[index].disabled"
181
- v-model="data.fields[index].value"
182
- :value="data.fields[index].options[index2].value"
183
- @change="onchange(index)"
184
- @blur="onblur(index)">
185
- {{row.label}}
186
- </label>
187
- </div>
188
- </div>
189
- </div>
190
- <!--区域地址联动-->
191
- <div>
192
- <res-area-select-group
193
- v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
194
- labelstyle = "control-label"
195
- @shiji-select = "getSelectShijiValue"
196
- @xian-select = "getSelectXianValue"
197
- @shequ-select = "getSelectShequValue"
198
- >
199
- </res-area-select-group>
200
- </div>
201
-
202
- <gaode-map
203
- v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
204
- >
205
-
206
- </gaode-map>
207
-
208
- </div>
209
-
210
- <!-- onetomany -->
211
- <div class="" v-for="(index,item) in data.onetomany">
212
- <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
213
- </div>
214
-
215
- <div v-for="(i,item) in data.components">
216
- <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
217
- </div>
218
-
219
- <!--自定义组件-->
220
- <slot>
221
- <!--<div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"-->
222
- <!-- v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工'"-->
223
- <!-- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">-->
224
-
225
- <!--<div class="col-sm-6 form-group "-->
226
- <!-- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">-->
227
- <!-- <label class="font_normal_body">省&ensp;市&ensp;区</label>-->
228
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"-->
229
- <!-- v-validate:f_pcd_id='{required: true }'-->
230
- <!-- >-->
231
-
232
- <!-- <v-select :value.sync="model.f_pcd_id" :value-single="true"-->
233
- <!-- :options='pcdslist' placeholder='请选择2'-->
234
- <!-- close-on-select search="true" @change="pcdChange">-->
235
- <!-- </v-select>-->
236
- <!--</div>-->
237
- <!--<div class="col-sm-6 form-group "-->
238
- <!-- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">-->
239
- <!-- <label class="font_normal_body">街道/乡镇</label>-->
240
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"-->
241
- <!-- >-->
242
- <!-- <v-select :value.sync="model.f_street_id" :value-single="true"-->
243
- <!-- :options='streetslist' placeholder='请选择'-->
244
- <!-- @change="streetChange"-->
245
- <!-- close-on-select search="true">-->
246
- <!-- </v-select>-->
247
-
248
- <!--</div>-->
249
- <!--<div class="col-sm-6 form-group "-->
250
- <!-- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">-->
251
- <!-- <label class="font_normal_body">集收单位</label>-->
252
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"-->
253
- <!-- v-validate:f_residential_area_id='{required: true }'>-->
254
- <!-- <v-select :value.sync="model.f_residential_area_id" :value-single="true"-->
255
- <!-- :options='areaslist' placeholder='请选择'-->
256
- <!-- @change="" @select-search="selectSearch"-->
257
- <!-- close-on-select search="true">-->
258
- <!-- </v-select>-->
259
- <!--</div>-->
260
- <!--</div>-->
261
- </slot>
262
- <!--公司等属性-->
263
- <div class="col-sm-12 form-group text-center" style="padding-top:8px">
264
- <div class="col-sm-3 form-group center-block">
265
- <label class="col-sm-5">所属公司:</label>
266
- <div class="col-sm-6" style="text-align: left">
267
- {{model.orgs}}
268
- </div>
269
- </div>
270
- <div class="col-sm-3 form-group center-block">
271
- <label class="col-sm-5">部门:</label>
272
- <div class="col-sm-6" style="text-align: left">
273
- {{model.parentname}}
274
- </div>
275
- </div>
276
- <div class="col-sm-3 form-group center-block">
277
- <label class="col-sm-5">操作人:</label>
278
- <div class="col-sm-6 " style="text-align: left">
279
- {{model.operator}}
280
- </div>
281
- </div>
282
- <div class="col-sm-3 form-group center-block">
283
- <label class="col-sm-5">操作日期:</label>
284
- <div class="col-sm-6" style="text-align: left">
285
- {{model.operate_date}}
286
- </div>
287
- </div>
288
- </div>
289
- <!-- 按钮组 -->
290
- <div class="from-group col-sm-12 text-center">
291
- <!-- 按钮组 -->
292
- <button v-for="(index,button) in data.buttons"
293
- :disabled="(button.disabled && disable_button)"
294
- style="min-width:100px"
295
- :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
296
- v-if="!button.hidden && button.button_name !=='提交'&& button.button_name !=='确认'"
297
- @click.prevent="click_but(button)"
298
- >
299
- {{button.button_name}}
300
- </button>
301
- <button v-for="(index,button) in data.buttons"
302
- :disabled="(button.disabled && disable_button) || (!$v.valid)"
303
- style="min-width:100px"
304
- :class="button.disabled && disable_button || (!$v.valid) ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
305
- v-if="!button.hidden && (button.button_name ==='提交'||button.button_name ==='确认')"
306
- @click.prevent="click_but(button)"
307
- >
308
- {{button.button_name}}
309
- </button>
310
- </div>
311
-
312
- <!-- 按钮模态框 -->
313
- <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
314
- <header slot="modal-header" class="modal-header">
315
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
316
- <span class="modal-title"><font
317
- size="3">{{data.button.button_name}}</font></span>
318
- </header>
319
- <article slot="modal-body" class="modal-body clearfix">
320
- <div class="form-group" style="padding: 0 150px">
321
- <div v-for="(index,item) in data.button.button_fields">
322
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
323
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
324
- <label :style="item.label_style ? item.label_style : ''"
325
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
326
- <div :style="item.value_style ? item.value_style : ''"
327
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
328
- <input class="form-control input_view"
329
- :placeholder="item.placeholder"
330
- :type="item.type"
331
- v-model="item.value"
332
- :value="item.value"
333
- :readonly="item.readonly"
334
- :disabled="item.disabled"
335
- @change="onbutchange(index)"
336
- @blur="onbutblur(index)"
337
- @input="onbutinput(index)"
338
- />
339
- </div>
340
- </div>
341
-
342
- <!--时间datepicker-->
343
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
344
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
345
- <label :style="item.label_style ? item.label_style : ''"
346
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
347
- <div :style="item.value_style ? item.value_style : ''"
348
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
349
- <datepicker
350
- :placeholder="item.placeholder"
351
- :value.sync="item.value"
352
- v-model="item.value"
353
- :readonly="item.readonly"
354
- :disabled="item.disabled"
355
- :format="item.format ? item.format : 'yyyy-MM-dd'"
356
- :show-reset-button="true"
357
- @change="onbutchange(index)"
358
- @blur="onbutblur(index)"
359
- ></datepicker>
360
- </div>
361
- </div>
362
-
363
- <!--select-->
364
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
365
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
366
- <label :style="item.label_style ? item.label_style : ''"
367
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
368
- <div :style="item.value_style ? item.value_style : ''"
369
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
370
- <input-select
371
- class="select select_list"
372
- :value.sync="item.value"
373
- v-model="item.value"
374
- :options='item.options'
375
- :readonly="item.readonly"
376
- :disable="item.disabled"
377
- :valueSingle="true"
378
- @blur="onbutblur(index)"
379
- @change="onbutchange(index)"
380
- ></input-select>
381
- </div>
382
- </div>
383
-
384
- <!--textarea-->
385
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
386
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
387
- <label :style="item.label_style ? item.label_style : ''"
388
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
389
- <div :style="item.value_style ? item.value_style : ''"
390
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
391
- <textarea
392
- class="form-control input_view"
393
- style="width: 100%;height: 100%"
394
- v-model="item.value"
395
- :value="item.value"
396
- :rows="item.rows"
397
- :readonly="item.readonly"
398
- :disabled="item.disabled"
399
- @change="onbutchange(index)"
400
- @blur="onbutblur(index)"
401
- @input="onbutinput(index)"
402
- ></textarea>
403
- </div>
404
- </div>
405
- </div>
406
- </div>
407
- </article>
408
- <footer slot="modal-footer" class="modal-footer">
409
- <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
410
- :disabled="disable_modal_button" type="button" @click="confirmModal()">
411
- 确认
412
- </button>
413
- </footer>
414
- </modal>
415
- </form>
416
- </div>
417
- </template>
418
- <script>
419
- import Vue from 'vue'
420
- import {isEmpty} from '../Util'
421
- import {HttpResetClass} from 'vue-client'
422
- // Date格式化
423
- Date.prototype.Format = function (fmt) {
424
- var o = {
425
- 'M+': this.getMonth() + 1, // 月份
426
- 'd+': this.getDate(), // 日
427
- 'H+': this.getHours(), // 小时
428
- 'm+': this.getMinutes(), // 分
429
- 's+': this.getSeconds(), // 秒
430
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
431
- 'S': this.getMilliseconds() // 毫秒
432
- }
433
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
434
- for (var k in o) {
435
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
436
- }
437
- return fmt
438
- }
439
-
440
- export default {
441
- title: '报建业务通用组件',
442
- props: {
443
- data: {
444
- type: Object
445
- }
446
- },
447
- data () {
448
- return {
449
- model: {}, // 公司等属性
450
- disable_button: true, // 控制按钮禁用
451
- disable_modal_button: true, // 控制按钮禁用
452
- //初始化省市区数据
453
- pcdslist: [],
454
- //初始化街道数据
455
- streetslist: [],
456
- //初始化街道数据
457
- areaslist: [],
458
- showButModal: false,
459
- areaData:{
460
- sjvalue:'',
461
- xianvalue:'',
462
- sqvalue:'',
463
- },
464
- templatlng: {
465
- gaodetemplng: "",
466
- gaodetemplat: "",
467
- baidutemplng: "",
468
- baidutemplat: ""
469
- }
470
- }
471
- },
472
- watch: {
473
- deep: true
474
- },
475
- computed: {
476
-
477
- },
478
- created () {
479
- // 初始化数据
480
- this.initializtion()
481
- if (this.data.readyEvent) {
482
- this.$dispatch(this.data.readyEvent)
483
- }
484
- this.$dispatch('initializtionView')
485
- },
486
- methods: {
487
- // 初始化数据
488
- initializtion () {
489
- for (const item of this.data.fields) {
490
- this.data[item.field] = item.value
491
- }
492
-
493
- // 是否禁用按钮
494
- this.disableButton()
495
- // 公司等属性初始化
496
- if (this.data.orgs) {
497
- this.model.orgs = this.data.orgs
498
- } else {
499
- this.model.orgs = this.$login.f.orgs
500
- }
501
- if (this.data.parentname) {
502
- this.model.parentname = this.data.parentname
503
- } else {
504
- this.model.parentname = this.$login.f.f_department_name
505
- }
506
- if (this.data.operate_date) {
507
- this.model.operate_date = this.data.operate_date
508
- } else {
509
- this.model.operate_date = new Date().Format('yyyy-MM-dd')
510
- }
511
- if (this.data.operator) {
512
- this.model.operator = this.data.operator
513
- } else {
514
- this.model.operator = this.$login.f.name
515
- }
516
-
517
- this.initpcds(` j_orgid = '${this.$login.f.orgid}'`)
518
- },
519
- async getSelectShijiValue(sjvalue,sjlable) {
520
- this.areaData.sjvalue = sjvalue
521
- console.log("这是父级接收的市级值:",sjvalue,sjlable)
522
- this.data.areaData = this.areaData
523
-
524
- // 是否禁用按钮
525
- this.disableButton()
526
- },
527
- async getSelectXianValue(xianvalue,xianlable) {
528
- this.areaData.xianvalue = xianvalue
529
- this.data.areaData = this.areaData
530
- console.log("这是父级接收的县级值:",xianvalue,xianlable)
531
-
532
- // 是否禁用按钮
533
- this.disableButton()
534
- },
535
- async getSelectShequValue(sqvalue,sqlable) {
536
- this.areaData.sqvalue = sqvalue
537
- this.data.areaData = this.areaData
538
- console.log("这是父级接收的社区值:",sqvalue,sqlable)
539
-
540
- // 是否禁用按钮
541
- this.disableButton()
542
- },
543
- //初始化省市区,添加街道
544
- async initpcds(pconditon) {
545
- // console.log('initpcds', pconditon)
546
- // this.pcdslist = []
547
- // let HttpReset = new HttpResetClass()
548
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
549
- // data: {
550
- // items: '*',
551
- // tablename: 'j_bjqpcd',
552
- // orderitem: 'id',
553
- // condition: pconditon
554
- // }
555
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
556
- // let redata = []
557
- // req.data.forEach((row, n) => {
558
- // redata[n] = {
559
- // label: row.j_areaname,
560
- // value: row.j_areaid,
561
- // data: row,
562
- // id: row.id
563
- // }
564
- // })
565
- // console.log('市区', redata)
566
- // this.pcdslist = redata
567
- },
568
- //初始化街道 添加小区
569
- async initstreets(pconditon) {
570
- // console.log('市区32', pconditon)
571
- // this.streetslist = []
572
- // let HttpReset = new HttpResetClass()
573
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
574
- // data: {
575
- // items: '*',
576
- // tablename: 'j_bjqstreet',
577
- // orderitem: 'id',
578
- // condition: pconditon
579
- // }
580
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
581
- // let redata = []
582
- // req.data.forEach((row, n) => {
583
- // redata[n] = {
584
- // label: row.j_areaname,
585
- // value: row.j_areaid,
586
- // data: row,
587
- // id: row.id
588
- // }
589
- // })
590
- // console.log('市区333', redata)
591
- // this.streetslist = redata
592
- // this.model.f_iscity = this.findbyid(this.streetslist, this.model.f_street_id).f_iscity
593
- },
594
- //初始化小区添加小区
595
- async initareas(pconditon) {
596
- // if(this.usertype){
597
- // pconditon=pconditon+` and f_special='1' `
598
- // }
599
- // this.areaslist = []
600
- // let HttpReset = new HttpResetClass()
601
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=100', {
602
- // data: {
603
- // items: '*',
604
- // tablename: 'j_bjqarea',
605
- // orderitem: 'id',
606
- // condition: pconditon
607
- // }
608
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
609
- // let redata = []
610
- // req.data.forEach((row) => {
611
- // redata.push({
612
- // label: row.j_areaname,
613
- // value: row.j_areaid,
614
- // data: row,
615
- // id: row.id
616
- // })
617
- // })
618
- // console.log('市区666', redata)
619
- // if (redata.length>0){
620
- // this.areaslist = redata
621
- // }
622
- },
623
- //省/市/区变化
624
- async pcdChange(val) {
625
-
626
- // console.log("省/市/区变化", val)
627
- // console.log("省/市/区变化", ` f_pcd_id ='${val}' `)
628
- // if (val) {
629
- // //那就把[小区,街道]重新组织一下
630
- // await this.initstreets(` j_parentid ='${val}' `)
631
- // if (this.model.f_street_id) {
632
- // if (this.findbyid(this.streetslist, this.model.f_street_id)) {
633
- // let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
634
- // if (pcd_id != val) {
635
- // this.model.f_street_id = ''
636
- // }
637
- // } else {
638
- // this.model.f_street_id = ''
639
- // }
640
- //
641
- // //那就把[小区,街道]重新组织一下
642
- // if (this.model.f_street_id) {
643
- // await this.initareas(` j_parentid ='${this.model.f_street_id}' `)
644
- // if (this.model.f_residential_area_id) {
645
- // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
646
- // let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
647
- // if (pcd_id != val) {
648
- // this.model.f_residential_area_id = ''
649
- // }
650
- // } else {
651
- // this.model.f_residential_area_id = ''
652
- // }
653
- //
654
- // }
655
- // }
656
- // }
657
- // }
658
- // this.$resetValidation()
659
- },
660
- //街道变化
661
- async streetChange(val) {
662
- // console.log("街道变化", val)
663
- // if (this.streetslist[0]) {
664
- // var street = ''
665
- // this.streetslist.forEach((item) => {
666
- // if (item.id === val) {
667
- // street = item.label
668
- // }
669
- // })
670
- // this.model.f_address = street
671
- // }
672
- // if (val) {
673
- // //那就把[小区]重新组织一下
674
- // await this.initareas(` j_parentid ='${val}' `)
675
- // if (this.model.f_residential_area_id) {
676
- // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
677
- // let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
678
- // if (street_id != val) {
679
- // this.model.f_residential_area_id = ''
680
- // }
681
- // } else {
682
- // this.model.f_residential_area_id = ''
683
- // }
684
- //
685
- // }
686
- // }
687
- // this.$resetValidation()
688
- },
689
- // 是否禁用按钮
690
- disableButton () {
691
- let flag = false
692
- for (const field of this.data.fields) {
693
- if (field.required && !field.value && !field.hidden && field.value !== 0) {
694
- flag = true
695
- }
696
-
697
- // 任何选择框只要是否都不能提交
698
- if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
699
- flag = true
700
- }
701
-
702
- if (field.type === 'checkbox' && field.required && field.value.length === 0) {
703
- flag = true
704
- }
705
- }
706
-
707
- //区域下拉框必选 流程模式为报警器报建
708
- if ((this.data.f_apply_type === '报警器报建' || this.data.f_apply_type === '工商业报警器报建') && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
709
- if (!flag){
710
- if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
711
- || this.areaData.xianvalue == null || this.areaData.xianvalue.length == 0){
712
- console.log("区域为空禁止提交:",this.areaData)
713
- flag = true
714
- }
715
-
716
- if (this.templatlng.baidutemplat ==null || this.templatlng.baidutemplat.length ==0 || this.templatlng.baidutemplng == null || this.templatlng.baidutemplng.length ==0
717
- || this.templatlng.gaodetemplat == null || this.templatlng.gaodetemplat.length == 0 || this.templatlng.gaodetemplng == null || this.templatlng.gaodetemplng.length == 0){
718
- console.log("地图坐标为空禁止提交:",this.templatlng)
719
- flag = true
720
- }
721
- }
722
- }
723
- this.disable_button = flag
724
- },
725
- // 失去焦点且值最终发生变化触发
726
- async onchange (index) {
727
- // 是否禁用按钮
728
- this.disableButton()
729
-
730
- if (!isEmpty(this.data.fields[index].value)) {
731
- // 前缀、后缀
732
- if (this.data.fields[index].prefix) {
733
- this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
734
- }
735
- if (this.data.fields[index].suffix) {
736
- this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
737
- }
738
- }
739
-
740
- // data赋值
741
- this.data[this.data.fields[index].field] = this.data.fields[index].value
742
-
743
- if (this.data.fields[index].type === 'datepicker') {
744
- this.check_datepicker(index)
745
- }
746
-
747
- if (this.data.fields[index].onchange) {
748
- this.$dispatch(this.data.fields[index].onchange, index)
749
- }
750
- this.$dispatch('onchange', index)
751
- },
752
- // 失去焦点触发,无论值是否发生变化
753
- onblur (index) {
754
- this.disableButton()
755
-
756
- if (this.data.fields[index].onblur) {
757
- this.$dispatch(this.data.fields[index].onblur, index)
758
- }
759
-
760
- this.$dispatch('onblur', index)
761
- },
762
- oninput (index) {
763
- // 是否禁用按钮
764
- this.disableButton()
765
-
766
- if (this.data.fields[index].oninput) {
767
- this.$dispatch(this.data.fields[index].oninput, index)
768
- }
769
- this.$dispatch('oninput', index)
770
- },
771
- selectSearch(event, index) {
772
- if (this.data.fields[index].selectSearch) {
773
- this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
774
- }
775
- this.$dispatch('selectSearch', event[0], index)
776
- },
777
- // 点击按钮组按钮
778
- async click_but (button) {
779
- //报警器区域地址
780
- this.data.areaData = this.areaData
781
- this.data.templatlng = this.templatlng
782
-
783
- this.disable_button = true
784
-
785
- this.data.fields.forEach(item => {
786
- this.data[item.field] = item.value
787
- })
788
-
789
- this.data.button = button
790
-
791
- if (button.button_fields && button.button_fields.length > 0) {
792
- this.showButModal = true
793
- return
794
- }
795
-
796
- if (this.data.button.event) {
797
- this.$dispatch(this.data.button.event)
798
- } else {
799
- this.$dispatch('button')
800
- }
801
-
802
- },
803
- confirmModal () {
804
- this.closeModal()
805
-
806
- this.data.button.button_fields.forEach(item => {
807
- this.data.button[item.field] = item.value
808
- })
809
-
810
- if (this.data.button.event) {
811
- this.$dispatch(this.data.button.event)
812
- } else {
813
- this.$dispatch('button')
814
- }
815
- },
816
- // 关闭模态框
817
- closeModal () {
818
- this.showButModal = false
819
- this.disable_modal_button = false
820
- },
821
- onbutchange (index) {
822
- // 是否禁用按钮
823
- this.disableModalButton()
824
-
825
- if (this.data.button.button_fields[index].onchange) {
826
- this.$dispatch(this.data.button.button_fields[index].onchange, index)
827
- } else {
828
- this.$dispatch('onbutchange', index)
829
- }
830
-
831
- },
832
- onbutblur (index) {
833
- this.disableModalButton()
834
-
835
- if (this.data.button.button_fields[index].onblur) {
836
- this.$dispatch(this.data.button.button_fields[index].onblur, index)
837
- } else {
838
- this.$dispatch('onbutblur', index)
839
- }
840
- },
841
- onbutinput (index) {
842
- // 是否禁用按钮
843
- this.disableModalButton()
844
-
845
- if (this.data.button.button_fields[index].oninput) {
846
- this.$dispatch(this.data.button.button_fields[index].oninput, index)
847
- } else {
848
- this.$dispatch('onbutinput', index)
849
- }
850
- },
851
- disableModalButton () {
852
- let flag = false
853
-
854
-
855
- for (const item of this.data.button.button_fields) {
856
- if (item.required && !item.value) {
857
- if (item.value === 0) {
858
- flag = false
859
- } else {
860
- flag = true
861
- }
862
- }
863
- }
864
-
865
- this.disable_modal_button = flag
866
- },
867
- check_datepicker (index) {
868
- // 时间格式检测
869
- if (!isEmpty(this.data.fields[index].value)) {
870
-
871
- let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
872
- let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
873
- let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
874
- if (this.data.fields[index].format) {
875
- if (this.data.fields[index].format === 'yyyy-MM-dd') {
876
- if (!dateReg.test(this.data.fields[index].value)) {
877
- this.data.fields[index].value = ''
878
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
879
- }
880
- }
881
- if (this.data.fields[index].format === 'HH:mm:ss') {
882
- if (!timeReg.test(this.data.fields[index].value)) {
883
- this.data.fields[index].value = ''
884
- this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
885
- }
886
- }
887
- if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
888
- if (!datetimeReg.test(this.data.fields[index].value)) {
889
- this.data.fields[index].value = ''
890
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
891
- }
892
- }
893
- } else {
894
- if (!dateReg.test(this.data.fields[index].value)) {
895
- this.data.fields[index].value = ''
896
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
897
- }
898
- }
899
- }
900
- }
901
- },
902
- events: {
903
-
904
- }
905
- }
906
- </script>
907
- <style>
908
- .datepicker{
909
- width: 100%!important;
910
- }
911
- .datepicker-input{
912
- background-color: #ffffff!important;
913
- width: 100%!important;
914
- }
915
- .datepicker-input:disabled{
916
- border: 1px solid #DDD!important;
917
- color: #ACA899!important;
918
- width: 100%!important;
919
- }
920
- </style>
921
- <style scoped>
922
- th{
923
- font-size: 15px !important;
924
- text-align: center !important;
925
- background-color: #dfedfb!important;
926
- color: #666666 !important;
927
- font-family: PINGFANG-BOLD !important;
928
- font-weight: normal!important;
929
- }
930
- /*清除model中的浮动*/
931
- .clearfix:after,.clearfix:before{
932
- display: table;
933
- }
934
- .clearfix:after{
935
- clear: both;
936
- }
937
-
938
- .input_view{
939
- padding: 8px;
940
- background-color: #ffffff;
941
- border-radius: 2px;
942
- border: solid 1px #c7c7c7!important;
943
- color: #333333!important;
944
- font-size: 15px!important;
945
- }
946
-
947
- .input_view[readonly]{
948
- border: 1px solid #DDD!important;
949
- color:#ACA899!important;
950
- }
951
- .input_view:disabled{
952
- border: 1px solid #DDD!important;
953
- color:#ACA899!important;
954
- }
955
-
956
- .control-label-justify {
957
- display: inline-block;
958
- vertical-align: top;
959
- width: 110px;
960
- text-align: justify;
961
- font-family: PingFang-SC-Bold;
962
- }
963
-
964
- .control-label-justify::after {
965
- content: "";
966
- display: inline-block;
967
- width: 100%;
968
- overflow: hidden;
969
- height: 0;
970
- }
971
-
972
- input::-webkit-outer-spin-button,
973
- input::-webkit-inner-spin-button {
974
- -webkit-appearance: none;
975
- }
976
-
977
- input[type="number"] {
978
- -moz-appearance: textfield;
979
- }
980
-
981
- </style>
1
+ <template>
2
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
+ <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
+ <form class="form-horizontal">
5
+ <div class="form-group">
6
+ <div v-for="(index,item) in data.fields">
7
+ <!--input-->
8
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device) && ( item.label != '证件号码')&&( item.label !== '身份证') && (item.label !== '用户电话')"
10
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
+ <label :style="item.label_style ? item.label_style : ''"
12
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
+ <div :style="item.value_style ? item.value_style:''"
14
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
+ <input class="form-control input_view" style=""
16
+ :type="item.type"
17
+ v-model="data.fields[index].value"
18
+ :placeholder="item.placeholder"
19
+ :value="data.fields[index].value"
20
+ :readonly="item.readonly"
21
+ :disabled="item.disabled"
22
+ @change="onchange(index)"
23
+ @blur="onblur(index)"
24
+ @input="oninput(index)"
25
+ />
26
+ </div>
27
+ </div>
28
+
29
+ <!--input-->
30
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
+ v-if="((data.f_credentials === '军官证' ||data.f_credentials === '营业执照')&& item.label === '证件号码')"
32
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
33
+ <label :style="item.label_style ? item.label_style : ''"
34
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
35
+ <div :style="item.value_style ? item.value_style:''"
36
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
+ <input class="form-control input_view" style=""
38
+ :type="item.type"
39
+ v-model="data.fields[index].value"
40
+ :placeholder="item.placeholder"
41
+ :value="data.fields[index].value"
42
+ :readonly="item.readonly"
43
+ :disabled="item.disabled"
44
+ @change="onchange(index)"
45
+ @blur="onblur(index)"
46
+ @input="oninput(index)"
47
+ />
48
+ </div>
49
+ </div>
50
+ <!--身份证验证-->
51
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
52
+ v-if="(item.label==='身份证') || (data.f_credentials === '身份证' && item.label === '证件号码')"
53
+ :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
54
+ <label :style="item.label_style ? item.label_style : ''"
55
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
56
+ <div :style="item.value_style ? item.value_style:''"
57
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
58
+ <input class="form-control input_view" style=""
59
+ :type="item.type"
60
+ maxlength="18"
61
+ v-model="data.fields[index].value"
62
+ :placeholder="item.placeholder"
63
+ :value="data.fields[index].value"
64
+ v-validate:f_idnumber2='{identityCardValid: true}'
65
+ :readonly="item.readonly"
66
+ :disabled="item.disabled"
67
+ @change="onchange(index)"
68
+ @blur="onblur(index)"
69
+ @input="oninput(index)"
70
+ />
71
+ </div>
72
+ </div>
73
+
74
+
75
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
76
+ v-if="item.label === '用户电话'"
77
+ :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
78
+ <label :style="item.label_style ? item.label_style : ''"
79
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
80
+ <div :style="item.value_style ? item.value_style:''"
81
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
82
+ <input class="form-control input_view" style=""
83
+ type="number"
84
+ oninput="if(value.length > 11) value=value.slice(0,11)"
85
+ v-validate:f_user_phone="{minlength: 7, maxlength: 11 }"
86
+ v-model="data.fields[index].value"
87
+ :placeholder="item.placeholder"
88
+ :value="data.fields[index].value"
89
+ onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
90
+ :readonly="item.readonly"
91
+ :disabled="item.disabled"
92
+ @change="onchange(index)"
93
+ @blur="onblur(index)"
94
+ @input="oninput(index)"
95
+ />
96
+ </div>
97
+ </div>
98
+
99
+
100
+
101
+ <!--时间datepicker-->
102
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
103
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
104
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
105
+ <label
106
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
107
+ <div :style="item.value_style ? item.value_style:''"
108
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
109
+ <datepicker
110
+ @change="onchange(index)"
111
+ @blur="onblur(index)"
112
+ :placeholder="item.placeholder"
113
+ :value.sync="data.fields[index].value"
114
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
115
+ v-model="data.fields[index].value"
116
+ :readonly="item.readonly"
117
+ :disabled="item.disabled"
118
+ :show-reset-button="reset">
119
+ </datepicker>
120
+ </div>
121
+ </div>
122
+
123
+ <!--textarea-->
124
+ <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
125
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
126
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
127
+ <label :style="item.label_style ? item.label_style : ''"
128
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
129
+ <div :style="item.value_style ? item.value_style:''"
130
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
131
+ <textarea
132
+ :readonly="item.readonly"
133
+ :disabled="item.disabled"
134
+ class="form-control input_view"
135
+ style="width: 100%;height: 100%"
136
+ :rows="item.rows"
137
+ v-model="data.fields[index].value"
138
+ :value="data.fields[index].value"
139
+ @change="onchange(index)"
140
+ @blur="onblur(index)"
141
+ @input="oninput(index)"
142
+ >
143
+ </textarea>
144
+ </div>
145
+ </div>
146
+
147
+ <!--select-->
148
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
149
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)"
150
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
151
+ <label
152
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
153
+ <div :style="item.value_style ? item.value_style:''"
154
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
155
+ <input-select
156
+ class="select select_list"
157
+ @blur="onblur(index)"
158
+ @change="onchange(index)"
159
+ @select-search="selectSearch($arguments,index)"
160
+ :readonly="item.readonly"
161
+ :disable="item.disabled"
162
+ :value.sync="data.fields[index].value"
163
+ v-model="data.fields[index].value"
164
+ :options='data.fields[index].options'
165
+ :valueSingle="true"></input-select>
166
+ </div>
167
+ </div>
168
+
169
+ <!--checkbox-->
170
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
171
+ v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
172
+ :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
173
+ <label v-if="item.label"
174
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
175
+ <div :style="item.value_style ? item.value_style:''"
176
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
177
+ <label class="checkbox-inline" v-for="(index2,row) in item.options">
178
+ <input type="checkbox" class=""
179
+ :readonly="data.fields[index].readonly"
180
+ :disabled="data.fields[index].disabled"
181
+ v-model="data.fields[index].value"
182
+ :value="data.fields[index].options[index2].value"
183
+ @change="onchange(index)"
184
+ @blur="onblur(index)">
185
+ {{row.label}}
186
+ </label>
187
+ </div>
188
+ </div>
189
+ </div>
190
+ <!--区域地址联动-->
191
+ <div>
192
+ <res-area-select-group
193
+ v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
194
+ labelstyle = "control-label"
195
+ @shiji-select = "getSelectShijiValue"
196
+ @xian-select = "getSelectXianValue"
197
+ @shequ-select = "getSelectShequValue"
198
+ >
199
+ </res-area-select-group>
200
+ </div>
201
+
202
+ <gaode-map
203
+ v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
204
+ >
205
+
206
+ </gaode-map>
207
+
208
+ </div>
209
+
210
+ <!-- onetomany -->
211
+ <div class="" v-for="(index,item) in data.onetomany">
212
+ <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
213
+ </div>
214
+
215
+ <div v-for="(i,item) in data.components">
216
+ <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
217
+ </div>
218
+
219
+ <!--自定义组件-->
220
+ <slot>
221
+ <!--<div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"-->
222
+ <!-- v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工'"-->
223
+ <!-- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">-->
224
+
225
+ <!--<div class="col-sm-6 form-group "-->
226
+ <!-- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">-->
227
+ <!-- <label class="font_normal_body">省&ensp;市&ensp;区</label>-->
228
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"-->
229
+ <!-- v-validate:f_pcd_id='{required: true }'-->
230
+ <!-- >-->
231
+
232
+ <!-- <v-select :value.sync="model.f_pcd_id" :value-single="true"-->
233
+ <!-- :options='pcdslist' placeholder='请选择2'-->
234
+ <!-- close-on-select search="true" @change="pcdChange">-->
235
+ <!-- </v-select>-->
236
+ <!--</div>-->
237
+ <!--<div class="col-sm-6 form-group "-->
238
+ <!-- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">-->
239
+ <!-- <label class="font_normal_body">街道/乡镇</label>-->
240
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"-->
241
+ <!-- >-->
242
+ <!-- <v-select :value.sync="model.f_street_id" :value-single="true"-->
243
+ <!-- :options='streetslist' placeholder='请选择'-->
244
+ <!-- @change="streetChange"-->
245
+ <!-- close-on-select search="true">-->
246
+ <!-- </v-select>-->
247
+
248
+ <!--</div>-->
249
+ <!--<div class="col-sm-6 form-group "-->
250
+ <!-- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">-->
251
+ <!-- <label class="font_normal_body">集收单位</label>-->
252
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"-->
253
+ <!-- v-validate:f_residential_area_id='{required: true }'>-->
254
+ <!-- <v-select :value.sync="model.f_residential_area_id" :value-single="true"-->
255
+ <!-- :options='areaslist' placeholder='请选择'-->
256
+ <!-- @change="" @select-search="selectSearch"-->
257
+ <!-- close-on-select search="true">-->
258
+ <!-- </v-select>-->
259
+ <!--</div>-->
260
+ <!--</div>-->
261
+ </slot>
262
+ <!--公司等属性-->
263
+ <div class="col-sm-12 form-group text-center" style="padding-top:8px">
264
+ <div class="col-sm-3 form-group center-block">
265
+ <label class="col-sm-5">所属公司:</label>
266
+ <div class="col-sm-6" style="text-align: left">
267
+ {{model.orgs}}
268
+ </div>
269
+ </div>
270
+ <div class="col-sm-3 form-group center-block">
271
+ <label class="col-sm-5">部门:</label>
272
+ <div class="col-sm-6" style="text-align: left">
273
+ {{model.parentname}}
274
+ </div>
275
+ </div>
276
+ <div class="col-sm-3 form-group center-block">
277
+ <label class="col-sm-5">操作人:</label>
278
+ <div class="col-sm-6 " style="text-align: left">
279
+ {{model.operator}}
280
+ </div>
281
+ </div>
282
+ <div class="col-sm-3 form-group center-block">
283
+ <label class="col-sm-5">操作日期:</label>
284
+ <div class="col-sm-6" style="text-align: left">
285
+ {{model.operate_date}}
286
+ </div>
287
+ </div>
288
+ </div>
289
+ <!-- 按钮组 -->
290
+ <div class="from-group col-sm-12 text-center">
291
+ <!-- 按钮组 -->
292
+ <button v-for="(index,button) in data.buttons"
293
+ :disabled="(button.disabled && disable_button)"
294
+ style="min-width:100px"
295
+ :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
296
+ v-if="!button.hidden && button.button_name !=='提交'&& button.button_name !=='确认'"
297
+ @click.prevent="click_but(button)"
298
+ >
299
+ {{button.button_name}}
300
+ </button>
301
+ <button v-for="(index,button) in data.buttons"
302
+ :disabled="(button.disabled && disable_button) || (!$v.valid)"
303
+ style="min-width:100px"
304
+ :class="button.disabled && disable_button || (!$v.valid) ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
305
+ v-if="!button.hidden && (button.button_name ==='提交'||button.button_name ==='确认')"
306
+ @click.prevent="click_but(button)"
307
+ >
308
+ {{button.button_name}}
309
+ </button>
310
+ </div>
311
+
312
+ <!-- 按钮模态框 -->
313
+ <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
314
+ <header slot="modal-header" class="modal-header">
315
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
316
+ <span class="modal-title"><font
317
+ size="3">{{data.button.button_name}}</font></span>
318
+ </header>
319
+ <article slot="modal-body" class="modal-body clearfix">
320
+ <div class="form-group" style="padding: 0 150px">
321
+ <div v-for="(index,item) in data.button.button_fields">
322
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
323
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
324
+ <label :style="item.label_style ? item.label_style : ''"
325
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
326
+ <div :style="item.value_style ? item.value_style : ''"
327
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
328
+ <input class="form-control input_view"
329
+ :placeholder="item.placeholder"
330
+ :type="item.type"
331
+ v-model="item.value"
332
+ :value="item.value"
333
+ :readonly="item.readonly"
334
+ :disabled="item.disabled"
335
+ @change="onbutchange(index)"
336
+ @blur="onbutblur(index)"
337
+ @input="onbutinput(index)"
338
+ />
339
+ </div>
340
+ </div>
341
+
342
+ <!--时间datepicker-->
343
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
344
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
345
+ <label :style="item.label_style ? item.label_style : ''"
346
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
347
+ <div :style="item.value_style ? item.value_style : ''"
348
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
349
+ <datepicker
350
+ :placeholder="item.placeholder"
351
+ :value.sync="item.value"
352
+ v-model="item.value"
353
+ :readonly="item.readonly"
354
+ :disabled="item.disabled"
355
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
356
+ :show-reset-button="true"
357
+ @change="onbutchange(index)"
358
+ @blur="onbutblur(index)"
359
+ ></datepicker>
360
+ </div>
361
+ </div>
362
+
363
+ <!--select-->
364
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
365
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
366
+ <label :style="item.label_style ? item.label_style : ''"
367
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
368
+ <div :style="item.value_style ? item.value_style : ''"
369
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
370
+ <input-select
371
+ class="select select_list"
372
+ :value.sync="item.value"
373
+ v-model="item.value"
374
+ :options='item.options'
375
+ :readonly="item.readonly"
376
+ :disable="item.disabled"
377
+ :valueSingle="true"
378
+ @blur="onbutblur(index)"
379
+ @change="onbutchange(index)"
380
+ ></input-select>
381
+ </div>
382
+ </div>
383
+
384
+ <!--textarea-->
385
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
386
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
387
+ <label :style="item.label_style ? item.label_style : ''"
388
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
389
+ <div :style="item.value_style ? item.value_style : ''"
390
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
391
+ <textarea
392
+ class="form-control input_view"
393
+ style="width: 100%;height: 100%"
394
+ v-model="item.value"
395
+ :value="item.value"
396
+ :rows="item.rows"
397
+ :readonly="item.readonly"
398
+ :disabled="item.disabled"
399
+ @change="onbutchange(index)"
400
+ @blur="onbutblur(index)"
401
+ @input="onbutinput(index)"
402
+ ></textarea>
403
+ </div>
404
+ </div>
405
+ </div>
406
+ </div>
407
+ </article>
408
+ <footer slot="modal-footer" class="modal-footer">
409
+ <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
410
+ :disabled="disable_modal_button" type="button" @click="confirmModal()">
411
+ 确认
412
+ </button>
413
+ </footer>
414
+ </modal>
415
+ </form>
416
+ </div>
417
+ </template>
418
+ <script>
419
+ import Vue from 'vue'
420
+ import {isEmpty} from '../Util'
421
+ import {HttpResetClass} from 'vue-client'
422
+ // Date格式化
423
+ Date.prototype.Format = function (fmt) {
424
+ var o = {
425
+ 'M+': this.getMonth() + 1, // 月份
426
+ 'd+': this.getDate(), // 日
427
+ 'H+': this.getHours(), // 小时
428
+ 'm+': this.getMinutes(), // 分
429
+ 's+': this.getSeconds(), // 秒
430
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
431
+ 'S': this.getMilliseconds() // 毫秒
432
+ }
433
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
434
+ for (var k in o) {
435
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
436
+ }
437
+ return fmt
438
+ }
439
+
440
+ export default {
441
+ title: '报建业务通用组件',
442
+ props: {
443
+ data: {
444
+ type: Object
445
+ }
446
+ },
447
+ data () {
448
+ return {
449
+ model: {}, // 公司等属性
450
+ disable_button: true, // 控制按钮禁用
451
+ disable_modal_button: true, // 控制按钮禁用
452
+ //初始化省市区数据
453
+ pcdslist: [],
454
+ //初始化街道数据
455
+ streetslist: [],
456
+ //初始化街道数据
457
+ areaslist: [],
458
+ showButModal: false,
459
+ areaData:{
460
+ sjvalue:'',
461
+ xianvalue:'',
462
+ sqvalue:'',
463
+ },
464
+ templatlng: {
465
+ gaodetemplng: "",
466
+ gaodetemplat: "",
467
+ baidutemplng: "",
468
+ baidutemplat: ""
469
+ }
470
+ }
471
+ },
472
+ watch: {
473
+ deep: true
474
+ },
475
+ computed: {
476
+
477
+ },
478
+ created () {
479
+ // 初始化数据
480
+ this.initializtion()
481
+ if (this.data.readyEvent) {
482
+ this.$dispatch(this.data.readyEvent)
483
+ }
484
+ this.$dispatch('initializtionView')
485
+ },
486
+ methods: {
487
+ // 初始化数据
488
+ initializtion () {
489
+ for (const item of this.data.fields) {
490
+ this.data[item.field] = item.value
491
+ }
492
+
493
+ // 是否禁用按钮
494
+ this.disableButton()
495
+ // 公司等属性初始化
496
+ if (this.data.orgs) {
497
+ this.model.orgs = this.data.orgs
498
+ } else {
499
+ this.model.orgs = this.$login.f.orgs
500
+ }
501
+ if (this.data.parentname) {
502
+ this.model.parentname = this.data.parentname
503
+ } else {
504
+ this.model.parentname = this.$login.f.f_department_name
505
+ }
506
+ if (this.data.operate_date) {
507
+ this.model.operate_date = this.data.operate_date
508
+ } else {
509
+ this.model.operate_date = new Date().Format('yyyy-MM-dd')
510
+ }
511
+ if (this.data.operator) {
512
+ this.model.operator = this.data.operator
513
+ } else {
514
+ this.model.operator = this.$login.f.name
515
+ }
516
+
517
+ this.initpcds(` j_orgid = '${this.$login.f.orgid}'`)
518
+ },
519
+ async getSelectShijiValue(sjvalue,sjlable) {
520
+ this.areaData.sjvalue = sjvalue
521
+ console.log("这是父级接收的市级值:",sjvalue,sjlable)
522
+ this.data.areaData = this.areaData
523
+
524
+ // 是否禁用按钮
525
+ this.disableButton()
526
+ },
527
+ async getSelectXianValue(xianvalue,xianlable) {
528
+ this.areaData.xianvalue = xianvalue
529
+ this.data.areaData = this.areaData
530
+ console.log("这是父级接收的县级值:",xianvalue,xianlable)
531
+
532
+ // 是否禁用按钮
533
+ this.disableButton()
534
+ },
535
+ async getSelectShequValue(sqvalue,sqlable) {
536
+ this.areaData.sqvalue = sqvalue
537
+ this.data.areaData = this.areaData
538
+ console.log("这是父级接收的社区值:",sqvalue,sqlable)
539
+
540
+ // 是否禁用按钮
541
+ this.disableButton()
542
+ },
543
+ //初始化省市区,添加街道
544
+ async initpcds(pconditon) {
545
+ // console.log('initpcds', pconditon)
546
+ // this.pcdslist = []
547
+ // let HttpReset = new HttpResetClass()
548
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
549
+ // data: {
550
+ // items: '*',
551
+ // tablename: 'j_bjqpcd',
552
+ // orderitem: 'id',
553
+ // condition: pconditon
554
+ // }
555
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
556
+ // let redata = []
557
+ // req.data.forEach((row, n) => {
558
+ // redata[n] = {
559
+ // label: row.j_areaname,
560
+ // value: row.j_areaid,
561
+ // data: row,
562
+ // id: row.id
563
+ // }
564
+ // })
565
+ // console.log('市区', redata)
566
+ // this.pcdslist = redata
567
+ },
568
+ //初始化街道 添加小区
569
+ async initstreets(pconditon) {
570
+ // console.log('市区32', pconditon)
571
+ // this.streetslist = []
572
+ // let HttpReset = new HttpResetClass()
573
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
574
+ // data: {
575
+ // items: '*',
576
+ // tablename: 'j_bjqstreet',
577
+ // orderitem: 'id',
578
+ // condition: pconditon
579
+ // }
580
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
581
+ // let redata = []
582
+ // req.data.forEach((row, n) => {
583
+ // redata[n] = {
584
+ // label: row.j_areaname,
585
+ // value: row.j_areaid,
586
+ // data: row,
587
+ // id: row.id
588
+ // }
589
+ // })
590
+ // console.log('市区333', redata)
591
+ // this.streetslist = redata
592
+ // this.model.f_iscity = this.findbyid(this.streetslist, this.model.f_street_id).f_iscity
593
+ },
594
+ //初始化小区添加小区
595
+ async initareas(pconditon) {
596
+ // if(this.usertype){
597
+ // pconditon=pconditon+` and f_special='1' `
598
+ // }
599
+ // this.areaslist = []
600
+ // let HttpReset = new HttpResetClass()
601
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=100', {
602
+ // data: {
603
+ // items: '*',
604
+ // tablename: 'j_bjqarea',
605
+ // orderitem: 'id',
606
+ // condition: pconditon
607
+ // }
608
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
609
+ // let redata = []
610
+ // req.data.forEach((row) => {
611
+ // redata.push({
612
+ // label: row.j_areaname,
613
+ // value: row.j_areaid,
614
+ // data: row,
615
+ // id: row.id
616
+ // })
617
+ // })
618
+ // console.log('市区666', redata)
619
+ // if (redata.length>0){
620
+ // this.areaslist = redata
621
+ // }
622
+ },
623
+ //省/市/区变化
624
+ async pcdChange(val) {
625
+
626
+ // console.log("省/市/区变化", val)
627
+ // console.log("省/市/区变化", ` f_pcd_id ='${val}' `)
628
+ // if (val) {
629
+ // //那就把[小区,街道]重新组织一下
630
+ // await this.initstreets(` j_parentid ='${val}' `)
631
+ // if (this.model.f_street_id) {
632
+ // if (this.findbyid(this.streetslist, this.model.f_street_id)) {
633
+ // let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
634
+ // if (pcd_id != val) {
635
+ // this.model.f_street_id = ''
636
+ // }
637
+ // } else {
638
+ // this.model.f_street_id = ''
639
+ // }
640
+ //
641
+ // //那就把[小区,街道]重新组织一下
642
+ // if (this.model.f_street_id) {
643
+ // await this.initareas(` j_parentid ='${this.model.f_street_id}' `)
644
+ // if (this.model.f_residential_area_id) {
645
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
646
+ // let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
647
+ // if (pcd_id != val) {
648
+ // this.model.f_residential_area_id = ''
649
+ // }
650
+ // } else {
651
+ // this.model.f_residential_area_id = ''
652
+ // }
653
+ //
654
+ // }
655
+ // }
656
+ // }
657
+ // }
658
+ // this.$resetValidation()
659
+ },
660
+ //街道变化
661
+ async streetChange(val) {
662
+ // console.log("街道变化", val)
663
+ // if (this.streetslist[0]) {
664
+ // var street = ''
665
+ // this.streetslist.forEach((item) => {
666
+ // if (item.id === val) {
667
+ // street = item.label
668
+ // }
669
+ // })
670
+ // this.model.f_address = street
671
+ // }
672
+ // if (val) {
673
+ // //那就把[小区]重新组织一下
674
+ // await this.initareas(` j_parentid ='${val}' `)
675
+ // if (this.model.f_residential_area_id) {
676
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
677
+ // let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
678
+ // if (street_id != val) {
679
+ // this.model.f_residential_area_id = ''
680
+ // }
681
+ // } else {
682
+ // this.model.f_residential_area_id = ''
683
+ // }
684
+ //
685
+ // }
686
+ // }
687
+ // this.$resetValidation()
688
+ },
689
+ // 是否禁用按钮
690
+ disableButton () {
691
+ let flag = false
692
+ for (const field of this.data.fields) {
693
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
694
+ flag = true
695
+ }
696
+
697
+ // 任何选择框只要是否都不能提交
698
+ if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
699
+ flag = true
700
+ }
701
+
702
+ if (field.type === 'checkbox' && field.required && field.value.length === 0) {
703
+ flag = true
704
+ }
705
+ }
706
+
707
+ //区域下拉框必选 流程模式为报警器报建
708
+ if ((this.data.f_apply_type === '报警器报建' || this.data.f_apply_type === '工商业报警器报建') && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
709
+ if (!flag){
710
+ if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
711
+ || this.areaData.xianvalue == null || this.areaData.xianvalue.length == 0){
712
+ console.log("区域为空禁止提交:",this.areaData)
713
+ flag = true
714
+ }
715
+
716
+ if (this.templatlng.baidutemplat ==null || this.templatlng.baidutemplat.length ==0 || this.templatlng.baidutemplng == null || this.templatlng.baidutemplng.length ==0
717
+ || this.templatlng.gaodetemplat == null || this.templatlng.gaodetemplat.length == 0 || this.templatlng.gaodetemplng == null || this.templatlng.gaodetemplng.length == 0){
718
+ console.log("地图坐标为空禁止提交:",this.templatlng)
719
+ flag = true
720
+ }
721
+ }
722
+ }
723
+ this.disable_button = flag
724
+ },
725
+ // 失去焦点且值最终发生变化触发
726
+ async onchange (index) {
727
+ // 是否禁用按钮
728
+ this.disableButton()
729
+
730
+ if (!isEmpty(this.data.fields[index].value)) {
731
+ // 前缀、后缀
732
+ if (this.data.fields[index].prefix) {
733
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
734
+ }
735
+ if (this.data.fields[index].suffix) {
736
+ this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
737
+ }
738
+ }
739
+
740
+ // data赋值
741
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
742
+
743
+ if (this.data.fields[index].type === 'datepicker') {
744
+ this.check_datepicker(index)
745
+ }
746
+
747
+ if (this.data.fields[index].onchange) {
748
+ this.$dispatch(this.data.fields[index].onchange, index)
749
+ }
750
+ this.$dispatch('onchange', index)
751
+ },
752
+ // 失去焦点触发,无论值是否发生变化
753
+ onblur (index) {
754
+ this.disableButton()
755
+
756
+ if (this.data.fields[index].onblur) {
757
+ this.$dispatch(this.data.fields[index].onblur, index)
758
+ }
759
+
760
+ this.$dispatch('onblur', index)
761
+ },
762
+ oninput (index) {
763
+ // 是否禁用按钮
764
+ this.disableButton()
765
+
766
+ if (this.data.fields[index].oninput) {
767
+ this.$dispatch(this.data.fields[index].oninput, index)
768
+ }
769
+ this.$dispatch('oninput', index)
770
+ },
771
+ selectSearch(event, index) {
772
+ if (this.data.fields[index].selectSearch) {
773
+ this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
774
+ }
775
+ this.$dispatch('selectSearch', event[0], index)
776
+ },
777
+ // 点击按钮组按钮
778
+ async click_but (button) {
779
+ //报警器区域地址
780
+ this.data.areaData = this.areaData
781
+ this.data.templatlng = this.templatlng
782
+
783
+ this.disable_button = true
784
+
785
+ this.data.fields.forEach(item => {
786
+ this.data[item.field] = item.value
787
+ })
788
+
789
+ this.data.button = button
790
+
791
+ if (button.button_fields && button.button_fields.length > 0) {
792
+ this.showButModal = true
793
+ return
794
+ }
795
+
796
+ if (this.data.button.event) {
797
+ this.$dispatch(this.data.button.event)
798
+ } else {
799
+ this.$dispatch('button')
800
+ }
801
+
802
+ },
803
+ confirmModal () {
804
+ this.closeModal()
805
+
806
+ this.data.button.button_fields.forEach(item => {
807
+ this.data.button[item.field] = item.value
808
+ })
809
+
810
+ if (this.data.button.event) {
811
+ this.$dispatch(this.data.button.event)
812
+ } else {
813
+ this.$dispatch('button')
814
+ }
815
+ },
816
+ // 关闭模态框
817
+ closeModal () {
818
+ this.showButModal = false
819
+ this.disable_modal_button = false
820
+ },
821
+ onbutchange (index) {
822
+ // 是否禁用按钮
823
+ this.disableModalButton()
824
+
825
+ if (this.data.button.button_fields[index].onchange) {
826
+ this.$dispatch(this.data.button.button_fields[index].onchange, index)
827
+ } else {
828
+ this.$dispatch('onbutchange', index)
829
+ }
830
+
831
+ },
832
+ onbutblur (index) {
833
+ this.disableModalButton()
834
+
835
+ if (this.data.button.button_fields[index].onblur) {
836
+ this.$dispatch(this.data.button.button_fields[index].onblur, index)
837
+ } else {
838
+ this.$dispatch('onbutblur', index)
839
+ }
840
+ },
841
+ onbutinput (index) {
842
+ // 是否禁用按钮
843
+ this.disableModalButton()
844
+
845
+ if (this.data.button.button_fields[index].oninput) {
846
+ this.$dispatch(this.data.button.button_fields[index].oninput, index)
847
+ } else {
848
+ this.$dispatch('onbutinput', index)
849
+ }
850
+ },
851
+ disableModalButton () {
852
+ let flag = false
853
+
854
+
855
+ for (const item of this.data.button.button_fields) {
856
+ if (item.required && !item.value) {
857
+ if (item.value === 0) {
858
+ flag = false
859
+ } else {
860
+ flag = true
861
+ }
862
+ }
863
+ }
864
+
865
+ this.disable_modal_button = flag
866
+ },
867
+ check_datepicker (index) {
868
+ // 时间格式检测
869
+ if (!isEmpty(this.data.fields[index].value)) {
870
+
871
+ let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
872
+ let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
873
+ let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
874
+ if (this.data.fields[index].format) {
875
+ if (this.data.fields[index].format === 'yyyy-MM-dd') {
876
+ if (!dateReg.test(this.data.fields[index].value)) {
877
+ this.data.fields[index].value = ''
878
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
879
+ }
880
+ }
881
+ if (this.data.fields[index].format === 'HH:mm:ss') {
882
+ if (!timeReg.test(this.data.fields[index].value)) {
883
+ this.data.fields[index].value = ''
884
+ this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
885
+ }
886
+ }
887
+ if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
888
+ if (!datetimeReg.test(this.data.fields[index].value)) {
889
+ this.data.fields[index].value = ''
890
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
891
+ }
892
+ }
893
+ } else {
894
+ if (!dateReg.test(this.data.fields[index].value)) {
895
+ this.data.fields[index].value = ''
896
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
897
+ }
898
+ }
899
+ }
900
+ }
901
+ },
902
+ events: {
903
+
904
+ }
905
+ }
906
+ </script>
907
+ <style>
908
+ .datepicker{
909
+ width: 100%!important;
910
+ }
911
+ .datepicker-input{
912
+ background-color: #ffffff!important;
913
+ width: 100%!important;
914
+ }
915
+ .datepicker-input:disabled{
916
+ border: 1px solid #DDD!important;
917
+ color: #ACA899!important;
918
+ width: 100%!important;
919
+ }
920
+ </style>
921
+ <style scoped>
922
+ th{
923
+ font-size: 15px !important;
924
+ text-align: center !important;
925
+ background-color: #dfedfb!important;
926
+ color: #666666 !important;
927
+ font-family: PINGFANG-BOLD !important;
928
+ font-weight: normal!important;
929
+ }
930
+ /*清除model中的浮动*/
931
+ .clearfix:after,.clearfix:before{
932
+ display: table;
933
+ }
934
+ .clearfix:after{
935
+ clear: both;
936
+ }
937
+
938
+ .input_view{
939
+ padding: 8px;
940
+ background-color: #ffffff;
941
+ border-radius: 2px;
942
+ border: solid 1px #c7c7c7!important;
943
+ color: #333333!important;
944
+ font-size: 15px!important;
945
+ }
946
+
947
+ .input_view[readonly]{
948
+ border: 1px solid #DDD!important;
949
+ color:#ACA899!important;
950
+ }
951
+ .input_view:disabled{
952
+ border: 1px solid #DDD!important;
953
+ color:#ACA899!important;
954
+ }
955
+
956
+ .control-label-justify {
957
+ display: inline-block;
958
+ vertical-align: top;
959
+ width: 110px;
960
+ text-align: justify;
961
+ font-family: PingFang-SC-Bold;
962
+ }
963
+
964
+ .control-label-justify::after {
965
+ content: "";
966
+ display: inline-block;
967
+ width: 100%;
968
+ overflow: hidden;
969
+ height: 0;
970
+ }
971
+
972
+ input::-webkit-outer-spin-button,
973
+ input::-webkit-inner-spin-button {
974
+ -webkit-appearance: none;
975
+ }
976
+
977
+ input[type="number"] {
978
+ -moz-appearance: textfield;
979
+ }
980
+
981
+ </style>