角色和岗位使用用途显示到菜单上
This commit is contained in:
		@@ -81,6 +81,7 @@
 | 
			
		||||
      <el-table-column label="岗位编号" align="center" prop="postId" />
 | 
			
		||||
      <el-table-column label="岗位编码" align="center" prop="postCode" />
 | 
			
		||||
      <el-table-column label="岗位名称" align="center" prop="postName" />
 | 
			
		||||
      <el-table-column label="岗位用途" align="center" prop="purp" :formatter="purpFormat" />
 | 
			
		||||
      <el-table-column label="岗位排序" align="center" prop="postSort" />
 | 
			
		||||
      <el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
 | 
			
		||||
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
 | 
			
		||||
@@ -240,6 +241,10 @@ export default {
 | 
			
		||||
    statusFormat(row, column) {
 | 
			
		||||
      return this.selectDictLabel(this.statusOptions, row.status);
 | 
			
		||||
    },
 | 
			
		||||
    //岗位用途字典翻译
 | 
			
		||||
    purpFormat(row, column) {
 | 
			
		||||
      return this.selectDictLabel(this.purpOptions, row.purp);
 | 
			
		||||
    },
 | 
			
		||||
    // 取消按钮
 | 
			
		||||
    cancel() {
 | 
			
		||||
      this.open = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -98,8 +98,15 @@
 | 
			
		||||
 | 
			
		||||
    <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center" />
 | 
			
		||||
      <el-table-column label="角色编号" prop="roleId" width="120" />
 | 
			
		||||
      <el-table-column label="角色编号" prop="roleId" width="100" />
 | 
			
		||||
      <el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="角色用途"
 | 
			
		||||
        prop="purpose"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
        width="120"
 | 
			
		||||
        :formatter="purposeFormat"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
 | 
			
		||||
      <el-table-column label="显示顺序" prop="roleSort" width="100" />
 | 
			
		||||
      <el-table-column label="状态" align="center" width="100">
 | 
			
		||||
@@ -410,6 +417,10 @@ export default {
 | 
			
		||||
        this.$refs.dept.setCheckedKeys(response.checkedKeys);
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 角色用途字典翻译
 | 
			
		||||
    purposeFormat(row, column) {
 | 
			
		||||
      return this.selectDictLabel(this.purposeOptions, row.purpose);
 | 
			
		||||
    },
 | 
			
		||||
    // 角色状态修改
 | 
			
		||||
    handleStatusChange(row) {
 | 
			
		||||
      let text = row.status === "0" ? "启用" : "停用";
 | 
			
		||||
 
 | 
			
		||||
@@ -341,9 +341,9 @@ export default {
 | 
			
		||||
        parentId: undefined,
 | 
			
		||||
        province: undefined,
 | 
			
		||||
        provincename: undefined,
 | 
			
		||||
        regionid: undefined,
 | 
			
		||||
        // regionid: undefined,
 | 
			
		||||
        regionname: undefined,
 | 
			
		||||
        area: undefined,
 | 
			
		||||
        // area: undefined,
 | 
			
		||||
        areaname: undefined,
 | 
			
		||||
        address: undefined,
 | 
			
		||||
        mastername: undefined,
 | 
			
		||||
@@ -448,10 +448,10 @@ export default {
 | 
			
		||||
        parentId: undefined,
 | 
			
		||||
        province: undefined,
 | 
			
		||||
        provincename: undefined,
 | 
			
		||||
        regionid: undefined,
 | 
			
		||||
        regionname: undefined,
 | 
			
		||||
        area: undefined,
 | 
			
		||||
        areaname: undefined,
 | 
			
		||||
        // regionid: undefined,
 | 
			
		||||
        // regionname: undefined,
 | 
			
		||||
        // area: undefined,
 | 
			
		||||
        // areaname: undefined,
 | 
			
		||||
        address: undefined,
 | 
			
		||||
        mastername: undefined,
 | 
			
		||||
        tel: undefined,
 | 
			
		||||
 
 | 
			
		||||
@@ -105,13 +105,11 @@ public class BySchoolController extends BaseController
 | 
			
		||||
        String maxId = jdbcTemplate.queryForObject(String.format("select MAX(id) from by_school"),String.class);
 | 
			
		||||
        //生成32位UUID
 | 
			
		||||
        String uuid = getUUID32();
 | 
			
		||||
 | 
			
		||||
        //将UUID赋值给xxdm
 | 
			
		||||
        bySchool.setXxdm(uuid);
 | 
			
		||||
        bySchool.setCreateUser(SecurityUtils.getLoginUser().getUser().getUserId());
 | 
			
		||||
        bySchool.setApprovalUser(SecurityUtils.getLoginUser().getUser().getUserId());
 | 
			
		||||
        bySchool.setCreateTime(new Date());
 | 
			
		||||
 | 
			
		||||
        //创建dept实例  并且向要添加的dept中设置各个参数
 | 
			
		||||
        SysDept dept = new SysDept();
 | 
			
		||||
        if (maxId != "0")
 | 
			
		||||
@@ -131,7 +129,6 @@ public class BySchoolController extends BaseController
 | 
			
		||||
        dept.setLeader(SecurityUtils.getUsername());
 | 
			
		||||
        //插入数据
 | 
			
		||||
        deptService.insertDept(dept);
 | 
			
		||||
 | 
			
		||||
        return toAjax(bySchoolService.insertBySchool(bySchool));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -145,10 +142,8 @@ public class BySchoolController extends BaseController
 | 
			
		||||
    {
 | 
			
		||||
        //创建dept实例  并且向要添加的dept中设置各个参数
 | 
			
		||||
        SysDept dept = new SysDept();
 | 
			
		||||
 | 
			
		||||
        //设置schoolID为xxdm
 | 
			
		||||
        dept.setSchoolId(bySchool.getXxdm());
 | 
			
		||||
 | 
			
		||||
        //通过selectdeptlist来获取deptid
 | 
			
		||||
        dept.setDeptId(deptService.selectDeptList(dept).get(0).getDeptId());
 | 
			
		||||
        dept.setStatus(bySchool.getStatus());
 | 
			
		||||
@@ -169,12 +164,10 @@ public class BySchoolController extends BaseController
 | 
			
		||||
        {
 | 
			
		||||
            //循环找出school表的id
 | 
			
		||||
            Long bySchId = ids[i];
 | 
			
		||||
 | 
			
		||||
            //用school表ID获取xxdm的值
 | 
			
		||||
            //将值赋给dept中的schoolID
 | 
			
		||||
            SysDept dept = new SysDept();
 | 
			
		||||
            dept.setSchoolId(bySchoolService.selectBySchoolById(bySchId).getXxdm());
 | 
			
		||||
 | 
			
		||||
            //通过dept表的schoolID来找出dept的List
 | 
			
		||||
            deptService.deleteDeptById(deptService.selectDeptList(dept).get(0).getDeptId());
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user