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:
@@ -230,7 +230,7 @@ watch(() => props.showSingleTable, (newVal) => {
|
|||||||
props.showSingleTable = newVal
|
props.showSingleTable = newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => props.formData.fileList, (newVal) => {
|
watch(() => props.formData.fileList, (newVal) => {
|
||||||
console.log('newVal-fileList', newVal)
|
// console.log('newVal-fileList', newVal)
|
||||||
if (props.preview) {
|
if (props.preview) {
|
||||||
newVal?.forEach(item => {
|
newVal?.forEach(item => {
|
||||||
allFileList.value.push(item)
|
allFileList.value.push(item)
|
||||||
@@ -263,6 +263,7 @@ watch(() => props.singleList, (newVal) => {
|
|||||||
watch(() => props.formData.singleFile, (newVal) => {
|
watch(() => props.formData.singleFile, (newVal) => {
|
||||||
// console.log('singleFile', newVal)
|
// console.log('singleFile', newVal)
|
||||||
singleFile.value = newVal
|
singleFile.value = newVal
|
||||||
|
props.formData.singleFile=newVal
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
watch(() => isSingleFile.value, (newVal) => {
|
watch(() => isSingleFile.value, (newVal) => {
|
||||||
isSingleFile.value = newVal
|
isSingleFile.value = newVal
|
||||||
|
|||||||
@@ -415,13 +415,13 @@ const handleSubmit = async () => {
|
|||||||
fileList: files,
|
fileList: files,
|
||||||
singleFile: attachment.value.singleFile,
|
singleFile: attachment.value.singleFile,
|
||||||
projectId: projectId.value,
|
projectId: projectId.value,
|
||||||
projectChargePerson: parseInt(projectChargePersonUserList.value[0].id),
|
|
||||||
projectPersonIds: projectPersonIds,
|
|
||||||
preProcess: JSON.stringify(localFormData.value.preProcess)
|
preProcess: JSON.stringify(localFormData.value.preProcess)
|
||||||
}
|
}
|
||||||
console.log(params)
|
console.log(params)
|
||||||
let res
|
let res
|
||||||
if (props.step === '20') {
|
if (props.step === '20') {
|
||||||
|
params.projectChargePersonq = parseInt(projectChargePersonUserList.value[0].id)
|
||||||
|
params.projectPersonIds = projectPersonIds
|
||||||
if (props.mode === 'resubmit') {
|
if (props.mode === 'resubmit') {
|
||||||
res = await resubmitApply(params)
|
res = await resubmitApply(params)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ const getAttachment = (val) => {
|
|||||||
showSingleTable.value = true
|
showSingleTable.value = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(() => singleList.value, (newVal) => {
|
// watch(() => singleList.value, (newVal) => {
|
||||||
showSingleTable.value = newVal.length !== 0;
|
// showSingleTable.value = newVal.length !== 0;
|
||||||
}, {deep: true})
|
// }, {deep: true})
|
||||||
const getOtherFile = (val) => {
|
const getOtherFile = (val) => {
|
||||||
// console.log('上传文件getOtherFile', val)
|
// console.log('上传文件getOtherFile', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
@@ -149,6 +149,7 @@ const chooseUser = () => {
|
|||||||
userPicker.value.showUserPicker()
|
userPicker.value.showUserPicker()
|
||||||
}
|
}
|
||||||
const chooseUserInfo = () => {
|
const chooseUserInfo = () => {
|
||||||
|
if(userList.value==null)return;
|
||||||
if (userList.value.length > 0) {
|
if (userList.value.length > 0) {
|
||||||
return userList.value.map(item => {
|
return userList.value.map(item => {
|
||||||
return item.name
|
return item.name
|
||||||
@@ -158,17 +159,7 @@ const chooseUserInfo = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const selected = (select) => {
|
const selected = (select) => {
|
||||||
let userInfoList = []
|
userList.value = select
|
||||||
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
|
|
||||||
}
|
}
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
let files = []
|
let files = []
|
||||||
@@ -176,7 +167,7 @@ const handleSubmit = async () => {
|
|||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
})
|
})
|
||||||
let userIds = []
|
let userIds = []
|
||||||
if (userList.value.length > 0) {
|
if (userList.value&&userList.value.length > 0) {
|
||||||
userIds = userList.value?.map(item => {
|
userIds = userList.value?.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
@@ -203,6 +194,7 @@ const handleSubmit = async () => {
|
|||||||
} else {
|
} else {
|
||||||
attachment.value.clearValidate()
|
attachment.value.clearValidate()
|
||||||
}
|
}
|
||||||
|
console.log('params',params)
|
||||||
let res = await submitPhaseChange(params)
|
let res = await submitPhaseChange(params)
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -224,7 +216,7 @@ const handleResubmit = (instance) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
let userIds = []
|
let userIds = []
|
||||||
if (userList.value.length > 0) {
|
if (userList.value&&userList.value.length > 0) {
|
||||||
userIds = userList.value?.map(item => {
|
userIds = userList.value?.map(item => {
|
||||||
return item.id
|
return item.id
|
||||||
})
|
})
|
||||||
@@ -294,7 +286,7 @@ const getDetailInfo = async () => {
|
|||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
userList.value=res.data.userInfoList
|
userList.value=res.data.userInfoList?res.data.userInfoList:[]
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user