Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangjiahao 2022-05-25 10:54:16 +08:00
commit 73a9a0bd05
5 changed files with 23 additions and 7 deletions

View File

@ -9,6 +9,7 @@ import io.dataease.commons.utils.LogUtil;
import io.dataease.listener.util.CacheUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
@ -25,6 +26,10 @@ public class AboutService {
@Resource
private DefaultLicenseService defaultLicenseService;
@Value("${version}")
private String version;
public F2CLicenseResponse updateLicense(String licenseKey) {
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.updateLicense(product, licenseKey);
Optional.ofNullable(f2CLicenseResponse).ifPresent(resp -> {
@ -62,8 +67,7 @@ public class AboutService {
return version;
}
}
String property = CommonBeanFactory.getBean(Environment.class).getProperty("cmp.version");
return Optional.ofNullable(property).orElse("V1.0");
return Optional.ofNullable(version).orElse("V1.0");
} catch (Exception e) {
LogUtil.error("failed to get build version.", e);
}

View File

@ -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',

View File

@ -1248,7 +1248,8 @@ export default {
pending: '暫停',
exec: '執行一次',
confirm_exec: '手動觸發執行?',
change_success: '狀態切換成功'
change_success: '狀態切換成功',
excel_replace_msg: '可能會影響計算欄位、自定義數据集、關聯數据集、儀錶板等,確認替換?'
},
field_group_type: '分類',
location: '地理位置',

View File

@ -1249,7 +1249,8 @@ export default {
pending: '暂停',
exec: '执行一次',
confirm_exec: '手动触发执行?',
change_success: '状态切换成功'
change_success: '状态切换成功',
excel_replace_msg: '可能会影响计算字段、自定义数据集、关联数据集、仪表板等,确认替换?'
},
field_group_type: '分类',
location: '地理位置',

View File

@ -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'),