xiangpei
2024-05-09 a40ff20ea396e1b7395451e3820ae77d46aa299b
部门管理员优化
1个文件已修改
17 ■■■■■ 已修改文件
src/views/education/department/list.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/education/department/list.vue
@@ -17,7 +17,7 @@
    <el-table v-loading="listLoading" :data="tableData" stripe border fit highlight-current-row style="width: 100%">
      <el-table-column prop="name" label="部门"/>
      <el-table-column prop="adminName" label="部门负责人"/>
      <el-table-column prop="adminNames" label="部门负责人"/>
<!--      <el-table-column prop="levelName" label="部门" />-->
      <el-table-column width="400px" label="操作" align="center">
        <template slot-scope="{row}">
@@ -37,7 +37,7 @@
      :visible.sync="dialogVisible"
      width="400px"
      :before-close="handleClose">
      <el-select v-model="updateAdminForm.adminId" @change="changSelect" filterable placeholder="选择管理员">
      <el-select v-model="updateAdminForm.adminIds" @change="changSelect" multiple filterable placeholder="选择管理员">
        <el-option
          v-for="item in deptUserList"
          :key="item.id"
@@ -69,7 +69,7 @@
      title: '',
      updateAdminForm: {
        id: null,
        adminId: null
        adminIds: []
      },
      depart: [],
      queryParam: {
@@ -94,7 +94,7 @@
      this.title = ''
    },
    submitUpdate () {
      if (!this.updateAdminForm.adminId) {
      if (!this.updateAdminForm.adminIds) {
        this.$message.warning('请选择部门负责人')
        return
      }
@@ -109,7 +109,8 @@
    },
    updateDeptAdmin (row) {
      this.updateAdminForm.id = row.id
      this.updateAdminForm.adminId = row.adminId
      this.updateAdminForm.adminIds = row.adminIds
      console.log(this.updateAdminForm.adminIds, "dd")
      this.title = row.name + '--管理员修改'
      this.getUserSelect(row.id)
      this.dialogVisible = true
@@ -124,12 +125,16 @@
      departmentApi.pageList(this.queryParam).then(data => {
        const re = data.response
        this.tableData = re.list
        this.tableData.map(item => {
          if (item.adminNames) {
            item.adminNames = item.adminNames.join("、")
          }
        })
        this.total = re.total
        this.queryParam.pageIndex = re.pageNum
        this.listLoading = false
        this.depart = data.response.list
        console.log(this.depart)
        this.depart.map(item => {
          item.key = item.id
          item.value = item.name