From 4ad3e0086587f974bc68f056d301988ab2458fc8 Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Fri, 28 Jan 2022 17:22:56 +0800 Subject: [PATCH] commit --- .../bzzqyj/ZQYJAddFileDetails.vue | 168 ++++++++++++++++++ .../pages/creatProcess/bzzqyj/step3.vue | 39 ++-- .../pages/creatProcess/bzzqyj/step4.vue | 53 ++++-- .../pags/consultationDetails.vue | 8 - src/router/index.js | 11 ++ 5 files changed, 238 insertions(+), 41 deletions(-) create mode 100644 src/pages/processCenter/pages/creatProcess/bzzqyj/ZQYJAddFileDetails.vue diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/ZQYJAddFileDetails.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/ZQYJAddFileDetails.vue new file mode 100644 index 000000000..c24d9ab2b --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/ZQYJAddFileDetails.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue index b96977649..ed23826e3 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue @@ -336,6 +336,7 @@ name: "bzzqyjStep3", data() { return { + standId: '', modaltitle2: '', addType: '', onlyKey: '', @@ -464,22 +465,16 @@ } }, addModal() { - var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); - this.itemId = id - this.editForm = { - chapterNumber: '', - chapterName: '', - oldText: '', - newText: '', - reason: '', - id: id, - department: this.$store.getters.userInfo.institutionName, - responUserName: this.$store.getters.userInfo.userName, - responUser: this.$store.getters.userInfo.userId - } - this.addType = 'add' - this.modaltitle2 = '新增' - this.modalshowflag2 = true + localStorage.setItem('freshClueNum', new Date().getTime()) + let routeData = this.$router.resolve({ + name: "ZQYJAddFileDetails", + query: { + standId: this.standId, + attId: this.form.fjList[0].attId, + fileType: this.form.fjList[0].standFileClassify, + } + }); + window.open(routeData.href, '_blank') }, itemEdit (row) { this.addType = 'edit' @@ -712,6 +707,7 @@ this.todoId = res.id this.json = data this.onlyKey = data.form ? data.form.onlyKey : data.onlyKey + this.standId = data.standId this.getItemList(data.standId,data.textType) this.data = data.form ? data.form.data : (data.data ? data.data : (data.info ? data.info : [])) }).catch(e => { @@ -720,9 +716,18 @@ }, }, mounted() { + window.addEventListener("storage", ev => { + if(ev.key === 'freshClueNum'){ + let form = JSON.parse(window.localStorage.getItem('bzzqyjForm')) + form.department = this.$store.getters.userInfo.institutionName + form.responUserName = this.$store.getters.userInfo.userName + form.responUser = this.$store.getters.userInfo.userId + this.data.push(form) + } + }) this.getHistoryData() this.getData() - } + }, } diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue index aa0bb8ae0..fed06959d 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue @@ -346,6 +346,7 @@ export default { name: "bzzqyjStep4", data() { return { + standId: '', modaltitle2: '', addType: '', commentText4: '', @@ -505,22 +506,32 @@ export default { } }, addModal() { - var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); - this.itemId = id - this.editForm = { - chapterNumber: '', - chapterName: '', - oldText: '', - newText: '', - reason: '', - id: id, - department: this.$store.getters.userInfo.institutionName, - responUserName: this.$store.getters.userInfo.userName, - responUser: this.$store.getters.userInfo.userId - } - this.addType = 'add' - this.modaltitle2 = '新增' - this.modalshowflag2 = true + localStorage.setItem('freshClueNum', new Date().getTime()) + let routeData = this.$router.resolve({ + name: "ZQYJAddFileDetails", + query: { + standId: this.standId, + attId: this.form.fjList[0].attId, + fileType: this.form.fjList[0].standFileClassify, + } + }); + window.open(routeData.href, '_blank') + // var id = Number(Math.random().toString().substr(3, 3) + Date.now()).toString(36); + // this.itemId = id + // this.editForm = { + // chapterNumber: '', + // chapterName: '', + // oldText: '', + // newText: '', + // reason: '', + // id: id, + // department: this.$store.getters.userInfo.institutionName, + // responUserName: this.$store.getters.userInfo.userName, + // responUser: this.$store.getters.userInfo.userId + // } + // this.addType = 'add' + // this.modaltitle2 = '新增' + // this.modalshowflag2 = true }, itemEdit (row) { this.addType = 'edit' @@ -673,6 +684,7 @@ export default { this.form.spId = data.spId || '' this.form.spName = data.spName || '' this.json = data + this.standId = data.standId this.getItemList(data.standId,data.textType) this.data = data.info || data.data }).catch(e => { @@ -683,6 +695,15 @@ export default { mounted() { this.getHistoryData() this.getData() + window.addEventListener("storage", ev => { + if(ev.key === 'freshClueNum'){ + let form = JSON.parse(window.localStorage.getItem('bzzqyjForm')) + form.department = this.$store.getters.userInfo.institutionName + form.responUserName = this.$store.getters.userInfo.userName + form.responUser = this.$store.getters.userInfo.userId + this.data.push(form) + } + }) } } diff --git a/src/pages/regulatoryRepository/standardForComments/pags/consultationDetails.vue b/src/pages/regulatoryRepository/standardForComments/pags/consultationDetails.vue index b32569443..0fc96470c 100644 --- a/src/pages/regulatoryRepository/standardForComments/pags/consultationDetails.vue +++ b/src/pages/regulatoryRepository/standardForComments/pags/consultationDetails.vue @@ -452,14 +452,6 @@ } }); window.open(routeData.href, '_blank') - // return - // this.id = '' - // this.opiniontitle = '新增意见' - // this.opinionContent.partCode = '' - // this.opinionContent.reason = '' - // this.opinionContent.oldText = '' - // this.opinionContent.newText = '' - // this.opinionContent.cause = '' } }, //删除 diff --git a/src/router/index.js b/src/router/index.js index 3780eb167..281dfbf52 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1363,6 +1363,17 @@ const routes = [ title: '标准调研流程' } }, + { + path: '/ZQYJAddFileDetails', + name: 'ZQYJAddFileDetails', + component: () => import('@/pages/processCenter/pages/creatProcess/bzzqyj/ZQYJAddFileDetails.vue'), + meta: { + requireAuth: true, + title: '新增', + isBoolean: true, + // menuId: '' + } + }, { path: '/bzzqyjStep1', name: 'bzzqyjStep1',