apply-clients 3.5.5-10 → 3.5.5-101

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