提交 32a99801 authored 作者: taojinlong's avatar taojinlong

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

...@@ -23,9 +23,9 @@ public class LicenseController { ...@@ -23,9 +23,9 @@ public class LicenseController {
@GetMapping(value = "anonymous/license/validate") @GetMapping(value = "anonymous/license/validate")
public ResultHolder validateLicense() throws Exception { public ResultHolder validateLicense() throws Exception {
// if (!need_validate_lic) { if (!need_validate_lic) {
// return ResultHolder.success(null); return ResultHolder.success(null);
// } }
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense(); F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense();
System.out.println(new Gson().toJson(f2CLicenseResponse)); System.out.println(new Gson().toJson(f2CLicenseResponse));
switch (f2CLicenseResponse.getStatus()) { switch (f2CLicenseResponse.getStatus()) {
......
...@@ -91,7 +91,11 @@ public class DatasourceService { ...@@ -91,7 +91,11 @@ public class DatasourceService {
DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType()); DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType());
DatasourceRequest datasourceRequest = new DatasourceRequest(); DatasourceRequest datasourceRequest = new DatasourceRequest();
datasourceRequest.setDatasource(datasource); 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 { public List<DBTableDTO> getTables(Datasource datasource) throws Exception {
...@@ -144,7 +148,7 @@ public class DatasourceService { ...@@ -144,7 +148,7 @@ public class DatasourceService {
datasourceRequest.setDatasource(datasource); datasourceRequest.setDatasource(datasource);
datasourceProvider.initDataSource(datasourceRequest); datasourceProvider.initDataSource(datasourceRequest);
LogUtil.info("Succsss to init datasource connection pool: " + datasource.getName()); 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); LogUtil.error("Failed to init datasource connection pool: " + datasource.getName(), e);
} }
}); });
......
...@@ -8,20 +8,16 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; ...@@ -8,20 +8,16 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component @Component
public class MyScanner implements BeanDefinitionRegistryPostProcessor { public class MyScanner implements BeanDefinitionRegistryPostProcessor {
@Resource
private MapperScannerConfigurer mapperScannerConfigurer;
private BeanDefinitionRegistry beanDefinitionRegistry; private BeanDefinitionRegistry beanDefinitionRegistry;
@Override @Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException { public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry beanDefinitionRegistry) throws BeansException {
this.beanDefinitionRegistry = beanDefinitionRegistry; this.beanDefinitionRegistry = beanDefinitionRegistry;
System.out.println("-----");
} }
@Override @Override
...@@ -30,9 +26,7 @@ public class MyScanner implements BeanDefinitionRegistryPostProcessor { ...@@ -30,9 +26,7 @@ public class MyScanner implements BeanDefinitionRegistryPostProcessor {
} }
public void scanner() { public void scanner() {
if (null == mapperScannerConfigurer){ MapperScannerConfigurer mapperScannerConfigurer = SpringContextUtil.getBean(MapperScannerConfigurer.class);
mapperScannerConfigurer = SpringContextUtil.getBean(MapperScannerConfigurer.class);
}
mapperScannerConfigurer.postProcessBeanDefinitionRegistry(this.beanDefinitionRegistry); mapperScannerConfigurer.postProcessBeanDefinitionRegistry(this.beanDefinitionRegistry);
} }
......
package io.dataease.plugins.util; 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.dto.PluginSysMenu;
import io.dataease.plugins.common.service.PluginMenuService; import io.dataease.plugins.common.service.PluginMenuService;
import io.dataease.plugins.config.SpringContextUtil; 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.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component
public class PluginUtils { public class PluginUtils {
private static DefaultLicenseService defaultLicenseService;
@Autowired
public void setDefaultLicenseService(DefaultLicenseService defaultLicenseService) {
PluginUtils.defaultLicenseService = defaultLicenseService;
}
public static List<PluginSysMenu> pluginMenus() { 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); Map<String, PluginMenuService> pluginMenuServiceMap = SpringContextUtil.getApplicationContext().getBeansOfType(PluginMenuService.class);
List<PluginSysMenu> menus = pluginMenuServiceMap.values().stream().flatMap(item -> item.menus().stream()).collect(Collectors.toList()); List<PluginSysMenu> menus = pluginMenuServiceMap.values().stream().flatMap(item -> item.menus().stream()).collect(Collectors.toList());
return menus; 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;
}
......
...@@ -131,26 +131,26 @@ public class DorisQueryProvider extends QueryProvider { ...@@ -131,26 +131,26 @@ public class DorisQueryProvider extends QueryProvider {
// 如果原始类型为时间 // 如果原始类型为时间
if (x.getDeExtractType() == 1) { if (x.getDeExtractType() == 1) {
if (x.getDeType() == 2 || x.getDeType() == 3) { 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) { } else if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern()); 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 { } else {
stringBuilder.append(x.getDataeaseName()); stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
} }
} else { } else {
if (x.getDeType() == 1) { if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern()); 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 { } else {
stringBuilder.append(x.getDataeaseName()); stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
} }
} }
return stringBuilder.toString(); return stringBuilder.toString();
}).toArray(String[]::new); }).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")) 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")) 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); .map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new);
String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length); String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length);
......
...@@ -137,26 +137,26 @@ public class MysqlQueryProvider extends QueryProvider { ...@@ -137,26 +137,26 @@ public class MysqlQueryProvider extends QueryProvider {
// 如果原始类型为时间 // 如果原始类型为时间
if (x.getDeExtractType() == 1) { if (x.getDeExtractType() == 1) {
if (x.getDeType() == 2 || x.getDeType() == 3) { 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) { } else if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern()); 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 { } else {
stringBuilder.append(x.getDataeaseName()); stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
} }
} else { } else {
if (x.getDeType() == 1) { if (x.getDeType() == 1) {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern()); 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 { } else {
stringBuilder.append(x.getDataeaseName()); stringBuilder.append(x.getDataeaseName()).append(" as _").append(x.getDataeaseName());
} }
} }
return stringBuilder.toString(); return stringBuilder.toString();
}).toArray(String[]::new); }).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")) 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")) 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); .map(f -> "_" + f.getSummary() + "_" + (StringUtils.equalsIgnoreCase(f.getDataeaseName(), "*") ? "" : f.getDataeaseName()) + " " + f.getSort()).toArray(String[]::new);
String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length); String[] order = Arrays.copyOf(xOrder, xOrder.length + yOrder.length);
......
...@@ -66,100 +66,100 @@ CREATE TABLE IF NOT EXISTS `dataset_group` ( ...@@ -66,100 +66,100 @@ CREATE TABLE IF NOT EXISTS `dataset_group` (
DROP TABLE IF EXISTS `sys_dept`; DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` ( CREATE TABLE `sys_dept` (
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门', `pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
`sub_count` int(5) DEFAULT '0' COMMENT '子部门数目', `sub_count` int(5) DEFAULT '0' COMMENT '子部门数目',
`name` varchar(255) NOT NULL COMMENT '名称', `name` varchar(255) NOT NULL COMMENT '名称',
`dept_sort` int(5) DEFAULT '999' COMMENT '排序', `dept_sort` int(5) DEFAULT '999' COMMENT '排序',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者', `create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者', `update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期', `create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间', `update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`dept_id`) USING BTREE, PRIMARY KEY (`dept_id`) USING BTREE,
KEY `inx_pid` (`pid`) KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='部门'; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='组织机构';
DROP TABLE IF EXISTS `sys_menu`; DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` ( CREATE TABLE `sys_menu` (
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID', `pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
`sub_count` int(5) DEFAULT '0' COMMENT '子菜单数目', `sub_count` int(5) DEFAULT '0' COMMENT '子菜单数目',
`type` int(11) DEFAULT NULL COMMENT '菜单类型', `type` int(11) DEFAULT NULL COMMENT '菜单类型',
`title` varchar(255) DEFAULT NULL COMMENT '菜单标题', `title` varchar(255) DEFAULT NULL COMMENT '菜单标题',
`name` varchar(255) DEFAULT NULL COMMENT '组件名称', `name` varchar(255) DEFAULT NULL COMMENT '组件名称',
`component` varchar(255) DEFAULT NULL COMMENT '组件', `component` varchar(255) DEFAULT NULL COMMENT '组件',
`menu_sort` int(5) DEFAULT NULL COMMENT '排序', `menu_sort` int(5) DEFAULT NULL COMMENT '排序',
`icon` varchar(255) DEFAULT NULL COMMENT '图标', `icon` varchar(255) DEFAULT NULL COMMENT '图标',
`path` varchar(255) DEFAULT NULL COMMENT '链接地址', `path` varchar(255) DEFAULT NULL COMMENT '链接地址',
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链', `i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
`cache` bit(1) DEFAULT b'0' COMMENT '缓存', `cache` bit(1) DEFAULT b'0' COMMENT '缓存',
`hidden` bit(1) DEFAULT b'0' COMMENT '隐藏', `hidden` bit(1) DEFAULT b'0' COMMENT '隐藏',
`permission` varchar(255) DEFAULT NULL COMMENT '权限', `permission` varchar(255) DEFAULT NULL COMMENT '权限',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者', `create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者', `update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期', `create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间', `update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`menu_id`) USING BTREE, PRIMARY KEY (`menu_id`) USING BTREE,
UNIQUE KEY `uniq_title` (`title`), UNIQUE KEY `uniq_title` (`title`),
UNIQUE KEY `uniq_name` (`name`), UNIQUE KEY `uniq_name` (`name`),
KEY `inx_pid` (`pid`) KEY `inx_pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统菜单'; ) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统菜单';
DROP TABLE IF EXISTS `sys_user`; DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` ( CREATE TABLE `sys_user` (
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称', `dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
`username` varchar(255) DEFAULT NULL COMMENT '用户名', `username` varchar(255) DEFAULT NULL COMMENT '用户名',
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称', `nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
`gender` varchar(2) DEFAULT NULL COMMENT '性别', `gender` varchar(2) DEFAULT NULL COMMENT '性别',
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码', `phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
`email` varchar(255) DEFAULT NULL COMMENT '邮箱', `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
`password` varchar(255) DEFAULT NULL COMMENT '密码', `password` varchar(255) DEFAULT NULL COMMENT '密码',
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号', `is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
`enabled` bigint(20) DEFAULT NULL COMMENT '状态:1启用、0禁用', `enabled` bigint(20) DEFAULT NULL COMMENT '状态:1启用、0禁用',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者', `create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新着', `update_by` varchar(255) DEFAULT NULL COMMENT '更新着',
`pwd_reset_time` bigint(13) DEFAULT NULL COMMENT '修改密码的时间', `pwd_reset_time` bigint(13) DEFAULT NULL COMMENT '修改密码的时间',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期', `create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间', `update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
`language` varchar(20) DEFAULT NULL COMMENT '语言', `language` varchar(20) DEFAULT NULL COMMENT '语言',
PRIMARY KEY (`user_id`) USING BTREE, PRIMARY KEY (`user_id`) USING BTREE,
UNIQUE KEY `UK_kpubos9gc2cvtkb0thktkbkes` (`email`) USING BTREE, UNIQUE KEY `UK_kpubos9gc2cvtkb0thktkbkes` (`email`) USING BTREE,
UNIQUE KEY `username` (`username`) USING BTREE, UNIQUE KEY `username` (`username`) USING BTREE,
UNIQUE KEY `uniq_username` (`username`), UNIQUE KEY `uniq_username` (`username`),
UNIQUE KEY `uniq_email` (`email`), UNIQUE KEY `uniq_email` (`email`),
KEY `FK5rwmryny6jthaaxkogownknqp` (`dept_id`) USING BTREE, KEY `FK5rwmryny6jthaaxkogownknqp` (`dept_id`) USING BTREE,
KEY `inx_enabled` (`enabled`) KEY `inx_enabled` (`enabled`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统用户'; ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统用户';
DROP TABLE IF EXISTS `sys_role`; DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` ( CREATE TABLE `sys_role` (
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) NOT NULL COMMENT '名称', `name` varchar(255) NOT NULL COMMENT '名称',
`description` varchar(255) DEFAULT NULL COMMENT '描述', `description` varchar(255) DEFAULT NULL COMMENT '描述',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者', `create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者', `update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
`create_time` bigint(13) DEFAULT NULL COMMENT '创建日期', `create_time` bigint(13) DEFAULT NULL COMMENT '创建日期',
`update_time` bigint(13) DEFAULT NULL COMMENT '更新时间', `update_time` bigint(13) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`role_id`) USING BTREE, PRIMARY KEY (`role_id`) USING BTREE,
UNIQUE KEY `uniq_name` (`name`), UNIQUE KEY `uniq_name` (`name`),
KEY `role_name_index` (`name`) KEY `role_name_index` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色表'; ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色表';
DROP TABLE IF EXISTS `sys_roles_menus`; DROP TABLE IF EXISTS `sys_roles_menus`;
CREATE TABLE `sys_roles_menus` ( CREATE TABLE `sys_roles_menus` (
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID', `menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID', `role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE, PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色菜单关联'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色菜单关联';
DROP TABLE IF EXISTS `sys_users_roles`; DROP TABLE IF EXISTS `sys_users_roles`;
CREATE TABLE `sys_users_roles` ( CREATE TABLE `sys_users_roles` (
`user_id` bigint(20) NOT NULL COMMENT '用户ID', `user_id` bigint(20) NOT NULL COMMENT '用户ID',
`role_id` bigint(20) NOT NULL COMMENT '角色ID', `role_id` bigint(20) NOT NULL COMMENT '角色ID',
PRIMARY KEY (`user_id`,`role_id`) USING BTREE, PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户角色关联'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户角色关联';
DROP TABLE IF EXISTS `my_plugin`; DROP TABLE IF EXISTS `my_plugin`;
......
...@@ -243,3 +243,4 @@ i18n_auth_source_be_canceled=This Auth Resource Already Be Canceled ...@@ -243,3 +243,4 @@ i18n_auth_source_be_canceled=This Auth Resource Already Be Canceled
i18n_username_exists=ID is already exists i18n_username_exists=ID is already exists
i18n_ds_name_exists=Datasource name exists i18n_ds_name_exists=Datasource name exists
i18n_sync_job_exists=There is already a synchronization task running, please try again later i18n_sync_job_exists=There is already a synchronization task running, please try again later
i18n_datasource_check_fail=Invalid,please check config
...@@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=当前资源授权权限已经被取消 ...@@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=当前资源授权权限已经被取消
i18n_username_exists=用户ID已存在 i18n_username_exists=用户ID已存在
i18n_ds_name_exists=数据源名称已存在 i18n_ds_name_exists=数据源名称已存在
i18n_sync_job_exists=已经有同步任务在运行,稍后重试 i18n_sync_job_exists=已经有同步任务在运行,稍后重试
i18n_datasource_check_fail=校验失败,请检查配置信息
...@@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=當前資源授權權限已經被取消 ...@@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=當前資源授權權限已經被取消
i18n_username_exists=用戶ID已存在 i18n_username_exists=用戶ID已存在
i18n_ds_name_exists=數據源名稱已存在 i18n_ds_name_exists=數據源名稱已存在
i18n_sync_job_exists=已經有同步任務在運行,稍後重試 i18n_sync_job_exists=已經有同步任務在運行,稍後重試
i18n_datasource_check_fail=校驗失敗,請檢查配置信息
<!-- TODO: 这个页面后续将用 JSX 重构 -->
<template> <template>
<div class="attr-list"> <div class="attr-list">
<el-form> <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-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 == 'color'" v-model="curComponent.style[key]" />
<el-color-picker v-else-if="key == 'backgroundColor'" 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-select v-else-if="selectKey.includes(key)" v-model="curComponent.style[key]">
<el-option <template v-if="key == 'textAlign'">
v-for="item in options" <el-option
:key="item.value" v-for="item in textAlignOptions"
:label="item.label" :key="item.value"
:value="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-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-input v-else v-model="curComponent.style[key]" type="number" />
</el-form-item> </el-form-item>
<!-- <el-form-item v-if="curComponent && !excludes.includes(curComponent.component)" label="内容">--> <el-form-item v-if="curComponent && !excludes.includes(curComponent.component)" :label="$t('panel.content')">
<!-- <el-input v-model="curComponent.propValue" type="textarea" />--> <el-input v-model="curComponent.propValue" type="textarea" />
<!-- </el-form-item>--> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -27,21 +45,46 @@ ...@@ -27,21 +45,46 @@
export default { export default {
data() { data() {
return { return {
excludes: ['Picture', 'Group'], // 这些组件不显示内容 excludes: ['Picture', 'Group', 'user-view'], // 这些组件不显示内容
options: [ textAlignOptions: [
{ {
label: this.$t('panel.aline_left'), label: this.$t('panel.text_align_left'),
value: 'left' value: 'left'
}, },
{ {
label: this.$t('panel.aline_center'), label: this.$t('panel.text_align_center'),
value: 'center' value: 'center'
}, },
{ {
label: this.$t('panel.aline_right'), label: this.$t('panel.text_align_right'),
value: '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: { map: {
left: this.$t('panel.left'), left: this.$t('panel.left'),
top: this.$t('panel.top'), top: this.$t('panel.top'),
...@@ -49,6 +92,7 @@ export default { ...@@ -49,6 +92,7 @@ export default {
width: this.$t('panel.width'), width: this.$t('panel.width'),
color: this.$t('panel.color'), color: this.$t('panel.color'),
backgroundColor: this.$t('panel.backgroundColor'), backgroundColor: this.$t('panel.backgroundColor'),
borderStyle: this.$t('panel.borderStyle'),
borderWidth: this.$t('panel.borderWidth'), borderWidth: this.$t('panel.borderWidth'),
borderColor: this.$t('panel.borderColor'), borderColor: this.$t('panel.borderColor'),
borderRadius: this.$t('panel.borderRadius'), borderRadius: this.$t('panel.borderRadius'),
...@@ -57,12 +101,14 @@ export default { ...@@ -57,12 +101,14 @@ export default {
lineHeight: this.$t('panel.lineHeight'), lineHeight: this.$t('panel.lineHeight'),
letterSpacing: this.$t('panel.letterSpacing'), letterSpacing: this.$t('panel.letterSpacing'),
textAlign: this.$t('panel.textAlign'), textAlign: this.$t('panel.textAlign'),
opacity: this.$t('panel.opacity') opacity: this.$t('panel.opacity'),
verticalAlign: this.$t('panel.verticalAlign')
} }
} }
}, },
computed: { computed: {
styleKeys() { styleKeys() {
console.log(this.$store.state.curComponent.style)
return this.$store.state.curComponent ? Object.keys(this.$store.state.curComponent.style) : [] return this.$store.state.curComponent ? Object.keys(this.$store.state.curComponent.style) : []
}, },
curComponent() { curComponent() {
...@@ -73,10 +119,10 @@ export default { ...@@ -73,10 +119,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.attr-list { .attr-list {
overflow: auto; overflow: auto;
padding: 0px; padding: 20px;
padding-top: 0; padding-top: 0;
height: 100%; height: 100%;
} }
</style> </style>
...@@ -127,7 +127,6 @@ export default { ...@@ -127,7 +127,6 @@ export default {
}, },
handleScaleChange() { handleScaleChange() {
if (this.componentData) { if (this.componentData) {
debugger
const componentData = deepCopy(this.componentData) const componentData = deepCopy(this.componentData)
componentData.forEach(component => { componentData.forEach(component => {
Object.keys(component.style).forEach(key => { Object.keys(component.style).forEach(key => {
......
...@@ -334,7 +334,6 @@ export default { ...@@ -334,7 +334,6 @@ export default {
curPoint, curPoint,
symmetricPoint symmetricPoint
}) })
// console.log('this is test:' + JSON.stringify(this.element.propValue.viewId)) // console.log('this is test:' + JSON.stringify(this.element.propValue.viewId))
this.$store.commit('setShapeStyle', style) this.$store.commit('setShapeStyle', style)
this.element.propValue && this.element.propValue.viewId && eventBus.$emit('resizing', this.element.propValue.viewId) this.element.propValue && this.element.propValue.viewId && eventBus.$emit('resizing', this.element.propValue.viewId)
......
...@@ -21,22 +21,20 @@ ...@@ -21,22 +21,20 @@
:index="index" :index="index"
:class="{ lock: item.isLock }" :class="{ lock: item.isLock }"
> >
<!-- item.style-&#45;&#45;{{ item.style }}-->
<!-- item.style-&#45;&#45;{{ getShapeStyleInt(item.style) }}-->
<component <component
:is="item.component" :is="item.component"
v-if="item.type==='custom'" v-if="item.type==='v-text'"
:id="'component' + item.id" :id="'component' + item.id"
class="component" class="component"
:style="item.style" :style="getComponentStyleDefault(item.style)"
:out-style="getShapeStyleInt(item.style)" :prop-value="item.propValue"
:element="item" :element="item"
:out-style="getShapeStyleInt(item.style)"
@input="handleInput"
/> />
<component <component
:is="item.component" :is="item.component"
v-else v-else-if="item.type==='other'"
:id="'component' + item.id" :id="'component' + item.id"
class="component" class="component"
:style="getComponentStyle(item.style)" :style="getComponentStyle(item.style)"
...@@ -45,6 +43,16 @@ ...@@ -45,6 +43,16 @@
:filter="filter" :filter="filter"
:out-style="getShapeStyleInt(item.style)" :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 <!-- <component
:is="item.component" :is="item.component"
v-else v-else
...@@ -365,6 +373,11 @@ export default { ...@@ -365,6 +373,11 @@ export default {
return result return result
}, },
getComponentStyleDefault(style) {
return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
// return style
},
getComponentStyle(style) { getComponentStyle(style) {
// return getStyle(style, ['top', 'left', 'width', 'height', 'rotate']) // return getStyle(style, ['top', 'left', 'width', 'height', 'rotate'])
return style return style
...@@ -372,7 +385,8 @@ export default { ...@@ -372,7 +385,8 @@ export default {
handleInput(element, value) { handleInput(element, value) {
// 根据文本组件高度调整 shape 高度 // 根据文本组件高度调整 shape 高度
this.$store.commit('setShapeStyle', { height: this.getTextareaHeight(element, value) }) // remain -自适应画布会导致一些问题 暂时不修改
// this.$store.commit('setShapeStyle', { height: this.getTextareaHeight(element, value) })
}, },
getTextareaHeight(element, text) { getTextareaHeight(element, text) {
......
...@@ -11,6 +11,25 @@ export const commonAttr = { ...@@ -11,6 +11,25 @@ export const commonAttr = {
isLock: false // 是否锁定组件 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 = [ const list = [
{ {
...@@ -19,7 +38,7 @@ const list = [ ...@@ -19,7 +38,7 @@ const list = [
label: '文字', label: '文字',
propValue: '双击编辑文字', propValue: '双击编辑文字',
icon: 'wenben', icon: 'wenben',
type: 'other', type: 'v-text',
style: { style: {
width: 200, width: 200,
height: 22, height: 22,
...@@ -37,7 +56,7 @@ const list = [ ...@@ -37,7 +56,7 @@ const list = [
label: '按钮', label: '按钮',
propValue: '按钮', propValue: '按钮',
icon: 'button', icon: 'button',
type: 'other', type: 'v-button',
style: { style: {
width: 100, width: 100,
height: 34, height: 34,
...@@ -58,7 +77,7 @@ const list = [ ...@@ -58,7 +77,7 @@ const list = [
component: 'Picture', component: 'Picture',
label: '图片', label: '图片',
icon: 'tupian', icon: 'tupian',
type: 'other', type: 'Picture',
propValue: require('@/components/canvas/assets/title.jpg'), propValue: require('@/components/canvas/assets/title.jpg'),
style: { style: {
width: 300, width: 300,
...@@ -71,7 +90,7 @@ const list = [ ...@@ -71,7 +90,7 @@ const list = [
component: 'Picture', component: 'Picture',
label: '背景-科技1', label: '背景-科技1',
icon: 'tupian', icon: 'tupian',
type: 'other', type: 'Picture',
propValue: require('@/components/canvas/assets/bg-kj-1.jpg'), propValue: require('@/components/canvas/assets/bg-kj-1.jpg'),
style: { style: {
width: 600, width: 600,
...@@ -83,9 +102,9 @@ const list = [ ...@@ -83,9 +102,9 @@ const list = [
id: '10004', id: '10004',
component: 'rect-shape', component: 'rect-shape',
label: '矩形', label: '矩形',
propValue: '&nbsp;', propValue: '',
icon: 'juxing', icon: 'juxing',
type: 'other', type: 'rect-shape',
style: { style: {
width: 200, width: 200,
height: 200, height: 200,
...@@ -112,7 +131,7 @@ const list = [ ...@@ -112,7 +131,7 @@ const list = [
style: { style: {
width: 200, width: 200,
height: 300, height: 300,
borderWidth: 1 borderRadius: ''
} }
} }
] ]
......
...@@ -17,7 +17,6 @@ export default { ...@@ -17,7 +17,6 @@ export default {
}, },
redo(state) { redo(state) {
debugger
if (state.snapshotIndex < state.snapshotData.length - 1) { if (state.snapshotIndex < state.snapshotData.length - 1) {
state.snapshotIndex++ state.snapshotIndex++
store.commit('setComponentData', deepCopy(state.snapshotData[state.snapshotIndex])) store.commit('setComponentData', deepCopy(state.snapshotData[state.snapshotIndex]))
......
...@@ -701,7 +701,8 @@ export default { ...@@ -701,7 +701,8 @@ export default {
y_M_d_H_m: 'Year Month Day Hour Minute', y_M_d_H_m: 'Year Month Day Hour Minute',
y_M_d_H_m_s: 'Year Month Day Hour Minute Second', y_M_d_H_m_s: 'Year Month Day Hour Minute Second',
date_sub: 'yyyy-MM-dd', date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd' date_split: 'yyyy/MM/dd',
chartName: 'New Chart'
}, },
dataset: { dataset: {
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
...@@ -941,6 +942,7 @@ export default { ...@@ -941,6 +942,7 @@ export default {
width: 'Width', width: 'Width',
color: 'Color', color: 'Color',
backgroundColor: 'BackgroundColor', backgroundColor: 'BackgroundColor',
borderStyle: 'Border Style',
borderWidth: 'BorderWidth', borderWidth: 'BorderWidth',
borderColor: 'BorderColor', borderColor: 'BorderColor',
borderRadius: 'BorderRadius', borderRadius: 'BorderRadius',
...@@ -950,10 +952,18 @@ export default { ...@@ -950,10 +952,18 @@ export default {
letterSpacing: 'LetterSpacing', letterSpacing: 'LetterSpacing',
textAlign: 'TextAlign', textAlign: 'TextAlign',
opacity: 'Opacity', opacity: 'Opacity',
aline_left: 'Aline Left', verticalAlign: 'Vertical Align',
aline_center: 'Aline Center', text_align_left: 'Aline Left',
aline_right: 'Aline Right', text_align_center: 'Aline Center',
select_component: 'Check Component' 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: { plugin: {
local_install: 'Local installation', local_install: 'Local installation',
......
...@@ -701,7 +701,8 @@ export default { ...@@ -701,7 +701,8 @@ export default {
y_M_d_H_m: '年月日時分', y_M_d_H_m: '年月日時分',
y_M_d_H_m_s: '年月日時分秒', y_M_d_H_m_s: '年月日時分秒',
date_sub: 'yyyy-MM-dd', date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd' date_split: 'yyyy/MM/dd',
chartName: '新建視圖'
}, },
dataset: { dataset: {
sheet_warn: '有多個sheet頁面,默認抽取第一個', sheet_warn: '有多個sheet頁面,默認抽取第一個',
...@@ -941,6 +942,7 @@ export default { ...@@ -941,6 +942,7 @@ export default {
width: '宽', width: '宽',
color: '颜色', color: '颜色',
backgroundColor: '背景色', backgroundColor: '背景色',
borderStyle: '边框风格',
borderWidth: '边框宽度', borderWidth: '边框宽度',
borderColor: '边框颜色', borderColor: '边框颜色',
borderRadius: '边框半径', borderRadius: '边框半径',
...@@ -948,12 +950,20 @@ export default { ...@@ -948,12 +950,20 @@ export default {
fontWeight: '字体粗细', fontWeight: '字体粗细',
lineHeight: '行高', lineHeight: '行高',
letterSpacing: '字间距', letterSpacing: '字间距',
textAlign: '对齐方式', textAlign: '左右对齐',
opacity: '透明度', opacity: '透明度',
aline_left: '左对齐', verticalAlign: '上下对齐',
aline_center: '居中', text_align_left: '左对齐',
aline_right: '右对齐', text_align_center: '左右居中',
select_component: '请选择组件' text_align_right: '右对齐',
vertical_align_top: '上对齐',
vertical_align_middle: '居中对齐',
vertical_align_bottom: '下对齐',
border_style_solid: '实线',
border_style_dashed: '虚线',
select_component: '请选择组件',
other_module: '其他',
content: '内容'
}, },
plugin: { plugin: {
local_install: '本地安裝', local_install: '本地安裝',
......
...@@ -701,7 +701,8 @@ export default { ...@@ -701,7 +701,8 @@ export default {
y_M_d_H_m: '年月日时分', y_M_d_H_m: '年月日时分',
y_M_d_H_m_s: '年月日时分秒', y_M_d_H_m_s: '年月日时分秒',
date_sub: 'yyyy-MM-dd', date_sub: 'yyyy-MM-dd',
date_split: 'yyyy/MM/dd' date_split: 'yyyy/MM/dd',
chartName: '新建视图'
}, },
dataset: { dataset: {
sheet_warn: '有多个Sheet页,默认抽取第一个', sheet_warn: '有多个Sheet页,默认抽取第一个',
...@@ -941,6 +942,7 @@ export default { ...@@ -941,6 +942,7 @@ export default {
width: '宽', width: '宽',
color: '颜色', color: '颜色',
backgroundColor: '背景色', backgroundColor: '背景色',
borderStyle: '边框风格',
borderWidth: '边框宽度', borderWidth: '边框宽度',
borderColor: '边框颜色', borderColor: '边框颜色',
borderRadius: '边框半径', borderRadius: '边框半径',
...@@ -948,12 +950,20 @@ export default { ...@@ -948,12 +950,20 @@ export default {
fontWeight: '字体粗细', fontWeight: '字体粗细',
lineHeight: '行高', lineHeight: '行高',
letterSpacing: '字间距', letterSpacing: '字间距',
textAlign: '对齐方式', textAlign: '左右对齐',
opacity: '透明度', opacity: '透明度',
aline_left: '左对齐', verticalAlign: '上下对齐',
aline_center: '居中', text_align_left: '左对齐',
aline_right: '右对齐', text_align_center: '左右居中',
select_component: '请选择组件' text_align_right: '右对齐',
vertical_align_top: '上对齐',
vertical_align_middle: '居中对齐',
vertical_align_bottom: '下对齐',
border_style_solid: '实线',
border_style_dashed: '虚线',
select_component: '请选择组件',
other_module: '其他',
content: '内容'
}, },
plugin: { plugin: {
local_install: '本地安装', local_install: '本地安装',
......
<template> <template>
<div v-if="!licstatus" class="lic"> <div v-if="!licValidate && licStatus !== 'no_record'" class="lic">
<strong>{{ $t(licMsg) }}</strong> <strong>{{ $t(licMsg) }}</strong>
</div> </div>
</template> </template>
...@@ -20,9 +20,12 @@ export default { ...@@ -20,9 +20,12 @@ export default {
theme() { theme() {
return this.$store.state.settings.theme return this.$store.state.settings.theme
}, },
licstatus() { licValidate() {
return this.$store.state.lic.validate return this.$store.state.lic.validate
}, },
licStatus() {
return this.$store.state.lic.licStatus || ''
},
licMsg() { licMsg() {
return this.$store.state.lic.licMsg ? ('license.' + this.$store.state.lic.licMsg) : null return this.$store.state.lic.licMsg ? ('license.' + this.$store.state.lic.licMsg) : null
} }
......
...@@ -152,12 +152,8 @@ const hasPermission = (router, user_permissions) => { ...@@ -152,12 +152,8 @@ const hasPermission = (router, user_permissions) => {
} }
return true return true
} }
const xpackMenuNames = ['system-param', 'system-plugin']
const filterLic = (router) => { const filterLic = (router) => {
if (xpackMenuNames.some(name => name === router.name) && !store.getters.validate) { return !router.isPlugin || store.getters.validate
return false
}
return true
} }
router.afterEach(() => { router.afterEach(() => {
// finish progress bar // finish progress bar
......
...@@ -72,12 +72,12 @@ const data = { ...@@ -72,12 +72,12 @@ const data = {
}, },
setCurComponent(state, { component, index }) { setCurComponent(state, { component, index }) {
console.log('curComponent' + JSON.stringify(component))
state.curComponent = component state.curComponent = component
state.curComponentIndex = index state.curComponentIndex = index
}, },
setCurCanvasScale(state, curCanvasScale) { setCurCanvasScale(state, curCanvasScale) {
debugger
state.curCanvasScale = curCanvasScale state.curCanvasScale = curCanvasScale
}, },
...@@ -87,6 +87,7 @@ const data = { ...@@ -87,6 +87,7 @@ const data = {
if (width) curComponent.style.width = parseInt(canvasStyleData.selfAdaption ? (width * 100 / curCanvasScale.scaleWidth) : width) 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 (height) curComponent.style.height = parseInt(canvasStyleData.selfAdaption ? (height * 100 / curCanvasScale.scaleHeight) : height)
if (rotate) curComponent.style.rotate = rotate if (rotate) curComponent.style.rotate = rotate
console.log('setShapeStyle' + JSON.stringify(curComponent))
}, },
setShapeSingleStyle({ curComponent }, { key, value }) { setShapeSingleStyle({ curComponent }, { key, value }) {
......
import { validateLic } from '@/api/system/lic' import { validateLic } from '@/api/system/lic'
const state = { const state = {
validate: true, validate: true,
licStatus: null,
licMsg: null licMsg: null
} }
...@@ -10,6 +11,9 @@ const mutations = { ...@@ -10,6 +11,9 @@ const mutations = {
}, },
SET_LIC_MSG: (state, msg) => { SET_LIC_MSG: (state, msg) => {
state.licMsg = msg state.licMsg = msg
},
SET_LIC_STATUS: (state, data) => {
state.licStatus = data
} }
} }
...@@ -22,8 +26,15 @@ const actions = { ...@@ -22,8 +26,15 @@ const actions = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
validateLic().then(response => { validateLic().then(response => {
const { data } = response const { data } = response
commit('SET_VALIDATE', true) if (data && data.status && data.status === 'no_record') {
commit('SET_LIC_MSG', null) 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) resolve(data)
}).catch(error => { }).catch(error => {
commit('SET_VALIDATE', false) commit('SET_VALIDATE', false)
......
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
selectTableFlag: false, selectTableFlag: false,
table: {}, table: {},
tables: [], tables: [],
chartName: '' chartName: this.$t('chart.chartName')
} }
}, },
computed: { computed: {
......
<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>
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
}) })
}, },
move(offset, direction, speed) { move(offset, direction, speed) {
console.log(speed) // console.log(speed)
if (!this.transitionEnd) return if (!this.transitionEnd) return
this.transitionEnd = false this.transitionEnd = false
direction === -1 ? this.currentIndex += offset / this.sliderWidth : this.currentIndex -= offset / this.sliderWidth direction === -1 ? this.currentIndex += offset / this.sliderWidth : this.currentIndex -= offset / this.sliderWidth
......
...@@ -194,7 +194,7 @@ export default { ...@@ -194,7 +194,7 @@ export default {
this.$emit('templateEdit', this.template) this.$emit('templateEdit', this.template)
}, },
handleDelete() { handleDelete() {
console.log('handleDelete') // console.log('handleDelete')
} }
} }
} }
......
...@@ -85,10 +85,10 @@ export default { ...@@ -85,10 +85,10 @@ export default {
methods: { methods: {
handleChange(val) { handleChange(val) {
console.log(val) // console.log(val)
}, },
onChangePanelStyle(parma) { onChangePanelStyle(parma) {
console.log('parma:' + JSON.stringify(parma)) // console.log('parma:' + JSON.stringify(parma))
}, },
onColorChange(val) { onColorChange(val) {
this.chart.customAttr.color = val this.chart.customAttr.color = val
......
...@@ -52,6 +52,23 @@ ...@@ -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 style="width: 60px;height: 1px;line-height: 1px;text-align: center;white-space: pre;text-overflow: ellipsis;position: relative;flex-shrink: 0;" />
</div> </div>
<!-- 过滤组件 end --> <!-- 过滤组件 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>
</div> </div>
</de-aside-container> </de-aside-container>
...@@ -73,6 +90,7 @@ ...@@ -73,6 +90,7 @@
<view-select v-show=" show && showIndex===0" /> <view-select v-show=" show && showIndex===0" />
<filter-group v-show=" show &&showIndex===1" /> <filter-group v-show=" show &&showIndex===1" />
<subject-setting v-show=" show &&showIndex===2" /> <subject-setting v-show=" show &&showIndex===2" />
<assist-component v-show=" show &&showIndex===3" />
</el-drawer> </el-drawer>
<div <div
...@@ -147,8 +165,9 @@ import Toolbar from '@/components/canvas/components/Toolbar' ...@@ -147,8 +165,9 @@ import Toolbar from '@/components/canvas/components/Toolbar'
import { findOne } from '@/api/panel/panel' import { findOne } from '@/api/panel/panel'
import PreviewFullScreen from '@/components/canvas/components/Editor/PreviewFullScreen' import PreviewFullScreen from '@/components/canvas/components/Editor/PreviewFullScreen'
import Preview from '@/components/canvas/components/Editor/Preview' 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 elementResizeDetectorMaker from 'element-resize-detector'
import AssistComponent from '@/views/panel/AssistComponent'
// 引入样式 // 引入样式
import '@/components/canvas/assets/iconfont/iconfont.css' import '@/components/canvas/assets/iconfont/iconfont.css'
...@@ -171,7 +190,8 @@ export default { ...@@ -171,7 +190,8 @@ export default {
SubjectSetting, SubjectSetting,
PreviewFullScreen, PreviewFullScreen,
Preview, Preview,
AttrList AttrList,
AssistComponent
}, },
data() { data() {
return { return {
...@@ -259,7 +279,6 @@ export default { ...@@ -259,7 +279,6 @@ export default {
// 监听div变动事件 // 监听div变动事件
erd.listenTo(document.getElementById('canvasInfo-main'), element => { erd.listenTo(document.getElementById('canvasInfo-main'), element => {
_this.$nextTick(() => { _this.$nextTick(() => {
debugger
_this.restore() _this.restore()
}) })
}) })
...@@ -276,6 +295,9 @@ export default { ...@@ -276,6 +295,9 @@ export default {
if (componentDataTemp && canvasStyleDataTemp) { if (componentDataTemp && canvasStyleDataTemp) {
this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp))) this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
this.$store.commit('setCanvasStyle', JSON.parse(canvasStyleDataTemp)) this.$store.commit('setCanvasStyle', JSON.parse(canvasStyleDataTemp))
// 清空临时画布数据
this.$store.dispatch('panel/setComponentDataTemp', null)
this.$store.dispatch('panel/setCanvasStyleDataTemp', null)
} else if (panelId) { } else if (panelId) {
findOne(panelId).then(response => { findOne(panelId).then(response => {
this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData))) this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
...@@ -341,8 +363,15 @@ export default { ...@@ -341,8 +363,15 @@ export default {
const componentInfo = JSON.parse(e.dataTransfer.getData('componentInfo')) const componentInfo = JSON.parse(e.dataTransfer.getData('componentInfo'))
// 用户视图设置 复制一个模板 if (componentInfo.type === 'assist') {
if (componentInfo.type === 'view') { // 辅助设计组件
componentList.forEach(componentTemp => {
if (componentInfo.id === componentTemp.id) {
component = deepCopy(componentTemp)
}
})
} else if (componentInfo.type === 'view') {
// 用户视图设置 复制一个模板
componentList.forEach(componentTemp => { componentList.forEach(componentTemp => {
if (componentTemp.type === 'view') { if (componentTemp.type === 'view') {
component = deepCopy(componentTemp) component = deepCopy(componentTemp)
...@@ -368,6 +397,7 @@ export default { ...@@ -368,6 +397,7 @@ export default {
component = deepCopy(this.currentFilterCom) component = deepCopy(this.currentFilterCom)
} }
// position = absolution 或导致有偏移 这里中和一下偏移量
component.style.top = e.offsetY component.style.top = e.offsetY
component.style.left = e.offsetX component.style.left = e.offsetX
component.id = newComponentId component.id = newComponentId
...@@ -386,7 +416,7 @@ export default { ...@@ -386,7 +416,7 @@ export default {
}, },
handleMouseDown() { handleMouseDown() {
console.log('handleMouseDown123') // console.log('handleMouseDown123')
this.$store.commit('setClickComponentStatus', false) this.$store.commit('setClickComponentStatus', false)
}, },
...@@ -442,14 +472,13 @@ export default { ...@@ -442,14 +472,13 @@ export default {
return result return result
}, },
restore() { restore() {
debugger
if (document.getElementById('canvasInfo')) { if (document.getElementById('canvasInfo')) {
this.$nextTick(() => { this.$nextTick(() => {
const canvasHeight = document.getElementById('canvasInfo').offsetHeight const canvasHeight = document.getElementById('canvasInfo').offsetHeight
const canvasWidth = document.getElementById('canvasInfo').offsetWidth const canvasWidth = document.getElementById('canvasInfo').offsetWidth
this.outStyle.height = canvasHeight this.outStyle.height = canvasHeight
this.outStyle.width = canvasWidth this.outStyle.width = canvasWidth
console.log(canvasHeight + '--' + canvasWidth) // console.log(canvasHeight + '--' + canvasWidth)
}) })
} }
} }
...@@ -546,10 +575,10 @@ export default { ...@@ -546,10 +575,10 @@ export default {
background-color: #ffffff!important; background-color: #ffffff!important;
} }
.style-aside{ .style-aside{
width: 85px; width: 200px;
max-width:85px!important; max-width:200px!important;
border: 1px solid #E6E6E6; border: 1px solid #E6E6E6;
padding: 3px; padding: 10px;
transition: all 0.3s; transition: all 0.3s;
} }
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
:move="onMove" :move="onMove"
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;background-color: white;" style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;overflow-x: auto;display: flex;align-items: center;background-color: white;"
@end="end2" @end="end2"
> >
<transition-group class="list-group" :data-value="$t('panel.drag_here')"> <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" /> <drag-item v-for="(item,index) in selectField" :key="item.id" :item="item" :index="index" @closeItem="closeItem" />
</transition-group> </transition-group>
...@@ -308,7 +308,7 @@ export default { ...@@ -308,7 +308,7 @@ export default {
}, },
methods: { methods: {
attr(){ attr() {
return 'aaa' return 'aaa'
}, },
loadViews() { loadViews() {
...@@ -370,9 +370,17 @@ export default { ...@@ -370,9 +370,17 @@ export default {
this.componentSetBreads.push(tail) this.componentSetBreads.push(tail)
}, },
removeTail() { removeTail(bread) {
this.dataSetBreads = this.dataSetBreads.slice(0, this.dataSetBreads.length - 1) for (let index = 0; index < this.dataSetBreads.length; index++) {
this.dataSetBreads[this.dataSetBreads.length - 1]['link'] = false 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() { comRemoveTail() {
this.componentSetBreads = this.componentSetBreads.slice(0, this.componentSetBreads.length - 1) this.componentSetBreads = this.componentSetBreads.slice(0, this.componentSetBreads.length - 1)
...@@ -385,7 +393,7 @@ export default { ...@@ -385,7 +393,7 @@ export default {
this.showDomType = 'tree' this.showDomType = 'tree'
} }
this.removeTail() this.removeTail(bread)
}, },
comBackLink(bread) { comBackLink(bread) {
this.comShowDomType = 'view' this.comShowDomType = 'view'
...@@ -585,6 +593,9 @@ export default { ...@@ -585,6 +593,9 @@ export default {
.filter-dialog-tabs { .filter-dialog-tabs {
border: 1px solid #E6E6E6; border: 1px solid #E6E6E6;
height: 100%; height: 100%;
>>> div.el-tabs__content {
height: calc(100% - 55px);
}
} }
.filter-common { .filter-common {
...@@ -596,6 +607,11 @@ export default { ...@@ -596,6 +607,11 @@ export default {
margin: 20px 10px !important; margin: 20px 10px !important;
} }
.component-result-content {
height: calc(50vh - 140px);
overflow-y: auto;
}
.link-text { .link-text {
font-weight: 450 !important; font-weight: 450 !important;
color: #409EFF; color: #409EFF;
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
</template> </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' import { ApplicationContext } from '@/utils/ApplicationContext'
export default { export default {
name: 'FilterGroup', name: 'FilterGroup',
...@@ -73,6 +74,7 @@ export default { ...@@ -73,6 +74,7 @@ export default {
return result return result
}) })
} }
// console.log('this.widgetSubjects=>' + JSON.stringify(this.widgetSubjects))
}, },
methods: { methods: {
...@@ -97,7 +99,7 @@ export default { ...@@ -97,7 +99,7 @@ export default {
padding-top: 0px; padding-top: 0px;
padding-bottom: 0px; padding-bottom: 0px;
position: relative; position: relative;
height: 940px; // height: 940px;
max-height: 976px; max-height: 976px;
} }
.filter-header { .filter-header {
......
...@@ -367,7 +367,6 @@ export default { ...@@ -367,7 +367,6 @@ export default {
methods: { methods: {
closeEditPanelDialog(panelInfo) { closeEditPanelDialog(panelInfo) {
this.editPanel.visible = false this.editPanel.visible = false
debugger
this.defaultTree() this.defaultTree()
// 默认展开 同时点击 新增的节点 // 默认展开 同时点击 新增的节点
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) { if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
...@@ -618,6 +617,9 @@ export default { ...@@ -618,6 +617,9 @@ export default {
this.$store.commit('refreshSnapshot') this.$store.commit('refreshSnapshot')
this.$store.commit('setComponentData', []) this.$store.commit('setComponentData', [])
this.$store.commit('setCanvasStyle', DEFAULT_COMMON_CANVAS_STYLE) 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) this.$store.dispatch('panel/setPanelInfo', data)
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
}, },
......
...@@ -99,7 +99,6 @@ export default { ...@@ -99,7 +99,6 @@ export default {
type: 'success', type: 'success',
showClose: true showClose: true
}) })
debugger
this.$emit('closeSaveDialog') this.$emit('closeSaveDialog')
}) })
}).catch(() => { }).catch(() => {
...@@ -111,7 +110,6 @@ export default { ...@@ -111,7 +110,6 @@ export default {
type: 'success', type: 'success',
showClose: true showClose: true
}) })
debugger
this.$emit('closeSaveDialog') this.$emit('closeSaveDialog')
}) })
} }
......
...@@ -88,7 +88,6 @@ export default { ...@@ -88,7 +88,6 @@ export default {
type: 'success', type: 'success',
showClose: true showClose: true
}) })
debugger
this.$emit('closeEditTemplateDialog') this.$emit('closeEditTemplateDialog')
}) })
}).catch(() => { }).catch(() => {
...@@ -100,7 +99,6 @@ export default { ...@@ -100,7 +99,6 @@ export default {
type: 'success', type: 'success',
showClose: true showClose: true
}) })
debugger
this.$emit('closeEditTemplateDialog') this.$emit('closeEditTemplateDialog')
}) })
} }
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
this.$emit('templateEdit', this.template) this.$emit('templateEdit', this.template)
}, },
handleDelete() { handleDelete() {
console.log('handleDelete') // console.log('handleDelete')
} }
} }
} }
......
...@@ -184,7 +184,6 @@ export default { ...@@ -184,7 +184,6 @@ export default {
} }
}, },
closeEditTemplateDialog() { closeEditTemplateDialog() {
debugger
this.templateDialog.visible = false this.templateDialog.visible = false
this.showCurrentTemplate(this.templateDialog.pid) this.showCurrentTemplate(this.templateDialog.pid)
}, },
......
...@@ -133,7 +133,6 @@ export default { ...@@ -133,7 +133,6 @@ export default {
methods: { methods: {
loadAuth() { loadAuth() {
if (this.authCondition && this.showExtent) { if (this.authCondition && this.showExtent) {
debugger
let authQueryCondition = {} let authQueryCondition = {}
if (this.dataInfo.direction === 'source') { if (this.dataInfo.direction === 'source') {
// 当前为授权数据 获取当前authTarget 的授权信息 authSource // 当前为授权数据 获取当前authTarget 的授权信息 authSource
...@@ -153,7 +152,6 @@ export default { ...@@ -153,7 +152,6 @@ export default {
} }
}, },
loadNodes(node, resolve) { loadNodes(node, resolve) {
debugger
if (!this.searchStatus) { if (!this.searchStatus) {
if (node.level === 0) { if (node.level === 0) {
const queryCondition = { const queryCondition = {
...@@ -181,7 +179,6 @@ export default { ...@@ -181,7 +179,6 @@ export default {
}, },
filterNode(index) { filterNode(index) {
this.timeMachine = setTimeout(() => { this.timeMachine = setTimeout(() => {
debugger
if (index === this.changeIndex) { if (index === this.changeIndex) {
const queryCondition = { const queryCondition = {
withExtend: 'parent', withExtend: 'parent',
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
<el-input v-model="form.configuration.username" autocomplete="off" :disabled="formType=='modify'" /> <el-input v-model="form.configuration.username" autocomplete="off" :disabled="formType=='modify'" />
</el-form-item> </el-form-item>
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.password')" prop="configuration.password"> <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>
<el-form-item v-if="form.configuration.dataSourceType=='jdbc'" :label="$t('datasource.port')" prop="configuration.port"> <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>
<el-form-item> <el-form-item>
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
roleIds: [{ required: true, message: this.$t('user.input_roles'), trigger: 'change' }] 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, depts: null,
roles: [], roles: [],
roleDatas: [], roleDatas: [],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论