Oliver
2022-12-22 73b48dd59a2d47b365b87784371c4ef57dde659b
src/views/systemSetting/baseSetting/user/components/main/index.vue
@@ -44,7 +44,7 @@
          </template>
        </el-table-column>
        <el-table-column prop="status" label="启用" min-width="5">
          <template slot-scope="scope">
          <template slot-scope="scope" >
            <!-- @change="handleChangeStatus(scope.row)" -->
            <el-switch
              class="switchStyle"
@@ -72,6 +72,9 @@
              <span @click="handleChangeRole(scope.row, 'depart')"
                >修改部门</span
              >
              <span class="line">|</span>
              <span @click="handleChangeStatus(scope.row)">{{scope.row.status === true ?'停用':'启用' }}</span>
            </div>
          </template>
        </el-table-column>
@@ -380,10 +383,11 @@
    // 修改用户状态
    handleChangeStatus(obj) {
      let { id, status } = obj;
      status == true ? (status = 1) : (status = 0);
      status == true ? (status = 0) : (status = 1);
      this.$axios
        .post(`sccg/admin/updateStatus/` + id + "?status=" + status)
        .then((res) => {
          this.getUserList();
        });
    },
    // 获取用户列表