提交 c29875ff authored 作者: taojinlong's avatar taojinlong

feat: 替换excel时,提示信息

上级 199e4914
......@@ -1248,7 +1248,8 @@ export default {
pending: 'Pause',
exec: 'Execute Once',
confirm_exec: 'Manual trigger execution?',
change_success: 'State switch successful'
change_success: 'State switch successful',
excel_replace_msg: 'Calculation fields, custom datasets, associated datasets, dashboards, etc. may be affected. Confirm the replacement?'
},
field_group_type: 'Type',
location: 'Location',
......
......@@ -1248,7 +1248,8 @@ export default {
pending: '暫停',
exec: '執行一次',
confirm_exec: '手動觸發執行?',
change_success: '狀態切換成功'
change_success: '狀態切換成功',
excel_replace_msg: '可能會影響計算欄位、自定義數据集、關聯數据集、儀錶板等,確認替換?'
},
field_group_type: '分類',
location: '地理位置',
......
......@@ -1249,7 +1249,8 @@ export default {
pending: '暂停',
exec: '执行一次',
confirm_exec: '手动触发执行?',
change_success: '状态切换成功'
change_success: '状态切换成功',
excel_replace_msg: '可能会影响计算字段、自定义数据集、关联数据集、仪表板等,确认替换?'
},
field_group_type: '分类',
location: '地理位置',
......
......@@ -153,7 +153,7 @@
import { post } from '@/api/dataset/dataset'
import { getToken } from '@/utils/auth'
import i18n from '@/lang'
import {$alert} from "@/utils/message";
import {$alert, $confirm} from "@/utils/message";
import store from "@/store";
const token = getToken()
......@@ -366,8 +366,17 @@ export default {
editType: this.param.editType ? this.param.editType : 0
}
}
if (this.param.editType === 0 && this.param.tableId) {
$confirm(i18n.t('dataset.repeat_datasource_msg'), () => {
this.saveExcelData(sheetFileMd5, table)
})
}else {
this.saveExcelData(sheetFileMd5, table)
}
},
saveExcelData(sheetFileMd5, table) {
if (new Set(sheetFileMd5).size !== sheetFileMd5.length && !this.param.tableId) {
this.$confirm(this.$t('dataset.merge_msg'), this.$t('dataset.merge_title'), {
this.$confirm(this.$t('dataset.excel_replace_msg'), this.$t('dataset.merge_title'), {
distinguishCancelAndClose: true,
confirmButtonText: this.$t('dataset.merge'),
cancelButtonText: this.$t('dataset.no_merge'),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论