Merge branch 'develop' into 'FOTON'

Develop

See merge request LAWS/laws-system-front-FOTON!306
This commit is contained in:
王夏晖
2022-01-26 18:32:46 +08:00
8 changed files with 524 additions and 468 deletions
@@ -137,7 +137,7 @@ export default {
this.$router.push({ this.$router.push({
name: "consultationDetails", name: "consultationDetails",
query: { query: {
item: item item: JSON.stringify(item)
} }
}); });
}, },
@@ -102,6 +102,7 @@
}, res => { }, res => {
if (res.respCode === '200') { if (res.respCode === '200') {
// 储存变量监听刷新页面 // 储存变量监听刷新页面
this.$store.commit('SET_REFRESH_FLAG', true)
localStorage.setItem('freshClueNum', new Date().getTime()) localStorage.setItem('freshClueNum', new Date().getTime())
this.isSubmit = false this.isSubmit = false
this.opinionContent.partCode = '' this.opinionContent.partCode = ''
@@ -125,7 +126,6 @@
}, },
}, },
mounted() { mounted() {
console.log(this.$route.query);
this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', { this.$http.get('SarStandItems/sar-stand-items/querySarItemAndInterpretation', {
standId: this.$route.query.standId, standId: this.$route.query.standId,
fileType: this.$route.query.fileType, fileType: this.$route.query.fileType,
@@ -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>
@@ -236,7 +236,7 @@
<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 @@ export default {
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 @@ export default {
}, },
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 @@ export default {
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,24 @@ export default {
} 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) {
// 更新数据...
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 +427,10 @@ export default {
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 +477,8 @@ export default {
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 +524,7 @@ export default {
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,19 +536,43 @@ export default {
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))
} }
}, },
mounted() { watch: {
window.addEventListener("storage", ev => { refreshFlag(val) {
if(ev.key === 'freshClueNum'){ this.form.page = 1
this.getList() this.getList()
} }
}) },
if (JSON.parse(this.$route.query.item.wkfiles).length) { computed: {
this.fileInfoLists = JSON.parse(this.$route.query.item.wkfiles) lawsStand() {
return this.$route.query.item && JSON.parse(this.$route.query.item)
},
...mapGetters(['refreshFlag'])
},
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 => {
// if(ev.key === 'freshClueNum'){
// this.form.page = 1
// this.getList()
// }
// })
if (JSON.parse(this.lawsStand.wkfiles).length) {
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,
@@ -546,7 +590,7 @@ export default {
this.getList() this.getList()
this.getIdeaKey() this.getIdeaKey()
this.getFileInfo() this.getFileInfo()
}, }
} }
</script> </script>
+1 -1
View File
@@ -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'),
+3
View File
@@ -179,5 +179,8 @@ export default {
} else { } else {
return JSON.parse(state.accessStandRegRows) return JSON.parse(state.accessStandRegRows)
} }
},
refreshFlag: state => {
return state.refreshFlag
} }
} }
+6
View File
@@ -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) {}
} }
} }
+4 -1
View File
@@ -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
} }
+3 -3
View File
@@ -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 认证