田源
2025-01-16 cfd8d4c470cc6db6f6689ebf01eae07e47a46990
Source/plt-web/plt-web-ui/src/views/system/department/index.vue
@@ -15,31 +15,45 @@
      @current-row-change="handleCurrentRowChange"
    >
      <template slot="menu" slot-scope="{row,size,type}">
        <el-button v-if="permissionList.departmentAddChildrenBtn" icon="el-icon-circle-plus-outline" size="small"
                   type="text" @click="handleAdd()">新增子级
        <el-button v-if="permissionList.departmentAddChildrenBtn" size="small"
                   type="text" @click="handleAdd()">
          <icon-show :name="permissionList.departmentAddChildrenBtn.source"></icon-show>
          新增子级
        </el-button>
        <el-button v-if="row.ALLDept !== 'ALLDept' && permissionList.editBtn" icon="el-icon-edit" size="small"
        <el-button v-if="row.ALLDept !== 'ALLDept' && permissionList.editBtn" size="small"
                   type="text"
                   @click="editBtnClick(row)">编辑
                   @click="editBtnClick(row)">
          <icon-show :name="permissionList.editBtn.source"></icon-show>
          编辑
        </el-button>
        <el-button v-if="row.ALLDept !== 'ALLDept' && permissionList.delBtn" icon="el-icon-delete" size="small"
        <el-button v-if="row.ALLDept !== 'ALLDept' && permissionList.delBtn" size="small"
                   type="text"
                   @click="rowDeleteHandler(row)">删除
                   @click="rowDeleteHandler(row)">
          <icon-show :name="permissionList.delBtn.source"></icon-show>
          删除
        </el-button>
      </template>
      <template slot="menuLeft" slot-scope="scope">
        <el-button v-if="permissionList.assignMembersBtn" icon="el-icon-school" plain size="small" type="primary"
                   @click="assignMembersHandler">分配成员
        <el-button v-if="permissionList.assignMembersBtn" class="button-custom-icon" plain size="small" type="primary"
                   @click="assignMembersHandler">
          <icon-show :name="permissionList.assignMembersBtn.source"></icon-show>
          分配成员
        </el-button>
        <el-button v-if="permissionList.statisticsBtn" icon="el-icon-user" plain size="small" type="primary"
                   @click="statisticsHandler">统计
        <el-button v-if="permissionList.statisticsBtn" class="button-custom-icon" plain size="small" type="primary"
                   @click="statisticsHandler">
          <icon-show :name="permissionList.statisticsBtn.source"></icon-show>
          统计
        </el-button>
        <el-button v-if="permissionList.importDepartmentBtn" icon="el-icon-upload2" plain size="small" type="primary"
                   @click="upLoadHandler">导入部门
        <el-button v-if="permissionList.importDepartmentBtn" class="button-custom-icon" plain size="small" type="primary"
                   @click="upLoadHandler">
          <icon-show :name="permissionList.importDepartmentBtn.source"></icon-show>
          导入部门
        </el-button>
        <el-button v-if="permissionList.downloadImportTemplateBtn" icon="el-icon-download" plain size="small"
                   type="primary" @click="downLoadHandler">下载导入模板
        <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small"
                   type="primary" @click="downLoadHandler">
          <icon-show :name="permissionList.downloadImportTemplateBtn.source"></icon-show>
          下载导入模板
        </el-button>
      </template>
    </avue-crud>
@@ -170,11 +184,11 @@
      return {
        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
        assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].assignMembers, false),
        departmentAddChildrenBtn: this.vaildData(this.permission[this.$route.query.id].departmentAddChildren, false),
        downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].downloadImportTemplate, false),
        importDepartmentBtn: this.vaildData(this.permission[this.$route.query.id].importDepartment, false),
        statisticsBtn: this.vaildData(this.permission[this.$route.query.id].statistics, false),
        assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false),
        departmentAddChildrenBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false),
        downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOAD, false),
        importDepartmentBtn: this.vaildData(this.permission[this.$route.query.id].MGR, false),
        statisticsBtn: this.vaildData(this.permission[this.$route.query.id].DISCARD, false),
      };
    },
  },
@@ -356,8 +370,6 @@
          this.rightTransferData = byRoleRes.data.data.map(item => item.oid);
          this.$refs.transfer.visible = true;
        }
      }).catch(err => {
        console.error(err);
      });
    },