n20-common-lib 2.6.1 → 2.6.2-beta
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/package.json +5 -4
- package/src/assets/css/cl-file-upload-table.scss +2 -2
- package/src/assets/css/cl-layout-header.scss +34 -5
- package/src/assets/css/cl-message.scss +55 -1
- package/src/assets/css/filter.scss +1 -1
- package/src/components/AdvancedFilter/formItemRender.vue +8 -4
- package/src/components/AdvancedFilter/index.vue +37 -13
- package/src/components/AdvancedFilter/utils.js +8 -0
- package/src/components/Anchor/index.vue +5 -1
- package/src/components/ApprovalButtons/showAppOpi.vue +1 -0
- package/src/components/DateSelect/index.vue +29 -4
- package/src/components/DragList/index.vue +6 -2
- package/src/components/ElectronicArchive/index.vue +766 -0
- package/src/components/FileImport/index.vue +6 -0
- package/src/components/FileUploadTable/index.vue +1 -1
- package/src/components/Filters/index.vue +1 -1
- package/src/components/InputNumber/numberRange.vue +2 -0
- package/src/components/Layout/HeaderWrap/changePwd.vue +16 -9
- package/src/components/Layout/HeaderWrap/index.vue +10 -0
- package/src/components/Layout/HeaderWrap/indexN.vue +19 -4
- package/src/components/LoginTemporary/form.vue +8 -0
- package/src/components/SelectDatePickerPro/index.vue +13 -13
- package/src/components/ShowColumn/index.vue +3 -3
- package/src/components/TablePro/filterContent.vue +279 -0
- package/src/components/TablePro/filterContent_tree.vue +172 -0
- package/src/components/TablePro/index.js +30 -0
- package/src/components/TablePro/index.vue +3 -2
- package/src/components/Tree/index.vue +6 -1
- package/src/components/Upload/index.vue +5 -0
- package/src/components/Upload/uploadMsg.vue +7 -5
- package/src/components/operatingStatus/index.vue +5 -3
- package/src/directives/watermark/index.js +69 -0
- package/src/i18n.json +3 -0
- package/src/index.js +117 -109
- package/src/utils/amountInWords.js +17 -100
- package/src/utils/numberPor.js +24 -27
- package/style/index.css +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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="my-filter-content">
|
|
3
|
+
<div class="my-fc-search">
|
|
4
|
+
<div class="my-fc-search-top">
|
|
5
|
+
<el-input v-model="filterText" placeholder="输入关键字进行过滤" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="my-fc-search-content">
|
|
8
|
+
<template v-if="data.length">
|
|
9
|
+
<el-tree
|
|
10
|
+
ref="tree"
|
|
11
|
+
class="filter-tree"
|
|
12
|
+
:data="data"
|
|
13
|
+
:props="defaultProps"
|
|
14
|
+
:show-checkbox="filterMultiple"
|
|
15
|
+
default-expand-all
|
|
16
|
+
:default-checked-keys="defaultCheckedKeys"
|
|
17
|
+
:filter-node-method="filterNode"
|
|
18
|
+
node-key="value"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
<template v-else>
|
|
22
|
+
<div class="my-fc-search-empty">无匹配项</div>
|
|
23
|
+
</template>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex-box flex-c m-t-s" style="width: 100%">
|
|
27
|
+
<el-button type="primary" size="mini" @click="confirmFilterEvent">确认</el-button>
|
|
28
|
+
<el-button plan size="mini" @click="resetFilterEvent">重置</el-button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
export default {
|
|
35
|
+
name: 'FilterContent',
|
|
36
|
+
props: {
|
|
37
|
+
params: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => {
|
|
40
|
+
return {}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
demo1: {
|
|
47
|
+
isAll: false,
|
|
48
|
+
option: null,
|
|
49
|
+
colValList: [],
|
|
50
|
+
valList: []
|
|
51
|
+
},
|
|
52
|
+
filterText: '',
|
|
53
|
+
defaultProps: {
|
|
54
|
+
children: 'children',
|
|
55
|
+
label: 'label'
|
|
56
|
+
},
|
|
57
|
+
data: [],
|
|
58
|
+
filterMultiple: false,
|
|
59
|
+
defaultCheckedKeys: []
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
watch: {
|
|
63
|
+
filterText(val) {
|
|
64
|
+
this.$refs.tree.filter(val)
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
mounted() {
|
|
68
|
+
this.load()
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
// 顶部筛选
|
|
72
|
+
filterNode(value, data) {
|
|
73
|
+
if (!value) return true
|
|
74
|
+
return data.label.indexOf(value) !== -1
|
|
75
|
+
},
|
|
76
|
+
load() {
|
|
77
|
+
const params = this.params
|
|
78
|
+
const { column } = params
|
|
79
|
+
if (column.filterMultiple) {
|
|
80
|
+
this.filterMultiple = column.filterMultiple
|
|
81
|
+
}
|
|
82
|
+
if (column.filters) {
|
|
83
|
+
// 多选
|
|
84
|
+
if (column.filterMultiple) {
|
|
85
|
+
this.data = [
|
|
86
|
+
{
|
|
87
|
+
value: 0,
|
|
88
|
+
label: '全部',
|
|
89
|
+
children: column.filters
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
//单选
|
|
93
|
+
} else {
|
|
94
|
+
this.data = column.filters
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
confirmFilterEvent() {
|
|
100
|
+
const { $panel, column } = this.params
|
|
101
|
+
const vals = this.$refs.tree.getCheckedKeys() || this.$refs.tree.getCurrentKey()
|
|
102
|
+
this.defaultCheckedKeys = vals
|
|
103
|
+
column.filters.map((item) => {
|
|
104
|
+
item.data = { vals: vals }
|
|
105
|
+
if (vals.includes(item.value)) {
|
|
106
|
+
item.checked = true
|
|
107
|
+
item._checked = true
|
|
108
|
+
} else {
|
|
109
|
+
item.checked = false
|
|
110
|
+
item._checked = false
|
|
111
|
+
}
|
|
112
|
+
return item
|
|
113
|
+
})
|
|
114
|
+
$panel.confirmFilter()
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
resetFilterEvent() {
|
|
118
|
+
const params = this.params
|
|
119
|
+
if (params) {
|
|
120
|
+
const { $panel } = params
|
|
121
|
+
$panel.resetFilter()
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style>
|
|
129
|
+
.my-filter-content {
|
|
130
|
+
padding: 10px;
|
|
131
|
+
user-select: none;
|
|
132
|
+
}
|
|
133
|
+
.my-filter-content .my-fc-search .my-fc-search-top {
|
|
134
|
+
position: relative;
|
|
135
|
+
padding: 5px 0;
|
|
136
|
+
}
|
|
137
|
+
.my-filter-content .my-fc-search .my-fc-search-top > input {
|
|
138
|
+
border: 1px solid #ababab;
|
|
139
|
+
padding: 0 20px 0 2px;
|
|
140
|
+
width: 200px;
|
|
141
|
+
height: 22px;
|
|
142
|
+
line-height: 22px;
|
|
143
|
+
}
|
|
144
|
+
.my-filter-content .my-fc-search .my-fc-search-content {
|
|
145
|
+
padding: 2px 10px;
|
|
146
|
+
}
|
|
147
|
+
.my-filter-content .my-fc-search-empty {
|
|
148
|
+
text-align: center;
|
|
149
|
+
padding: 20px 0;
|
|
150
|
+
}
|
|
151
|
+
.my-filter-content .my-fc-search-list {
|
|
152
|
+
margin: 0;
|
|
153
|
+
padding: 0;
|
|
154
|
+
list-style: none;
|
|
155
|
+
}
|
|
156
|
+
.my-filter-content .my-fc-search-list-body {
|
|
157
|
+
overflow: auto;
|
|
158
|
+
height: 120px;
|
|
159
|
+
}
|
|
160
|
+
.my-filter-content .my-fc-search-list .my-fc-search-item {
|
|
161
|
+
padding: 2px 0;
|
|
162
|
+
display: block;
|
|
163
|
+
}
|
|
164
|
+
.my-filter-content .my-fc-footer {
|
|
165
|
+
text-align: right;
|
|
166
|
+
padding-top: 10px;
|
|
167
|
+
}
|
|
168
|
+
.my-filter-content .my-fc-footer button {
|
|
169
|
+
padding: 0 15px;
|
|
170
|
+
margin-left: 15px;
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
import vxeTable from 'vxe-table'
|
|
2
2
|
import 'vxe-table/lib/style.css'
|
|
3
|
+
import filterContent from './filterContent.vue'
|
|
3
4
|
import numerify from 'numerify'
|
|
4
5
|
import dayjs from 'dayjs'
|
|
5
6
|
|
|
7
|
+
// 创建一个简单的输入框筛选
|
|
8
|
+
vxeTable.renderer.add('FilterInput', {
|
|
9
|
+
// 筛选模板
|
|
10
|
+
renderFilter(h, renderOpts, params) {
|
|
11
|
+
return <filterContent params={params}></filterContent>
|
|
12
|
+
},
|
|
13
|
+
// 不显示底部按钮,使用自定义的按钮
|
|
14
|
+
showFilterFooter: false,
|
|
15
|
+
// 重置数据方法
|
|
16
|
+
filterResetMethod({ options }) {
|
|
17
|
+
options.forEach((option) => {
|
|
18
|
+
option.data = ''
|
|
19
|
+
})
|
|
20
|
+
},
|
|
21
|
+
// 重置筛选复原方法(当未点击确认时,该选项将被恢复为默认值)
|
|
22
|
+
filterRecoverMethod({ option }) {
|
|
23
|
+
option.data = ''
|
|
24
|
+
},
|
|
25
|
+
// 筛选方法
|
|
26
|
+
filterMethod({ option, row, column }) {
|
|
27
|
+
const { data } = option
|
|
28
|
+
const cellValue = row[column.property]
|
|
29
|
+
if (cellValue) {
|
|
30
|
+
return cellValue.indexOf(data) > -1
|
|
31
|
+
}
|
|
32
|
+
return false
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
6
36
|
// 自定义全局的格式化处理函数
|
|
7
37
|
vxeTable.formats.mixin({
|
|
8
38
|
// 格式化内容 为空转为--
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
:key="'vxe-table-' + i"
|
|
67
67
|
:formatter="subItem.formatter ? subItem.formatter : 'formatName'"
|
|
68
68
|
:filters="subItem.filters"
|
|
69
|
-
:filter-render="subItem.filterRender"
|
|
69
|
+
:filter-render="{ name: 'FilterInput', ...subItem.filterRender }"
|
|
70
70
|
:title="subItem.label"
|
|
71
71
|
:field="subItem.prop"
|
|
72
72
|
v-bind="subItem"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
:class-name="`${item.wrap && `vxe-table-custom-wrap`} ${item.bold && `font-w600`}`"
|
|
80
80
|
:formatter="item.formatter ? item.formatter : 'formatName'"
|
|
81
81
|
:filters="item.filters"
|
|
82
|
-
:filter-render="item.filterRender"
|
|
82
|
+
:filter-render="{ name: 'FilterInput', ...item.filterRender }"
|
|
83
83
|
:title="item.label"
|
|
84
84
|
:field="item.prop"
|
|
85
85
|
v-bind="item"
|
|
@@ -234,6 +234,7 @@ export default {
|
|
|
234
234
|
this.$emit('sort-change-method', orders)
|
|
235
235
|
},
|
|
236
236
|
filterChange(data) {
|
|
237
|
+
console.log(data)
|
|
237
238
|
const { filterList } = data
|
|
238
239
|
// 输出全部条件
|
|
239
240
|
const obj = {}
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
class="cl-tree-item-label text-ellipsis"
|
|
30
30
|
>
|
|
31
31
|
{{ (data[props.value] ? '(' + data[props.value] + ') ' : '') + data[props.label] }}
|
|
32
|
-
{{
|
|
32
|
+
{{
|
|
33
|
+
data && data[props.children] && data[props.children].length > 0
|
|
34
|
+
? '(' + data[props.children].length + ')'
|
|
35
|
+
: ''
|
|
36
|
+
}}
|
|
33
37
|
</div>
|
|
34
38
|
</div>
|
|
35
39
|
<el-button
|
|
@@ -55,6 +59,7 @@
|
|
|
55
59
|
@click="handleChecked(node, data)"
|
|
56
60
|
>{{ $lc('只勾选本层级') }}</el-button
|
|
57
61
|
>
|
|
62
|
+
<slot v-else name="right" :node="node" :data="data"></slot>
|
|
58
63
|
</div>
|
|
59
64
|
</el-tree>
|
|
60
65
|
</template>
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
:percent="percent"
|
|
43
43
|
:width="width"
|
|
44
44
|
title="文件导入"
|
|
45
|
+
:showErrorExport="showErrorExport"
|
|
45
46
|
:pagination="pagination"
|
|
46
47
|
:footer-btn="footer"
|
|
47
48
|
:validate-result="validateResult"
|
|
@@ -169,6 +170,10 @@ export default {
|
|
|
169
170
|
footer: {
|
|
170
171
|
type: Object,
|
|
171
172
|
default: undefined
|
|
173
|
+
},
|
|
174
|
+
showErrorExport: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: false
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
data() {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<div class="bd-a">
|
|
50
50
|
<div class="flex-box flex-lr flex-v m-t m-b p-l p-r">
|
|
51
51
|
<span>{{ '无效数据详情' | $lc }}</span>
|
|
52
|
-
<el-button type="text" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
|
|
52
|
+
<el-button type="text" v-if="showErrorExport" @click="importError">{{ '导出错误数据' | $lc }}</el-button>
|
|
53
53
|
</div>
|
|
54
54
|
<el-table ref="tables" :key="index" :data="errorListC" border style="width: 100%" height="300px">
|
|
55
55
|
<el-table-column
|
|
@@ -161,6 +161,10 @@ export default {
|
|
|
161
161
|
hidePercent: {
|
|
162
162
|
type: Boolean,
|
|
163
163
|
default: false
|
|
164
|
+
},
|
|
165
|
+
showErrorExport: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false
|
|
164
168
|
}
|
|
165
169
|
},
|
|
166
170
|
filters: {
|
|
@@ -182,7 +186,7 @@ export default {
|
|
|
182
186
|
errorList: {
|
|
183
187
|
handler() {
|
|
184
188
|
this.errorListC = this.errorList
|
|
185
|
-
this.page.total =
|
|
189
|
+
this.page.total = this.tableData.length
|
|
186
190
|
}
|
|
187
191
|
},
|
|
188
192
|
page: {
|
|
@@ -222,8 +226,7 @@ export default {
|
|
|
222
226
|
this.tableData = cloneDeep(_errorList)
|
|
223
227
|
const startIndex = (this.page.current - 1) * this.page.pageSize
|
|
224
228
|
const endIndex = startIndex + this.page.pageSize
|
|
225
|
-
|
|
226
|
-
return dto
|
|
229
|
+
return this.pagination ? this.tableData.slice(startIndex, endIndex) : this.tableData
|
|
227
230
|
} else {
|
|
228
231
|
return undefined
|
|
229
232
|
}
|
|
@@ -250,7 +253,6 @@ export default {
|
|
|
250
253
|
const startIndex = (this.page.current - 1) * this.page.pageSize
|
|
251
254
|
const endIndex = startIndex + this.page.pageSize
|
|
252
255
|
this.errorListC = this.tableData.slice(startIndex, endIndex)
|
|
253
|
-
|
|
254
256
|
this.index += 1
|
|
255
257
|
this.$nextTick(() => {
|
|
256
258
|
this.$refs.tables.doLayout()
|
|
@@ -79,12 +79,14 @@ export default {
|
|
|
79
79
|
|
|
80
80
|
<style scoped>
|
|
81
81
|
.el-carousel {
|
|
82
|
-
width:
|
|
82
|
+
min-width: 220px;
|
|
83
83
|
}
|
|
84
|
-
.el-carousel__item
|
|
84
|
+
.el-carousel__item {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
85
88
|
font-size: 14px;
|
|
86
89
|
opacity: 0.75;
|
|
87
|
-
line-height: 50px;
|
|
88
90
|
margin: 0;
|
|
89
91
|
}
|
|
90
92
|
.el-carousel__item:nth-child(n) {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const addWaterMarker = (str, parentNode, font, textColor) => {
|
|
2
|
+
const args = arguments[0]
|
|
3
|
+
let can = document.createElement('canvas')
|
|
4
|
+
const __wm = document.querySelector('.n20_v_watermark')
|
|
5
|
+
let div = __wm || document.createElement('div')
|
|
6
|
+
|
|
7
|
+
can.width = 220
|
|
8
|
+
can.height = 180
|
|
9
|
+
can.style.display = 'none'
|
|
10
|
+
let cans = can.getContext('2d')
|
|
11
|
+
cans.rotate((-20 * Math.PI) / 180)
|
|
12
|
+
cans.font = font || '16px Microsoft JhengHei'
|
|
13
|
+
cans.fillStyle = textColor || 'rgba(180, 180, 180, 0.3)'
|
|
14
|
+
cans.textAlign = 'left'
|
|
15
|
+
cans.textBaseline = 'Middle'
|
|
16
|
+
cans.fillText(str, can.width / 10, can.height / 2)
|
|
17
|
+
const styleStr = `
|
|
18
|
+
position:absolute;
|
|
19
|
+
top:0;
|
|
20
|
+
left:0;
|
|
21
|
+
width:100%;
|
|
22
|
+
height:100%;
|
|
23
|
+
inset:0;
|
|
24
|
+
z-index:99999;
|
|
25
|
+
pointer-events:none;
|
|
26
|
+
background-repeat:repeat;
|
|
27
|
+
background-image:url('${can.toDataURL('image/png')}')`
|
|
28
|
+
div.setAttribute('style', styleStr)
|
|
29
|
+
div.classList.add('n20_v_watermark')
|
|
30
|
+
if (!__wm) {
|
|
31
|
+
parentNode.style.position = 'relative'
|
|
32
|
+
parentNode.insertBefore(div, parentNode.firstChild)
|
|
33
|
+
}
|
|
34
|
+
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver
|
|
35
|
+
if (MutationObserver) {
|
|
36
|
+
let mo = new MutationObserver(function () {
|
|
37
|
+
const __wm = document.querySelector('.n20_v_watermark')
|
|
38
|
+
// 只在__wm元素变动才重新调用 __canvasWM
|
|
39
|
+
if ((__wm && __wm.getAttribute('style') !== styleStr) || !__wm) {
|
|
40
|
+
// 避免一直触发
|
|
41
|
+
mo.disconnect()
|
|
42
|
+
mo = null
|
|
43
|
+
addWaterMarker(str, parentNode, font, textColor)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
mo.observe(parentNode, {
|
|
48
|
+
attributes: true,
|
|
49
|
+
subtree: true,
|
|
50
|
+
childList: true
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
parentNode.style.position = 'relative'
|
|
55
|
+
parentNode.insertBefore(div, parentNode.firstChild)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const watermark = {
|
|
59
|
+
install: function (Vue) {
|
|
60
|
+
Vue.directive('watermark', {
|
|
61
|
+
inserted: function (el, binding) {
|
|
62
|
+
console.log(el, binding)
|
|
63
|
+
addWaterMarker(binding.value.text, el, binding.value.font, binding.value.textColor)
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default watermark
|
package/src/i18n.json
CHANGED
|
@@ -1235,6 +1235,9 @@
|
|
|
1235
1235
|
"密码只能包含数字 + 大写字母 + 小写字母": {
|
|
1236
1236
|
"en": "Passwords can only contain numeric uppercase lowercase letters"
|
|
1237
1237
|
},
|
|
1238
|
+
"密码只能包含数字 + 大写字母 + 小写字母 + 特殊符号": {
|
|
1239
|
+
"en": "Passwords can only contain numeric uppercase lowercase letters and special symbols"
|
|
1240
|
+
},
|
|
1238
1241
|
"关闭其他": {
|
|
1239
1242
|
"en": "Close others"
|
|
1240
1243
|
},
|