31
0
Fork 0

fix: 修改页面bug

develop
JINGYJ 2 years ago
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,13 +148,16 @@ 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(() => { setTimeout(() => {
switchLoadMap.value[index] = Object.assign( switchLoadMap.value[index] = Object.assign(
{}, {},
@ -167,6 +170,21 @@ export function useUser() {
type: "success" type: "success"
}); });
}, 300); }, 300);
} else {
row.status === 0 ? (row.status = 1) : (row.status = 0);
message(`${res.msg}`, {
type: "warning"
});
}
});
// switchLoadMap.value[index] = Object.assign(
// {},
// switchLoadMap.value[index],
// {
// loading: true
// }
// );
}) })
.catch(() => { .catch(() => {
row.status === 0 ? (row.status = 1) : (row.status = 0); row.status === 0 ? (row.status = 1) : (row.status = 0);

Loading…
Cancel
Save