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:
@@ -437,7 +437,7 @@ const compositeParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getAttachment = (val) => {
|
const getAttachment = (val) => {
|
||||||
console.log('上传文件getAttachment', val)
|
// console.log('上传文件getAttachment', val)
|
||||||
showSingleTable.value = false
|
showSingleTable.value = false
|
||||||
localFormData.value.singleFile = compositeParam(val)
|
localFormData.value.singleFile = compositeParam(val)
|
||||||
singleList.value.push(compositeParam(val))
|
singleList.value.push(compositeParam(val))
|
||||||
@@ -616,7 +616,7 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
|
// console.info("🚀 ~method:;props.formData.projectChargePerson -----", props.formData.projectChargePerson)
|
||||||
if (props.formData.projectChargePerson == null) {
|
if (props.formData.projectChargePerson == null) {
|
||||||
projectChargePersonUserList.value = []
|
projectChargePersonUserList.value = []
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ const getTagsOption = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
console.info("🚀 ~method:'attachment' -----", attachment)
|
// console.info("🚀 ~method:'attachment' -----", attachment)
|
||||||
emit('search', attachment)
|
emit('search', attachment)
|
||||||
}
|
}
|
||||||
const handleReset=()=>{
|
const handleReset=()=>{
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const showPreview = ref(true)
|
const showPreview = ref(true)
|
||||||
console.info("🚀 ~method:fileType -----", props.fileType)
|
// console.info("🚀 ~method:fileType -----", props.fileType)
|
||||||
|
|
||||||
const checkImgType=(fileType)=>{
|
const checkImgType=(fileType)=>{
|
||||||
return fileType == 'png' || fileType == 'jpg' || fileType == 'jpeg' || fileType == 'ico' || fileType == 'PNG' || fileType == 'JPG';
|
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)){
|
if(props.fileType!=='pdf'&&props.fileType!=='docx'&&!checkImgType(props.fileType)){
|
||||||
showPreview.value=false
|
showPreview.value=false
|
||||||
ElNotification({
|
ElNotification({
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const usePermisstionStroe = defineStore('permisstion', () => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
const sRouter = JSON.parse(JSON.stringify(res.data))
|
const sRouter = JSON.parse(JSON.stringify(res.data))
|
||||||
const mData = 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)))
|
const firstFormat = setRouterLevel(JSON.parse(JSON.stringify(sRouter)))
|
||||||
asyncRouters.value = formatAsyncRouters(JSON.parse(JSON.stringify(firstFormat)))
|
asyncRouters.value = formatAsyncRouters(JSON.parse(JSON.stringify(firstFormat)))
|
||||||
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
menuList.value = [...menuList.value, ...generateMenu(mData)]
|
||||||
|
|||||||
@@ -248,18 +248,20 @@ const tableConfig = reactive({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
if(routerName.value === 'Requirement/add'){
|
||||||
if(localStorage.getItem('requirementData')){
|
if(localStorage.getItem('requirementData')){
|
||||||
let demandDate=JSON.parse(localStorage.getItem('requirementData'))
|
let demandDate=JSON.parse(localStorage.getItem('requirementData'))
|
||||||
formData.value=demandDate
|
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=()=>{
|
const changeRequirementData=()=>{
|
||||||
localStorage.setItem('requirementData', JSON.stringify(formData.value))
|
if(routerName.value === 'Requirement/add') {
|
||||||
|
localStorage.setItem('requirementData', JSON.stringify(formData.value))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const addSpecialFund=()=>{
|
const addSpecialFund=()=>{
|
||||||
router.push({
|
router.push({
|
||||||
@@ -466,8 +468,8 @@ const handleSubmit = async (instance) => {
|
|||||||
await router.push({
|
await router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
localStorage.removeItem('originallyCompanySelectedList')
|
localStorage.removeItem('originallyCompanySelectedList')
|
||||||
localStorage.removeItem('requirementData')
|
localStorage.removeItem('requirementData')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -501,8 +503,8 @@ const handleResubmit = (instance) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Requirement'
|
name: 'Requirement'
|
||||||
})
|
})
|
||||||
localStorage.removeItem('originallyCompanySelectedList')
|
// localStorage.removeItem('originallyCompanySelectedList')
|
||||||
localStorage.removeItem('requirementData')
|
// localStorage.removeItem('requirementData')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -404,35 +404,32 @@ watch(() => singleList.value, (newVal) => {
|
|||||||
showSingleTable.value = newVal.length !== 0;
|
showSingleTable.value = newVal.length !== 0;
|
||||||
}, {deep: true})
|
}, {deep: true})
|
||||||
localStorage.removeItem('originallySelectedList')
|
localStorage.removeItem('originallySelectedList')
|
||||||
|
if (name.value === 'Summary/edit') {
|
||||||
if(localStorage.getItem('collectData')){
|
}else {
|
||||||
let collectData=JSON.parse(localStorage.getItem('collectData'))
|
if (localStorage.getItem('collectData')) {
|
||||||
if(collectData.fileList){
|
let collectData = JSON.parse(localStorage.getItem('collectData'))
|
||||||
if (name.value === 'Summary/edit') {
|
if (collectData.fileList) {
|
||||||
attachment.value.allFileList=collectData.fileList
|
otherFileList.value = collectData.fileList
|
||||||
}else {
|
|
||||||
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=()=>{
|
const changeCollectData=()=>{
|
||||||
let params = {
|
|
||||||
...formData.value,
|
|
||||||
deploymentId: deploymentId.value,
|
|
||||||
fileList: [],
|
|
||||||
requirementId: route.query.id ? route.query.id : '-1'
|
|
||||||
}
|
|
||||||
if (name.value === 'Summary/edit') {
|
if (name.value === 'Summary/edit') {
|
||||||
params.fileList= attachment.value.allFileList
|
// params.fileList= attachment.value.allFileList
|
||||||
}else {
|
}else {
|
||||||
|
let params = {
|
||||||
|
...formData.value,
|
||||||
|
deploymentId: deploymentId.value,
|
||||||
|
fileList: [],
|
||||||
|
requirementId: route.query.id ? route.query.id : '-1'
|
||||||
|
}
|
||||||
params.fileList= otherFileList.value
|
params.fileList= otherFileList.value
|
||||||
|
localStorage.setItem('collectData', JSON.stringify(params))
|
||||||
}
|
}
|
||||||
localStorage.setItem('collectData', JSON.stringify(params))
|
|
||||||
}
|
}
|
||||||
const handleShowOptionalChargeLeadershipPicker = () => {
|
const handleShowOptionalChargeLeadershipPicker = () => {
|
||||||
optionalChargeLeadershipPickerRef.value.showUserPicker()
|
optionalChargeLeadershipPickerRef.value.showUserPicker()
|
||||||
@@ -634,7 +631,7 @@ const handleResubmit = debounce((instance) => {
|
|||||||
router.push({
|
router.push({
|
||||||
name: 'Summary'
|
name: 'Summary'
|
||||||
})
|
})
|
||||||
localStorage.removeItem('collectData')
|
// localStorage.removeItem('collectData')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -184,7 +184,6 @@ const stepChange = (data) => {
|
|||||||
getAllInfo(data.active)
|
getAllInfo(data.active)
|
||||||
}
|
}
|
||||||
const getBasicData=(data)=>{
|
const getBasicData=(data)=>{
|
||||||
console.info("🚀 ~method:data -----", data)
|
|
||||||
basicData.value=data
|
basicData.value=data
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ const compositeParam = (item) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getFile = (val) => {
|
const getFile = (val) => {
|
||||||
console.log('上传文件', val)
|
// console.log('上传文件', val)
|
||||||
showTable.value = false
|
showTable.value = false
|
||||||
let fileObj = compositeParam(val)
|
let fileObj = compositeParam(val)
|
||||||
fileList.value.push(fileObj)
|
fileList.value.push(fileObj)
|
||||||
|
|||||||
Reference in New Issue
Block a user