forked from github/dataease
feat: 数据连接
This commit is contained in:
commit
593042f1b4
@ -13,6 +13,8 @@ public class DatasetGroup implements Serializable {
|
||||
|
||||
private Integer level;
|
||||
|
||||
private String type;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Long createTime;
|
||||
|
@ -374,6 +374,76 @@ public class DatasetGroupExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("`type` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("`type` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(String value) {
|
||||
addCriterion("`type` =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(String value) {
|
||||
addCriterion("`type` <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(String value) {
|
||||
addCriterion("`type` >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`type` >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(String value) {
|
||||
addCriterion("`type` <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("`type` <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLike(String value) {
|
||||
addCriterion("`type` like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotLike(String value) {
|
||||
addCriterion("`type` not like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<String> values) {
|
||||
addCriterion("`type` in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<String> values) {
|
||||
addCriterion("`type` not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(String value1, String value2) {
|
||||
addCriterion("`type` between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("`type` not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByIsNull() {
|
||||
addCriterion("create_by is null");
|
||||
return (Criteria) this;
|
||||
|
@ -1,19 +0,0 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DatasetScene implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String groupId;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -1,540 +0,0 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DatasetSceneExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public DatasetSceneExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdIsNull() {
|
||||
addCriterion("group_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdIsNotNull() {
|
||||
addCriterion("group_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdEqualTo(String value) {
|
||||
addCriterion("group_id =", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdNotEqualTo(String value) {
|
||||
addCriterion("group_id <>", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdGreaterThan(String value) {
|
||||
addCriterion("group_id >", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("group_id >=", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdLessThan(String value) {
|
||||
addCriterion("group_id <", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("group_id <=", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdLike(String value) {
|
||||
addCriterion("group_id like", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdNotLike(String value) {
|
||||
addCriterion("group_id not like", value, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdIn(List<String> values) {
|
||||
addCriterion("group_id in", values, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdNotIn(List<String> values) {
|
||||
addCriterion("group_id not in", values, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdBetween(String value1, String value2) {
|
||||
addCriterion("group_id between", value1, value2, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andGroupIdNotBetween(String value1, String value2) {
|
||||
addCriterion("group_id not between", value1, value2, "groupId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByIsNull() {
|
||||
addCriterion("create_by is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByIsNotNull() {
|
||||
addCriterion("create_by is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByEqualTo(String value) {
|
||||
addCriterion("create_by =", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByNotEqualTo(String value) {
|
||||
addCriterion("create_by <>", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByGreaterThan(String value) {
|
||||
addCriterion("create_by >", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_by >=", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByLessThan(String value) {
|
||||
addCriterion("create_by <", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_by <=", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByLike(String value) {
|
||||
addCriterion("create_by like", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByNotLike(String value) {
|
||||
addCriterion("create_by not like", value, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByIn(List<String> values) {
|
||||
addCriterion("create_by in", values, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByNotIn(List<String> values) {
|
||||
addCriterion("create_by not in", values, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByBetween(String value1, String value2) {
|
||||
addCriterion("create_by between", value1, value2, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateByNotBetween(String value1, String value2) {
|
||||
addCriterion("create_by not between", value1, value2, "createBy");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="pid" jdbcType="VARCHAR" property="pid" />
|
||||
<result column="level" jdbcType="INTEGER" property="level" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
</resultMap>
|
||||
@ -68,7 +69,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, pid, `level`, create_by, create_time
|
||||
id, `name`, pid, `level`, `type`, create_by, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetGroupExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -102,11 +103,11 @@
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.dataease.base.domain.DatasetGroup">
|
||||
insert into dataset_group (id, `name`, pid,
|
||||
`level`, create_by, create_time
|
||||
)
|
||||
`level`, `type`, create_by,
|
||||
create_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
||||
#{level,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}
|
||||
)
|
||||
#{level,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetGroup">
|
||||
insert into dataset_group
|
||||
@ -123,6 +124,9 @@
|
||||
<if test="level != null">
|
||||
`level`,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
@ -143,6 +147,9 @@
|
||||
<if test="level != null">
|
||||
#{level,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -172,6 +179,9 @@
|
||||
<if test="record.level != null">
|
||||
`level` = #{record.level,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createBy != null">
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -189,6 +199,7 @@
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
pid = #{record.pid,jdbcType=VARCHAR},
|
||||
`level` = #{record.level,jdbcType=INTEGER},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
@ -207,6 +218,9 @@
|
||||
<if test="level != null">
|
||||
`level` = #{level,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -221,6 +235,7 @@
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
`level` = #{level,jdbcType=INTEGER},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -1,30 +0,0 @@
|
||||
package io.dataease.base.mapper;
|
||||
|
||||
import io.dataease.base.domain.DatasetScene;
|
||||
import io.dataease.base.domain.DatasetSceneExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface DatasetSceneMapper {
|
||||
long countByExample(DatasetSceneExample example);
|
||||
|
||||
int deleteByExample(DatasetSceneExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(DatasetScene record);
|
||||
|
||||
int insertSelective(DatasetScene record);
|
||||
|
||||
List<DatasetScene> selectByExample(DatasetSceneExample example);
|
||||
|
||||
DatasetScene selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") DatasetScene record, @Param("example") DatasetSceneExample example);
|
||||
|
||||
int updateByExample(@Param("record") DatasetScene record, @Param("example") DatasetSceneExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(DatasetScene record);
|
||||
|
||||
int updateByPrimaryKey(DatasetScene record);
|
||||
}
|
@ -1,211 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.dataease.base.mapper.DatasetSceneMapper">
|
||||
<resultMap id="BaseResultMap" type="io.dataease.base.domain.DatasetScene">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="group_id" jdbcType="VARCHAR" property="groupId" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, group_id, create_by, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetSceneExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from dataset_scene
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from dataset_scene
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from dataset_scene
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.dataease.base.domain.DatasetSceneExample">
|
||||
delete from dataset_scene
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.dataease.base.domain.DatasetScene">
|
||||
insert into dataset_scene (id, `name`, group_id,
|
||||
create_by, create_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR},
|
||||
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.DatasetScene">
|
||||
insert into dataset_scene
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id,
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
#{groupId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.dataease.base.domain.DatasetSceneExample" resultType="java.lang.Long">
|
||||
select count(*) from dataset_scene
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update dataset_scene
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.groupId != null">
|
||||
group_id = #{record.groupId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createBy != null">
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update dataset_scene
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
group_id = #{record.groupId,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.DatasetScene">
|
||||
update dataset_scene
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.DatasetScene">
|
||||
update dataset_scene
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
group_id = #{groupId,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,36 @@
|
||||
package io.dataease.controller.dataset;
|
||||
|
||||
import io.dataease.base.domain.DatasetGroup;
|
||||
import io.dataease.controller.request.dataset.DataSetGroupRequest;
|
||||
import io.dataease.dto.dataset.DataSetGroupDTO;
|
||||
import io.dataease.service.dataset.DataSetGroupService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/2/20 8:29 下午
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("dataset/group")
|
||||
public class DataSetGroupController {
|
||||
@Resource
|
||||
private DataSetGroupService dataSetGroupService;
|
||||
|
||||
@PostMapping("/save")
|
||||
public DataSetGroupDTO save(@RequestBody DatasetGroup datasetGroup) {
|
||||
return dataSetGroupService.save(datasetGroup);
|
||||
}
|
||||
|
||||
@PostMapping("/tree")
|
||||
public List<DataSetGroupDTO> tree(@RequestBody DataSetGroupRequest datasetGroup) {
|
||||
return dataSetGroupService.tree(datasetGroup);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
public void tree(@PathVariable String id) {
|
||||
dataSetGroupService.delete(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package io.dataease.controller.request.dataset;
|
||||
|
||||
import io.dataease.base.domain.DatasetGroup;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/2/22 1:30 下午
|
||||
*/
|
||||
@Data
|
||||
public class DataSetGroupRequest extends DatasetGroup {
|
||||
private String sort;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.controller.sys;
|
||||
|
||||
import io.dataease.base.domain.SysDept;
|
||||
import io.dataease.controller.ResultHolder;
|
||||
import io.dataease.service.sys.DeptService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -16,7 +17,7 @@ import java.util.List;
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "系统:部门管理")
|
||||
@RequestMapping("/api/dept")
|
||||
public class SysDeptController {
|
||||
public class SysDeptController extends ResultHolder {
|
||||
|
||||
|
||||
@Resource
|
||||
@ -24,9 +25,9 @@ public class SysDeptController {
|
||||
|
||||
@ApiOperation("查询部门")
|
||||
@PostMapping("/root")
|
||||
public List<SysDept> rootData(){
|
||||
public ResultHolder rootData(){
|
||||
List<SysDept> root = deptService.root();
|
||||
return root;
|
||||
return success(root);
|
||||
}
|
||||
|
||||
@ApiOperation("新增部门")
|
||||
|
@ -0,0 +1,16 @@
|
||||
package io.dataease.dto.dataset;
|
||||
|
||||
import io.dataease.base.domain.DatasetGroup;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/2/20 8:17 下午
|
||||
*/
|
||||
@Data
|
||||
public class DataSetGroupDTO extends DatasetGroup {
|
||||
private String label;
|
||||
private List<DataSetGroupDTO> children;
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package io.dataease.service.dataset;
|
||||
|
||||
import com.alibaba.nacos.common.util.UuidUtils;
|
||||
import io.dataease.base.domain.DatasetGroup;
|
||||
import io.dataease.base.domain.DatasetGroupExample;
|
||||
import io.dataease.base.mapper.DatasetGroupMapper;
|
||||
import io.dataease.commons.utils.BeanUtils;
|
||||
import io.dataease.controller.request.dataset.DataSetGroupRequest;
|
||||
import io.dataease.dto.dataset.DataSetGroupDTO;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
* @Date 2021/2/20 8:10 下午
|
||||
*/
|
||||
@Service
|
||||
public class DataSetGroupService {
|
||||
@Resource
|
||||
private DatasetGroupMapper datasetGroupMapper;
|
||||
|
||||
public DataSetGroupDTO save(DatasetGroup datasetGroup) {
|
||||
if (StringUtils.isEmpty(datasetGroup.getId())) {
|
||||
datasetGroup.setId(UuidUtils.generateUuid());
|
||||
datasetGroup.setCreateTime(System.currentTimeMillis());
|
||||
datasetGroupMapper.insert(datasetGroup);
|
||||
} else {
|
||||
datasetGroupMapper.updateByPrimaryKey(datasetGroup);
|
||||
}
|
||||
DataSetGroupDTO dataSetGroupDTO = new DataSetGroupDTO();
|
||||
BeanUtils.copyBean(dataSetGroupDTO, datasetGroup);
|
||||
dataSetGroupDTO.setLabel(dataSetGroupDTO.getName());
|
||||
return dataSetGroupDTO;
|
||||
}
|
||||
|
||||
public void delete(String id) {
|
||||
DataSetGroupRequest datasetGroup = new DataSetGroupRequest();
|
||||
datasetGroup.setId(id);
|
||||
List<DataSetGroupDTO> tree = tree(datasetGroup);
|
||||
List<String> ids = new ArrayList<>();
|
||||
getAllId(tree, ids);
|
||||
DatasetGroupExample datasetGroupExample = new DatasetGroupExample();
|
||||
datasetGroupExample.createCriteria().andIdIn(ids);
|
||||
datasetGroupMapper.deleteByExample(datasetGroupExample);
|
||||
}
|
||||
|
||||
public List<DataSetGroupDTO> tree(DataSetGroupRequest datasetGroup) {
|
||||
DatasetGroupExample datasetGroupExample = new DatasetGroupExample();
|
||||
DatasetGroupExample.Criteria criteria = datasetGroupExample.createCriteria();
|
||||
if (StringUtils.isNotEmpty(datasetGroup.getName())) {
|
||||
criteria.andNameLike("%" + datasetGroup.getName() + "%");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(datasetGroup.getType())) {
|
||||
criteria.andTypeEqualTo(datasetGroup.getType());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(datasetGroup.getId())) {
|
||||
criteria.andIdEqualTo(datasetGroup.getId());
|
||||
} else {
|
||||
criteria.andLevelEqualTo(0);
|
||||
}
|
||||
datasetGroupExample.setOrderByClause(datasetGroup.getSort());
|
||||
List<DatasetGroup> datasetGroups = datasetGroupMapper.selectByExample(datasetGroupExample);
|
||||
List<DataSetGroupDTO> DTOs = datasetGroups.stream().map(ele -> {
|
||||
DataSetGroupDTO dto = new DataSetGroupDTO();
|
||||
BeanUtils.copyBean(dto, ele);
|
||||
dto.setLabel(ele.getName());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
getAll(DTOs, datasetGroup);
|
||||
return DTOs;
|
||||
}
|
||||
|
||||
public void getAll(List<DataSetGroupDTO> list, DataSetGroupRequest datasetGroup) {
|
||||
for (DataSetGroupDTO obj : list) {
|
||||
DatasetGroupExample datasetGroupExample = new DatasetGroupExample();
|
||||
DatasetGroupExample.Criteria criteria = datasetGroupExample.createCriteria();
|
||||
if (StringUtils.isNotEmpty(datasetGroup.getName())) {
|
||||
criteria.andNameLike("%" + datasetGroup.getName() + "%");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(datasetGroup.getType())) {
|
||||
criteria.andTypeEqualTo(datasetGroup.getType());
|
||||
}
|
||||
criteria.andPidEqualTo(obj.getId());
|
||||
datasetGroupExample.setOrderByClause(datasetGroup.getSort());
|
||||
List<DatasetGroup> datasetGroups = datasetGroupMapper.selectByExample(datasetGroupExample);
|
||||
List<DataSetGroupDTO> DTOs = datasetGroups.stream().map(ele -> {
|
||||
DataSetGroupDTO dto = new DataSetGroupDTO();
|
||||
BeanUtils.copyBean(dto, ele);
|
||||
dto.setLabel(ele.getName());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
obj.setChildren(DTOs);
|
||||
if (CollectionUtils.isNotEmpty(DTOs)) {
|
||||
getAll(DTOs, datasetGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getAllId(List<DataSetGroupDTO> list, List<String> ids) {
|
||||
for (DataSetGroupDTO dto : list) {
|
||||
ids.add(dto.getId());
|
||||
if (CollectionUtils.isNotEmpty(dto.getChildren())) {
|
||||
getAllId(dto.getChildren(), ids);
|
||||
}
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
}
|
@ -340,19 +340,11 @@ CREATE TABLE IF NOT EXISTS `dataset_group` (
|
||||
`name` varchar(64) NOT NULL COMMENT '名称',
|
||||
`pid` varchar(50) COMMENT '父级ID',
|
||||
`level` int(10) COMMENT '当前分组处于第几级',
|
||||
`type` varchar(50) COMMENT 'group or scene',
|
||||
`create_by` varchar(50) COMMENT '创建人ID',
|
||||
`create_time` bigint(13) COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `dataset_scene` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'ID',
|
||||
`name` varchar(64) NOT NULL COMMENT '名称',
|
||||
`group_id` varchar(50) COMMENT 'DataSet Group ID',
|
||||
`create_by` varchar(50) COMMENT '创建人ID',
|
||||
`create_time` bigint(13) COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
-- dataset end
|
||||
|
||||
|
||||
|
@ -46,7 +46,8 @@
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "^3.1.2",
|
||||
"xml-js": "^1.6.11",
|
||||
"yan-progress": "^1.0.3"
|
||||
"yan-progress": "^1.0.3",
|
||||
"@riophae/vue-treeselect": "0.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.1.0",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<!-- float right -->
|
||||
<ms-user/>
|
||||
<ms-language-switch/>
|
||||
<ms-header-org-ws/>
|
||||
<!-- <ms-header-org-ws/> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
.ms-aside-container {
|
||||
height: calc(100vh - 40px);
|
||||
padding: 20px;
|
||||
min-width: 260px;
|
||||
max-width: 460px;
|
||||
min-width: 300px;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.ms-main-container {
|
||||
|
@ -1,156 +1,364 @@
|
||||
<template xmlns:el-col="http://www.w3.org/1999/html">
|
||||
<el-col>
|
||||
<el-col>
|
||||
<el-col v-if="!sceneMode">
|
||||
<span>
|
||||
{{ $t('dataset.datalist') }}
|
||||
</span>
|
||||
<el-divider/>
|
||||
<el-row>
|
||||
<el-button icon="el-icon-circle-plus" type="primary" size="mini" @click="addGroup">{{$t('dataset.add_group')}}
|
||||
<el-button icon="el-icon-circle-plus" type="primary" size="mini" @click="add('group')">
|
||||
{{$t('dataset.add_group')}}
|
||||
</el-button>
|
||||
<el-button icon="el-icon-document" type="primary" size="mini" @click="addScene">{{$t('dataset.add_scene')}}
|
||||
<el-button icon="el-icon-folder-add" type="primary" size="mini" @click="add('scene')">
|
||||
{{$t('dataset.add_scene')}}
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin: 12px 0">
|
||||
<el-input
|
||||
size="mini"
|
||||
placeholder="Search"
|
||||
prefix-icon="el-icon-search"
|
||||
v-model="search"
|
||||
clearable>
|
||||
</el-input>
|
||||
<el-row>
|
||||
<el-form>
|
||||
<el-form-item class="form-item">
|
||||
<el-input
|
||||
size="mini"
|
||||
:placeholder="$t('dataset.search')"
|
||||
prefix-icon="el-icon-search"
|
||||
v-model="search"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-col class="custom-tree-container">
|
||||
<div class="block">
|
||||
<el-tree
|
||||
:default-expanded-keys="expandedArray"
|
||||
:data="data"
|
||||
node-key="id"
|
||||
:expand-on-click-node="true"
|
||||
@node-click="nodeClick">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span>
|
||||
<span v-if="data.show">
|
||||
<span v-if="data.type === 'scene'">
|
||||
<el-button
|
||||
icon="el-icon-document"
|
||||
icon="el-icon-folder"
|
||||
type="text"
|
||||
size="mini">
|
||||
</el-button>
|
||||
</el-button>
|
||||
</span>
|
||||
<span>{{ data.label }}</span>
|
||||
<span style="margin-left: 6px">{{ data.label }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click.stop="() => append(data)">
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-more"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click.stop="() => remove(node, data)">
|
||||
</el-button>
|
||||
<span @click.stop v-if="data.type ==='group'">
|
||||
<el-dropdown trigger="click" @command="clickAdd">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
type="text"
|
||||
size="small">
|
||||
</el-button>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-circle-plus" :command="beforeClickAdd('group',data,node)">
|
||||
{{$t('dataset.group')}}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-folder-add" :command="beforeClickAdd('scene',data,node)">
|
||||
{{$t('dataset.scene')}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
<span @click.stop style="margin-left: 12px;">
|
||||
<el-dropdown trigger="click" @command="clickMore">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
icon="el-icon-more"
|
||||
type="text"
|
||||
size="small">
|
||||
</el-button>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-edit-outline" :command="beforeClickMore('rename',data,node)">
|
||||
{{$t('dataset.rename')}}
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item icon="el-icon-right" :command="beforeClickMore('move',data,node)">-->
|
||||
<!-- {{$t('dataset.move_to')}}-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<el-dropdown-item icon="el-icon-delete" :command="beforeClickMore('delete',data,node)">
|
||||
{{$t('dataset.delete')}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-dialog :title="dialogTitle" :visible="editGroup" :show-close="false">
|
||||
<el-form :model="groupForm" :rules="groupFormRules" ref="groupForm">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="groupForm.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="close()">{{$t('dataset.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="saveGroup(groupForm)">{{$t('dataset.confirm')}}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-col>
|
||||
|
||||
<el-col v-if="sceneMode">
|
||||
<el-row>
|
||||
<span>
|
||||
{{ $t('dataset.scene') }}
|
||||
</span>
|
||||
<el-button icon="el-icon-back" size="mini" @click="sceneMode = false" style="float: right">
|
||||
{{$t('dataset.back')}}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-divider/>
|
||||
<el-row>
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.add_table')}}
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.update')}}
|
||||
</el-button>
|
||||
<el-button type="primary" size="mini" plain>
|
||||
{{$t('dataset.process')}}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form>
|
||||
<el-form-item class="form-item">
|
||||
<el-input
|
||||
size="mini"
|
||||
:placeholder="$t('dataset.search')"
|
||||
prefix-icon="el-icon-search"
|
||||
v-model="search"
|
||||
clearable>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<!-- todo el-tree -->
|
||||
<el-tree
|
||||
:data="null"
|
||||
node-key="id"
|
||||
:expand-on-click-node="true"
|
||||
@node-click="nodeClick">
|
||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||
<span>
|
||||
<span v-if="data.type === 'scene'">
|
||||
<el-button
|
||||
icon="el-icon-folder"
|
||||
type="text"
|
||||
size="mini">
|
||||
</el-button>
|
||||
</span>
|
||||
<span style="margin-left: 6px">{{ data.label }}</span>
|
||||
</span>
|
||||
<span>
|
||||
<span @click.stop style="margin-left: 12px;">
|
||||
<el-dropdown trigger="click" @command="clickMore">
|
||||
<span class="el-dropdown-link">
|
||||
<el-button
|
||||
icon="el-icon-more"
|
||||
type="text"
|
||||
size="small">
|
||||
</el-button>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-edit-outline" :command="beforeClickMore('rename',data,node)">
|
||||
{{$t('dataset.rename')}}
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item icon="el-icon-right" :command="beforeClickMore('move',data,node)">-->
|
||||
<!-- {{$t('dataset.move_to')}}-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<el-dropdown-item icon="el-icon-delete" :command="beforeClickMore('delete',data,node)">
|
||||
{{$t('dataset.delete')}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
let id = 1000;
|
||||
export default {
|
||||
name: "Group",
|
||||
data() {
|
||||
const data = [{
|
||||
id: 1,
|
||||
label: '一级 1',
|
||||
children: [{
|
||||
id: 4,
|
||||
label: '二级 1-1',
|
||||
children: [{
|
||||
id: 9,
|
||||
label: '三级 1-1-1'
|
||||
}, {
|
||||
id: 10,
|
||||
label: '三级 1-1-2'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
id: 2,
|
||||
label: '一级 2',
|
||||
children: [{
|
||||
id: 5,
|
||||
label: '二级 2-1'
|
||||
}, {
|
||||
id: 6,
|
||||
label: '二级 2-2'
|
||||
}]
|
||||
}, {
|
||||
id: 3,
|
||||
label: '一级 3',
|
||||
children: [{
|
||||
id: 7,
|
||||
label: '二级 3-1'
|
||||
}, {
|
||||
id: 8,
|
||||
label: '二级 3-2'
|
||||
}]
|
||||
}];
|
||||
export default {
|
||||
name: "Group",
|
||||
data() {
|
||||
return {
|
||||
sceneMode: false,
|
||||
dialogTitle: '',
|
||||
search: '',
|
||||
editGroup: false,
|
||||
data: null,
|
||||
expandedArray: [],
|
||||
groupForm: {
|
||||
name: '',
|
||||
pid: null,
|
||||
level: 0,
|
||||
type: '',
|
||||
children: [],
|
||||
sort: 'type desc,name asc'
|
||||
},
|
||||
groupFormRules: {
|
||||
name: [
|
||||
{required: true, message: this.$t('commons.input_content'), trigger: 'blur'},
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.tree(this.groupForm);
|
||||
},
|
||||
activated() {
|
||||
this.tree(this.groupForm);
|
||||
},
|
||||
watch: {
|
||||
// search(val){
|
||||
// this.groupForm.name = val;
|
||||
// this.tree(this.groupForm);
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
clickAdd(param) {
|
||||
// console.log(param);
|
||||
this.add(param.type);
|
||||
this.groupForm.pid = param.data.id;
|
||||
this.groupForm.level = param.data.level + 1;
|
||||
},
|
||||
|
||||
beforeClickAdd(type, data, node) {
|
||||
return {
|
||||
search: '',
|
||||
data: JSON.parse(JSON.stringify(data))
|
||||
'type': type,
|
||||
'data': data,
|
||||
'node': node
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
clickMore(param) {
|
||||
// console.log(param);
|
||||
switch (param.type) {
|
||||
case 'rename':
|
||||
this.add(param.data.type);
|
||||
this.groupForm = param.data;
|
||||
break;
|
||||
case 'move':
|
||||
|
||||
break;
|
||||
case 'delete':
|
||||
this.delete(param.data);
|
||||
break;
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
|
||||
beforeClickMore(type, data, node) {
|
||||
return {
|
||||
'type': type,
|
||||
'data': data,
|
||||
'node': node
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addGroup() {
|
||||
this.$message(
|
||||
{
|
||||
message: '添加分组',
|
||||
type: 'success'
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
addScene() {
|
||||
this.$message(
|
||||
{
|
||||
message: '添加场景',
|
||||
type: 'success'
|
||||
}
|
||||
)
|
||||
},
|
||||
add(type) {
|
||||
switch (type) {
|
||||
case 'group':
|
||||
this.dialogTitle = this.$t('dataset.group');
|
||||
break;
|
||||
case 'scene':
|
||||
this.dialogTitle = this.$t('dataset.scene');
|
||||
break;
|
||||
}
|
||||
this.groupForm.type = type;
|
||||
this.editGroup = true;
|
||||
},
|
||||
|
||||
nodeClick(data,node){
|
||||
console.log(data);
|
||||
console.log(node);
|
||||
},
|
||||
|
||||
append(data) {
|
||||
const newChild = {id: id++, label: 'testtest', children: [], show: true};
|
||||
if (!data.children) {
|
||||
this.$set(data, 'children', []);
|
||||
saveGroup(group) {
|
||||
// console.log(group);
|
||||
this.$refs['groupForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$post("/dataset/group/save", group, response => {
|
||||
this.close();
|
||||
this.$message({
|
||||
message: this.$t('commons.save_success'),
|
||||
type: 'success',
|
||||
showClose: true,
|
||||
});
|
||||
this.tree(this.groupForm);
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: this.$t('commons.input_content'),
|
||||
type: 'error',
|
||||
showClose: true,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
data.children.push(newChild);
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
remove(node, data) {
|
||||
const parent = node.parent;
|
||||
const children = parent.data.children || parent.data;
|
||||
const index = children.findIndex(d => d.id === data.id);
|
||||
children.splice(index, 1);
|
||||
},
|
||||
}
|
||||
delete(data) {
|
||||
this.$confirm(this.$t('dataset.confirm_delete'), this.$t('dataset.tips'), {
|
||||
confirmButtonText: this.$t('dataset.confirm'),
|
||||
cancelButtonText: this.$t('dataset.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$post("/dataset/group/delete/" + data.id, null, response => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: this.$t('dataset.delete_success'),
|
||||
showClose: true,
|
||||
});
|
||||
this.tree(this.groupForm);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
close() {
|
||||
this.editGroup = false;
|
||||
this.groupForm = {
|
||||
name: '',
|
||||
pid: null,
|
||||
level: 0,
|
||||
type: '',
|
||||
children: [],
|
||||
sort: 'type desc,name asc'
|
||||
}
|
||||
},
|
||||
|
||||
tree(group) {
|
||||
this.$post("/dataset/group/tree", group, response => {
|
||||
this.data = response.data;
|
||||
})
|
||||
},
|
||||
|
||||
nodeClick(data, node) {
|
||||
// console.log(data);
|
||||
// console.log(node);
|
||||
if (data.type === 'scene') {
|
||||
this.sceneMode = true;
|
||||
}
|
||||
if (node.expanded) {
|
||||
this.expandedArray.push(data.id);
|
||||
} else {
|
||||
let index = this.expandedArray.indexOf(data.id);
|
||||
if (index > -1) {
|
||||
this.expandedArray.splice(index, 1);
|
||||
}
|
||||
}
|
||||
// console.log(this.expandedArray);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@ -170,4 +378,16 @@
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.custom-position {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
{
|
||||
path: 'organization',
|
||||
component: () => import('@/business/components/settings/system/Organization'),
|
||||
component: () => import('@/business/components/settings/sys/dept'),
|
||||
meta: {system: true, title: 'commons.organization'}
|
||||
},
|
||||
// {
|
||||
|
633
frontend/src/business/components/settings/sys/dept.vue
Normal file
633
frontend/src/business/components/settings/sys/dept.vue
Normal file
@ -0,0 +1,633 @@
|
||||
<template>
|
||||
<div v-loading="result.loading">
|
||||
|
||||
<el-card class="table-card">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="create"
|
||||
:create-tip="$t('organization.create')" :title="$t('commons.organization')"/>
|
||||
</template>
|
||||
<!-- system menu organization table-->
|
||||
<el-table border class="adjust-table" :data="tableData" style="width: 100%">
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column label="名称" prop="name" />
|
||||
<el-table-column label="排序" prop="deptSort" />
|
||||
<el-table-column label="状态" align="center" prop="enabled">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enabled"
|
||||
:disabled="scope.row.id === 1"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.enabled,)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建日期">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator @editClick="edit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="name" :label="$t('commons.name')"/>
|
||||
<el-table-column prop="description" :label="$t('commons.description')"/>
|
||||
<el-table-column :label="$t('commons.member')">
|
||||
<template v-slot:default="scope">
|
||||
<el-link type="primary" class="member-size" @click="cellClick(scope.row)">
|
||||
{{ scope.row.memberSize }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator @editClick="edit(scope.row)" @deleteClick="handleDelete(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- dialog of organization member -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="dialogOrgMemberVisible" width="70%" :destroy-on-close="true" @close="closeFunc"
|
||||
class="dialog-css">
|
||||
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="dialogSearch"
|
||||
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
|
||||
<!-- organization member table -->
|
||||
<el-table
|
||||
:border="true"
|
||||
class="adjust-table"
|
||||
:data="memberLineData"
|
||||
style="width: 100%;margin-top:5px;"
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
row-key="deptId"
|
||||
>
|
||||
<el-table-column prop="id" label="ID"/>
|
||||
<el-table-column prop="name" :label="$t('commons.username')"/>
|
||||
<el-table-column prop="email" :label="$t('commons.email')"/>
|
||||
<el-table-column prop="phone" :label="$t('commons.phone')"/>
|
||||
<el-table-column :label="$t('commons.role')" width="140">
|
||||
<template v-slot:default="scope">
|
||||
<ms-roles-tag :roles="scope.row.roles"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('commons.operating')">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator :tip2="$t('commons.remove')" @editClick="editMember(scope.row)"
|
||||
@deleteClick="delMember(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="dialogSearch" :current-page.sync="dialogCurrentPage"
|
||||
:page-size.sync="dialogPageSize"
|
||||
:total="dialogTotal"/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add organization form -->
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('organization.create')" :visible.sync="dialogOrgAddVisible" width="30%" @closed="closeFunc"
|
||||
:destroy-on-close="true">
|
||||
<!-- <el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="createOrganization">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.description')" prop="description">
|
||||
<el-input v-model="form.description" autocomplete="off" type="textarea"/>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
<el-form ref="form" inline :model="form" :rules="rule" size="small" label-width="80px">
|
||||
<el-form-item label="部门名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门排序" prop="deptSort">
|
||||
<el-input-number
|
||||
v-model.number="form.deptSort"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
style="width: 370px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="顶级部门">
|
||||
<el-radio-group v-model="form.isTop" style="width: 140px">
|
||||
<el-radio label="1">是</el-radio>
|
||||
<el-radio label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="enabled">
|
||||
<el-radio label="1">启用</el-radio>
|
||||
<el-radio label="0">停用</el-radio>
|
||||
<!-- <el-radio v-for="item in dict.dept_status" :key="item.id" v-model="form.enabled" :label="item.value">{{ item.label }}</el-radio> -->
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.isTop === '0'" style="margin-bottom: 0;" label="上级部门" prop="pid">
|
||||
<treeselect
|
||||
v-model="form.pid"
|
||||
:load-options="loadDepts"
|
||||
:options="depts"
|
||||
style="width: 370px;"
|
||||
placeholder="选择上级类目"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- <div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div> -->
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer
|
||||
@cancel="dialogOrgAddVisible = false"
|
||||
@confirm="createOrganization('createOrganization')"/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- update organization form -->
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('organization.modify')" :visible.sync="dialogOrgUpdateVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||
ref="updateOrganizationForm">
|
||||
<el-form-item :label="$t('commons.name')" prop="name">
|
||||
<el-input v-model="form.name" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.description')" prop="description">
|
||||
<el-input v-model="form.description" autocomplete="off"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer
|
||||
@cancel="dialogOrgUpdateVisible = false"
|
||||
@confirm="updateOrganization('updateOrganizationForm')"/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- add organization member form -->
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('member.create')" :visible.sync="dialogOrgMemberAddVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px"
|
||||
size="small">
|
||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||
<el-select filterable v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
|
||||
class="select-width" :filter-method="dataFilter">
|
||||
<el-option
|
||||
v-for="item in memberForm.userList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
<span class="org-member-id">{{ item.id }}</span>
|
||||
<span class="org-member-email">{{ item.email }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||
<el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||
class="select-width">
|
||||
<el-option
|
||||
v-for="item in memberForm.roles"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer
|
||||
@cancel="dialogOrgMemberAddVisible = false"
|
||||
@confirm="submitForm('form')"/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- update organization member form -->
|
||||
<el-dialog :close-on-click-modal="false" :title="$t('member.modify')" :visible.sync="dialogOrgMemberUpdateVisible" width="30%"
|
||||
:destroy-on-close="true"
|
||||
@close="closeFunc">
|
||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||
<el-form-item label="ID" prop="id">
|
||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.username')" prop="name">
|
||||
<el-input v-model="memberForm.name" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.email')" prop="email">
|
||||
<el-input v-model="memberForm.email" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('commons.role')" prop="roleIds"
|
||||
:rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||
<el-select filterable v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||
class="select-width">
|
||||
<el-option
|
||||
v-for="item in memberForm.allroles"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template v-slot:footer>
|
||||
<ms-dialog-footer
|
||||
@cancel="dialogOrgMemberUpdateVisible = false"
|
||||
@confirm="updateOrgMember('updateUserForm')"/>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<ms-delete-confirm :title="$t('organization.delete')" @delete="_handleDelete" ref="deleteConfirm"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import MsCreateBox from "../CreateBox";
|
||||
import MsTableHeader from "../../common/components/MsTableHeader";
|
||||
import MsRolesTag from "../../common/components/MsRolesTag";
|
||||
import MsTableOperator from "../../common/components/MsTableOperator";
|
||||
import MsTableOperatorButton from "../../common/components/MsTableOperatorButton";
|
||||
import MsDialogFooter from "../../common/components/MsDialogFooter";
|
||||
import {
|
||||
getCurrentOrganizationId,
|
||||
getCurrentUser,
|
||||
listenGoBack,
|
||||
refreshSessionAndCookies,
|
||||
removeGoBackListener
|
||||
} from "@/common/js/utils";
|
||||
import {DEFAULT, ORGANIZATION} from "@/common/js/constants";
|
||||
import MsDeleteConfirm from "../../common/components/MsDeleteConfirm";
|
||||
|
||||
export default {
|
||||
name: "MsOrganization",
|
||||
components: {
|
||||
MsDeleteConfirm,
|
||||
MsCreateBox,
|
||||
MsTableHeader,
|
||||
MsRolesTag,
|
||||
MsTableOperator,
|
||||
MsDialogFooter,
|
||||
MsTableOperatorButton,
|
||||
Treeselect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
depts:[],
|
||||
components: [
|
||||
{field: "name", label: "姓名", component: "FuInputComponent", defaultOperator: "eq"},
|
||||
{field: "email", label: "Email", component: "FuInputComponent"},
|
||||
{
|
||||
field: "status",
|
||||
label: "状态",
|
||||
component: "FuSelectComponent",
|
||||
options: [
|
||||
{label: "运行中", value: "Running"},
|
||||
{label: "成功", value: "Success"},
|
||||
{label: "失败", value: "Fail"}
|
||||
],
|
||||
multiple: true
|
||||
},
|
||||
{field: "create_time", label: "创建时间", component: "FuDateTimeComponent"},
|
||||
],
|
||||
queryPath: '/api/dept/root',
|
||||
deletePath: '/organization/delete/',
|
||||
createPath: '/organization/add',
|
||||
updatePath: '/organization/update',
|
||||
result: {},
|
||||
dialogOrgAddVisible: false,
|
||||
dialogOrgUpdateVisible: false,
|
||||
dialogOrgMemberVisible: false,
|
||||
dialogOrgMemberAddVisible: false,
|
||||
dialogOrgMemberUpdateVisible: false,
|
||||
multipleSelection: [],
|
||||
|
||||
dialogCurrentPage: 1,
|
||||
dialogPageSize: 10,
|
||||
dialogTotal: 0,
|
||||
currentRow: {},
|
||||
condition: {},
|
||||
dialogCondition: {},
|
||||
tableData: [],
|
||||
memberLineData: [],
|
||||
form: {},
|
||||
memberForm: {},
|
||||
rule: {
|
||||
name: [
|
||||
{required: true, message: this.$t('organization.input_name'), trigger: 'blur'},
|
||||
{min: 2, max: 25, message: this.$t('commons.input_limit', [2, 25]), trigger: 'blur'}
|
||||
],
|
||||
description: [
|
||||
{max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
orgMemberRule: {
|
||||
userIds: [
|
||||
{required: true, message: this.$t('member.please_choose_member'), trigger: ['blur']}
|
||||
],
|
||||
roleIds: [
|
||||
{required: true, message: this.$t('role.please_choose_role'), trigger: ['blur']}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
activated() {
|
||||
this.initTableData();
|
||||
},
|
||||
methods: {
|
||||
create() {
|
||||
this.dialogOrgAddVisible = true;
|
||||
listenGoBack(this.closeFunc);
|
||||
},
|
||||
search(condition) {
|
||||
console.log(condition)
|
||||
},
|
||||
addMember() {
|
||||
this.dialogOrgMemberAddVisible = true;
|
||||
this.memberForm = {};
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.$set(this.memberForm, "userList", response.data);
|
||||
this.$set(this.memberForm, "copyUserList", response.data);
|
||||
});
|
||||
this.result = this.$get('/role/list/org', response => {
|
||||
this.$set(this.memberForm, "roles", response.data);
|
||||
})
|
||||
},
|
||||
dataFilter(val) {
|
||||
if (val) {
|
||||
this.memberForm.userList = this.memberForm.copyUserList.filter((item) => {
|
||||
if (!!~item.id.indexOf(val) || !!~item.id.toUpperCase().indexOf(val.toUpperCase())) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.memberForm.userList = this.memberForm.copyUserList;
|
||||
}
|
||||
},
|
||||
edit(row) {
|
||||
this.dialogOrgUpdateVisible = true;
|
||||
this.form = Object.assign({}, row);
|
||||
listenGoBack(this.closeFunc);
|
||||
},
|
||||
editMember(row) {
|
||||
this.dialogOrgMemberUpdateVisible = true;
|
||||
this.memberForm = Object.assign({}, row);
|
||||
let roleIds = this.memberForm.roles.map(r => r.id);
|
||||
this.result = this.$get('/role/list/org', response => {
|
||||
this.$set(this.memberForm, "allroles", response.data);
|
||||
})
|
||||
// 编辑时填充角色信息
|
||||
this.$set(this.memberForm, 'roleIds', roleIds);
|
||||
listenGoBack(this.closeFunc);
|
||||
},
|
||||
cellClick(row) {
|
||||
// 保存当前点击的组织信息到currentRow
|
||||
this.currentRow = row;
|
||||
this.dialogOrgMemberVisible = true;
|
||||
let param = {
|
||||
name: '',
|
||||
organizationId: row.id
|
||||
};
|
||||
let path = "/user/special/org/member/list";
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/org/" + row.id;
|
||||
for (let i = 0; i < this.memberLineData.length; i++) {
|
||||
this.$get(url + "/" + encodeURIComponent(this.memberLineData[i].id), response => {
|
||||
let roles = response.data;
|
||||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
listenGoBack(this.closeFunc);
|
||||
},
|
||||
dialogSearch() {
|
||||
let row = this.currentRow;
|
||||
this.dialogOrgMemberVisible = true;
|
||||
let param = this.dialogCondition;
|
||||
this.$set(param, 'organizationId', row.id);
|
||||
let path = "/user/special/org/member/list";
|
||||
this.result = this.$post(path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize, param, res => {
|
||||
let data = res.data;
|
||||
this.memberLineData = data.listObject;
|
||||
let url = "/userrole/list/org/" + row.id;
|
||||
for (let i = 0; i < this.memberLineData.length; i++) {
|
||||
this.$get(url + "/" + encodeURIComponent(this.memberLineData[i].id), response => {
|
||||
let roles = response.data;
|
||||
this.$set(this.memberLineData[i], "roles", roles);
|
||||
})
|
||||
}
|
||||
this.dialogTotal = data.itemCount;
|
||||
});
|
||||
},
|
||||
handleDelete(organization) {
|
||||
this.$refs.deleteConfirm.open(organization);
|
||||
},
|
||||
_handleDelete(organization) {
|
||||
this.$confirm(this.$t('organization.delete_confirm'), '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
cancelButtonText: this.$t('commons.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = this.$get(this.deletePath + organization.id, () => {
|
||||
let lastOrganizationId = getCurrentOrganizationId();
|
||||
let sourceId = organization.id;
|
||||
if (lastOrganizationId === sourceId) {
|
||||
refreshSessionAndCookies(DEFAULT, sourceId);
|
||||
}
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.initTableData();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('commons.delete_cancelled')
|
||||
});
|
||||
});
|
||||
},
|
||||
delMember(row) {
|
||||
this.$confirm(this.$t('member.remove_member'), '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
cancelButtonText: this.$t('commons.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = this.$get('/user/special/org/member/delete/' + this.currentRow.id + '/' + encodeURIComponent(row.id), () => {
|
||||
let sourceId = this.currentRow.id;
|
||||
let currentUser = getCurrentUser();
|
||||
let userId = row.id;
|
||||
if (currentUser.id === userId) {
|
||||
refreshSessionAndCookies(ORGANIZATION, sourceId);
|
||||
}
|
||||
this.$success(this.$t('commons.remove_success'))
|
||||
this.cellClick(this.currentRow);
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$info(this.$t('commons.remove_cancel'));
|
||||
});
|
||||
},
|
||||
createOrganization(createOrganizationForm) {
|
||||
this.$refs[createOrganizationForm].validate(valid => {
|
||||
if (valid) {
|
||||
this.result = this.$post(this.createPath, this.form, () => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.initTableData();
|
||||
this.dialogOrgAddVisible = false;
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
updateOrganization(updateOrganizationForm) {
|
||||
this.$refs[updateOrganizationForm].validate(valid => {
|
||||
if (valid) {
|
||||
this.result = this.$post(this.updatePath, this.form, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogOrgUpdateVisible = false;
|
||||
this.initTableData();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
initTableData() {
|
||||
|
||||
this.result = this.$post(this.queryPath , this.condition, (response) => {
|
||||
let data = response.data;
|
||||
data = data.map(obj => {
|
||||
if(obj.subCount > 0){
|
||||
obj.hasChildren = true;
|
||||
obj.children = null;
|
||||
}
|
||||
return obj;
|
||||
})
|
||||
this.tableData = data;
|
||||
this.depts = data;
|
||||
|
||||
// for (let i = 0; i < this.tableData.length; i++) {
|
||||
// let param = {
|
||||
// name: '',
|
||||
// organizationId: this.tableData[i].id
|
||||
// }
|
||||
// let path = "user/special/org/member/list/all";
|
||||
// this.$post(path, param, res => {
|
||||
// let member = res.data;
|
||||
// this.$set(this.tableData[i], "memberSize", member.length);
|
||||
// })
|
||||
// }
|
||||
// this.total = data.itemCount;
|
||||
})
|
||||
},
|
||||
closeFunc() {
|
||||
this.memberLineData = [];
|
||||
this.initTableData();
|
||||
this.form = {};
|
||||
removeGoBackListener(this.closeFunc);
|
||||
this.dialogOrgAddVisible = false;
|
||||
this.dialogOrgUpdateVisible = false;
|
||||
this.dialogOrgMemberVisible = false;
|
||||
this.dialogOrgMemberAddVisible = false;
|
||||
this.dialogOrgMemberUpdateVisible = false;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let param = {
|
||||
userIds: this.memberForm.userIds,
|
||||
roleIds: this.memberForm.roleIds,
|
||||
organizationId: this.currentRow.id
|
||||
};
|
||||
this.result = this.$post("user/special/org/member/add", param, () => {
|
||||
let sign = "other";
|
||||
let sourceId = this.currentRow.id;
|
||||
refreshSessionAndCookies(sign, sourceId);
|
||||
this.cellClick(this.currentRow);
|
||||
this.dialogOrgMemberAddVisible = false;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
updateOrgMember(formName) {
|
||||
let param = {
|
||||
id: this.memberForm.id,
|
||||
name: this.memberForm.name,
|
||||
email: this.memberForm.email,
|
||||
phone: this.memberForm.phone,
|
||||
roleIds: this.memberForm.roleIds,
|
||||
organizationId: this.currentRow.id
|
||||
}
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.result = this.$post("/organization/member/update", param, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.dialogOrgMemberUpdateVisible = false;
|
||||
this.cellClick(this.currentRow);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
console.log("111");
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
this.$post("api/dept/root", { enabled: true, pid: parentNode.id }, (res) => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 100)
|
||||
})
|
||||
}
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
},
|
||||
checkboxT(row, rowIndex) {
|
||||
return row.id !== 1
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.member-size {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.org-member-id {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.org-member-email {
|
||||
float: right;
|
||||
color: #8492a6;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.select-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dialog-css >>> .el-dialog__header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
</style>
|
47
frontend/src/business/components/settings/sys/test.vue
Normal file
47
frontend/src/business/components/settings/sys/test.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<fu-search-bar quick-placeholder="按 姓名/邮箱 搜索" :components="components" @exec="search"/>
|
||||
<!-- <layout-content>
|
||||
<dynamic-table>
|
||||
<fu-search-bar quick-placeholder="按 姓名/邮箱 搜索" :components="components" @exec="search"/>
|
||||
</dynamic-table>
|
||||
</layout-content> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import DynamicTable from "@/components/dynamic-table";
|
||||
// import LayoutContent from "@/components/layout/LayoutContent";
|
||||
|
||||
export default {
|
||||
name: "UserManagement",
|
||||
// components: {LayoutContent, DynamicTable},
|
||||
data() {
|
||||
return {
|
||||
components: [
|
||||
{field: "name", label: "姓名", component: "FuInputComponent", defaultOperator: "eq"},
|
||||
{field: "email", label: "Email", component: "FuInputComponent"},
|
||||
{
|
||||
field: "status",
|
||||
label: "状态",
|
||||
component: "FuSelectComponent",
|
||||
options: [
|
||||
{label: "运行中", value: "Running"},
|
||||
{label: "成功", value: "Success"},
|
||||
{label: "失败", value: "Fail"}
|
||||
],
|
||||
multiple: true
|
||||
},
|
||||
{field: "create_time", label: "创建时间", component: "FuDateTimeComponent"},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
search(condition) {
|
||||
console.log(condition)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -1,5 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import ElementUI from 'element-ui';
|
||||
import Fit2CloudUI from 'fit2cloud-ui';
|
||||
import '../assets/theme/index.css';
|
||||
import icon from "../common/js/icon";
|
||||
import filters from "../common/js/filter";
|
||||
@ -31,6 +32,9 @@ Vue.use(icon);
|
||||
Vue.use(ElementUI, {
|
||||
i18n: (key, value) => i18n.t(key, value)
|
||||
});
|
||||
Vue.use(Fit2CloudUI, {
|
||||
i18n: (key, value) => i18n.t(key, value)
|
||||
});
|
||||
Vue.use(filters);
|
||||
Vue.use(ajax);
|
||||
Vue.use(chart);
|
||||
|
@ -1522,6 +1522,21 @@ export default {
|
||||
dataset:{
|
||||
datalist:'Data List',
|
||||
add_group:'Add Group',
|
||||
add_scene:'Add Scene'
|
||||
add_scene:'Add Scene',
|
||||
group:'Group',
|
||||
scene:'Scene',
|
||||
delete:'Delete',
|
||||
move_to:'Move',
|
||||
rename:'Rename',
|
||||
tips:'Tips',
|
||||
confirm_delete:'Confirm Delete',
|
||||
delete_success:'Delete Success',
|
||||
confirm:'Confirm',
|
||||
cancel:'Cancel',
|
||||
search:'Search',
|
||||
back:'Back',
|
||||
add_table:'Add Table',
|
||||
process:'Process',
|
||||
update:'Update'
|
||||
}
|
||||
};
|
||||
|
@ -1523,6 +1523,21 @@ export default {
|
||||
dataset:{
|
||||
datalist:'數據列表',
|
||||
add_group:'添加分組',
|
||||
add_scene:'添加場景'
|
||||
add_scene:'添加場景',
|
||||
group:'分組',
|
||||
scene:'場景',
|
||||
delete:'刪除',
|
||||
move_to:'移動到',
|
||||
rename:'重命名',
|
||||
tips:'提示',
|
||||
confirm_delete:'確認刪除',
|
||||
delete_success:'刪除成功',
|
||||
confirm:'確認',
|
||||
cancel:'取消',
|
||||
search:'搜索',
|
||||
back:'返回',
|
||||
add_table:'添加表',
|
||||
process:'進度',
|
||||
update:'更新'
|
||||
}
|
||||
};
|
||||
|
@ -28,7 +28,8 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
configureWebpack: {
|
||||
devtool: 'source-map',
|
||||
// devtool: 'source-map',
|
||||
devtool: 'eval-source-map',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('src')
|
||||
|
Loading…
Reference in New Issue
Block a user