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,488 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-select
|
|
4
|
+
v-model="_value"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
v-nstc-lazy-load="lazyLoadAction"
|
|
7
|
+
:style="{ width: parseFloat(width ? width : 224) + 'px' }"
|
|
8
|
+
:placeholder="placeholder || '请选择'"
|
|
9
|
+
:loading="loading"
|
|
10
|
+
:remote="remote"
|
|
11
|
+
:remote-method="remoteMethod"
|
|
12
|
+
:collapse-tags="collapseTags"
|
|
13
|
+
:multiple="multiple"
|
|
14
|
+
:filterable="filterable"
|
|
15
|
+
:allow-create="allowCreate"
|
|
16
|
+
:default-first-option="defaultFirstOption"
|
|
17
|
+
:value-key="valueKey"
|
|
18
|
+
:isCache="isCache"
|
|
19
|
+
v-on="$listeners"
|
|
20
|
+
:clearable="clearable"
|
|
21
|
+
@blur="selectBlur"
|
|
22
|
+
@visible-change="visibleChange"
|
|
23
|
+
@focus="selectFocus"
|
|
24
|
+
>
|
|
25
|
+
<template v-for="item in _options">
|
|
26
|
+
<el-option-group v-if="item.children" :key="item.label" v-bind="item">
|
|
27
|
+
<el-option
|
|
28
|
+
v-for="child in item.children"
|
|
29
|
+
:key="`${item.label}-${JSON.stringify(child.value)}`"
|
|
30
|
+
v-bind="child"
|
|
31
|
+
/>
|
|
32
|
+
</el-option-group>
|
|
33
|
+
<el-option v-else :key="JSON.stringify(item.value)" v-bind="item">
|
|
34
|
+
<div v-if="useCustomTemplate === 1">
|
|
35
|
+
<span style="float: left; margin-right: 6px">{{ item.value }}</span>
|
|
36
|
+
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
37
|
+
item.label
|
|
38
|
+
}}</span>
|
|
39
|
+
</div>
|
|
40
|
+
</el-option>
|
|
41
|
+
</template>
|
|
42
|
+
<template v-for="(_, slotName) in $slots" v-slot:[slotName]>
|
|
43
|
+
<slot :name="slotName" />
|
|
44
|
+
</template>
|
|
45
|
+
</el-select>
|
|
46
|
+
<!-- <span
|
|
47
|
+
class="remote"
|
|
48
|
+
ref="iconRomote"
|
|
49
|
+
@mouseleave="mouseleave"
|
|
50
|
+
@mouseenter="mouseenter"
|
|
51
|
+
>
|
|
52
|
+
<i
|
|
53
|
+
:class="[!showUp ? 'el-icon-arrow-down' : 'el-icon-arrow-up']"
|
|
54
|
+
v-if="remote && showIcon"
|
|
55
|
+
></i>
|
|
56
|
+
<i class="el-icon-circle-close" v-if="remote && !showIcon" @click="_value = ''"></i>
|
|
57
|
+
</span> -->
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
import request from "@/utils/request";
|
|
63
|
+
|
|
64
|
+
export default {
|
|
65
|
+
name: "SelectCustom",
|
|
66
|
+
|
|
67
|
+
inheritAttrs: false,
|
|
68
|
+
|
|
69
|
+
props: {
|
|
70
|
+
value: {
|
|
71
|
+
type: [String, Number, Boolean, Array, Object],
|
|
72
|
+
default: null,
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
width: {
|
|
76
|
+
type: [String, Number],
|
|
77
|
+
default: "",
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
options: {
|
|
81
|
+
type: [Array, String],
|
|
82
|
+
default: () => [],
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
collapseTags: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: true,
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
remote: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: false,
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
url: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "",
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
multiple: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false,
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
filterable: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false,
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
allowCreate: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
default: false,
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
defaultFirstOption: {
|
|
116
|
+
type: Boolean,
|
|
117
|
+
default: false,
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
reserveKeyword: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: false,
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
query: {
|
|
126
|
+
type: String,
|
|
127
|
+
default: "query",
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
// 远程搜索的其他参数
|
|
131
|
+
params: {
|
|
132
|
+
type: Object,
|
|
133
|
+
default: () => ({}),
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
valueKey: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: "value",
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
labelKey: {
|
|
142
|
+
type: String,
|
|
143
|
+
default: "label",
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
// 返回的值是不是对象
|
|
147
|
+
optionValueIsObject: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: false,
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
isSelectChangeValue: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
placeholder: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: function () {
|
|
160
|
+
return "请选择";
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
httpMethod: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: "get",
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
queryDataFormatter: {
|
|
170
|
+
type: Function,
|
|
171
|
+
default: (data) => {
|
|
172
|
+
return data;
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
useCustomTemplate: {
|
|
177
|
+
type: Number,
|
|
178
|
+
default: -1,
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
template: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: "",
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
// 是否添加懒加载
|
|
187
|
+
lazyLoad: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: false,
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
pageMode: {
|
|
193
|
+
type: String,
|
|
194
|
+
default: "common", // common 公共模式; special: 特殊模式
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
pageCurrentKey: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: "current",
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
pageSizeKey: {
|
|
203
|
+
type: String,
|
|
204
|
+
default: "size",
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
pageSize: {
|
|
208
|
+
type: Number,
|
|
209
|
+
default: 20,
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
clearable: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: true
|
|
215
|
+
},
|
|
216
|
+
// 返回数据取值
|
|
217
|
+
resProp: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: ''
|
|
220
|
+
},
|
|
221
|
+
// 是否缓存远程查询option
|
|
222
|
+
isCache: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: false,
|
|
225
|
+
},
|
|
226
|
+
// 是否初始化请求
|
|
227
|
+
isInitRequest: {
|
|
228
|
+
type: Boolean,
|
|
229
|
+
default: false,
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
directives: {
|
|
234
|
+
"nstc-lazy-load": {
|
|
235
|
+
bind(el, binding) {
|
|
236
|
+
const SELECTWRAP_DOM = el.querySelector(
|
|
237
|
+
".el-select-dropdown .el-select-dropdown__wrap"
|
|
238
|
+
);
|
|
239
|
+
SELECTWRAP_DOM.addEventListener("scroll", function () {
|
|
240
|
+
const condition =
|
|
241
|
+
this.scrollHeight - this.scrollTop <= this.clientHeight;
|
|
242
|
+
console.log("condition", condition);
|
|
243
|
+
if (condition) {
|
|
244
|
+
binding.value();
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
|
|
251
|
+
data() {
|
|
252
|
+
return {
|
|
253
|
+
showUp: false,
|
|
254
|
+
showIcon: true,
|
|
255
|
+
loading: false,
|
|
256
|
+
remoteOptions: [],
|
|
257
|
+
queryStr: null,
|
|
258
|
+
paginationObj: {
|
|
259
|
+
"page.current": 1,
|
|
260
|
+
"page.size": 20,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
},
|
|
264
|
+
created() {
|
|
265
|
+
this.$bus.$on("nstc_custom_form_config_update", (formData) => {
|
|
266
|
+
console.log("监听到的全局事件", formData);
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
beforeDestroy() {
|
|
270
|
+
this.$bus.$off("nstc_custom_form_config_update");
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
computed: {
|
|
274
|
+
_value: {
|
|
275
|
+
get() {
|
|
276
|
+
return this.value;
|
|
277
|
+
},
|
|
278
|
+
set(val) {
|
|
279
|
+
this.$emit("update:isSelectChangeValue", true);
|
|
280
|
+
|
|
281
|
+
this.$nextTick(() => {
|
|
282
|
+
this.$emit("input", val);
|
|
283
|
+
});
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
remoteMethod() {
|
|
288
|
+
return this.remote
|
|
289
|
+
? (query) => {
|
|
290
|
+
this.queryStr = query;
|
|
291
|
+
this.remoteOptions = [];
|
|
292
|
+
this.getList();
|
|
293
|
+
}
|
|
294
|
+
: undefined;
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
_options: {
|
|
298
|
+
get() {
|
|
299
|
+
// return this.remote ? this.remoteOptions : this.options;
|
|
300
|
+
|
|
301
|
+
if(this.url) {
|
|
302
|
+
return this.remoteOptions
|
|
303
|
+
} else{
|
|
304
|
+
if(Array.isArray(this.options)) {
|
|
305
|
+
return this.options;
|
|
306
|
+
}else {
|
|
307
|
+
try {
|
|
308
|
+
return JSON.parse(this.options)
|
|
309
|
+
} catch (error) {
|
|
310
|
+
return [];
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
set(val) {
|
|
317
|
+
return val;
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
watch: {
|
|
322
|
+
isInitRequest:{
|
|
323
|
+
handler(val) {
|
|
324
|
+
if (val) {
|
|
325
|
+
this.remoteOptions = []
|
|
326
|
+
this.getList()
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
immediate: true
|
|
330
|
+
},
|
|
331
|
+
url: {
|
|
332
|
+
immediate: true,
|
|
333
|
+
handler(val) {
|
|
334
|
+
if(val){
|
|
335
|
+
this.getList();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
methods: {
|
|
342
|
+
mouseenter() {
|
|
343
|
+
this._value && (this.showIcon = false)
|
|
344
|
+
},
|
|
345
|
+
mouseleave() {
|
|
346
|
+
this.showIcon = true;
|
|
347
|
+
},
|
|
348
|
+
setRemoteOptions(options) {
|
|
349
|
+
this.remoteOptions = options;
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* 懒加载
|
|
354
|
+
*/
|
|
355
|
+
lazyLoadAction() {
|
|
356
|
+
if (this.lazyLoad) {
|
|
357
|
+
this.paginationObj["page.current"]++;
|
|
358
|
+
this.getList();
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* 获取下拉列表
|
|
364
|
+
*/
|
|
365
|
+
async getList() {
|
|
366
|
+
this.loading = true;
|
|
367
|
+
try {
|
|
368
|
+
// 构建请求的体
|
|
369
|
+
let key = this.httpMethod.toLowerCase() === "post" ? "data" : "params";
|
|
370
|
+
// try {
|
|
371
|
+
// if (this.params["unitNo"]) {
|
|
372
|
+
// let User_Info = JSON.parse(sessionStorage.getItem("User_Info"));
|
|
373
|
+
// this.params["unitNo"] = User_Info ? User_Info.custNo : "";
|
|
374
|
+
// }
|
|
375
|
+
// for (let i in this.params) {
|
|
376
|
+
// try {
|
|
377
|
+
// if (i == "page") {
|
|
378
|
+
// this.params[i] = eval("(" + this.params[i] + ")");
|
|
379
|
+
// }
|
|
380
|
+
// } catch (e) {
|
|
381
|
+
// console.log(e);
|
|
382
|
+
// }
|
|
383
|
+
// }
|
|
384
|
+
// } catch (e) {
|
|
385
|
+
// console.log(e);
|
|
386
|
+
// }
|
|
387
|
+
this._options = [];
|
|
388
|
+
let keyParams = this.lazyLoad ? {
|
|
389
|
+
[this.query]: this.queryStr,
|
|
390
|
+
...this.paginationObj,
|
|
391
|
+
...this.params,
|
|
392
|
+
}: {
|
|
393
|
+
[this.query]: this.queryStr,
|
|
394
|
+
...this.params,
|
|
395
|
+
}
|
|
396
|
+
let remoteOptions = await request({
|
|
397
|
+
url: this.url,
|
|
398
|
+
method: this.httpMethod,
|
|
399
|
+
[key]: keyParams,
|
|
400
|
+
loading: false,
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
console.log(this.resProp, remoteOptions)
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
if (this.resProp && this.resProp !== '' && this.resProp !== null) {
|
|
407
|
+
remoteOptions = remoteOptions[this.resProp] || remoteOptions;
|
|
408
|
+
} else {
|
|
409
|
+
remoteOptions = remoteOptions[`list`] || remoteOptions;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// remoteOptions = remoteOptions[`list`] || remoteOptions;
|
|
413
|
+
if (!Array.isArray(remoteOptions)) {
|
|
414
|
+
remoteOptions = remoteOptions[Object.keys(remoteOptions)[0]];
|
|
415
|
+
}
|
|
416
|
+
// 返回数据格式化
|
|
417
|
+
this.queryDataFormatter &&
|
|
418
|
+
(remoteOptions = await this.queryDataFormatter(remoteOptions));
|
|
419
|
+
console.log(remoteOptions, "remoteOptions", this.remoteOptions);
|
|
420
|
+
!remoteOptions.length && (this.remoteOptions = []); //未查出数据,需要把下拉值置空
|
|
421
|
+
console.log(this.remoteOptions);
|
|
422
|
+
if (this.lazyLoad) {
|
|
423
|
+
const temp = remoteOptions.map((item) => {
|
|
424
|
+
const label = item[this.labelKey ? this.labelKey : "label"];
|
|
425
|
+
const value = item[this.valueKey ? this.valueKey : "value"];
|
|
426
|
+
return {
|
|
427
|
+
value: this.optionValueIsObject
|
|
428
|
+
? { ...item, label, value }
|
|
429
|
+
: value,
|
|
430
|
+
label,
|
|
431
|
+
};
|
|
432
|
+
});
|
|
433
|
+
this.remoteOptions = this.remoteOptions.concat(temp);
|
|
434
|
+
} else {
|
|
435
|
+
this.remoteOptions = remoteOptions.map((item) => {
|
|
436
|
+
const label = item[this.labelKey ? this.labelKey : "label"];
|
|
437
|
+
const value = item[this.valueKey ? this.valueKey : "value"];
|
|
438
|
+
return {
|
|
439
|
+
value: this.optionValueIsObject
|
|
440
|
+
? { ...item, label, value }
|
|
441
|
+
: value,
|
|
442
|
+
label,
|
|
443
|
+
};
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
} catch (err) {
|
|
447
|
+
console.error(err);
|
|
448
|
+
} finally {
|
|
449
|
+
this.loading = false;
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
visibleChange(val) {
|
|
453
|
+
this.showUp = val;
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* 失去焦点
|
|
457
|
+
*/
|
|
458
|
+
selectBlur() {
|
|
459
|
+
if (this.lazyLoad) {
|
|
460
|
+
this.paginationObj["page.current"]++;
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* 获取焦点
|
|
466
|
+
*/
|
|
467
|
+
selectFocus() {
|
|
468
|
+
this.queryStr = null;
|
|
469
|
+
if (!this.isCache && this.url && this._options.length < 1) {
|
|
470
|
+
this.remoteOptions = [];
|
|
471
|
+
this.getList();
|
|
472
|
+
}else if (this.isCache && this.url) {
|
|
473
|
+
this.remoteOptions = [];
|
|
474
|
+
this.getList();
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
};
|
|
479
|
+
</script>
|
|
480
|
+
|
|
481
|
+
<style scoped>
|
|
482
|
+
.remote {
|
|
483
|
+
position: relative;
|
|
484
|
+
left: -24px;
|
|
485
|
+
display: inline-block;
|
|
486
|
+
height: 100%;
|
|
487
|
+
}
|
|
488
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: your name
|
|
3
|
+
* @Date: 2022-01-13 10:45:13
|
|
4
|
+
* @LastEditTime: 2022-01-13 10:46:45
|
|
5
|
+
* @LastEditors: your name
|
|
6
|
+
* @Description: 科目输入弹窗
|
|
7
|
+
* @FilePath: \nstc_g6_common\packages\Form\NstcSelectSubject\index.js
|
|
8
|
+
*/
|
|
9
|
+
import NstcSelectSubject from "./src/main.vue";
|
|
10
|
+
|
|
11
|
+
NstcSelectSubject.install = function(Vue) {
|
|
12
|
+
Vue.component(NstcSelectSubject.name, NstcSelectSubject);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default NstcSelectSubject;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: your name
|
|
3
|
+
* @Date: 2022-01-13 15:40:30
|
|
4
|
+
* @LastEditTime: 2022-01-13 17:18:30
|
|
5
|
+
* @LastEditors: Please set LastEditors
|
|
6
|
+
* @Description: 科目选择弹窗
|
|
7
|
+
* @FilePath: \settle\src\cmmon-components\demo.vue
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="ruleFrom">
|
|
12
|
+
<el-form-item label="机构" prop="brNo">
|
|
13
|
+
<el-select
|
|
14
|
+
v-model="ruleForm.brNo"
|
|
15
|
+
:placeholder="$t('set_c_0006')"
|
|
16
|
+
filterable
|
|
17
|
+
clearable
|
|
18
|
+
@change="handleBranchChange"
|
|
19
|
+
>
|
|
20
|
+
<el-option
|
|
21
|
+
v-for="item in brNoArr"
|
|
22
|
+
:key="item.value"
|
|
23
|
+
:label="item.label"
|
|
24
|
+
:value="item.value"
|
|
25
|
+
></el-option>
|
|
26
|
+
</el-select>
|
|
27
|
+
</el-form-item>
|
|
28
|
+
<el-form-item label="科目" prop="subjectNo">
|
|
29
|
+
<NstcSelectSubject v-model="ruleForm.subjectNo" :query-conf="subjectConf" />
|
|
30
|
+
</el-form-item>
|
|
31
|
+
</el-form>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import NstcSelectSubject from "../main.vue";
|
|
37
|
+
export default {
|
|
38
|
+
components: { NstcSelectSubject },
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
subject: "",
|
|
42
|
+
subjectConf: {
|
|
43
|
+
url: "http://192.168.20.109:8080/api/nstc-tss/1.0/remote/list",
|
|
44
|
+
method: "POST",
|
|
45
|
+
defaultParam: {
|
|
46
|
+
brNo: "",
|
|
47
|
+
yr: new Date().getFullYear()
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
brNoArr: [
|
|
51
|
+
{value: '001', label: "总部"},
|
|
52
|
+
{value: '000111', label: "九恒星"},
|
|
53
|
+
{value: '999888', label: "wsl"},
|
|
54
|
+
{value: '100001', label: "总部24"},
|
|
55
|
+
],
|
|
56
|
+
labelconf: {
|
|
57
|
+
title: "选择科目",
|
|
58
|
+
plcInput: "请输入",
|
|
59
|
+
plcSelect: "请选择",
|
|
60
|
+
noselectmsg: "请选择科目",
|
|
61
|
+
subjectNoLabel: "科目编号",
|
|
62
|
+
subjectNameLabel: "科目名称",
|
|
63
|
+
balanceDirectionlabel: "余额方向",
|
|
64
|
+
},
|
|
65
|
+
ruleForm: {
|
|
66
|
+
brNo: "",
|
|
67
|
+
subjectNo: ""
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
input(val) {
|
|
73
|
+
console.log(val, "0000");
|
|
74
|
+
},// 开户机构change
|
|
75
|
+
async handleBranchChange(data) {
|
|
76
|
+
this.subjectConf.defaultParam.brNo = data;
|
|
77
|
+
console.log(this.subjectConf.defaultParam.brNo,'this.subjectConf.defaultParam.brNo');
|
|
78
|
+
this.ruleForm.subjectNo = "";
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<style>
|
|
85
|
+
</style>
|