n20-common-lib 1.3.10 → 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 +2 -37
- package/src/components/ChildRange/style.scss +34 -0
- package/src/components/PageHeader/index.vue +2 -44
- 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 +2 -11
- 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,97 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
功能: 固定位置页面控件
|
|
3
|
+
作者: nstc
|
|
4
|
+
创建时间: 2021-02-05
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div :style="{height:height+'px',zIndex:zIndex}">
|
|
9
|
+
<div
|
|
10
|
+
:class="className"
|
|
11
|
+
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
|
|
12
|
+
>
|
|
13
|
+
<slot>
|
|
14
|
+
<div>sticky</div>
|
|
15
|
+
</slot>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: 'NstcSticky',
|
|
23
|
+
props: {
|
|
24
|
+
stickyTop: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
zIndex: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 1
|
|
31
|
+
},
|
|
32
|
+
className: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: ''
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
data() {
|
|
38
|
+
return {
|
|
39
|
+
active: false,
|
|
40
|
+
position: '',
|
|
41
|
+
width: undefined,
|
|
42
|
+
height: undefined,
|
|
43
|
+
isSticky: false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
mounted() {
|
|
47
|
+
this.height = this.$el.getBoundingClientRect().height
|
|
48
|
+
window.addEventListener('scroll', this.handleScroll,true)
|
|
49
|
+
window.addEventListener('resize', this.handleResize, true)
|
|
50
|
+
},
|
|
51
|
+
activated() {
|
|
52
|
+
this.handleScroll()
|
|
53
|
+
},
|
|
54
|
+
destroyed() {
|
|
55
|
+
window.removeEventListener('scroll', this.handleScroll)
|
|
56
|
+
window.removeEventListener('resize', this.handleResize)
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
sticky() {
|
|
60
|
+
if (this.active) {
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
this.position = 'fixed'
|
|
64
|
+
this.active = true
|
|
65
|
+
this.width = this.width + 'px'
|
|
66
|
+
this.isSticky = true
|
|
67
|
+
},
|
|
68
|
+
handleReset() {
|
|
69
|
+
if (!this.active) {
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
this.reset()
|
|
73
|
+
},
|
|
74
|
+
reset() {
|
|
75
|
+
this.position = ''
|
|
76
|
+
this.width = 'auto'
|
|
77
|
+
this.active = false
|
|
78
|
+
this.isSticky = false
|
|
79
|
+
},
|
|
80
|
+
handleScroll() {
|
|
81
|
+
const width = this.$el.getBoundingClientRect().width
|
|
82
|
+
this.width = width || 'auto'
|
|
83
|
+
const offsetTop = this.$el.getBoundingClientRect().top
|
|
84
|
+
if (offsetTop < this.stickyTop) {
|
|
85
|
+
this.sticky()
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
this.handleReset()
|
|
89
|
+
},
|
|
90
|
+
handleResize() {
|
|
91
|
+
if (this.isSticky) {
|
|
92
|
+
this.width = this.$el.getBoundingClientRect().width + 'px'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
功能: 加载svg图片组件
|
|
3
|
+
作者: nstc
|
|
4
|
+
创建时间: 2021-02-05
|
|
5
|
+
-->
|
|
6
|
+
<template>
|
|
7
|
+
<div
|
|
8
|
+
v-if="isExternal"
|
|
9
|
+
:style="styleExternalIcon"
|
|
10
|
+
class="svg-external-icon svg-icon"
|
|
11
|
+
v-on="$listeners"
|
|
12
|
+
></div>
|
|
13
|
+
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
|
14
|
+
<use :xlink:href="iconName" />
|
|
15
|
+
</svg>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import { isExternal } from '../../utils/validate'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'NstcSvgIcon',
|
|
23
|
+
props: {
|
|
24
|
+
iconClass: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
className: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
computed: {
|
|
34
|
+
isExternal() {
|
|
35
|
+
return isExternal(this.iconClass)
|
|
36
|
+
},
|
|
37
|
+
iconName() {
|
|
38
|
+
return `#icon-${this.iconClass}`
|
|
39
|
+
},
|
|
40
|
+
svgClass() {
|
|
41
|
+
if (this.className) {
|
|
42
|
+
return 'svg-icon ' + this.className
|
|
43
|
+
} else {
|
|
44
|
+
return 'svg-icon'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
styleExternalIcon() {
|
|
48
|
+
return {
|
|
49
|
+
mask: `url(${this.iconClass}) no-repeat 50% 50%`,
|
|
50
|
+
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%`
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<style>
|
|
58
|
+
.svg-icon {
|
|
59
|
+
width: 1em;
|
|
60
|
+
height: 1em;
|
|
61
|
+
vertical-align: -0.15em;
|
|
62
|
+
fill: currentColor;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.svg-external-icon {
|
|
67
|
+
background-color: currentColor;
|
|
68
|
+
mask-size: cover !important;
|
|
69
|
+
display: inline-block;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
72
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
功能: tab切换组件
|
|
3
|
+
作者: nstc
|
|
4
|
+
创建时间: 2021-02-04
|
|
5
|
+
-->
|
|
6
|
+
<template>
|
|
7
|
+
<div class="nstc-tab-custom">
|
|
8
|
+
<el-tabs
|
|
9
|
+
v-model="_value"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
class="nstc-tab"
|
|
12
|
+
v-on="$listeners"
|
|
13
|
+
>
|
|
14
|
+
<el-tab-pane
|
|
15
|
+
v-for="tab in options"
|
|
16
|
+
:key="tab.value"
|
|
17
|
+
v-bind="tab"
|
|
18
|
+
:name="tab.value"
|
|
19
|
+
/>
|
|
20
|
+
</el-tabs>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
name: 'NstcTab',
|
|
27
|
+
|
|
28
|
+
inheritAttrs: false,
|
|
29
|
+
|
|
30
|
+
props: {
|
|
31
|
+
value: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ''
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
options: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default: () => []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
computed: {
|
|
43
|
+
_value: {
|
|
44
|
+
get() {
|
|
45
|
+
return this.value
|
|
46
|
+
},
|
|
47
|
+
set(val) {
|
|
48
|
+
this.$emit('input', val)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style lang="scss">
|
|
56
|
+
.nstc-tab {
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
.el-tabs_{
|
|
59
|
+
&_item {
|
|
60
|
+
font-size: 16px !important;
|
|
61
|
+
height: 24px !important;
|
|
62
|
+
line-height: 24px!important;
|
|
63
|
+
padding: 0 14px!important;
|
|
64
|
+
}
|
|
65
|
+
&_item.is-active {
|
|
66
|
+
color: #007aff !important;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
}
|
|
69
|
+
&_item:hover {
|
|
70
|
+
color: #007aff !important;
|
|
71
|
+
cursor: pointer
|
|
72
|
+
}
|
|
73
|
+
&_nav-wrap::after {
|
|
74
|
+
background-color: rgba(0,0,0,0);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
</style>
|
|
80
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tab-with-badge">
|
|
3
|
+
<el-badge
|
|
4
|
+
v-for="tab in options"
|
|
5
|
+
:key="tab.value"
|
|
6
|
+
:value="tab.badgeValue"
|
|
7
|
+
v-bind="tab"
|
|
8
|
+
:hidden="!tab.badgeValue"
|
|
9
|
+
:class="{ active: value === tab.value }"
|
|
10
|
+
>
|
|
11
|
+
<span @click="handleClick(tab)">
|
|
12
|
+
{{ tab.label }}
|
|
13
|
+
</span>
|
|
14
|
+
</el-badge>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
name: 'NstcTabWithBadge',
|
|
21
|
+
|
|
22
|
+
props: {
|
|
23
|
+
value: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: ''
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
options: {
|
|
29
|
+
type: Array,
|
|
30
|
+
default: () => []
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
methods: {
|
|
35
|
+
handleClick(tab) {
|
|
36
|
+
this.$emit('input', tab.value)
|
|
37
|
+
this.$emit('change', tab)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style lang="scss">
|
|
44
|
+
@import "index";
|
|
45
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.tab-with-badge {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
.el-badge {
|
|
5
|
+
padding: 4px 0;
|
|
6
|
+
margin: 0 20px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
&:not(:last-child)::after {
|
|
9
|
+
content: "";
|
|
10
|
+
display: inline-block;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 1px;
|
|
13
|
+
background-color: #8a8a8a;
|
|
14
|
+
position: absolute;
|
|
15
|
+
right: -20px;
|
|
16
|
+
top: 0;
|
|
17
|
+
}
|
|
18
|
+
&:first-child {
|
|
19
|
+
margin-left: 0;
|
|
20
|
+
}
|
|
21
|
+
&:last-child {
|
|
22
|
+
margin-right: 0;
|
|
23
|
+
}
|
|
24
|
+
&:hover {
|
|
25
|
+
color: #007aff;
|
|
26
|
+
}
|
|
27
|
+
&.active {
|
|
28
|
+
color: #007aff;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- 多级结构 -->
|
|
3
|
+
<el-table-column
|
|
4
|
+
v-if="column.children && column.children.length"
|
|
5
|
+
:key="column.prop"
|
|
6
|
+
v-bind="column"
|
|
7
|
+
:header-align="headerAlign"
|
|
8
|
+
:align="column.align"
|
|
9
|
+
>
|
|
10
|
+
<template v-if="column.explains" v-slot:header>
|
|
11
|
+
<template v-if="column.explains">
|
|
12
|
+
<el-button class="explain-txt">
|
|
13
|
+
{{ column.label }}
|
|
14
|
+
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
15
|
+
<div slot="content" v-html="column.explains"/>
|
|
16
|
+
<!-- <img-->
|
|
17
|
+
<!-- :src="tipSrc"-->
|
|
18
|
+
<!-- alt=""-->
|
|
19
|
+
<!-- class="tipsImg"-->
|
|
20
|
+
<!-- >-->
|
|
21
|
+
</el-tooltip>
|
|
22
|
+
</el-button>
|
|
23
|
+
</template>
|
|
24
|
+
</template>
|
|
25
|
+
<ElTableColumnCustom
|
|
26
|
+
v-for="subColumn in column.children"
|
|
27
|
+
:key="`${column.prop || column.label}--${
|
|
28
|
+
subColumn.prop || subColumn.label
|
|
29
|
+
}`"
|
|
30
|
+
:column="subColumn"
|
|
31
|
+
/>
|
|
32
|
+
</el-table-column>
|
|
33
|
+
|
|
34
|
+
<!-- scope注入 -->
|
|
35
|
+
<el-table-column
|
|
36
|
+
v-else-if="
|
|
37
|
+
column[`customSortable`] ||
|
|
38
|
+
column.component ||
|
|
39
|
+
column.header ||
|
|
40
|
+
column.handlers
|
|
41
|
+
"
|
|
42
|
+
:key="column.prop || column.label"
|
|
43
|
+
v-bind="column"
|
|
44
|
+
:header-align="headerAlign"
|
|
45
|
+
:align="column.align"
|
|
46
|
+
>
|
|
47
|
+
<!-- 插入组件 -->
|
|
48
|
+
<template v-if="column.component || column.handlers" v-slot:default="scope">
|
|
49
|
+
<template v-if="column.handlers">
|
|
50
|
+
<template v-for="(handler, idx) in getHandlers(column, scope)">
|
|
51
|
+
<el-link
|
|
52
|
+
v-if="idx < breakNum && !handler.hidden"
|
|
53
|
+
:key="idx"
|
|
54
|
+
type="primary"
|
|
55
|
+
:disabled="!!handler.disabled"
|
|
56
|
+
style="margin-right: 10px"
|
|
57
|
+
@click="handleCommand(handler, scope)"
|
|
58
|
+
>
|
|
59
|
+
{{ handler.label }}
|
|
60
|
+
</el-link>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<ElDropdown
|
|
64
|
+
v-if="getHandlers(column, scope).length > breakNum"
|
|
65
|
+
placement="bottom-start"
|
|
66
|
+
:options="getHandlers(column, scope).slice(breakNum)"
|
|
67
|
+
@command="(item) => handleCommand(item, scope)"
|
|
68
|
+
>
|
|
69
|
+
<el-link>
|
|
70
|
+
<i class="el-icon-more"/>
|
|
71
|
+
</el-link>
|
|
72
|
+
</ElDropdown>
|
|
73
|
+
</template>
|
|
74
|
+
|
|
75
|
+
<template v-else>
|
|
76
|
+
<component
|
|
77
|
+
:is="compile(column.component, column, scope)"
|
|
78
|
+
v-if="'template' in column.component"
|
|
79
|
+
/>
|
|
80
|
+
<component
|
|
81
|
+
:is="column.component"
|
|
82
|
+
v-else
|
|
83
|
+
:column="column"
|
|
84
|
+
:scope="scope"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<!-- 插入表头 -->
|
|
90
|
+
<template
|
|
91
|
+
v-if="column.header || column[`customSortable`]"
|
|
92
|
+
v-slot:header="scope"
|
|
93
|
+
>
|
|
94
|
+
<template v-if="column.header">
|
|
95
|
+
<component
|
|
96
|
+
:is="compile(column.header, column, scope)"
|
|
97
|
+
v-if="'template' in column.header"
|
|
98
|
+
/>
|
|
99
|
+
<component :is="column.header" v-else :column="column" :scope="scope"/>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<template v-if="column.customSortable">
|
|
103
|
+
<span class="sort-btn" @click="descend(column.prop)">
|
|
104
|
+
{{ column.label }}
|
|
105
|
+
<i
|
|
106
|
+
:class="[
|
|
107
|
+
'icon-anjiangxupailie',
|
|
108
|
+
'sort-btn-icon',
|
|
109
|
+
{ active: sortProp === column.prop },
|
|
110
|
+
]"
|
|
111
|
+
/>
|
|
112
|
+
</span>
|
|
113
|
+
</template>
|
|
114
|
+
</template>
|
|
115
|
+
</el-table-column>
|
|
116
|
+
|
|
117
|
+
<!-- 只显示占比条和百分比 -->
|
|
118
|
+
<el-table-column
|
|
119
|
+
v-else-if="column.progress"
|
|
120
|
+
:key="column.prop"
|
|
121
|
+
v-bind="column"
|
|
122
|
+
:header-align="headerAlign"
|
|
123
|
+
:align="column.align"
|
|
124
|
+
>
|
|
125
|
+
<template slot-scope="scope">
|
|
126
|
+
<el-progress
|
|
127
|
+
:percentage="scope.row[column.progress.valueKey]"
|
|
128
|
+
v-bind="column.progress"
|
|
129
|
+
type="line"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
</el-table-column>
|
|
133
|
+
|
|
134
|
+
<!--显示原始值与占比条和百分比值 -->
|
|
135
|
+
<el-table-column
|
|
136
|
+
v-else-if="column.valueProgress"
|
|
137
|
+
:key="column.prop"
|
|
138
|
+
v-bind="column"
|
|
139
|
+
:header-align="headerAlign"
|
|
140
|
+
:align="column.align"
|
|
141
|
+
>
|
|
142
|
+
<template slot-scope="scope">
|
|
143
|
+
<span class="progressbar-value">{{
|
|
144
|
+
scope.row[scope.column.property]
|
|
145
|
+
}}</span>
|
|
146
|
+
<el-progress
|
|
147
|
+
:percentage="scope.row[column.valueProgress.valueKey]"
|
|
148
|
+
v-bind="column.valueProgress"
|
|
149
|
+
type="line"
|
|
150
|
+
/>
|
|
151
|
+
</template>
|
|
152
|
+
</el-table-column>
|
|
153
|
+
|
|
154
|
+
<el-table-column
|
|
155
|
+
v-else
|
|
156
|
+
:key="column.prop || column.label"
|
|
157
|
+
v-bind="column"
|
|
158
|
+
:header-align="headerAlign"
|
|
159
|
+
:align="column.align"
|
|
160
|
+
show-overflow-tooltip
|
|
161
|
+
/>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<script>
|
|
165
|
+
import Vue from "vue";
|
|
166
|
+
|
|
167
|
+
export default {
|
|
168
|
+
name: "ElTableColumnCustom",
|
|
169
|
+
|
|
170
|
+
props: {
|
|
171
|
+
column: {
|
|
172
|
+
default: () => {
|
|
173
|
+
},
|
|
174
|
+
type: Object,
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
sortProp: {
|
|
178
|
+
default: "",
|
|
179
|
+
type: String,
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
breakNum: {
|
|
183
|
+
type: [Number, String],
|
|
184
|
+
default: 2,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
data() {
|
|
189
|
+
return {
|
|
190
|
+
// tipSrc
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
computed: {
|
|
195
|
+
headerAlign() {
|
|
196
|
+
const {headerAlign} = this.column;
|
|
197
|
+
|
|
198
|
+
return headerAlign || "center";
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
getHandlers() {
|
|
202
|
+
return ({handlers, formatHandlers}, scope) => {
|
|
203
|
+
return formatHandlers ? formatHandlers(handlers, scope) : handlers;
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
methods: {
|
|
209
|
+
compile(component, column, slotScope) {
|
|
210
|
+
const template = Vue.compile(component.template);
|
|
211
|
+
const data = {
|
|
212
|
+
data() {
|
|
213
|
+
return Object.assign({}, component.data, {
|
|
214
|
+
column,
|
|
215
|
+
scope: slotScope,
|
|
216
|
+
});
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
let obj = Object.assign({}, template, data, component);
|
|
220
|
+
//将传进的propData设置到新建的组件的data里面
|
|
221
|
+
if (obj.propData) {
|
|
222
|
+
if (obj.data) {
|
|
223
|
+
let dataObj = obj.data();
|
|
224
|
+
let keys = Object.keys(dataObj);
|
|
225
|
+
if (keys.length > 0) {
|
|
226
|
+
obj.data = function data() {
|
|
227
|
+
let map = {};
|
|
228
|
+
keys.forEach((key) => {
|
|
229
|
+
map[key] = dataObj[key];
|
|
230
|
+
});
|
|
231
|
+
//把传进的propData也塞进去
|
|
232
|
+
map = {...map, ...obj.propData};
|
|
233
|
+
return map;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return obj;
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
descend(prop) {
|
|
242
|
+
this.$emit("sortPropChange", prop);
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
async handleCommand(item, scope) {
|
|
246
|
+
try {
|
|
247
|
+
item.disabled = true;
|
|
248
|
+
|
|
249
|
+
item.handler && (await item.handler(scope));
|
|
250
|
+
} catch (err) {
|
|
251
|
+
console.error(err);
|
|
252
|
+
} finally {
|
|
253
|
+
// eslint-disable-next-line require-atomic-updates
|
|
254
|
+
item.disabled = false;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
</script>
|
|
260
|
+
|
|
261
|
+
<style lang="scss">
|
|
262
|
+
.sort-btn {
|
|
263
|
+
display: inline-block;
|
|
264
|
+
width: 100%;
|
|
265
|
+
// padding: 0 10px 0 0;
|
|
266
|
+
background-color: transparent;
|
|
267
|
+
color: inherit;
|
|
268
|
+
border: none;
|
|
269
|
+
font-size: inherit;
|
|
270
|
+
font-weight: inherit;
|
|
271
|
+
min-width: 100%;
|
|
272
|
+
position: relative;
|
|
273
|
+
white-space: normal;
|
|
274
|
+
|
|
275
|
+
&-icon {
|
|
276
|
+
cursor: pointer;
|
|
277
|
+
color: #c8cdde;
|
|
278
|
+
position: absolute;
|
|
279
|
+
right: -4px;
|
|
280
|
+
top: 58%;
|
|
281
|
+
transform: translateY(-50%);
|
|
282
|
+
|
|
283
|
+
&.active {
|
|
284
|
+
color: #258ff8;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&:hover {
|
|
288
|
+
color: #258ff8;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
</style>
|