n20-common-lib 1.3.0 → 1.3.3
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/components/ECharts/mixins/resize.js +1 -1
- package/src/components/FileImport/index.vue +1 -1
- package/src/components/NstcG6Components/Form/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcBranchLazyLoad/NstcBranchLazyLoad.vue +37 -33
- package/src/components/NstcG6Components/NstcCharts/mixins/resize.js +1 -1
- package/src/components/NstcG6Components/NstcDropdownTree/NstcDropdownTree.vue +141 -137
- package/src/components/NstcG6Components/NstcExcelExport/NstcExcelExport.vue +47 -47
- package/src/components/NstcG6Components/NstcExcelImport/NstcExcelImport.vue +1 -1
- package/src/components/NstcG6Components/NstcExcelImportN/NstcExcelImportN.vue +186 -188
- package/src/components/NstcG6Components/NstcFileUpload/NstcFileUpload.vue +429 -451
- package/src/components/NstcG6Components/NstcForm/BusinessSpecific/InputMultiple.vue +66 -68
- package/src/components/NstcG6Components/NstcForm/CascaderCustom/index.vue +7 -7
- package/src/components/NstcG6Components/NstcForm/DatepickerCustom/index.vue +32 -32
- package/src/components/NstcG6Components/NstcForm/InputAndDialog/NstcInputAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/InputCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAccount/NstcSelectAccount.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectAndDialog/NstcSelectAndDialog.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/SelectindialogCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcForm/UploadCustom/index.vue +1 -1
- package/src/components/NstcG6Components/NstcSelectTree/NstcSelectTree.vue +172 -172
- package/src/components/NstcG6Components/NstcSelectTreeList/NstcSelectTreeList.vue +1 -1
- package/src/components/NstcG6Components/NstcSvgIcon/NstcSvgIcon.vue +7 -12
- package/src/components/NstcG6Components/NstcTable/NstcTable.vue +145 -145
- package/src/components/NstcG6Components/NstcTableSet/NstcTableSet.vue +4 -4
- package/src/components/NstcG6Components/NstcWorkBench/NstcWorkBench.vue +45 -36
- package/src/components/NstcG6Components/Search/NstcSearch.vue +6 -6
- package/src/components/NstcG6Components/approvelTwo/main.vue +1 -1
- package/src/components/NstcG6Components/approvelTwo/progress.vue +1 -1
- package/src/components/Search/index.vue +8 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<el-dropdown
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
trigger="click"
|
|
5
|
+
placement="bottom-start"
|
|
6
|
+
@command="handleCommand"
|
|
7
7
|
>
|
|
8
8
|
<el-button type="primary" class="drop-btn-item">
|
|
9
9
|
导入<i class="el-icon-arrow-down el-icon--right"></i>
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
</el-dropdown-menu>
|
|
15
15
|
</el-dropdown>
|
|
16
16
|
<NstcDialog
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
v-model="dialogVisible"
|
|
18
|
+
:title="title"
|
|
19
|
+
width="1200px"
|
|
20
|
+
append-to-body
|
|
21
|
+
v-bind="$attrs"
|
|
22
|
+
v-on="$listeners"
|
|
23
|
+
@cancel="resetAction"
|
|
24
|
+
:footer-handlers="footerHandlers"
|
|
25
|
+
class="nstc-dialog-style"
|
|
26
26
|
>
|
|
27
27
|
<div class="file-box">
|
|
28
28
|
<span class="file-box-title">导入文件</span>
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
导入统计
|
|
35
35
|
<span>共计导入 {{ validateResult.totalNum }}条, </span>
|
|
36
36
|
<span
|
|
37
|
-
|
|
37
|
+
>其中有效数据<span class="effect-data">
|
|
38
38
|
{{ validateResult.successNum }} </span
|
|
39
|
-
|
|
39
|
+
>条,
|
|
40
40
|
</span>
|
|
41
41
|
<span
|
|
42
|
-
|
|
42
|
+
>无效数据
|
|
43
43
|
<span class="nstc-import-error-num">{{
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
validateResult.errorList.length
|
|
45
|
+
}}</span>
|
|
46
46
|
条。</span
|
|
47
47
|
>
|
|
48
48
|
</div>
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
<div class="fail-excel-import-box-title">无效数据详情</div>
|
|
52
52
|
<el-table :data="errorListTemp" style="width: 100%">
|
|
53
53
|
<el-table-column
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
v-for="column in columnsListTemp"
|
|
55
|
+
:key="column.prop"
|
|
56
|
+
:prop="column.prop"
|
|
57
|
+
:label="column.label"
|
|
58
|
+
:align="column.align"
|
|
59
|
+
:min-width="column.width"
|
|
60
60
|
>
|
|
61
61
|
<template slot-scope="scope">
|
|
62
62
|
<span v-html="scope.row[column.prop]"></span>
|
|
@@ -69,48 +69,47 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
<div class="footer">
|
|
71
71
|
<el-button
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</el-button
|
|
77
|
-
>
|
|
72
|
+
type="primary"
|
|
73
|
+
@click="cancel"
|
|
74
|
+
:disabled="excelData.tableData.length === 0 || confirmDisabledFlag"
|
|
75
|
+
>确定
|
|
76
|
+
</el-button>
|
|
78
77
|
</div>
|
|
79
78
|
</NstcDialog>
|
|
80
79
|
</div>
|
|
81
80
|
</template>
|
|
82
81
|
<script>
|
|
83
|
-
import XLSX from
|
|
84
|
-
import axios from
|
|
85
|
-
import NstcDialog from
|
|
82
|
+
import XLSX from 'xlsx'
|
|
83
|
+
import axios from '../../../utils/axios.js'
|
|
84
|
+
import NstcDialog from '../NstcDialog/NstcDialog'
|
|
86
85
|
|
|
87
86
|
export default {
|
|
88
|
-
name:
|
|
87
|
+
name: 'NstcExcelImportN',
|
|
89
88
|
props: {
|
|
90
89
|
title: {
|
|
91
90
|
type: String,
|
|
92
91
|
default: function () {
|
|
93
|
-
return
|
|
94
|
-
}
|
|
92
|
+
return '文件导入'
|
|
93
|
+
}
|
|
95
94
|
},
|
|
96
95
|
tips: {
|
|
97
96
|
type: Array,
|
|
98
97
|
default: () => {
|
|
99
|
-
return []
|
|
100
|
-
}
|
|
98
|
+
return []
|
|
99
|
+
}
|
|
101
100
|
},
|
|
102
101
|
templateUrl: {
|
|
103
102
|
type: String,
|
|
104
|
-
default:
|
|
103
|
+
default: ''
|
|
105
104
|
},
|
|
106
105
|
downConfig: {
|
|
107
106
|
type: Object,
|
|
108
107
|
default() {
|
|
109
108
|
return {
|
|
110
109
|
isFrontDown: true,
|
|
111
|
-
fileName:
|
|
112
|
-
}
|
|
113
|
-
}
|
|
110
|
+
fileName: '下载.xlsx'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
114
113
|
},
|
|
115
114
|
footerHandlers: {
|
|
116
115
|
type: Object,
|
|
@@ -122,19 +121,17 @@ export default {
|
|
|
122
121
|
// confirm: {
|
|
123
122
|
// text: '导入'
|
|
124
123
|
// }
|
|
125
|
-
}
|
|
126
|
-
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
127
126
|
},
|
|
128
127
|
beforeUpload: Function, // eslint-disable-line
|
|
129
128
|
callback: {
|
|
130
129
|
type: Function,
|
|
131
|
-
default: () => {
|
|
132
|
-
},
|
|
130
|
+
default: () => {}
|
|
133
131
|
},
|
|
134
132
|
handleConfirm: {
|
|
135
133
|
type: Function,
|
|
136
|
-
default: () => {
|
|
137
|
-
},
|
|
134
|
+
default: () => {}
|
|
138
135
|
},
|
|
139
136
|
// 校验结果
|
|
140
137
|
validateResult: {
|
|
@@ -144,242 +141,240 @@ export default {
|
|
|
144
141
|
totalNum: 0,
|
|
145
142
|
successNum: 0,
|
|
146
143
|
columnsList: [],
|
|
147
|
-
errorList: []
|
|
148
|
-
}
|
|
149
|
-
}
|
|
144
|
+
errorList: []
|
|
145
|
+
}
|
|
146
|
+
}
|
|
150
147
|
},
|
|
151
148
|
reset: {
|
|
152
149
|
type: Boolean,
|
|
153
|
-
default: false
|
|
150
|
+
default: false
|
|
154
151
|
},
|
|
155
152
|
dialogVisible: {
|
|
156
153
|
type: Boolean,
|
|
157
|
-
default: false
|
|
158
|
-
}
|
|
154
|
+
default: false
|
|
155
|
+
}
|
|
159
156
|
},
|
|
160
157
|
components: {
|
|
161
|
-
NstcDialog
|
|
158
|
+
NstcDialog
|
|
162
159
|
},
|
|
163
160
|
data() {
|
|
164
161
|
return {
|
|
165
162
|
loading: false,
|
|
166
163
|
excelData: {
|
|
167
164
|
tableHeader: [],
|
|
168
|
-
tableData: []
|
|
165
|
+
tableData: []
|
|
169
166
|
},
|
|
170
167
|
|
|
171
|
-
analysisText:
|
|
172
|
-
fileName:
|
|
168
|
+
analysisText: 'analysis',
|
|
169
|
+
fileName: '',
|
|
173
170
|
statisticsFlag: false,
|
|
174
171
|
columnsListTemp: [],
|
|
175
172
|
errorListTemp: [],
|
|
176
173
|
successFlag: false,
|
|
177
|
-
confirmDisabledFlag: true
|
|
178
|
-
}
|
|
174
|
+
confirmDisabledFlag: true
|
|
175
|
+
}
|
|
179
176
|
},
|
|
180
177
|
computed: {
|
|
181
178
|
hasErrorFlag() {
|
|
182
179
|
return (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
)
|
|
186
|
-
}
|
|
180
|
+
this.validateResult.errorList &&
|
|
181
|
+
this.validateResult.errorList.length > 0
|
|
182
|
+
)
|
|
183
|
+
}
|
|
187
184
|
},
|
|
188
185
|
watch: {
|
|
189
186
|
validateResult: {
|
|
190
187
|
handler(newValue, oldValue) {
|
|
191
|
-
console.log(
|
|
192
|
-
newValue.columnsList.length && (this.statisticsFlag = true)
|
|
188
|
+
console.log('值更新了', newValue, oldValue)
|
|
189
|
+
newValue.columnsList.length && (this.statisticsFlag = true)
|
|
193
190
|
|
|
194
191
|
// 获取每行字符的最大长度
|
|
195
|
-
const lengthObj = {}
|
|
192
|
+
const lengthObj = {}
|
|
196
193
|
newValue.errorList.map((item) => {
|
|
197
194
|
const keys = newValue.columnsList.map((i) => {
|
|
198
|
-
return i[
|
|
199
|
-
})
|
|
195
|
+
return i['prop']
|
|
196
|
+
})
|
|
200
197
|
keys.map((k, i) => {
|
|
201
198
|
if (item[k] && (!lengthObj[i] || lengthObj[i] < item[k].length)) {
|
|
202
|
-
lengthObj[i] = item[k].length
|
|
199
|
+
lengthObj[i] = item[k].length
|
|
203
200
|
}
|
|
204
|
-
})
|
|
205
|
-
})
|
|
201
|
+
})
|
|
202
|
+
})
|
|
206
203
|
|
|
207
204
|
// 更新column
|
|
208
205
|
this.columnsListTemp = newValue.columnsList.map((i, index) => {
|
|
209
|
-
console.log(
|
|
206
|
+
console.log('iiiiiii', i, i.errorList)
|
|
210
207
|
return {
|
|
211
208
|
...i,
|
|
212
209
|
width: 16 * lengthObj[index] + 60,
|
|
213
210
|
component: {
|
|
214
|
-
template: `<div v-html="scope.row['${i.prop}']"></div
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
})
|
|
211
|
+
template: `<div v-html="scope.row['${i.prop}']"></div>`
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
})
|
|
218
215
|
|
|
219
216
|
// 更新errorList的tableData
|
|
220
|
-
this.errorListTemp.length = 0
|
|
217
|
+
this.errorListTemp.length = 0
|
|
221
218
|
newValue.errorList.map((i) => {
|
|
222
|
-
const temp = {}
|
|
219
|
+
const temp = {}
|
|
223
220
|
Object.keys(i).map((k) => {
|
|
224
221
|
if (i.errorList && i.errorList.includes(k)) {
|
|
225
|
-
temp[
|
|
226
|
-
k
|
|
227
|
-
] = `<div class="nstc-g6-common-color-danger">${i[k]}</div>`;
|
|
222
|
+
temp[k] = `<div class="nstc-g6-common-color-danger">${i[k]}</div>`
|
|
228
223
|
} else {
|
|
229
|
-
temp[k] = i[k]
|
|
224
|
+
temp[k] = i[k]
|
|
230
225
|
}
|
|
231
|
-
})
|
|
232
|
-
this.errorListTemp.push(temp)
|
|
233
|
-
})
|
|
226
|
+
})
|
|
227
|
+
this.errorListTemp.push(temp)
|
|
228
|
+
})
|
|
234
229
|
|
|
235
|
-
console.log(this.errorListTemp, this.columnsListTemp)
|
|
230
|
+
console.log(this.errorListTemp, this.columnsListTemp)
|
|
236
231
|
|
|
237
232
|
this.successFlag =
|
|
238
|
-
|
|
239
|
-
|
|
233
|
+
this.validateResult.successNum !== 0 &&
|
|
234
|
+
this.validateResult.successNum === this.validateResult.totalNum
|
|
240
235
|
|
|
241
236
|
if (this.footerHandlers.confirm) {
|
|
242
|
-
this.footerHandlers.confirm.disabled = !this.successFlag
|
|
237
|
+
this.footerHandlers.confirm.disabled = !this.successFlag
|
|
243
238
|
}
|
|
244
239
|
|
|
245
|
-
this.confirmDisabledFlag = !this.successFlag
|
|
240
|
+
this.confirmDisabledFlag = !this.successFlag
|
|
246
241
|
|
|
247
242
|
// nstc-g6-common-color-danger
|
|
248
243
|
this.columnsList &&
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
244
|
+
this.columnsList.map((i) => {
|
|
245
|
+
console.log(i)
|
|
246
|
+
})
|
|
252
247
|
},
|
|
253
|
-
deep: true
|
|
254
|
-
}
|
|
248
|
+
deep: true
|
|
249
|
+
}
|
|
255
250
|
},
|
|
256
251
|
methods: {
|
|
257
252
|
cancel() {
|
|
258
|
-
this.handleConfirmImportExcel()
|
|
253
|
+
this.handleConfirmImportExcel()
|
|
259
254
|
},
|
|
260
255
|
async handleConfirmImportExcel() {
|
|
261
|
-
await this.handleConfirm(this.excelData)
|
|
256
|
+
await this.handleConfirm(this.excelData)
|
|
262
257
|
},
|
|
263
258
|
handleCommand(command) {
|
|
264
|
-
if (command ==
|
|
265
|
-
this.seletFile()
|
|
266
|
-
} else if (command ==
|
|
267
|
-
this.downloadTemplate()
|
|
259
|
+
if (command == 'a') {
|
|
260
|
+
this.seletFile()
|
|
261
|
+
} else if (command == 'b') {
|
|
262
|
+
this.downloadTemplate()
|
|
268
263
|
}
|
|
269
264
|
},
|
|
270
265
|
seletFile() {
|
|
271
|
-
let input = document.createElement(
|
|
272
|
-
let self = this
|
|
273
|
-
input.type =
|
|
274
|
-
input.accept =
|
|
275
|
-
input.addEventListener(
|
|
276
|
-
const files = event.target.files
|
|
277
|
-
const rawFile = files[0]
|
|
278
|
-
console.log(
|
|
279
|
-
self.fileName = rawFile.name
|
|
280
|
-
if (!rawFile) return
|
|
281
|
-
self.upload(rawFile)
|
|
282
|
-
this.value = null
|
|
283
|
-
})
|
|
284
|
-
input.click()
|
|
266
|
+
let input = document.createElement('input')
|
|
267
|
+
let self = this
|
|
268
|
+
input.type = 'file'
|
|
269
|
+
input.accept = '.xlsx, .xls, .csv'
|
|
270
|
+
input.addEventListener('change', function (event) {
|
|
271
|
+
const files = event.target.files
|
|
272
|
+
const rawFile = files[0] // only use files[0]
|
|
273
|
+
console.log('导入的文件:', rawFile)
|
|
274
|
+
self.fileName = rawFile.name
|
|
275
|
+
if (!rawFile) return
|
|
276
|
+
self.upload(rawFile)
|
|
277
|
+
this.value = null // fix can't select the same excel
|
|
278
|
+
})
|
|
279
|
+
input.click()
|
|
285
280
|
},
|
|
286
281
|
/*解析传入的表格 */
|
|
287
282
|
readerData(rawFile) {
|
|
288
|
-
this.loading = true
|
|
283
|
+
this.loading = true
|
|
289
284
|
return new Promise((resolve) => {
|
|
290
|
-
const reader = new FileReader()
|
|
285
|
+
const reader = new FileReader()
|
|
291
286
|
reader.onload = (e) => {
|
|
292
|
-
const data = e.target.result
|
|
287
|
+
const data = e.target.result
|
|
293
288
|
const workbook = XLSX.read(data, {
|
|
294
|
-
type:
|
|
295
|
-
cellDates: true
|
|
296
|
-
})
|
|
297
|
-
const firstSheetName = workbook.SheetNames[0]
|
|
298
|
-
const worksheet = workbook.Sheets[firstSheetName]
|
|
299
|
-
const header = this.getHeaderRow(worksheet)
|
|
300
|
-
const results = XLSX.utils.sheet_to_json(worksheet)
|
|
301
|
-
|
|
302
|
-
this.generateData({header, results})
|
|
303
|
-
this.loading = false
|
|
304
|
-
resolve()
|
|
305
|
-
}
|
|
306
|
-
reader.readAsArrayBuffer(rawFile)
|
|
307
|
-
})
|
|
289
|
+
type: 'array',
|
|
290
|
+
cellDates: true
|
|
291
|
+
})
|
|
292
|
+
const firstSheetName = workbook.SheetNames[0]
|
|
293
|
+
const worksheet = workbook.Sheets[firstSheetName]
|
|
294
|
+
const header = this.getHeaderRow(worksheet)
|
|
295
|
+
const results = XLSX.utils.sheet_to_json(worksheet)
|
|
296
|
+
|
|
297
|
+
this.generateData({ header, results })
|
|
298
|
+
this.loading = false
|
|
299
|
+
resolve()
|
|
300
|
+
}
|
|
301
|
+
reader.readAsArrayBuffer(rawFile)
|
|
302
|
+
})
|
|
308
303
|
},
|
|
309
|
-
generateData({header, results}) {
|
|
310
|
-
this.excelData.tableHeader = header
|
|
311
|
-
this.excelData.tableData = results
|
|
312
|
-
this.callback && this.callback(this.excelData)
|
|
304
|
+
generateData({ header, results }) {
|
|
305
|
+
this.excelData.tableHeader = header
|
|
306
|
+
this.excelData.tableData = results
|
|
307
|
+
this.callback && this.callback(this.excelData)
|
|
313
308
|
},
|
|
314
309
|
getHeaderRow(sheet) {
|
|
315
|
-
console.log(sheet)
|
|
316
|
-
const headers = []
|
|
317
|
-
const range = XLSX.utils.decode_range(sheet[
|
|
318
|
-
let C
|
|
319
|
-
const R = range.s.r
|
|
310
|
+
console.log(sheet)
|
|
311
|
+
const headers = []
|
|
312
|
+
const range = XLSX.utils.decode_range(sheet['!ref'])
|
|
313
|
+
let C
|
|
314
|
+
const R = range.s.r
|
|
320
315
|
/* start in the first row */
|
|
321
316
|
for (C = range.s.c; C <= range.e.c; ++C) {
|
|
322
317
|
/* walk every column in the range */
|
|
323
|
-
const cell = sheet[XLSX.utils.encode_cell({c: C, r: R})]
|
|
318
|
+
const cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })]
|
|
324
319
|
/* find the cell in the first row */
|
|
325
|
-
let hdr =
|
|
326
|
-
if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
|
|
327
|
-
headers.push(hdr)
|
|
320
|
+
let hdr = 'UNKNOWN ' + C // <-- replace with your desired default
|
|
321
|
+
if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
|
|
322
|
+
headers.push(hdr)
|
|
328
323
|
}
|
|
329
|
-
return headers
|
|
324
|
+
return headers
|
|
330
325
|
},
|
|
331
326
|
isExcel(file) {
|
|
332
|
-
return /\.(xlsx|xls|csv)$/.test(file.name)
|
|
327
|
+
return /\.(xlsx|xls|csv)$/.test(file.name)
|
|
333
328
|
},
|
|
334
329
|
/*上传文件 */
|
|
335
330
|
upload(rawFile) {
|
|
336
331
|
if (!this.beforeUpload) {
|
|
337
|
-
this.readerData(rawFile)
|
|
338
|
-
return
|
|
332
|
+
this.readerData(rawFile)
|
|
333
|
+
return
|
|
339
334
|
}
|
|
340
|
-
const before = this.beforeUpload(rawFile)
|
|
335
|
+
const before = this.beforeUpload(rawFile)
|
|
341
336
|
if (before) {
|
|
342
|
-
this.readerData(rawFile)
|
|
337
|
+
this.readerData(rawFile)
|
|
343
338
|
}
|
|
344
339
|
},
|
|
345
340
|
// 下载文件
|
|
346
341
|
downloadTemplate() {
|
|
347
342
|
// 前端下载
|
|
348
343
|
if (this.downConfig.isFrontDown) {
|
|
349
|
-
const aEl = document.createElement(
|
|
350
|
-
aEl.setAttribute(
|
|
351
|
-
aEl.target =
|
|
344
|
+
const aEl = document.createElement('a')
|
|
345
|
+
aEl.setAttribute('href', this.templateUrl)
|
|
346
|
+
aEl.target = '_blank'
|
|
352
347
|
// aEl.download = this.templateUrl
|
|
353
|
-
aEl.click()
|
|
348
|
+
aEl.click()
|
|
354
349
|
} else {
|
|
355
350
|
axios({
|
|
356
351
|
url: this.templateUrl,
|
|
357
|
-
method:
|
|
358
|
-
responseType:
|
|
352
|
+
method: 'get',
|
|
353
|
+
responseType: 'blob'
|
|
359
354
|
}).then((res) => {
|
|
360
|
-
const content = res
|
|
361
|
-
const blob = new Blob([content])
|
|
362
|
-
if (
|
|
363
|
-
const link = document.createElement(
|
|
364
|
-
link.download = this.downConfig.fileName
|
|
365
|
-
link.style.display =
|
|
366
|
-
link.href = URL.createObjectURL(blob)
|
|
367
|
-
document.body.appendChild(link)
|
|
368
|
-
link.click()
|
|
369
|
-
URL.revokeObjectURL(link.href)
|
|
370
|
-
document.body.removeChild(link)
|
|
355
|
+
const content = res
|
|
356
|
+
const blob = new Blob([content])
|
|
357
|
+
if ('download' in document.createElement('a')) {
|
|
358
|
+
const link = document.createElement('a')
|
|
359
|
+
link.download = this.downConfig.fileName
|
|
360
|
+
link.style.display = 'none'
|
|
361
|
+
link.href = URL.createObjectURL(blob)
|
|
362
|
+
document.body.appendChild(link)
|
|
363
|
+
link.click()
|
|
364
|
+
URL.revokeObjectURL(link.href)
|
|
365
|
+
document.body.removeChild(link)
|
|
371
366
|
} else {
|
|
372
|
-
navigator.msSaveBlob(blob, this.downConfig.fileName)
|
|
367
|
+
navigator.msSaveBlob(blob, this.downConfig.fileName)
|
|
373
368
|
}
|
|
374
|
-
})
|
|
369
|
+
})
|
|
375
370
|
}
|
|
376
371
|
},
|
|
377
372
|
//关闭弹窗
|
|
378
373
|
resetAction(flag) {
|
|
379
374
|
console.log(flag)
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
383
378
|
</script>
|
|
384
379
|
<style lang="scss" scoped>
|
|
385
380
|
.root-class {
|
|
@@ -402,7 +397,6 @@ export default {
|
|
|
402
397
|
border: none !important;
|
|
403
398
|
}
|
|
404
399
|
}
|
|
405
|
-
|
|
406
400
|
}
|
|
407
401
|
|
|
408
402
|
.select-in-dialog-result:hover {
|
|
@@ -431,7 +425,7 @@ export default {
|
|
|
431
425
|
.el-select .el-input.is-focus .el-input__inner,
|
|
432
426
|
.el-textarea__inner:focus {
|
|
433
427
|
box-shadow: 0 0 4px 0 #007aff;
|
|
434
|
-
border-color: #
|
|
428
|
+
border-color: #007aff;
|
|
435
429
|
}
|
|
436
430
|
|
|
437
431
|
.el-input {
|
|
@@ -769,8 +763,12 @@ export default {
|
|
|
769
763
|
}
|
|
770
764
|
|
|
771
765
|
.el-radio__inner:hover,
|
|
772
|
-
.el-input-number__decrease:hover:not(.is-disabled)
|
|
773
|
-
|
|
766
|
+
.el-input-number__decrease:hover:not(.is-disabled)
|
|
767
|
+
~ .el-input
|
|
768
|
+
.el-input__inner:not(.is-disabled),
|
|
769
|
+
.el-input-number__increase:hover:not(.is-disabled)
|
|
770
|
+
~ .el-input
|
|
771
|
+
.el-input__inner:not(.is-disabled),
|
|
774
772
|
.el-cascader .el-input.is-focus .el-input__inner {
|
|
775
773
|
border-color: #007aff;
|
|
776
774
|
}
|
|
@@ -829,7 +827,7 @@ export default {
|
|
|
829
827
|
}
|
|
830
828
|
|
|
831
829
|
cursor: pointer;
|
|
832
|
-
background: #
|
|
830
|
+
background: #f5f5f5;
|
|
833
831
|
}
|
|
834
832
|
|
|
835
833
|
// 滚动条样式
|
|
@@ -924,7 +922,7 @@ export default {
|
|
|
924
922
|
//修改上传input样式
|
|
925
923
|
.nstc-common-excel-import {
|
|
926
924
|
.placeholder-has-file {
|
|
927
|
-
color: #
|
|
925
|
+
color: #3d4a57 !important;
|
|
928
926
|
height: 22px;
|
|
929
927
|
line-height: 22px;
|
|
930
928
|
width: auto;
|
|
@@ -1014,7 +1012,9 @@ export default {
|
|
|
1014
1012
|
background-color: rgba(0, 122, 255, 0.1);
|
|
1015
1013
|
}
|
|
1016
1014
|
|
|
1017
|
-
.el-select-dropdown.is-multiple
|
|
1015
|
+
.el-select-dropdown.is-multiple
|
|
1016
|
+
.el-scrollbar__view
|
|
1017
|
+
.el-select-dropdown__item.selected.hover {
|
|
1018
1018
|
background-color: rgba(0, 122, 255, 0.1);
|
|
1019
1019
|
}
|
|
1020
1020
|
|
|
@@ -1027,7 +1027,6 @@ export default {
|
|
|
1027
1027
|
margin-left: 0;
|
|
1028
1028
|
}
|
|
1029
1029
|
|
|
1030
|
-
|
|
1031
1030
|
.el-button.nstc-g6-common-btn-size-s {
|
|
1032
1031
|
margin: 0 4px;
|
|
1033
1032
|
}
|
|
@@ -1046,7 +1045,6 @@ export default {
|
|
|
1046
1045
|
font-weight: normal;
|
|
1047
1046
|
}
|
|
1048
1047
|
|
|
1049
|
-
|
|
1050
1048
|
.el-button--default.nstc-g6-common-btn-1:not(.is-disabled):hover,
|
|
1051
1049
|
.el-button--default.nstc-g6-common-btn-1:not(.is-disabled):focus:hover {
|
|
1052
1050
|
border-color: #146be6 !important;
|
|
@@ -1054,21 +1052,21 @@ export default {
|
|
|
1054
1052
|
background-color: #fff !important;
|
|
1055
1053
|
}
|
|
1056
1054
|
|
|
1057
|
-
|
|
1058
1055
|
.el-input .el-input__inner:hover {
|
|
1059
|
-
border: 1px solid #
|
|
1056
|
+
border: 1px solid #007aff;
|
|
1060
1057
|
}
|
|
1061
1058
|
|
|
1062
1059
|
.el-select:hover .el-input .el-input__inner {
|
|
1063
|
-
border: 1px solid #
|
|
1060
|
+
border: 1px solid #007aff;
|
|
1064
1061
|
}
|
|
1065
1062
|
|
|
1066
|
-
.el-table th,
|
|
1063
|
+
.el-table th,
|
|
1064
|
+
.el-table td {
|
|
1067
1065
|
padding: 0;
|
|
1068
1066
|
height: 44px;
|
|
1069
1067
|
}
|
|
1070
1068
|
|
|
1071
|
-
.drop.el-popper[x-placement^=
|
|
1069
|
+
.drop.el-popper[x-placement^='bottom'] ::v-deep .popper__arrow {
|
|
1072
1070
|
display: none;
|
|
1073
1071
|
}
|
|
1074
1072
|
|
|
@@ -1144,7 +1142,7 @@ export default {
|
|
|
1144
1142
|
|
|
1145
1143
|
.import-process::after {
|
|
1146
1144
|
display: inline-block;
|
|
1147
|
-
content:
|
|
1145
|
+
content: '';
|
|
1148
1146
|
width: 283px;
|
|
1149
1147
|
height: 4px;
|
|
1150
1148
|
background: #48d2a0;
|