|
|
|
@ -1,19 +1,39 @@
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { reactive, ref, watch } from "vue";
|
|
|
|
|
import type { CheckboxValueType } from "element-plus";
|
|
|
|
|
import { reactive, ref, onMounted } from "vue";
|
|
|
|
|
import type { FormInstance } from "element-plus";
|
|
|
|
|
import { Close } from "@element-plus/icons-vue";
|
|
|
|
|
import { useColumns } from "./table/accountColumns";
|
|
|
|
|
import {
|
|
|
|
|
getUserList,
|
|
|
|
|
getDeptManageList,
|
|
|
|
|
resetPW,
|
|
|
|
|
deletePW,
|
|
|
|
|
deleteDeptManage
|
|
|
|
|
} from "@/api/system";
|
|
|
|
|
import { message } from "@/utils/message";
|
|
|
|
|
import accountDrawer from "./compontents/accountDrawer.vue";
|
|
|
|
|
import deptDrawer from "./compontents/deptDrawer.vue";
|
|
|
|
|
defineOptions({
|
|
|
|
|
name: "AccountManagement"
|
|
|
|
|
});
|
|
|
|
|
const { accountColumns, deptColumns, roleColumns } = useColumns();
|
|
|
|
|
const seachForm = reactive({
|
|
|
|
|
title: "",
|
|
|
|
|
publishDeptName: "",
|
|
|
|
|
status: "1"
|
|
|
|
|
});
|
|
|
|
|
const accountForm = reactive({
|
|
|
|
|
userName: "",
|
|
|
|
|
role: "",
|
|
|
|
|
department: ""
|
|
|
|
|
roleId: "",
|
|
|
|
|
deptId: ""
|
|
|
|
|
});
|
|
|
|
|
const updateFrom = ref({});
|
|
|
|
|
const updateDeptFrom = ref({});
|
|
|
|
|
const passwordForm = reactive({
|
|
|
|
|
id: "",
|
|
|
|
|
account: "",
|
|
|
|
|
password: "",
|
|
|
|
|
confirmPassword: ""
|
|
|
|
|
});
|
|
|
|
|
const accountFromType = ref("");
|
|
|
|
|
const tabList = ref([
|
|
|
|
|
{
|
|
|
|
|
title: "账号管理",
|
|
|
|
@ -32,161 +52,214 @@ const pagination = reactive({
|
|
|
|
|
total: 0,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
align: "center",
|
|
|
|
|
layout: "total, prev, pager, next, jumper",
|
|
|
|
|
background: true
|
|
|
|
|
});
|
|
|
|
|
const columns: TableColumnList = [
|
|
|
|
|
{
|
|
|
|
|
label: "序号",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "用户名",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "姓名",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "角色",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "所属部门",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "状态",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "备注",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "最新时间",
|
|
|
|
|
prop: "diseaseName"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "操作",
|
|
|
|
|
fixed: "right",
|
|
|
|
|
width: 350,
|
|
|
|
|
slot: "operation"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const dataList = ref([]);
|
|
|
|
|
const accountDataList = ref([]);
|
|
|
|
|
// const deptDataList = ref([]);
|
|
|
|
|
/**
|
|
|
|
|
* 部门列表查询
|
|
|
|
|
*/
|
|
|
|
|
const getDeptData = async () => {
|
|
|
|
|
const res: any = await getDeptManageList({
|
|
|
|
|
baseName: "",
|
|
|
|
|
deptCode: "",
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 20
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
deptOptions.value = res.data.records;
|
|
|
|
|
if (seachForm.status === "2") {
|
|
|
|
|
pagination.total = res.data.total;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
* 用户列表查询
|
|
|
|
|
*/
|
|
|
|
|
const getUserTableData = async () => {
|
|
|
|
|
const res: any = await getUserList({
|
|
|
|
|
userName: accountForm.userName,
|
|
|
|
|
deptId: accountForm.deptId,
|
|
|
|
|
roleId: accountForm.roleId,
|
|
|
|
|
pageNum: pagination.currentPage,
|
|
|
|
|
pageSize: pagination.pageSize
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
accountDataList.value = res.data.records;
|
|
|
|
|
pagination.total = res.data.total;
|
|
|
|
|
}
|
|
|
|
|
console.log(res);
|
|
|
|
|
// dataList.value = res.data;
|
|
|
|
|
};
|
|
|
|
|
const search = () => {
|
|
|
|
|
pagination.currentPage = 1;
|
|
|
|
|
pagination.pageSize = 10;
|
|
|
|
|
if (seachForm.status === "1") {
|
|
|
|
|
getUserTableData();
|
|
|
|
|
} else if (seachForm.status === "2") {
|
|
|
|
|
getDeptData();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const reset = () => {
|
|
|
|
|
seachForm.title = "";
|
|
|
|
|
seachForm.publishDeptName = "";
|
|
|
|
|
accountForm.userName = "";
|
|
|
|
|
accountForm.roleId = "";
|
|
|
|
|
accountForm.deptId = "";
|
|
|
|
|
// search();
|
|
|
|
|
};
|
|
|
|
|
const createFlag = ref(false);
|
|
|
|
|
const createDeptFlag = ref(false);
|
|
|
|
|
const dialogFormVisible = ref(false);
|
|
|
|
|
const deleteFormVisible = ref(false);
|
|
|
|
|
|
|
|
|
|
// const create = () => {
|
|
|
|
|
// createFlag.value = true;
|
|
|
|
|
// // search();
|
|
|
|
|
// };
|
|
|
|
|
const passwordFormRef = ref<FormInstance>();
|
|
|
|
|
|
|
|
|
|
const create = () => {
|
|
|
|
|
if (seachForm.status === "1") {
|
|
|
|
|
createFlag.value = true;
|
|
|
|
|
} else if (seachForm.status === "2") {
|
|
|
|
|
createDeptFlag.value = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// search();
|
|
|
|
|
};
|
|
|
|
|
// const changeStatus = item => {
|
|
|
|
|
// seachForm.status = item.id;
|
|
|
|
|
// };
|
|
|
|
|
const checkAll = ref(false);
|
|
|
|
|
const indeterminate = ref(false);
|
|
|
|
|
const value = ref<CheckboxValueType[]>([]);
|
|
|
|
|
const cities = ref([
|
|
|
|
|
{
|
|
|
|
|
value: "Beijing",
|
|
|
|
|
label: "Beijing"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Shanghai",
|
|
|
|
|
label: "Shanghai"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Nanjing",
|
|
|
|
|
label: "Nanjing"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Chengdu",
|
|
|
|
|
label: "Chengdu"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Shenzhen",
|
|
|
|
|
label: "Shenzhen"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Guangzhou",
|
|
|
|
|
label: "Guangzhou"
|
|
|
|
|
const closeDrawer = () => {
|
|
|
|
|
if (createFlag.value) {
|
|
|
|
|
createFlag.value = false;
|
|
|
|
|
accountFromType.value = "";
|
|
|
|
|
search();
|
|
|
|
|
} else if (createDeptFlag.value) {
|
|
|
|
|
createDeptFlag.value = false;
|
|
|
|
|
accountFromType.value = "";
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
const options = [
|
|
|
|
|
{
|
|
|
|
|
value: "Option1",
|
|
|
|
|
label: "Option1"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Option2",
|
|
|
|
|
label: "Option2"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Option3",
|
|
|
|
|
label: "Option3"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Option4",
|
|
|
|
|
label: "Option4"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "Option5",
|
|
|
|
|
label: "Option5"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
// if (updateFlag.value) {
|
|
|
|
|
// updateFlag.value = false;
|
|
|
|
|
// search();
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
const deptOptions = ref([]);
|
|
|
|
|
|
|
|
|
|
watch(value, val => {
|
|
|
|
|
if (val.length === 0) {
|
|
|
|
|
checkAll.value = false;
|
|
|
|
|
indeterminate.value = false;
|
|
|
|
|
} else if (val.length === cities.value.length) {
|
|
|
|
|
checkAll.value = true;
|
|
|
|
|
indeterminate.value = false;
|
|
|
|
|
} else {
|
|
|
|
|
indeterminate.value = true;
|
|
|
|
|
const changeStatus = item => {
|
|
|
|
|
seachForm.status = item.id;
|
|
|
|
|
search();
|
|
|
|
|
};
|
|
|
|
|
const handleView = async (value: any, type: string) => {
|
|
|
|
|
console.log(value);
|
|
|
|
|
createFlag.value = true;
|
|
|
|
|
accountFromType.value = type;
|
|
|
|
|
updateFrom.value = value;
|
|
|
|
|
};
|
|
|
|
|
const handleEdit = async (value: any, type: string) => {
|
|
|
|
|
if (seachForm.status === "1") {
|
|
|
|
|
createFlag.value = true;
|
|
|
|
|
accountFromType.value = type;
|
|
|
|
|
updateFrom.value = value;
|
|
|
|
|
} else if (seachForm.status === "2") {
|
|
|
|
|
createDeptFlag.value = true;
|
|
|
|
|
accountFromType.value = type;
|
|
|
|
|
updateDeptFrom.value = value;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleCheckAll = (val: CheckboxValueType) => {
|
|
|
|
|
indeterminate.value = false;
|
|
|
|
|
if (val) {
|
|
|
|
|
value.value = cities.value.map(_ => _.value);
|
|
|
|
|
const handleReset = (value: any) => {
|
|
|
|
|
dialogFormVisible.value = true;
|
|
|
|
|
passwordForm.id = value.id;
|
|
|
|
|
passwordForm.account = value.account;
|
|
|
|
|
// updateId.value = value.id;
|
|
|
|
|
// updateFlag.value = true;
|
|
|
|
|
};
|
|
|
|
|
const handleDelete = (value: any) => {
|
|
|
|
|
deleteFormVisible.value = true;
|
|
|
|
|
passwordForm.id = value.id;
|
|
|
|
|
};
|
|
|
|
|
function onCurrentChange(page: number) {
|
|
|
|
|
// console.log("onCurrentChange", page);
|
|
|
|
|
pagination.currentPage = page;
|
|
|
|
|
pagination.pageSize = 10;
|
|
|
|
|
getUserTableData();
|
|
|
|
|
}
|
|
|
|
|
const submitForm = (formEl: FormInstance | undefined) => {
|
|
|
|
|
if (!formEl) return;
|
|
|
|
|
formEl.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
// console.log(valid);
|
|
|
|
|
resetPW({
|
|
|
|
|
id: passwordForm.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
message("重置成功", { type: "success" });
|
|
|
|
|
dialogFormVisible.value = false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
dialogFormVisible.value = false;
|
|
|
|
|
console.log("error submit!");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const resetForm = (formEl: FormInstance | undefined) => {
|
|
|
|
|
if (!formEl) return;
|
|
|
|
|
formEl.resetFields();
|
|
|
|
|
dialogFormVisible.value = false;
|
|
|
|
|
};
|
|
|
|
|
const deleteForm = () => {
|
|
|
|
|
if (seachForm.status === "1") {
|
|
|
|
|
deletePW({
|
|
|
|
|
id: passwordForm.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
message("删除成功", { type: "success" });
|
|
|
|
|
deleteFormVisible.value = false;
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (seachForm.status === "2") {
|
|
|
|
|
deleteDeptManage({
|
|
|
|
|
id: passwordForm.id
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
message("删除成功", { type: "success" });
|
|
|
|
|
deleteFormVisible.value = false;
|
|
|
|
|
search();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const newName = (type: any) => {
|
|
|
|
|
if (type === "1") {
|
|
|
|
|
return "新建账号";
|
|
|
|
|
} else if (type === "2") {
|
|
|
|
|
return "新建部门";
|
|
|
|
|
} else {
|
|
|
|
|
value.value = [];
|
|
|
|
|
return "新建角色";
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const changeStatus = item => {
|
|
|
|
|
seachForm.status = item.id;
|
|
|
|
|
const deleteName = (type: any) => {
|
|
|
|
|
if (type === "1") {
|
|
|
|
|
return "账号";
|
|
|
|
|
} else if (type === "2") {
|
|
|
|
|
return "部门";
|
|
|
|
|
} else {
|
|
|
|
|
return "角色";
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getDeptData();
|
|
|
|
|
getUserTableData();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="sublibrary_management app-main-content">
|
|
|
|
|
<!-- <div class="seach">
|
|
|
|
|
<div class="seach-title"><span>子库管理</span></div>
|
|
|
|
|
<el-form :model="seachForm">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item label="子库名称">
|
|
|
|
|
<el-input v-model="seachForm.title" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-button class="ml-8" @click="search" type="primary"
|
|
|
|
|
>搜索</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button @click="reset">重置</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="main-table">
|
|
|
|
|
<div class="main-table-header">
|
|
|
|
|
<div class="tab-list">
|
|
|
|
@ -201,106 +274,242 @@ const changeStatus = item => {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="header-btn">
|
|
|
|
|
<el-button @click="search" type="primary">新建账号</el-button>
|
|
|
|
|
<el-button @click="create" type="primary">{{
|
|
|
|
|
newName(seachForm.status)
|
|
|
|
|
}}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="account_seach" v-if="seachForm.status === '1'">
|
|
|
|
|
<el-form :model="accountForm">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item label="用户名">
|
|
|
|
|
<el-input v-model="accountForm.userName" />
|
|
|
|
|
<el-input v-model="accountForm.userName" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="ml-4" label="角色">
|
|
|
|
|
<el-input v-model="accountForm.role" />
|
|
|
|
|
<el-input v-model="accountForm.roleId" placeholder="请输入" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="ml-4" label="所属部门">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="accountForm.department"
|
|
|
|
|
v-model="accountForm.deptId"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in options"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
v-for="item in deptOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.deptName"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-button class="ml-8" @click="search" type="primary"
|
|
|
|
|
>搜索</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button @click="reset">重置</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button @click="reset" class="ml-8">重置</el-button>
|
|
|
|
|
<el-button @click="search" type="primary">搜索</el-button>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<pure-table
|
|
|
|
|
showOverflowTooltip
|
|
|
|
|
alignWhole="center"
|
|
|
|
|
:data="accountDataList"
|
|
|
|
|
:columns="accountColumns"
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
background: 'var(--el-table-row-hover-bg-color)',
|
|
|
|
|
color: 'var(--el-text-color-primary)'
|
|
|
|
|
}"
|
|
|
|
|
:pagination="pagination"
|
|
|
|
|
@page-current-change="onCurrentChange"
|
|
|
|
|
>
|
|
|
|
|
<template #index="{ index }">
|
|
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #userRoleList="{ row }">
|
|
|
|
|
<span v-for="(item, index) in row.userRoleList" :key="index"
|
|
|
|
|
>{{ item.roleName
|
|
|
|
|
}}<i v-if="index < row.userRoleList.length - 1">, </i></span
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #status="{ row }">
|
|
|
|
|
<el-switch v-model="row.status" />
|
|
|
|
|
</template>
|
|
|
|
|
<template #operation="{ row }">
|
|
|
|
|
<el-button link type="primary" @click="handleView(row, 'view')">
|
|
|
|
|
查看
|
|
|
|
|
</el-button>
|
|
|
|
|
<span>|</span>
|
|
|
|
|
<el-button link type="primary" @click="handleEdit(row, 'edit')">
|
|
|
|
|
编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<span>|</span>
|
|
|
|
|
<el-button link type="primary" @click="handleReset(row)">
|
|
|
|
|
重置密码
|
|
|
|
|
</el-button>
|
|
|
|
|
<span>|</span>
|
|
|
|
|
<el-button link type="danger" @click="handleDelete(row)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template></pure-table
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<pure-table
|
|
|
|
|
showOverflowTooltip
|
|
|
|
|
alignWhole="center"
|
|
|
|
|
:data="dataList"
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
background: 'var(--el-table-row-hover-bg-color)',
|
|
|
|
|
color: 'var(--el-text-color-primary)'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<template #operation="{ row }">
|
|
|
|
|
<el-button link type="danger" @click="handleDelete(row)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template></pure-table
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<el-drawer
|
|
|
|
|
v-model="createFlag"
|
|
|
|
|
modal-class="drawer_content"
|
|
|
|
|
:with-header="false"
|
|
|
|
|
>
|
|
|
|
|
<div class="drawer_header">
|
|
|
|
|
<span>新建子库</span>
|
|
|
|
|
<div class="account_seach" v-if="seachForm.status === '2'">
|
|
|
|
|
<pure-table
|
|
|
|
|
showOverflowTooltip
|
|
|
|
|
alignWhole="center"
|
|
|
|
|
:data="deptOptions"
|
|
|
|
|
:columns="deptColumns"
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
background: 'var(--el-table-row-hover-bg-color)',
|
|
|
|
|
color: 'var(--el-text-color-primary)'
|
|
|
|
|
}"
|
|
|
|
|
:pagination="pagination"
|
|
|
|
|
@page-current-change="onCurrentChange"
|
|
|
|
|
>
|
|
|
|
|
<template #index="{ index }">
|
|
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #operation="{ row }">
|
|
|
|
|
<el-button link type="primary" @click="handleEdit(row, 'edit')">
|
|
|
|
|
编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<span>|</span>
|
|
|
|
|
<el-button link type="primary" @click="handleReset(row)">
|
|
|
|
|
部门权限
|
|
|
|
|
</el-button>
|
|
|
|
|
<span>|</span>
|
|
|
|
|
<el-button link type="danger" @click="handleDelete(row)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template></pure-table
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="drawer_box">
|
|
|
|
|
<el-form :model="accountForm">
|
|
|
|
|
<el-form-item label="子库名称">
|
|
|
|
|
<el-input v-model="accountForm.title" autocomplete="off" />
|
|
|
|
|
<div class="account_seach" v-if="seachForm.status === '3'">
|
|
|
|
|
<pure-table
|
|
|
|
|
showOverflowTooltip
|
|
|
|
|
alignWhole="center"
|
|
|
|
|
:data="dataList"
|
|
|
|
|
:columns="roleColumns"
|
|
|
|
|
:header-cell-style="{
|
|
|
|
|
background: 'var(--el-table-row-hover-bg-color)',
|
|
|
|
|
color: 'var(--el-text-color-primary)'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<template #operation="{ row }">
|
|
|
|
|
<el-button link type="danger" @click="handleDelete(row)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template></pure-table
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 账户抽屉 -->
|
|
|
|
|
<accountDrawer
|
|
|
|
|
:createFlag="createFlag"
|
|
|
|
|
:updateFrom="updateFrom"
|
|
|
|
|
:accountFromType="accountFromType"
|
|
|
|
|
:closeDrawer="closeDrawer"
|
|
|
|
|
/>
|
|
|
|
|
<!-- 部门 -->
|
|
|
|
|
<deptDrawer
|
|
|
|
|
:createFlag="createDeptFlag"
|
|
|
|
|
:updateFrom="updateDeptFrom"
|
|
|
|
|
:accountFromType="accountFromType"
|
|
|
|
|
:closeDrawer="closeDrawer"
|
|
|
|
|
/>
|
|
|
|
|
<!-- 账户弹框 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
v-model="dialogFormVisible"
|
|
|
|
|
title="Shipping address"
|
|
|
|
|
width="560"
|
|
|
|
|
:show-close="false"
|
|
|
|
|
>
|
|
|
|
|
<template #header="{ close, titleId, titleClass }">
|
|
|
|
|
<div class="my-header">
|
|
|
|
|
<h4 :id="titleId" :class="titleClass"><span />重置密码</h4>
|
|
|
|
|
<el-icon @click="close" class="cursor-pointer"><Close /></el-icon>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<el-form
|
|
|
|
|
:model="passwordForm"
|
|
|
|
|
label-width="auto"
|
|
|
|
|
ref="passwordFormRef"
|
|
|
|
|
class="p-6"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item label="用户名">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="passwordForm.account"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="子库编码">
|
|
|
|
|
<el-input v-model="accountForm.title" autocomplete="off" />
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="密码"
|
|
|
|
|
prop="password"
|
|
|
|
|
:rules="[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="passwordForm.password"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="关联部门">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="value"
|
|
|
|
|
multiple
|
|
|
|
|
clearable
|
|
|
|
|
collapse-tags
|
|
|
|
|
placeholder="Select"
|
|
|
|
|
popper-class="custom-header"
|
|
|
|
|
:max-collapse-tags="3"
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in cities"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-checkbox
|
|
|
|
|
v-model="checkAll"
|
|
|
|
|
:indeterminate="indeterminate"
|
|
|
|
|
@change="handleCheckAll"
|
|
|
|
|
>
|
|
|
|
|
All
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="确认密码"
|
|
|
|
|
prop="confirmPassword"
|
|
|
|
|
:rules="[
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
]"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="passwordForm.confirmPassword"
|
|
|
|
|
autocomplete="off"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div class="drawer_footer">
|
|
|
|
|
<el-button plain>重置</el-button>
|
|
|
|
|
<el-button type="primary">确定</el-button>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="resetForm(passwordFormRef)">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitForm(passwordFormRef)">
|
|
|
|
|
确定
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 账户删除弹框 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
v-model="deleteFormVisible"
|
|
|
|
|
title="Shipping address"
|
|
|
|
|
width="500"
|
|
|
|
|
:show-close="false"
|
|
|
|
|
>
|
|
|
|
|
<template #header="{ titleId, titleClass }">
|
|
|
|
|
<div class="my-header_delete">
|
|
|
|
|
<h4 :id="titleId" :class="titleClass">
|
|
|
|
|
<div class="my_delete_icon" />
|
|
|
|
|
确认删除【{{ deleteName(seachForm.status) }}】?
|
|
|
|
|
</h4>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<div class="my_delete_body">
|
|
|
|
|
删除后无法找回,此操作不可逆,请谨慎处理
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-drawer>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer_delete">
|
|
|
|
|
<el-button @click="deleteFormVisible = false">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="deleteForm"> 确定 </el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@ -357,38 +566,69 @@ const changeStatus = item => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.el-drawer__body) {
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
:deep(.el-dialog) {
|
|
|
|
|
background: linear-gradient(180deg, #e1ecfe 0%, #fff 30%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer_content {
|
|
|
|
|
.drawer_header {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
height: 96px;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
line-height: 65px;
|
|
|
|
|
border-bottom: 1px solid #e9e9e9;
|
|
|
|
|
.my-header,
|
|
|
|
|
.my-header_delete {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
height: 74px;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
border-bottom: 1px solid rgb(91 139 255 / 30%);
|
|
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
padding-left: 8px;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
border-left: 6px solid #0052d9;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
background: #0052d9;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.el-dialog__body) {
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drawer_box {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
.my-header_delete {
|
|
|
|
|
padding: 24px 24px 0;
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
height: calc(100vh - 96px);
|
|
|
|
|
padding: 24px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
|
|
.drawer_footer {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
.my_delete_icon {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 28px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
background-image: url("@/assets/home/tishi@2x.png");
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.my_delete_body {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dialog-footer_delete {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|