diff --git a/src/components/case/index.vue b/src/components/case/index.vue
index b18236e..4eb4e66 100644
--- a/src/components/case/index.vue
+++ b/src/components/case/index.vue
@@ -229,6 +229,42 @@ export default {
submitType: false
}
},
+ computed: {
+ needSendSunc: function () {
+ return this.sendSync;
+ },
+ // 倒计时
+ second: function () {
+ return this.num(this.seconds);
+ },
+ minute: function () {
+ return this.num(this.minutes);
+ },
+ activeNames () {
+ // 默认展开所有
+ return this.requires.map(item => item.id)
+ },
+ },
+ watch: {
+ countVal: {
+ deep: true,
+ handler: function (val, oldVal) {
+ let vm = this;
+ if (vm.needSendSunc) {
+ vm.passToParent(val);
+ }
+ }
+ },
+ needSendSunc: {
+ deep: true,
+ handler: function (val) {
+ let vm = this;
+ if (val) {
+ vm.passToParent(vm.countString);
+ }
+ }
+ },
+ },
created () {
let assessmentId = this.getQueryVariable('assessmentId')
sessionStorage.setItem('assessmentId', assessmentId)
@@ -252,7 +288,6 @@ export default {
});
// 提交
this.sureSubmit(true)
- } else {
}
})
}, 4000)
@@ -261,69 +296,22 @@ export default {
this.popContainer = data
})
},
- watch: {
- countVal: {
- deep: true,
- handler: function (val, oldVal) {
- let vm = this;
- if (vm.needSendSunc) {
- vm.passToParent(val);
- }
- }
- },
- needSendSunc: {
- deep: true,
- handler: function (val) {
- let vm = this;
- if (val) {
- vm.passToParent(vm.countString);
- }
- }
- },
- // caseVisible(newVal) {
- // if(!newVal) {
- // console.log(this.$refs.scrollTag)
- // }
- // }
- },
-
- computed: {
- needSendSunc: function () {
- return this.sendSync;
- },
- // 倒计时
- second: function () {
- return this.num(this.seconds);
- },
- minute: function () {
- return this.num(this.minutes);
- },
- activeNames () {
- // 默认展开所有
- return this.requires.map(item => item.id)
- },
- },
mounted () {
- let token = sessionStorage.getItem('token') || this.getQueryVariable('token')
- let cid = sessionStorage.getItem('cid') || this.getQueryVariable('cid')
- let systemId = sessionStorage.getItem('systemId') || this.getQueryVariable('systemId')
- let projectId = this.getQueryVariable('projectId')
- if (sessionStorage.getItem('projectId')) {
- projectId = sessionStorage.getItem('projectId')
- }
- let assessmentId = sessionStorage.getItem('assessmentId') || this.getQueryVariable('assessmentId')
- let competitionId = sessionStorage.getItem('competitionId') || this.getQueryVariable('competitionId')
- let stageId = sessionStorage.getItem('stageId') || this.getQueryVariable('stageId')
- let teamId = sessionStorage.getItem('teamId') || this.getQueryVariable('teamId')
- let classId = sessionStorage.getItem('classId') || this.getQueryVariable('classId')
- let stopTime = sessionStorage.getItem('stopTime') || this.getQueryVariable('stopTime')
- let mallId = sessionStorage.getItem('mallId') || this.getQueryVariable('mallId')
- let timestamp = +stopTime;
- if (timestamp != null) {
- } else {
- sessionStorage.setItem('timestamp', null)
- }
- if (token != null) {
+ let token = this.getParam('token')
+ let cid = this.getParam('cid')
+ let systemId = this.getParam('systemId')
+ let projectId = this.getParam('projectId')
+ let assessmentId = this.getParam('assessmentId')
+ let competitionId = this.getParam('competitionId')
+ let stageId = this.getParam('stageId')
+ let teamId = this.getParam('teamId')
+ let classId = this.getParam('classId')
+ let stopTime = this.getParam('stopTime')
+ let mallId = this.getParam('mallId')
+ let timestamp = +stopTime
+ timestamp || sessionStorage.removeItem('timestamp')
+
+ if (token) {
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
@@ -335,21 +323,20 @@ export default {
sessionStorage.setItem('teamId', teamId)
sessionStorage.setItem('classId', classId)
this.assessmentId = assessmentId
- this.competitionId = JSON.parse(competitionId)
+ this.competitionId = competitionId
this.stageId = stageId
this.teamId = teamId
this.classId = classId
this.mallId = mallId
}
- let tokens = sessionStorage.getItem('token')
- if (tokens || token) {
+ if (token) {
this.projectPermissions = this.assessmentId ?
1 :
this.competitionId ?
2 :
0
this.assessmentId && this.projectId && this.checkVer()
- if (JSON.parse(assessmentId != null && assessmentId != '' && assessmentId != 'null' || this.competitionId)) {
+ if (assessmentId || this.competitionId) {
this.selectProjects({
projectId
})
@@ -411,6 +398,11 @@ export default {
this.toggleCase()
}
},
+ // 获取参数
+ getParam (field) {
+ const s = sessionStorage.getItem(field)
+ return s !== 'null' && s !== 'undefined' && s ? s : this.getQueryVariable(field)
+ },
getQueryVariable (name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
if (window.location.href.split('?')[1]) {
@@ -421,20 +413,6 @@ export default {
return null
}
}
- // if(sessionStorage.getItem(name)) {
- // return sessionStorage.getItem(name)
- // }else {
- // var reg = new RegExp('(^|&)'+name+'=([^&]*)(&|$)')
- // if(window.location.href.split('?')[1]){
- // var r = window.location.href.split('?')[1].match(reg)
- // if (r != null){
- // return (r[2])
- // }else{
- // return null
- // }
- // }
- // }
-
},
//获取项目列表
getData () {
@@ -549,6 +527,7 @@ export default {
this.selectProjects(params)
},
selectProjects (params) {
+ console.log("🚀 ~ selectProjects ~ params:", params)
getProjectDetail(params).then((data) => {
if (data.status == 200) {
this.globalTimer = "";
@@ -601,6 +580,7 @@ export default {
sessionStorage.removeItem('submited', 0)
sessionStorage.removeItem('firstLoad2')
this.setBusinessKey('')
+ console.log("🚀 ~ getProjectDetail ~ params:", params)
getProjectDetail(params).then((data) => {
if (data.status == 200) {
const { systemId, projectId } = data.data.projectManage
diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue
index 52b6ebc..5ec7394 100644
--- a/src/pages/counter/list/index.vue
+++ b/src/pages/counter/list/index.vue
@@ -1567,7 +1567,7 @@ export default {
},
showManage () {// 展示系统管理
this.manageVisible = true;
- this.$router.push(sessionStorage.getItem('computerPath') || (this.isCredit ? '/counter/list/manage/personalLoans' : '/counter/list/manage/consumerClient'))
+ this.$router.push(sessionStorage.getItem(this.isCredit ? 'creditPath' : 'computerPath') || (this.isCredit ? '/counter/list/manage/personalLoans' : '/counter/list/manage/consumerClient'))
},
popSure () {/* 弹框-确定 */
// 拦截 由于下面太多没拦截的,所以在这拦截舒服
diff --git a/src/pages/manage/index/index.vue b/src/pages/manage/index/index.vue
index 10f771d..8089033 100644
--- a/src/pages/manage/index/index.vue
+++ b/src/pages/manage/index/index.vue
@@ -38,22 +38,29 @@ export default {
name: 'index',
data () {
return {
-
+ curRoute: ''
}
},
components: {
navbar
},
- // beforeMount() {
- // const path = sessionStorage.getItem('computerPath')
- // console.log('router-view')
- // console.log(path)
- // this.$router.push(path)
- // },
+ computed: {
+ ...mapState('system', ['fullScreen', 'isCredit'])
+ },
+ watch: {
+ '$route': {
+ handler () {
+ this.curRoute = this.$route.path
+ },
+ immediate: true
+ }
+ },
+ beforeDestroy () {
+ sessionStorage.setItem(this.curRoute.includes('Loans') ? 'creditPath' : 'computerPath', this.curRoute)
+ sessionStorage.getItem('submited') || this.$router.push('/counter/list/')
+ },
methods: {
close () {
- // 缓存上一次退出时的系统录入的路径 下一次进来时跳到上一次退出时的页面 用于刷卡
- sessionStorage.setItem('computerPath', this.$route.fullPath)
this.$router.push('/counter/list/')
},
handleFullscreen () {
@@ -62,10 +69,6 @@ export default {
shrink () {
this.$store.commit('system/changeFullscreen', false)
},
-
- },
- computed: {
- ...mapState('system', ['fullScreen', 'isCredit'])
}
};
diff --git a/src/pages/manage/list/personalLoans/detail.vue b/src/pages/manage/list/personalLoans/detail.vue
index 0990fb3..5cf7d17 100644
--- a/src/pages/manage/list/personalLoans/detail.vue
+++ b/src/pages/manage/list/personalLoans/detail.vue
@@ -364,7 +364,6 @@ export default {
],
},
submited: 0,
- curRoute: '',
curStep: 1,
disbursementDate: '',
loanVisible: false,
@@ -415,12 +414,7 @@ export default {
],
}
},
- beforeDestroy () {
- sessionStorage.setItem('computerPath', this.curRoute)
- },
mounted () {
- this.curRoute = this.$route.path
-
this.getDetail()
},
methods: {
@@ -479,7 +473,7 @@ export default {
popUp1 (text) {
this.setTipsOperate('请刷身份证');
this.setPopId('1399')
- sessionStorage.setItem('computerPath', this.$route.fullPath)
+ sessionStorage.setItem('creditPath', this.$route.fullPath)
this.$router.push('/counter/list/')
},
// 到期日期计算
diff --git a/src/pages/manage/navbar/index.vue b/src/pages/manage/navbar/index.vue
index 8cb2351..83ca983 100644
--- a/src/pages/manage/navbar/index.vue
+++ b/src/pages/manage/navbar/index.vue
@@ -15,7 +15,7 @@
{{ subItem.title }}
{{
threeItem.title
- }}
+ }}
{{ subItem.title }}
@@ -35,23 +35,12 @@