fix : 项目立项页面细节优化

This commit is contained in:
2024-07-11 23:31:59 +08:00
parent 0b6e825bbd
commit 80cd6363ab
3 changed files with 45 additions and 52 deletions

View File

@@ -125,9 +125,9 @@ const getAttachment = (val) => {
showSingleTable.value = true
})
}
watch(() => singleList.value, (newVal) => {
showSingleTable.value = newVal.length !== 0;
}, {deep: true})
// watch(() => singleList.value, (newVal) => {
// showSingleTable.value = newVal.length !== 0;
// }, {deep: true})
const getOtherFile = (val) => {
// console.log('上传文件getOtherFile', val)
showTable.value = false
@@ -149,6 +149,7 @@ const chooseUser = () => {
userPicker.value.showUserPicker()
}
const chooseUserInfo = () => {
if(userList.value==null)return;
if (userList.value.length > 0) {
return userList.value.map(item => {
return item.name
@@ -158,17 +159,7 @@ const chooseUserInfo = () => {
}
}
const selected = (select) => {
let userInfoList = []
for (let val of select) {
let userInfo = {
id: val.id,
name: val.name,
companyName: val.companyName,
accountType: val.accountType,
}
userInfoList.push(userInfo)
}
userList.value = userInfoList
userList.value = select
}
const handleSubmit = async () => {
let files = []
@@ -176,7 +167,7 @@ const handleSubmit = async () => {
files.push(getFileParam(item))
})
let userIds = []
if (userList.value.length > 0) {
if (userList.value&&userList.value.length > 0) {
userIds = userList.value?.map(item => {
return item.id
})
@@ -203,6 +194,7 @@ const handleSubmit = async () => {
} else {
attachment.value.clearValidate()
}
console.log('params',params)
let res = await submitPhaseChange(params)
ElNotification({
title: '提示',
@@ -224,7 +216,7 @@ const handleResubmit = (instance) => {
})
}
let userIds = []
if (userList.value.length > 0) {
if (userList.value&&userList.value.length > 0) {
userIds = userList.value?.map(item => {
return item.id
})
@@ -294,7 +286,7 @@ const getDetailInfo = async () => {
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
userList.value=res.data.userInfoList
userList.value=res.data.userInfoList?res.data.userInfoList:[]
formData.value = res.data
loading.value = false
}