31
0
Fork 0

fix: 修改页面bug

develop
JINGYJ
parent 3d3a6788e6
commit d63468fd41

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

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

@ -148,25 +148,43 @@ export function useUser() {
} }
) )
.then(() => { .then(() => {
switchLoadMap.value[index] = Object.assign( const params = {
{}, department_id: row.department_id,
switchLoadMap.value[index], username: row.username,
{ phone_number: row.phone_number,
loading: true 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] = Object.assign( // {},
{}, // switchLoadMap.value[index],
switchLoadMap.value[index], // {
{ // loading: true
loading: false
} // }
); // );
message("已成功修改用户状态", {
type: "success"
});
}, 300);
}) })
.catch(() => { .catch(() => {
row.status === 0 ? (row.status = 1) : (row.status = 0); row.status === 0 ? (row.status = 1) : (row.status = 0);

Loading…
Cancel
Save