This commit is contained in:
tcy
2025-08-23 09:14:35 +08:00
parent 446d30ce35
commit ceabac7fb8

View File

@ -161,6 +161,15 @@ const removeDocumentItem = (index: number) => {
const byProjectIdAll = async () => {
// 调用接口获取数据
const res = await byProjectId(currentProject.value?.id);
console.log(res);
form.documents = [
{
id: Date.now(),
catalogueName: '',
remark: ''
}
];
disabledAll.value = false;
if (res.code === 200 && res.data) {
const data = res.data;
// 回显基本信息
@ -187,6 +196,8 @@ const byProjectIdAll = async () => {
});
});
} else {
console.log(11111111);
// 如果没有资料,保持一个空项
form.documents = [
{
@ -195,6 +206,9 @@ const byProjectIdAll = async () => {
remark: ''
}
];
console.log(form.documents);
}
}
};
@ -315,6 +329,7 @@ const onLoad = async () => {
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
getUserDetail();
getDeptAllUser(userStore.deptId).then(() => {
byProjectIdAll();
});