n20-common-lib 2.7.4 → 2.7.6
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 +1 -1
- package/src/assets/css/cl-message.scss +3 -1
- package/src/utils/xls2json.js +4 -4
- 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
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
padding: 0;
|
|
25
25
|
margin-top: 12px;
|
|
26
26
|
margin-bottom: 12px;
|
|
27
|
+
word-wrap: break-word;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.el-message-box__btns {
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
right: -15px;
|
|
112
113
|
}
|
|
113
114
|
}
|
|
115
|
+
|
|
114
116
|
.header-show-icon {
|
|
115
117
|
.el-message-box__title {
|
|
116
118
|
justify-content: flex-start;
|
|
@@ -211,4 +213,4 @@
|
|
|
211
213
|
|
|
212
214
|
.el-message-box__status.el-icon-info {
|
|
213
215
|
color: $--messagebox-warning-color;
|
|
214
|
-
}
|
|
216
|
+
}
|
package/src/utils/xls2json.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import importG from './importGlobal.js'
|
|
2
2
|
|
|
3
|
-
export default async function toJson(file, name) {
|
|
3
|
+
export default async function toJson(file, name, formAt = 'yyyy-MM-dd') {
|
|
4
4
|
const { read, utils } = await importG('xlsx', () => import(/*webpackChunkName: "xlsx"*/ 'xlsx'))
|
|
5
5
|
|
|
6
6
|
const getHeaderRow = (sheet) => {
|
|
@@ -18,7 +18,7 @@ export default async function toJson(file, name) {
|
|
|
18
18
|
if (file instanceof Blob) {
|
|
19
19
|
file.arrayBuffer().then((array) => {
|
|
20
20
|
try {
|
|
21
|
-
const workbook = read(array, { type: 'array', cellDates: true, raw: true })
|
|
21
|
+
const workbook = read(array, { type: 'array', cellDates: true, dateNF: formAt, raw: true })
|
|
22
22
|
resolve(workbook)
|
|
23
23
|
} catch (err) {
|
|
24
24
|
reject(err)
|
|
@@ -26,7 +26,7 @@ export default async function toJson(file, name) {
|
|
|
26
26
|
})
|
|
27
27
|
} else if (file instanceof ArrayBuffer) {
|
|
28
28
|
try {
|
|
29
|
-
const workbook = read(file, { type: 'array', cellDates: true, raw: true })
|
|
29
|
+
const workbook = read(file, { type: 'array', cellDates: true, dateNF: formAt, raw: true })
|
|
30
30
|
resolve(workbook)
|
|
31
31
|
} catch (err) {
|
|
32
32
|
reject(err)
|
|
@@ -60,7 +60,7 @@ export default async function toJson(file, name) {
|
|
|
60
60
|
|
|
61
61
|
// let cols = utils.sheet_to_csv(workSheet, { FS: '†', blankrows: false }).split('\n')[0].replace(/†+$/, '').split('†')
|
|
62
62
|
// rows.push(cols)
|
|
63
|
-
let rowsC = utils.sheet_to_json(workSheet, { header: 1, defval: '', cellDates: true, raw:
|
|
63
|
+
let rowsC = utils.sheet_to_json(workSheet, { header: 1, defval: '', cellDates: true, dateNF: formAt, raw: false })
|
|
64
64
|
return Promise.resolve(rowsC)
|
|
65
65
|
})
|
|
66
66
|
}
|