apply-clients 3.4.13 → 3.4.15

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 (24) hide show
  1. package/build/dev-server.js +2 -2
  2. package/package.json +1 -1
  3. package/src/AndroidApp.vue +18 -18
  4. package/src/android.js +21 -21
  5. package/src/applyAndroid.js +53 -46
  6. package/src/components/android/AppSign.vue +1 -1
  7. package/src/components/product/Process/Service/ServiceControl.vue +1 -0
  8. package/src/filiale/guangxi/android/Process/AppExplorationUser.vue +503 -0
  9. package/src/filiale/guangxi/android/Process/AppServiceControl.vue +1708 -0
  10. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +457 -0
  11. package/src/filiale/guangxi/android/Process/Processes/AppBuildSign.vue +46 -0
  12. package/src/filiale/guangxi/android/Process/Processes/AppChargeManagement.vue +637 -0
  13. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -0
  14. package/src/filiale/guangxi/android/Process/Processes/AppInstallationDetails.vue +482 -0
  15. package/src/filiale/guangxi/android/Process/Processes/AppServiceView.vue +766 -0
  16. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -0
  17. package/src/filiale/guangxi/android/Process/Processes/selectApply.vue +250 -0
  18. package/src/filiale/guangxi/android/Process/Processes/selectUserinfo.vue +182 -0
  19. package/src/filiale/guangxi/android.js +6 -14
  20. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +23 -1
  21. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +7 -0
  22. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +434 -0
  23. package/src/filiale/guangxi/pc.js +3 -1
  24. package/src/main.js +4 -4
@@ -0,0 +1,766 @@
1
+ <template>
2
+ <div class="form-horizontal select-overspread">
3
+ <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
+ <!--<form>-->
5
+ <div v-for="(index,item) in data.fields">
6
+ <!--input-->
7
+ <div :style="item.style ? item.style : ''"
8
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device) && (item.label != '证件号码')&&(item.label != '身份证') && (item.label != '用户电话')"
9
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
10
+ <label class="control-label-justify">{{item.label}}</label>
11
+ <div :style="item.value_style ? item.value_style:''"
12
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
13
+ <input class="" style="width: 100%"
14
+ :type="item.type"
15
+ v-model="data.fields[index].value"
16
+ :placeholder="item.placeholder"
17
+ :value="data.fields[index].value"
18
+ :readonly="item.readonly"
19
+ :disabled="item.disabled"
20
+ @change="onchange(index)"
21
+ @blur="onblur(index)"
22
+ @input="oninput(index)"
23
+ />
24
+ </div>
25
+ </div>
26
+
27
+ <div :style="item.style ? item.style : ''"
28
+ v-if="(data.fields[index-1].value ==='营业执照'||data.fields[index-1].value ==='军官证')&& (item.label === '证件号码')"
29
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
30
+ <label class="control-label-justify">{{item.label}}</label>
31
+ <div :style="item.value_style ? item.value_style:''"
32
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
33
+ <input class="" style="width: 100%"
34
+ :type="item.type"
35
+ v-model="data.fields[index].value"
36
+ :placeholder="item.placeholder"
37
+ :value="data.fields[index].value"
38
+ :readonly="item.readonly"
39
+ :disabled="item.disabled"
40
+ @change="onchange(index)"
41
+ @blur="onblur(index)"
42
+ @input="oninput(index)"
43
+ />
44
+ </div>
45
+ </div>
46
+
47
+
48
+ <!--input身份证验证-->
49
+ <div :style="item.style ? item.style : ''"
50
+ v-if="(item.label==='身份证') || (item.label === '证件号码' && data.fields[index-1].value ==='身份证')"
51
+ :class="[$v.f_idnumber2.identityCardValid ? 'apply-has-error' : '',item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
52
+ <label class="control-label-justify">{{item.label}}</label>
53
+ <div :style="item.value_style ? item.value_style:''"
54
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
55
+ <input class="" style="width: 100%"
56
+ :type="item.type"
57
+ maxlength="18"
58
+ v-model="data.fields[index].value"
59
+ :placeholder="item.placeholder"
60
+ :value="data.fields[index].value"
61
+ :readonly="item.readonly"
62
+ v-validate:f_idnumber2='{identityCardValid: true}'
63
+ @change="onchange(index)"
64
+ @blur="onblur(index)"
65
+ @input="oninput(index)"
66
+ />
67
+ </div>
68
+ </div>
69
+
70
+
71
+ <!--input手机号验证-->
72
+ <div :style="item.style ? item.style : ''"
73
+ v-if="item.label === '用户电话'"
74
+ :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'apply-has-error' : '',item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
75
+ <label class="control-label-justify">{{item.label}}</label>
76
+ <div :style="item.value_style ? item.value_style:''"
77
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
78
+ <input class="" style="width: 100%"
79
+ maxlength="18"
80
+ type="number"
81
+ onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
82
+ oninput="if(value.length > 11) value=value.slice(0,11)"
83
+ v-validate:f_user_phone="{minlength: 7, maxlength: 11 }"
84
+ v-model="data.fields[index].value"
85
+ :placeholder="item.placeholder"
86
+ :value="data.fields[index].value"
87
+ :readonly="item.readonly"
88
+ @change="onchange(index)"
89
+ @blur="onblur(index)"
90
+ @input="oninput(index)"
91
+ />
92
+ </div>
93
+ </div>
94
+
95
+ <!--select-->
96
+ <div :style="item.style ? item.style : ''"
97
+ v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
98
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
99
+ <label class="control-label-justify">{{item.label}}</label>
100
+ <div :style="item.value_style ? item.value_style:''"
101
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
102
+ <v-select
103
+ class="select" width="100%" align="right"
104
+ :placeholder="item.placeholder"
105
+ :search="item.search"
106
+ close-on-select value-single
107
+ @select-search="selectSearch($arguments,index)"
108
+ :options="data.fields[index].options"
109
+ v-model="data.fields[index].value"
110
+ :value.sync="data.fields[index].value"
111
+ @blur="onblur(index)"
112
+ @change="onchange(index)"
113
+ :readonly="item.readonly"
114
+ :disabled="item.disabled"
115
+ ></v-select>
116
+ </div>
117
+ </div>
118
+
119
+ <!--时间datepicker-->
120
+ <div :style="item.style ? item.style : ''"
121
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
122
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
123
+ <label class="control-label-justify">{{item.label}}</label>
124
+ <div class="form-group" :style="item.value_style ? item.value_style:''"
125
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
126
+ <datepicker
127
+ @change="onchange(index)"
128
+ @blur="onblur(index)"
129
+ :placeholder="item.placeholder"
130
+ :value.sync="data.fields[index].value"
131
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
132
+ v-model="data.fields[index].value"
133
+ :readonly="item.readonly"
134
+ :disabled="item.disabled"
135
+ :show-reset-button="true">
136
+ </datepicker>
137
+ </div>
138
+ </div>
139
+
140
+
141
+ <!--textarea-->
142
+ <div :style="item.style ? item.style : ''"
143
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device) && item.label != '通气情况'"
144
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
145
+ <label class="control-label-justify">{{item.label}}</label>
146
+ <div :style="item.value_style ? item.value_style:''"
147
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
148
+ <textarea
149
+ :readonly="item.readonly"
150
+ :disabled="item.disabled"
151
+ class="" rows="1"
152
+ style="width: 100%;height: 100%"
153
+ v-model="data.fields[index].value"
154
+ :value="data.fields[index].value"
155
+ @change="onchange(index)"
156
+ @blur="onblur(index)"
157
+ @input="oninput(index)"
158
+ ></textarea>
159
+ </div>
160
+ </div>
161
+ <div style="height: 250px"
162
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device) && item.label == '通气情况'"
163
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
164
+ <label class="control-label-justify">{{item.label}}</label>
165
+ <div :style="item.value_style ? item.value_style:''"
166
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
167
+ <textarea
168
+ :readonly="item.readonly"
169
+ :disabled="item.disabled"
170
+ class="" rows="1"
171
+ style="width: 100%;height: 100%"
172
+ v-model="data.fields[index].value"
173
+ :value="data.fields[index].value"
174
+ @change="onchange(index)"
175
+ @blur="onblur(index)"
176
+ @input="oninput(index)"
177
+ ></textarea>
178
+ </div>
179
+ </div>
180
+
181
+
182
+ <!--checkbox-->
183
+ <div :style="item.style ? item.style : ''"
184
+ v-if="item.type==='checkbox' && !item.hidden && (item.device === 'app' || !item.device)"
185
+ :class="[item.required && item.value.length === 0 ? 'apply-has-error' : '',item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
186
+ <label class="control-label-justify">{{item.label}}</label>
187
+ <div :style="item.value_style ? item.value_style:''"
188
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
189
+ <label class="" v-for="(index2,row) in item.options">
190
+ <input type="checkbox" class=""
191
+ :readonly="data.fields[index].readonly"
192
+ :disabled="data.fields[index].disabled"
193
+ v-model="data.fields[index].value"
194
+ :value="data.fields[index].options[index2].value"
195
+ @change="onchange(index)"
196
+ @blur="onblur(index)">
197
+ {{row.label}}
198
+ </label>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ <div class="col-sm-12 col-xs-12" id="test11">
203
+ <accordion one-at-a-time="true">
204
+ <panel v-for="(i,item) in data.onetomany" :header="item.title" :is-open="false" type="primary">
205
+ <app-onetomany :onetomany="item" :index="i" :selectdata="data"></app-onetomany>
206
+ </panel>
207
+ <panel v-for="(i,item) in data.components" :header="item.title" :is-open="true" type="primary" v-if="item.device === 'app' || !item.device">
208
+ <component :is="item.name" :selectdata="data" :mark="item.mark"></component>
209
+ </panel>
210
+ </accordion>
211
+ </div>
212
+
213
+ <!--自定义组件-->
214
+ <slot>
215
+
216
+ </slot>
217
+
218
+ <!-- 按钮组 -->
219
+ <div class="text-center">
220
+ <button v-for="(index,button) in data.buttons"
221
+ :disabled="button.disabled && disable_button"
222
+ style="min-width:100px"
223
+ :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
224
+ v-if="!button.hidden && button.button_name !=='提交'&& button.button_name !=='确认'"
225
+ @click.prevent="click_but(button)"
226
+ >
227
+ {{button.button_name}}
228
+ </button>
229
+ <button v-for="(index,button) in data.buttons"
230
+ :disabled="(button.disabled && disable_button) || (!$v.valid)"
231
+ style="min-width:100px"
232
+ :class="button.disabled && disable_button || (!$v.valid) ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
233
+ v-if="!button.hidden && (button.button_name ==='提交'||button.button_name ==='确认')"
234
+ @click.prevent="click_but(button)"
235
+ >
236
+ {{button.button_name}}
237
+ </button>
238
+ </div>
239
+
240
+ <!-- 按钮模态框 -->
241
+ <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
242
+ <header slot="modal-header" class="modal-header">
243
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
244
+ <span class="modal-title"><font
245
+ size="3">{{data.button.button_name}}</font></span>
246
+ </header>
247
+ <article slot="modal-body" class="modal-body clearfix">
248
+ <div class="form-group" >
249
+ <div v-for="(index,item) in data.button.button_fields">
250
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
251
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
252
+ <label :style="item.label_style ? item.label_style : ''"
253
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label'">{{item.label}}</label>
254
+ <div :style="item.value_style ? item.value_style : ''"
255
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
256
+ <input class="form-control input_view"
257
+ :placeholder="item.placeholder"
258
+ :type="item.type"
259
+ v-model="item.value"
260
+ :value="item.value"
261
+ :readonly="item.readonly"
262
+ :disabled="item.disabled"
263
+ @change="onbutchange(index)"
264
+ @blur="onbutblur(index)"
265
+ @input="onbutinput(index)"
266
+ />
267
+ </div>
268
+ </div>
269
+
270
+ <!--时间datepicker-->
271
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
272
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
273
+ <label :style="item.label_style ? item.label_style : ''"
274
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label'">{{item.label}}</label>
275
+ <div :style="item.value_style ? item.value_style : ''"
276
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
277
+ <datepicker
278
+ :placeholder="item.placeholder"
279
+ :value.sync="item.value"
280
+ v-model="item.value"
281
+ :readonly="item.readonly"
282
+ :disabled="item.disabled"
283
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
284
+ :show-reset-button="true"
285
+ @change="onbutchange(index)"
286
+ @blur="onbutblur(index)"
287
+ ></datepicker>
288
+ </div>
289
+ </div>
290
+
291
+ <!--select-->
292
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
293
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
294
+ <label :style="item.label_style ? item.label_style : ''"
295
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label'">{{item.label}}</label>
296
+ <div :style="item.value_style ? item.value_style : ''"
297
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
298
+ <input-select
299
+ class="select select_list"
300
+ :value.sync="item.value"
301
+ v-model="item.value"
302
+ :options='item.options'
303
+ :readonly="item.readonly"
304
+ :disable="item.disabled"
305
+ :valueSingle="true"
306
+ @blur="onbutblur(index)"
307
+ @change="onbutchange(index)"
308
+ ></input-select>
309
+ </div>
310
+ </div>
311
+
312
+ <!--textarea-->
313
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
314
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
315
+ <label :style="item.label_style ? item.label_style : ''"
316
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label'">{{item.label}}</label>
317
+ <div :style="item.value_style ? item.value_style : ''"
318
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
319
+ <textarea
320
+ class="form-control input_view"
321
+ style="width: 100%;height: 100%"
322
+ v-model="item.value"
323
+ :value="item.value"
324
+ :rows="item.rows"
325
+ :readonly="item.readonly"
326
+ :disabled="item.disabled"
327
+ @change="onbutchange(index)"
328
+ @blur="onbutblur(index)"
329
+ @input="onbutinput(index)"
330
+ ></textarea>
331
+ </div>
332
+ </div>
333
+ </div>
334
+ </div>
335
+ </article>
336
+ <footer slot="modal-footer" class="modal-footer">
337
+ <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
338
+ :disabled="disable_modal_button" type="button" @click="confirmModal()">
339
+ 确认
340
+ </button>
341
+ </footer>
342
+ </modal>
343
+ <!--</form>-->
344
+ </div>
345
+ </template>
346
+ <script>
347
+ import Vue from 'vue'
348
+ import {isEmpty} from "../../../../../components/Util";
349
+ // Date格式化
350
+ Date.prototype.Format = function (fmt) {
351
+ var o = {
352
+ 'M+': this.getMonth() + 1, // 月份
353
+ 'd+': this.getDate(), // 日
354
+ 'H+': this.getHours(), // 小时
355
+ 'm+': this.getMinutes(), // 分
356
+ 's+': this.getSeconds(), // 秒
357
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
358
+ 'S': this.getMilliseconds() // 毫秒
359
+ }
360
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
361
+ for (var k in o) {
362
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
363
+ }
364
+ return fmt
365
+ }
366
+
367
+ export default {
368
+ title: '报建业务通用组件',
369
+ props: {
370
+ data: {
371
+ type: Object
372
+ },
373
+ showprint: {
374
+ type: Boolean,
375
+ default: true
376
+ }
377
+ },
378
+ data () {
379
+ return {
380
+ model: {}, // 公司等属性
381
+ disable_button: true, // 控制按钮禁用
382
+ disable_modal_button: true, // 控制按钮禁用
383
+ showButModal: false,
384
+ areaData:{
385
+ sjvalue:'',
386
+ xianvalue:'',
387
+ sqvalue:'',
388
+ mapvalue:'',
389
+ }
390
+ }
391
+ },
392
+ watch: {
393
+ deep: true
394
+ },
395
+ computed: {
396
+
397
+ },
398
+ created () {
399
+ // 初始化数据
400
+ this.initializtion()
401
+ if (this.data.readyEvent) {
402
+ this.$dispatch(this.data.readyEvent)
403
+ }
404
+ this.$dispatch('initializtionView')
405
+ },
406
+ methods: {
407
+ // 初始化数据
408
+ initializtion () {
409
+ for (const item of this.data.fields) {
410
+ this.data[item.field] = item.value
411
+ }
412
+ // 是否禁用按钮
413
+ this.disableButton()
414
+ },
415
+ async getSelectShijiValue(sjvalue,sjlable) {
416
+
417
+ this.areaData.sjvalue = sjvalue
418
+ console.log("这是父级接收的市级值:",sjvalue,sjlable)
419
+ this.data.areaData = this.areaData
420
+ console.log(this.areaData)
421
+ // 是否禁用按钮
422
+ this.disableButton()
423
+ },
424
+ async getSelectXianValue(xianvalue,xianlable) {
425
+
426
+ this.areaData.xianvalue = xianvalue
427
+ this.data.areaData = this.areaData
428
+ console.log("这是父级接收的县级值:",xianvalue,xianlable)
429
+ console.log(this.areaData)
430
+
431
+ // 是否禁用按钮
432
+ this.disableButton()
433
+ },
434
+ async getSelectShequValue(sqvalue,sqlable) {
435
+ this.areaData.sqvalue = sqvalue
436
+ this.data.areaData = this.areaData
437
+ console.log(this.areaData)
438
+ console.log("这是父级接收的社区值:",sqvalue,sqlable)
439
+
440
+ // 是否禁用按钮
441
+ this.disableButton()
442
+ },
443
+ // 是否禁用按钮
444
+ disableButton () {
445
+ var flag = false
446
+ for (const field of this.data.fields) {
447
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
448
+ flag = true
449
+ }
450
+
451
+ // 任何选择框只要是否都不能提交
452
+ if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
453
+ flag = true
454
+ }
455
+
456
+ if (field.type === 'checkbox' && field.required && field.value.length === 0) {
457
+ flag = true
458
+ }
459
+ }
460
+ //区域下拉框必选 流程模式为报警器报建 工商业报警器报建
461
+ if ((this.data.f_apply_type === '报警器报建' || this.data.f_apply_type === '工商业报警器报建') && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
462
+ if (!flag){
463
+ if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
464
+ || this.areaData.xianvalue == null || this.areaData.xianvalue == 0){
465
+ console.log("区域为空禁止提交:",this.areaData)
466
+ flag = true
467
+ }
468
+ if (this.areaData.mapvalue ==null || this.areaData.mapvalue ==0){
469
+ console.log("坐标为空禁止提交map:",this.areaData.mapvalue)
470
+ flag = true
471
+ }
472
+ for (const fields of this.areaData.mapvalue) {
473
+ // console.log("报警器数据:",fields.f_bjq_lng)
474
+ if (fields.f_bjq_lng ==null || fields.f_bjq_lng.length ==0){
475
+ console.log("坐标为空禁止提交44444:",this.areaData.mapvalue)
476
+ flag = true
477
+ }
478
+ }
479
+ }
480
+ }
481
+
482
+ this.disable_button = flag
483
+ },
484
+ // 失去焦点且值最终发生变化触发
485
+ async onchange (index) {
486
+ // 是否禁用按钮
487
+ this.disableButton()
488
+ // this.disablebtu()
489
+
490
+ if (!isEmpty(this.data.fields[index].value)) {
491
+ // 前缀、后缀
492
+ if (this.data.fields[index].prefix) {
493
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
494
+ }
495
+ if (this.data.fields[index].suffix) {
496
+ this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
497
+ }
498
+ }
499
+
500
+ // data赋值
501
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
502
+
503
+ if (this.data.fields[index].type === 'datepicker') {
504
+ this.check_datepicker(index)
505
+ }
506
+
507
+ if (this.data.fields[index].onchange) {
508
+ this.$dispatch(this.data.fields[index].onchange, index)
509
+ }
510
+ this.$dispatch('onchange', index)
511
+
512
+
513
+ },
514
+ // 失去焦点触发,无论值是否发生变化
515
+ onblur (index) {
516
+ this.disableButton()
517
+
518
+ if (this.data.fields[index].onblur) {
519
+ this.$dispatch(this.data.fields[index].onblur, index)
520
+ }
521
+
522
+ this.$dispatch('onblur', index)
523
+ },
524
+ disablebtu(){
525
+ this.flag = true
526
+ },
527
+ oninput (index) {
528
+ // 是否禁用按钮
529
+ this.disableButton()
530
+
531
+ if (this.data.fields[index].oninput) {
532
+ this.$dispatch(this.data.fields[index].oninput, index)
533
+ }
534
+ this.$dispatch('oninput', index)
535
+ },
536
+ // 点击按钮组按钮
537
+ async click_but (button) {
538
+ //报警器区域地址
539
+ this.data.areaData = this.areaData
540
+
541
+ if (this.data.defname === '通气点火') {
542
+
543
+ this.$showMessage(`请确认表号是否正确`).then((res) => {
544
+
545
+
546
+ this.disable_button = true
547
+
548
+ this.data.fields.forEach(item => {
549
+ this.data[item.field] = item.value
550
+ })
551
+
552
+ this.data.button = button
553
+
554
+ if (button.button_fields && button.button_fields.length > 0) {
555
+ this.showButModal = true
556
+ return
557
+ }
558
+
559
+ if (this.data.button.event) {
560
+ this.$dispatch(this.data.button.event)
561
+ } else {
562
+ this.$dispatch('button')
563
+ }
564
+
565
+ })
566
+
567
+ }
568
+ else{
569
+ this.disable_button = true
570
+
571
+ this.data.fields.forEach(item => {
572
+ this.data[item.field] = item.value
573
+ })
574
+
575
+ this.data.button = button
576
+
577
+ if (button.button_fields && button.button_fields.length > 0) {
578
+ this.showButModal = true
579
+ return
580
+ }
581
+
582
+ if (this.data.button.event) {
583
+ this.$dispatch(this.data.button.event)
584
+ } else {
585
+ this.$dispatch('button')
586
+ }
587
+ }
588
+
589
+ },
590
+ confirmModal () {
591
+ this.closeModal()
592
+
593
+ this.data.button.button_fields.forEach(item => {
594
+ this.data.button[item.field] = item.value
595
+ })
596
+
597
+ if (this.data.button.event) {
598
+ this.$dispatch(this.data.button.event)
599
+ } else {
600
+ this.$dispatch('button')
601
+ }
602
+ },
603
+ // 关闭模态框
604
+ closeModal () {
605
+ this.showButModal = false
606
+ this.disable_modal_button = true
607
+ },
608
+ onbutchange (index) {
609
+ // 是否禁用按钮
610
+ this.disableModalButton()
611
+
612
+ if (this.data.button.button_fields[index].onchange) {
613
+ this.$dispatch(this.data.button.button_fields[index].onchange, index)
614
+ } else {
615
+ this.$dispatch('onbutchange', index)
616
+ }
617
+
618
+ },
619
+ onbutblur (index) {
620
+ this.disableModalButton()
621
+
622
+ if (this.data.button.button_fields[index].onblur) {
623
+ this.$dispatch(this.data.button.button_fields[index].onblur, index)
624
+ } else {
625
+ this.$dispatch('onbutblur', index)
626
+ }
627
+ },
628
+ onbutinput (index) {
629
+ // 是否禁用按钮
630
+ this.disableModalButton()
631
+
632
+ if (this.data.button.button_fields[index].oninput) {
633
+ this.$dispatch(this.data.button.button_fields[index].oninput, index)
634
+ } else {
635
+ this.$dispatch('onbutinput', index)
636
+ }
637
+ },
638
+ disableModalButton () {
639
+ let flag = false
640
+
641
+
642
+ for (const item of this.data.button.button_fields) {
643
+ if (item.required && !item.value) {
644
+ if (item.value === 0) {
645
+ flag = false
646
+ } else {
647
+ flag = true
648
+ }
649
+ }
650
+ }
651
+
652
+ this.disable_modal_button = flag
653
+ },
654
+ check_datepicker (index) {
655
+ // 时间格式检测
656
+ if (!isEmpty(this.data.fields[index].value)) {
657
+
658
+ let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
659
+ let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
660
+ 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$/
661
+ if (this.data.fields[index].format) {
662
+ if (this.data.fields[index].format === 'yyyy-MM-dd') {
663
+ if (!dateReg.test(this.data.fields[index].value)) {
664
+ this.data.fields[index].value = ''
665
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
666
+ }
667
+ }
668
+ if (this.data.fields[index].format === 'HH:mm:ss') {
669
+ if (!timeReg.test(this.data.fields[index].value)) {
670
+ this.data.fields[index].value = ''
671
+ this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
672
+ }
673
+ }
674
+ if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
675
+ if (!datetimeReg.test(this.data.fields[index].value)) {
676
+ this.data.fields[index].value = ''
677
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
678
+ }
679
+ }
680
+ } else {
681
+ if (!dateReg.test(this.data.fields[index].value)) {
682
+ this.data.fields[index].value = ''
683
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
684
+ }
685
+ }
686
+ }
687
+ },
688
+ selectSearch(event, index) {
689
+ if (this.data.fields[index].selectSearch) {
690
+ this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
691
+ }
692
+ this.$dispatch('selectSearch', event[0], index)
693
+ }
694
+ },
695
+ events: {
696
+ }
697
+ }
698
+ </script>
699
+ <style scoped>
700
+ .control-label-justify {
701
+ width: 30%;
702
+ text-align: justify;
703
+ text-align-last: justify;
704
+ font-family: PingFang-SC-Bold;
705
+ float: left;
706
+ }
707
+ .button_spacing{margin: 0px 0px 0px 10px;}
708
+ </style>
709
+ <style lang="less">
710
+ .apply-has-error {
711
+ border-bottom: 1px solid #a94442;
712
+ }
713
+ .app-input {
714
+ label {
715
+ float: left;
716
+ }
717
+ .select {
718
+ button {
719
+ border: none;
720
+ outline: none;
721
+ text-align: left;
722
+ .btn-placeholder {
723
+ color: #ACA899
724
+ }
725
+ }
726
+ }
727
+ .datepicker {
728
+ .form-control:focus {
729
+ border: none!important;
730
+ outline: none!important;
731
+ -webkit-box-shadow: none;
732
+ box-shadow: none;
733
+ }
734
+ }
735
+ textarea {
736
+ padding: 8px 10px;
737
+ border: none;
738
+ outline: none;
739
+ margin: 0px;
740
+ }
741
+ input[readonly]{
742
+ color: #ACA899!important;
743
+ background: #FFFFFF;
744
+ border: none;
745
+ outline: none;
746
+ }
747
+ input:disabled{
748
+ color: #ACA899!important;
749
+ background: #FFFFFF;
750
+ border: none;
751
+ outline: none;
752
+ }
753
+ textarea[readonly]{
754
+ color: #ACA899!important;
755
+ background: #FFFFFF;
756
+ border: none;
757
+ outline: none;
758
+ }
759
+ textarea:disabled{
760
+ color: #ACA899!important;
761
+ background: #FFFFFF;
762
+ border: none;
763
+ outline: none;
764
+ }
765
+ }
766
+ </style>