Merge branch 'dev' into pr@dev@dataset

This commit is contained in:
taojinlong 2022-09-28 16:19:00 +08:00 committed by GitHub
commit 83c296b3f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 378 additions and 359 deletions

View File

@ -258,7 +258,7 @@ public class SysUserController {
}
@PostMapping("/unbindAssist/{type}")
public void unbindAssist(String type) {
public void unbindAssist(@PathVariable("type") String type) {
Boolean valid = StringUtils.equals(WECOM, type) || StringUtils.equals(DINGTALK, type) || StringUtils.equals(LARK, type);
if (!valid) {
@ -275,6 +275,9 @@ public class SysUserController {
if (StringUtils.equals(LARK, type)) {
sysUserAssist.setLarkId(null);
}
if (StringUtils.isBlank(sysUserAssist.getWecomId()) && StringUtils.isBlank(sysUserAssist.getDingtalkId()) && StringUtils.isBlank(sysUserAssist.getLarkId())) {
sysUserService.changeUserFrom(userId, 0);
}
sysUserService.saveAssist(userId, sysUserAssist.getWecomId(), sysUserAssist.getDingtalkId(), sysUserAssist.getLarkId());
}

View File

@ -109,7 +109,7 @@
<select id="findWecomUser" resultMap="baseMap">
select
user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
u.user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
from
sys_user_assist a
left join
@ -119,7 +119,7 @@
<select id="findDingtalkUser" resultMap="baseMap">
select
user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
u.user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
from
sys_user_assist a
left join
@ -129,7 +129,7 @@
<select id="findLarkUser" resultMap="baseMap">
select
user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
u.user_id, username,nick_name, dept_id, password, enabled,email, phone, language ,is_admin, `from`
from
sys_user_assist a
left join

View File

@ -150,7 +150,7 @@ public class XDingtalkServer {
public void bind(@RequestParam("code") String code, @RequestParam("state") String state) {
HttpServletResponse response = ServletUtils.response();
String url = "/#personal";
String url = "/#person-info/index";
DingtalkXpackService dingtalkXpackService = null;
@ -159,10 +159,12 @@ public class XDingtalkServer {
SysUserEntity userEntity = authUserService.getUserById(Long.parseLong(state));
if (ObjectUtils.isEmpty(userEntity)) {
bindError(response, url, "绑定用户不存在");
return;
}
SysUserAssist sysUserAssist = sysUserService.assistInfo(Long.parseLong(state));
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getWecomId())) {
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getDingtalkId())) {
bindError(response, url, "目标用户已绑定其他钉钉账号");
return;
}
Boolean isOpen = authUserService.supportDingtalk();
if (!isOpen) {
@ -177,6 +179,7 @@ public class XDingtalkServer {
SysUserEntity sysUserEntity = authUserService.getUserByDingtalkId(userId);
if (null != sysUserEntity) {
bindError(response, url, "当前钉钉账号已绑定其他DE用户");
return;
}
if (ObjectUtils.isEmpty(sysUserAssist)) {
sysUserAssist = new SysUserAssist();

View File

@ -151,17 +151,19 @@ public class XLarkServer {
public void bind(@RequestParam("code") String code, @RequestParam("state") String state) {
HttpServletResponse response = ServletUtils.response();
String url = "/#personal";
String url = "/#person-info/index";
LarkXpackService larkXpackService = null;
try {
SysUserEntity userEntity = authUserService.getUserById(Long.parseLong(state));
if (ObjectUtils.isEmpty(userEntity)) {
bindError(response, url, "绑定用户不存在");
return;
}
SysUserAssist sysUserAssist = sysUserService.assistInfo(Long.parseLong(state));
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getWecomId())) {
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getLarkId())) {
bindError(response, url, "目标用户已绑定其他飞书账号");
return;
}
Boolean isOpen = authUserService.supportLark();
@ -176,6 +178,7 @@ public class XLarkServer {
SysUserEntity sysUserEntity = authUserService.getUserByLarkId(userId);
if (null != sysUserEntity) {
bindError(response, url, "当前飞书账号已绑定其他DE用户");
return;
}
if (ObjectUtils.isEmpty(sysUserAssist)) {

View File

@ -156,7 +156,7 @@ public class XWecomServer {
@GetMapping("/bind")
public void bind(@RequestParam("code") String code, @RequestParam("state") String state) {
String url = "/#personal";
String url = "/#person-info/index";
HttpServletResponse response = ServletUtils.response();
WecomXpackService wecomXpackService = null;
@ -165,15 +165,18 @@ public class XWecomServer {
SysUserEntity userEntity = authUserService.getUserById(Long.parseLong(state));
if (ObjectUtils.isEmpty(userEntity)) {
bindError(response, url, "绑定用户不存在");
return;
}
SysUserAssist sysUserAssist = sysUserService.assistInfo(Long.parseLong(state));
if (ObjectUtils.isNotEmpty(sysUserAssist) && StringUtils.isNotBlank(sysUserAssist.getWecomId())) {
bindError(response, url, "目标用户已绑定其他企业微信账号");
return;
}
Boolean supportWecom = authUserService.supportWecom();
if (!supportWecom) {
DEException.throwException("未开启企业微信");
return;
}
wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class);
WecomAuthResult authResult = wecomXpackService.auth(code);
@ -183,6 +186,7 @@ public class XWecomServer {
SysUserEntity sysUserEntity = authUserService.getUserByWecomId(userId);
if (null != sysUserEntity) {
bindError(response, url, "当前企业微信账号已绑定其他DE用户");
return;
}
if (ObjectUtils.isEmpty(sysUserAssist)) {
sysUserAssist = new SysUserAssist();

View File

@ -647,6 +647,12 @@ public class ChartViewService {
xAxis = xAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || dataeaseNames.contains(item.getDataeaseName())).collect(Collectors.toList());
yAxis = yAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || dataeaseNames.contains(item.getDataeaseName())).collect(Collectors.toList());
break;
case "bar-group":
xAxis = xAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());
yAxis = yAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());
xAxisBase = xAxisBase.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());
xAxisExt = xAxisExt.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());
break;
default:
xAxis = xAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());
yAxis = yAxis.stream().filter(item -> StringUtils.isNotEmpty(item.getChartId()) || (!desensitizationList.contains(item.getDataeaseName()) && dataeaseNames.contains(item.getDataeaseName()))).collect(Collectors.toList());

View File

@ -529,7 +529,7 @@ public class SysUserService {
public boolean needPwdNoti(Long userId) {
SysUserAssist userAssist = sysUserAssistMapper.selectByPrimaryKey(userId);
return ObjectUtils.isEmpty(userAssist) || userAssist.getNeedFirstNoti();
return ObjectUtils.isEmpty(userAssist) || ObjectUtils.isEmpty(userAssist.getNeedFirstNoti()) || userAssist.getNeedFirstNoti();
}
public void saveUserAssist(Boolean noti) {
@ -567,4 +567,11 @@ public class SysUserService {
return sysUserAssistMapper.selectByPrimaryKey(userId);
}
public void changeUserFrom(Long userId, Integer from) {
SysUser sysUser = new SysUser();
sysUser.setUserId(userId);
sysUser.setFrom(from);
sysUserMapper.updateByPrimaryKeySelective(sysUser);
}
}

View File

@ -126,7 +126,7 @@ INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_typ
INSERT INTO `sys_auth_detail` (`id`, `auth_id`, `privilege_name`, `privilege_type`, `privilege_value`, `privilege_extend`, `remark`, `create_user`, `create_time`, `update_time`, `copy_from`, `copy_id`) VALUES ('d55c4d88-3b0a-11ed-8009-0242ac130005', '379c3124-7a30-4c1b-8ae4-de23eaf34b71', 'i18n_auth_use', 1, 1, 'use', '基础权限-使用', 'admin', 1663915323000, NULL, NULL, NULL);
INSERT INTO `sys_auth` (`id`, `auth_source`, `auth_source_type`, `auth_target`, `auth_target_type`, `auth_time`, `auth_details`, `auth_user`, `update_time`, `copy_from`, `copy_id`) VALUES ('379c3124-7a30-4c1b-8ae4-de23eaf34b71', 'bdfcc324-1181-46a6-b681-a453517c4ffa', 'dataset', '2', 'user', 1663915323123, NULL, 'admin', NULL, NULL, NULL);
DELETE from `sys_menu` where `menu_id` = 50;

View File

@ -83,10 +83,14 @@ export default {
},
computed: {
linkJumpSetShow() {
return this.curComponent.type === 'view' && !this.jumpExcludeViewType.includes(this.curComponent.propValue.innerType)
return this.curComponent.type === 'view'
&& !this.jumpExcludeViewType.includes(this.curComponent.propValue.innerType)
&& !(this.curComponent.propValue.innerType.includes('table') && this.curComponent.propValue.render === 'echarts')
},
linkageSettingShow() {
return this.curComponent.type === 'view' && !this.linkageExcludeViewType.includes(this.curComponent.propValue.innerType)
return this.curComponent.type === 'view'
&& !this.linkageExcludeViewType.includes(this.curComponent.propValue.innerType)
&& !(this.curComponent.propValue.innerType.includes('table') && this.curComponent.propValue.render === 'echarts')
},
panelInfo() {
return this.$store.state.panel.panelInfo

View File

@ -193,6 +193,7 @@ export default {
])
},
created() {
eventBus.$on('editPanelInitReady', this.editPanelInit)
eventBus.$on('preview', this.preview)
eventBus.$on('save', this.save)
eventBus.$on('clearCanvas', this.clearCanvas)
@ -205,10 +206,14 @@ export default {
eventBus.$off('preview', this.preview)
eventBus.$off('save', this.save)
eventBus.$off('clearCanvas', this.clearCanvas)
eventBus.$off('editPanelInitReady', this.editPanelInit)
clearInterval(this.timer)
this.timer = null
},
methods: {
editPanelInit(){
this.showGridSwitch = this.canvasStyleData.aidedDesign.showGrid
},
close() {
//
this.$store.commit('initCanvasBase')

View File

@ -680,6 +680,7 @@ export default {
}
}
Vue.set(this.element.propValue, 'innerType', chartDetails.type)
Vue.set(this.element.propValue, 'render', chartDetails.render)
if (chartDetails.type === 'richTextView') {
this.$nextTick(() => {
bus.$emit('initCurFields-' + this.element.id)

View File

@ -1,6 +1,7 @@
import { sin, cos } from '@/components/canvas/utils/translate'
import store from '@/store'
import Vue from 'vue'
export const LIGHT_THEME_COLOR_MAIN = '#000000'
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5'
@ -35,6 +36,9 @@ export function getStyle(style, filter = []) {
if (key === 'backgroundColor') {
result[key] = colorRgb(style[key], style.opacity)
}
if (key === 'fontSize' && result[key] < 12) {
result[key] = 12
}
if (needUnit.includes(key)) {
result[key] += 'px'
}

View File

@ -1,4 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.83301 1.33301C5.10915 1.33301 5.33301 1.55687 5.33301 1.83301V1.99967H10.6663V1.83301C10.6663 1.55687 10.8902 1.33301 11.1663 1.33301H11.4997C11.7758 1.33301 11.9997 1.55687 11.9997 1.83301V1.99967H13.9997C14.3679 1.99967 14.6663 2.29815 14.6663 2.66634V13.9997C14.6663 14.3679 14.3679 14.6663 13.9997 14.6663H1.99967C1.63148 14.6663 1.33301 14.3679 1.33301 13.9997L1.33301 2.66634C1.33301 2.29815 1.63148 1.99967 1.99967 1.99967H3.99967V1.83301C3.99967 1.55687 4.22353 1.33301 4.49967 1.33301H4.83301ZM10.6663 3.33301H5.33301V3.49967C5.33301 3.77582 5.10915 3.99967 4.83301 3.99967H4.49967C4.22353 3.99967 3.99967 3.77582 3.99967 3.49967V3.33301H2.66634V13.333H13.333V3.33301H11.9997V3.49967C11.9997 3.77582 11.7758 3.99967 11.4997 3.99967H11.1663C10.8902 3.99967 10.6663 3.77582 10.6663 3.49967V3.33301ZM5.99967 6.83301C5.99967 6.55687 5.77582 6.33301 5.49967 6.33301H4.49967C4.22353 6.33301 3.99967 6.55687 3.99967 6.83301V7.83301C3.99967 8.10915 4.22353 8.33301 4.49967 8.33301H5.49967C5.77582 8.33301 5.99967 8.10915 5.99967 7.83301V6.83301ZM6.99967 6.83301C6.99967 6.55687 7.22353 6.33301 7.49967 6.33301H8.49967C8.77582 6.33301 8.99967 6.55687 8.99967 6.83301V7.83301C8.99967 8.10915 8.77582 8.33301 8.49967 8.33301H7.49967C7.22353 8.33301 6.99967 8.10915 6.99967 7.83301V6.83301ZM5.99967 9.83301C5.99967 9.55687 5.77582 9.33301 5.49967 9.33301H4.49967C4.22353 9.33301 3.99967 9.55687 3.99967 9.83301V10.833C3.99967 11.1092 4.22353 11.333 4.49967 11.333H5.49967C5.77582 11.333 5.99967 11.1092 5.99967 10.833V9.83301ZM6.99967 9.83301C6.99967 9.55687 7.22353 9.33301 7.49967 9.33301H8.49967C8.77582 9.33301 8.99967 9.55687 8.99967 9.83301V10.833C8.99967 11.1092 8.77582 11.333 8.49967 11.333H7.49967C7.22353 11.333 6.99967 11.1092 6.99967 10.833V9.83301ZM11.9997 6.83301C11.9997 6.55687 11.7758 6.33301 11.4997 6.33301H10.4997C10.2235 6.33301 9.99967 6.55687 9.99967 6.83301V7.83301C9.99967 8.10915 10.2235 8.33301 10.4997 8.33301H11.4997C11.7758 8.33301 11.9997 8.10915 11.9997 7.83301V6.83301Z" fill="#3370FF"/>
<path d="M11.9997 9.83301C11.9997 9.55687 11.7758 9.33301 11.4997 9.33301H10.4997C10.2235 9.33301 9.99967 9.55687 9.99967 9.83301V10.833C9.99967 11.1092 10.2235 11.333 10.4997 11.333H11.4997C11.7758 11.333 11.9997 11.1092 11.9997 10.833V9.83301Z" fill="#3370FF"/>
</svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1664337058571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1356" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M309.312 85.312a32 32 0 0 1 32 32V128h341.312v-10.688a32 32 0 0 1 32-32h21.376a32 32 0 0 1 32 32V128h128c23.552 0 42.624 19.072 42.624 42.624V896a42.688 42.688 0 0 1-42.624 42.624H128A42.688 42.688 0 0 1 85.312 896V170.624C85.312 147.072 104.384 128 128 128h128v-10.688a32 32 0 0 1 32-32h21.312z m373.312 128H341.312V224a32 32 0 0 1-32 32H288a32 32 0 0 1-32-32v-10.688H170.624v640h682.688v-640H768V224a32 32 0 0 1-32 32h-21.376a32 32 0 0 1-32-32v-10.688zM384 437.312a32 32 0 0 0-32-32h-64a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32h64a32 32 0 0 0 32-32v-64z m64 0a32 32 0 0 1 32-32h64a32 32 0 0 1 32 32v64a32 32 0 0 1-32 32h-64a32 32 0 0 1-32-32v-64z m-64 192a32 32 0 0 0-32-32h-64a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32h64a32 32 0 0 0 32-32v-64z m64 0a32 32 0 0 1 32-32h64a32 32 0 0 1 32 32v64a32 32 0 0 1-32 32h-64a32 32 0 0 1-32-32v-64z m320-192a32 32 0 0 0-32-32h-64a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32h64a32 32 0 0 0 32-32v-64z" p-id="1357"></path><path d="M768 629.312a32 32 0 0 0-32-32h-64a32 32 0 0 0-32 32v64a32 32 0 0 0 32 32h64a32 32 0 0 0 32-32v-64z" p-id="1358"></path></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1545,7 +1545,7 @@ export default {
preview_100_data: 'Show 100 lines data',
invalid_table_check: 'Please sync data first.',
parse_error: 'Parse failed,please check.Referencehttps://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: 'Origin Type',
origin_field_type: 'Field Origin Type',
edit_excel_table: 'Edit Excel Dataset',
edit_excel: 'Edit Excel',
excel_replace: 'Replace',
@ -1656,7 +1656,11 @@ export default {
sql_ds_union_error: 'Direct connect SQL dataset can not be union',
api_data: 'API dataset',
copy: 'Copy',
sync_log: 'Sync log'
sync_log: 'Sync log',
field_edit_name: 'Field Name',
input_edit_name: 'Input field name',
edit_search: 'Search by name',
na: 'None'
},
driver: {
driver: 'Driver',

View File

@ -1462,8 +1462,8 @@ export default {
create_view: '創建視圖',
data_preview: '數據預覽',
field_type: '字段類型',
field_name: '字段名',
field_origin_name: '原始名',
field_name: '字段名',
field_origin_name: '原始名',
field_check: '選中',
update_info: '更新信息',
join_view: '數據關聯',
@ -1545,7 +1545,7 @@ export default {
preview_100_data: '顯示前100行數據',
invalid_table_check: '非直連數據集請先完成數據同步',
parse_error: 'Excel解析失敗請檢查格式、字段等信息。具體參考https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: '原始類型',
origin_field_type: '字段原始類型',
edit_excel_table: '編輯Excel數據集',
edit_excel: '編輯Excel',
excel_replace: '替換',
@ -1656,7 +1656,11 @@ export default {
sql_ds_union_error: '直連模式下SQL數據集不支持關聯',
api_data: 'API 數據集',
copy: '復製',
sync_log: '同步日誌'
sync_log: '同步日誌',
field_edit_name: '字段名稱',
input_edit_name: '請輸入字段名稱',
edit_search: '通過名稱搜索',
na: '暫無'
},
driver: {
driver: '驅動',

View File

@ -1461,8 +1461,8 @@ export default {
create_view: '创建视图',
data_preview: '数据预览',
field_type: '字段类型',
field_name: '字段名',
field_origin_name: '原始名',
field_name: '字段名',
field_origin_name: '原始名',
field_check: '选中',
update_info: '更新信息',
join_view: '数据关联',
@ -1544,7 +1544,7 @@ export default {
preview_100_data: '显示前100行数据',
invalid_table_check: '非直连数据集请先完成数据同步',
parse_error: 'Excel解析失败请检查格式、字段等信息。具体参考https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
origin_field_type: '原始类型',
origin_field_type: '字段原始类型',
edit_excel_table: '编辑Excel数据集',
edit_excel: '编辑Excel',
excel_replace: '替换',
@ -1655,7 +1655,11 @@ export default {
sql_ds_union_error: '直连模式下SQL数据集不支持关联',
api_data: 'API 数据集',
copy: '复制',
sync_log: '同步日志'
sync_log: '同步日志',
field_edit_name: '字段名称',
input_edit_name: '请输入字段名称',
edit_search: '通过名称搜索',
na: '暂无'
},
driver: {
driver: '驱动',

View File

@ -46,7 +46,7 @@
<span><i class="el-icon-arrow-down el-icon--right" /></span>
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/personal">
<router-link to="/person-info/index">
<el-dropdown-item>{{ $t('commons.personal_info') }}</el-dropdown-item>
</router-link>

View File

@ -76,11 +76,7 @@ export const constantRoutes = [
component: () => import('@/views/link'),
hidden: true
},
{
path: '/personal',
component: () => import('@/views/system/user/privateForm'),
hidden: true
},
{
path: '/preview/:reportId',
component: () => import('@/components/canvas/components/Editor/PreviewEject'),

View File

@ -302,7 +302,7 @@ div:focus {
.field-icon-time {
@extend %field-icon;
color: #faaa39;
color: #3370FF;
}
.field-icon-value {
@ -322,6 +322,14 @@ div:focus {
margin: 0 2px 1px 0;
}
.field-icon-dimension{
color: #3370FF!important;
}
.field-icon-quota{
color: #04B49C!important;
}
.ds-icon-pdf {
width: 20px;
height: 20px;
@ -1518,3 +1526,49 @@ div:focus {
background: rgba(51, 112, 255, 0.1) !important;
}
}
.de-status {
position: relative;
margin-left: 15px;
&::before {
content: '';
position: absolute;
top: 50%;
left: -13px;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
}
}
.de-Pending-result,
.de-Underway-result {
&::before {
background: var(--deTextPlaceholder, #8f959e);
}
}
.de-Exec-result,
.de-Underway-pre {
&::before {
background: var(--primary, #3370ff);
}
}
.de-Stopped-result,
.de-Completed-pre {
&::before {
background: var(--deSuccess, #34C724);
}
}
.de-Error-pre {
&::before {
background: var(--deDanger, #F54A45);
}
.el-icon-s-order {
color: var(--primary, #3370ff);
cursor: pointer;
}
}

View File

@ -274,9 +274,11 @@ export function seniorCfg(chart_option, chart) {
}
}
// begin mark line settings
chart_option.series[0].markLine = {
symbol: 'none',
data: []
if (chart_option.series && chart_option.series.length > 0) {
chart_option.series[0].markLine = {
symbol: 'none',
data: []
}
}
if (senior.assistLine && senior.assistLine.length > 0) {
if (chart_option.series && chart_option.series.length > 0) {

View File

@ -124,7 +124,7 @@ export default {
addLine() {
const obj = { ...this.lineObj,
curField: this.quotaData ? this.quotaData[0] : null,
fieldId: this.quotaData ? this.quotaData[0].id : null
fieldId: this.quotaData ? this.quotaData[0]?.id : null
}
this.lineArr.push(JSON.parse(JSON.stringify(obj)))
this.changeAssistLine()

View File

@ -2,8 +2,8 @@
<el-row>
<el-form ref="form" :model="fieldForm" size="mini" class="row-style">
<el-form-item>
<span style="width: 80px;font-size: 12px">{{ $t('dataset.field_name') }}</span>
<el-input v-model="fieldForm.name" style="width: 80%;" size="mini" :placeholder="$t('dataset.input_name')" />
<span style="width: 80px;font-size: 12px">{{ $t('dataset.field_edit_name') }}</span>
<el-input v-model="fieldForm.name" style="width: 80%;" size="mini" :placeholder="$t('dataset.input_edit_name')" />
</el-form-item>
</el-form>
@ -94,13 +94,14 @@
<el-input
v-model="searchField"
size="mini"
:placeholder="$t('dataset.search')"
:placeholder="$t('dataset.edit_search')"
prefix-icon="el-icon-search"
clearable
/>
<div class="field-height">
<span>{{ $t('chart.dimension') }}</span>
<draggable
v-if="dimensionData && dimensionData.length > 0"
v-model="dimensionData"
:options="{group:{name: 'drag',pull:'clone'},sort: true}"
animation="300"
@ -127,10 +128,12 @@
</span>
</transition-group>
</draggable>
<div v-else class="class-na">{{ $t('dataset.na') }}</div>
</div>
<div class="field-height">
<span>{{ $t('chart.quota') }}</span>
<draggable
v-if="quotaData && quotaData.length > 0"
v-model="quotaData"
:options="{group:{name: 'drag',pull:'clone'},sort: true}"
animation="300"
@ -157,6 +160,7 @@
</span>
</transition-group>
</draggable>
<div v-else class="class-na">{{ $t('dataset.na') }}</div>
</div>
</el-col>
<el-col :span="12" style="height: 100%" class="padding-lr">
@ -176,7 +180,7 @@
<el-input
v-model="searchFunction"
size="mini"
:placeholder="$t('dataset.search')"
:placeholder="$t('dataset.edit_search')"
prefix-icon="el-icon-search"
clearable
/>
@ -670,4 +674,11 @@ span {
float: right;
margin-top: 10px;
}
.class-na {
margin-top: 8px;
text-align: center;
font-size: 14px;
color: var(--deTextDisable);
}
</style>

View File

@ -31,7 +31,12 @@
prefix-icon="el-icon-search"
clearable
/>
<div class="table-checkbox-list">
<div v-if="!tableData.length && searchTable !== ''" class="el-empty">
<div class="el-empty__description" style="margin-top: 80px;color: #5e6d82;">
没有找到相关内容
</div>
</div>
<div class="table-checkbox-list" v-else>
<el-checkbox-group v-model="checkTableList" size="small">
<el-tooltip
v-for="t in tableData"
@ -278,13 +283,13 @@ export default {
if (this.checkDatasetName.includes(ele.datasetName)) {
this.nameExsitValidator(index)
} else {
ele.nameExsit = false;
ele.nameExsit = false
}
})
},
calHeight() {
const that = this
setTimeout(function() {
setTimeout(function () {
const currentHeight = document.documentElement.clientHeight
that.height = currentHeight - 56 - 64 - 75 - 32 - 24 - 16 - 10
}, 10)
@ -381,6 +386,7 @@ export default {
.arrow-right {
position: absolute;
z-index: 2;
top: 15px;
cursor: pointer;
margin: 0;

View File

@ -32,7 +32,12 @@
prefix-icon="el-icon-search"
clearable
/>
<div class="table-checkbox-list">
<div v-if="!tableData.length && searchTable !== ''" class="el-empty">
<div class="el-empty__description" style="margin-top: 80px;color: #5e6d82;">
没有找到相关内容
</div>
</div>
<div v-else class="table-checkbox-list">
<el-checkbox-group v-model="checkTableList" size="small">
<el-tooltip
:disabled="t.enableCheck"
@ -396,6 +401,7 @@ export default {
.arrow-right {
position: absolute;
top: 15px;
z-index: 2;
cursor: pointer;
margin: 0;
display: flex;

View File

@ -575,6 +575,7 @@ export default {
.arrow-right {
position: absolute;
z-index: 2;
top: 15px;
cursor: pointer;
margin: 0;

View File

@ -622,7 +622,9 @@ export default {
this.fields = response.data.fields
this.data = response.data.data
const datas = this.data
this.$refs.plxTable.reloadData(datas)
this.$nextTick(() => {
this.$refs.plxTable?.reloadData(datas)
})
})
.catch((err) => {
this.errMsg = true
@ -747,7 +749,9 @@ export default {
.sql-dataset-drawer {
.el-drawer__body {
padding: 16px 24px;
position: relative;
position: unset;
overflow-y: auto;
padding-bottom: 80px;
}
.el-date-editor {

View File

@ -1,11 +1,11 @@
<template>
<div class="calcu-feild">
<el-form ref="form" :model="fieldForm" class="de-form-item">
<el-form-item :label="$t('dataset.field_name')">
<el-form-item :label="$t('dataset.field_edit_name')">
<el-input
v-model="fieldForm.name"
size="small"
:placeholder="$t('dataset.input_name')"
:placeholder="$t('dataset.input_edit_name')"
/>
</el-form-item>
</el-form>
@ -19,7 +19,7 @@
<el-tooltip class="item" effect="dark" placement="bottom">
<div slot="content">
表达式语法请遵循该数据源对应的数据库语法
<br />
<br>
数据集中不支持聚合运算
</div>
<i class="el-icon-info" style="cursor: pointer" />
@ -51,8 +51,7 @@
:key="item.value"
v-model="fieldForm.deType"
:label="item.value"
>{{ item.label }}</el-radio
>
>{{ item.label }}</el-radio>
</el-form-item>
</el-form>
</el-row>
@ -64,9 +63,9 @@
<el-tooltip class="item" effect="dark" placement="bottom">
<div slot="content">
引用字段以 "[" 开始 "]" 结束
<br />
<br>
请勿修改引用内容否则将引用失败
<br />
<br>
若输入与引用字段相同格式的内容将被当作引用字段处理
</div>
<i class="el-icon-info" style="cursor: pointer" />
@ -75,7 +74,7 @@
<el-input
v-model="searchField"
size="small"
:placeholder="$t('dataset.search')"
:placeholder="$t('dataset.edit_search')"
prefix-icon="el-icon-search"
style="margin-bottom: 12px"
clearable
@ -83,6 +82,7 @@
<div class="field-height">
<span>{{ $t('chart.dimension') }}</span>
<draggable
v-if="dimensionData && dimensionData.length > 0"
v-model="dimensionData"
:options="{ group: { name: 'drag', pull: 'clone' }, sort: true }"
animation="300"
@ -121,10 +121,12 @@
</span>
</transition-group>
</draggable>
<div v-else class="class-na">{{ $t('dataset.na') }}</div>
</div>
<div class="field-height">
<span>{{ $t('chart.quota') }}</span>
<draggable
v-if="quotaData && quotaData.length > 0"
v-model="quotaData"
:options="{ group: { name: 'drag', pull: 'clone' }, sort: true }"
animation="300"
@ -163,6 +165,7 @@
</span>
</transition-group>
</draggable>
<div v-else class="class-na">{{ $t('dataset.na') }}</div>
</div>
</div>
<div class="padding-lr">
@ -171,9 +174,9 @@
<el-tooltip class="item" effect="dark" placement="bottom">
<div slot="content">
使用数据集对应数据库类型所支持的函数语法同对应数据库
<br />
<br>
如日期格式化MySQL使用DATE_FORMAT(date,format)Oracle使用TO_DATE(X,[,fmt])
<br />
<br>
非直连模式数据集使用Doris数据库函数可参考Doris官网
https://doris.apache.org/zh-CN/
</div>
@ -184,7 +187,7 @@
v-model="searchFunction"
size="small"
style="margin-bottom: 12px"
:placeholder="$t('dataset.search')"
:placeholder="$t('dataset.edit_search')"
prefix-icon="el-icon-search"
clearable
/>
@ -205,8 +208,7 @@
slot="reference"
class="function-style"
@click="insertParamToCodeMirror(item.func)"
>{{ item.func }}</span
>
>{{ item.func }}</span>
</el-popover>
</el-row>
</div>
@ -221,8 +223,7 @@
:loading="loading"
type="primary"
@click="saveCalcField"
>{{ $t('dataset.confirm') }}</deBtn
>
>{{ $t('dataset.confirm') }}</deBtn>
</div>
</div>
</template>
@ -326,16 +327,16 @@ export default {
}
},
watch: {
param: function () {
param: function() {
this.initFunctions()
},
field: {
handler: function () {
handler: function() {
this.initField()
},
deep: true
},
tableFields: function () {
tableFields: function() {
this.dimensionData = JSON.parse(
JSON.stringify(this.tableFields.dimensionList)
).filter((ele) => ele.extField === 0)
@ -343,7 +344,7 @@ export default {
JSON.stringify(this.tableFields.quotaList)
).filter((ele) => ele.extField === 0)
},
searchField: function (val) {
searchField: function(val) {
if (val && val !== '') {
this.dimensionData = JSON.parse(
JSON.stringify(
@ -374,7 +375,7 @@ export default {
).filter((ele) => ele.extField === 0)
}
},
searchFunction: function (val) {
searchFunction: function(val) {
if (val && val !== '') {
this.functionData = JSON.parse(
JSON.stringify(
@ -563,10 +564,10 @@ export default {
box-sizing: border-box;
margin-left: 12px;
width: 214px;
overflow-y: auto;
overflow-y: hidden;
}
.field-height {
height: calc(50% - 25px);
height: calc(50% - 41px);
margin-top: 4px;
}
.drag-list {
@ -673,7 +674,7 @@ export default {
background: var(--ContentBG);
}
.function-height {
height: calc(100% - 50px);
height: calc(100% - 21px - 32px - 4px - 24px);
overflow: auto;
margin-top: 4px;
}
@ -689,6 +690,13 @@ export default {
margin: 6px 0 0 0;
font-size: 10px;
}
.class-na {
margin-top: 8px;
text-align: center;
font-size: 14px;
color: var(--deTextDisable);
}
</style>
<style lang="scss">
@ -714,4 +722,4 @@ export default {
display: inline-block;
}
}
</style>
</style>

View File

@ -146,22 +146,22 @@
<svg-icon
v-if="item.value === 0"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-dimension"
/>
<svg-icon
v-if="item.value === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-dimension"
/>
<svg-icon
v-if="item.value === 2 || item.value === 3"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-dimension"
/>
<svg-icon
v-if="item.value === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-dimension"
/>
</span>
<span style="float: left; color: #8492a6; font-size: 12px">{{
@ -174,28 +174,28 @@
<svg-icon
v-if="scope.row.deType === 0 || scope.row.deType === 6"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-dimension"
/>
</span>
<span v-if="scope.row.deType === 1">
<svg-icon
v-if="scope.row.deType === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-dimension"
/>
</span>
<span v-if="scope.row.deType === 2 || scope.row.deType === 3">
<svg-icon
v-if="scope.row.deType === 2 || scope.row.deType === 3"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-dimension"
/>
</span>
<span v-if="scope.row.deType === 5">
<svg-icon
v-if="scope.row.deType === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-dimension"
/>
</span>
</span>
@ -220,7 +220,7 @@
scope.row.deExtractType === 6
"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-dimension"
/>
<span class="field-class">{{ $t('dataset.text') }}</span>
</span>
@ -228,7 +228,7 @@
<svg-icon
v-if="scope.row.deExtractType === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-dimension"
/>
<span class="field-class">{{ $t('dataset.time') }}</span>
</span>
@ -246,7 +246,7 @@
scope.row.deExtractType === 4
"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-dimension"
/>
<span
v-if="
@ -268,7 +268,7 @@
<svg-icon
v-if="scope.row.deExtractType === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-dimension"
/>
<span class="field-class">{{ $t('dataset.location') }}</span>
</span>
@ -464,22 +464,22 @@
<svg-icon
v-if="item.value === 0"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-quota"
/>
<svg-icon
v-if="item.value === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-quota"
/>
<svg-icon
v-if="item.value === 2 || item.value === 3"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-quota"
/>
<svg-icon
v-if="item.value === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-quota"
/>
</span>
<span style="float: left; color: #8492a6; font-size: 12px">{{
@ -492,28 +492,28 @@
<svg-icon
v-if="scope.row.deType === 0"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-quota"
/>
</span>
<span v-if="scope.row.deType === 1">
<svg-icon
v-if="scope.row.deType === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-quota"
/>
</span>
<span v-if="scope.row.deType === 2 || scope.row.deType === 3">
<svg-icon
v-if="scope.row.deType === 2 || scope.row.deType === 3"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-quota"
/>
</span>
<span v-if="scope.row.deType === 5">
<svg-icon
v-if="scope.row.deType === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-quota"
/>
</span>
</span>
@ -530,7 +530,7 @@
<svg-icon
v-if="scope.row.deExtractType === 0"
icon-class="field_text"
class="field-icon-text"
class="field-icon-text field-icon-quota"
/>
<span class="field-class">{{ $t('dataset.text') }}</span>
</span>
@ -538,7 +538,7 @@
<svg-icon
v-if="scope.row.deExtractType === 1"
icon-class="field_time"
class="field-icon-time"
class="field-icon-time field-icon-quota"
/>
<span class="field-class">{{ $t('dataset.time') }}</span>
</span>
@ -556,7 +556,7 @@
scope.row.deExtractType === 4
"
icon-class="field_value"
class="field-icon-value"
class="field-icon-value field-icon-quota"
/>
<span
v-if="
@ -578,7 +578,7 @@
<svg-icon
v-if="scope.row.deExtractType === 5"
icon-class="field_location"
class="field-icon-location"
class="field-icon-location field-icon-quota"
/>
<span class="field-class">{{ $t('dataset.location') }}</span>
</span>
@ -1098,4 +1098,4 @@ span {
transform: translate(-50%, -50%);
}
}
</style>
</style>

View File

@ -71,7 +71,7 @@
<template slot-scope="scope">
<span
v-if="scope.row.lastExecStatus"
:class="[`de-${scope.row.lastExecStatus}`, 'de-status']"
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
>{{
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
}}
@ -110,7 +110,7 @@
:label="$t('dataset.task.task_status')"
>
<template slot-scope="scope">
<span :class="[`de-${scope.row.status}`, 'de-status']"
<span :class="[`de-${scope.row.status}-result`, 'de-status']"
>{{ $t(`dataset.task.${scope.row.status.toLocaleLowerCase()}`) }}
</span>
</template>
@ -223,23 +223,16 @@
<el-table-column prop="status" :label="$t('dataset.status')">
<template slot-scope="scope">
<span
v-if="scope.row.status === 'Completed'"
style="color: green"
>{{ $t('dataset.completed') }}</span
>
<span v-if="scope.row.status === 'Underway'" class="blue-color">
<i class="el-icon-loading" />
{{ $t('dataset.underway') }}
</span>
<span v-if="scope.row.status === 'Error'" style="color: red">
<el-link
type="danger"
@click="showErrorMassage(scope.row.info)"
>{{ $t('dataset.error') }}</el-link
>
</span>
</template>
<span
v-if="scope.row.status"
:class="[`de-${scope.row.status}-pre`, 'de-status']"
>{{
$t(`dataset.${scope.row.status.toLocaleLowerCase()}`)
}}
<svg-icon style="cursor: pointer;" v-if="scope.row.status === 'Error'" @click="showErrorMassage(scope.row.info)" icon-class="icon-maybe" class="field-icon-location" />
</span>
<span v-else>-</span>
</template>
</el-table-column>
</el-table>
<el-row style="margin-top: 10px; text-align: right">
@ -1165,61 +1158,4 @@ export default {
}
}
}
</style>
<style lang="scss">
.de-status {
position: relative;
margin-left: 15px;
&::before {
content: '';
position: absolute;
top: 50%;
left: -13px;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
}
}
.de-Completed {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Underway {
&::before {
background: #8f959e;
}
}
.de-Pending {
&::before {
background: #8f959e;
}
}
.de-Exec {
&::before {
background: var(--primary, #3370ff);
}
}
.de-Stopped {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Error {
&::before {
background: var(--deDanger, #3370ff);
}
.el-icon-s-order {
color: var(--primary, #3370ff);
cursor: pointer;
}
}
</style>

View File

@ -25,7 +25,7 @@
class="table-num"
v-if="['db', 'excel', 'api'].includes(datasetType)"
>{{ $t('deDataset.selected') }} {{ tableNum }}
{{ $t('deDataset.table') }}</span
{{ ['excel'].includes(datasetType) ? $t('deDataset.table') : '项' }}</span
>
<deBtn @click="datasetSave" type="primary">{{
$t('commons.save')

View File

@ -305,7 +305,7 @@
@keypress.enter.native="saveGroup(groupForm)"
>
<el-form-item :label="$t('deDataset.folder_name')" prop="name">
<el-input v-model="groupForm.name" />
<el-input placeholder="请输入文件夹名称" v-model="groupForm.name" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -429,6 +429,7 @@ import ChartStyleBatchSet from '@/views/chart/view/ChartStyleBatchSet'
import Multiplexing from '@/views/panel/ViewSelect/multiplexing'
import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style'
import eventBus from '@/components/canvas/utils/eventBus'
export default {
name: 'PanelEdit',
components: {
@ -794,6 +795,7 @@ export default {
} else {
_this.$store.commit('refreshSaveStatus')
}
eventBus.$emit('editPanelInitReady')
}, 500)
})
},

View File

@ -1,90 +1,111 @@
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
<el-tabs v-model="activeName">
<!-- 认证-->
<el-tab-pane :label="$t('datasource.verified')" name="verified">
<el-form :model="authConfig" :rules="rule" ref="authConfig" label-position="right">
<el-form-item :label="$t('datasource.verification_method')" prop="verification">
<el-select v-model="authConfig.verification" @change="change"
:placeholder="$t('datasource.verification_method')" filterable size="small">
<el-option
v-for="item in options"
:key="item.name"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('datasource.username')" prop="username"
v-if="authConfig.verification!=undefined && authConfig.verification !='No Auth'">
<el-input :placeholder="$t('datasource.username')" v-model="authConfig.username"
class="ms-http-input" size="small">
<el-form
:model="authConfig"
:rules="rule"
ref="authConfig"
label-position="right"
>
<el-form-item
:label="$t('datasource.verification_method')"
prop="verification"
>
<el-select
v-model="authConfig.verification"
@change="change"
:placeholder="$t('datasource.verification_method')"
filterable
size="small"
>
<el-option
v-for="item in options"
:key="item.name"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select>
</el-form-item>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item
:label="$t('datasource.username')"
prop="username"
v-if="
authConfig.verification != undefined &&
authConfig.verification != 'No Auth'
"
>
<el-input
:placeholder="$t('datasource.username')"
v-model="authConfig.username"
class="ms-http-input"
size="small"
>
</el-input>
</el-form-item>
<el-form-item :label="$t('datasource.password')" prop="password"
v-if=" authConfig.verification!=undefined && authConfig.verification !='No Auth'">
<el-input v-model="authConfig.password" :placeholder="$t('datasource.password')" show-password autocomplete="off"
maxlength="50" show-word-limit/>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('datasource.password')"
prop="password"
v-if="
authConfig.verification != undefined &&
authConfig.verification != 'No Auth'
"
>
<dePwd
v-model="authConfig.password"
:placeholder="$t('datasource.password')"
/>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-form>
</template>
<script>
import dePwd from '@/components/deCustomCm/dePwd.vue'
export default {
name: "ApiAuthConfig",
components: {},
name: 'ApiAuthConfig',
components: { dePwd },
props: {
request: {},
encryptShow: {
type: Boolean,
default: true,
default: true
}
},
watch: {
request() {
this.initData();
this.initData()
}
},
created() {
this.initData();
this.initData()
},
data() {
return {
options: [{name: "No Auth"}, {name: "Basic Auth"}],
activeName: "verified",
options: [{ name: 'No Auth' }, { name: 'Basic Auth' }],
activeName: 'verified',
rule: {},
authConfig: {}
}
},
methods: {
change() {
if (this.authConfig.verification === "Basic Auth") {
this.authConfig.verification = "Basic Auth";
this.request.authManager = this.authConfig;
if (this.authConfig.verification === 'Basic Auth') {
this.authConfig.verification = 'Basic Auth'
this.request.authManager = this.authConfig
} else {
this.authConfig.verification = "No Auth";
this.request.authManager = this.authConfig;
this.authConfig.verification = 'No Auth'
this.request.authManager = this.authConfig
}
},
initData() {
if (this.request.authManager) {
this.authConfig = this.request.authManager;
this.authConfig = this.request.authManager
}
}
}
}
</script>
<style scoped>
/deep/ .el-tabs__nav-wrap::after {
height: 0px;
}
</style>

View File

@ -32,7 +32,7 @@
@click="addApiItem(api)"
>
<el-row>
<el-col :span="12">
<el-col style="display: flex" :span="19">
<span class="name">{{ api.name }}</span>
<span
v-if="api.status === 'Error'"
@ -45,7 +45,7 @@
style="color: green; background: rgba(52, 199, 36, 0.2)"
>{{ $t('datasource.valid') }}</span>
</el-col>
<el-col style="text-align: right" :span="12">
<el-col style="text-align: right" :span="5">
<svg-icon
icon-class="de-copy"
class="de-copy-icon"
@ -441,7 +441,7 @@
<span>{{ $t('datasource.base_info') }}</span>
</div>
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="apiItem.name" autocomplete="off" />
<el-input :placeholder="$t('commons.input_name')" v-model="apiItem.name" autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('datasource.request')" prop="url">
@ -575,8 +575,15 @@
<div class="row-rules">
<span>{{ $t('dataset.data_preview') }}</span>
</div>
<el-empty
size="125"
v-if="showEmpty"
:image="noneImg"
style="margin-top: 24px"
:description="$t('暂无数据,请在数据结构勾选字段')"
/>
<ux-grid
v-else
ref="plxTable"
size="mini"
style="width: 100%"
@ -839,6 +846,7 @@ export default {
},
api_table_title: '',
schemas: [],
showEmpty: false,
canEdit: false,
edit_api_item: false,
add_api_item: true,
@ -1132,6 +1140,7 @@ export default {
}
},
previewData() {
this.showEmpty = false
const datas = []
let maxPreviewNum = 0
for (let j = 0; j < this.apiItem.fields.length; j++) {
@ -1154,6 +1163,7 @@ export default {
)
}
this.$refs.plxTable.reloadData(datas)
this.showEmpty = !!datas.length
}
},
handleCheckChange(node) {
@ -1427,6 +1437,10 @@ export default {
font-size: 16px;
font-weight: 500;
margin-right: 8px;
max-width: 80%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.req-title,
.req-value {

View File

@ -11,7 +11,7 @@
!canEdit
? $t('datasource.show_info')
: formType == 'add'
? $t('datasource.create')
? `${$t('commons.create') + typeMap }${ $t('commons.datasource')}`
: $t('datasource.modify')
}}
</span>
@ -71,6 +71,9 @@
label-width="180px"
label-position="right"
>
<div class="de-row-rules">
<span>基本信息</span>
</div>
<el-form-item :label="$t('datasource.display_name')" prop="name">
<el-input
v-model="form.name"
@ -318,6 +321,7 @@ export default {
]
},
schemas: [],
typeMap: '',
canEdit: false,
originConfiguration: {},
edit_api_item: false,
@ -387,7 +391,7 @@ export default {
async created() {
await this.datasourceTypes()
this.queryTreeDatas()
const { id, showModel, msgNodeId, type } = this.$route.query
const { id, showModel, msgNodeId, type, name } = this.$route.query
this.params = this.$route.query
if (id) {
await this.getDatasourceDetail(id, showModel)
@ -397,6 +401,7 @@ export default {
this.canEdit = true
this.disabled = false
if (type) {
this.typeMap = name
this.setType()
this.changeType()
}
@ -458,6 +463,10 @@ export default {
customDriver: 'default',
queryTimeout: 30
}
if (this.form.type == 'oracle') {
this.$set(this.form.configuration, 'charset', 'Default')
this.$set(this.form.configuration, 'targetCharset', 'Default')
}
},
changeEdit() {
this.canEdit = true

View File

@ -483,9 +483,10 @@ export default {
this.queryTreeDatas()
},
addDb({ type }) {
const name = (this.dsTypes.find(ele => type === ele.type ) || {}).name
this.$router.push({
path: '/ds-form',
query: { type }
query: { type, name }
})
},
addFolderWithType(data) {
@ -494,9 +495,10 @@ export default {
this.dialogTitle = this.$t('datasource.add_driver')
this.editDriver = true
} else {
const name = (this.dsTypes.find(ele => data.id === ele.type ) || {}).name
this.$router.push({
path: '/ds-form',
query: { type: data.id }
query: { type: data.id, name }
})
}
},

View File

@ -162,11 +162,11 @@
<template slot-scope="scope">
<span
v-if="scope.row.lastExecStatus"
:class="[`de-${scope.row.lastExecStatus}`, 'de-status']"
>{{
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
}}
<svg-icon v-if="scope.row.lastExecStatus === 'Error'" style="cursor: pointer;" icon-class="icon-maybe" class="field-icon-location" @click="showErrorMassage(scope.row.msg)" />
:class="[`de-${scope.row.lastExecStatus}-pre`, 'de-status']"
>{{
$t(`dataset.${scope.row.lastExecStatus.toLocaleLowerCase()}`)
}}
<svg-icon style="cursor: pointer;" v-if="scope.row.lastExecStatus === 'Error'" @click="showErrorMassage(scope.row.msg)" icon-class="icon-maybe" class="field-icon-location" />
</span>
<span v-else>-</span>
</template>
@ -202,9 +202,8 @@
:label="$t('dataset.task.task_status')"
>
<template slot-scope="scope">
<span
:class="[`de-${scope.row.status}`, 'de-status']"
>{{ $t(`dataset.task.${scope.row.status.toLocaleLowerCase()}`) }}
<span :class="[`de-${scope.row.status}-result`, 'de-status']"
>{{ $t(`dataset.task.${scope.row.status.toLocaleLowerCase()}`) }}
</span>
</template>
</el-table-column>
@ -858,59 +857,4 @@ export default {
display: none !important;
}
}
.de-status {
position: relative;
margin-left: 15px;
&::before {
content: "";
position: absolute;
top: 50%;
left: -13px;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
}
}
.de-Completed {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Underway {
&::before {
background: #8f959e;
}
}
.de-Pending {
&::before {
background: #8f959e;
}
}
.de-Exec {
&::before {
background: var(--primary, #3370ff);
}
}
.de-Stopped {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Error {
&::before {
background: var(--deDanger, #3370ff);
}
.el-icon-s-order {
color: var(--primary, #3370ff);
cursor: pointer;
}
}
</style>

View File

@ -95,9 +95,9 @@
<template slot-scope="scope">
<span
v-if="scope.row.status"
:class="[`de-${scope.row.status}`, 'de-status']"
>{{ $t(`dataset.${scope.row.status.toLocaleLowerCase()}`) }}
<svg-icon v-if="scope.row.status === 'Error'" style="cursor: pointer;" icon-class="icon-maybe" class="field-icon-location" @click="showErrorMassage(scope.row.info)" />
:class="[`de-${scope.row.status}-pre`, 'de-status']"
>{{ $t(`dataset.${scope.row.status.toLocaleLowerCase()}`) }}
<svg-icon style="cursor: pointer;" v-if="scope.row.status === 'Error'" @click="showErrorMassage(scope.row.info)" icon-class="icon-maybe" class="field-icon-location" />
</span>
<span v-else>-</span>
</template>
@ -590,60 +590,3 @@ span {
}
}
</style>
<style lang="scss">
.de-status {
position: relative;
margin-left: 15px;
&::before {
content: "";
position: absolute;
top: 50%;
left: -13px;
transform: translateY(-50%);
width: 5px;
height: 5px;
border-radius: 50%;
}
}
.de-Completed {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Underway {
&::before {
background: #8f959e;
}
}
.de-Pending {
&::before {
background: #8f959e;
}
}
.de-Exec {
&::before {
background: var(--primary, #3370ff);
}
}
.de-Stopped {
&::before {
background: var(--deSuccess, #3370ff);
}
}
.de-Error {
&::before {
background: var(--deDanger, #3370ff);
}
.el-icon-question {
color: #646a73;
cursor: pointer;
}
}
</style>

View File

@ -91,6 +91,7 @@ import { allRoles } from '@/api/system/user'
import { updatePerson, personInfo } from '@/api/system/user'
import { pluginLoaded } from '@/api/user'
import PluginCom from '@/views/system/plugin/PluginCom'
import Cookies from 'js-cookie'
export default {
components: { LayoutContent, Treeselect, PluginCom },
@ -173,6 +174,7 @@ export default {
},
created() {
this.$store.dispatch('app/toggleSideBarHide', true)
this.showError()
this.queryPerson()
this.initRoles()
},
@ -183,7 +185,16 @@ export default {
})
},
methods: {
showError() {
const errKeys = ['WecomError', 'DingtalkError', 'LarkError']
errKeys.forEach(key => {
const msg = Cookies.get(key)
if (msg) {
this.$error(msg)
Cookies.remove(key)
}
})
},
queryPerson() {
personInfo().then(res => {
const info = res.data