gaoluyang
2025-03-21 f9d1ac78b245cb672342e96cf0e905b812352651
src/views/system/user/index.vue
@@ -8,8 +8,8 @@
            <div class="head-container addButton">
              <el-input v-model="deptName" placeholder="部门名称" clearable size="small" prefix-icon="el-icon-search"
                style="margin-bottom: 20px" />
              <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle
                @click="addSchema"></el-button>
              <!-- <el-button style="margin-left: 4px" type="primary" plain icon="el-icon-plus" size="mini" circle
                @click="addSchema"></el-button> -->
            </div>
            <div class="head-container">
              <el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
@@ -34,8 +34,8 @@
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查 询</el-button>
                  <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重 置</el-button>
                  <el-button type="primary" size="mini" @click="handleQuery">查询</el-button>
                  <el-button size="mini" @click="resetQuery">重置</el-button>
                </el-form-item>
              </el-form>
            </div>
@@ -47,10 +47,11 @@
            </div>
          </div>
          <el-col>
            <el-table v-loading="loading" :data="userList">
            <el-table v-loading="loading" :data="userList" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
              <el-table-column label="序号" align="center" type="index" />
              <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
              <el-table-column label="账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
              <el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true" />
              <el-table-column label="状态" align="center" key="status">
                <template slot-scope="scope">
                  <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
@@ -149,7 +150,8 @@
          </el-col>
          <el-col :span="12">
            <el-form-item label="归属部门" prop="deptId">
              <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true" placeholder="请选择归属部门" />
              <treeselect v-model="form.deptId" :options="enabledDeptOptions" :show-count="true"
                placeholder="请选择归属部门" />
            </el-form-item>
          </el-col>
        </el-row>
@@ -223,6 +225,7 @@
                style="width: 50%" @keyup.enter.native="searchPerson()"></el-input>
            </div>
            <el-table height="67vh" stripe :data="personList" v-loading="personLoad" ref="personTable"
                      :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="50">
              </el-table-column>
@@ -447,10 +450,6 @@
      }
      this.addLoad = true
      addDepartment(this.addOb).then(res => {
        if (res.code === 201) {
          this.addLoad = false
          return
        }
        this.$message.success('添加成功')
        this.addDia = false
        this.getList()
@@ -655,10 +654,6 @@
        person: this.multipleSelection,
        roleId: this.componentData.entity.roleId
      }).then(res => {
        if (res.code === 201) {
          this.addLoad = false
          return
        }
        this.$message.success('操作成功')
        this.multipleSelection = []
        this.$refs.personTable.clearSelection()