31
0
Fork 0

fix: 修改页面bug

develop
JINGYJ 2 years ago
parent 3d3a6788e6
commit d63468fd41

@ -51,6 +51,7 @@ defineExpose({ getRef });
emitPath: false,
checkStrictly: true
}"
:disabled="newFormInline.id ? true : false"
clearable
filterable
placeholder="请选择上级部门"

@ -189,6 +189,10 @@ export function useDept() {
addDept(params).then(res => {
if (res.success) {
chores();
} else {
message(`${res.msg}`, {
type: "warning"
});
}
});
} else {

@ -148,25 +148,43 @@ export function useUser() {
}
)
.then(() => {
switchLoadMap.value[index] = Object.assign(
{},
switchLoadMap.value[index],
{
loading: true
const params = {
department_id: row.department_id,
username: row.username,
phone_number: row.phone_number,
status: row.status,
gender: row.gender,
id: row.id
};
updateUser(params).then(res => {
if (res.success) {
setTimeout(() => {
switchLoadMap.value[index] = Object.assign(
{},
switchLoadMap.value[index],
{
loading: false
}
);
message("已成功修改用户状态", {
type: "success"
});
}, 300);
} else {
row.status === 0 ? (row.status = 1) : (row.status = 0);
message(`${res.msg}`, {
type: "warning"
});
}
);
setTimeout(() => {
switchLoadMap.value[index] = Object.assign(
{},
switchLoadMap.value[index],
{
loading: false
}
);
message("已成功修改用户状态", {
type: "success"
});
}, 300);
});
// switchLoadMap.value[index] = Object.assign(
// {},
// switchLoadMap.value[index],
// {
// loading: true
// }
// );
})
.catch(() => {
row.status === 0 ? (row.status = 1) : (row.status = 0);

Loading…
Cancel
Save