mirror of
https://github.com/dataease/dataease.git
synced 2026-06-13 01:01:20 +08:00
Merge pull request #9373 from ulleo/dev
feat(X-Pack): 数据填报Excel批量上传校验优化
This commit is contained in:
@@ -77,7 +77,12 @@ export default {
|
||||
name: this.$t('data_fill.form.email'),
|
||||
rules: [{ pattern: EMAIL_REGEX, message: this.$t('user.email_format_is_incorrect'), trigger: ['blur', 'change'] }]
|
||||
}
|
||||
]
|
||||
],
|
||||
pickerOptions: {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() < new Date(0).getTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
@@ -343,6 +348,7 @@ export default {
|
||||
:placeholder="item.settings.placeholder"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type === 'date' && item.settings.enableTime"
|
||||
@@ -353,6 +359,7 @@ export default {
|
||||
:placeholder="item.settings.placeholder"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type === 'dateRange' && !item.settings.enableTime"
|
||||
@@ -365,6 +372,7 @@ export default {
|
||||
:end-placeholder="item.settings.endPlaceholder"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-else-if="item.type === 'dateRange' && item.settings.enableTime"
|
||||
@@ -377,6 +385,7 @@ export default {
|
||||
:end-placeholder="item.settings.endPlaceholder"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
@@ -136,7 +136,8 @@
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<grid-table
|
||||
v-if="columns.length > 0"
|
||||
v-if="columns.length > 0 && dataTableShow"
|
||||
ref="dataTable"
|
||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||
style="width: 100%; height: 100%"
|
||||
border
|
||||
@@ -547,6 +548,7 @@ export default {
|
||||
Authorization: token,
|
||||
'Accept-Language': i18n.locale.replace('_', '-')
|
||||
},
|
||||
dataTableShow: true,
|
||||
fileList: [],
|
||||
uploading: false,
|
||||
operateName: '',
|
||||
@@ -642,6 +644,10 @@ export default {
|
||||
this.data = []
|
||||
this.records = []
|
||||
this.tasks = []
|
||||
this.dataTableShow = false
|
||||
this.$nextTick(() => {
|
||||
this.dataTableShow = true
|
||||
})
|
||||
}
|
||||
this.initTable(this.param.id)
|
||||
},
|
||||
@@ -731,6 +737,7 @@ export default {
|
||||
if (res.data) {
|
||||
this.paginationConfig.key = res.data.key
|
||||
this.paginationConfig.total = res.data.total
|
||||
this.paginationConfig.currentPage = res.data.currentPage
|
||||
const _data = []
|
||||
forEach(res.data.data, d => {
|
||||
const obj = {}
|
||||
@@ -911,7 +918,7 @@ export default {
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = 'test.xlsx' // 下载的文件名
|
||||
link.download = this.param.name + '.xlsx' // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
Reference in New Issue
Block a user