设备部门添加行业信息
This commit is contained in:
parent
bb6ae137f9
commit
b729be796c
@ -55,6 +55,11 @@ public class SysDept extends BaseEntity
|
||||
/** 行政区划ID */
|
||||
private String regionId;
|
||||
|
||||
/**
|
||||
* 行业代号
|
||||
*/
|
||||
private String industryCode;
|
||||
|
||||
/** 子部门 */
|
||||
private List<SysDept> children = new ArrayList<SysDept>();
|
||||
|
||||
@ -192,6 +197,14 @@ public class SysDept extends BaseEntity
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
public String getIndustryCode() {
|
||||
return industryCode;
|
||||
}
|
||||
|
||||
public void setIndustryCode(String industryCode) {
|
||||
this.industryCode = industryCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="regionId" column="region_id" />
|
||||
<result property="industryCode" column="industry_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.region_id
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.region_id,d.industry_code
|
||||
from sys_dept d
|
||||
</sql>
|
||||
|
||||
@ -64,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.region_id,
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.region_id,d.industry_code,
|
||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
||||
from sys_dept d
|
||||
where d.dept_id = #{deptId}
|
||||
@ -113,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="regionId != null">region_id,</if>
|
||||
<if test="industryCode != null">industry_code,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
@ -126,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="regionId != null">#{regionId},</if>
|
||||
<if test="industryCode != null">#{industryCode},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
@ -143,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="regionId != null and regionId != ''">region_id = #{regionId},</if>
|
||||
<if test="industryCode != null and industryCode != ''">industry_code = #{industryCode},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
|
@ -260,7 +260,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col
|
||||
:span="24"
|
||||
:span="12"
|
||||
v-if="form.parentId !== 0"
|
||||
>
|
||||
<el-form-item
|
||||
@ -277,6 +277,29 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col
|
||||
:span="12"
|
||||
v-if="form.parentId !== 0"
|
||||
>
|
||||
<el-form-item
|
||||
label="所属行业"
|
||||
prop="industryCode"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.industryCode"
|
||||
placeholder="请选择所属行业"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.industry_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div
|
||||
@ -308,7 +331,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Dept",
|
||||
dicts: ["sys_normal_disable"],
|
||||
dicts: ["sys_normal_disable", "industry_code"],
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
@ -455,6 +478,7 @@ export default {
|
||||
this.reset();
|
||||
getDept(row.deptId).then((response) => {
|
||||
this.form = response.data;
|
||||
console.log("111:", response);
|
||||
this.open = true;
|
||||
this.title = "修改部门";
|
||||
listRegionAll().then((response) => {
|
||||
|
Loading…
Reference in New Issue
Block a user