From 844adb3a80b39f9a78dae89a6a27f19e58a931df Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 09 一月 2024 10:34:58 +0800
Subject: [PATCH] 1.图片预览地址配置
---
src/views/systemSetting/dataImport.vue | 86 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 79 insertions(+), 7 deletions(-)
diff --git a/src/views/systemSetting/dataImport.vue b/src/views/systemSetting/dataImport.vue
index 3285bcb..c4c8aa5 100644
--- a/src/views/systemSetting/dataImport.vue
+++ b/src/views/systemSetting/dataImport.vue
@@ -144,7 +144,10 @@
item.indexOf('淇濆吇閮ㄤ綅瑕佹眰')!==-1||
item.indexOf('淇濆吇椤圭洰瑕佹眰')!==-1||
item.indexOf('鐐规閮ㄤ綅瑕佹眰')!==-1||
- item.indexOf('鐐规椤圭洰瑕佹眰')!==-1
+ item.indexOf('鐐规椤圭洰瑕佹眰')!==-1||
+
+ item.indexOf('浠撳簱缂栫爜')!==-1||
+ item.indexOf('搴撲綅缂栫爜')!==-1
"
>
<el-input v-model="row[item]" placeholder="璇疯緭鍏�" />
@@ -346,7 +349,7 @@
v-el-drag-dialog
title="澶辫触鍘熷洜"
:visible.sync="dialogVisible"
- width="1000px"
+ width="1300px"
:close-on-click-modal="false"
top="15vh"
@closed="handleClose"
@@ -374,7 +377,7 @@
<el-table-column
prop="ErrorField"
label="閿欒瀛楁"
- width="160"
+ width="200"
show-overflow-tooltip
/>
<el-table-column
@@ -549,6 +552,17 @@
})
}
+ if (this.sheetName.indexOf('搴撲綅璁剧疆') !== -1) {
+ this.statusArr = [
+ { code: '0', name: '姝e父' },
+ { code: '1', name: '鍋滅敤' }
+ ]
+ this.tableData[0].forEach(j => {
+ j['*鐘舵��'] = j['*鐘舵��'] ? this.statusArr.find(e => e.name === j['*鐘舵��']).code : ''
+ j.uuid = nanoid()
+ })
+ }
+
if (this.sheetName.indexOf('瀛樿揣鍒嗙被') !== -1) {
this.statusArr = [
{ code: '0', name: '姝e父' },
@@ -667,7 +681,26 @@
})
}
- //
+ if (this.sheetName.indexOf('璁惧淇濆吇鏍囧噯') !== -1) {
+ this.isYesOrNo = [
+ { code: 'Y', name: 'Y' },
+ { code: 'N', name: 'N' }
+ ]
+ this.cycleArr = [
+ { code: '骞�', name: '骞�' },
+ { code: '瀛�', name: '瀛�' },
+ { code: '鏈�', name: '鏈�' },
+ { code: '鍛�', name: '鍛�' }
+ ]
+ this.tableData[0].forEach(j => {
+ j.uuid = nanoid()
+ })
+ this.tableData[1].forEach(j => {
+ j.uuid = nanoid()
+ })
+ }
+
+ //
},
// 鎻愪氦
submit() {
@@ -809,6 +842,9 @@
return this.$message.info(res.message)
}
}
+
+ // 鏁版嵁鎻愪氦鍓嶅幓闄ょ┖鏍兼柟娉�
+ // this.tableDataTrim()
const data = {
fileCode: this.excelCode,
@@ -1391,6 +1427,14 @@
flag = false
msg = '*鐘舵�佷笉鑳戒负绌猴紒'
}
+ if (!j['*浠撳簱缂栫爜']) {
+ flag = false
+ msg = '*浠撳簱缂栫爜涓嶈兘涓虹┖锛�'
+ }
+ if (!j['*搴撲綅缂栫爜']) {
+ flag = false
+ msg = '*搴撲綅缂栫爜涓嶈兘涓虹┖锛�'
+ }
})
this.tableData[1].forEach(j => {
if (!j['妯″叿缂栫爜'] && j['浜у搧缂栫爜']) {
@@ -1959,8 +2003,11 @@
'*妯″叿鍚嶇О': '',
'瑙勬牸鍨嬪彿': '',
'*鐘舵��': 'Y',
+ '*浠撳簱缂栫爜': '',
+ '*搴撲綅缂栫爜': '',
'棰勮瀵垮懡(娆�)': '',
'鍓╀綑瀵垮懡(娆�)': ''
+
})
}
if (this.sheetName.indexOf('妯″叿鍏宠仈浜у搧') !== -1 && this.activeName === '1') {
@@ -2099,7 +2146,7 @@
})
}
- //
+ //
},
delRow(row) {
// 閽堝鍗晄heet
@@ -2149,7 +2196,9 @@
// 妯℃澘涓嬭浇
async getExcel() {
const res = await DownLoadExcel({ FileCode: this.excelCode })
- window.location.href = res.data
+ if (res.code === '200') {
+ window.location.href = res.data
+ }
},
async getSelectArr() {
await this.getPrentOrganization()
@@ -2222,6 +2271,29 @@
h('span', { style: 'color:#FFF' }, column.label)
]
}
+ },
+ // 鏁版嵁鎻愪氦鍓嶅幓闄ょ┖鏍兼柟娉�
+ tableDataTrim() {
+ if (this.tableData.length === 1) { // 涓�涓猻heet
+ this.tableData[0].forEach(i => {
+ for (const j in i) {
+ i[j] = i[j].trim()
+ }
+ })
+ }
+
+ if (this.tableData.length === 2) { // 涓や釜sheet
+ this.tableData[0].forEach(i => {
+ for (const j in i) {
+ i[j] = i[j].trim()
+ }
+ })
+ this.tableData[1].forEach(i => {
+ for (const j in i) {
+ i[j] = i[j].trim()
+ }
+ })
+ }
}
}
@@ -2230,7 +2302,7 @@
<style lang="scss">
::v-deep .el-dialog__body {
- padding: 20px 20px !important;
+ padding: 10px 10px !important;
}
</style>
--
Gitblit v1.9.3