n20-common-lib 2.4.5 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/nstc-g6/components/Calendar/index.js +5 -5
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +12 -20
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +18 -22
- package/nstc-g6/components/Calendar/src/main.vue +1 -5
- package/nstc-g6/components/DialogForm/index.js +5 -5
- package/nstc-g6/components/DialogForm/src/demo/index.vue +18 -27
- package/nstc-g6/components/DialogForm/src/main.vue +15 -21
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/Form/A_DEMO/index.vue +7 -29
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +3 -5
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +60 -62
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +12 -35
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/Form/CascaderCustom/index.vue +4 -4
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/Form/Component.vue +56 -78
- package/nstc-g6/components/Form/ComponentSecond.vue +55 -77
- package/nstc-g6/components/Form/InputAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +130 -153
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +4 -12
- package/nstc-g6/components/Form/InputCustom/index.vue +51 -54
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +19 -41
- package/nstc-g6/components/Form/Item.vue +15 -30
- package/nstc-g6/components/Form/ItemSecond.vue +7 -22
- package/nstc-g6/components/Form/List.vue +12 -28
- package/nstc-g6/components/Form/ListSecond.vue +11 -27
- package/nstc-g6/components/Form/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/Form/SelectAccount/index.js +5 -5
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +34 -28
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +112 -83
- package/nstc-g6/components/Form/SelectAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +126 -149
- package/nstc-g6/components/Form/SelectCashFlow/index.js +5 -5
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +18 -19
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +52 -41
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +14 -16
- package/nstc-g6/components/Form/SelectCustom/index.vue +129 -139
- package/nstc-g6/components/Form/SelectSubject/index.js +5 -5
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +42 -48
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +83 -86
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +34 -35
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +133 -148
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +3 -3
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +1 -7
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/Form/TextCustom/index.vue +2 -2
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/UploadCustom/index.vue +143 -173
- package/nstc-g6/components/Form/configs.js +3 -14
- package/nstc-g6/components/Form/configsSecond.js +3 -16
- package/nstc-g6/components/Form/index.js +1 -1
- package/nstc-g6/components/Form/payeePersonSelect/index.js +5 -5
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +50 -44
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +73 -82
- package/nstc-g6/components/FormGroup/index.js +5 -5
- package/nstc-g6/components/FormGroup/src/demo/config.js +18 -19
- package/nstc-g6/components/FormGroup/src/demo/index.vue +14 -22
- package/nstc-g6/components/FormGroup/src/main.vue +122 -141
- package/nstc-g6/components/FormGroup/src/validate.js +11 -13
- package/nstc-g6/components/InputTag/InputTag.vue +78 -111
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +24 -24
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +4 -13
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +9 -18
- package/nstc-g6/components/NstcCharts/define.js +1 -6
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +6 -21
- package/nstc-g6/components/NstcConfirm/index.js +21 -19
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +34 -38
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +17 -21
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +4 -17
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +2 -12
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +3 -13
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +18 -78
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +121 -147
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +9 -31
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +10 -33
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +12 -16
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +19 -75
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +340 -354
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +11 -34
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/NstcForm/Component.vue +17 -62
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +55 -77
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +6 -24
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +2 -8
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +4 -21
- package/nstc-g6/components/NstcForm/Item.vue +3 -15
- package/nstc-g6/components/NstcForm/ItemSecond.vue +7 -22
- package/nstc-g6/components/NstcForm/List.vue +12 -28
- package/nstc-g6/components/NstcForm/ListSecond.vue +11 -27
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +4 -24
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +7 -30
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +50 -38
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +6 -16
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +72 -82
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +6 -20
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +13 -60
- package/nstc-g6/components/NstcForm/configs.js +3 -14
- package/nstc-g6/components/NstcForm/configsSecond.js +3 -16
- package/nstc-g6/components/NstcForm/index.js +1 -1
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +57 -73
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +2 -12
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +2 -3
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +4 -15
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +5 -20
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +10 -4
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +1 -7
- package/nstc-g6/components/NstcTab/NstcTab.vue +8 -20
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +7 -7
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +88 -126
- package/nstc-g6/components/NstcTable/NstcTable.vue +4 -17
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +27 -72
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +13 -14
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +3 -13
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +21 -22
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +4 -17
- package/nstc-g6/components/Search/NstcSearch.vue +12 -47
- package/nstc-g6/components/Search/src/demo/index copy.vue +28 -28
- package/nstc-g6/components/Search/src/demo/index.vue +36 -36
- package/nstc-g6/components/Search/src/main copy.vue +169 -204
- package/nstc-g6/components/approvelTwo/main.vue +2 -6
- package/nstc-g6/components/approvelTwo/progress.vue +7 -29
- package/nstc-g6/directives/VCopy/index.js +52 -54
- package/nstc-g6/directives/VNstcNumber/index.js +1 -1
- package/nstc-g6/directives/VNstcNumber/temp.js +357 -362
- package/nstc-g6/utils/mapper_aims.js +774 -775
- package/nstc-g6/utils/parseTime.js +38 -36
- package/nstc-g6/utils/validate/index.js +2 -2
- package/nstc-g6/utils/vendor/Export2Excel.js +110 -111
- package/nstc-g6/utils/vendor/Export2Zip.js +12 -7
- package/nstc-g6/utils/vue-bus.js +1 -1
- package/package.json +1 -1
- package/src/assets/iconFont/demo_index.html +1 -1
- package/src/assets/iconFont/iconfont.js +66 -1
- package/src/assets/iconFont2/demo_index.html +277 -286
- package/src/assets/iconFont2/iconfont.js +66 -1
- package/src/components/Button/button-group.vue +1 -1
- package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
- package/src/components/Layout/indexN.vue +1 -2
- package/src/components/LoginTemporary/indexN.vue +12 -2
- package/src/components/TableOperateColumn/index.vue +1 -1
- package/src/plugins/Print/print-js/README.md +5 -5
- package/src/plugins/Print/print-js/package.json +2 -2
- package/src/plugins/Print/print-js/src/index.d.ts +36 -36
- package/src/plugins/Print/print-js/src/js/browser.js +3 -1
- package/src/plugins/Print/print-js/src/js/functions.js +16 -10
- package/src/plugins/Print/print-js/src/js/html.js +2 -2
- package/src/plugins/Print/print-js/src/js/image.js +1 -1
- package/src/plugins/Print/print-js/src/js/init.js +15 -7
- package/src/plugins/Print/print-js/src/js/json.js +14 -4
- package/src/plugins/Print/print-js/src/js/modal.js +16 -15
- package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
- package/src/plugins/Print/print-js/src/js/print.js +6 -6
- package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
- package/src/plugins/Sign/cfca/index.js +525 -520
- package/src/plugins/Sign/sign.js +128 -128
- package/style/index.css +1 -1
- package/style/index.css.map +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
|
@@ -22,26 +22,15 @@
|
|
|
22
22
|
:disableds="disableds"
|
|
23
23
|
:popper-class="computedPopperClass"
|
|
24
24
|
:from="from"
|
|
25
|
-
@after-leave="val => $emit('after-leave', val)"
|
|
25
|
+
@after-leave="(val) => $emit('after-leave', val)"
|
|
26
26
|
@query-click="handleExpectQuery"
|
|
27
27
|
@add-click="$emit('add-click')"
|
|
28
28
|
@other-click="$emit('other-click')"
|
|
29
29
|
@enter-click="handleExpectQuery"
|
|
30
30
|
/>
|
|
31
31
|
|
|
32
|
-
<div
|
|
33
|
-
v-
|
|
34
|
-
:class="[
|
|
35
|
-
`form-item`,
|
|
36
|
-
`form-item-button`
|
|
37
|
-
]"
|
|
38
|
-
>
|
|
39
|
-
<el-button
|
|
40
|
-
v-bind="queryBtn"
|
|
41
|
-
:loading="queryLoading"
|
|
42
|
-
:disabled="disableds.querybutton"
|
|
43
|
-
@click="handleExpectQuery"
|
|
44
|
-
>
|
|
32
|
+
<div v-if="isVertical && queryBtn" :class="[`form-item`, `form-item-button`]">
|
|
33
|
+
<el-button v-bind="queryBtn" :loading="queryLoading" :disabled="disableds.querybutton" @click="handleExpectQuery">
|
|
45
34
|
{{ queryBtn.name || '查询' }}
|
|
46
35
|
</el-button>
|
|
47
36
|
</div>
|
|
@@ -115,7 +104,7 @@ export default {
|
|
|
115
104
|
// 样式 : 水平 | 垂直
|
|
116
105
|
mode: {
|
|
117
106
|
default: 'horizontal',
|
|
118
|
-
validator: function(val) {
|
|
107
|
+
validator: function (val) {
|
|
119
108
|
return ['horizontal', 'vertical'].includes(val)
|
|
120
109
|
}
|
|
121
110
|
},
|
|
@@ -165,9 +154,7 @@ export default {
|
|
|
165
154
|
querybutton: false
|
|
166
155
|
},
|
|
167
156
|
|
|
168
|
-
formID: `formID-${Math.random()
|
|
169
|
-
.toString(36)
|
|
170
|
-
.slice(2)}`,
|
|
157
|
+
formID: `formID-${Math.random().toString(36).slice(2)}`,
|
|
171
158
|
|
|
172
159
|
linkItems: [],
|
|
173
160
|
unwatchers: [],
|
|
@@ -207,14 +194,13 @@ export default {
|
|
|
207
194
|
innerLabelWidth() {
|
|
208
195
|
return (this.labelWidth + '').replace(/px/, '') + 'px'
|
|
209
196
|
}
|
|
210
|
-
|
|
211
197
|
},
|
|
212
198
|
|
|
213
199
|
watch: {
|
|
214
200
|
config: {
|
|
215
201
|
deep: true,
|
|
216
202
|
immediate: true,
|
|
217
|
-
handler: function(newVal, oldVal) {
|
|
203
|
+
handler: function (newVal, oldVal) {
|
|
218
204
|
if (!this.isRendering && newVal !== oldVal && newVal.length) {
|
|
219
205
|
this.init()
|
|
220
206
|
}
|
|
@@ -224,7 +210,7 @@ export default {
|
|
|
224
210
|
value: {
|
|
225
211
|
deep: true,
|
|
226
212
|
immediate: true,
|
|
227
|
-
handler: function(newVal) {
|
|
213
|
+
handler: function (newVal) {
|
|
228
214
|
if (!this.isEmptyObject(newVal) && !this.isRendering && this.innerMountAndQuery) {
|
|
229
215
|
this.innerMountAndQuery = false
|
|
230
216
|
this.handleExpectQuery()
|
|
@@ -280,10 +266,7 @@ export default {
|
|
|
280
266
|
querybutton: this.disabled
|
|
281
267
|
}
|
|
282
268
|
|
|
283
|
-
const {
|
|
284
|
-
querybutton,
|
|
285
|
-
normalItems = []
|
|
286
|
-
} = this.separateAdvanceAndNormal(this.config)
|
|
269
|
+
const { querybutton, normalItems = [] } = this.separateAdvanceAndNormal(this.config)
|
|
287
270
|
|
|
288
271
|
this.normalConfig = normalItems
|
|
289
272
|
|
|
@@ -303,15 +286,15 @@ export default {
|
|
|
303
286
|
|
|
304
287
|
generateFormModel(config) {
|
|
305
288
|
if (Array.isArray(config)) {
|
|
306
|
-
config.forEach(item => {
|
|
289
|
+
config.forEach((item) => {
|
|
307
290
|
if (Array.isArray(item)) {
|
|
308
291
|
this.generateFormModel(item)
|
|
309
292
|
} else {
|
|
310
293
|
if (!item.mold) {
|
|
311
294
|
throw Error(
|
|
312
|
-
`Each config's child must has a 'mold' prop, it could be ${SUPPORT_TYPE.concat(
|
|
313
|
-
'
|
|
314
|
-
)
|
|
295
|
+
`Each config's child must has a 'mold' prop, it could be ${SUPPORT_TYPE.concat('querybutton').join(
|
|
296
|
+
'|'
|
|
297
|
+
)}`
|
|
315
298
|
)
|
|
316
299
|
}
|
|
317
300
|
|
|
@@ -331,9 +314,7 @@ export default {
|
|
|
331
314
|
|
|
332
315
|
if (!config.mold) {
|
|
333
316
|
throw Error(
|
|
334
|
-
`Each config's child must has a 'mold' prop, it could be ${SUPPORT_TYPE.concat(
|
|
335
|
-
'querybutton'
|
|
336
|
-
).join('|')}`
|
|
317
|
+
`Each config's child must has a 'mold' prop, it could be ${SUPPORT_TYPE.concat('querybutton').join('|')}`
|
|
337
318
|
)
|
|
338
319
|
}
|
|
339
320
|
|
|
@@ -348,7 +329,7 @@ export default {
|
|
|
348
329
|
this.unwatchers.pop()()
|
|
349
330
|
}
|
|
350
331
|
|
|
351
|
-
this.linkItems.map(item => {
|
|
332
|
+
this.linkItems.map((item) => {
|
|
352
333
|
this.setWatchers(item)
|
|
353
334
|
})
|
|
354
335
|
|
|
@@ -362,7 +343,8 @@ export default {
|
|
|
362
343
|
setModel(item) {
|
|
363
344
|
let { prop, mold } = item
|
|
364
345
|
|
|
365
|
-
if (this.pureable) {
|
|
346
|
+
if (this.pureable) {
|
|
347
|
+
// 纯净模式
|
|
366
348
|
if (item.renderable === false) {
|
|
367
349
|
this.$delete(this.model, prop)
|
|
368
350
|
return
|
|
@@ -387,19 +369,18 @@ export default {
|
|
|
387
369
|
setWatchers(item) {
|
|
388
370
|
const { link, prop: itemProp } = item
|
|
389
371
|
let isOneToLinkAll = false
|
|
390
|
-
let links
|
|
372
|
+
let links
|
|
373
|
+
let isComplex
|
|
391
374
|
|
|
392
375
|
if (Array.isArray(link)) {
|
|
393
376
|
links = link
|
|
394
|
-
isOneToLinkAll = links.every(item => item.mold)
|
|
395
|
-
isComplex = !!(links.find(item => item.mold) && links.find(item => !item.mold))
|
|
377
|
+
isOneToLinkAll = links.every((item) => item.mold)
|
|
378
|
+
isComplex = !!(links.find((item) => item.mold) && links.find((item) => !item.mold))
|
|
396
379
|
} else {
|
|
397
380
|
links = [link]
|
|
398
381
|
}
|
|
399
382
|
|
|
400
|
-
links.forEach(link =>
|
|
401
|
-
this.setSingleLinkWatch(link, itemProp, isOneToLinkAll, isComplex, link.mold)
|
|
402
|
-
)
|
|
383
|
+
links.forEach((link) => this.setSingleLinkWatch(link, itemProp, isOneToLinkAll, isComplex, link.mold))
|
|
403
384
|
},
|
|
404
385
|
|
|
405
386
|
setSingleLinkWatch(link, itemProp, isOneToLinkAll, isComplex, isModelEverGenerated) {
|
|
@@ -435,7 +416,7 @@ export default {
|
|
|
435
416
|
const unwatcher = this.$watch(`model.${targetProp}`, {
|
|
436
417
|
immediate: true,
|
|
437
418
|
deep: true,
|
|
438
|
-
handler: async function(newVal, oldVal) {
|
|
419
|
+
handler: async function (newVal, oldVal) {
|
|
439
420
|
if (watchedProp) {
|
|
440
421
|
if (!deepEquals(newVal, oldVal)) {
|
|
441
422
|
const defaultAndOptions = await handler(newVal)
|
|
@@ -503,7 +484,7 @@ export default {
|
|
|
503
484
|
if (prop) {
|
|
504
485
|
this.resets[prop] = val
|
|
505
486
|
} else {
|
|
506
|
-
Object.keys(this.resets).forEach(key => {
|
|
487
|
+
Object.keys(this.resets).forEach((key) => {
|
|
507
488
|
this.resets[key] = val
|
|
508
489
|
})
|
|
509
490
|
}
|
|
@@ -516,7 +497,7 @@ export default {
|
|
|
516
497
|
if (prop) {
|
|
517
498
|
this.disableds[prop] = val
|
|
518
499
|
} else {
|
|
519
|
-
Object.keys(this.disableds).forEach(key => {
|
|
500
|
+
Object.keys(this.disableds).forEach((key) => {
|
|
520
501
|
this.disableds[key] = val
|
|
521
502
|
})
|
|
522
503
|
}
|
|
@@ -525,40 +506,41 @@ export default {
|
|
|
525
506
|
separateAdvanceAndNormal(config = this.config) {
|
|
526
507
|
const isVertical = this.isVertical
|
|
527
508
|
|
|
528
|
-
const reducer = config =>
|
|
529
|
-
(
|
|
530
|
-
|
|
531
|
-
|
|
509
|
+
const reducer = (config) =>
|
|
510
|
+
config.reduce(
|
|
511
|
+
(prev, item) => {
|
|
512
|
+
if (Array.isArray(item)) {
|
|
513
|
+
const { normalItems, ...rest } = reducer(item)
|
|
532
514
|
|
|
533
|
-
|
|
515
|
+
normalItems.length && prev.normalItems.push(normalItems)
|
|
534
516
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
517
|
+
return {
|
|
518
|
+
...prev,
|
|
519
|
+
...rest
|
|
520
|
+
}
|
|
521
|
+
} else {
|
|
522
|
+
const { mold } = item
|
|
523
|
+
// if (mold === "upload") {
|
|
524
|
+
// this.uploadKeys.add(prop);
|
|
525
|
+
// }
|
|
526
|
+
|
|
527
|
+
if (isVertical) {
|
|
528
|
+
if (mold === 'querybutton') {
|
|
529
|
+
prev[mold] = item
|
|
530
|
+
} else {
|
|
531
|
+
prev.normalItems.push(item)
|
|
532
|
+
}
|
|
548
533
|
} else {
|
|
549
534
|
prev.normalItems.push(item)
|
|
550
535
|
}
|
|
551
|
-
} else {
|
|
552
|
-
prev.normalItems.push(item)
|
|
553
536
|
}
|
|
554
|
-
}
|
|
555
537
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
538
|
+
return prev
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
normalItems: []
|
|
542
|
+
}
|
|
543
|
+
)
|
|
562
544
|
|
|
563
545
|
return reducer(config)
|
|
564
546
|
},
|
|
@@ -595,9 +577,7 @@ export default {
|
|
|
595
577
|
|
|
596
578
|
await this.$listeners.query(model, config)
|
|
597
579
|
} else {
|
|
598
|
-
throw new Error(
|
|
599
|
-
'must specify @query event when there is a query button'
|
|
600
|
-
)
|
|
580
|
+
throw new Error('must specify @query event when there is a query button')
|
|
601
581
|
}
|
|
602
582
|
} catch (err) {
|
|
603
583
|
console.error('form custom error -> handleExpectQuery:', err)
|
|
@@ -637,14 +617,12 @@ export default {
|
|
|
637
617
|
* 生成formId
|
|
638
618
|
*/
|
|
639
619
|
createFormId() {
|
|
640
|
-
return `formID-${Math.random()
|
|
641
|
-
.toString(36)
|
|
642
|
-
.slice(2)}`
|
|
620
|
+
return `formID-${Math.random().toString(36).slice(2)}`
|
|
643
621
|
}
|
|
644
622
|
}
|
|
645
623
|
}
|
|
646
624
|
</script>
|
|
647
625
|
|
|
648
626
|
<style lang="scss">
|
|
649
|
-
@import
|
|
627
|
+
@import 'index';
|
|
650
628
|
</style>
|
|
@@ -8,11 +8,7 @@
|
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div class="dialog-select">
|
|
11
|
-
<div
|
|
12
|
-
style="position: relative"
|
|
13
|
-
@mouseenter="hovering = true"
|
|
14
|
-
@mouseleave="hovering = false"
|
|
15
|
-
>
|
|
11
|
+
<div style="position: relative" @mouseenter="hovering = true" @mouseleave="hovering = false">
|
|
16
12
|
<el-input
|
|
17
13
|
v-model="InputValue"
|
|
18
14
|
v-bind="$attrs"
|
|
@@ -22,12 +18,7 @@
|
|
|
22
18
|
v-on="$listeners"
|
|
23
19
|
@change="changeValue"
|
|
24
20
|
/>
|
|
25
|
-
<i
|
|
26
|
-
v-if="!showClose"
|
|
27
|
-
class="search-btn el-input__icon el-icon-search"
|
|
28
|
-
@click="onSearchIconClick"
|
|
29
|
-
>
|
|
30
|
-
</i>
|
|
21
|
+
<i v-if="!showClose" class="search-btn el-input__icon el-icon-search" @click="onSearchIconClick"> </i>
|
|
31
22
|
<i
|
|
32
23
|
v-if="showClose"
|
|
33
24
|
class="search-btn el-select__caret el-input__icon el-icon-circle-close"
|
|
@@ -35,12 +26,7 @@
|
|
|
35
26
|
></i>
|
|
36
27
|
</div>
|
|
37
28
|
|
|
38
|
-
<DialogTable
|
|
39
|
-
ref="dialog"
|
|
40
|
-
v-model="showDialog"
|
|
41
|
-
v-bind="dialogProps"
|
|
42
|
-
@comfirm="onComfirm"
|
|
43
|
-
>
|
|
29
|
+
<DialogTable ref="dialog" v-model="showDialog" v-bind="dialogProps" @comfirm="onComfirm">
|
|
44
30
|
<template slot="form">
|
|
45
31
|
<slot></slot>
|
|
46
32
|
</template>
|
|
@@ -58,12 +44,9 @@ export default {
|
|
|
58
44
|
directives: {
|
|
59
45
|
'nstc-lazy-load': {
|
|
60
46
|
bind(el, binding) {
|
|
61
|
-
const SELECTWRAP_DOM = el.querySelector(
|
|
62
|
-
'.el-select-dropdown .el-select-dropdown__wrap'
|
|
63
|
-
)
|
|
47
|
+
const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap')
|
|
64
48
|
SELECTWRAP_DOM.addEventListener('scroll', function () {
|
|
65
|
-
const condition =
|
|
66
|
-
this.scrollHeight - this.scrollTop - 2 <= this.clientHeight
|
|
49
|
+
const condition = this.scrollHeight - this.scrollTop - 2 <= this.clientHeight
|
|
67
50
|
console.log('condition', condition)
|
|
68
51
|
if (condition) {
|
|
69
52
|
binding.value()
|
|
@@ -168,8 +151,7 @@ export default {
|
|
|
168
151
|
},
|
|
169
152
|
computed: {
|
|
170
153
|
showClose() {
|
|
171
|
-
let hasValue =
|
|
172
|
-
this.value !== undefined && this.value !== null && this.value !== ''
|
|
154
|
+
let hasValue = this.value !== undefined && this.value !== null && this.value !== ''
|
|
173
155
|
return this.hovering && hasValue && this.canClose
|
|
174
156
|
},
|
|
175
157
|
attrs: {
|
|
@@ -142,11 +142,7 @@ export default {
|
|
|
142
142
|
},
|
|
143
143
|
|
|
144
144
|
_type() {
|
|
145
|
-
return this.type === 'text'
|
|
146
|
-
? this.isNumber
|
|
147
|
-
? 'number'
|
|
148
|
-
: this.type
|
|
149
|
-
: this.type
|
|
145
|
+
return this.type === 'text' ? (this.isNumber ? 'number' : this.type) : this.type
|
|
150
146
|
}
|
|
151
147
|
},
|
|
152
148
|
|
|
@@ -186,9 +182,7 @@ export default {
|
|
|
186
182
|
w = wArr[0].clientWidth
|
|
187
183
|
}
|
|
188
184
|
console.log('_wwww', w)
|
|
189
|
-
const inputArr = document.getElementsByClassName(
|
|
190
|
-
`nstc-common-form-textarea`
|
|
191
|
-
)
|
|
185
|
+
const inputArr = document.getElementsByClassName(`nstc-common-form-textarea`)
|
|
192
186
|
|
|
193
187
|
for (let i = 0; i < inputArr.length; i++) {
|
|
194
188
|
// 3 为了多留一点空间, 前面是计算出来的准确值
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="interval-input-custom">
|
|
3
|
-
<InputCustom
|
|
4
|
-
v-model="_value[0]"
|
|
5
|
-
:clearable="clearable"
|
|
6
|
-
:type="type"
|
|
7
|
-
:number-rule="numberRule"
|
|
8
|
-
@blur="changeNum"
|
|
9
|
-
/>
|
|
3
|
+
<InputCustom v-model="_value[0]" :clearable="clearable" :type="type" :number-rule="numberRule" @blur="changeNum" />
|
|
10
4
|
<span>-</span>
|
|
11
|
-
<InputCustom
|
|
12
|
-
v-model="_value[1]"
|
|
13
|
-
:clearable="clearable"
|
|
14
|
-
:type="type"
|
|
15
|
-
:number-rule="numberRule"
|
|
16
|
-
@blur="changeNum"
|
|
17
|
-
/>
|
|
5
|
+
<InputCustom v-model="_value[1]" :clearable="clearable" :type="type" :number-rule="numberRule" @blur="changeNum" />
|
|
18
6
|
</div>
|
|
19
7
|
</template>
|
|
20
8
|
|
|
@@ -73,12 +61,8 @@ export default {
|
|
|
73
61
|
let value1 = this._value[0]
|
|
74
62
|
let value2 = this._value[1]
|
|
75
63
|
if (value1 && value2) {
|
|
76
|
-
value1 = isNaN(parseFloat(this._value[0]))
|
|
77
|
-
|
|
78
|
-
: parseFloat(this._value[0])
|
|
79
|
-
value2 = isNaN(parseFloat(this._value[1]))
|
|
80
|
-
? 0
|
|
81
|
-
: parseFloat(this._value[1])
|
|
64
|
+
value1 = isNaN(parseFloat(this._value[0])) ? 0 : parseFloat(this._value[0])
|
|
65
|
+
value2 = isNaN(parseFloat(this._value[1])) ? 0 : parseFloat(this._value[1])
|
|
82
66
|
if (value1 > value2) {
|
|
83
67
|
this.$message.warning('起始值不能大于结束值')
|
|
84
68
|
newVal = ['', '']
|
|
@@ -108,4 +92,3 @@ export default {
|
|
|
108
92
|
}
|
|
109
93
|
}
|
|
110
94
|
</style>
|
|
111
|
-
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<template v-if="SUPPORT_TYPE.includes(item.mold)">
|
|
4
|
-
<el-form-item
|
|
5
|
-
:ref="item.required ? item.prop : null"
|
|
6
|
-
:label="item.name"
|
|
7
|
-
:prop="item.prop"
|
|
8
|
-
>
|
|
4
|
+
<el-form-item :ref="item.required ? item.prop : null" :label="item.name" :prop="item.prop">
|
|
9
5
|
<el-tooltip
|
|
10
6
|
v-if="item.tooltip"
|
|
11
7
|
class="item-tooltip"
|
|
@@ -102,11 +98,7 @@
|
|
|
102
98
|
@enter-click="$emit('enter-click')"
|
|
103
99
|
@treeNodeClick="treeNodeClick"
|
|
104
100
|
/>
|
|
105
|
-
<span
|
|
106
|
-
v-show="item.link.name"
|
|
107
|
-
class="form-item-name form-item-name-link"
|
|
108
|
-
v-html="item.link.name"
|
|
109
|
-
></span>
|
|
101
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name"></span>
|
|
110
102
|
<component
|
|
111
103
|
:is="getComponentModel(item.mold)"
|
|
112
104
|
:key="item.prop"
|
|
@@ -147,11 +139,7 @@
|
|
|
147
139
|
@enter-click="$emit('enter-click')"
|
|
148
140
|
@treeNodeClick="treeNodeClick"
|
|
149
141
|
/>
|
|
150
|
-
<span
|
|
151
|
-
v-show="item.link.name"
|
|
152
|
-
class="form-item-name form-item-name-link"
|
|
153
|
-
v-html="item.link.name"
|
|
154
|
-
></span>
|
|
142
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name"></span>
|
|
155
143
|
<component
|
|
156
144
|
:is="getComponentModel(item.link.mold)"
|
|
157
145
|
v-if="item.link.renderable !== false"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="{ 'form-item-button':['querybutton', 'addbutton', 'otherbutton'].includes(item.mold) }">
|
|
2
|
+
<div :class="{ 'form-item-button': ['querybutton', 'addbutton', 'otherbutton'].includes(item.mold) }">
|
|
3
3
|
<el-form-item v-if="item.mold === 'querybutton'">
|
|
4
4
|
<el-button
|
|
5
5
|
type="primary"
|
|
@@ -38,17 +38,14 @@
|
|
|
38
38
|
</el-form-item>
|
|
39
39
|
|
|
40
40
|
<template v-else-if="SUPPORT_TYPE.includes(item.mold)">
|
|
41
|
-
<el-form-item
|
|
42
|
-
:label="item.name"
|
|
43
|
-
:prop="item.prop"
|
|
44
|
-
>
|
|
41
|
+
<el-form-item :label="item.name" :prop="item.prop">
|
|
45
42
|
<el-tooltip
|
|
46
43
|
v-if="item.tooltip"
|
|
47
44
|
class="item-tooltip"
|
|
48
45
|
effect="dark"
|
|
49
46
|
:content="item.tooltip"
|
|
50
47
|
placement="top-start"
|
|
51
|
-
:style="{left: -tipLength + 'px'}"
|
|
48
|
+
:style="{ left: -tipLength + 'px' }"
|
|
52
49
|
>
|
|
53
50
|
<i class="el-icon-question" />
|
|
54
51
|
</el-tooltip>
|
|
@@ -95,12 +92,11 @@
|
|
|
95
92
|
@enter-click="$emit('enter-click')"
|
|
96
93
|
/>
|
|
97
94
|
</el-form-item>
|
|
98
|
-
|
|
99
95
|
</template>
|
|
100
96
|
</template>
|
|
101
97
|
</template>
|
|
102
98
|
<!-- 单个 -->
|
|
103
|
-
<template v-else-if="item.link &&item.link.mold">
|
|
99
|
+
<template v-else-if="item.link && item.link.mold">
|
|
104
100
|
<template v-if="item.link.position === 'after'">
|
|
105
101
|
<component
|
|
106
102
|
:is="`${item.link.mold}-custom`"
|
|
@@ -115,12 +111,7 @@
|
|
|
115
111
|
@after-leave="$emit('after-leave', item.link.prop)"
|
|
116
112
|
@enter-click="$emit('enter-click')"
|
|
117
113
|
/>
|
|
118
|
-
<span
|
|
119
|
-
|
|
120
|
-
v-show="item.link.name"
|
|
121
|
-
class="form-item-name form-item-name-link"
|
|
122
|
-
v-html="item.link.name"
|
|
123
|
-
/>
|
|
114
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
124
115
|
<component
|
|
125
116
|
:is="`${item.mold}-custom`"
|
|
126
117
|
:key="item.prop"
|
|
@@ -147,12 +138,7 @@
|
|
|
147
138
|
@after-leave="$emit('after-leave', item.prop)"
|
|
148
139
|
@enter-click="$emit('enter-click')"
|
|
149
140
|
/>
|
|
150
|
-
<span
|
|
151
|
-
|
|
152
|
-
v-show="item.link.name"
|
|
153
|
-
class="form-item-name form-item-name-link"
|
|
154
|
-
v-html="item.link.name"
|
|
155
|
-
/>
|
|
141
|
+
<span v-show="item.link.name" class="form-item-name form-item-name-link" v-html="item.link.name" />
|
|
156
142
|
<component
|
|
157
143
|
:is="`${item.link.mold}-custom`"
|
|
158
144
|
v-if="item.link.renderable !== false"
|
|
@@ -261,9 +247,8 @@ export default {
|
|
|
261
247
|
width: 72px;
|
|
262
248
|
height: 26px;
|
|
263
249
|
padding: 0px;
|
|
264
|
-
border: 1px solid #
|
|
250
|
+
border: 1px solid #007aff;
|
|
265
251
|
border-radius: 5px;
|
|
266
252
|
}
|
|
267
253
|
}
|
|
268
|
-
|
|
269
254
|
</style>
|
|
@@ -2,38 +2,30 @@
|
|
|
2
2
|
<div class="form-base-wrapper">
|
|
3
3
|
<template v-for="(item, idx) in config">
|
|
4
4
|
<template v-if="Array.isArray(item)">
|
|
5
|
-
<div
|
|
6
|
-
:key="'inlineItem' + idx"
|
|
7
|
-
class="form-group"
|
|
8
|
-
>
|
|
5
|
+
<div :key="'inlineItem' + idx" class="form-group">
|
|
9
6
|
<template v-for="(iItem, index) in item">
|
|
10
7
|
<BaseItem
|
|
11
8
|
v-if="iItem.renderable !== false"
|
|
12
|
-
|
|
13
|
-
:key="iItem.mold + '-' + (iItem.prop ? iItem.prop : (idx + '-' + index))"
|
|
14
|
-
|
|
9
|
+
:key="iItem.mold + '-' + (iItem.prop ? iItem.prop : idx + '-' + index)"
|
|
15
10
|
v-model="value"
|
|
16
11
|
:formData="formData"
|
|
17
|
-
|
|
18
12
|
:class="[
|
|
19
13
|
'form-item',
|
|
20
14
|
`form-item-${iItem.mold}`,
|
|
21
15
|
{
|
|
22
|
-
'form-item-link':
|
|
16
|
+
'form-item-link':
|
|
17
|
+
iItem.link &&
|
|
18
|
+
((Array.isArray(iItem.link) && iItem.link.some((link) => link.mold)) || iItem.link.mold)
|
|
23
19
|
},
|
|
24
20
|
`form-item-${iItem.mold}-${iItem.prop ? iItem.prop : idx + '-' + index}`
|
|
25
21
|
]"
|
|
26
|
-
|
|
27
22
|
:popper-class="popperClass"
|
|
28
|
-
|
|
29
23
|
:item="iItem"
|
|
30
24
|
:resets.sync="resets"
|
|
31
25
|
:disableds="disableds"
|
|
32
|
-
|
|
33
26
|
:loading="loading"
|
|
34
27
|
:show-mode="showMode"
|
|
35
|
-
|
|
36
|
-
@after-leave="val => $emit('after-leave', val)"
|
|
28
|
+
@after-leave="(val) => $emit('after-leave', val)"
|
|
37
29
|
@query-click="$emit('query-click')"
|
|
38
30
|
@add-click="$emit('add-click')"
|
|
39
31
|
@other-click="$emit('other-click')"
|
|
@@ -47,33 +39,26 @@
|
|
|
47
39
|
<template v-else>
|
|
48
40
|
<BaseItem
|
|
49
41
|
v-if="item.renderable !== false"
|
|
50
|
-
|
|
51
42
|
:key="item.mold + '-' + (item.prop ? item.prop : idx)"
|
|
52
|
-
|
|
53
43
|
v-model="value"
|
|
54
44
|
:formData="formData"
|
|
55
|
-
|
|
56
45
|
:class="[
|
|
57
46
|
'form-item',
|
|
58
47
|
`form-item-${item.mold}`,
|
|
59
48
|
{
|
|
60
|
-
'form-item-link':
|
|
49
|
+
'form-item-link':
|
|
50
|
+
item.link && ((Array.isArray(item.link) && item.link.some((link) => link.mold)) || item.link.mold)
|
|
61
51
|
},
|
|
62
52
|
`form-item-${item.mold}-${item.prop ? item.prop : idx}`
|
|
63
53
|
]"
|
|
64
|
-
|
|
65
54
|
:popper-class="popperClass"
|
|
66
|
-
|
|
67
55
|
:item="item"
|
|
68
56
|
:resets.sync="resets"
|
|
69
57
|
:disableds="disableds"
|
|
70
|
-
|
|
71
58
|
:loading="loading"
|
|
72
|
-
|
|
73
59
|
:from="from"
|
|
74
60
|
:show-mode="showMode"
|
|
75
|
-
|
|
76
|
-
@after-leave="val => $emit('after-leave', val)"
|
|
61
|
+
@after-leave="(val) => $emit('after-leave', val)"
|
|
77
62
|
@query-click="$emit('query-click')"
|
|
78
63
|
@add-click="$emit('add-click')"
|
|
79
64
|
@other-click="$emit('other-click')"
|
|
@@ -86,7 +71,6 @@
|
|
|
86
71
|
</template>
|
|
87
72
|
|
|
88
73
|
<script>
|
|
89
|
-
|
|
90
74
|
import BaseItem from './Item'
|
|
91
75
|
|
|
92
76
|
export default {
|
|
@@ -105,11 +89,11 @@ export default {
|
|
|
105
89
|
},
|
|
106
90
|
from: {
|
|
107
91
|
type: String,
|
|
108
|
-
default: null
|
|
92
|
+
default: null
|
|
109
93
|
},
|
|
110
94
|
config: {
|
|
111
95
|
type: Array,
|
|
112
|
-
default: () =>
|
|
96
|
+
default: () => []
|
|
113
97
|
},
|
|
114
98
|
|
|
115
99
|
loading: {
|
|
@@ -141,6 +125,6 @@ export default {
|
|
|
141
125
|
type: String,
|
|
142
126
|
default: ''
|
|
143
127
|
}
|
|
144
|
-
}
|
|
128
|
+
}
|
|
145
129
|
}
|
|
146
130
|
</script>
|