Merge pull request 'feat(project-demand): 编辑概览页面数据持久化' (#1009) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/1009
This commit is contained in:
@@ -518,6 +518,7 @@ watch(() => singleList.value, (newVal) => {
|
|||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
localStorage.removeItem('originallySelectedList')
|
localStorage.removeItem('originallySelectedList')
|
||||||
if (name.value === 'Summary/edit') {
|
if (name.value === 'Summary/edit') {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (localStorage.getItem('collectData')) {
|
if (localStorage.getItem('collectData')) {
|
||||||
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
||||||
@@ -549,6 +550,14 @@ const changeRequirement=async ()=>{
|
|||||||
const changeCollectData = () => {
|
const changeCollectData = () => {
|
||||||
if (name.value === 'Summary/edit') {
|
if (name.value === 'Summary/edit') {
|
||||||
// params.fileList= attachment.value.allFileList
|
// params.fileList= attachment.value.allFileList
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
fileList: [],
|
||||||
|
requirementId: route.query.id ? route.query.id : formData.value.requirementId ? formData.value.requirementId : null
|
||||||
|
}
|
||||||
|
params.fileList = otherFileList.value
|
||||||
|
localStorage.setItem(`collectResubmitData-${route.query.projectId}`, JSON.stringify(params))
|
||||||
} else {
|
} else {
|
||||||
let params = {
|
let params = {
|
||||||
...formData.value,
|
...formData.value,
|
||||||
@@ -824,8 +833,8 @@ const handleResubmit = debounce((instance) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Summary'
|
name: 'Summary'
|
||||||
})
|
})
|
||||||
// localStorage.removeItem('collectData')
|
|
||||||
}
|
}
|
||||||
|
localStorage.removeItem(`collectResubmitData-${route.query.projectId}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -842,6 +851,22 @@ const getDetailInfo = async () => {
|
|||||||
opentionData.value = res.data
|
opentionData.value = res.data
|
||||||
optionalChargeLeadershipList.value = formData.value.optionalChargeLeadership
|
optionalChargeLeadershipList.value = formData.value.optionalChargeLeadership
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
|
if (name.value === 'Summary/edit') {
|
||||||
|
if (localStorage.getItem(`collectResubmitData-${route.query.projectId}`)) {
|
||||||
|
let collectResubmitData = JSON.parse(localStorage.getItem(`collectResubmitData-${route.query.projectId}`))
|
||||||
|
|
||||||
|
if(formData.value.projectId==collectResubmitData.projectId){
|
||||||
|
if (collectResubmitData.fileList) {
|
||||||
|
otherFileList.value = collectResubmitData.fileList
|
||||||
|
}
|
||||||
|
if (collectResubmitData.optionalChargeLeadership) {
|
||||||
|
optionalChargeLeadershipList.value = collectResubmitData.optionalChargeLeadership
|
||||||
|
}
|
||||||
|
formData.value = collectResubmitData
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user