n20-common-lib 1.3.8 → 1.3.11
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/nstc-g6/assets/svg/404.svg +1 -0
- package/nstc-g6/assets/svg/addFile.svg +32 -0
- package/nstc-g6/assets/svg/bug.svg +1 -0
- package/nstc-g6/assets/svg/chart.svg +1 -0
- package/nstc-g6/assets/svg/clipboard.svg +1 -0
- package/nstc-g6/assets/svg/component.svg +1 -0
- package/nstc-g6/assets/svg/dashboard.svg +1 -0
- package/nstc-g6/assets/svg/deleteFile.svg +28 -0
- package/nstc-g6/assets/svg/documentation.svg +1 -0
- package/nstc-g6/assets/svg/drag.svg +1 -0
- package/nstc-g6/assets/svg/edit.svg +1 -0
- package/nstc-g6/assets/svg/education.svg +1 -0
- package/nstc-g6/assets/svg/email.svg +1 -0
- package/nstc-g6/assets/svg/example.svg +1 -0
- package/nstc-g6/assets/svg/excel.svg +1 -0
- package/nstc-g6/assets/svg/exit-fullscreen.svg +1 -0
- package/nstc-g6/assets/svg/eye-open.svg +1 -0
- package/nstc-g6/assets/svg/eye.svg +1 -0
- package/nstc-g6/assets/svg/favorite.svg +1 -0
- package/nstc-g6/assets/svg/favorite_active.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400_active.svg +1 -0
- package/nstc-g6/assets/svg/favorite_x400_blank.svg +1 -0
- package/nstc-g6/assets/svg/filter.svg +16 -0
- package/nstc-g6/assets/svg/filter@2x.png +0 -0
- package/nstc-g6/assets/svg/filterActive.svg +16 -0
- package/nstc-g6/assets/svg/filterClose@2x.png +0 -0
- package/nstc-g6/assets/svg/form.svg +1 -0
- package/nstc-g6/assets/svg/fullscreen.svg +1 -0
- package/nstc-g6/assets/svg/guide.svg +1 -0
- package/nstc-g6/assets/svg/hourglass.svg +19 -0
- package/nstc-g6/assets/svg/icon.svg +1 -0
- package/nstc-g6/assets/svg/international.svg +1 -0
- package/nstc-g6/assets/svg/language.svg +1 -0
- package/nstc-g6/assets/svg/left-dis.svg +1 -0
- package/nstc-g6/assets/svg/left.svg +1 -0
- package/nstc-g6/assets/svg/link.svg +1 -0
- package/nstc-g6/assets/svg/list.svg +1 -0
- package/nstc-g6/assets/svg/lock.svg +1 -0
- package/nstc-g6/assets/svg/message-t.svg +1 -0
- package/nstc-g6/assets/svg/money.svg +1 -0
- package/nstc-g6/assets/svg/money3.svg +1 -0
- package/nstc-g6/assets/svg/money4.svg +1 -0
- package/nstc-g6/assets/svg/moneyTwo.svg +1 -0
- package/nstc-g6/assets/svg/msg_white.svg +1 -0
- package/nstc-g6/assets/svg/nested.svg +1 -0
- package/nstc-g6/assets/svg/newsearch.svg +19 -0
- package/nstc-g6/assets/svg/password.svg +1 -0
- package/nstc-g6/assets/svg/pdf.svg +1 -0
- package/nstc-g6/assets/svg/people.svg +1 -0
- package/nstc-g6/assets/svg/peoples.svg +1 -0
- package/nstc-g6/assets/svg/phone.svg +1 -0
- package/nstc-g6/assets/svg/phone_msg.svg +1 -0
- package/nstc-g6/assets/svg/qq.svg +1 -0
- package/nstc-g6/assets/svg/right-dis.svg +1 -0
- package/nstc-g6/assets/svg/right.svg +1 -0
- package/nstc-g6/assets/svg/search.svg +1 -0
- package/nstc-g6/assets/svg/searchActive.svg +19 -0
- package/nstc-g6/assets/svg/shopping.svg +1 -0
- package/nstc-g6/assets/svg/size.svg +1 -0
- package/nstc-g6/assets/svg/skill.svg +1 -0
- package/nstc-g6/assets/svg/star.svg +1 -0
- package/nstc-g6/assets/svg/steam.svg +1 -0
- package/nstc-g6/assets/svg/tab.svg +1 -0
- package/nstc-g6/assets/svg/table.svg +1 -0
- package/nstc-g6/assets/svg/theme.svg +1 -0
- package/nstc-g6/assets/svg/tree-table.svg +1 -0
- package/nstc-g6/assets/svg/tree.svg +1 -0
- package/nstc-g6/assets/svg/user.svg +1 -0
- package/nstc-g6/assets/svg/wechat.svg +1 -0
- package/nstc-g6/assets/svg/z-left-2-dis.svg +1 -0
- package/nstc-g6/assets/svg/z-left-2.svg +1 -0
- package/nstc-g6/assets/svg/z-right-2-dis.svg +1 -0
- package/nstc-g6/assets/svg/z-right-2.svg +1 -0
- package/nstc-g6/assets/svg/z-right.svg +1 -0
- package/nstc-g6/assets/svg/zip.svg +1 -0
- package/nstc-g6/components/Calendar/index.js +8 -0
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +129 -0
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +126 -0
- package/nstc-g6/components/Calendar/src/main.vue +442 -0
- package/nstc-g6/components/DialogForm/index.js +8 -0
- package/nstc-g6/components/DialogForm/src/demo/index.vue +56 -0
- package/nstc-g6/components/DialogForm/src/main.vue +189 -0
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +281 -0
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1222 -0
- package/nstc-g6/components/Form/A_DEMO/index.vue +803 -0
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +72 -0
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +191 -0
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +128 -0
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +233 -0
- package/nstc-g6/components/Form/BusinessSpecific/readme.md +7 -0
- package/nstc-g6/components/Form/CascaderCustom/index.vue +101 -0
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +84 -0
- package/nstc-g6/components/Form/Component.vue +661 -0
- package/nstc-g6/components/Form/ComponentSecond.vue +650 -0
- package/nstc-g6/components/Form/DatepickerCustom/index.vue +130 -0
- package/nstc-g6/components/Form/InputAndDialog/index.js +15 -0
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +395 -0
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +65 -0
- package/nstc-g6/components/Form/InputCustom/index.vue +307 -0
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +31 -0
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +118 -0
- package/nstc-g6/components/Form/Item.vue +330 -0
- package/nstc-g6/components/Form/ItemSecond.vue +269 -0
- package/nstc-g6/components/Form/List.vue +146 -0
- package/nstc-g6/components/Form/ListSecond.vue +130 -0
- package/nstc-g6/components/Form/RadioCustom/index.vue +73 -0
- package/nstc-g6/components/Form/SelectAccount/index.js +15 -0
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +58 -0
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +283 -0
- package/nstc-g6/components/Form/SelectAndDialog/index.js +15 -0
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +384 -0
- package/nstc-g6/components/Form/SelectCashFlow/index.js +15 -0
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +42 -0
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +126 -0
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +82 -0
- package/nstc-g6/components/Form/SelectCustom/index.vue +488 -0
- package/nstc-g6/components/Form/SelectSubject/index.js +15 -0
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +85 -0
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +182 -0
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +188 -0
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +650 -0
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +7 -0
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +53 -0
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +183 -0
- package/nstc-g6/components/Form/TextCustom/index.vue +38 -0
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +31 -0
- package/nstc-g6/components/Form/UploadCustom/iconxitongshezhi-yichu.png +0 -0
- package/nstc-g6/components/Form/UploadCustom/index.vue +506 -0
- package/nstc-g6/components/Form/configs.js +191 -0
- package/nstc-g6/components/Form/configsSecond.js +161 -0
- package/nstc-g6/components/Form/index.js +8 -0
- package/nstc-g6/components/Form/index.scss +29 -0
- package/nstc-g6/components/Form/payeePersonSelect/index.js +15 -0
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +164 -0
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +185 -0
- package/nstc-g6/components/Form/readme.txt +4 -0
- package/nstc-g6/components/FormGroup/index.js +8 -0
- package/nstc-g6/components/FormGroup/src/demo/config.js +23 -0
- package/nstc-g6/components/FormGroup/src/demo/index.vue +85 -0
- package/nstc-g6/components/FormGroup/src/main.vue +639 -0
- package/nstc-g6/components/FormGroup/src/validate.js +23 -0
- package/nstc-g6/components/InputTag/InputTag.vue +270 -0
- package/nstc-g6/components/NstcApprovel/NstcApprovel.vue +24 -0
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +150 -0
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +123 -0
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +162 -0
- package/nstc-g6/components/NstcCharts/define.js +74 -0
- package/nstc-g6/components/NstcCharts/mixins/resize.js +56 -0
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +152 -0
- package/nstc-g6/components/NstcConfirm/index.js +25 -0
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +185 -0
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +176 -0
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +280 -0
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +52 -0
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +396 -0
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +591 -0
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +475 -0
- package/nstc-g6/components/NstcExcelCustomImport/img/upload@2x.png +0 -0
- package/nstc-g6/components/NstcExcelExport/NstcExcelExport.vue +145 -0
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +1074 -0
- package/nstc-g6/components/NstcExcelImport/img/upload@2x.png +0 -0
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +1166 -0
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +130 -0
- package/nstc-g6/components/NstcExpandCollapse/index.scss +77 -0
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +989 -0
- package/nstc-g6/components/NstcFileUpload/img/addFile.svg +32 -0
- package/nstc-g6/components/NstcFileUpload/img/delete.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/deleteFile.svg +28 -0
- package/nstc-g6/components/NstcFileUpload/img/download.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/inputUpload.svg +30 -0
- package/nstc-g6/components/NstcFileUpload/img/look-diabled.svg +24 -0
- package/nstc-g6/components/NstcFileUpload/img/look.svg +24 -0
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +281 -0
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1222 -0
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +796 -0
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +68 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputMultiple.vue +189 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +128 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +233 -0
- package/nstc-g6/components/NstcForm/BusinessSpecific/readme.md +7 -0
- package/nstc-g6/components/NstcForm/CascaderCustom/index.vue +101 -0
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +84 -0
- package/nstc-g6/components/NstcForm/Component.vue +684 -0
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +650 -0
- package/nstc-g6/components/NstcForm/DatepickerCustom/index.vue +130 -0
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +389 -0
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +314 -0
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +116 -0
- package/nstc-g6/components/NstcForm/Item.vue +327 -0
- package/nstc-g6/components/NstcForm/ItemSecond.vue +269 -0
- package/nstc-g6/components/NstcForm/List.vue +146 -0
- package/nstc-g6/components/NstcForm/ListSecond.vue +130 -0
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +73 -0
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +334 -0
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +377 -0
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +123 -0
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +460 -0
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +185 -0
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +648 -0
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +183 -0
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +38 -0
- package/nstc-g6/components/NstcForm/UploadCustom/iconxitongshezhi-yichu.png +0 -0
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +500 -0
- package/nstc-g6/components/NstcForm/configs.js +191 -0
- package/nstc-g6/components/NstcForm/configsSecond.js +161 -0
- package/nstc-g6/components/NstcForm/index.js +8 -0
- package/nstc-g6/components/NstcForm/index.scss +29 -0
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +188 -0
- package/nstc-g6/components/NstcForm/readme.txt +4 -0
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +428 -0
- package/nstc-g6/components/NstcPagination/setPageNum.png +0 -0
- package/nstc-g6/components/NstcPagination/setpagedefault.png +0 -0
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +70 -0
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +729 -0
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +676 -0
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +97 -0
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +72 -0
- package/nstc-g6/components/NstcTab/NstcTab.vue +80 -0
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +45 -0
- package/nstc-g6/components/NstcTabWithBadge/index.scss +31 -0
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +292 -0
- package/nstc-g6/components/NstcTable/NstcTable.vue +460 -0
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +801 -0
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +186 -0
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +330 -0
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +145 -0
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +176 -0
- package/nstc-g6/components/Search/NstcSearch.vue +583 -0
- package/nstc-g6/components/Search/src/demo/index copy.vue +101 -0
- package/nstc-g6/components/Search/src/demo/index.vue +103 -0
- package/nstc-g6/components/Search/src/main copy.vue +607 -0
- package/nstc-g6/components/approvelTwo/main.vue +220 -0
- package/nstc-g6/components/approvelTwo/progress.vue +154 -0
- package/nstc-g6/directives/VCopy/index.js +60 -0
- package/nstc-g6/directives/VNstcNumber/index.js +14 -0
- package/nstc-g6/directives/VNstcNumber/temp.js +446 -0
- package/nstc-g6/index.js +193 -0
- package/nstc-g6/utils/auth.js +2 -0
- package/nstc-g6/utils/axios.js +2 -0
- package/nstc-g6/utils/dateAndValidator.js +649 -0
- package/nstc-g6/utils/debounce.js +40 -0
- package/nstc-g6/utils/parseTime.js +48 -0
- package/nstc-g6/utils/validate/index.js +7 -0
- package/nstc-g6/utils/vendor/Export2Excel.js +229 -0
- package/nstc-g6/utils/vendor/Export2Zip.js +24 -0
- package/nstc-g6/utils/vue-bus.js +5 -0
- package/package.json +8 -2
- package/src/assets/css/_coreLib.scss +9 -1
- package/src/components/ChildRange/index.vue +28 -64
- package/src/components/ChildRange/style.scss +34 -0
- package/src/components/FileImport/index.vue +3 -1
- package/src/components/PageHeader/index.vue +3 -47
- package/src/components/PageHeader/style.scss +39 -0
- package/src/components/Search/index.vue +1 -97
- package/src/components/Search/style.scss +93 -0
- package/src/components/Table/ThSelectHeader.vue +28 -33
- package/src/components/Table/index.vue +4 -2
- package/src/directives/VTitle/index.js +14 -17
- package/style/css/normalize.scss +6 -6
- package/style/index.css +3 -3
- package/style/index.css.map +1 -1
- package/style/server-config.jsonc +527 -410
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:key="key"
|
|
4
|
+
:class="['upload-custom',{ 'is-multiple': multiple || valueClassification.img.length }]"
|
|
5
|
+
:style="{ width: `${_width}px` }"
|
|
6
|
+
>
|
|
7
|
+
<input
|
|
8
|
+
v-if="isChoosing"
|
|
9
|
+
ref="fileInput"
|
|
10
|
+
type="file"
|
|
11
|
+
:multiple="multiple"
|
|
12
|
+
@change="handleFileChange"
|
|
13
|
+
>
|
|
14
|
+
<el-button
|
|
15
|
+
v-if="!isView"
|
|
16
|
+
:loading="loading"
|
|
17
|
+
:icon="_icon"
|
|
18
|
+
:disabled="_disabled"
|
|
19
|
+
class="button-cancel"
|
|
20
|
+
@click="chooseFile"
|
|
21
|
+
>
|
|
22
|
+
<span>{{ text }}</span>
|
|
23
|
+
</el-button>
|
|
24
|
+
|
|
25
|
+
<template v-if="showFile">
|
|
26
|
+
<template v-if="!multiple && valueClassification.other.length">
|
|
27
|
+
<div
|
|
28
|
+
v-if="fileName"
|
|
29
|
+
class="upload-file-name"
|
|
30
|
+
:title="fileName"
|
|
31
|
+
>
|
|
32
|
+
{{ fileName }}
|
|
33
|
+
</div>
|
|
34
|
+
<el-button
|
|
35
|
+
v-if="fileName"
|
|
36
|
+
class="upload-file-delete"
|
|
37
|
+
type="text"
|
|
38
|
+
@click="handleClickFileBtn"
|
|
39
|
+
>
|
|
40
|
+
{{ fileBtnName }}
|
|
41
|
+
</el-button>
|
|
42
|
+
</template>
|
|
43
|
+
<template v-else>
|
|
44
|
+
<div class="upload-file-other">
|
|
45
|
+
<div
|
|
46
|
+
v-for="(item,index) in valueClassification.other"
|
|
47
|
+
:key="index"
|
|
48
|
+
class="upload-file-other-item"
|
|
49
|
+
>
|
|
50
|
+
<div
|
|
51
|
+
class="upload-file-name"
|
|
52
|
+
:title="item.fileName"
|
|
53
|
+
>
|
|
54
|
+
{{ item.fileName }}
|
|
55
|
+
</div>
|
|
56
|
+
<el-button
|
|
57
|
+
class="upload-file-other-delete"
|
|
58
|
+
type="text"
|
|
59
|
+
@click="handleClickFileBtn(item) "
|
|
60
|
+
>
|
|
61
|
+
{{ fileBtnName }}
|
|
62
|
+
</el-button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="upload-file-img">
|
|
66
|
+
<div
|
|
67
|
+
v-for="(item,index) in valueClassification.img"
|
|
68
|
+
:key="index"
|
|
69
|
+
class="upload-file-img-item"
|
|
70
|
+
>
|
|
71
|
+
<el-image
|
|
72
|
+
:src="item.fileUrl"
|
|
73
|
+
:preview-src-list="getPreviewSrcList(index)"
|
|
74
|
+
/>
|
|
75
|
+
<img
|
|
76
|
+
v-if="!isView"
|
|
77
|
+
:src="closeImg"
|
|
78
|
+
alt="#"
|
|
79
|
+
@click="handleDelete(item)"
|
|
80
|
+
>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</template>
|
|
84
|
+
</template>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script>
|
|
89
|
+
import closeImg from './iconxitongshezhi-yichu.png'
|
|
90
|
+
|
|
91
|
+
import request from '@/utils/request'
|
|
92
|
+
// import OSS from 'ali-oss'
|
|
93
|
+
|
|
94
|
+
export default {
|
|
95
|
+
name: 'UploadCustom',
|
|
96
|
+
|
|
97
|
+
inheritAttrs: false,
|
|
98
|
+
|
|
99
|
+
props: {
|
|
100
|
+
text: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: function () {
|
|
103
|
+
return '请选择附件'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
icon: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: undefined
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
value: { // 值格式为单选{ fileName,fileUrl }/{ fileName,file },或者多选[{ fileName,fileUrl }]/[{ fileName,file }]
|
|
113
|
+
type: [Object, Array],
|
|
114
|
+
default: null
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
valueIsFileUrl: { // true时,值返回格式为{ fileName,fileUrl };false时,值返回格式为{ fileName,file }(file为文件类型)
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
url: { // 上传到自定义服务器的url
|
|
123
|
+
type: String,
|
|
124
|
+
default: null
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
disabled: { // 是否禁用
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: false
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
showFile: { // 是否展示长传结果
|
|
133
|
+
type: Boolean,
|
|
134
|
+
default: true
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
validator: { // 上传前的验证,参数为typeCode(文件头前8位,用于检测文件真实格式), raw(文件buffer对象)
|
|
138
|
+
type: Function,
|
|
139
|
+
default: null
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
beforeChooseFile: { // 选择文件前的前置函数
|
|
143
|
+
type: Function,
|
|
144
|
+
default: null
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
width: {
|
|
148
|
+
type: [String, Number],
|
|
149
|
+
default: undefined
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
max: { // 多选时,最大上传文件个数
|
|
153
|
+
type: Number,
|
|
154
|
+
default: 5
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
multiple: { // 是否支持多选
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: false
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
isView: { // 是否仅查看
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: false
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
storeAsPrefix: { // ali-oss上传路径前缀
|
|
168
|
+
type: String,
|
|
169
|
+
default: ''
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
data() {
|
|
174
|
+
return {
|
|
175
|
+
key: `UploadCustomID-${Math.random()
|
|
176
|
+
.toString(36)
|
|
177
|
+
.slice(2)}`,
|
|
178
|
+
|
|
179
|
+
loading: false,
|
|
180
|
+
isChoosing: false,
|
|
181
|
+
revokeObjectURL: [],
|
|
182
|
+
closeImg
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
computed: {
|
|
187
|
+
_value: {
|
|
188
|
+
get() {
|
|
189
|
+
return this.value
|
|
190
|
+
},
|
|
191
|
+
set(val) {
|
|
192
|
+
this.$emit('input', val)
|
|
193
|
+
this.$emit('change', val)
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
fileName() {
|
|
198
|
+
return !this.multiple && this._value && this._value.fileName
|
|
199
|
+
? this._value.fileName
|
|
200
|
+
: ''
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
_width() {
|
|
204
|
+
return this.width ? (this.width + '').replace(/px/, '') : undefined
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
_icon() {
|
|
208
|
+
return this.icon ? this.icon : undefined
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
_disabled() {
|
|
212
|
+
return this.disabled || (Array.isArray(this._value) && this._value.length >= this.max)
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
valueClassification() {
|
|
216
|
+
const _value = this.multiple ? this._value : this._value ? [this._value] : []
|
|
217
|
+
const reg = /\.(png|jpg|gif|jpeg)$/
|
|
218
|
+
|
|
219
|
+
return _value.reduce((prev, file, index) => {
|
|
220
|
+
if (reg.test(file.fileName)) {
|
|
221
|
+
let fileUrl = ''
|
|
222
|
+
|
|
223
|
+
if (file.fileUrl) {
|
|
224
|
+
fileUrl = file.fileUrl
|
|
225
|
+
} else {
|
|
226
|
+
fileUrl = window.URL.createObjectURL(file.file)
|
|
227
|
+
this.revokeObjectURL.push(fileUrl)
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
prev.img.push({
|
|
231
|
+
fileUrl,
|
|
232
|
+
index,
|
|
233
|
+
...file
|
|
234
|
+
})
|
|
235
|
+
} else {
|
|
236
|
+
prev.other.push({
|
|
237
|
+
...file,
|
|
238
|
+
index
|
|
239
|
+
})
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return prev
|
|
243
|
+
}, { img: [], other: [] })
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
getPreviewSrcList() {
|
|
247
|
+
return index => {
|
|
248
|
+
const imgUrls = this.valueClassification.img.map(item => item.fileUrl)
|
|
249
|
+
|
|
250
|
+
return imgUrls.slice(index).concat(imgUrls.slice(0, index))
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
fileBtnName() {
|
|
255
|
+
return this.isView ? '下载' : '删除'
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
beforeDestroy() {
|
|
260
|
+
this.revokeObjectURL.forEach(fileUrl => window.URL.revokeObjectURL(fileUrl))
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
methods: {
|
|
264
|
+
async chooseFile() {
|
|
265
|
+
try {
|
|
266
|
+
this.isChoosing = true
|
|
267
|
+
this.beforeChooseFile && await this.beforeChooseFile()
|
|
268
|
+
|
|
269
|
+
await this.$nextTick()
|
|
270
|
+
|
|
271
|
+
this.$refs.fileInput.click()
|
|
272
|
+
} catch (err) {
|
|
273
|
+
console.error(err)
|
|
274
|
+
// this.$$message(err)
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
async handleFileChange(e) {
|
|
279
|
+
this.loading = true
|
|
280
|
+
this.isChoosing = false
|
|
281
|
+
|
|
282
|
+
try {
|
|
283
|
+
const files = Array.from(e.target.files)
|
|
284
|
+
|
|
285
|
+
await this.fileMaxCheck(files)
|
|
286
|
+
await Promise.all(files.map(file => this.fileTypeCheck(file)))
|
|
287
|
+
|
|
288
|
+
const value = await Promise.all(files.map(file => this.singleFileUpload(file)))
|
|
289
|
+
|
|
290
|
+
this._value = this.multiple
|
|
291
|
+
? [...this._value, ...value]
|
|
292
|
+
: value[0]
|
|
293
|
+
} catch (err) {
|
|
294
|
+
// this.$$message(err.reason || '上传失败')
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
this.loading = false
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
async singleFileUpload(file) {
|
|
301
|
+
try {
|
|
302
|
+
const fileName = file.name
|
|
303
|
+
|
|
304
|
+
if (this.valueIsFileUrl) {
|
|
305
|
+
let fileUrl = ''
|
|
306
|
+
|
|
307
|
+
if (this.url) {
|
|
308
|
+
const fd = new FormData()
|
|
309
|
+
|
|
310
|
+
fd.append('file', file)
|
|
311
|
+
|
|
312
|
+
fileUrl = await request.post(this.url, fd, {
|
|
313
|
+
headers: {
|
|
314
|
+
'Content-Type': 'multipart/form-data'
|
|
315
|
+
}
|
|
316
|
+
})
|
|
317
|
+
} else {
|
|
318
|
+
// const data = await request.post('/api/upload/auth') // 授权
|
|
319
|
+
// const client = new OSS({
|
|
320
|
+
// endpoint: data.region,
|
|
321
|
+
// accessKeyId: data.accessKeyId,
|
|
322
|
+
// accessKeySecret: data.accessKeySecret,
|
|
323
|
+
// stsToken: data.securityToken,
|
|
324
|
+
// bucket: data.bucket
|
|
325
|
+
// })
|
|
326
|
+
//
|
|
327
|
+
// const _name = data.fileName + fileName.substring(fileName.lastIndexOf('.'), fileName.length)
|
|
328
|
+
//
|
|
329
|
+
// const storeAs = this.storeAsPrefix + new Date().getTime() + '/' + _name
|
|
330
|
+
// const { res } = await client.multipartUpload(storeAs, file, {
|
|
331
|
+
// mime: 'application/octet-stream',
|
|
332
|
+
// secure: true
|
|
333
|
+
// })
|
|
334
|
+
//
|
|
335
|
+
// fileUrl = res.requestUrls[0]
|
|
336
|
+
//
|
|
337
|
+
// if (fileUrl.indexOf('?') > 0) {
|
|
338
|
+
// fileUrl = fileUrl.substring(0, fileUrl.indexOf('?'))
|
|
339
|
+
// }
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return {
|
|
343
|
+
fileUrl,
|
|
344
|
+
fileName
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return {
|
|
349
|
+
file,
|
|
350
|
+
fileName
|
|
351
|
+
}
|
|
352
|
+
} catch (err) {
|
|
353
|
+
return Promise.reject(err)
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
handleClickFileBtn(item) {
|
|
358
|
+
if (this.isView) {
|
|
359
|
+
window.open(item.fileUrl)
|
|
360
|
+
} else {
|
|
361
|
+
this.handleDelete(item)
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
handleDelete(item) {
|
|
366
|
+
if (this.multiple) {
|
|
367
|
+
this._value.splice(item.index, 1)
|
|
368
|
+
} else {
|
|
369
|
+
this._value = null
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
|
|
373
|
+
fileTypeCheck(raw) {
|
|
374
|
+
const _this = this
|
|
375
|
+
|
|
376
|
+
return new Promise((resolve, reject) => {
|
|
377
|
+
const reader = new FileReader()
|
|
378
|
+
|
|
379
|
+
reader.onload = async function(r) {
|
|
380
|
+
try {
|
|
381
|
+
const buffer = r.target.result
|
|
382
|
+
const dataview = new DataView(buffer)
|
|
383
|
+
const ints = new Uint16Array(buffer.byteLength)
|
|
384
|
+
|
|
385
|
+
for (let i = 0; i < 4; i++) {
|
|
386
|
+
ints[i] = dataview.getUint8(i)
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
const typeCode = ints
|
|
390
|
+
.reduce((acc, val) => acc + val.toString(16), '')
|
|
391
|
+
.slice(0, 8)
|
|
392
|
+
.toLowerCase()
|
|
393
|
+
|
|
394
|
+
if (typeof _this.validator === 'function') {
|
|
395
|
+
await _this.validator(typeCode, raw)
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
resolve()
|
|
399
|
+
} catch (err) {
|
|
400
|
+
reject(err)
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
reader.readAsArrayBuffer(raw)
|
|
405
|
+
})
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
fileMaxCheck(files) {
|
|
409
|
+
return new Promise((resolve, reject) => {
|
|
410
|
+
if (this.multiple && (files.length + this._value.length > this.max)) {
|
|
411
|
+
reject({ reason: `最多上传文件数:${this.max}` })
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
resolve()
|
|
415
|
+
})
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
</script>
|
|
420
|
+
|
|
421
|
+
<style lang="scss">
|
|
422
|
+
.upload-custom {
|
|
423
|
+
display: inline-flex;
|
|
424
|
+
align-items: center;
|
|
425
|
+
position: relative;
|
|
426
|
+
padding-right: 32px;
|
|
427
|
+
&.is-multiple {
|
|
428
|
+
display: inline-block;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.button-cancel {
|
|
432
|
+
flex: none;
|
|
433
|
+
padding: 0 15px 0 12px;
|
|
434
|
+
width: auto;
|
|
435
|
+
display: inline-flex;
|
|
436
|
+
align-items: center;
|
|
437
|
+
i {
|
|
438
|
+
margin-right: 6px;
|
|
439
|
+
font-size: 9px;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
input {
|
|
444
|
+
display: none;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.upload-file {
|
|
448
|
+
&-name {
|
|
449
|
+
font-size: 14px;
|
|
450
|
+
padding-left: 10px;
|
|
451
|
+
flex: auto;
|
|
452
|
+
overflow: hidden;
|
|
453
|
+
white-space: nowrap;
|
|
454
|
+
text-overflow: ellipsis;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
&-delete {
|
|
458
|
+
position: absolute;
|
|
459
|
+
top: 9px;
|
|
460
|
+
right: 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
&-other {
|
|
464
|
+
display: flex;
|
|
465
|
+
flex-wrap: wrap;
|
|
466
|
+
margin-top: 5px;
|
|
467
|
+
&-item {
|
|
468
|
+
flex: none;
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
margin-right: 40px;
|
|
472
|
+
.upload-file-name {
|
|
473
|
+
padding-left: 0;
|
|
474
|
+
padding-right: 10px;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
&-img {
|
|
480
|
+
display: flex;
|
|
481
|
+
margin-top: 5px;
|
|
482
|
+
flex-wrap: wrap;
|
|
483
|
+
&-item {
|
|
484
|
+
flex: none;
|
|
485
|
+
margin-right: 10px;
|
|
486
|
+
position: relative;
|
|
487
|
+
.el-image {
|
|
488
|
+
width: 72px;
|
|
489
|
+
height: 72px;
|
|
490
|
+
background-color: #fff;
|
|
491
|
+
border-radius: 2px;
|
|
492
|
+
border: #CFD8E6;
|
|
493
|
+
}
|
|
494
|
+
& > img {
|
|
495
|
+
position: absolute;
|
|
496
|
+
right: 0;
|
|
497
|
+
top: 0;
|
|
498
|
+
width: 16px;
|
|
499
|
+
height: 16px;
|
|
500
|
+
cursor: pointer;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
</style>
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [important] 请添加支持组件的类型的同时, 指定组件引入 和 对应组件默认状态值
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// const DatepickerCustom = () => import('./DatepickerCustom')
|
|
6
|
+
// const InputCustom = () => import('./InputCustom')
|
|
7
|
+
// const IntervalinputCustom = () => import('./IntervalinputCustom')
|
|
8
|
+
// const AutocompleteCustom = () => import('./AutocompleteCustom')
|
|
9
|
+
// const SelectCustom = () => import('./SelectCustom')
|
|
10
|
+
// const SelectindialogCustom = () => import('./SelectindialogCustom')
|
|
11
|
+
// const UploadCustom = () => import('./UploadCustom')
|
|
12
|
+
// const RadioCustom = () => import('./RadioCustom')
|
|
13
|
+
// const CheckboxCustom = () => import('./CheckboxCustom')
|
|
14
|
+
// const CascaderCustom = () => import('./CascaderCustom')
|
|
15
|
+
// const TextCustom = () => import('./TextCustom')
|
|
16
|
+
// const nstcuploadCustom = () => import('../Upload/src/main')
|
|
17
|
+
// const FormItemTips = () => ('../FormCreate/component/FormItemTips')
|
|
18
|
+
// const FormTooltips = () => ('../FormCreate/component/FormTooltips')
|
|
19
|
+
// const nstcselecttreeCustom = () => import('../SelectTree/src/main')
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
import DatepickerCustom from './DatepickerCustom'
|
|
23
|
+
import InputCustom from './InputCustom'
|
|
24
|
+
import IntervalinputCustom from './IntervalinputCustom'
|
|
25
|
+
import AutocompleteCustom from './AutocompleteCustom'
|
|
26
|
+
import SelectCustom from './SelectCustom'
|
|
27
|
+
import SelectindialogCustom from './SelectindialogCustom'
|
|
28
|
+
import UploadCustom from './UploadCustom'
|
|
29
|
+
import RadioCustom from './RadioCustom'
|
|
30
|
+
import CheckboxCustom from './CheckboxCustom'
|
|
31
|
+
import CascaderCustom from './CascaderCustom'
|
|
32
|
+
import TextCustom from './TextCustom'
|
|
33
|
+
import nstcuploadCustom from '^/Upload/src/main'
|
|
34
|
+
import nstcselecttreeCustom from '^/SelectTree/src/main'
|
|
35
|
+
import nstcselecttreelistCustom from '^/SelectTreeList/src/main'
|
|
36
|
+
import nstcfileuploadCustom from '^/FileUpload/src/main'
|
|
37
|
+
|
|
38
|
+
// 特殊的业务组件
|
|
39
|
+
import inputwithunitCustom from '^/Form/BusinessSpecific/InputWithUnit'
|
|
40
|
+
import inputmultipleCustom from '^/Form/BusinessSpecific/InputMultiple'
|
|
41
|
+
import selecttreedialogCustom from '^/Form/BusinessSpecific/SelectTreeDialog'
|
|
42
|
+
import selectaccountCustom from '^/Form/SelectAccount'
|
|
43
|
+
import selectcashflowCustom from '^/Form/SelectCashFlow'
|
|
44
|
+
import selectsubjectCustom from '^/Form/SelectSubject'
|
|
45
|
+
import payeePersonSelect from '^/Form/payeePersonSelect'
|
|
46
|
+
import inputAndDialog from '^/Form/InputAndDialog'
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
// 定义支持的类型
|
|
50
|
+
export const SUPPORT_TYPE = [
|
|
51
|
+
'datepicker',
|
|
52
|
+
'input',
|
|
53
|
+
'intervalinput',
|
|
54
|
+
'autocomplete',
|
|
55
|
+
'select',
|
|
56
|
+
'selectindialog',
|
|
57
|
+
'upload',
|
|
58
|
+
'radio',
|
|
59
|
+
'checkbox',
|
|
60
|
+
'cascader',
|
|
61
|
+
'text',
|
|
62
|
+
'nstcupload',
|
|
63
|
+
'nstcselecttree',
|
|
64
|
+
'nstcselecttreelist',
|
|
65
|
+
'nstcfileupload',
|
|
66
|
+
'inputwithunit',
|
|
67
|
+
'inputmultiple',
|
|
68
|
+
'selecttreedialog',
|
|
69
|
+
'selectaccount',
|
|
70
|
+
'selectcashflow',
|
|
71
|
+
'selectsubject'
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
// 支持的类型对应的组件
|
|
75
|
+
export const components = {
|
|
76
|
+
SelectindialogCustom, // loop
|
|
77
|
+
SelectCustom,
|
|
78
|
+
DatepickerCustom,
|
|
79
|
+
InputCustom,
|
|
80
|
+
IntervalinputCustom,
|
|
81
|
+
AutocompleteCustom,
|
|
82
|
+
UploadCustom,
|
|
83
|
+
RadioCustom,
|
|
84
|
+
CheckboxCustom,
|
|
85
|
+
CascaderCustom,
|
|
86
|
+
TextCustom,
|
|
87
|
+
nstcuploadCustom,
|
|
88
|
+
nstcselecttreeCustom,
|
|
89
|
+
nstcselecttreelistCustom,
|
|
90
|
+
nstcfileuploadCustom,
|
|
91
|
+
inputwithunitCustom,
|
|
92
|
+
inputmultipleCustom,
|
|
93
|
+
selecttreedialogCustom,
|
|
94
|
+
selectaccountCustom,
|
|
95
|
+
selectcashflowCustom,
|
|
96
|
+
selectsubjectCustom,
|
|
97
|
+
payeePersonSelect,
|
|
98
|
+
inputAndDialog
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// 支持的类型对应的默认值
|
|
102
|
+
export function getDefaultValue({ mold, multiple, type, default: def }) {
|
|
103
|
+
let _def
|
|
104
|
+
mold = mold.replace(/ /g, '')
|
|
105
|
+
switch (mold) {
|
|
106
|
+
case 'select':
|
|
107
|
+
case 'selectindialog':
|
|
108
|
+
case 'nstcBankBanchTree':
|
|
109
|
+
case 'selecttreedialog':
|
|
110
|
+
_def = {
|
|
111
|
+
value: isEmpty(def) ? multiple ? [] : null : def
|
|
112
|
+
}
|
|
113
|
+
break
|
|
114
|
+
|
|
115
|
+
case 'input':
|
|
116
|
+
case 'autocomplete':
|
|
117
|
+
case 'text':
|
|
118
|
+
case 'nstcselecttree':
|
|
119
|
+
case 'nstcselecttreelist':
|
|
120
|
+
case 'selectaccount':
|
|
121
|
+
case 'selectcashflow':
|
|
122
|
+
case 'selectsubject':
|
|
123
|
+
_def = {
|
|
124
|
+
value: isEmpty(def) ? '' : def
|
|
125
|
+
}
|
|
126
|
+
break
|
|
127
|
+
|
|
128
|
+
case 'upload':
|
|
129
|
+
_def = {
|
|
130
|
+
value: isEmpty(def)
|
|
131
|
+
? multiple
|
|
132
|
+
? []
|
|
133
|
+
: null
|
|
134
|
+
: multiple
|
|
135
|
+
? [...def]
|
|
136
|
+
: def
|
|
137
|
+
}
|
|
138
|
+
break
|
|
139
|
+
|
|
140
|
+
case 'checkbox':
|
|
141
|
+
case 'cascader':
|
|
142
|
+
case 'intervalinput':
|
|
143
|
+
case 'nstcupload':
|
|
144
|
+
case 'nstcfileupload':
|
|
145
|
+
case 'inputwithunit':
|
|
146
|
+
case 'inputmultiple':
|
|
147
|
+
_def = {
|
|
148
|
+
value: isEmpty(def) ? [] : [...def]
|
|
149
|
+
}
|
|
150
|
+
break
|
|
151
|
+
|
|
152
|
+
case 'radio':
|
|
153
|
+
_def = {
|
|
154
|
+
value: isEmpty(def) ? null : def
|
|
155
|
+
}
|
|
156
|
+
break
|
|
157
|
+
|
|
158
|
+
case 'datewmqy':
|
|
159
|
+
case 'datepicker':
|
|
160
|
+
_def = {
|
|
161
|
+
value: type && type.includes('range')
|
|
162
|
+
? isEmpty(def) ? [] : [...def]
|
|
163
|
+
: isEmpty(def) ? null : def
|
|
164
|
+
}
|
|
165
|
+
break
|
|
166
|
+
|
|
167
|
+
case 'switch':
|
|
168
|
+
_def = {
|
|
169
|
+
value: isEmpty(def) ? false : def
|
|
170
|
+
}
|
|
171
|
+
break
|
|
172
|
+
|
|
173
|
+
case 'querybutton':
|
|
174
|
+
case 'addbutton':
|
|
175
|
+
case 'otherbutton':
|
|
176
|
+
_def = null
|
|
177
|
+
break
|
|
178
|
+
|
|
179
|
+
default:
|
|
180
|
+
alert(`未匹配到符合该类型${mold}的功能,请联系开发人员`)
|
|
181
|
+
_def = null
|
|
182
|
+
break
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return _def
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function isEmpty(def) {
|
|
189
|
+
return def === null || def === undefined
|
|
190
|
+
}
|
|
191
|
+
|