Merge pull request 'fix : 修复新增征集/需求上报时缓存和注释log' (#897) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/897
This commit is contained in:
2024-10-27 10:08:50 +00:00
8 changed files with 42 additions and 44 deletions

View File

@@ -437,7 +437,7 @@ const compositeParam = (item) => {
}
}
const getAttachment = (val) => {
console.log('上传文件getAttachment', val)
// console.log('上传文件getAttachment', val)
showSingleTable.value = false
localFormData.value.singleFile = compositeParam(val)
singleList.value.push(compositeParam(val))
@@ -616,7 +616,7 @@ const init = async () => {
}
watchEffect(() => {
console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
// console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
if (props.formData.projectChargePerson == null) {
projectChargePersonUserList.value = []
} else {

View File

@@ -154,7 +154,7 @@ const getTagsOption = () => {
})
}
const handleSearch = () => {
console.info("🚀 ~method:'attachment' -----", attachment)
// console.info("🚀 ~method:'attachment' -----", attachment)
emit('search', attachment)
}
const handleReset=()=>{

View File

@@ -38,12 +38,12 @@ const props = defineProps({
}
})
const showPreview = ref(true)
console.info("🚀 ~method:fileType -----", props.fileType)
// console.info("🚀 ~method:fileType -----", props.fileType)
const checkImgType=(fileType)=>{
return fileType == 'png' || fileType == 'jpg' || fileType == 'jpeg' || fileType == 'ico' || fileType == 'PNG' || fileType == 'JPG';
}
console.info("🚀 ~method:checkImgType(props.fileType) -----", checkImgType(props.fileType))
// console.info("🚀 ~method:checkImgType(props.fileType) -----", checkImgType(props.fileType))
if(props.fileType!=='pdf'&&props.fileType!=='docx'&&!checkImgType(props.fileType)){
showPreview.value=false
ElNotification({

View File

@@ -37,7 +37,7 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
if (res.code === 1000) {
const sRouter = JSON.parse(JSON.stringify(res.data))
const mData = JSON.parse(JSON.stringify(res.data))
console.log(JSON.parse(JSON.stringify(sRouter)), 'sRouter');
// console.log(JSON.parse(JSON.stringify(sRouter)), 'sRouter');
const firstFormat = setRouterLevel(JSON.parse(JSON.stringify(sRouter)))
asyncRouters.value = formatAsyncRouters(JSON.parse(JSON.stringify(firstFormat)))
menuList.value = [...menuList.value, ...generateMenu(mData)]

View File

@@ -248,18 +248,20 @@ const tableConfig = reactive({
}
]
})
if(localStorage.getItem('requirementData')){
let demandDate=JSON.parse(localStorage.getItem('requirementData'))
formData.value=demandDate
if(routerName.value === 'Requirement/add'){
if(localStorage.getItem('requirementData')){
let demandDate=JSON.parse(localStorage.getItem('requirementData'))
formData.value=demandDate
}
if(localStorage.getItem('originallyCompanySelectedList')){
let companyDate=JSON.parse(localStorage.getItem('originallyCompanySelectedList'))
selectedCompanyList.value=companyDate
}
}
if(localStorage.getItem('originallyCompanySelectedList')){
let companyDate=JSON.parse(localStorage.getItem('originallyCompanySelectedList'))
selectedCompanyList.value=companyDate
}
const changeRequirementData=()=>{
localStorage.setItem('requirementData', JSON.stringify(formData.value))
if(routerName.value === 'Requirement/add') {
localStorage.setItem('requirementData', JSON.stringify(formData.value))
}
}
const addSpecialFund=()=>{
router.push({
@@ -466,8 +468,8 @@ const handleSubmit = async (instance) => {
await router.push({
name: 'Requirement'
})
localStorage.removeItem('originallyCompanySelectedList')
localStorage.removeItem('requirementData')
localStorage.removeItem('originallyCompanySelectedList')
localStorage.removeItem('requirementData')
}
})
}
@@ -501,8 +503,8 @@ const handleResubmit = (instance) => {
router.push({
name: 'Requirement'
})
localStorage.removeItem('originallyCompanySelectedList')
localStorage.removeItem('requirementData')
// localStorage.removeItem('originallyCompanySelectedList')
// localStorage.removeItem('requirementData')
}
})
})

View File

@@ -404,35 +404,32 @@ watch(() => singleList.value, (newVal) => {
showSingleTable.value = newVal.length !== 0;
}, {deep: true})
localStorage.removeItem('originallySelectedList')
if(localStorage.getItem('collectData')){
let collectData=JSON.parse(localStorage.getItem('collectData'))
if(collectData.fileList){
if (name.value === 'Summary/edit') {
attachment.value.allFileList=collectData.fileList
}else {
otherFileList.value=collectData.fileList
if (name.value === 'Summary/edit') {
}else {
if (localStorage.getItem('collectData')) {
let collectData = JSON.parse(localStorage.getItem('collectData'))
if (collectData.fileList) {
otherFileList.value = collectData.fileList
}
if (collectData.optionalChargeLeadership) {
optionalChargeLeadershipList.value = collectData.optionalChargeLeadership
}
formData.value = collectData
}
if(collectData.optionalChargeLeadership){
optionalChargeLeadershipList.value=collectData.optionalChargeLeadership
}
formData.value=collectData
}
const changeCollectData=()=>{
let params = {
...formData.value,
deploymentId: deploymentId.value,
fileList: [],
requirementId: route.query.id ? route.query.id : '-1'
}
if (name.value === 'Summary/edit') {
params.fileList= attachment.value.allFileList
// params.fileList= attachment.value.allFileList
}else {
let params = {
...formData.value,
deploymentId: deploymentId.value,
fileList: [],
requirementId: route.query.id ? route.query.id : '-1'
}
params.fileList= otherFileList.value
localStorage.setItem('collectData', JSON.stringify(params))
}
localStorage.setItem('collectData', JSON.stringify(params))
}
const handleShowOptionalChargeLeadershipPicker = () => {
optionalChargeLeadershipPickerRef.value.showUserPicker()
@@ -634,7 +631,7 @@ const handleResubmit = debounce((instance) => {
router.push({
name: 'Summary'
})
localStorage.removeItem('collectData')
// localStorage.removeItem('collectData')
}
})
})

View File

@@ -184,7 +184,6 @@ const stepChange = (data) => {
getAllInfo(data.active)
}
const getBasicData=(data)=>{
console.info("🚀 ~method:data -----", data)
basicData.value=data
}
</script>

View File

@@ -460,7 +460,7 @@ const compositeParam = (item) => {
}
}
const getFile = (val) => {
console.log('上传文件', val)
// console.log('上传文件', val)
showTable.value = false
let fileObj = compositeParam(val)
fileList.value.push(fileObj)