合并
This commit is contained in:
@ -136,7 +136,7 @@ const dialog = reactive<DialogOption>({
|
||||
|
||||
const initFormData: ProjectTeamForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
remark: undefined,
|
||||
@ -149,7 +149,7 @@ const data = reactive<PageData<ProjectTeamForm, ProjectTeamQuery>>({
|
||||
pageSize: 10,
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc',
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
teamName: undefined,
|
||||
isClockIn: undefined,
|
||||
params: {},
|
||||
@ -232,7 +232,7 @@ const submitForm = () => {
|
||||
projectTeamFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
form.value.projectId = currentProject.value.id;
|
||||
form.value.projectId = currentProject.value?.id;
|
||||
if (form.value.id) {
|
||||
await updateProjectTeam(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
@ -266,7 +266,7 @@ const handleExport = () => {
|
||||
};
|
||||
//监听项目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