n20-common-lib 2.7.65 → 2.7.67
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
CHANGED
|
@@ -297,7 +297,7 @@ export default {
|
|
|
297
297
|
}
|
|
298
298
|
// 计算区间内容宽度
|
|
299
299
|
const calcRangeWidth = (item, value, value2) => {
|
|
300
|
-
let textMaxWidth =
|
|
300
|
+
let textMaxWidth = 426 - getWidth(item.label) - 16
|
|
301
301
|
let textMinWidth = 160
|
|
302
302
|
if (!value && !value2) {
|
|
303
303
|
return textMinWidth + 'px'
|
|
@@ -325,7 +325,7 @@ export default {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
const calcDateWidth = (item, value) => {
|
|
328
|
-
let textMaxWidth =
|
|
328
|
+
let textMaxWidth = 382 - getWidth(item.label) - 16
|
|
329
329
|
let textMinWidth = 76
|
|
330
330
|
if (!value) {
|
|
331
331
|
return textMinWidth + 'px'
|
|
@@ -436,7 +436,7 @@ export default {
|
|
|
436
436
|
const selectProps = {
|
|
437
437
|
placeholder: item.props && item.props.placeholder ? item.props.placeholder : $lc('请选择'),
|
|
438
438
|
clearable: (item.props && this.item.props.clearable) ?? true,
|
|
439
|
-
multiple: item.multiple || item.props
|
|
439
|
+
multiple: item.multiple || item.props?.multiple,
|
|
440
440
|
...item.props
|
|
441
441
|
}
|
|
442
442
|
elementDom = h(
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import { $lc } from '../../utils/i18n/index'
|
|
43
42
|
import axios from '../../utils/axios'
|
|
44
43
|
import downloadBlob from '../../utils/downloadBlob'
|
|
44
|
+
import { $lc } from '../../utils/i18n/index'
|
|
45
45
|
import Upload from '../Upload/index.vue'
|
|
46
46
|
import uploadMsg from '../Upload/uploadMsg.vue'
|
|
47
47
|
export default {
|
|
@@ -60,6 +60,10 @@ export default {
|
|
|
60
60
|
type: String,
|
|
61
61
|
default: '60%'
|
|
62
62
|
},
|
|
63
|
+
fileType: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '.xlsx,.xls,.csv'
|
|
66
|
+
},
|
|
63
67
|
fileName: {
|
|
64
68
|
type: String,
|
|
65
69
|
default: $lc('下载.xlsx')
|
|
@@ -106,13 +110,17 @@ export default {
|
|
|
106
110
|
}
|
|
107
111
|
},
|
|
108
112
|
data() {
|
|
109
|
-
return {
|
|
110
|
-
errorV: false
|
|
111
|
-
}
|
|
113
|
+
return {}
|
|
112
114
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
computed: {
|
|
116
|
+
errorV: {
|
|
117
|
+
get() {
|
|
118
|
+
return this.validateDialog
|
|
119
|
+
},
|
|
120
|
+
set(v) {
|
|
121
|
+
this.$emit('update:validateDialog', v)
|
|
122
|
+
return v
|
|
123
|
+
}
|
|
116
124
|
}
|
|
117
125
|
},
|
|
118
126
|
methods: {
|
|
@@ -130,9 +138,10 @@ export default {
|
|
|
130
138
|
this.$refs['upload-trigger'].click()
|
|
131
139
|
return
|
|
132
140
|
}
|
|
141
|
+
|
|
133
142
|
let input = document.createElement('input')
|
|
134
143
|
input.type = 'file'
|
|
135
|
-
input.accept =
|
|
144
|
+
input.accept = this.fileType
|
|
136
145
|
input.addEventListener('change', (event) => {
|
|
137
146
|
this.uploadHttpRequest && this.uploadHttpRequest(event.target.files[0])
|
|
138
147
|
})
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:visible.sync="progressV"
|
|
7
7
|
:title="title"
|
|
8
8
|
append-to-body
|
|
9
|
+
@close="handleClose"
|
|
9
10
|
:close-on-click-modal="false"
|
|
10
11
|
:close-on-press-escape="false"
|
|
11
12
|
>
|
|
@@ -110,10 +111,10 @@
|
|
|
110
111
|
</template>
|
|
111
112
|
|
|
112
113
|
<script>
|
|
114
|
+
import cloneDeep from 'lodash/cloneDeep'
|
|
113
115
|
import { $lc } from '../../utils/i18n/index'
|
|
114
|
-
import { colfF } from '../Table/filters.js'
|
|
115
116
|
import Pagination from '../Pagination/index.vue'
|
|
116
|
-
import
|
|
117
|
+
import { colfF } from '../Table/filters.js'
|
|
117
118
|
export default {
|
|
118
119
|
name: 'UploadMsg',
|
|
119
120
|
components: { Pagination },
|
|
@@ -203,6 +204,7 @@ export default {
|
|
|
203
204
|
},
|
|
204
205
|
set(v) {
|
|
205
206
|
this.$emit('update:visible', v)
|
|
207
|
+
return v
|
|
206
208
|
}
|
|
207
209
|
},
|
|
208
210
|
|
|
@@ -249,6 +251,9 @@ export default {
|
|
|
249
251
|
this.progressV = false
|
|
250
252
|
}
|
|
251
253
|
},
|
|
254
|
+
handleClose() {
|
|
255
|
+
this.progressV = false
|
|
256
|
+
},
|
|
252
257
|
getList() {
|
|
253
258
|
const startIndex = (this.page.current - 1) * this.page.pageSize
|
|
254
259
|
const endIndex = startIndex + this.page.pageSize
|