flat: 优化

This commit is contained in:
Apcallover
2025-11-30 16:47:06 +08:00
parent 8cf55d3925
commit 9a38bbd298
15 changed files with 167 additions and 122 deletions

View File

@@ -165,7 +165,7 @@ function serchforIt(defaultId) {
return;
}
$api.createRequest('/app/common/jobTitle/treeselect', {}, 'GET').then((resData) => {
const LoadCache = (resData) => {
if (userInfo.value.jobTitleId) {
const ids = userInfo.value.jobTitleId.split(',').map((id) => Number(id));
count.value = ids.length;
@@ -174,7 +174,8 @@ function serchforIt(defaultId) {
state.jobTitleId = userInfo.value.jobTitleId;
state.stations = resData.data;
state.visible = true;
});
};
$api.createRequestWithCache('/app/common/jobTitle/treeselect', {}, 'GET', false, LoadCache).then(LoadCache);
}
const reset = () => {