提交 b281eaf0 authored 作者: wangjiahao's avatar wangjiahao

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

...@@ -31,6 +31,8 @@ public class DynamicMenuDto implements Serializable { ...@@ -31,6 +31,8 @@ public class DynamicMenuDto implements Serializable {
private Boolean isPlugin; private Boolean isPlugin;
private Boolean noLayout;
private List<DynamicMenuDto> children; private List<DynamicMenuDto> children;
} }
...@@ -14,10 +14,10 @@ import io.dataease.commons.utils.BeanUtils; ...@@ -14,10 +14,10 @@ import io.dataease.commons.utils.BeanUtils;
import io.dataease.commons.utils.CodingUtil; import io.dataease.commons.utils.CodingUtil;
import io.dataease.commons.utils.ServletUtils; import io.dataease.commons.utils.ServletUtils;
import io.dataease.plugins.config.SpringContextUtil; /*import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto; import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
import io.dataease.plugins.xpack.display.service.DisPlayXpackService; import io.dataease.plugins.xpack.display.service.DisPlayXpackService;*/
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
...@@ -110,7 +110,7 @@ public class AuthServer implements AuthApi { ...@@ -110,7 +110,7 @@ public class AuthServer implements AuthApi {
SysUserEntity userById = authUserService.getUserById(4L); SysUserEntity userById = authUserService.getUserById(4L);
String nickName = userById.getNickName(); String nickName = userById.getNickName();
// System.out.println(nickName); // System.out.println(nickName);
Map<String, DisPlayXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType(DisPlayXpackService.class); /* Map<String, DisPlayXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType(DisPlayXpackService.class);
for (Map.Entry entry : beansOfType.entrySet()) { for (Map.Entry entry : beansOfType.entrySet()) {
Object key = entry.getKey(); Object key = entry.getKey();
DisPlayXpackService value = (DisPlayXpackService)entry.getValue(); DisPlayXpackService value = (DisPlayXpackService)entry.getValue();
...@@ -118,7 +118,7 @@ public class AuthServer implements AuthApi { ...@@ -118,7 +118,7 @@ public class AuthServer implements AuthApi {
String name = entry.getValue().getClass().getName(); String name = entry.getValue().getClass().getName();
System.out.println("key: "+ key + ", value: "+ name); System.out.println("key: "+ key + ", value: "+ name);
} }*/
return "apple"; return "apple";
} }
} }
...@@ -73,6 +73,7 @@ public class DynamicMenuServiceImpl implements DynamicMenuService { ...@@ -73,6 +73,7 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
dynamicMenuDto.setPermission(sysMenu.getPermission()); dynamicMenuDto.setPermission(sysMenu.getPermission());
dynamicMenuDto.setHidden(sysMenu.getHidden()); dynamicMenuDto.setHidden(sysMenu.getHidden());
dynamicMenuDto.setIsPlugin(true); dynamicMenuDto.setIsPlugin(true);
dynamicMenuDto.setNoLayout(!!sysMenu.isNoLayout());
return dynamicMenuDto; return dynamicMenuDto;
} }
......
...@@ -9,10 +9,14 @@ public class MyPlugin implements Serializable { ...@@ -9,10 +9,14 @@ public class MyPlugin implements Serializable {
private String name; private String name;
private String store;
private Boolean free; private Boolean free;
private Integer cost; private Integer cost;
private String category;
private String descript; private String descript;
private String version; private String version;
...@@ -29,8 +33,6 @@ public class MyPlugin implements Serializable { ...@@ -29,8 +33,6 @@ public class MyPlugin implements Serializable {
private String moduleName; private String moduleName;
private String beanName;
private String icon; private String icon;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -234,6 +234,76 @@ public class MyPluginExample { ...@@ -234,6 +234,76 @@ public class MyPluginExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStoreIsNull() {
addCriterion("store is null");
return (Criteria) this;
}
public Criteria andStoreIsNotNull() {
addCriterion("store is not null");
return (Criteria) this;
}
public Criteria andStoreEqualTo(String value) {
addCriterion("store =", value, "store");
return (Criteria) this;
}
public Criteria andStoreNotEqualTo(String value) {
addCriterion("store <>", value, "store");
return (Criteria) this;
}
public Criteria andStoreGreaterThan(String value) {
addCriterion("store >", value, "store");
return (Criteria) this;
}
public Criteria andStoreGreaterThanOrEqualTo(String value) {
addCriterion("store >=", value, "store");
return (Criteria) this;
}
public Criteria andStoreLessThan(String value) {
addCriterion("store <", value, "store");
return (Criteria) this;
}
public Criteria andStoreLessThanOrEqualTo(String value) {
addCriterion("store <=", value, "store");
return (Criteria) this;
}
public Criteria andStoreLike(String value) {
addCriterion("store like", value, "store");
return (Criteria) this;
}
public Criteria andStoreNotLike(String value) {
addCriterion("store not like", value, "store");
return (Criteria) this;
}
public Criteria andStoreIn(List<String> values) {
addCriterion("store in", values, "store");
return (Criteria) this;
}
public Criteria andStoreNotIn(List<String> values) {
addCriterion("store not in", values, "store");
return (Criteria) this;
}
public Criteria andStoreBetween(String value1, String value2) {
addCriterion("store between", value1, value2, "store");
return (Criteria) this;
}
public Criteria andStoreNotBetween(String value1, String value2) {
addCriterion("store not between", value1, value2, "store");
return (Criteria) this;
}
public Criteria andFreeIsNull() { public Criteria andFreeIsNull() {
addCriterion("`free` is null"); addCriterion("`free` is null");
return (Criteria) this; return (Criteria) this;
...@@ -354,6 +424,76 @@ public class MyPluginExample { ...@@ -354,6 +424,76 @@ public class MyPluginExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCategoryIsNull() {
addCriterion("category is null");
return (Criteria) this;
}
public Criteria andCategoryIsNotNull() {
addCriterion("category is not null");
return (Criteria) this;
}
public Criteria andCategoryEqualTo(String value) {
addCriterion("category =", value, "category");
return (Criteria) this;
}
public Criteria andCategoryNotEqualTo(String value) {
addCriterion("category <>", value, "category");
return (Criteria) this;
}
public Criteria andCategoryGreaterThan(String value) {
addCriterion("category >", value, "category");
return (Criteria) this;
}
public Criteria andCategoryGreaterThanOrEqualTo(String value) {
addCriterion("category >=", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLessThan(String value) {
addCriterion("category <", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLessThanOrEqualTo(String value) {
addCriterion("category <=", value, "category");
return (Criteria) this;
}
public Criteria andCategoryLike(String value) {
addCriterion("category like", value, "category");
return (Criteria) this;
}
public Criteria andCategoryNotLike(String value) {
addCriterion("category not like", value, "category");
return (Criteria) this;
}
public Criteria andCategoryIn(List<String> values) {
addCriterion("category in", values, "category");
return (Criteria) this;
}
public Criteria andCategoryNotIn(List<String> values) {
addCriterion("category not in", values, "category");
return (Criteria) this;
}
public Criteria andCategoryBetween(String value1, String value2) {
addCriterion("category between", value1, value2, "category");
return (Criteria) this;
}
public Criteria andCategoryNotBetween(String value1, String value2) {
addCriterion("category not between", value1, value2, "category");
return (Criteria) this;
}
public Criteria andDescriptIsNull() { public Criteria andDescriptIsNull() {
addCriterion("descript is null"); addCriterion("descript is null");
return (Criteria) this; return (Criteria) this;
...@@ -874,76 +1014,6 @@ public class MyPluginExample { ...@@ -874,76 +1014,6 @@ public class MyPluginExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andBeanNameIsNull() {
addCriterion("bean_name is null");
return (Criteria) this;
}
public Criteria andBeanNameIsNotNull() {
addCriterion("bean_name is not null");
return (Criteria) this;
}
public Criteria andBeanNameEqualTo(String value) {
addCriterion("bean_name =", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameNotEqualTo(String value) {
addCriterion("bean_name <>", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameGreaterThan(String value) {
addCriterion("bean_name >", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameGreaterThanOrEqualTo(String value) {
addCriterion("bean_name >=", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameLessThan(String value) {
addCriterion("bean_name <", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameLessThanOrEqualTo(String value) {
addCriterion("bean_name <=", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameLike(String value) {
addCriterion("bean_name like", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameNotLike(String value) {
addCriterion("bean_name not like", value, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameIn(List<String> values) {
addCriterion("bean_name in", values, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameNotIn(List<String> values) {
addCriterion("bean_name not in", values, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameBetween(String value1, String value2) {
addCriterion("bean_name between", value1, value2, "beanName");
return (Criteria) this;
}
public Criteria andBeanNameNotBetween(String value1, String value2) {
addCriterion("bean_name not between", value1, value2, "beanName");
return (Criteria) this;
}
public Criteria andIconIsNull() { public Criteria andIconIsNull() {
addCriterion("icon is null"); addCriterion("icon is null");
return (Criteria) this; return (Criteria) this;
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
<resultMap id="BaseResultMap" type="io.dataease.base.domain.MyPlugin"> <resultMap id="BaseResultMap" type="io.dataease.base.domain.MyPlugin">
<id column="plugin_id" jdbcType="BIGINT" property="pluginId" /> <id column="plugin_id" jdbcType="BIGINT" property="pluginId" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="store" jdbcType="VARCHAR" property="store" />
<result column="free" jdbcType="BIT" property="free" /> <result column="free" jdbcType="BIT" property="free" />
<result column="cost" jdbcType="INTEGER" property="cost" /> <result column="cost" jdbcType="INTEGER" property="cost" />
<result column="category" jdbcType="VARCHAR" property="category" />
<result column="descript" jdbcType="VARCHAR" property="descript" /> <result column="descript" jdbcType="VARCHAR" property="descript" />
<result column="version" jdbcType="VARCHAR" property="version" /> <result column="version" jdbcType="VARCHAR" property="version" />
<result column="install_type" jdbcType="INTEGER" property="installType" /> <result column="install_type" jdbcType="INTEGER" property="installType" />
...@@ -14,7 +16,6 @@ ...@@ -14,7 +16,6 @@
<result column="release_time" jdbcType="BIGINT" property="releaseTime" /> <result column="release_time" jdbcType="BIGINT" property="releaseTime" />
<result column="install_time" jdbcType="BIGINT" property="installTime" /> <result column="install_time" jdbcType="BIGINT" property="installTime" />
<result column="module_name" jdbcType="VARCHAR" property="moduleName" /> <result column="module_name" jdbcType="VARCHAR" property="moduleName" />
<result column="bean_name" jdbcType="VARCHAR" property="beanName" />
<result column="icon" jdbcType="VARCHAR" property="icon" /> <result column="icon" jdbcType="VARCHAR" property="icon" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
...@@ -76,8 +77,8 @@ ...@@ -76,8 +77,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
plugin_id, `name`, `free`, cost, descript, version, install_type, creator, load_mybatis, plugin_id, `name`, store, `free`, cost, category, descript, version, install_type,
release_time, install_time, module_name, bean_name, icon creator, load_mybatis, release_time, install_time, module_name, icon
</sql> </sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.MyPluginExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.dataease.base.domain.MyPluginExample" resultMap="BaseResultMap">
select select
...@@ -110,16 +111,16 @@ ...@@ -110,16 +111,16 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.dataease.base.domain.MyPlugin"> <insert id="insert" parameterType="io.dataease.base.domain.MyPlugin">
insert into my_plugin (plugin_id, `name`, `free`, insert into my_plugin (plugin_id, `name`, store,
cost, descript, version, `free`, cost, category, descript,
install_type, creator, load_mybatis, version, install_type, creator,
release_time, install_time, module_name, load_mybatis, release_time, install_time,
bean_name, icon) module_name, icon)
values (#{pluginId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{free,jdbcType=BIT}, values (#{pluginId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{store,jdbcType=VARCHAR},
#{cost,jdbcType=INTEGER}, #{descript,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{free,jdbcType=BIT}, #{cost,jdbcType=INTEGER}, #{category,jdbcType=VARCHAR}, #{descript,jdbcType=VARCHAR},
#{installType,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{loadMybatis,jdbcType=BIT}, #{version,jdbcType=VARCHAR}, #{installType,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR},
#{releaseTime,jdbcType=BIGINT}, #{installTime,jdbcType=BIGINT}, #{moduleName,jdbcType=VARCHAR}, #{loadMybatis,jdbcType=BIT}, #{releaseTime,jdbcType=BIGINT}, #{installTime,jdbcType=BIGINT},
#{beanName,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}) #{moduleName,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.MyPlugin"> <insert id="insertSelective" parameterType="io.dataease.base.domain.MyPlugin">
insert into my_plugin insert into my_plugin
...@@ -130,12 +131,18 @@ ...@@ -130,12 +131,18 @@
<if test="name != null"> <if test="name != null">
`name`, `name`,
</if> </if>
<if test="store != null">
store,
</if>
<if test="free != null"> <if test="free != null">
`free`, `free`,
</if> </if>
<if test="cost != null"> <if test="cost != null">
cost, cost,
</if> </if>
<if test="category != null">
category,
</if>
<if test="descript != null"> <if test="descript != null">
descript, descript,
</if> </if>
...@@ -160,9 +167,6 @@ ...@@ -160,9 +167,6 @@
<if test="moduleName != null"> <if test="moduleName != null">
module_name, module_name,
</if> </if>
<if test="beanName != null">
bean_name,
</if>
<if test="icon != null"> <if test="icon != null">
icon, icon,
</if> </if>
...@@ -174,12 +178,18 @@ ...@@ -174,12 +178,18 @@
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="store != null">
#{store,jdbcType=VARCHAR},
</if>
<if test="free != null"> <if test="free != null">
#{free,jdbcType=BIT}, #{free,jdbcType=BIT},
</if> </if>
<if test="cost != null"> <if test="cost != null">
#{cost,jdbcType=INTEGER}, #{cost,jdbcType=INTEGER},
</if> </if>
<if test="category != null">
#{category,jdbcType=VARCHAR},
</if>
<if test="descript != null"> <if test="descript != null">
#{descript,jdbcType=VARCHAR}, #{descript,jdbcType=VARCHAR},
</if> </if>
...@@ -204,9 +214,6 @@ ...@@ -204,9 +214,6 @@
<if test="moduleName != null"> <if test="moduleName != null">
#{moduleName,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR},
</if> </if>
<if test="beanName != null">
#{beanName,jdbcType=VARCHAR},
</if>
<if test="icon != null"> <if test="icon != null">
#{icon,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
</if> </if>
...@@ -227,12 +234,18 @@ ...@@ -227,12 +234,18 @@
<if test="record.name != null"> <if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.store != null">
store = #{record.store,jdbcType=VARCHAR},
</if>
<if test="record.free != null"> <if test="record.free != null">
`free` = #{record.free,jdbcType=BIT}, `free` = #{record.free,jdbcType=BIT},
</if> </if>
<if test="record.cost != null"> <if test="record.cost != null">
cost = #{record.cost,jdbcType=INTEGER}, cost = #{record.cost,jdbcType=INTEGER},
</if> </if>
<if test="record.category != null">
category = #{record.category,jdbcType=VARCHAR},
</if>
<if test="record.descript != null"> <if test="record.descript != null">
descript = #{record.descript,jdbcType=VARCHAR}, descript = #{record.descript,jdbcType=VARCHAR},
</if> </if>
...@@ -257,9 +270,6 @@ ...@@ -257,9 +270,6 @@
<if test="record.moduleName != null"> <if test="record.moduleName != null">
module_name = #{record.moduleName,jdbcType=VARCHAR}, module_name = #{record.moduleName,jdbcType=VARCHAR},
</if> </if>
<if test="record.beanName != null">
bean_name = #{record.beanName,jdbcType=VARCHAR},
</if>
<if test="record.icon != null"> <if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR}, icon = #{record.icon,jdbcType=VARCHAR},
</if> </if>
...@@ -272,8 +282,10 @@ ...@@ -272,8 +282,10 @@
update my_plugin update my_plugin
set plugin_id = #{record.pluginId,jdbcType=BIGINT}, set plugin_id = #{record.pluginId,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
store = #{record.store,jdbcType=VARCHAR},
`free` = #{record.free,jdbcType=BIT}, `free` = #{record.free,jdbcType=BIT},
cost = #{record.cost,jdbcType=INTEGER}, cost = #{record.cost,jdbcType=INTEGER},
category = #{record.category,jdbcType=VARCHAR},
descript = #{record.descript,jdbcType=VARCHAR}, descript = #{record.descript,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR}, version = #{record.version,jdbcType=VARCHAR},
install_type = #{record.installType,jdbcType=INTEGER}, install_type = #{record.installType,jdbcType=INTEGER},
...@@ -282,7 +294,6 @@ ...@@ -282,7 +294,6 @@
release_time = #{record.releaseTime,jdbcType=BIGINT}, release_time = #{record.releaseTime,jdbcType=BIGINT},
install_time = #{record.installTime,jdbcType=BIGINT}, install_time = #{record.installTime,jdbcType=BIGINT},
module_name = #{record.moduleName,jdbcType=VARCHAR}, module_name = #{record.moduleName,jdbcType=VARCHAR},
bean_name = #{record.beanName,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR} icon = #{record.icon,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -294,12 +305,18 @@ ...@@ -294,12 +305,18 @@
<if test="name != null"> <if test="name != null">
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="store != null">
store = #{store,jdbcType=VARCHAR},
</if>
<if test="free != null"> <if test="free != null">
`free` = #{free,jdbcType=BIT}, `free` = #{free,jdbcType=BIT},
</if> </if>
<if test="cost != null"> <if test="cost != null">
cost = #{cost,jdbcType=INTEGER}, cost = #{cost,jdbcType=INTEGER},
</if> </if>
<if test="category != null">
category = #{category,jdbcType=VARCHAR},
</if>
<if test="descript != null"> <if test="descript != null">
descript = #{descript,jdbcType=VARCHAR}, descript = #{descript,jdbcType=VARCHAR},
</if> </if>
...@@ -324,9 +341,6 @@ ...@@ -324,9 +341,6 @@
<if test="moduleName != null"> <if test="moduleName != null">
module_name = #{moduleName,jdbcType=VARCHAR}, module_name = #{moduleName,jdbcType=VARCHAR},
</if> </if>
<if test="beanName != null">
bean_name = #{beanName,jdbcType=VARCHAR},
</if>
<if test="icon != null"> <if test="icon != null">
icon = #{icon,jdbcType=VARCHAR}, icon = #{icon,jdbcType=VARCHAR},
</if> </if>
...@@ -336,8 +350,10 @@ ...@@ -336,8 +350,10 @@
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.MyPlugin"> <update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.MyPlugin">
update my_plugin update my_plugin
set `name` = #{name,jdbcType=VARCHAR}, set `name` = #{name,jdbcType=VARCHAR},
store = #{store,jdbcType=VARCHAR},
`free` = #{free,jdbcType=BIT}, `free` = #{free,jdbcType=BIT},
cost = #{cost,jdbcType=INTEGER}, cost = #{cost,jdbcType=INTEGER},
category = #{category,jdbcType=VARCHAR},
descript = #{descript,jdbcType=VARCHAR}, descript = #{descript,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR}, version = #{version,jdbcType=VARCHAR},
install_type = #{installType,jdbcType=INTEGER}, install_type = #{installType,jdbcType=INTEGER},
...@@ -346,7 +362,6 @@ ...@@ -346,7 +362,6 @@
release_time = #{releaseTime,jdbcType=BIGINT}, release_time = #{releaseTime,jdbcType=BIGINT},
install_time = #{installTime,jdbcType=BIGINT}, install_time = #{installTime,jdbcType=BIGINT},
module_name = #{moduleName,jdbcType=VARCHAR}, module_name = #{moduleName,jdbcType=VARCHAR},
bean_name = #{beanName,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR} icon = #{icon,jdbcType=VARCHAR}
where plugin_id = #{pluginId,jdbcType=BIGINT} where plugin_id = #{pluginId,jdbcType=BIGINT}
</update> </update>
......
...@@ -2,6 +2,7 @@ package io.dataease.plugins.config; ...@@ -2,6 +2,7 @@ package io.dataease.plugins.config;
import io.dataease.base.domain.MyPlugin; import io.dataease.base.domain.MyPlugin;
import io.dataease.commons.utils.DeFileUtils; import io.dataease.commons.utils.DeFileUtils;
import io.dataease.commons.utils.LogUtil;
import io.dataease.controller.sys.base.BaseGridRequest; import io.dataease.controller.sys.base.BaseGridRequest;
import io.dataease.service.sys.PluginService; import io.dataease.service.sys.PluginService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -30,15 +31,22 @@ public class PluginRunner implements ApplicationRunner { ...@@ -30,15 +31,22 @@ public class PluginRunner implements ApplicationRunner {
BaseGridRequest request = new BaseGridRequest(); BaseGridRequest request = new BaseGridRequest();
List<MyPlugin> plugins = pluginService.query(request); List<MyPlugin> plugins = pluginService.query(request);
plugins.stream().forEach(plugin -> { plugins.stream().forEach(plugin -> {
String name = plugin.getName(); String store = plugin.getStore();
String version = plugin.getVersion(); String version = plugin.getVersion();
String versionDir = pluginDir + name + "/" + version + "/"; String moduleName = plugin.getModuleName();
File fileDir = new File(versionDir); String fileName = moduleName + "-" + version + ".jar";
File[] jarFiles = fileDir.listFiles(this::isPluginJar); String path = pluginDir + store + "/" + fileName;
File jarFile = jarFiles[0];
File jarFile = new File(path);
String jarPath = jarFile.getAbsolutePath(); String jarPath = jarFile.getAbsolutePath();
try { try {
if (jarFile.exists()) {
pluginService.loadJar(jarPath, plugin); pluginService.loadJar(jarPath, plugin);
}else {
LogUtil.error("插件错误");
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
package io.dataease.plugins.server;
import io.dataease.auth.api.dto.CurrentUserDto;
import io.dataease.commons.utils.AuthUtils;
import io.dataease.controller.handler.annotation.I18n;
import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.auth.dto.request.XpackBaseTreeRequest;
import io.dataease.plugins.xpack.auth.dto.request.XpackSysAuthRequest;
import io.dataease.plugins.xpack.auth.dto.response.XpackSysAuthDetail;
import io.dataease.plugins.xpack.auth.dto.response.XpackVAuthModelDTO;
import org.springframework.web.bind.annotation.*;
import io.dataease.plugins.xpack.auth.service.AuthXpackService;
import java.util.List;
import java.util.Map;
@RequestMapping("/plugin/auth")
@RestController
public class XAuthServer {
@PostMapping("/authModels")
@I18n
public List<XpackVAuthModelDTO> authModels(@RequestBody XpackBaseTreeRequest request){
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
CurrentUserDto user = AuthUtils.getUser();
return sysAuthService.searchAuthModelTree(request, user.getUserId(), user.getIsAdmin());
}
@PostMapping("/authDetails")
public Map<String,List<XpackSysAuthDetail>> authDetails(@RequestBody XpackSysAuthRequest request){
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
return sysAuthService.searchAuthDetails(request);
}
@GetMapping("/authDetailsModel/{authType}")
@I18n
public List<XpackSysAuthDetail>authDetailsModel(@PathVariable String authType){
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
return sysAuthService.searchAuthDetailsModel(authType);
}
@PostMapping("/authChange")
public void authChange(@RequestBody XpackSysAuthRequest request){
AuthXpackService sysAuthService = SpringContextUtil.getBean(AuthXpackService.class);
CurrentUserDto user = AuthUtils.getUser();
sysAuthService.authChange(request, user.getUserId(), user.getUsername(), user.getIsAdmin());
}
}
...@@ -16,7 +16,7 @@ import java.util.stream.Collectors; ...@@ -16,7 +16,7 @@ import java.util.stream.Collectors;
@RequestMapping("/plugin/dept") @RequestMapping("/plugin/dept")
@RestController @RestController
public class DeptServer { public class XDeptServer {
@PostMapping("/childNodes/{pid}") @PostMapping("/childNodes/{pid}")
public List<DeptNodeResponse> childNodes(@PathVariable("pid") Long pid){ public List<DeptNodeResponse> childNodes(@PathVariable("pid") Long pid){
......
...@@ -3,7 +3,7 @@ package io.dataease.plugins.server; ...@@ -3,7 +3,7 @@ package io.dataease.plugins.server;
import io.dataease.plugins.config.SpringContextUtil; import io.dataease.plugins.config.SpringContextUtil;
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto; import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
import io.dataease.plugins.xpack.display.service.DisPlayXpackService; import io.dataease.plugins.xpack.display.service.DisplayXpackService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.List; import java.util.List;
...@@ -11,20 +11,20 @@ import java.util.Map; ...@@ -11,20 +11,20 @@ import java.util.Map;
@RequestMapping("/api/display") @RequestMapping("/api/display")
@RestController @RestController
public class DisplayServer { public class XDisplayServer {
@GetMapping("/uiInfo") @GetMapping("/uiInfo")
public List<SysSettingDto> uiInfo() { public List<SysSettingDto> uiInfo() {
DisPlayXpackService disPlayXpackService = SpringContextUtil.getBean(DisPlayXpackService.class); DisplayXpackService disPlayXpackService = SpringContextUtil.getBean(DisplayXpackService.class);
return disPlayXpackService.systemSettings(); return disPlayXpackService.systemSettings();
} }
@PostMapping(value="/save", consumes = {"multipart/form-data"}) @PostMapping(value="/save", consumes = {"multipart/form-data"})
public void saveUIInfo(@RequestPart("request") Map<String,List<SysSettingDto>> systemParameterMap, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) throws Exception { public void saveUIInfo(@RequestPart("request") Map<String,List<SysSettingDto>> systemParameterMap, @RequestPart(value = "files", required = false) List<MultipartFile> bodyFiles) throws Exception {
DisPlayXpackService disPlayXpackService = SpringContextUtil.getBean(DisPlayXpackService.class); DisplayXpackService disPlayXpackService = SpringContextUtil.getBean(DisplayXpackService.class);
disPlayXpackService.save(systemParameterMap, bodyFiles); disPlayXpackService.save(systemParameterMap, bodyFiles);
} }
......
...@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
@RequestMapping("/plugin/role") @RequestMapping("/plugin/role")
@RestController @RestController
public class RoleServer { public class XRoleServer {
@PostMapping("/create") @PostMapping("/create")
......
...@@ -81,18 +81,17 @@ public class PluginService { ...@@ -81,18 +81,17 @@ public class PluginService {
DeFileUtils.deleteFile(folder); DeFileUtils.deleteFile(folder);
throw new RuntimeException("缺少插件jar文件"); throw new RuntimeException("缺少插件jar文件");
} }
String versionDir = null; String targetDir = null;
try { try {
File jarFile = jarFiles[0]; File jarFile = jarFiles[0];
versionDir = makeVersionDir(myPlugin); targetDir = makeTargetDir(myPlugin);
String jarPath = null; String jarPath = null;
jarPath = DeFileUtils.copy(jarFile, versionDir); jarPath = DeFileUtils.copy(jarFile, targetDir);
//DeFileUtils.copy(folderFile, versionDir);
loadJar(jarPath, myPlugin); loadJar(jarPath, myPlugin);
myPluginMapper.insert(myPlugin); myPluginMapper.insert(myPlugin);
} catch (Exception e) { } catch (Exception e) {
if (StringUtils.isNotEmpty(versionDir)) { if (StringUtils.isNotEmpty(targetDir)) {
DeFileUtils.deleteFile(versionDir); DeFileUtils.deleteFile(targetDir);
} }
e.printStackTrace(); e.printStackTrace();
}finally { }finally {
...@@ -113,7 +112,7 @@ public class PluginService { ...@@ -113,7 +112,7 @@ public class PluginService {
private String makeVersionDir(MyPlugin myPlugin) { /*private String makeTargetDir(MyPlugin myPlugin) {
String name = myPlugin.getName(); String name = myPlugin.getName();
String dir = pluginDir + name + "/" + myPlugin.getVersion() + "/"; String dir = pluginDir + name + "/" + myPlugin.getVersion() + "/";
File fileDir = new File(dir); File fileDir = new File(dir);
...@@ -121,6 +120,15 @@ public class PluginService { ...@@ -121,6 +120,15 @@ public class PluginService {
fileDir.mkdirs(); fileDir.mkdirs();
} }
return dir; return dir;
}*/
private String makeTargetDir(MyPlugin myPlugin) {
String store = myPlugin.getStore();
String dir = pluginDir + store + "/";
File fileDir = new File(dir);
if (!fileDir.exists()) {
fileDir.mkdirs();
}
return dir;
} }
/** /**
......
...@@ -166,8 +166,10 @@ DROP TABLE IF EXISTS `my_plugin`; ...@@ -166,8 +166,10 @@ DROP TABLE IF EXISTS `my_plugin`;
CREATE TABLE `my_plugin` ( CREATE TABLE `my_plugin` (
`plugin_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `plugin_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) DEFAULT NULL COMMENT '插件名称', `name` varchar(255) DEFAULT NULL COMMENT '插件名称',
`store` varchar(255) DEFAULT NULL COMMENT '商家',
`free` tinyint(1) DEFAULT '0' COMMENT '是否免费', `free` tinyint(1) DEFAULT '0' COMMENT '是否免费',
`cost` int(10) DEFAULT NULL COMMENT '费用', `cost` int(10) DEFAULT NULL COMMENT '费用',
`category` varchar(255) DEFAULT NULL COMMENT '列别',
`descript` varchar(255) DEFAULT NULL COMMENT '描述', `descript` varchar(255) DEFAULT NULL COMMENT '描述',
`version` varchar(255) DEFAULT NULL COMMENT '版本号', `version` varchar(255) DEFAULT NULL COMMENT '版本号',
`install_type` int(4) DEFAULT NULL COMMENT '安装类型', `install_type` int(4) DEFAULT NULL COMMENT '安装类型',
...@@ -176,10 +178,9 @@ CREATE TABLE `my_plugin` ( ...@@ -176,10 +178,9 @@ CREATE TABLE `my_plugin` (
`release_time` bigint(13) DEFAULT NULL COMMENT '发布时间', `release_time` bigint(13) DEFAULT NULL COMMENT '发布时间',
`install_time` bigint(13) DEFAULT NULL COMMENT '安装时间', `install_time` bigint(13) DEFAULT NULL COMMENT '安装时间',
`module_name` varchar(255) DEFAULT NULL COMMENT 'jar包名称', `module_name` varchar(255) DEFAULT NULL COMMENT 'jar包名称',
`bean_name` varchar(40) DEFAULT NULL COMMENT 'bean名称',
`icon` varchar(255) DEFAULT NULL COMMENT '图标', `icon` varchar(255) DEFAULT NULL COMMENT '图标',
PRIMARY KEY (`plugin_id`) PRIMARY KEY (`plugin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='插件表'; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='插件表';
DROP TABLE IF EXISTS `license`; DROP TABLE IF EXISTS `license`;
CREATE TABLE `license` ( CREATE TABLE `license` (
...@@ -457,21 +458,3 @@ CREATE TABLE `license` ( ...@@ -457,21 +458,3 @@ CREATE TABLE `license` (
`f2c_license` longtext COMMENT 'F2C License', `f2c_license` longtext COMMENT 'F2C License',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `my_plugin`;
CREATE TABLE `my_plugin` (
`plugin_id` bigint(20) NOT NULL COMMENT '主键',
`name` varchar(255) DEFAULT NULL COMMENT '插件名称',
`free` tinyint(1) DEFAULT NULL COMMENT '是否免费',
`cost` int(10) DEFAULT NULL COMMENT '费用',
`descript` varchar(255) DEFAULT NULL COMMENT '描述',
`version` varchar(255) DEFAULT NULL COMMENT '版本号',
`install_type` int(4) DEFAULT NULL COMMENT '安装类型',
`creator` varchar(255) DEFAULT NULL COMMENT '开发者',
`release_time` bigint(13) DEFAULT NULL COMMENT '发布时间',
`install_time` bigint(13) DEFAULT NULL COMMENT '安装时间',
`module_name` varchar(255) DEFAULT NULL COMMENT 'jar包名称',
`bean_name` varchar(40) DEFAULT NULL COMMENT 'bean名称',
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
PRIMARY KEY (`plugin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...@@ -25,12 +25,15 @@ INSERT INTO `sys_menu` VALUES (14, 3, 0, 2, '编辑菜单', NULL, NULL, 999, NUL ...@@ -25,12 +25,15 @@ INSERT INTO `sys_menu` VALUES (14, 3, 0, 2, '编辑菜单', NULL, NULL, 999, NUL
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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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); 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);
...@@ -44,8 +47,10 @@ INSERT INTO `sys_menu` VALUES (35, 1, 0, 1, '用户表单', 'system-user-form', ...@@ -44,8 +47,10 @@ INSERT INTO `sys_menu` VALUES (35, 1, 0, 1, '用户表单', 'system-user-form',
/*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 (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 (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 (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 (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 (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 (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 (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); 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);
...@@ -92,7 +97,9 @@ INSERT INTO `sys_roles_menus` VALUES (30, 3); ...@@ -92,7 +97,9 @@ INSERT INTO `sys_roles_menus` VALUES (30, 3);
INSERT INTO `sys_roles_menus` VALUES (31, 3); INSERT INTO `sys_roles_menus` VALUES (31, 3);
INSERT INTO `sys_roles_menus` VALUES (32, 3); INSERT INTO `sys_roles_menus` VALUES (32, 3);
INSERT INTO `sys_roles_menus` VALUES (34, 3); INSERT INTO `sys_roles_menus` VALUES (34, 3);
INSERT INTO `sys_roles_menus` VALUES (101, 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 (30, 4);
COMMIT; COMMIT;
...@@ -157,7 +164,9 @@ COMMIT; ...@@ -157,7 +164,9 @@ COMMIT;
INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('self', '用户模板', '', -1, 'folder', NULL, NULL, '', 'self', '', '', NULL); INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('self', '用户模板', '', -1, 'folder', NULL, NULL, '', 'self', '', '', NULL);
INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('system', '系统模板', '', -1, 'folder', NULL, NULL, NULL, 'system', NULL, NULL, NULL); INSERT INTO `panel_template`(`id`, `name`, `pid`, `level`, `node_type`, `create_by`, `create_time`, `snapshot`, `template_type`, `template_style`, `template_data`, `dynamic_data`) VALUES ('system', '系统模板', '', -1, 'folder', NULL, NULL, NULL, 'system', NULL, NULL, NULL);
BEGIN;
INSERT INTO `my_plugin` VALUES (1, 'xpakc默认插件', 'default', 0, 20000, 'xpack', '请购买正式许可', '1.0-SNAPSHOT', NULL, 'fit2cloud-chenyw', 1, 1620624387327, NULL, 'deplugin-xpack-backend', NULL);
COMMIT;
-- ---------------------------- -- ----------------------------
...@@ -41,7 +41,8 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由 ...@@ -41,7 +41,8 @@ export const filterAsyncRouter = (routers) => { // 遍历后台传来的路由
router.component = 'system/plugin/dynamic' router.component = 'system/plugin/dynamic'
router.props = { router.props = {
jsname: jsName, jsname: jsName,
menuid: router.id menuid: router.id,
noLayout: router.noLayout
} }
} }
if (router.component) { if (router.component) {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<de-main-container style="height: calc(100vh - 56px)"> <de-main-container style="height: calc(100vh - 56px)">
<el-tabs v-model="authorityType" @tab-click="handleClick"> <el-tabs v-model="authorityType" @tab-click="handleClick">
<el-tab-pane name="authConfig"> <el-tab-pane name="authConfig">
<span slot="label">{{$t('auth.authConfig')}}</span> <span slot="label">{{ $t('auth.authConfig') }}</span>
<auth-config /> <auth-config />
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane name="authQuickConfig">--> <!-- <el-tab-pane name="authQuickConfig">-->
<!-- <span slot="label">{{$t('auth.authQuickConfig')}}</span>--> <!-- <span slot="label">{{$t('auth.authQuickConfig')}}</span>-->
<!-- <auth-quick-config />--> <!-- <auth-quick-config />-->
<!-- </el-tab-pane>--> <!-- </el-tab-pane>-->
</el-tabs> </el-tabs>
</de-main-container> </de-main-container>
</template> </template>
......
<template> <template>
<layout-content v-loading="$store.getters.loadingMap[$store.getters.currentPath]" :header="header" :back-name="backName"> <layout-content v-if="!noLayout" v-loading="$store.getters.loadingMap[$store.getters.currentPath]" :header="header" :back-name="backName">
<async-component v-if="showAsync" :url="url" @execute-axios="executeAxios" @on-add-languanges="addLanguages" @on-plugin-layout="setLayoutInfo" /> <async-component v-if="showAsync" :url="url" @execute-axios="executeAxios" @on-add-languanges="addLanguages" @on-plugin-layout="setLayoutInfo" />
<div v-else> <div v-else>
<h1>未知组件无法展示</h1> <h1>未知组件无法展示</h1>
</div> </div>
</layout-content> </layout-content>
<div v-else>
<async-component v-if="showAsync" :url="url" @execute-axios="executeAxios" @on-add-languanges="addLanguages" @on-plugin-layout="setLayoutInfo" />
<div v-else>
<h1>未知组件无法展示</h1>
</div>
</div>
</template> </template>
<script> <script>
...@@ -26,6 +33,10 @@ export default { ...@@ -26,6 +33,10 @@ export default {
menuid: { menuid: {
type: Number, type: Number,
default: null default: null
},
noLayout: {
type: Boolean,
default: false
} }
}, },
data() { data() {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
import LayoutContent from '@/components/business/LayoutContent' import LayoutContent from '@/components/business/LayoutContent'
import ComplexTable from '@/components/business/complex-table' import ComplexTable from '@/components/business/complex-table'
import { checkPermission } from '@/utils/permission' // import { checkPermission } from '@/utils/permission'
import { formatCondition } from '@/utils/index' import { formatCondition } from '@/utils/index'
import { pluginLists, uninstall } from '@/api/system/plugin' import { pluginLists, uninstall } from '@/api/system/plugin'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
...@@ -64,10 +64,10 @@ export default { ...@@ -64,10 +64,10 @@ export default {
header: '', header: '',
columns: [], columns: [],
buttons: [ buttons: [
{ // {
label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del, // label: this.$t('commons.delete'), icon: 'el-icon-delete', type: 'danger', click: this.del,
show: checkPermission(['user:del']) // show: checkPermission(['user:del'])
} // }
], ],
searchConfig: { searchConfig: {
useQuickSearch: false, useQuickSearch: false,
...@@ -123,6 +123,7 @@ export default { ...@@ -123,6 +123,7 @@ export default {
}, },
uploadSuccess(response, file, fileList) { uploadSuccess(response, file, fileList) {
this.uploading = false this.uploading = false
this.search()
}, },
del(row) { del(row) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论