Merge pull request 'fix : 项目立项页面细节优化' (#528) from dd into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/528
This commit is contained in:
2024-07-11 15:32:44 +00:00
3 changed files with 45 additions and 52 deletions

View File

@@ -230,7 +230,7 @@ watch(() => props.showSingleTable, (newVal) => {
props.showSingleTable = newVal
}, {deep: true})
watch(() => props.formData.fileList, (newVal) => {
console.log('newVal-fileList', newVal)
// console.log('newVal-fileList', newVal)
if (props.preview) {
newVal?.forEach(item => {
allFileList.value.push(item)
@@ -263,6 +263,7 @@ watch(() => props.singleList, (newVal) => {
watch(() => props.formData.singleFile, (newVal) => {
// console.log('singleFile', newVal)
singleFile.value = newVal
props.formData.singleFile=newVal
}, {deep: true})
watch(() => isSingleFile.value, (newVal) => {
isSingleFile.value = newVal

View File

@@ -415,13 +415,13 @@ const handleSubmit = async () => {
fileList: files,
singleFile: attachment.value.singleFile,
projectId: projectId.value,
projectChargePerson: parseInt(projectChargePersonUserList.value[0].id),
projectPersonIds: projectPersonIds,
preProcess: JSON.stringify(localFormData.value.preProcess)
}
console.log(params)
let res
if (props.step === '20') {
params.projectChargePersonq = parseInt(projectChargePersonUserList.value[0].id)
params.projectPersonIds = projectPersonIds
if (props.mode === 'resubmit') {
res = await resubmitApply(params)
} else {

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
}