合并
This commit is contained in:
@ -245,7 +245,7 @@ const initFormData: ProgressCategoryForm = {
|
||||
name: undefined,
|
||||
matrixId: undefined,
|
||||
unitType: undefined,
|
||||
projectId: currentProject.value.id
|
||||
projectId: currentProject.value?.id
|
||||
};
|
||||
|
||||
const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
||||
@ -254,7 +254,7 @@ const data = reactive<PageData<ProgressCategoryForm, ProgressCategoryQuery>>({
|
||||
pid: undefined,
|
||||
name: undefined,
|
||||
unitType: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
matrixId: undefined,
|
||||
params: {}
|
||||
},
|
||||
@ -272,7 +272,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 查询进度类别列表 */
|
||||
const getList = async () => {
|
||||
if (!queryParams.value.matrixId) {
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
const res = await getProjectSquare(currentProject.value?.id);
|
||||
if (!res.data || res.data.length === 0) {
|
||||
proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
} else {
|
||||
@ -424,7 +424,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
Reference in New Issue
Block a user