Merge branch 'dev' into pr@dev_dataset_source
This commit is contained in:
commit
15fb1516c8
2
.github/ISSUE_TEMPLATE/bug---.md
vendored
2
.github/ISSUE_TEMPLATE/bug---.md
vendored
@ -3,7 +3,7 @@ name: Bug 提交
|
||||
about: 提交产品缺陷帮助我们更好的改进
|
||||
title: "[Bug]"
|
||||
labels: 类型:bug
|
||||
assignees: BBchicken-9527, youliyuan-fit2cloud, zyyfit
|
||||
assignees: BBchicken-9527, zrfit
|
||||
|
||||
---
|
||||
|
||||
|
||||
@ -58,14 +58,14 @@ public class DataSetTableTaskController {
|
||||
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("查询")
|
||||
@PostMapping("list")
|
||||
public List<DatasetTableTask> list(@RequestBody DatasetTableTask datasetTableTask) {
|
||||
public List<DataSetTaskDTO> list(@RequestBody DatasetTableTask datasetTableTask) {
|
||||
return dataSetTableTaskService.list(datasetTableTask);
|
||||
}
|
||||
|
||||
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||
@ApiOperation("分页查询")
|
||||
@PostMapping("list/{goPage}/{pageSize}")
|
||||
public Pager<List<DatasetTableTask>> list(@RequestBody DatasetTableTask datasetTableTask, @PathVariable int goPage, @PathVariable int pageSize) {
|
||||
public Pager<List<DataSetTaskDTO>> list(@RequestBody DatasetTableTask datasetTableTask, @PathVariable int goPage, @PathVariable int pageSize) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, dataSetTableTaskService.list(datasetTableTask));
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import io.dataease.auth.entity.TokenInfo;
|
||||
import io.dataease.auth.service.AuthUserService;
|
||||
import io.dataease.auth.service.impl.AuthUserServiceImpl;
|
||||
import io.dataease.auth.util.JWTUtils;
|
||||
import io.dataease.commons.exception.DEException;
|
||||
import io.dataease.dto.PermissionProxy;
|
||||
import io.dataease.ext.ExtTaskMapper;
|
||||
import io.dataease.commons.utils.CommonBeanFactory;
|
||||
@ -214,13 +213,17 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
channels = Arrays.stream(recisetting.split(",")).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
List<String> errorMsgs = new ArrayList<>();
|
||||
for (int i = 0; i < channels.size(); i++) {
|
||||
String channel = channels.get(i);
|
||||
switch (channel) {
|
||||
case "email":
|
||||
if (StringUtils.isNotBlank(recipients))
|
||||
emailService.sendWithImageAndFiles(recipients, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
try {
|
||||
emailService.sendWithImageAndFiles(recipients, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
} catch (Exception e) {
|
||||
errorMsgs.add("email: " + e.getMessage());
|
||||
}
|
||||
break;
|
||||
case "wecom":
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportWecom()) {
|
||||
@ -233,14 +236,14 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getWecomId()))
|
||||
continue;
|
||||
wecomUsers.add(sysUserAssist.getLarkId());
|
||||
wecomUsers.add(sysUserAssist.getWecomId());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(wecomUsers)) {
|
||||
WecomXpackService wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class);
|
||||
WecomMsgResult wecomMsgResult = wecomXpackService.pushOaMsg(wecomUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (wecomMsgResult.getErrcode() != 0) {
|
||||
DEException.throwException(wecomMsgResult.getErrmsg());
|
||||
errorMsgs.add("wecom: " + wecomMsgResult.getErrmsg());
|
||||
}
|
||||
}
|
||||
|
||||
@ -257,14 +260,14 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getDingtalkId()))
|
||||
continue;
|
||||
dingTalkUsers.add(sysUserAssist.getLarkId());
|
||||
dingTalkUsers.add(sysUserAssist.getDingtalkId());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(dingTalkUsers)) {
|
||||
DingtalkXpackService dingtalkXpackService = SpringContextUtil.getBean(DingtalkXpackService.class);
|
||||
DingtalkMsgResult dingtalkMsgResult = dingtalkXpackService.pushOaMsg(dingTalkUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (dingtalkMsgResult.getErrcode() != 0) {
|
||||
DEException.throwException(dingtalkMsgResult.getErrmsg());
|
||||
errorMsgs.add("dingtalk: " + dingtalkMsgResult.getErrmsg());
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,7 +291,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
LarkXpackService larkXpackService = SpringContextUtil.getBean(LarkXpackService.class);
|
||||
LarkMsgResult larkMsgResult = larkXpackService.pushOaMsg(larkUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (larkMsgResult.getCode() != 0) {
|
||||
DEException.throwException(larkMsgResult.getMsg());
|
||||
errorMsgs.add("lark: " + larkMsgResult.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,6 +301,11 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(errorMsgs)) {
|
||||
String msg = errorMsgs.stream().collect(Collectors.joining(" \n "));
|
||||
Exception exception = new RuntimeException(msg);
|
||||
throw exception;
|
||||
}
|
||||
success(taskInstance);
|
||||
} catch (Exception e) {
|
||||
error(taskInstance, e);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package io.dataease.listener;
|
||||
|
||||
import io.dataease.commons.utils.LogUtil;
|
||||
import io.dataease.dto.dataset.DataSetTaskDTO;
|
||||
import io.dataease.plugins.common.base.domain.DatasetTableTask;
|
||||
import io.dataease.commons.constants.ScheduleType;
|
||||
import io.dataease.service.ScheduleService;
|
||||
@ -26,7 +27,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
|
||||
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
||||
LogUtil.info("================= Application start =================");
|
||||
// 项目启动,从数据库读取任务加入到Quartz
|
||||
List<DatasetTableTask> list = dataSetTableTaskService.list(new DatasetTableTask());
|
||||
List<DataSetTaskDTO> list = dataSetTableTaskService.list(new DatasetTableTask());
|
||||
for (DatasetTableTask task : list) {
|
||||
try {
|
||||
if (!StringUtils.equalsIgnoreCase(task.getRate(), ScheduleType.SIMPLE.toString())) {
|
||||
|
||||
@ -94,15 +94,14 @@ public class XLarkServer {
|
||||
if (!isOpen) {
|
||||
DEException.throwException("未开启飞书");
|
||||
}
|
||||
LarkUserInfo larkUserInfo = larkXpackService.userInfo(code, state);
|
||||
LarkUserInfo larkUserInfo = larkXpackService.userInfo(code, state, false);
|
||||
String username = larkUserInfo.getUser_id();
|
||||
String sub = larkUserInfo.getSub();
|
||||
SysUserEntity sysUserEntity = authUserService.getUserByLarkId(sub);
|
||||
SysUserEntity sysUserEntity = authUserService.getUserByLarkId(username);
|
||||
if (null == sysUserEntity) {
|
||||
String email = StringUtils.isNotBlank(larkUserInfo.getEmail()) ? larkUserInfo.getEmail() : (username + "@lark.work");
|
||||
sysUserService.validateExistUser(username, larkUserInfo.getName(), email);
|
||||
sysUserService.saveLarkCUser(larkUserInfo, email);
|
||||
sysUserEntity = authUserService.getUserByLarkId(sub);
|
||||
sysUserEntity = authUserService.getUserByLarkId(username);
|
||||
}
|
||||
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
|
||||
String realPwd = sysUserEntity.getPassword();
|
||||
@ -171,7 +170,7 @@ public class XLarkServer {
|
||||
DEException.throwException("未开启飞书");
|
||||
}
|
||||
larkXpackService = SpringContextUtil.getBean(LarkXpackService.class);
|
||||
LarkUserInfo larkUserInfo = larkXpackService.userInfo(code, state);
|
||||
LarkUserInfo larkUserInfo = larkXpackService.userInfo(code, state, true);
|
||||
String userId = larkUserInfo.getUser_id();
|
||||
|
||||
|
||||
|
||||
@ -360,7 +360,7 @@ public class ApiProvider extends Provider {
|
||||
|
||||
private List<String[]> fetchResult(String result, ApiDefinition apiDefinition) {
|
||||
List<String[]> dataList = new LinkedList<>();
|
||||
if (StringUtils.isNotEmpty(apiDefinition.getDataPath()) && CollectionUtils.isNotEmpty(apiDefinition.getJsonFields())) {
|
||||
if (StringUtils.isNotEmpty(apiDefinition.getDataPath()) && CollectionUtils.isEmpty(apiDefinition.getJsonFields())) {
|
||||
List<LinkedHashMap> datas = new ArrayList<>();
|
||||
Object object = JsonPath.read(result, apiDefinition.getDataPath());
|
||||
if (object instanceof List) {
|
||||
|
||||
@ -263,14 +263,19 @@ public class DataSetTableTaskService {
|
||||
datasetTableTaskMapper.updateByExampleSelective(datasetTableTask, datasetTableTaskExample);
|
||||
}
|
||||
|
||||
public List<DatasetTableTask> list(DatasetTableTask datasetTableTask) {
|
||||
DatasetTableTaskExample datasetTableTaskExample = new DatasetTableTaskExample();
|
||||
DatasetTableTaskExample.Criteria criteria = datasetTableTaskExample.createCriteria();
|
||||
if (datasetTableTask != null && StringUtils.isNotEmpty(datasetTableTask.getTableId())) {
|
||||
criteria.andTableIdEqualTo(datasetTableTask.getTableId());
|
||||
public List<DataSetTaskDTO> list(DatasetTableTask datasetTableTask) {
|
||||
BaseGridRequest request = new BaseGridRequest();
|
||||
List<ConditionEntity> conditionEntities = new ArrayList<>();
|
||||
if(datasetTableTask != null && StringUtils.isNotEmpty(datasetTableTask.getTableId())){
|
||||
ConditionEntity entity = new ConditionEntity();
|
||||
entity.setField("table_id");
|
||||
entity.setOperator("eq");
|
||||
entity.setValue(datasetTableTask.getTableId());
|
||||
conditionEntities.add(entity);
|
||||
}
|
||||
datasetTableTaskExample.setOrderByClause("create_time desc,name asc");
|
||||
return datasetTableTaskMapper.selectByExample(datasetTableTaskExample);
|
||||
request.setConditions(conditionEntities);
|
||||
GridExample gridExample = request.convertExample();
|
||||
return extDataSetTaskMapper.taskList(gridExample);
|
||||
}
|
||||
|
||||
public List<DataSetTaskDTO> taskList4User(BaseGridRequest request) {
|
||||
|
||||
@ -421,6 +421,7 @@ public class SysUserService {
|
||||
public int delete(Long userId) {
|
||||
extAuthService.clearUserResource(userId);
|
||||
deleteUserRoles(userId);
|
||||
sysUserAssistMapper.deleteByPrimaryKey(userId);
|
||||
return sysUserMapper.deleteByPrimaryKey(userId);
|
||||
}
|
||||
|
||||
|
||||
@ -209,3 +209,33 @@ RETURN oTemp;
|
||||
END
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
DROP FUNCTION IF EXISTS `GET_CHART_VIEW_COPY_NAME`;
|
||||
delimiter ;;
|
||||
CREATE FUNCTION `GET_CHART_VIEW_COPY_NAME`(chartId varchar(255),pid varchar(255))
|
||||
RETURNS varchar(255) CHARSET utf8mb4
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
|
||||
DECLARE chartName varchar(255);
|
||||
|
||||
DECLARE regexpInfo varchar(255);
|
||||
|
||||
DECLARE chartNameCount INTEGER;
|
||||
|
||||
select (case when `type`='richTextView' then 'RICH_TEXT_VIEW' else `name` end) into chartName from chart_view where id =chartId;
|
||||
/**
|
||||
因为名称存在()等特殊字符,所以不能直接用REGEXP进行查找
|
||||
1.用like 'chartName%' 过滤可能的数据项
|
||||
2.REPLACE(name,chartName,'') REGEXP '-copy\\(([0-9])+\\)$' 过滤去掉chartName后的字符以 -copy(/d) 结尾的数据
|
||||
3.(LENGTH(REPLACE(name,chartName,''))-LENGTH(replace(REPLACE(name,chartName,''),'-',''))=1) 确定只出现一次 ‘-’ 防止多次copy
|
||||
**/
|
||||
select (count(1)+1) into chartNameCount from chart_view
|
||||
where (LENGTH(REPLACE(name,chartName,''))-LENGTH(replace(REPLACE(name,chartName,''),'-',''))=1)
|
||||
and REPLACE(name,chartName,'') REGEXP '-copy\\(([0-9])+\\)$' and name like CONCAT(chartName,'%') and chart_view.scene_id=pid ;
|
||||
|
||||
RETURN concat(chartName,'-copy(',chartNameCount,')');
|
||||
|
||||
END
|
||||
;;
|
||||
delimiter ;
|
||||
|
||||
@ -17,7 +17,8 @@ export function execute(options) {
|
||||
url: options.url,
|
||||
method: options.type,
|
||||
loading: true,
|
||||
data: options.data
|
||||
data: options.data,
|
||||
hideMsg: options.hideMsg
|
||||
}
|
||||
if (options.responseType) {
|
||||
param.responseType = options.responseType
|
||||
|
||||
@ -241,6 +241,7 @@ export default {
|
||||
if (val) {
|
||||
this.ids = this._checkSum()
|
||||
this._emitFun()
|
||||
this.$emit('check', null, this.ids, null)
|
||||
return
|
||||
}
|
||||
this._selectClearFun()
|
||||
|
||||
@ -270,6 +270,9 @@ export default {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
margin-left: -20px;
|
||||
.ms-main-container {
|
||||
padding: 0px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.svg-background {
|
||||
|
||||
@ -911,6 +911,7 @@ export default {
|
||||
password_input_error: 'Original password input error'
|
||||
},
|
||||
chart: {
|
||||
map_center_lost: 'The graph is missing the centroid or center attribute, please complete it and try again',
|
||||
margin_model: 'Model',
|
||||
margin_model_auto: 'Auto',
|
||||
margin_model_absolute: 'Absolute',
|
||||
@ -1602,8 +1603,8 @@ export default {
|
||||
merge_msg: 'If the fields in the data table are consistent, merge them into one data set?',
|
||||
merge_title: 'Merge data',
|
||||
field_name_less_50: 'Field name can not more 50 chars.',
|
||||
excel_info_1: '1、Merged cells cannot exist in the file;',
|
||||
excel_info_2: '2、The first line of the file is the title line, which cannot be empty or date;',
|
||||
excel_info_1: '1、Merged cells cannot exist in the Excel file;',
|
||||
excel_info_2: '2、The first line of the Excel file is the title line, which cannot be empty or date;',
|
||||
excel_info_3: '3、The file size shall not exceed 500m。',
|
||||
sync_field: 'Sync Field',
|
||||
confirm_sync_field: 'Confirm Sync',
|
||||
|
||||
@ -911,6 +911,7 @@ export default {
|
||||
password_input_error: '原始密碼輸入錯誤'
|
||||
},
|
||||
chart: {
|
||||
map_center_lost: '圖形缺失中心點centroid或center屬性,請補全後再試',
|
||||
margin_model: '模式',
|
||||
margin_model_auto: '自動',
|
||||
margin_model_absolute: '絕對',
|
||||
@ -1602,8 +1603,8 @@ export default {
|
||||
merge_msg: '數據表中存在字段一致的情況,是否合並到一個數據集中?',
|
||||
merge_title: '合並數據',
|
||||
field_name_less_50: '字段名不能超過50個字符',
|
||||
excel_info_1: '1、文件終不能存在合併單元格;',
|
||||
excel_info_2: '2、文件的第一行為標題行,不能為空,不能為日期;',
|
||||
excel_info_1: '1、Excel 文件中不能存在合併單元格;',
|
||||
excel_info_2: '2、Excel 文件的第一行為標題行,不能為空,不能為日期;',
|
||||
excel_info_3: '3、文件不超過500M。',
|
||||
sync_field: '同步字段',
|
||||
confirm_sync_field: '確認同步',
|
||||
|
||||
@ -910,6 +910,7 @@ export default {
|
||||
password_input_error: '原始密码输入错误'
|
||||
},
|
||||
chart: {
|
||||
map_center_lost: '图形缺失中心点centroid或center属性,请补全后再试',
|
||||
margin_model: '模式',
|
||||
margin_model_auto: '自动',
|
||||
margin_model_absolute: '绝对',
|
||||
@ -1601,9 +1602,9 @@ export default {
|
||||
merge_msg: '数据表中存在字段一致的情况,是否合并到一个数据集中?',
|
||||
merge_title: '合并数据',
|
||||
field_name_less_50: '字段名不能超过50个字符',
|
||||
excel_info_1: '1、文件中不能存在合并单元格;',
|
||||
excel_info_2: '2、文件的第一行为标题行,不能为空,不能为日期型;',
|
||||
excel_info_3: '3、Excel文件大小请确保在500M以内。',
|
||||
excel_info_1: '1、Excel 文件中不能存在合并单元格;',
|
||||
excel_info_2: '2、Excel 文件的第一行为标题行,不能为空,不能为日期型;',
|
||||
excel_info_3: '3、文件大小请确保在500M以内。',
|
||||
sync_field: '同步字段',
|
||||
confirm_sync_field: '确认同步',
|
||||
confirm_sync_field_tips: '同步字段可能会导致已编辑字段发生变更,请确认',
|
||||
|
||||
@ -248,17 +248,19 @@ export function seniorCfg(chart_option, chart) {
|
||||
]
|
||||
if (senior.functionCfg.sliderBg) {
|
||||
chart_option.dataZoom[1].dataBackground = {
|
||||
lineStyle: { color: reverseColor(senior.functionCfg.sliderBg), opacity: 0.3 },
|
||||
areaStyle: { color: reverseColor(senior.functionCfg.sliderBg), opacity: 0.1 }
|
||||
lineStyle: { color: hexToRgba(senior.functionCfg.sliderBg, 0.5) },
|
||||
areaStyle: { color: hexToRgba(senior.functionCfg.sliderBg, 0.5) }
|
||||
}
|
||||
chart_option.dataZoom[1].borderColor = hexToRgba(senior.functionCfg.sliderBg, 0.3)
|
||||
}
|
||||
if (senior.functionCfg.sliderFillBg) {
|
||||
chart_option.dataZoom[1].selectedDataBackground = {
|
||||
lineStyle: { color: senior.functionCfg.sliderFillBg },
|
||||
areaStyle: { color: senior.functionCfg.sliderFillBg }
|
||||
}
|
||||
const rgba = hexToRgba(senior.functionCfg.sliderFillBg, 0.5)
|
||||
const rgba = hexToRgba(senior.functionCfg.sliderFillBg, 0.2)
|
||||
chart_option.dataZoom[1].fillerColor = rgba
|
||||
|
||||
}
|
||||
if (senior.functionCfg.sliderTextClolor) {
|
||||
chart_option.dataZoom[1].textStyle = { color: senior.functionCfg.sliderTextClolor }
|
||||
|
||||
@ -159,6 +159,16 @@ export default {
|
||||
},
|
||||
resize() {
|
||||
this.drawEcharts()
|
||||
},
|
||||
'themeStyle.color'(value, old) {
|
||||
if (value !== old) {
|
||||
this.preDraw()
|
||||
}
|
||||
},
|
||||
'themeStyle.commonBackground.color'(value, old) {
|
||||
if (value !== old) {
|
||||
this.preDraw()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@ -12,11 +12,11 @@
|
||||
@command="(type) => clickAddData(type)"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
<i @click.stop class="el-icon-plus"></i>
|
||||
<i class="el-icon-plus" @click.stop />
|
||||
</span>
|
||||
<el-dropdown-menu
|
||||
class="de-dataset-dropdown de-card-dropdown"
|
||||
slot="dropdown"
|
||||
class="de-dataset-dropdown de-card-dropdown"
|
||||
>
|
||||
<el-dropdown-item command="db">
|
||||
<svg-icon icon-class="ds-db" class="ds-icon-db" />
|
||||
@ -58,12 +58,12 @@
|
||||
class="main-area-input"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchType"
|
||||
slot="append"
|
||||
v-model="searchType"
|
||||
:placeholder="searchMap[searchType]"
|
||||
>
|
||||
<el-option :label="$t('commons.all')" value="all"></el-option>
|
||||
<el-option :label="$t('commons.folder')" value="folder"></el-option>
|
||||
<el-option :label="$t('commons.all')" value="all" />
|
||||
<el-option :label="$t('commons.folder')" value="folder" />
|
||||
</el-select>
|
||||
</el-input>
|
||||
</el-row>
|
||||
@ -71,7 +71,7 @@
|
||||
<div class="block">
|
||||
<div v-if="!tData.length && !treeLoading" class="no-tdata">
|
||||
{{ $t('deDataset.no_dataset_click') }}
|
||||
<span @click="() => clickAdd()" class="no-tdata-new">{{
|
||||
<span class="no-tdata-new" @click="() => clickAdd()">{{
|
||||
$t('deDataset.create')
|
||||
}}</span>
|
||||
</div>
|
||||
@ -105,8 +105,7 @@
|
||||
text-overflow: ellipsis;
|
||||
"
|
||||
:title="data.name"
|
||||
>{{ data.name }}</span
|
||||
>
|
||||
>{{ data.name }}</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="hasDataPermission('manage', data.privileges)"
|
||||
@ -119,11 +118,11 @@
|
||||
@command="(type) => clickAddData(type, data)"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
<i @click.stop class="el-icon-plus"></i>
|
||||
<i class="el-icon-plus" @click.stop />
|
||||
</span>
|
||||
<el-dropdown-menu
|
||||
class="de-dataset-dropdown de-card-dropdown"
|
||||
slot="dropdown"
|
||||
class="de-dataset-dropdown de-card-dropdown"
|
||||
>
|
||||
<el-dropdown-item command="db">
|
||||
<svg-icon icon-class="ds-db" class="ds-icon-db" />
|
||||
@ -165,11 +164,11 @@
|
||||
<span class="el-dropdown-link">
|
||||
<el-button icon="el-icon-more" type="text" size="small" />
|
||||
</span>
|
||||
<el-dropdown-menu class="de-card-dropdown" slot="dropdown">
|
||||
<el-dropdown-menu slot="dropdown" class="de-card-dropdown">
|
||||
<el-dropdown-item
|
||||
command="rename"
|
||||
>
|
||||
<svg-icon icon-class="de-ds-rename" />
|
||||
<svg-icon icon-class="de-ds-rename" />
|
||||
{{ $t('dataset.rename') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="move">
|
||||
@ -224,11 +223,17 @@
|
||||
/>
|
||||
</span>
|
||||
<span v-if="['db', 'sql'].includes(data.modelInnerType)">
|
||||
<span v-if="data.mode === 0" style="margin-left: 6px"
|
||||
><i class="el-icon-s-operation"
|
||||
<span
|
||||
v-if="data.mode === 0"
|
||||
style="margin-left: 6px"
|
||||
><i
|
||||
class="el-icon-s-operation"
|
||||
/></span>
|
||||
<span v-if="data.mode === 1" style="margin-left: 6px"
|
||||
><i class="el-icon-alarm-clock"
|
||||
<span
|
||||
v-if="data.mode === 1"
|
||||
style="margin-left: 6px"
|
||||
><i
|
||||
class="el-icon-alarm-clock"
|
||||
/></span>
|
||||
</span>
|
||||
<span
|
||||
@ -246,8 +251,7 @@
|
||||
}
|
||||
]"
|
||||
:title="data.name"
|
||||
>{{ data.name }}</span
|
||||
>
|
||||
>{{ data.name }}</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="hasDataPermission('manage', data.privileges)"
|
||||
@ -263,21 +267,21 @@
|
||||
<span class="el-dropdown-link">
|
||||
<el-button icon="el-icon-more" type="text" size="small" />
|
||||
</span>
|
||||
<el-dropdown-menu class="de-card-dropdown" slot="dropdown">
|
||||
<el-dropdown-menu slot="dropdown" class="de-card-dropdown">
|
||||
<el-dropdown-item
|
||||
command="editTable"
|
||||
>
|
||||
<svg-icon icon-class="de-ds-rename" />
|
||||
<svg-icon icon-class="de-ds-rename" />
|
||||
{{ $t('dataset.rename') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="moveDs">
|
||||
<svg-icon icon-class="de-ds-move" />
|
||||
<svg-icon icon-class="de-ds-move" />
|
||||
{{ $t('dataset.move_to') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="deleteTable"
|
||||
>
|
||||
<svg-icon icon-class="de-ds-trash" />
|
||||
<svg-icon icon-class="de-ds-trash" />
|
||||
{{ $t('dataset.delete') }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@ -305,13 +309,15 @@
|
||||
@keypress.enter.native="saveGroup(groupForm)"
|
||||
>
|
||||
<el-form-item :label="$t('deDataset.folder_name')" prop="name">
|
||||
<el-input placeholder="请输入文件夹名称" v-model="groupForm.name" />
|
||||
<el-input v-model.trim="groupForm.name" placeholder="请输入文件夹名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<deBtn secondary @click="close()">{{ $t('dataset.cancel') }}</deBtn>
|
||||
<deBtn type="primary" @click="saveGroup(groupForm)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
<deBtn
|
||||
type="primary"
|
||||
@click="saveGroup(groupForm)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</deBtn>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -339,23 +345,25 @@
|
||||
<deBtn secondary @click="closeTable()">{{
|
||||
$t('dataset.cancel')
|
||||
}}</deBtn>
|
||||
<deBtn type="primary" @click="saveTable(tableForm)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
<deBtn
|
||||
type="primary"
|
||||
@click="saveTable(tableForm)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</deBtn>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--移动分组-->
|
||||
<el-drawer
|
||||
v-closePress
|
||||
:title="moveDialogTitle"
|
||||
:visible.sync="moveGroup"
|
||||
custom-class="user-drawer sql-dataset-drawer"
|
||||
size="600px"
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<group-move-selector
|
||||
moveDir
|
||||
move-dir
|
||||
:item="groupForm"
|
||||
@targetGroup="targetGroup"
|
||||
/>
|
||||
@ -367,18 +375,18 @@
|
||||
:disabled="groupMoveConfirmDisabled"
|
||||
type="primary"
|
||||
@click="saveMoveGroup(tGroup)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</deBtn>
|
||||
</div>
|
||||
</el-drawer>
|
||||
|
||||
<!--移动数据集-->
|
||||
<el-drawer
|
||||
v-closePress
|
||||
:title="moveDialogTitle"
|
||||
:visible.sync="moveDs"
|
||||
custom-class="user-drawer sql-dataset-drawer"
|
||||
size="600px"
|
||||
v-closePress
|
||||
direction="rtl"
|
||||
>
|
||||
<group-move-selector :item="groupForm" @targetGroup="targetDs" />
|
||||
@ -390,7 +398,7 @@
|
||||
:disabled="dsMoveConfirmDisabled"
|
||||
type="primary"
|
||||
@click="saveMoveDs(tDs)"
|
||||
>{{ $t('dataset.confirm') }}
|
||||
>{{ $t('dataset.confirm') }}
|
||||
</deBtn>
|
||||
</div>
|
||||
</el-drawer>
|
||||
@ -431,7 +439,7 @@ export default {
|
||||
currentNodeId: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -526,7 +534,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hideCustomDs: function () {
|
||||
hideCustomDs: function() {
|
||||
return this.$store.getters.hideCustomDs
|
||||
}
|
||||
},
|
||||
@ -630,7 +638,7 @@ export default {
|
||||
this.groupForm.pid = param.id
|
||||
this.groupForm.level = param.level + 1
|
||||
},
|
||||
loadTree: _.debounce(function () {
|
||||
loadTree: _.debounce(function() {
|
||||
this.searchPids = []
|
||||
this.$refs.datasetTreeRef.filter(this.filterText)
|
||||
}, 600),
|
||||
@ -877,7 +885,6 @@ export default {
|
||||
sceneId: param.id
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
addData(name) {
|
||||
this.$emit('switchComponent', { name: name, param: this.currGroup })
|
||||
@ -1180,4 +1187,4 @@ export default {
|
||||
border-top: 1px solid rgba(31, 35, 41, 0.15);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -228,7 +228,6 @@ export default {
|
||||
},
|
||||
showTitleChange(value) {
|
||||
if (!value) {
|
||||
this.attrs.title = ''
|
||||
this.element.style.backgroundColor = ''
|
||||
}
|
||||
this.fillAttrs2Filter()
|
||||
|
||||
@ -87,9 +87,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadFields() {
|
||||
fieldListWithPermission(this.firstTableId).then(res => {
|
||||
this.tableFields = JSON.parse(JSON.stringify(res.data))
|
||||
})
|
||||
if (this.firstTableId) {
|
||||
fieldListWithPermission(this.firstTableId).then(res => {
|
||||
this.tableFields = JSON.parse(JSON.stringify(res.data))
|
||||
})
|
||||
} else {
|
||||
this.tableFields = []
|
||||
}
|
||||
},
|
||||
onMove(e, originalEvent) {
|
||||
return true
|
||||
|
||||
@ -343,14 +343,16 @@ export default {
|
||||
},
|
||||
onSimpleCronChange() {
|
||||
if (this.formInline.dsCheckIntervalType === 'minute') {
|
||||
if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 59) {
|
||||
const pattern = '^([1-9]|[1-5][0-9])$'
|
||||
if (!new RegExp(pattern).test(this.formInline.dsCheckInterval)) {
|
||||
this.$message({ message: this.$t('cron.minute_limit'), type: 'warning', showClose: true })
|
||||
this.formInline.dsCheckInterval = 1
|
||||
}
|
||||
return
|
||||
}
|
||||
if (this.formInline.dsCheckIntervalType === 'hour') {
|
||||
if (this.formInline.dsCheckInterval < 1 || this.formInline.dsCheckInterval > 23) {
|
||||
const pattern = '^([1-9]|[1-2][0-3])$'
|
||||
if (!new RegExp(pattern).test(this.formInline.dsCheckInterval)) {
|
||||
this.$message({ message: this.$t('cron.hour_limit'), type: 'warning', showClose: true })
|
||||
this.formInline.dsCheckInterval = 1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user