Merge branch 'main' of github.com:dataease/dataease into main

This commit is contained in:
taojinlong 2021-06-02 10:46:14 +08:00
commit 32a9980178
40 changed files with 670 additions and 277 deletions

View File

@ -23,9 +23,9 @@ public class LicenseController {
@GetMapping(value = "anonymous/license/validate")
public ResultHolder validateLicense() throws Exception {
// if (!need_validate_lic) {
// return ResultHolder.success(null);
// }
if (!need_validate_lic) {
return ResultHolder.success(null);
}
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense();
System.out.println(new Gson().toJson(f2CLicenseResponse));
switch (f2CLicenseResponse.getStatus()) {

View File

@ -91,7 +91,11 @@ public class DatasourceService {
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType());
DatasourceRequest datasourceRequest = new DatasourceRequest();
datasourceRequest.setDatasource(datasource);
datasourceProvider.test(datasourceRequest);
try {
datasourceProvider.test(datasourceRequest);
} catch (Exception e) {
throw new RuntimeException(Translator.get("i18n_datasource_check_fail"));
}
}
public List<DBTableDTO> getTables(Datasource datasource) throws Exception {
@ -144,7 +148,7 @@ public class DatasourceService {
datasourceRequest.setDatasource(datasource);
datasourceProvider.initDataSource(datasourceRequest);
LogUtil.info("Succsss to init datasource connection pool: " + datasource.getName());
}catch (Exception e){
} catch (Exception e) {
LogUtil.error("Failed to init datasource connection pool: " + datasource.getName(), e);
}
});

View File

@ -8,20 +8,16 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
public class MyScanner implements BeanDefinitionRegistryPostProcessor {
@Resource
private MapperScannerConfigurer mapperScannerConfigurer;
private BeanDefinitionRegistry beanDefinitionRegistry;
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException {
this.beanDefinitionRegistry = beanDefinitionRegistry;
System.out.println("-----");
}
@Override
@ -30,9 +26,7 @@ public class MyScanner implements BeanDefinitionRegistryPostProcessor {
}
public void scanner() {
if (null == mapperScannerConfigurer){
mapperScannerConfigurer = SpringContextUtil.getBean(MapperScannerConfigurer.class);
}
MapperScannerConfigurer mapperScannerConfigurer = SpringContextUtil.getBean(MapperScannerConfigurer.class);
mapperScannerConfigurer.postProcessBeanDefinitionRegistry(this.beanDefinitionRegistry);
}

View File

@ -1,21 +1,51 @@
package io.dataease.plugins.util;
import io.dataease.commons.license.DefaultLicenseService;
import io.dataease.commons.license.F2CLicenseResponse;
import io.dataease.plugins.common.dto.PluginSysMenu;
import io.dataease.plugins.common.service.PluginMenuService;
import io.dataease.plugins.config.SpringContextUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
public class PluginUtils {
private static DefaultLicenseService defaultLicenseService;
@Autowired
public void setDefaultLicenseService(DefaultLicenseService defaultLicenseService) {
PluginUtils.defaultLicenseService = defaultLicenseService;
}
public static List<PluginSysMenu> pluginMenus() {
F2CLicenseResponse f2CLicenseResponse = currentLic();
if (f2CLicenseResponse.getStatus() != F2CLicenseResponse.Status.valid)
return new ArrayList<>();
Map<String, PluginMenuService> pluginMenuServiceMap = SpringContextUtil.getApplicationContext().getBeansOfType(PluginMenuService.class);
List<PluginSysMenu> menus = pluginMenuServiceMap.values().stream().flatMap(item -> item.menus().stream()).collect(Collectors.toList());
return menus;
}
public static F2CLicenseResponse currentLic() {
Environment environment = SpringContextUtil.getBean(Environment.class);
Boolean need_validate_lic = environment.getProperty("dataease.need_validate_lic", Boolean.class, true);
if (!need_validate_lic) {
F2CLicenseResponse f2CLicenseResponse = new F2CLicenseResponse();
f2CLicenseResponse.setStatus(F2CLicenseResponse.Status.valid);
return f2CLicenseResponse;
}
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense();
return f2CLicenseResponse;
}

View File

@ -131,26 +131,26 @@ public class DorisQueryProvider extends QueryProvider {
// 如果原始类型为时间
if (x.getDeExtractType() == 1) {
if (x.getDeType() == 2 || x.getDeType() == 3) {
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as ").append(x.getDataeaseName());
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as _").append(x.getDataeaseName());
} else if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as ").append(x.getDataeaseName());
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as _").append(x.getDataeaseName());
} else {
stringBuilder.append(x.getDataeaseName());
stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
}
} else {
if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
stringBuilder.append("DATE_FORMAT(").append("FROM_UNIXTIME(cast(").append(x.getDataeaseName()).append(" as decimal(20,0))/1000,'%Y-%m-%d %H:%i:%S')").append(",'").append(format).append("') as ").append(x.getDataeaseName());
stringBuilder.append("DATE_FORMAT(").append("FROM_UNIXTIME(cast(").append(x.getDataeaseName()).append(" as decimal(20,0))/1000,'%Y-%m-%d %H:%i:%S')").append(",'").append(format).append("') as _").append(x.getDataeaseName());
} else {
stringBuilder.append(x.getDataeaseName());
stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
}
}
return stringBuilder.toString();
}).toArray(String[]::new);
String[] group = xAxis.stream().map(ChartViewFieldDTO::getDataeaseName).toArray(String[]::new);
String[] group = xAxis.stream().map(x -> "_" + x.getDataeaseName()).toArray(String[]::new);
String[] xOrder = xAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none"))
.map(f -> f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new);
.map(f -> "_" + f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new);
String[] yOrder = yAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none"))
.map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new);
String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length);

View File

@ -137,26 +137,26 @@ public class MysqlQueryProvider extends QueryProvider {
// 如果原始类型为时间
if (x.getDeExtractType() == 1) {
if (x.getDeType() == 2 || x.getDeType() == 3) {
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as ").append(x.getDataeaseName());
stringBuilder.append("unix_timestamp(").append(x.getDataeaseName()).append(")*1000 as _").append(x.getDataeaseName());
} else if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as ").append(x.getDataeaseName());
stringBuilder.append("DATE_FORMAT(").append(x.getDataeaseName()).append(",'").append(format).append("') as _").append(x.getDataeaseName());
} else {
stringBuilder.append(x.getDataeaseName());
stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
}
} else {
if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
stringBuilder.append("DATE_FORMAT(").append("FROM_UNIXTIME(cast(").append(x.getDataeaseName()).append(" as decimal(20,0))/1000,'%Y-%m-%d %H:%i:%S')").append(",'").append(format).append("') as ").append(x.getDataeaseName());
stringBuilder.append("DATE_FORMAT(").append("FROM_UNIXTIME(cast(").append(x.getDataeaseName()).append(" as decimal(20,0))/1000,'%Y-%m-%d %H:%i:%S')").append(",'").append(format).append("') as _").append(x.getDataeaseName());
} else {
stringBuilder.append(x.getDataeaseName());
stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
}
}
return stringBuilder.toString();
}).toArray(String[]::new);
String[] group = xAxis.stream().map(ChartViewFieldDTO::getDataeaseName).toArray(String[]::new);
String[] group = xAxis.stream().map(x -> "_" + x.getDataeaseName()).toArray(String[]::new);
String[] xOrder = xAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none"))
.map(f -> f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new);
.map(f -> "_" + f.getDataeaseName() + " " + f.getSort()).toArray(String[]::new);
String[] yOrder = yAxis.stream().filter(f -> StringUtils.isNotEmpty(f.getSort()) && !StringUtils.equalsIgnoreCase(f.getSort(), "none"))
.map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new);
String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length);

View File

@ -66,100 +66,100 @@ CREATE TABLE IF NOT EXISTS `dataset_group` (
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
`sub_count` int(5) DEFAULT '0' COMMENT '子部门数目',
`name` varchar(255) NOT NULL COMMENT '名称',
`dept_sort` int(5) DEFAULT '999' COMMENT '排序',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`dept_id`) USING BTREE,
KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='部门';
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
`sub_count` int(5) DEFAULT '0' COMMENT '子部门数目',
`name` varchar(255) NOT NULL COMMENT '名称',
`dept_sort` int(5) DEFAULT '999' COMMENT '排序',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`dept_id`) USING BTREE,
KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='组织机构';
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
`sub_count` int(5) DEFAULT '0' COMMENT '子菜单数目',
`type` int(11) DEFAULT NULL COMMENT '菜单类型',
`title` varchar(255) DEFAULT NULL COMMENT '菜单标题',
`name` varchar(255) DEFAULT NULL COMMENT '组件名称',
`component` varchar(255) DEFAULT NULL COMMENT '组件',
`menu_sort` int(5) DEFAULT NULL COMMENT '排序',
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
`cache` bit(1) DEFAULT b'0' COMMENT '缓存',
`hidden` bit(1) DEFAULT b'0' COMMENT '隐藏',
`permission` varchar(255) DEFAULT NULL COMMENT '权限',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`menu_id`) USING BTREE,
UNIQUE KEY `uniq_title` (`title`),
UNIQUE KEY `uniq_name` (`name`),
KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统菜单';
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
`sub_count` int(5) DEFAULT '0' COMMENT '子菜单数目',
`type` int(11) DEFAULT NULL COMMENT '菜单类型',
`title` varchar(255) DEFAULT NULL COMMENT '菜单标题',
`name` varchar(255) DEFAULT NULL COMMENT '组件名称',
`component` varchar(255) DEFAULT NULL COMMENT '组件',
`menu_sort` int(5) DEFAULT NULL COMMENT '排序',
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
`cache` bit(1) DEFAULT b'0' COMMENT '缓存',
`hidden` bit(1) DEFAULT b'0' COMMENT '隐藏',
`permission` varchar(255) DEFAULT NULL COMMENT '权限',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`menu_id`) USING BTREE,
UNIQUE KEY `uniq_title` (`title`),
UNIQUE KEY `uniq_name` (`name`),
KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统菜单';
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
`username` varchar(255) DEFAULT NULL COMMENT '用户名',
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
`email` varchar(255) DEFAULT NULL COMMENT '邮箱',
`password` varchar(255) DEFAULT NULL COMMENT '密码',
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
`enabled` bigint(20) DEFAULT NULL COMMENT '状态1启用、0禁用',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新着',
`pwd_reset_time` bigint(13) DEFAULT NULL COMMENT '修改密码的时间',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
`language` varchar(20) DEFAULT NULL COMMENT '语言',
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `UK_kpubos9gc2cvtkb0thktkbkes` (`email`) USING BTREE,
UNIQUE KEY `username` (`username`) USING BTREE,
UNIQUE KEY `uniq_username` (`username`),
UNIQUE KEY `uniq_email` (`email`),
KEY `FK5rwmryny6jthaaxkogownknqp` (`dept_id`) USING BTREE,
KEY `inx_enabled` (`enabled`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统用户';
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
`username` varchar(255) DEFAULT NULL COMMENT '用户名',
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
`email` varchar(255) DEFAULT NULL COMMENT '邮箱',
`password` varchar(255) DEFAULT NULL COMMENT '密码',
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
`enabled` bigint(20) DEFAULT NULL COMMENT '状态1启用、0禁用',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新着',
`pwd_reset_time` bigint(13) DEFAULT NULL COMMENT '修改密码的时间',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
`language` varchar(20) DEFAULT NULL COMMENT '语言',
PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `UK_kpubos9gc2cvtkb0thktkbkes` (`email`) USING BTREE,
UNIQUE KEY `username` (`username`) USING BTREE,
UNIQUE KEY `uniq_username` (`username`),
UNIQUE KEY `uniq_email` (`email`),
KEY `FK5rwmryny6jthaaxkogownknqp` (`dept_id`) USING BTREE,
KEY `inx_enabled` (`enabled`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统用户';
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) NOT NULL COMMENT '名称',
`description` varchar(255) DEFAULT NULL COMMENT '描述',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`role_id`) USING BTREE,
UNIQUE KEY `uniq_name` (`name`),
KEY `role_name_index` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色表';
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) NOT NULL COMMENT '名称',
`description` varchar(255) DEFAULT NULL COMMENT '描述',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`role_id`) USING BTREE,
UNIQUE KEY `uniq_name` (`name`),
KEY `role_name_index` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色表';
DROP TABLE IF EXISTS `sys_roles_menus`;
CREATE TABLE `sys_roles_menus` (
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色菜单关联';
DROP TABLE IF EXISTS `sys_users_roles`;
CREATE TABLE `sys_users_roles` (
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户角色关联';
DROP TABLE IF EXISTS `my_plugin`;

View File

@ -2,38 +2,17 @@ INSERT INTO system_parameter (param_key, param_value, type, sort)
VALUES ('default.language', 'zh_CN', 'text', 5);
BEGIN;
INSERT INTO `sys_dept` VALUES (18, 0, 1, '上海飞致云', 1, NULL, NULL, 1614048906358, 1614048906358);
INSERT INTO `sys_dept` VALUES (19, 0, 1, '北京飞致云', 2, NULL, NULL, 1614048918465, 1614048918465);
INSERT INTO `sys_dept` VALUES (20, 18, 1, '营销部', 1, NULL, NULL, 1614048946370, 1614049006759);
INSERT INTO `sys_dept` VALUES (21, 19, 0, '综合部', 3, NULL, NULL, 1614048963483, 1619667528267);
INSERT INTO `sys_dept` VALUES (25, 20, 0, '售前组', 1, NULL, NULL, 1615791706945, 1615791706945);
INSERT INTO `sys_dept` VALUES (1, 0, 0, '默认组织', 0, NULL, NULL, 1622533297817, 1622533297817);
COMMIT;
BEGIN;
INSERT INTO `sys_menu` VALUES (1, 0, 3, 0, '系统管理', 'system', 'Layout', 6, 'system', '/system', NULL, b'0', b'0', 'dir:sys', NULL, NULL, NULL, 1614916695777);
INSERT INTO `sys_menu` VALUES (2, 1, 4, 1, '用户管理', 'system-user', 'system/user/index', 1, 'peoples', 'user', NULL, b'0', b'0', 'user:read', NULL, NULL, NULL, 1620281952752);
/*INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '菜单管理', 'system-menu', 'system/menu/index', 2, 'menu', 'menu', NULL, b'0', b'0', 'menu:read', NULL, NULL, NULL, NULL);*/
/*INSERT INTO `sys_menu` VALUES (4, 1, 3, 1, '组织管理', 'system-dept', 'system/dept/index', 3, 'dept', 'dept', NULL, b'0', b'0', 'dept:read', NULL, NULL, NULL, NULL);*/
/*INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '角色管理', 'system-role', 'system/role/index', 4, 'role', 'role', b'0', b'0', b'0', 'role:read', NULL, NULL, 1614683852133, 1614683852133);
INSERT INTO `sys_menu` VALUES (6, 1, 0, 1, '参数管理', 'system-param', 'system/systemParamSettings/index', 5, 'sys-tools', 'systemParamSettings', NULL, b'0', b'0', 'sysparam:read', NULL, NULL, NULL, 1615790294169);*/
INSERT INTO `sys_menu` VALUES (8, 0, 0, 1, '数据集', 'dataset', 'dataset/index', 3, '', '/dataset', NULL, b'0', b'0', 'data:read', NULL, NULL, NULL, 1614916684821);
INSERT INTO `sys_menu` VALUES (10, 0, 0, 1, '视图', 'view', 'chart/index', 2, '', '/chart', NULL, b'0', b'0', 'chart:read', NULL, NULL, NULL, 1614915491036);
/*INSERT INTO `sys_menu` VALUES (12, 3, 0, 2, '创建菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:add', NULL, NULL, 1614924617327, 1614924617327);
INSERT INTO `sys_menu` VALUES (13, 3, 0, 2, '删除菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:del', NULL, NULL, 1614924667808, 1614924667808);
INSERT INTO `sys_menu` VALUES (14, 3, 0, 2, '编辑菜单', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'menu:edit', NULL, NULL, 1614930734224, 1614936429773);*/
INSERT INTO `sys_menu` VALUES (15, 2, 0, 2, '创建用户', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'user:add', NULL, NULL, 1614930862373, 1614930862373);
INSERT INTO `sys_menu` VALUES (16, 2, 0, 2, '删除用户', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'user:del', NULL, NULL, 1614930903502, 1614930903502);
INSERT INTO `sys_menu` VALUES (17, 2, 0, 2, '编辑用户', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'user:edit', NULL, NULL, 1614930935529, 1614930935529);
/*
INSERT INTO `sys_menu` VALUES (18, 4, 0, 2, '创建组织', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'dept:add', NULL, NULL, 1614930976297, 1614930976297);
INSERT INTO `sys_menu` VALUES (19, 4, 0, 2, '删除组织', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'dept:del', NULL, NULL, 1614930997130, 1614930997130);
INSERT INTO `sys_menu` VALUES (20, 4, 0, 2, '编辑组织', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'dept:edit', NULL, NULL, 1614931022967, 1614931022967);
INSERT INTO `sys_menu` VALUES (21, 5, 0, 2, '创建角色', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'role:add', NULL, NULL, 1614931069408, 1614931069408);
INSERT INTO `sys_menu` VALUES (22, 5, 0, 2, '删除角色', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'role:del', NULL, NULL, 1614931097720, 1614931097720);
INSERT INTO `sys_menu` VALUES (23, 5, 0, 2, '编辑角色', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'role:edit', NULL, NULL, 1614931124782, 1614931124782);
*/
INSERT INTO `sys_menu` VALUES (24, 34, 0, 2, '创建连接', NULL, NULL, 997, NULL, NULL, b'0', b'0', b'0', 'datasource:add', NULL, NULL, 1614931168956, 1615783705537);
INSERT INTO `sys_menu` VALUES (25, 34, 0, 2, '删除连接', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'datasource:del', NULL, NULL, 1614931205899, 1614931205899);
INSERT INTO `sys_menu` VALUES (26, 34, 0, 2, '编辑连接', NULL, NULL, 999, NULL, NULL, b'0', b'0', b'0', 'datasource:edit', NULL, NULL, 1614931234105, 1614931234105);
@ -42,70 +21,70 @@ INSERT INTO `sys_menu` VALUES (28, 2, 0, 2, '修改密码', NULL, NULL, 999, NUL
INSERT INTO `sys_menu` VALUES (30, 0, 0, 1, '仪表板', 'panel', 'panel/index', 1, NULL, '/panel', b'0', b'0', b'0', 'panel:read', NULL, NULL, NULL, 1619081449067);
INSERT INTO `sys_menu` VALUES (34, 0, 4, 1, '数据源', 'datasource', 'system/datasource/index', 4, NULL, '/datasource', b'0', b'0', b'0', 'datasource:read', NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (35, 1, 0, 1, '用户表单', 'system-user-form', 'system/user/form', 10, '', 'user-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
/*INSERT INTO `sys_menu` VALUES (36, 1, 0, 1, '菜单表单', 'system-menu-form', 'system/menu/form', 11, '', 'menu-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);*/
/*INSERT INTO `sys_menu` VALUES (37, 1, 0, 1, '组织表单', 'system-dept-form', 'system/dept/form', 12, '', 'dept-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);*/
/*INSERT INTO `sys_menu` VALUES (38, 1, 0, 1, '角色表单', 'system-role-form', 'system/role/form', 13, '', 'role-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);*/
INSERT INTO `sys_menu` VALUES (39, 0, 0, 1, '数据源表单', 'datasource-form', 'system/datasource/form', 5, NULL, '/ds-form', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (40, 1, 0, 1, '模板管理', 'system-template', 'panel/template/index', 13, 'dashboard', 'panel/template/index', NULL, b'0', b'0', 'template:read', NULL, NULL, NULL, 1620444227389);
/*
INSERT INTO `sys_menu` VALUES (41, 1, 0, 1, '权限管理', 'system-auth', 'system/authority/index', 14, 'password', 'system/authority/index', b'0', b'0', b'0', 'auth:read', NULL, NULL, NULL, 1620447312657);
INSERT INTO `sys_menu` VALUES (42, 1, 0, 1, '插件管理', 'system-plugin', 'system/plugin/index', 15, 'sys-tools', '/plugin', b'0', b'0', b'0', 'plugin:read', NULL, NULL, NULL, NULL);
*/
INSERT INTO `sys_menu` VALUES (50, 0, 0, 1, '个人信息', 'person-info', 'system/user/privateForm', 999, NULL, '/person-info', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (51, 0, 0, 1, '重置密码', 'person-pwd-reset', 'system/user/personPwd', 999, NULL, '/person-pwd', b'0', b'0', b'1', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sys_menu` VALUES (52, 0, 0, 1, '关于', 'about', 'system/about/index', 16, 'system', '/about', b'0', b'0', b'1', NULL, NULL, NULL, NULL, 1620897406691);
COMMIT;
BEGIN;
INSERT INTO `sys_user` VALUES (4, 0, 'admin', '管理员', '', NULL, 'admin@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'1', 1, NULL, NULL, NULL, NULL, 1615184951534,'zh_CN');
INSERT INTO `sys_user` VALUES (19, 25, 'demo', 'demo', '', NULL, 'demo@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'0', 0, NULL, NULL, NULL, 1619086036234, 1619086036234,'zh_CN');
INSERT INTO `sys_user` VALUES (1, 0, 'admin', '管理员', '', NULL, 'admin@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'1', 1, NULL, NULL, NULL, NULL, 1615184951534, 'zh_CN');
INSERT INTO `sys_user` VALUES (2, 1, 'demo', 'demo', '', NULL, 'demo@fit2cloud.com', '40b8893ea9ebc2d631c4bb42bb1e8996', b'0', 1, NULL, NULL, NULL, 1619086036234, 1622533509697, 'zh_CN');
COMMIT;
BEGIN;
INSERT INTO `sys_role` VALUES (3, '管理员', '', NULL, NULL, REPLACE(unix_timestamp(current_timestamp(3)),'.',''), null);
INSERT INTO `sys_role` VALUES (4, '普通员工', '', NULL, NULL, REPLACE(unix_timestamp(current_timestamp(3)),'.',''), null);
INSERT INTO `sys_role` VALUES (1, '管理员', '', NULL, NULL, REPLACE(unix_timestamp(current_timestamp(3)),'.',''), null);
INSERT INTO `sys_role` VALUES (2, '普通员工', '', NULL, NULL, REPLACE(unix_timestamp(current_timestamp(3)),'.',''), null);
COMMIT;
BEGIN;
INSERT INTO `sys_roles_menus` VALUES (1, 3);
INSERT INTO `sys_roles_menus` VALUES (2, 3);
INSERT INTO `sys_roles_menus` VALUES (3, 3);
INSERT INTO `sys_roles_menus` VALUES (4, 3);
INSERT INTO `sys_roles_menus` VALUES (5, 3);
INSERT INTO `sys_roles_menus` VALUES (6, 3);
INSERT INTO `sys_roles_menus` VALUES (8, 3);
INSERT INTO `sys_roles_menus` VALUES (10, 3);
INSERT INTO `sys_roles_menus` VALUES (11, 3);
INSERT INTO `sys_roles_menus` VALUES (14, 3);
INSERT INTO `sys_roles_menus` VALUES (15, 3);
INSERT INTO `sys_roles_menus` VALUES (16, 3);
INSERT INTO `sys_roles_menus` VALUES (17, 3);
INSERT INTO `sys_roles_menus` VALUES (18, 3);
INSERT INTO `sys_roles_menus` VALUES (19, 3);
INSERT INTO `sys_roles_menus` VALUES (20, 3);
INSERT INTO `sys_roles_menus` VALUES (21, 3);
INSERT INTO `sys_roles_menus` VALUES (22, 3);
INSERT INTO `sys_roles_menus` VALUES (23, 3);
INSERT INTO `sys_roles_menus` VALUES (24, 3);
INSERT INTO `sys_roles_menus` VALUES (25, 3);
INSERT INTO `sys_roles_menus` VALUES (26, 3);
INSERT INTO `sys_roles_menus` VALUES (27, 3);
INSERT INTO `sys_roles_menus` VALUES (28, 3);
INSERT INTO `sys_roles_menus` VALUES (30, 3);
INSERT INTO `sys_roles_menus` VALUES (31, 3);
INSERT INTO `sys_roles_menus` VALUES (32, 3);
INSERT INTO `sys_roles_menus` VALUES (34, 3);
INSERT INTO `sys_roles_menus` VALUES (40, 3);
INSERT INTO `sys_roles_menus` VALUES (41, 3);
INSERT INTO `sys_roles_menus` VALUES (42, 3);
INSERT INTO `sys_roles_menus` VALUES (30, 4);
INSERT INTO `sys_roles_menus` VALUES (1, 1);
INSERT INTO `sys_roles_menus` VALUES (2, 1);
INSERT INTO `sys_roles_menus` VALUES (3, 1);
INSERT INTO `sys_roles_menus` VALUES (4, 1);
INSERT INTO `sys_roles_menus` VALUES (5, 1);
INSERT INTO `sys_roles_menus` VALUES (6, 1);
INSERT INTO `sys_roles_menus` VALUES (8, 1);
INSERT INTO `sys_roles_menus` VALUES (10, 1);
INSERT INTO `sys_roles_menus` VALUES (11, 1);
INSERT INTO `sys_roles_menus` VALUES (14, 1);
INSERT INTO `sys_roles_menus` VALUES (15, 1);
INSERT INTO `sys_roles_menus` VALUES (16, 1);
INSERT INTO `sys_roles_menus` VALUES (17, 1);
INSERT INTO `sys_roles_menus` VALUES (18, 1);
INSERT INTO `sys_roles_menus` VALUES (19, 1);
INSERT INTO `sys_roles_menus` VALUES (20, 1);
INSERT INTO `sys_roles_menus` VALUES (21, 1);
INSERT INTO `sys_roles_menus` VALUES (22, 1);
INSERT INTO `sys_roles_menus` VALUES (23, 1);
INSERT INTO `sys_roles_menus` VALUES (24, 1);
INSERT INTO `sys_roles_menus` VALUES (25, 1);
INSERT INTO `sys_roles_menus` VALUES (26, 1);
INSERT INTO `sys_roles_menus` VALUES (27, 1);
INSERT INTO `sys_roles_menus` VALUES (28, 1);
INSERT INTO `sys_roles_menus` VALUES (30, 1);
INSERT INTO `sys_roles_menus` VALUES (31, 1);
INSERT INTO `sys_roles_menus` VALUES (32, 1);
INSERT INTO `sys_roles_menus` VALUES (34, 1);
INSERT INTO `sys_roles_menus` VALUES (40, 1);
INSERT INTO `sys_roles_menus` VALUES (41, 1);
INSERT INTO `sys_roles_menus` VALUES (42, 1);
INSERT INTO `sys_roles_menus` VALUES (8, 2);
INSERT INTO `sys_roles_menus` VALUES (10, 2);
INSERT INTO `sys_roles_menus` VALUES (24, 2);
INSERT INTO `sys_roles_menus` VALUES (25, 2);
INSERT INTO `sys_roles_menus` VALUES (26, 2);
INSERT INTO `sys_roles_menus` VALUES (27, 2);
INSERT INTO `sys_roles_menus` VALUES (30, 2);
INSERT INTO `sys_roles_menus` VALUES (34, 2);
COMMIT;
BEGIN;
INSERT INTO `sys_users_roles` VALUES (4, 3);
INSERT INTO `sys_users_roles` VALUES (19, 4);
INSERT INTO `sys_users_roles` VALUES (1, 1);
INSERT INTO `sys_users_roles` VALUES (2, 2);
COMMIT;
INSERT INTO `system_parameter`(`param_key`, `param_value`, `type`, `sort`) VALUES ('ui.favicon', NULL, 'file', 6);

View File

@ -243,3 +243,4 @@ i18n_auth_source_be_canceled=This Auth Resource Already Be Canceled
i18n_username_exists=ID is already exists
i18n_ds_name_exists=Datasource name exists
i18n_sync_job_exists=There is already a synchronization task running, please try again later
i18n_datasource_check_fail=Invalid,please check config

View File

@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=当前资源授权权限已经被取消
i18n_username_exists=用户ID已存在
i18n_ds_name_exists=数据源名称已存在
i18n_sync_job_exists=已经有同步任务在运行,稍后重试
i18n_datasource_check_fail=校验失败,请检查配置信息

View File

@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=當前資源授權權限已經被取消
i18n_username_exists=用戶ID已存在
i18n_ds_name_exists=數據源名稱已存在
i18n_sync_job_exists=已經有同步任務在運行,稍後重試
i18n_datasource_check_fail=校驗失敗,請檢查配置信息

View File

@ -1,24 +1,42 @@
<!-- TODO: 这个页面后续将用 JSX 重构 -->
<template>
<div class="attr-list">
<el-form>
<el-form-item v-for="(key, index) in styleKeys.filter(item => (item != 'rotate' && item != 'borderWidth'))" :key="index" :label="map[key]">
<el-form-item v-for="(key, index) in styleKeys.filter(item => item != 'rotate')" :key="index" :label="map[key]">
<el-color-picker v-if="key == 'borderColor'" v-model="curComponent.style[key]" />
<el-color-picker v-else-if="key == 'color'" v-model="curComponent.style[key]" />
<el-color-picker v-else-if="key == 'backgroundColor'" v-model="curComponent.style[key]" />
<el-select v-else-if="key == 'textAlign'" v-model="curComponent.style[key]">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-else-if="selectKey.includes(key)" v-model="curComponent.style[key]">
<template v-if="key == 'textAlign'">
<el-option
v-for="item in textAlignOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</template>
<template v-else-if="key == 'borderStyle'">
<el-option
v-for="item in borderStyleOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</template>
<template v-else>
<el-option
v-for="item in verticalAlignOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</template>
</el-select>
<el-input v-if="key ==='opacity'" v-model="curComponent.style[key]" type="number" :min="0" :step="0.1" :max="1" />
<el-input v-else v-model="curComponent.style[key]" type="number" />
</el-form-item>
<!-- <el-form-item v-if="curComponent && !excludes.includes(curComponent.component)" label="内容">-->
<!-- <el-input v-model="curComponent.propValue" type="textarea" />-->
<!-- </el-form-item>-->
<el-form-item v-if="curComponent && !excludes.includes(curComponent.component)" :label="$t('panel.content')">
<el-input v-model="curComponent.propValue" type="textarea" />
</el-form-item>
</el-form>
</div>
</template>
@ -27,21 +45,46 @@
export default {
data() {
return {
excludes: ['Picture', 'Group'], //
options: [
excludes: ['Picture', 'Group', 'user-view'], //
textAlignOptions: [
{
label: this.$t('panel.aline_left'),
label: this.$t('panel.text_align_left'),
value: 'left'
},
{
label: this.$t('panel.aline_center'),
label: this.$t('panel.text_align_center'),
value: 'center'
},
{
label: this.$t('panel.aline_right'),
label: this.$t('panel.text_align_right'),
value: 'right'
}
],
borderStyleOptions: [
{
label: this.$t('panel.border_style_solid'),
value: 'solid'
},
{
label: this.$t('panel.border_style_dashed'),
value: 'dashed'
}
],
verticalAlignOptions: [
{
label: this.$t('panel.vertical_align_top'),
value: 'top'
},
{
label: this.$t('panel.vertical_align_middle'),
value: 'middle'
},
{
label: this.$t('panel.vertical_align_bottom'),
value: 'bottom'
}
],
selectKey: ['textAlign', 'borderStyle', 'verticalAlign'],
map: {
left: this.$t('panel.left'),
top: this.$t('panel.top'),
@ -49,6 +92,7 @@ export default {
width: this.$t('panel.width'),
color: this.$t('panel.color'),
backgroundColor: this.$t('panel.backgroundColor'),
borderStyle: this.$t('panel.borderStyle'),
borderWidth: this.$t('panel.borderWidth'),
borderColor: this.$t('panel.borderColor'),
borderRadius: this.$t('panel.borderRadius'),
@ -57,12 +101,14 @@ export default {
lineHeight: this.$t('panel.lineHeight'),
letterSpacing: this.$t('panel.letterSpacing'),
textAlign: this.$t('panel.textAlign'),
opacity: this.$t('panel.opacity')
opacity: this.$t('panel.opacity'),
verticalAlign: this.$t('panel.verticalAlign')
}
}
},
computed: {
styleKeys() {
console.log(this.$store.state.curComponent.style)
return this.$store.state.curComponent ? Object.keys(this.$store.state.curComponent.style) : []
},
curComponent() {
@ -73,10 +119,10 @@ export default {
</script>
<style lang="scss" scoped>
.attr-list {
.attr-list {
overflow: auto;
padding: 0px;
padding: 20px;
padding-top: 0;
height: 100%;
}
}
</style>

View File

@ -127,7 +127,6 @@ export default {
},
handleScaleChange() {
if (this.componentData) {
debugger
const componentData = deepCopy(this.componentData)
componentData.forEach(component => {
Object.keys(component.style).forEach(key => {

View File

@ -334,7 +334,6 @@ export default {
curPoint,
symmetricPoint
})
// console.log('this is test:' + JSON.stringify(this.element.propValue.viewId))
this.$store.commit('setShapeStyle', style)
this.element.propValue && this.element.propValue.viewId && eventBus.$emit('resizing', this.element.propValue.viewId)

View File

@ -21,22 +21,20 @@
:index="index"
:class="{ lock: item.isLock }"
>
<!-- item.style-&#45;&#45;{{ item.style }}-->
<!-- item.style-&#45;&#45;{{ getShapeStyleInt(item.style) }}-->
<component
:is="item.component"
v-if="item.type==='custom'"
v-if="item.type==='v-text'"
:id="'component' + item.id"
class="component"
:style="item.style"
:out-style="getShapeStyleInt(item.style)"
:style="getComponentStyleDefault(item.style)"
:prop-value="item.propValue"
:element="item"
:out-style="getShapeStyleInt(item.style)"
@input="handleInput"
/>
<component
:is="item.component"
v-else
v-else-if="item.type==='other'"
:id="'component' + item.id"
class="component"
:style="getComponentStyle(item.style)"
@ -45,6 +43,16 @@
:filter="filter"
:out-style="getShapeStyleInt(item.style)"
/>
<component
:is="item.component"
v-else
:id="'component' + item.id"
class="component"
:style="getComponentStyleDefault(item.style)"
:prop-value="item.propValue"
:element="item"
:out-style="getShapeStyleInt(item.style)"
/>
<!-- <component
:is="item.component"
v-else
@ -365,6 +373,11 @@ export default {
return result
},
getComponentStyleDefault(style) {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
// return style
},
getComponentStyle(style) {
// return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
return style
@ -372,7 +385,8 @@ export default {
handleInput(element, value) {
// shape
this.$store.commit('setShapeStyle', { height: this.getTextareaHeight(element, value) })
// remain -
// this.$store.commit('setShapeStyle', { height: this.getTextareaHeight(element, value) })
},
getTextareaHeight(element, text) {

View File

@ -11,6 +11,25 @@ export const commonAttr = {
isLock: false // 是否锁定组件
}
export const assistList = [
{
id: '10001',
component: 'v-text',
type: 'v-text',
label: '文字',
icon: 'iconfont icon-shuru',
defaultClass: 'text-filter'
},
{
id: '10004',
component: 'rect-shape',
type: 'rect-shape',
label: '矩形',
icon: 'iconfont icon-xialakuang',
defaultClass: 'text-filter'
}
]
// 编辑器左侧组件列表
const list = [
{
@ -19,7 +38,7 @@ const list = [
label: '文字',
propValue: '双击编辑文字',
icon: 'wenben',
type: 'other',
type: 'v-text',
style: {
width: 200,
height: 22,
@ -37,7 +56,7 @@ const list = [
label: '按钮',
propValue: '按钮',
icon: 'button',
type: 'other',
type: 'v-button',
style: {
width: 100,
height: 34,
@ -58,7 +77,7 @@ const list = [
component: 'Picture',
label: '图片',
icon: 'tupian',
type: 'other',
type: 'Picture',
propValue: require('@/components/canvas/assets/title.jpg'),
style: {
width: 300,
@ -71,7 +90,7 @@ const list = [
component: 'Picture',
label: '背景-科技1',
icon: 'tupian',
type: 'other',
type: 'Picture',
propValue: require('@/components/canvas/assets/bg-kj-1.jpg'),
style: {
width: 600,
@ -83,9 +102,9 @@ const list = [
id: '10004',
component: 'rect-shape',
label: '矩形',
propValue: '&nbsp;',
propValue: '',
icon: 'juxing',
type: 'other',
type: 'rect-shape',
style: {
width: 200,
height: 200,
@ -112,7 +131,7 @@ const list = [
style: {
width: 200,
height: 300,
borderWidth: 1
borderRadius: ''
}
}
]

View File

@ -17,7 +17,6 @@ export default {
},
redo(state) {
debugger
if (state.snapshotIndex < state.snapshotData.length - 1) {
state.snapshotIndex++
store.commit('setComponentData', deepCopy(state.snapshotData[state.snapshotIndex]))

View File

@ -701,7 +701,8 @@ export default {
y_M_d_H_m: 'Year Month Day Hour Minute',
y_M_d_H_m_s: 'Year Month Day Hour Minute Second',
date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd'
date_split: 'yyyy/MM/dd',
chartName: 'New Chart'
},
dataset: {
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
@ -941,6 +942,7 @@ export default {
width: 'Width',
color: 'Color',
backgroundColor: 'BackgroundColor',
borderStyle: 'Border Style',
borderWidth: 'BorderWidth',
borderColor: 'BorderColor',
borderRadius: 'BorderRadius',
@ -950,10 +952,18 @@ export default {
letterSpacing: 'LetterSpacing',
textAlign: 'TextAlign',
opacity: 'Opacity',
aline_left: 'Aline Left',
aline_center: 'Aline Center',
aline_right: 'Aline Right',
select_component: 'Check Component'
verticalAlign: 'Vertical Align',
text_align_left: 'Aline Left',
text_align_center: 'Aline Center',
text_align_right: 'Aline Right',
vertical_align_top: 'Align Align',
vertical_align_middle: 'Align Middle',
vertical_align_bottom: 'Align Bottom',
border_style_solid: 'Solid',
border_style_dashed: 'Dashed',
select_component: 'Check Component',
other_module: 'Other',
content: 'Content'
},
plugin: {
local_install: 'Local installation',

View File

@ -701,7 +701,8 @@ export default {
y_M_d_H_m: '年月日時分',
y_M_d_H_m_s: '年月日時分秒',
date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd'
date_split: 'yyyy/MM/dd',
chartName: '新建視圖'
},
dataset: {
sheet_warn: '有多個sheet頁面默認抽取第一個',
@ -941,6 +942,7 @@ export default {
width: '宽',
color: '颜色',
backgroundColor: '背景色',
borderStyle: '边框风格',
borderWidth: '边框宽度',
borderColor: '边框颜色',
borderRadius: '边框半径',
@ -948,12 +950,20 @@ export default {
fontWeight: '字体粗细',
lineHeight: '行高',
letterSpacing: '字间距',
textAlign: '对齐方式',
textAlign: '左右对齐',
opacity: '透明度',
aline_left: '左对齐',
aline_center: '居中',
aline_right: '右对齐',
select_component: '请选择组件'
verticalAlign: '上下对齐',
text_align_left: '左对齐',
text_align_center: '左右居中',
text_align_right: '右对齐',
vertical_align_top: '上对齐',
vertical_align_middle: '居中对齐',
vertical_align_bottom: '下对齐',
border_style_solid: '实线',
border_style_dashed: '虚线',
select_component: '请选择组件',
other_module: '其他',
content: '内容'
},
plugin: {
local_install: '本地安裝',

View File

@ -701,7 +701,8 @@ export default {
y_M_d_H_m: '年月日时分',
y_M_d_H_m_s: '年月日时分秒',
date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd'
date_split: 'yyyy/MM/dd',
chartName: '新建视图'
},
dataset: {
sheet_warn: '有多个Sheet页默认抽取第一个',
@ -941,6 +942,7 @@ export default {
width: '宽',
color: '颜色',
backgroundColor: '背景色',
borderStyle: '边框风格',
borderWidth: '边框宽度',
borderColor: '边框颜色',
borderRadius: '边框半径',
@ -948,12 +950,20 @@ export default {
fontWeight: '字体粗细',
lineHeight: '行高',
letterSpacing: '字间距',
textAlign: '对齐方式',
textAlign: '左右对齐',
opacity: '透明度',
aline_left: '左对齐',
aline_center: '居中',
aline_right: '右对齐',
select_component: '请选择组件'
verticalAlign: '上下对齐',
text_align_left: '左对齐',
text_align_center: '左右居中',
text_align_right: '右对齐',
vertical_align_top: '上对齐',
vertical_align_middle: '居中对齐',
vertical_align_bottom: '下对齐',
border_style_solid: '实线',
border_style_dashed: '虚线',
select_component: '请选择组件',
other_module: '其他',
content: '内容'
},
plugin: {
local_install: '本地安装',

View File

@ -1,5 +1,5 @@
<template>
<div v-if="!licstatus" class="lic">
<div v-if="!licValidate && licStatus !== 'no_record'" class="lic">
<strong>{{ $t(licMsg) }}</strong>
</div>
</template>
@ -20,9 +20,12 @@ export default {
theme() {
return this.$store.state.settings.theme
},
licstatus() {
licValidate() {
return this.$store.state.lic.validate
},
licStatus() {
return this.$store.state.lic.licStatus || ''
},
licMsg() {
return this.$store.state.lic.licMsg ? ('license.' + this.$store.state.lic.licMsg) : null
}

View File

@ -152,12 +152,8 @@ const hasPermission = (router, user_permissions) => {
}
return true
}
const xpackMenuNames = ['system-param', 'system-plugin']
const filterLic = (router) => {
if (xpackMenuNames.some(name => name === router.name) && !store.getters.validate) {
return false
}
return true
return !router.isPlugin || store.getters.validate
}
router.afterEach(() => {
// finish progress bar

View File

@ -72,12 +72,12 @@ const data = {
},
setCurComponent(state, { component, index }) {
console.log('curComponent' + JSON.stringify(component))
state.curComponent = component
state.curComponentIndex = index
},
setCurCanvasScale(state, curCanvasScale) {
debugger
state.curCanvasScale = curCanvasScale
},
@ -87,6 +87,7 @@ const data = {
if (width) curComponent.style.width = parseInt(canvasStyleData.selfAdaption ? (width * 100 / curCanvasScale.scaleWidth) : width)
if (height) curComponent.style.height = parseInt(canvasStyleData.selfAdaption ? (height * 100 / curCanvasScale.scaleHeight) : height)
if (rotate) curComponent.style.rotate = rotate
console.log('setShapeStyle' + JSON.stringify(curComponent))
},
setShapeSingleStyle({ curComponent }, { key, value }) {

View File

@ -1,6 +1,7 @@
import { validateLic } from '@/api/system/lic'
const state = {
validate: true,
licStatus: null,
licMsg: null
}
@ -10,6 +11,9 @@ const mutations = {
},
SET_LIC_MSG: (state, msg) => {
state.licMsg = msg
},
SET_LIC_STATUS: (state, data) => {
state.licStatus = data
}
}
@ -22,8 +26,15 @@ const actions = {
return new Promise((resolve, reject) => {
validateLic().then(response => {
const { data } = response
commit('SET_VALIDATE', true)
commit('SET_LIC_MSG', null)
if (data && data.status && data.status === 'no_record') {
commit('SET_VALIDATE', false)
commit('SET_LIC_MSG', data.message)
commit('SET_LIC_STATUS', data.status)
} else {
commit('SET_VALIDATE', true)
commit('SET_LIC_MSG', null)
}
resolve(data)
}).catch(error => {
commit('SET_VALIDATE', false)

View File

@ -275,7 +275,7 @@ export default {
selectTableFlag: false,
table: {},
tables: [],
chartName: ''
chartName: this.$t('chart.chartName')
}
},
computed: {

View File

@ -0,0 +1,225 @@
<template>
<div class="filter-container" @dragstart="handleDragStart">
<div class="widget-subject">
<div class="filter-header">
<div class="filter-header-text"> 样式组件 </div>
</div>
<div class="filter-widget-content">
<div
v-for="(item, index) in assistList"
:key="index"
:data-id="item.id"
draggable
:data-index="index"
:class="'filter-widget '+ (item.defaultClass || '')"
>
<div class="filter-widget-icon">
<i :class="(item.icon || 'el-icon-setting') + ' widget-icon-i'" />
</div>
<div class="filter-widget-text">{{ item.label }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { assistList } from '@/components/canvas/custom-component/component-list'
export default {
name: 'FilterGroup',
data() {
return {
assistList
}
},
methods: {
handleDragStart(ev) {
ev.dataTransfer.effectAllowed = 'copy'
const dataTrans = {
type: 'assist',
id: ev.target.dataset.id
}
ev.dataTransfer.setData('componentInfo', JSON.stringify(dataTrans))
}
}
}
</script>
<style lang="scss" scoped>
.filter-container {
width: 240px;
overflow: hidden auto;
min-height: 24px;
padding-top: 0px;
padding-bottom: 0px;
position: relative;
height: 940px;
max-height: 976px;
}
.filter-header {
overflow: hidden;
position: relative;
margin-top: 24px;
margin-left: 15px;
align-items: center;
word-break: break-all;
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: nowrap;
}
.filter-header-text {
font-size: 14px;
max-width: 100%;
color: gray;
text-align: left;
white-space: pre;
text-overflow: ellipsis;
position: relative;
flex-shrink: 0;
box-sizing: border-box;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
word-break: break-all;
}
.filter-widget-content {
position: relative;
margin-left: 5px;
}
.filter-widget {
width: 100px;
height: 36px;
position: relative;
float: left;
margin-top: 10px;
margin-left: 10px;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1a3685f2,endColorstr=#1a3685f2);
font-size: 12px;
border-radius: 10px;
cursor: pointer;
overflow: hidden;
}
.time-filter {
background-color: rgba(54,133,242,.1);
.filter-widget-icon {
color: #3685f2;
}
.filter-widget-text {
color: #3d4d66;
}
}
.time-filter:hover {
background-color: #3685f2;
color: #fff;
.filter-widget-icon {
background-color: #3685f2;
color: #fff;
}
.filter-widget-text {
color: #fff;
}
}
.text-filter {
background-color: rgba(35,190,239,.1);
.filter-widget-icon {
color: #23beef;
}
.filter-widget-text {
color: #3d4d66;
}
}
.text-filter:hover {
background-color: #23beef;
color: #fff;
.filter-widget-icon {
background-color: #23beef;
color: #fff;
}
.filter-widget-text {
color: #fff;
}
}
.tree-filter {
background-color: rgba(22,160,132,.1);
.filter-widget-icon {
color: #37b4aa;
}
.filter-widget-text {
color: #3d4d66;
}
}
.tree-filter:hover {
background-color: #37b4aa;
.filter-widget-icon {
color: #37b4aa;
}
.filter-widget-text {
color: #fff;
}
}
.filter-widget-icon {
width: 40px;
height: 36px;
text-align: center;
line-height: 1;
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
justify-content: center;
align-items: center;
flex-direction: row;
flex-wrap: nowrap;
display: flex;
.widget-icon-i {
width: 24px;
height: 24px;
position: relative;
flex-shrink: 0;
font-size: 24px;
margin: auto;
font-family: fineui;
font-style: normal;
-webkit-font-smoothing: antialiased;
text-align: center;
}
}
.filter-widget-text {
font-size: 14px;
height: 36px;
line-height: 36px;
text-align: left;
white-space: pre;
text-overflow: ellipsis;
position: absolute;
inset: 0px 0px 0px 40px;
box-sizing: border-box;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
word-break: break-all;
cursor: pointer;
}
.widget-subject {
display: flow-root;
}
</style>

View File

@ -155,7 +155,7 @@ export default {
})
},
move(offset, direction, speed) {
console.log(speed)
// console.log(speed)
if (!this.transitionEnd) return
this.transitionEnd = false
direction === -1 ? this.currentIndex += offset / this.sliderWidth : this.currentIndex -= offset / this.sliderWidth

View File

@ -194,7 +194,7 @@ export default {
this.$emit('templateEdit', this.template)
},
handleDelete() {
console.log('handleDelete')
// console.log('handleDelete')
}
}
}

View File

@ -85,10 +85,10 @@ export default {
methods: {
handleChange(val) {
console.log(val)
// console.log(val)
},
onChangePanelStyle(parma) {
console.log('parma:' + JSON.stringify(parma))
// console.log('parma:' + JSON.stringify(parma))
},
onColorChange(val) {
this.chart.customAttr.color = val

View File

@ -52,6 +52,23 @@
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
</div>
<!-- 过滤组件 end -->
<!-- 其他组件 start -->
<div tabindex="-1" style="position: relative; margin: 16px auto">
<div style="height: 60px; position: relative">
<div class="button-div-class" style=" text-align: center;line-height: 1;position: absolute;inset: 0px 0px 45px; ">
<el-button circle :class="show&&showIndex===3? 'button-show':'button-closed'" class="el-icon-brush" size="mini" @click="showPanel(3)" />
</div>
<div style=" position: absolute;left: 0px;right: 0px;bottom: 10px; height: 16px;">
<div style=" max-width: 100%;text-align: center;white-space: nowrap;text-overflow: ellipsis;position: relative;flex-shrink: 0;">
{{ $t('panel.other_module') }}
</div>
</div>
</div>
</div>
<div style="height: 1px; position: relative; margin: 0px auto;background-color:#E6E6E6;">
<div style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
</div>
<!-- 其他组件 end -->
</div>
</div>
</de-aside-container>
@ -73,6 +90,7 @@
<view-select v-show=" show && showIndex===0" />
<filter-group v-show=" show &&showIndex===1" />
<subject-setting v-show=" show &&showIndex===2" />
<assist-component v-show=" show &&showIndex===3" />
</el-drawer>
<div
@ -147,8 +165,9 @@ import Toolbar from '@/components/canvas/components/Toolbar'
import { findOne } from '@/api/panel/panel'
import PreviewFullScreen from '@/components/canvas/components/Editor/PreviewFullScreen'
import Preview from '@/components/canvas/components/Editor/Preview'
import AttrList from '@/components/canvas/components/AttrList.vue'
import AttrList from '@/components/canvas/components/AttrList'
import elementResizeDetectorMaker from 'element-resize-detector'
import AssistComponent from '@/views/panel/AssistComponent'
//
import '@/components/canvas/assets/iconfont/iconfont.css'
@ -171,7 +190,8 @@ export default {
SubjectSetting,
PreviewFullScreen,
Preview,
AttrList
AttrList,
AssistComponent
},
data() {
return {
@ -259,7 +279,6 @@ export default {
// div
erd.listenTo(document.getElementById('canvasInfo-main'), element => {
_this.$nextTick(() => {
debugger
_this.restore()
})
})
@ -276,6 +295,9 @@ export default {
if (componentDataTemp && canvasStyleDataTemp) {
this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
this.$store.commit('setCanvasStyle', JSON.parse(canvasStyleDataTemp))
//
this.$store.dispatch('panel/setComponentDataTemp', null)
this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
} else if (panelId) {
findOne(panelId).then(response => {
this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
@ -341,8 +363,15 @@ export default {
const componentInfo = JSON.parse(e.dataTransfer.getData('componentInfo'))
//
if (componentInfo.type === 'view') {
if (componentInfo.type === 'assist') {
//
componentList.forEach(componentTemp => {
if (componentInfo.id === componentTemp.id) {
component = deepCopy(componentTemp)
}
})
} else if (componentInfo.type === 'view') {
//
componentList.forEach(componentTemp => {
if (componentTemp.type === 'view') {
component = deepCopy(componentTemp)
@ -368,6 +397,7 @@ export default {
component = deepCopy(this.currentFilterCom)
}
// position = absolution
component.style.top = e.offsetY
component.style.left = e.offsetX
component.id = newComponentId
@ -386,7 +416,7 @@ export default {
},
handleMouseDown() {
console.log('handleMouseDown123')
// console.log('handleMouseDown123')
this.$store.commit('setClickComponentStatus', false)
},
@ -442,14 +472,13 @@ export default {
return result
},
restore() {
debugger
if (document.getElementById('canvasInfo')) {
this.$nextTick(() => {
const canvasHeight = document.getElementById('canvasInfo').offsetHeight
const canvasWidth = document.getElementById('canvasInfo').offsetWidth
this.outStyle.height = canvasHeight
this.outStyle.width = canvasWidth
console.log(canvasHeight + '--' + canvasWidth)
// console.log(canvasHeight + '--' + canvasWidth)
})
}
}
@ -546,10 +575,10 @@ export default {
background-color: #ffffff!important;
}
.style-aside{
width: 85px;
max-width:85px!important;
width: 200px;
max-width:200px!important;
border: 1px solid #E6E6E6;
padding: 3px;
padding: 10px;
transition: all 0.3s;
}

View File

@ -132,7 +132,7 @@
:move="onMove"
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;background-color: white;"
@end="end2"
>
>
<transition-group class="list-group" :data-value="$t('panel.drag_here')">
<drag-item v-for="(item,index) in selectField" :key="item.id" :item="item" :index="index" @closeItem="closeItem" />
</transition-group>
@ -308,7 +308,7 @@ export default {
},
methods: {
attr(){
attr() {
return 'aaa'
},
loadViews() {
@ -370,9 +370,17 @@ export default {
this.componentSetBreads.push(tail)
},
removeTail() {
this.dataSetBreads = this.dataSetBreads.slice(0, this.dataSetBreads.length - 1)
this.dataSetBreads[this.dataSetBreads.length - 1]['link'] = false
removeTail(bread) {
for (let index = 0; index < this.dataSetBreads.length; index++) {
const element = this.dataSetBreads[index]
if (element.type === bread.type) {
this.dataSetBreads = this.dataSetBreads.slice(0, index + 1)
this.dataSetBreads[this.dataSetBreads.length - 1]['link'] = false
return
}
}
// this.dataSetBreads = this.dataSetBreads.slice(0, this.dataSetBreads.length - 1)
// this.dataSetBreads[this.dataSetBreads.length - 1]['link'] = false
},
comRemoveTail() {
this.componentSetBreads = this.componentSetBreads.slice(0, this.componentSetBreads.length - 1)
@ -385,7 +393,7 @@ export default {
this.showDomType = 'tree'
}
this.removeTail()
this.removeTail(bread)
},
comBackLink(bread) {
this.comShowDomType = 'view'
@ -585,6 +593,9 @@ export default {
.filter-dialog-tabs {
border: 1px solid #E6E6E6;
height: 100%;
>>> div.el-tabs__content {
height: calc(100% - 55px);
}
}
.filter-common {
@ -596,6 +607,11 @@ export default {
margin: 20px 10px !important;
}
.component-result-content {
height: calc(50vh - 140px);
overflow-y: auto;
}
.link-text {
font-weight: 450 !important;
color: #409EFF;

View File

@ -28,7 +28,8 @@
</template>
<script>import componentList from '@/components/canvas/custom-component/component-list'
<script>
import componentList from '@/components/canvas/custom-component/component-list'
import { ApplicationContext } from '@/utils/ApplicationContext'
export default {
name: 'FilterGroup',
@ -73,6 +74,7 @@ export default {
return result
})
}
// console.log('this.widgetSubjects=>' + JSON.stringify(this.widgetSubjects))
},
methods: {
@ -97,7 +99,7 @@ export default {
padding-top: 0px;
padding-bottom: 0px;
position: relative;
height: 940px;
// height: 940px;
max-height: 976px;
}
.filter-header {

View File

@ -367,7 +367,6 @@ export default {
methods: {
closeEditPanelDialog(panelInfo) {
this.editPanel.visible = false
debugger
this.defaultTree()
//
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
@ -618,6 +617,9 @@ export default {
this.$store.commit('refreshSnapshot')
this.$store.commit('setComponentData', [])
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE)
//
this.$store.dispatch('panel/setComponentDataTemp', null)
this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
this.$store.dispatch('panel/setPanelInfo', data)
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
},

View File

@ -99,7 +99,6 @@ export default {
type: 'success',
showClose: true
})
debugger
this.$emit('closeSaveDialog')
})
}).catch(() => {
@ -111,7 +110,6 @@ export default {
type: 'success',
showClose: true
})
debugger
this.$emit('closeSaveDialog')
})
}

View File

@ -88,7 +88,6 @@ export default {
type: 'success',
showClose: true
})
debugger
this.$emit('closeEditTemplateDialog')
})
}).catch(() => {
@ -100,7 +99,6 @@ export default {
type: 'success',
showClose: true
})
debugger
this.$emit('closeEditTemplateDialog')
})
}

View File

@ -49,7 +49,7 @@ export default {
this.$emit('templateEdit', this.template)
},
handleDelete() {
console.log('handleDelete')
// console.log('handleDelete')
}
}
}

View File

@ -184,7 +184,6 @@ export default {
}
},
closeEditTemplateDialog() {
debugger
this.templateDialog.visible = false
this.showCurrentTemplate(this.templateDialog.pid)
},

View File

@ -133,7 +133,6 @@ export default {
methods: {
loadAuth() {
if (this.authCondition && this.showExtent) {
debugger
let authQueryCondition = {}
if (this.dataInfo.direction === 'source') {
// authTarget authSource
@ -153,7 +152,6 @@ export default {
}
},
loadNodes(node, resolve) {
debugger
if (!this.searchStatus) {
if (node.level === 0) {
const queryCondition = {
@ -181,7 +179,6 @@ export default {
},
filterNode(index) {
this.timeMachine = setTimeout(() => {
debugger
if (index === this.changeIndex) {
const queryCondition = {
withExtend: 'parent',

View File

@ -29,10 +29,10 @@
<el-input v-model="form.configuration.username" autocomplete="off" :disabled="formType=='modify'" />
</el-form-item>
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.password')" prop="configuration.password">
<el-input v-model="form.configuration.password" autocomplete="off" show-password />
<el-input v-model="form.configuration.password" autocomplete="off" show-password />
</el-form-item>
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port">
<el-input v-model="form.configuration.port" autocomplete="off" />
<el-input v-model="form.configuration.port" autocomplete="off" />
</el-form-item>
<el-form-item>

View File

@ -150,7 +150,7 @@ export default {
roleIds: [{ required: true, message: this.$t('user.input_roles'), trigger: 'change' }]
},
defaultForm: { id: null, username: null, nickName: null, gender: '男', email: null, enabled: 1, deptId: null, phone: null, roleIds: [] },
defaultForm: { id: null, username: null, nickName: null, gender: '男', email: null, enabled: 1, deptId: null, phone: null, roleIds: [2] },
depts: null,
roles: [],
roleDatas: [],