|
|
@@ -61,10 +61,10 @@
|
|
|
>
|
|
|
<template v-slot:table-title-btn>
|
|
|
<div>
|
|
|
- <el-select v-model="status" style="width: 100px;">
|
|
|
+ <el-select v-model="status" style="width: 100px;" @change="statusChange()">
|
|
|
<!-- status -->
|
|
|
<el-option
|
|
|
- :label="'全部'" :value="'all'"
|
|
|
+ :label="'全部'" :value="'-1'"
|
|
|
></el-option>
|
|
|
<el-option v-for="item in statusList" :key="item.id"
|
|
|
:label="item.label" :value="item.value"
|
|
|
@@ -86,9 +86,9 @@
|
|
|
</el-button>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <el-dropdown-item>批量删除</el-dropdown-item>
|
|
|
- <el-dropdown-item>批量禁用</el-dropdown-item>
|
|
|
- <el-dropdown-item>批量启用</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="checkTableIdList.length>0 ? false:true" v-on:click="delsUser">批量删除</el-dropdown-item>
|
|
|
+ <!-- <el-dropdown-item>批量禁用</el-dropdown-item>
|
|
|
+ <el-dropdown-item>批量启用</el-dropdown-item> -->
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
@@ -269,7 +269,7 @@ onMounted(async () => {
|
|
|
|
|
|
//状态字典
|
|
|
const statusList = ref<dictType[]>([]);
|
|
|
-const status=ref('all')
|
|
|
+const status=ref('-1')
|
|
|
//机构列表
|
|
|
|
|
|
type tableType = {
|
|
|
@@ -331,19 +331,9 @@ function expandTree(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const formAccessibility = reactive({
|
|
|
- fullName: "",
|
|
|
- firstName: "",
|
|
|
- lastName: "",
|
|
|
- phone: "",
|
|
|
-});
|
|
|
+
|
|
|
const ruleFormRef = ref<FormInstance>();
|
|
|
-const form = reactive({
|
|
|
- name: "",
|
|
|
- role: "",
|
|
|
- password: "",
|
|
|
- phone: "",
|
|
|
-});
|
|
|
+
|
|
|
|
|
|
interface RuleForm {
|
|
|
name: string;
|
|
|
@@ -439,8 +429,17 @@ const pageInfo =reactive( {
|
|
|
});
|
|
|
function showAllMember(){
|
|
|
deptItem.value={}
|
|
|
+ pageInfo.pageNum = 1;
|
|
|
+ pageInfo.pageSize = 10;
|
|
|
getUserList()
|
|
|
}
|
|
|
+
|
|
|
+function statusChange(){
|
|
|
+ pageInfo.pageNum = 1;
|
|
|
+ pageInfo.pageSize = 10;
|
|
|
+ getUserList()
|
|
|
+}
|
|
|
+
|
|
|
const getList = (item: PageInfo) => {
|
|
|
pageInfo.pageNum = item.pageNum;
|
|
|
pageInfo.pageSize = item.pageSize;
|
|
|
@@ -450,7 +449,8 @@ const getList = (item: PageInfo) => {
|
|
|
const getUserList= () => {
|
|
|
api.userApi.memberList({
|
|
|
...pageInfo,
|
|
|
- deptId:deptItem.value.id
|
|
|
+ deptId:deptItem.value.id,
|
|
|
+ status:status.value
|
|
|
}).then((res:any)=>{
|
|
|
|
|
|
if(res.code===200){
|
|
|
@@ -664,6 +664,40 @@ function delUser(item:any) {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+//批量删除成员
|
|
|
+function delsUser() {
|
|
|
+
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ "账号删除后,该账号将无法使用访问本企业,请确定是否删除 ",
|
|
|
+ "确认要删除账号吗?",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确认删除",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ center:true
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ api.userApi
|
|
|
+ .userDelete({
|
|
|
+ id: checkTableIdList.value,
|
|
|
+
|
|
|
+ })
|
|
|
+ .then((res: any) => {
|
|
|
+ if(res.code==200){
|
|
|
+ ElMessage.success(res.msg)
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(123);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ ElMessage.warning("用户取消操作");
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
//确认弹框提交信息
|
|
|
const receiveInfo = ref<transfer>({});
|
|
|
function confirmDialogInfo(item: any) {
|