1.修复征求意见详情页刷新回到登录页的BUG
2.修复征求意见详情添加窗口通信刷新BUG
This commit is contained in:
@@ -137,7 +137,7 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "consultationDetails",
|
name: "consultationDetails",
|
||||||
query: {
|
query: {
|
||||||
item: item
|
item: JSON.stringify(item)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,6 +80,8 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
saveUserInfo () {
|
saveUserInfo () {
|
||||||
|
this.$store.commit('SET_REFRESH_FLAG', true)
|
||||||
|
return false
|
||||||
this.$refs['formAdd'].validate((valid) => {
|
this.$refs['formAdd'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.isSubmit = true
|
this.isSubmit = true
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<span class="transition-box-span table-jump"
|
<span class="transition-box-span table-jump"
|
||||||
@click="handlePreview(itemData)"
|
@click="handlePreview(itemData)"
|
||||||
>
|
>
|
||||||
{{ this.$route.query.item.cid }}
|
{{ this.lawsStand.cid }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- <p class="transition-box-p">-->
|
<!-- <p class="transition-box-p">-->
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<!-- <span class="transition-box-span table-jump"-->
|
<!-- <span class="transition-box-span table-jump"-->
|
||||||
<!-- @click="handlePreview(itemData)"-->
|
<!-- @click="handlePreview(itemData)"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- {{ this.$route.query.item.cname || '-' }}-->
|
<!-- {{ this.lawsStand.cname || '-' }}-->
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<!-- </p>-->
|
<!-- </p>-->
|
||||||
<div class="transition-box-p">
|
<div class="transition-box-p">
|
||||||
@@ -69,11 +69,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="transition-box-p">
|
<p class="transition-box-p">
|
||||||
<label class="transition-box-label">上传时间:</label>
|
<label class="transition-box-label">上传时间:</label>
|
||||||
<span class="transition-box-span">{{ this.$route.query.item.startTime || '-' }}</span>
|
<span class="transition-box-span">{{ this.lawsStand.startTime || '-' }}</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="transition-box-p">
|
<p class="transition-box-p">
|
||||||
<label class="transition-box-label">征求意见周期:</label>
|
<label class="transition-box-label">征求意见周期:</label>
|
||||||
<span class="transition-box-span" v-if="this.$route.query.item.startTime && this.$route.query.item.endTime">{{ this.$route.query.item.startTime + ' ~ ' + this.$route.query.item.endTime }}</span>
|
<span class="transition-box-span" v-if="this.lawsStand.startTime && this.lawsStand.endTime">{{ this.lawsStand.startTime + ' ~ ' + this.lawsStand.endTime }}</span>
|
||||||
<span class="transition-box-span" v-else>-</span>
|
<span class="transition-box-span" v-else>-</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -234,9 +234,9 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
<loading :loading="spinShow">数据加载中……</loading>
|
<loading :loading="spinShow">数据加载中……</loading>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="查看修改前内容"
|
title="查看修改前内容"
|
||||||
:visible.sync="itermsConditionsFlag"
|
:visible.sync="itermsConditionsFlag"
|
||||||
size="800px">
|
width="800px">
|
||||||
<div style="height: 500px;overflow: auto;" v-html="itermsConditionsTitle"></div>
|
<div style="height: 500px;overflow: auto;" v-html="itermsConditionsTitle"></div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="itermsConditionsClose">关闭</el-button>
|
||||||
@@ -246,6 +246,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name: 'consultationDetails',
|
name: 'consultationDetails',
|
||||||
data() {
|
data() {
|
||||||
@@ -256,7 +257,7 @@
|
|||||||
options: [],
|
options: [],
|
||||||
fileInfoList: [],
|
fileInfoList: [],
|
||||||
fileInfoLists: [],
|
fileInfoLists: [],
|
||||||
itemData: this.$route.query.item,
|
itemData: this.lawsStand,
|
||||||
id: '', // 选中id
|
id: '', // 选中id
|
||||||
type: '', // 选中状态
|
type: '', // 选中状态
|
||||||
spinShow: false,
|
spinShow: false,
|
||||||
@@ -289,14 +290,15 @@
|
|||||||
},
|
},
|
||||||
standinfoList: [], // 详情列表
|
standinfoList: [], // 详情列表
|
||||||
form: {
|
form: {
|
||||||
ideaId: this.$route.query.item.id,
|
ideaId: '',
|
||||||
cid: this.$route.query.item.cid,
|
cid: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
size: this.$store.getters.userInfo.configContent,
|
size: this.$store.getters.userInfo.configContent,
|
||||||
userId: this.$store.getters.userInfo.userId,
|
userId: this.$store.getters.userInfo.userId,
|
||||||
endTime: this.$route.query.item.endTime
|
endTime: ''
|
||||||
}, // 详情数据
|
}, // 详情数据
|
||||||
ideaKey: false
|
ideaKey: false,
|
||||||
|
refreshTimer: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -330,10 +332,10 @@
|
|||||||
window.open(routeUrl.href, '_blank')
|
window.open(routeUrl.href, '_blank')
|
||||||
},
|
},
|
||||||
exportAll() {
|
exportAll() {
|
||||||
window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.$route.query.item.id)
|
window.open('/api/slrs/sar-public-idea-all/tuallStand?cid=' + this.lawsStand.id)
|
||||||
},
|
},
|
||||||
exportAll1() {
|
exportAll1() {
|
||||||
window.open('/api/slrs/sar-public-idea-all/tuallStand?type=1&cid=' + this.$route.query.item.id)
|
window.open('/api/slrs/sar-public-idea-all/tuallStand?type=1&cid=' + this.lawsStand.id)
|
||||||
},
|
},
|
||||||
getIdeaKey() {
|
getIdeaKey() {
|
||||||
this.$http.get('slrs/sar-public-idea-all/checkIsShow', {
|
this.$http.get('slrs/sar-public-idea-all/checkIsShow', {
|
||||||
@@ -399,6 +401,26 @@
|
|||||||
} else {
|
} else {
|
||||||
localStorage.setItem('freshClueNum', new Date().getTime())
|
localStorage.setItem('freshClueNum', new Date().getTime())
|
||||||
this.freshClueNum = localStorage.getItem('freshClueNum') || '';
|
this.freshClueNum = localStorage.getItem('freshClueNum') || '';
|
||||||
|
|
||||||
|
const that = this
|
||||||
|
const watcherRefreshData = function(ev) {
|
||||||
|
const { key: eventType, newValue } = ev
|
||||||
|
if (eventType === 'refreshFlag' && eval(newValue) === true) {
|
||||||
|
// 更新数据...
|
||||||
|
console.log('更新数据')
|
||||||
|
that.$store.commit('SET_REFRESH_FLAG', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 对浏览器的localStorage进行监听,当需要更新数据时,refreshFlag为true,数据更新后将refreshFlag置为false
|
||||||
|
window.addEventListener('storage', (ev) => {
|
||||||
|
watcherRefreshData(ev)
|
||||||
|
this.$once('hook:beforeDestroy', () => {
|
||||||
|
window.removeEventListener('storage', (ev) => {
|
||||||
|
watcherRefreshData(ev)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
let routeData = this.$router.resolve({
|
let routeData = this.$router.resolve({
|
||||||
name: "AddFileDetails",
|
name: "AddFileDetails",
|
||||||
query: {
|
query: {
|
||||||
@@ -407,10 +429,10 @@
|
|||||||
userName: this.$store.getters.userInfo.userName || '',
|
userName: this.$store.getters.userInfo.userName || '',
|
||||||
deptName: this.$store.getters.userInfo.institutionName || '',
|
deptName: this.$store.getters.userInfo.institutionName || '',
|
||||||
deptId: this.$store.getters.userInfo.institutionId || '',
|
deptId: this.$store.getters.userInfo.institutionId || '',
|
||||||
standId: JSON.parse(this.$route.query.item.files)[0].standId,
|
standId: JSON.parse(this.lawsStand.files)[0].standId,
|
||||||
fileType: JSON.parse(this.$route.query.item.files)[0].standFileClassify,
|
fileType: JSON.parse(this.lawsStand.files)[0].standFileClassify,
|
||||||
ideaId: this.$route.query.item.id,
|
ideaId: this.lawsStand.id,
|
||||||
cid: this.$route.query.item.cid,
|
cid: this.lawsStand.cid,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank')
|
window.open(routeData.href, '_blank')
|
||||||
@@ -457,8 +479,8 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
var url = ''
|
var url = ''
|
||||||
var form = {
|
var form = {
|
||||||
ideaId: this.$route.query.item.id,
|
ideaId: this.lawsStand.id,
|
||||||
cid: this.$route.query.item.cid,
|
cid: this.lawsStand.cid,
|
||||||
content: this.opinionContent.content,
|
content: this.opinionContent.content,
|
||||||
oldText: this.opinionContent.oldText,
|
oldText: this.opinionContent.oldText,
|
||||||
newText: this.opinionContent.newText,
|
newText: this.opinionContent.newText,
|
||||||
@@ -504,7 +526,7 @@
|
|||||||
this.isDialog = false
|
this.isDialog = false
|
||||||
},
|
},
|
||||||
getFileInfo() {
|
getFileInfo() {
|
||||||
JSON.parse(this.$route.query.item.files).forEach(item=>{
|
JSON.parse(this.lawsStand.files).forEach(item=>{
|
||||||
this.fileInfoList.push({
|
this.fileInfoList.push({
|
||||||
attId: item.attId,
|
attId: item.attId,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
@@ -516,20 +538,42 @@
|
|||||||
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + file.attId))
|
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + file.attId))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
refreshFlag(val) {
|
||||||
|
console.log('refresh刷新了')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
lawsStand() {
|
||||||
|
return this.$route.query.item && JSON.parse(this.$route.query.item)
|
||||||
|
},
|
||||||
|
...mapGetters(['refreshFlag'])
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
if (this.lawsStand) {
|
||||||
|
this.form = {
|
||||||
|
ideaId: this.lawsStand.id,
|
||||||
|
cid: this.lawsStand.cid,
|
||||||
|
page: 1,
|
||||||
|
size: this.$store.getters.userInfo.configContent,
|
||||||
|
userId: this.$store.getters.userInfo.userId,
|
||||||
|
endTime: this.lawsStand.endTime
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 详情数据
|
||||||
window.addEventListener("storage", ev => {
|
window.addEventListener("storage", ev => {
|
||||||
if(ev.key === 'freshClueNum'){
|
if(ev.key === 'freshClueNum'){
|
||||||
this.form.page = 1
|
this.form.page = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (JSON.parse(this.$route.query.item.wkfiles).length) {
|
if (JSON.parse(this.lawsStand.wkfiles).length) {
|
||||||
this.fileInfoLists = JSON.parse(this.$route.query.item.wkfiles)
|
this.fileInfoLists = JSON.parse(this.lawsStand.wkfiles)
|
||||||
} else {
|
} else {
|
||||||
this.fileInfoLists = []
|
this.fileInfoLists = []
|
||||||
}
|
}
|
||||||
if (JSON.parse(this.$route.query.item.files).length) {
|
if (JSON.parse(this.lawsStand.files).length) {
|
||||||
let json = JSON.parse(this.$route.query.item.files)[0]
|
let json = JSON.parse(this.lawsStand.files)[0]
|
||||||
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
|
||||||
standId: json.standId,
|
standId: json.standId,
|
||||||
fileType: json.standFileClassify,
|
fileType: json.standFileClassify,
|
||||||
@@ -547,7 +591,7 @@
|
|||||||
this.getList()
|
this.getList()
|
||||||
this.getIdeaKey()
|
this.getIdeaKey()
|
||||||
this.getFileInfo()
|
this.getFileInfo()
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3753,7 +3753,7 @@ const routes = [
|
|||||||
// 详情页
|
// 详情页
|
||||||
// ************************** 其他详情页 ******************************* //
|
// ************************** 其他详情页 ******************************* //
|
||||||
{
|
{
|
||||||
path: '/consultationDetails/:id/:pageType',
|
path: '/consultationDetails/:id?/:pageType?',
|
||||||
name: 'consultationDetails',
|
name: 'consultationDetails',
|
||||||
component: () =>
|
component: () =>
|
||||||
import('@/pages/regulatoryRepository/standardForComments/pags/consultationDetails'),
|
import('@/pages/regulatoryRepository/standardForComments/pags/consultationDetails'),
|
||||||
|
|||||||
@@ -179,5 +179,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return JSON.parse(state.accessStandRegRows)
|
return JSON.parse(state.accessStandRegRows)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
refreshFlag: state => {
|
||||||
|
return state.refreshFlag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,5 +296,11 @@ export default {
|
|||||||
state.accessStandRegTabName = ''
|
state.accessStandRegTabName = ''
|
||||||
sessionStorage.removeItem('accessStandRegTabName')
|
sessionStorage.removeItem('accessStandRegTabName')
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
SET_REFRESH_FLAG(state, flag) {
|
||||||
|
state.refreshFlag = flag
|
||||||
|
try {
|
||||||
|
localStorage.setItem('refreshFlag', flag)
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ let proLastDetail = '' // 流程结果详情
|
|||||||
let rukuBaseInfo = '' // 入库流程基础表单信息(后几步展示用)
|
let rukuBaseInfo = '' // 入库流程基础表单信息(后几步展示用)
|
||||||
let accessStandRegRows = '' // 标准法规清单编辑
|
let accessStandRegRows = '' // 标准法规清单编辑
|
||||||
let accessStandRegTabName = '' // 标准法规清单页面当前页签
|
let accessStandRegTabName = '' // 标准法规清单页面当前页签
|
||||||
|
let refreshFlag = '' // 监听其他页面刷新
|
||||||
try {
|
try {
|
||||||
if (localStorage.theme) { defaultTheme = localStorage.theme }
|
if (localStorage.theme) { defaultTheme = localStorage.theme }
|
||||||
if (localStorage.token) { defaultToken = localStorage.token }
|
if (localStorage.token) { defaultToken = localStorage.token }
|
||||||
@@ -65,6 +66,7 @@ try {
|
|||||||
if (sessionStorage.rukuBaseInfo) { rukuBaseInfo = sessionStorage.rukuBaseInfo }
|
if (sessionStorage.rukuBaseInfo) { rukuBaseInfo = sessionStorage.rukuBaseInfo }
|
||||||
if (sessionStorage.accessStandRegRows) { accessStandRegRows = sessionStorage.accessStandRegRows }
|
if (sessionStorage.accessStandRegRows) { accessStandRegRows = sessionStorage.accessStandRegRows }
|
||||||
if (sessionStorage.accessStandRegTabName) { accessStandRegTabName = sessionStorage.accessStandRegTabName }
|
if (sessionStorage.accessStandRegTabName) { accessStandRegTabName = sessionStorage.accessStandRegTabName }
|
||||||
|
if (sessionStorage.refreshFlag) { refreshFlag = localStorage.refreshFlag }
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
export default {
|
export default {
|
||||||
theme: defaultTheme, // 主题
|
theme: defaultTheme, // 主题
|
||||||
@@ -99,5 +101,6 @@ export default {
|
|||||||
proLastDetail,
|
proLastDetail,
|
||||||
rukuBaseInfo,
|
rukuBaseInfo,
|
||||||
accessStandRegRows,
|
accessStandRegRows,
|
||||||
accessStandRegTabName
|
accessStandRegTabName,
|
||||||
|
refreshFlag
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
// 服务器地址
|
// 服务器地址
|
||||||
// const devIp = '39.98.140.126'
|
// const devIp = '39.98.140.126'
|
||||||
// const devInterfacePORT = '10005'
|
// const devInterfacePORT = '10005'
|
||||||
const devIp = '192.168.10.6'
|
// const devIp = '192.168.10.6'
|
||||||
// const devIp = '62.234.136.153'
|
const devIp = '62.234.136.153'
|
||||||
const devInterfacePORT = '9999'
|
const devInterfacePORT = '8033'
|
||||||
// const devIp = '10.19.11.243'
|
// const devIp = '10.19.11.243'
|
||||||
// const devInterfacePORT = '4304'
|
// const devInterfacePORT = '4304'
|
||||||
// 配置 idm 认证
|
// 配置 idm 认证
|
||||||
|
|||||||
Reference in New Issue
Block a user