n20-common-lib 2.4.5 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/nstc-g6/components/Calendar/index.js +5 -5
- package/nstc-g6/components/Calendar/src/basic/month-table.vue +12 -20
- package/nstc-g6/components/Calendar/src/basic/year-table.vue +18 -22
- package/nstc-g6/components/Calendar/src/main.vue +1 -5
- package/nstc-g6/components/DialogForm/index.js +5 -5
- package/nstc-g6/components/DialogForm/src/demo/index.vue +18 -27
- package/nstc-g6/components/DialogForm/src/main.vue +15 -21
- package/nstc-g6/components/Form/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/Form/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/Form/A_DEMO/index.vue +7 -29
- package/nstc-g6/components/Form/AutocompleteCustom/index.vue +3 -5
- package/nstc-g6/components/Form/BusinessSpecific/InputMultiple.vue +60 -62
- package/nstc-g6/components/Form/BusinessSpecific/InputWithUnit.vue +12 -35
- package/nstc-g6/components/Form/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/Form/CascaderCustom/index.vue +4 -4
- package/nstc-g6/components/Form/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/Form/Component.vue +56 -78
- package/nstc-g6/components/Form/ComponentSecond.vue +55 -77
- package/nstc-g6/components/Form/InputAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/InputAndDialog/src/main.vue +130 -153
- package/nstc-g6/components/Form/InputCustom/demo/index.vue +4 -12
- package/nstc-g6/components/Form/InputCustom/index.vue +51 -54
- package/nstc-g6/components/Form/IntervalinputCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/IntervalinputCustom/index.vue +19 -41
- package/nstc-g6/components/Form/Item.vue +15 -30
- package/nstc-g6/components/Form/ItemSecond.vue +7 -22
- package/nstc-g6/components/Form/List.vue +12 -28
- package/nstc-g6/components/Form/ListSecond.vue +11 -27
- package/nstc-g6/components/Form/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/Form/SelectAccount/index.js +5 -5
- package/nstc-g6/components/Form/SelectAccount/src/demo/index.vue +34 -28
- package/nstc-g6/components/Form/SelectAccount/src/main.vue +112 -83
- package/nstc-g6/components/Form/SelectAndDialog/index.js +5 -5
- package/nstc-g6/components/Form/SelectAndDialog/src/main.vue +126 -149
- package/nstc-g6/components/Form/SelectCashFlow/index.js +5 -5
- package/nstc-g6/components/Form/SelectCashFlow/src/demo/index.vue +18 -19
- package/nstc-g6/components/Form/SelectCashFlow/src/main.vue +52 -41
- package/nstc-g6/components/Form/SelectCustom/demo/index.vue +14 -16
- package/nstc-g6/components/Form/SelectCustom/index.vue +129 -139
- package/nstc-g6/components/Form/SelectSubject/index.js +5 -5
- package/nstc-g6/components/Form/SelectSubject/src/demo/index.vue +42 -48
- package/nstc-g6/components/Form/SelectSubject/src/main.vue +83 -86
- package/nstc-g6/components/Form/SelectindialogCustom/demo/index.vue +34 -35
- package/nstc-g6/components/Form/SelectindialogCustom/index.vue +133 -148
- package/nstc-g6/components/Form/SelectindialogCustom/install.js +3 -3
- package/nstc-g6/components/Form/TableRadioCustom/demo/index.vue +1 -7
- package/nstc-g6/components/Form/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/Form/TextCustom/index.vue +2 -2
- package/nstc-g6/components/Form/UploadCustom/demo/index.vue +1 -3
- package/nstc-g6/components/Form/UploadCustom/index.vue +143 -173
- package/nstc-g6/components/Form/configs.js +3 -14
- package/nstc-g6/components/Form/configsSecond.js +3 -16
- package/nstc-g6/components/Form/index.js +1 -1
- package/nstc-g6/components/Form/payeePersonSelect/index.js +5 -5
- package/nstc-g6/components/Form/payeePersonSelect/src/demo/index.vue +50 -44
- package/nstc-g6/components/Form/payeePersonSelect/src/main.vue +73 -82
- package/nstc-g6/components/FormGroup/index.js +5 -5
- package/nstc-g6/components/FormGroup/src/demo/config.js +18 -19
- package/nstc-g6/components/FormGroup/src/demo/index.vue +14 -22
- package/nstc-g6/components/FormGroup/src/main.vue +122 -141
- package/nstc-g6/components/FormGroup/src/validate.js +11 -13
- package/nstc-g6/components/InputTag/InputTag.vue +78 -111
- package/nstc-g6/components/NstcBackToTop/NstcBackToTop.vue +24 -24
- package/nstc-g6/components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +4 -13
- package/nstc-g6/components/NstcCharts/NstcCharts.vue +9 -18
- package/nstc-g6/components/NstcCharts/define.js +1 -6
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +6 -21
- package/nstc-g6/components/NstcConfirm/index.js +21 -19
- package/nstc-g6/components/NstcDialog/NstcDialog.vue +34 -38
- package/nstc-g6/components/NstcDialogForm/NstcDialogForm.vue +17 -21
- package/nstc-g6/components/NstcDialogTable/NstcDialogTable.vue +4 -17
- package/nstc-g6/components/NstcDropdown/NstcDropdown.vue +2 -12
- package/nstc-g6/components/NstcDropdownTree/NstcDropdownTree.vue +3 -13
- package/nstc-g6/components/NstcElectronicFile/NstcElectronicFile.vue +18 -78
- package/nstc-g6/components/NstcExcelCustomImport/NstcExcelCustomImport.vue +121 -147
- package/nstc-g6/components/NstcExcelImport/NstcExcelImport.vue +9 -31
- package/nstc-g6/components/NstcExcelImportN/NstcExcelImportN.vue +10 -33
- package/nstc-g6/components/NstcExpandCollapse/NstcExpandCollapse.vue +12 -16
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +19 -75
- package/nstc-g6/components/NstcForm/A_DEMO/component/originalForm.vue +35 -50
- package/nstc-g6/components/NstcForm/A_DEMO/config/config_3.js +1115 -1110
- package/nstc-g6/components/NstcForm/A_DEMO/index.vue +340 -354
- package/nstc-g6/components/NstcForm/AutocompleteCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/BusinessSpecific/InputWithUnit.vue +11 -34
- package/nstc-g6/components/NstcForm/BusinessSpecific/SelectTreeDialog.vue +77 -77
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +5 -11
- package/nstc-g6/components/NstcForm/Component.vue +17 -62
- package/nstc-g6/components/NstcForm/ComponentSecond.vue +55 -77
- package/nstc-g6/components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +6 -24
- package/nstc-g6/components/NstcForm/InputCustom/index.vue +2 -8
- package/nstc-g6/components/NstcForm/IntervalInputCustom/index.vue +4 -21
- package/nstc-g6/components/NstcForm/Item.vue +3 -15
- package/nstc-g6/components/NstcForm/ItemSecond.vue +7 -22
- package/nstc-g6/components/NstcForm/List.vue +12 -28
- package/nstc-g6/components/NstcForm/ListSecond.vue +11 -27
- package/nstc-g6/components/NstcForm/RadioCustom/index.vue +5 -23
- package/nstc-g6/components/NstcForm/SelectAccount/NstcSelectAccount.vue +4 -24
- package/nstc-g6/components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +7 -30
- package/nstc-g6/components/NstcForm/SelectCashFlow/NstcSelectCashFlow.vue +50 -38
- package/nstc-g6/components/NstcForm/SelectCustom/index.vue +6 -16
- package/nstc-g6/components/NstcForm/SelectSubject/NstcSelectSubject.vue +72 -82
- package/nstc-g6/components/NstcForm/SelectindialogCustom/index.vue +6 -20
- package/nstc-g6/components/NstcForm/TableRadioCustom/index.vue +17 -26
- package/nstc-g6/components/NstcForm/TextCustom/index.vue +2 -2
- package/nstc-g6/components/NstcForm/UploadCustom/index.vue +13 -60
- package/nstc-g6/components/NstcForm/configs.js +3 -14
- package/nstc-g6/components/NstcForm/configsSecond.js +3 -16
- package/nstc-g6/components/NstcForm/index.js +1 -1
- package/nstc-g6/components/NstcForm/payeePersonSelect/NstcPayeePerson.vue +57 -73
- package/nstc-g6/components/NstcPagination/NstcPagination.vue +2 -12
- package/nstc-g6/components/NstcScreenFull/NstcScreenFull.vue +2 -3
- package/nstc-g6/components/NstcSelectTree/NstcSelectTree.vue +4 -15
- package/nstc-g6/components/NstcSelectTreeList/NstcSelectTreeList.vue +5 -20
- package/nstc-g6/components/NstcSticky/NstcSticky.vue +10 -4
- package/nstc-g6/components/NstcSvgIcon/NstcSvgIcon.vue +1 -7
- package/nstc-g6/components/NstcTab/NstcTab.vue +8 -20
- package/nstc-g6/components/NstcTabWithBadge/NstcTabWithBadge.vue +7 -7
- package/nstc-g6/components/NstcTable/ElTableColumnCustom/index.vue +88 -126
- package/nstc-g6/components/NstcTable/NstcTable.vue +4 -17
- package/nstc-g6/components/NstcTableSet/NstcTableSet.vue +27 -72
- package/nstc-g6/components/NstcThemePicker/NstcThemePicker.vue +13 -14
- package/nstc-g6/components/NstcUploadCustomExcel/NstcUploadCustomExcel.vue +3 -13
- package/nstc-g6/components/NstcUploadExcel/NstcUploadExcel.vue +21 -22
- package/nstc-g6/components/NstcWorkBench/NstcWorkBench.vue +4 -17
- package/nstc-g6/components/Search/NstcSearch.vue +12 -47
- package/nstc-g6/components/Search/src/demo/index copy.vue +28 -28
- package/nstc-g6/components/Search/src/demo/index.vue +36 -36
- package/nstc-g6/components/Search/src/main copy.vue +169 -204
- package/nstc-g6/components/approvelTwo/main.vue +2 -6
- package/nstc-g6/components/approvelTwo/progress.vue +7 -29
- package/nstc-g6/directives/VCopy/index.js +52 -54
- package/nstc-g6/directives/VNstcNumber/index.js +1 -1
- package/nstc-g6/directives/VNstcNumber/temp.js +357 -362
- package/nstc-g6/utils/mapper_aims.js +774 -775
- package/nstc-g6/utils/parseTime.js +38 -36
- package/nstc-g6/utils/validate/index.js +2 -2
- package/nstc-g6/utils/vendor/Export2Excel.js +110 -111
- package/nstc-g6/utils/vendor/Export2Zip.js +12 -7
- package/nstc-g6/utils/vue-bus.js +1 -1
- package/package.json +1 -1
- package/src/assets/iconFont/demo_index.html +1 -1
- package/src/assets/iconFont/iconfont.js +66 -1
- package/src/assets/iconFont2/demo_index.html +277 -286
- package/src/assets/iconFont2/iconfont.js +66 -1
- package/src/components/Button/button-group.vue +1 -1
- package/src/components/Layout/HeaderWrap/indexN.vue +1 -1
- package/src/components/Layout/indexN.vue +1 -2
- package/src/components/LoginTemporary/indexN.vue +12 -2
- package/src/components/TableOperateColumn/index.vue +1 -1
- package/src/plugins/Print/print-js/README.md +5 -5
- package/src/plugins/Print/print-js/package.json +2 -2
- package/src/plugins/Print/print-js/src/index.d.ts +36 -36
- package/src/plugins/Print/print-js/src/js/browser.js +3 -1
- package/src/plugins/Print/print-js/src/js/functions.js +16 -10
- package/src/plugins/Print/print-js/src/js/html.js +2 -2
- package/src/plugins/Print/print-js/src/js/image.js +1 -1
- package/src/plugins/Print/print-js/src/js/init.js +15 -7
- package/src/plugins/Print/print-js/src/js/json.js +14 -4
- package/src/plugins/Print/print-js/src/js/modal.js +16 -15
- package/src/plugins/Print/print-js/src/js/pdf.js +1 -1
- package/src/plugins/Print/print-js/src/js/print.js +6 -6
- package/src/plugins/Sign/NetSM3/InfosecNetSignCNGAgent.min.js +1825 -1592
- package/src/plugins/Sign/cfca/index.js +525 -520
- package/src/plugins/Sign/sign.js +128 -128
- package/style/index.css +1 -1
- package/style/index.css.map +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- 多级结构 -->
|
|
3
3
|
<el-table-column
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
9
|
>
|
|
10
10
|
<template v-if="column.explains" v-slot:header>
|
|
11
11
|
<template v-if="column.explains">
|
|
12
12
|
<el-button class="explain-txt">
|
|
13
13
|
{{ column.label }}
|
|
14
14
|
<el-tooltip class="item" effect="dark" placement="top-start">
|
|
15
|
-
<div slot="content" v-html="column.explains"/>
|
|
15
|
+
<div slot="content" v-html="column.explains" />
|
|
16
16
|
<!-- <img-->
|
|
17
17
|
<!-- :src="tipSrc"-->
|
|
18
18
|
<!-- alt=""-->
|
|
@@ -23,92 +23,65 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
</template>
|
|
25
25
|
<ElTableColumnCustom
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}`"
|
|
30
|
-
:column="subColumn"
|
|
26
|
+
v-for="subColumn in column.children"
|
|
27
|
+
:key="`${column.prop || column.label}--${subColumn.prop || subColumn.label}`"
|
|
28
|
+
:column="subColumn"
|
|
31
29
|
/>
|
|
32
30
|
</el-table-column>
|
|
33
31
|
|
|
34
32
|
<!-- scope注入 -->
|
|
35
33
|
<el-table-column
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
:key="column.prop || column.label"
|
|
43
|
-
v-bind="column"
|
|
44
|
-
:header-align="headerAlign"
|
|
45
|
-
:align="column.align"
|
|
34
|
+
v-else-if="column[`customSortable`] || column.component || column.header || column.handlers"
|
|
35
|
+
:key="column.prop || column.label"
|
|
36
|
+
v-bind="column"
|
|
37
|
+
:header-align="headerAlign"
|
|
38
|
+
:align="column.align"
|
|
46
39
|
>
|
|
47
40
|
<!-- 插入组件 -->
|
|
48
41
|
<template v-if="column.component || column.handlers" v-slot:default="scope">
|
|
49
42
|
<template v-if="column.handlers">
|
|
50
43
|
<template v-for="(handler, idx) in getHandlers(column, scope)">
|
|
51
44
|
<el-link
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
v-if="idx < breakNum && !handler.hidden"
|
|
46
|
+
:key="idx"
|
|
47
|
+
type="primary"
|
|
48
|
+
:disabled="!!handler.disabled"
|
|
49
|
+
style="margin-right: 10px"
|
|
50
|
+
@click="handleCommand(handler, scope)"
|
|
58
51
|
>
|
|
59
52
|
{{ handler.label }}
|
|
60
53
|
</el-link>
|
|
61
54
|
</template>
|
|
62
55
|
|
|
63
56
|
<ElDropdown
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
v-if="getHandlers(column, scope).length > breakNum"
|
|
58
|
+
placement="bottom-start"
|
|
59
|
+
:options="getHandlers(column, scope).slice(breakNum)"
|
|
60
|
+
@command="(item) => handleCommand(item, scope)"
|
|
68
61
|
>
|
|
69
62
|
<el-link>
|
|
70
|
-
<i class="el-icon-more"/>
|
|
63
|
+
<i class="el-icon-more" />
|
|
71
64
|
</el-link>
|
|
72
65
|
</ElDropdown>
|
|
73
66
|
</template>
|
|
74
67
|
|
|
75
68
|
<template v-else>
|
|
76
|
-
<component
|
|
77
|
-
|
|
78
|
-
v-if="'template' in column.component"
|
|
79
|
-
/>
|
|
80
|
-
<component
|
|
81
|
-
:is="column.component"
|
|
82
|
-
v-else
|
|
83
|
-
:column="column"
|
|
84
|
-
:scope="scope"
|
|
85
|
-
/>
|
|
69
|
+
<component :is="compile(column.component, column, scope)" v-if="'template' in column.component" />
|
|
70
|
+
<component :is="column.component" v-else :column="column" :scope="scope" />
|
|
86
71
|
</template>
|
|
87
72
|
</template>
|
|
88
73
|
|
|
89
74
|
<!-- 插入表头 -->
|
|
90
|
-
<template
|
|
91
|
-
v-if="column.header || column[`customSortable`]"
|
|
92
|
-
v-slot:header="scope"
|
|
93
|
-
>
|
|
75
|
+
<template v-if="column.header || column[`customSortable`]" v-slot:header="scope">
|
|
94
76
|
<template v-if="column.header">
|
|
95
|
-
<component
|
|
96
|
-
|
|
97
|
-
v-if="'template' in column.header"
|
|
98
|
-
/>
|
|
99
|
-
<component :is="column.header" v-else :column="column" :scope="scope"/>
|
|
77
|
+
<component :is="compile(column.header, column, scope)" v-if="'template' in column.header" />
|
|
78
|
+
<component :is="column.header" v-else :column="column" :scope="scope" />
|
|
100
79
|
</template>
|
|
101
80
|
|
|
102
81
|
<template v-if="column.customSortable">
|
|
103
82
|
<span class="sort-btn" @click="descend(column.prop)">
|
|
104
83
|
{{ column.label }}
|
|
105
|
-
<i
|
|
106
|
-
:class="[
|
|
107
|
-
'icon-anjiangxupailie',
|
|
108
|
-
'sort-btn-icon',
|
|
109
|
-
{ active: sortProp === column.prop },
|
|
110
|
-
]"
|
|
111
|
-
/>
|
|
84
|
+
<i :class="['icon-anjiangxupailie', 'sort-btn-icon', { active: sortProp === column.prop }]" />
|
|
112
85
|
</span>
|
|
113
86
|
</template>
|
|
114
87
|
</template>
|
|
@@ -116,146 +89,135 @@
|
|
|
116
89
|
|
|
117
90
|
<!-- 只显示占比条和百分比 -->
|
|
118
91
|
<el-table-column
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
92
|
+
v-else-if="column.progress"
|
|
93
|
+
:key="column.prop"
|
|
94
|
+
v-bind="column"
|
|
95
|
+
:header-align="headerAlign"
|
|
96
|
+
:align="column.align"
|
|
124
97
|
>
|
|
125
98
|
<template slot-scope="scope">
|
|
126
|
-
<el-progress
|
|
127
|
-
:percentage="scope.row[column.progress.valueKey]"
|
|
128
|
-
v-bind="column.progress"
|
|
129
|
-
type="line"
|
|
130
|
-
/>
|
|
99
|
+
<el-progress :percentage="scope.row[column.progress.valueKey]" v-bind="column.progress" type="line" />
|
|
131
100
|
</template>
|
|
132
101
|
</el-table-column>
|
|
133
102
|
|
|
134
103
|
<!--显示原始值与占比条和百分比值 -->
|
|
135
104
|
<el-table-column
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
105
|
+
v-else-if="column.valueProgress"
|
|
106
|
+
:key="column.prop"
|
|
107
|
+
v-bind="column"
|
|
108
|
+
:header-align="headerAlign"
|
|
109
|
+
:align="column.align"
|
|
141
110
|
>
|
|
142
111
|
<template slot-scope="scope">
|
|
143
|
-
<span class="progressbar-value">{{
|
|
144
|
-
|
|
145
|
-
}}</span>
|
|
146
|
-
<el-progress
|
|
147
|
-
:percentage="scope.row[column.valueProgress.valueKey]"
|
|
148
|
-
v-bind="column.valueProgress"
|
|
149
|
-
type="line"
|
|
150
|
-
/>
|
|
112
|
+
<span class="progressbar-value">{{ scope.row[scope.column.property] }}</span>
|
|
113
|
+
<el-progress :percentage="scope.row[column.valueProgress.valueKey]" v-bind="column.valueProgress" type="line" />
|
|
151
114
|
</template>
|
|
152
115
|
</el-table-column>
|
|
153
116
|
|
|
154
117
|
<el-table-column
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
118
|
+
v-else
|
|
119
|
+
:key="column.prop || column.label"
|
|
120
|
+
v-bind="column"
|
|
121
|
+
:header-align="headerAlign"
|
|
122
|
+
:align="column.align"
|
|
123
|
+
show-overflow-tooltip
|
|
161
124
|
/>
|
|
162
125
|
</template>
|
|
163
126
|
|
|
164
127
|
<script>
|
|
165
|
-
import Vue from
|
|
128
|
+
import Vue from 'vue'
|
|
166
129
|
|
|
167
130
|
export default {
|
|
168
|
-
name:
|
|
131
|
+
name: 'ElTableColumnCustom',
|
|
169
132
|
|
|
170
133
|
props: {
|
|
171
134
|
column: {
|
|
172
|
-
default: () => {
|
|
173
|
-
|
|
174
|
-
type: Object,
|
|
135
|
+
default: () => {},
|
|
136
|
+
type: Object
|
|
175
137
|
},
|
|
176
138
|
|
|
177
139
|
sortProp: {
|
|
178
|
-
default:
|
|
179
|
-
type: String
|
|
140
|
+
default: '',
|
|
141
|
+
type: String
|
|
180
142
|
},
|
|
181
143
|
|
|
182
144
|
breakNum: {
|
|
183
145
|
type: [Number, String],
|
|
184
|
-
default: 2
|
|
185
|
-
}
|
|
146
|
+
default: 2
|
|
147
|
+
}
|
|
186
148
|
},
|
|
187
149
|
|
|
188
150
|
data() {
|
|
189
151
|
return {
|
|
190
152
|
// tipSrc
|
|
191
|
-
}
|
|
153
|
+
}
|
|
192
154
|
},
|
|
193
155
|
|
|
194
156
|
computed: {
|
|
195
157
|
headerAlign() {
|
|
196
|
-
const {headerAlign} = this.column
|
|
158
|
+
const { headerAlign } = this.column
|
|
197
159
|
|
|
198
|
-
return headerAlign ||
|
|
160
|
+
return headerAlign || 'center'
|
|
199
161
|
},
|
|
200
162
|
|
|
201
163
|
getHandlers() {
|
|
202
|
-
return ({handlers, formatHandlers}, scope) => {
|
|
203
|
-
return formatHandlers ? formatHandlers(handlers, scope) : handlers
|
|
204
|
-
}
|
|
205
|
-
}
|
|
164
|
+
return ({ handlers, formatHandlers }, scope) => {
|
|
165
|
+
return formatHandlers ? formatHandlers(handlers, scope) : handlers
|
|
166
|
+
}
|
|
167
|
+
}
|
|
206
168
|
},
|
|
207
169
|
|
|
208
170
|
methods: {
|
|
209
171
|
compile(component, column, slotScope) {
|
|
210
|
-
const template = Vue.compile(component.template)
|
|
172
|
+
const template = Vue.compile(component.template)
|
|
211
173
|
const data = {
|
|
212
174
|
data() {
|
|
213
175
|
return Object.assign({}, component.data, {
|
|
214
176
|
column,
|
|
215
|
-
scope: slotScope
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
let obj = Object.assign({}, template, data, component)
|
|
177
|
+
scope: slotScope
|
|
178
|
+
})
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
let obj = Object.assign({}, template, data, component)
|
|
220
182
|
//将传进的propData设置到新建的组件的data里面
|
|
221
183
|
if (obj.propData) {
|
|
222
184
|
if (obj.data) {
|
|
223
|
-
let dataObj = obj.data()
|
|
224
|
-
let keys = Object.keys(dataObj)
|
|
185
|
+
let dataObj = obj.data()
|
|
186
|
+
let keys = Object.keys(dataObj)
|
|
225
187
|
if (keys.length > 0) {
|
|
226
188
|
obj.data = function data() {
|
|
227
|
-
let map = {}
|
|
189
|
+
let map = {}
|
|
228
190
|
keys.forEach((key) => {
|
|
229
|
-
map[key] = dataObj[key]
|
|
230
|
-
})
|
|
191
|
+
map[key] = dataObj[key]
|
|
192
|
+
})
|
|
231
193
|
//把传进的propData也塞进去
|
|
232
|
-
map = {...map, ...obj.propData}
|
|
233
|
-
return map
|
|
234
|
-
}
|
|
194
|
+
map = { ...map, ...obj.propData }
|
|
195
|
+
return map
|
|
196
|
+
}
|
|
235
197
|
}
|
|
236
198
|
}
|
|
237
199
|
}
|
|
238
|
-
return obj
|
|
200
|
+
return obj
|
|
239
201
|
},
|
|
240
202
|
|
|
241
203
|
descend(prop) {
|
|
242
|
-
this.$emit(
|
|
204
|
+
this.$emit('sortPropChange', prop)
|
|
243
205
|
},
|
|
244
206
|
|
|
245
207
|
async handleCommand(item, scope) {
|
|
246
208
|
try {
|
|
247
|
-
item.disabled = true
|
|
209
|
+
item.disabled = true
|
|
248
210
|
|
|
249
|
-
item.handler && (await item.handler(scope))
|
|
211
|
+
item.handler && (await item.handler(scope))
|
|
250
212
|
} catch (err) {
|
|
251
|
-
console.error(err)
|
|
213
|
+
console.error(err)
|
|
252
214
|
} finally {
|
|
253
215
|
// eslint-disable-next-line require-atomic-updates
|
|
254
|
-
item.disabled = false
|
|
216
|
+
item.disabled = false
|
|
255
217
|
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
259
221
|
</script>
|
|
260
222
|
|
|
261
223
|
<style lang="scss">
|
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
创建时间: 2021-02-05
|
|
5
5
|
-->
|
|
6
6
|
<template>
|
|
7
|
-
<div
|
|
8
|
-
:class="[
|
|
9
|
-
'element-table-custom',
|
|
10
|
-
{ 'vertical-header-el-table': isVerticalHeader }
|
|
11
|
-
]"
|
|
12
|
-
>
|
|
7
|
+
<div :class="['element-table-custom', { 'vertical-header-el-table': isVerticalHeader }]">
|
|
13
8
|
<el-table
|
|
14
9
|
ref="elTable"
|
|
15
10
|
v-bind="$attrs"
|
|
@@ -293,9 +288,7 @@ export default {
|
|
|
293
288
|
},
|
|
294
289
|
|
|
295
290
|
eleSort() {
|
|
296
|
-
!this.sortCustom &&
|
|
297
|
-
this.sortProp &&
|
|
298
|
-
this.$refs.table.sort(this.sortProp, 'descending')
|
|
291
|
+
!this.sortCustom && this.sortProp && this.$refs.table.sort(this.sortProp, 'descending')
|
|
299
292
|
},
|
|
300
293
|
|
|
301
294
|
// 合计
|
|
@@ -349,10 +342,7 @@ export default {
|
|
|
349
342
|
this.mergeSpanRow.push(this.mergeSpan[i][`row`])
|
|
350
343
|
}
|
|
351
344
|
}
|
|
352
|
-
if (
|
|
353
|
-
this.mergeSpanCol.includes(columnIndex) &&
|
|
354
|
-
this.mergeSpanRow.includes(rowIndex)
|
|
355
|
-
) {
|
|
345
|
+
if (this.mergeSpanCol.includes(columnIndex) && this.mergeSpanRow.includes(rowIndex)) {
|
|
356
346
|
const temp = this.mergeSpan.filter((i) => {
|
|
357
347
|
return i.col === columnIndex && i.row === rowIndex
|
|
358
348
|
})
|
|
@@ -369,9 +359,7 @@ export default {
|
|
|
369
359
|
},
|
|
370
360
|
|
|
371
361
|
setDrag() {
|
|
372
|
-
const $tbody = this.$refs.elTable.$el.querySelectorAll(
|
|
373
|
-
'.el-table__body-wrapper > table > tbody'
|
|
374
|
-
)[0]
|
|
362
|
+
const $tbody = this.$refs.elTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
|
|
375
363
|
|
|
376
364
|
this.sortable = Sortable.create($tbody, {
|
|
377
365
|
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
|
@@ -457,4 +445,3 @@ export default {
|
|
|
457
445
|
}
|
|
458
446
|
}
|
|
459
447
|
</style>
|
|
460
|
-
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<NstcDialog
|
|
3
|
-
v-model="_value"
|
|
4
|
-
:title="pageTitle"
|
|
5
|
-
:custom-class="cName"
|
|
6
|
-
:show-footer="false"
|
|
7
|
-
:width="dialogWidth"
|
|
8
|
-
>
|
|
2
|
+
<NstcDialog v-model="_value" :title="pageTitle" :custom-class="cName" :show-footer="false" :width="dialogWidth">
|
|
9
3
|
<div :class="`${cName}-inner`">
|
|
10
4
|
<div :class="{ [`${cName}-left`]: true }">
|
|
11
5
|
<!-- 顶部标题以及全选按钮 -->
|
|
@@ -20,21 +14,14 @@
|
|
|
20
14
|
</div>
|
|
21
15
|
<!-- checkBox -->
|
|
22
16
|
<div :class="`${cName}-inner-content`">
|
|
23
|
-
<div
|
|
24
|
-
v-for="(group, index) in options"
|
|
25
|
-
:key="index"
|
|
26
|
-
class="table-columns-set-group"
|
|
27
|
-
>
|
|
17
|
+
<div v-for="(group, index) in options" :key="index" class="table-columns-set-group">
|
|
28
18
|
<div :class="`${cName}-group-name`">
|
|
29
19
|
{{ group.groupName }}
|
|
30
20
|
<!-- <i v-if="showCollapse" :class="['el-icon-arrow-up', 'arrow-up',arrowStates[index]?'arrow-down':'']" @click="upDown(index)"></i> -->
|
|
31
21
|
</div>
|
|
32
22
|
<CheckboxCustom
|
|
33
23
|
v-model="model[index]"
|
|
34
|
-
:class="[
|
|
35
|
-
arrowStates[index] ? 'arrowwz-change' : '',
|
|
36
|
-
'show-group'
|
|
37
|
-
]"
|
|
24
|
+
:class="[arrowStates[index] ? 'arrowwz-change' : '', 'show-group']"
|
|
38
25
|
:options="group.children"
|
|
39
26
|
hover-show-title
|
|
40
27
|
@change="(_) => handleLeftChange(group.children)"
|
|
@@ -43,17 +30,10 @@
|
|
|
43
30
|
</div>
|
|
44
31
|
</div>
|
|
45
32
|
<!-- 右边排序部分 -->
|
|
46
|
-
<div
|
|
47
|
-
v-show="['set', 'export', 'condition'].includes(type)"
|
|
48
|
-
:class="`${cName}-right`"
|
|
49
|
-
>
|
|
33
|
+
<div v-show="['set', 'export', 'condition'].includes(type)" :class="`${cName}-right`">
|
|
50
34
|
<div :class="`${cName}-inner-title`">当前选定项</div>
|
|
51
35
|
<div ref="table_columns_set_result" :class="`${cName}-inner-content`">
|
|
52
|
-
<div
|
|
53
|
-
v-for="(item, index) in result"
|
|
54
|
-
:key="item.id"
|
|
55
|
-
:class="`${cName}-result-item`"
|
|
56
|
-
>
|
|
36
|
+
<div v-for="(item, index) in result" :key="item.id" :class="`${cName}-result-item`">
|
|
57
37
|
<span>{{ item.name }}</span>
|
|
58
38
|
<!-- <el-button
|
|
59
39
|
v-if="!item.isRequired"
|
|
@@ -81,17 +61,8 @@
|
|
|
81
61
|
>
|
|
82
62
|
{{ footerHandlers.confirm.text }}
|
|
83
63
|
</el-button>
|
|
84
|
-
<el-tooltip
|
|
85
|
-
class="
|
|
86
|
-
effect="dark"
|
|
87
|
-
content="重置本次操作"
|
|
88
|
-
placement="top-start"
|
|
89
|
-
>
|
|
90
|
-
<el-button
|
|
91
|
-
v-if="footerHandlers.cancel"
|
|
92
|
-
:class="footerHandlers.cancel.className || ''"
|
|
93
|
-
@click="handleReset"
|
|
94
|
-
>
|
|
64
|
+
<el-tooltip class="item" effect="dark" content="重置本次操作" placement="top-start">
|
|
65
|
+
<el-button v-if="footerHandlers.cancel" :class="footerHandlers.cancel.className || ''" @click="handleReset">
|
|
95
66
|
{{ footerHandlers.cancel.text }}
|
|
96
67
|
</el-button>
|
|
97
68
|
</el-tooltip>
|
|
@@ -269,10 +240,7 @@ export default {
|
|
|
269
240
|
*/
|
|
270
241
|
handleLeftChange(options) {
|
|
271
242
|
const resultIds = this.result.map((item) => item.id)
|
|
272
|
-
const leftCheckedArr = this.model.reduce(
|
|
273
|
-
(total, next) => [...total, ...next],
|
|
274
|
-
[]
|
|
275
|
-
)
|
|
243
|
+
const leftCheckedArr = this.model.reduce((total, next) => [...total, ...next], [])
|
|
276
244
|
|
|
277
245
|
if (leftCheckedArr.length > resultIds.length) {
|
|
278
246
|
// 添加列
|
|
@@ -282,9 +250,7 @@ export default {
|
|
|
282
250
|
this.result.push(changeItem)
|
|
283
251
|
} else {
|
|
284
252
|
// 删除列
|
|
285
|
-
const changeIndex = resultIds.findIndex(
|
|
286
|
-
(id) => !leftCheckedArr.includes(id)
|
|
287
|
-
)
|
|
253
|
+
const changeIndex = resultIds.findIndex((id) => !leftCheckedArr.includes(id))
|
|
288
254
|
|
|
289
255
|
this.result.splice(changeIndex, 1)
|
|
290
256
|
}
|
|
@@ -368,9 +334,7 @@ export default {
|
|
|
368
334
|
let model = []
|
|
369
335
|
|
|
370
336
|
if (group.children) {
|
|
371
|
-
model = group.children
|
|
372
|
-
.map((item) => item.id)
|
|
373
|
-
.filter((id) => ids.includes(id))
|
|
337
|
+
model = group.children.map((item) => item.id).filter((id) => ids.includes(id))
|
|
374
338
|
}
|
|
375
339
|
|
|
376
340
|
return model
|
|
@@ -402,9 +366,7 @@ export default {
|
|
|
402
366
|
reset == 'reset' ? (key = 'userUnitList') : ''
|
|
403
367
|
this.defaultList = data[`defaultUnitList`]
|
|
404
368
|
} else if (this.type === 'condition') {
|
|
405
|
-
key = data[`userConditionList`]
|
|
406
|
-
? 'userConditionList'
|
|
407
|
-
: 'defaultConditionList'
|
|
369
|
+
key = data[`userConditionList`] ? 'userConditionList' : 'defaultConditionList'
|
|
408
370
|
this.defaultList = data[`defaultConditionList`]
|
|
409
371
|
} else if (this.type === 'export') {
|
|
410
372
|
// 导出的字段在付款这边默认勾选是列显示的字段
|
|
@@ -435,23 +397,20 @@ export default {
|
|
|
435
397
|
|
|
436
398
|
this.handleDefaultSet(userUnit || [])
|
|
437
399
|
|
|
438
|
-
this.sortableInstance = new Sortable(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
this.result.splice(evt.newIndex, 0, targetRow)
|
|
451
|
-
})
|
|
452
|
-
}
|
|
400
|
+
this.sortableInstance = new Sortable(this.$refs[`table_columns_set_result`], {
|
|
401
|
+
setData(dataTransfer) {
|
|
402
|
+
// to avoid Firefox bug
|
|
403
|
+
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
|
|
404
|
+
dataTransfer.setData('Text', '')
|
|
405
|
+
},
|
|
406
|
+
onEnd: (evt) => {
|
|
407
|
+
const targetRow = this.result.splice(evt.oldIndex, 1)[0]
|
|
408
|
+
|
|
409
|
+
this.$nextTick(() => {
|
|
410
|
+
this.result.splice(evt.newIndex, 0, targetRow)
|
|
411
|
+
})
|
|
453
412
|
}
|
|
454
|
-
)
|
|
413
|
+
})
|
|
455
414
|
// type
|
|
456
415
|
this[`hasInit_${this.type}`] = true
|
|
457
416
|
//
|
|
@@ -495,8 +454,7 @@ export default {
|
|
|
495
454
|
let result = await axios({
|
|
496
455
|
url: this.exportExcelConfig.url,
|
|
497
456
|
method: this.exportExcelConfig.httpMethod,
|
|
498
|
-
[`${this.exportExcelConfig.httpMethod === 'get' ? 'params' : 'data'}`]:
|
|
499
|
-
this.exportExcelConfig.searchObj
|
|
457
|
+
[`${this.exportExcelConfig.httpMethod === 'get' ? 'params' : 'data'}`]: this.exportExcelConfig.searchObj
|
|
500
458
|
})
|
|
501
459
|
|
|
502
460
|
this._value = false
|
|
@@ -504,8 +462,7 @@ export default {
|
|
|
504
462
|
result = result[`list`] || result
|
|
505
463
|
|
|
506
464
|
// 格式化导出数据
|
|
507
|
-
this.exportExcelConfig.formatData &&
|
|
508
|
-
(result = this.exportExcelConfig.formatData(result))
|
|
465
|
+
this.exportExcelConfig.formatData && (result = this.exportExcelConfig.formatData(result))
|
|
509
466
|
|
|
510
467
|
// 拼接导出结构
|
|
511
468
|
console.log('result', this.result)
|
|
@@ -546,9 +503,7 @@ export default {
|
|
|
546
503
|
})
|
|
547
504
|
let cellStyle = {}
|
|
548
505
|
if (that.exportExcelConfig.cellStyle) {
|
|
549
|
-
let cellStyleColName = this.result.filter(
|
|
550
|
-
(i) => that.exportExcelConfig.cellStyle[i.id]
|
|
551
|
-
)
|
|
506
|
+
let cellStyleColName = this.result.filter((i) => that.exportExcelConfig.cellStyle[i.id])
|
|
552
507
|
let cellStyleMap = {}
|
|
553
508
|
cellStyleColName.forEach((i) => {
|
|
554
509
|
if (that.exportExcelConfig.cellStyle[i.id]) {
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
-->
|
|
6
6
|
<template>
|
|
7
7
|
<el-color-picker
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
v-model="theme"
|
|
9
|
+
:predefine="['#4E94A8', '#409EFF', '#1890ff', '#304156', '#212121', '#11a983', '#13c2c2', '#6959CD', '#f5222d']"
|
|
10
|
+
class="theme-picker"
|
|
11
|
+
popper-class="theme-picker-dropdown"
|
|
12
12
|
/>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
watch: {
|
|
33
33
|
defaultTheme: {
|
|
34
|
-
handler: function(val) {
|
|
34
|
+
handler: function (val) {
|
|
35
35
|
this.theme = val
|
|
36
36
|
},
|
|
37
37
|
immediate: true
|
|
@@ -78,12 +78,11 @@ export default {
|
|
|
78
78
|
|
|
79
79
|
chalkHandler()
|
|
80
80
|
|
|
81
|
-
const styles = [].slice.call(document.querySelectorAll('style'))
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
styles.forEach(style => {
|
|
81
|
+
const styles = [].slice.call(document.querySelectorAll('style')).filter((style) => {
|
|
82
|
+
const text = style.innerText
|
|
83
|
+
return new RegExp(oldVal, 'i').test(text) && !/Chalk Variables/.test(text)
|
|
84
|
+
})
|
|
85
|
+
styles.forEach((style) => {
|
|
87
86
|
const { innerText } = style
|
|
88
87
|
if (typeof innerText !== 'string') return
|
|
89
88
|
style.innerText = this.updateStyle(innerText, originalCluster, themeCluster)
|
|
@@ -105,7 +104,7 @@ export default {
|
|
|
105
104
|
},
|
|
106
105
|
|
|
107
106
|
getCSSString(url, variable) {
|
|
108
|
-
return new Promise(resolve => {
|
|
107
|
+
return new Promise((resolve) => {
|
|
109
108
|
const xhr = new XMLHttpRequest()
|
|
110
109
|
xhr.onreadystatechange = () => {
|
|
111
110
|
if (xhr.readyState === 4 && xhr.status === 200) {
|
|
@@ -125,7 +124,8 @@ export default {
|
|
|
125
124
|
let green = parseInt(color.slice(2, 4), 16)
|
|
126
125
|
let blue = parseInt(color.slice(4, 6), 16)
|
|
127
126
|
|
|
128
|
-
if (tint === 0) {
|
|
127
|
+
if (tint === 0) {
|
|
128
|
+
// when primary color is in its rgb space
|
|
129
129
|
return [red, green, blue].join(',')
|
|
130
130
|
} else {
|
|
131
131
|
red += Math.round(tint * (255 - red))
|
|
@@ -183,4 +183,3 @@ export default {
|
|
|
183
183
|
display: none;
|
|
184
184
|
}
|
|
185
185
|
</style>
|
|
186
|
-
|