diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 903bdf6..cb94817 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -355,16 +355,34 @@ export default { initState: 'system/initState' }), clearStore() { - // 清空缓存 + // // 清空缓存 let token = sessionStorage.getItem('token') let cid = sessionStorage.getItem('cid') let systemId = sessionStorage.getItem('systemId') let projectId = sessionStorage.getItem('projectId') + let assessmentId = sessionStorage.getItem('assessmentId') + let classId = sessionStorage.getItem('classId') + let timestamp = sessionStorage.getItem('timestamp') + let startTime = sessionStorage.getItem('startTime') sessionStorage.clear() sessionStorage.setItem('token', token) sessionStorage.setItem('cid', cid) sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('projectId', projectId) + if(assessmentId) { + sessionStorage.setItem('assessmentId', assessmentId) + } + if(classId) { + sessionStorage.setItem('classId', classId) + } + if(timestamp) { + sessionStorage.setItem('timestamp', timestamp) + } + if(startTime) { + sessionStorage.setItem('startTime', startTime) + } + + // 初始化vuex中的state this.initState(); }, @@ -406,30 +424,30 @@ export default { this.topicList.push(data.data.projects[i]) } } - // if(this.topicList.length > 0){ - // // const projectIndex = JSON.parse(sessionStorage.getItem('projectIndex')) - // // const projectId = sessionStorage.getItem('projectId') - // // console.log('---projectId') - // // console.log(projectId) - // // if(!projectId) { - // // this.selectProjects({ - // // projectId: this.topicList[0].projectId - // // }) - // // // localStorage.setItem('projectId') - // // }else { - // // this.selectProjects({ - // // projectId: projectId - // // }) - // // } + if(this.topicList.length > 0){ + // const projectIndex = JSON.parse(sessionStorage.getItem('projectIndex')) + // const projectId = sessionStorage.getItem('projectId') + // console.log('---projectId') + // console.log(projectId) + // if(!projectId) { + // this.selectProjects({ + // projectId: this.topicList[0].projectId + // }) + // // localStorage.setItem('projectId') + // }else { + // this.selectProjects({ + // projectId: projectId + // }) + // } - // this.selectProjects({ - // projectId: this.topicList[0].projectId - // }) + this.selectProjects({ + projectId: this.topicList[0].projectId + }) - // this.gotuQueryVariable() - // // 加的 - // } + this.gotuQueryVariable() + // 加的 + } this.getQueryCaches() } }).catch((error)=>{ @@ -535,6 +553,8 @@ export default { }, //选择好题目 selectProject(){ + this.lockIt = false + this.$router.push('/index/list') // 和重新开始区别开,不再问是否再试一次 // this.lockIt = false // let token = sessionStorage.getItem('token') @@ -548,12 +568,16 @@ export default { // sessionStorage.setItem('projectId', projectId) // this.topicList[localProjectIndex].projectId // localStorage.setItem('localProjectIndex', JSON.stringify(this.projectId)) - this.clearStore() - deleteCache().then((data)=>{ + this.$nextTick(() => { + this.clearStore() + }) + + + // deleteCache().then((data)=>{ - }).catch(() => { + // }).catch(() => { - }) + // }) let params = { "projectId":this.projectId, diff --git a/src/components/selectBusiness/index.vue b/src/components/selectBusiness/index.vue index 823f161..92da002 100644 --- a/src/components/selectBusiness/index.vue +++ b/src/components/selectBusiness/index.vue @@ -219,6 +219,7 @@ export default { }); return } + this.setBusinessKey(this.takeCheck) if(!this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id) { this.$message({ @@ -228,6 +229,32 @@ export default { return } this.setShowBusiness(false) + + let systemData = sessionStorage.getItem('systemData') + let token = sessionStorage.getItem('token') + let cid = sessionStorage.getItem('cid') + let systemId = sessionStorage.getItem('systemId') + let projectId = sessionStorage.getItem('projectId') + let assessmentId = sessionStorage.getItem('assessmentId') + let classId = sessionStorage.getItem('classId') + let timestamp = sessionStorage.getItem('timestamp') + sessionStorage.clear() + sessionStorage.setItem('token', token) + sessionStorage.setItem('cid', cid) + sessionStorage.setItem('systemId', systemId) + sessionStorage.setItem('projectId', projectId) + if(assessmentId) { + sessionStorage.setItem('assessmentId', assessmentId) + } + if(classId) { + sessionStorage.setItem('classId', classId) + } + if(timestamp) { + sessionStorage.setItem('timestamp', timestamp) + } + + // sessionStorage.setItem('systemData', systemData) + sessionStorage.setItem('businessKey', this.$store.state.system.businessKey) }, diff --git a/src/mixins/tipsBefore/index.js b/src/mixins/tipsBefore/index.js index 4d8021a..aa0bd0b 100644 --- a/src/mixins/tipsBefore/index.js +++ b/src/mixins/tipsBefore/index.js @@ -41,13 +41,13 @@ export default { this.isNeedBefore = true this.needBefore = this.needsModule(this.moduleName) // 因为依赖前一个项目,所以要提示 - this.tipsNefore = setInterval(() => { - this.$message({ - type: 'info', - message: '请先完成' + obj[this.needBefore] + '。', - center: true - }); - }, 3000) + // this.tipsNefore = setInterval(() => { + // this.$message({ + // type: 'info', + // message: '请先完成' + obj[this.needBefore] + '。', + // center: true + // }); + // }, 3000) } diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue index 4c8373f..040a08e 100644 --- a/src/pages/counter/list/index.vue +++ b/src/pages/counter/list/index.vue @@ -1252,6 +1252,28 @@ export default { }) this.startPlay() // console.log(this.getSelectList.accountQualitySelectList) + + + let params= { + parentId: '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,4', + // lcJudgmentRuleReq:formList, + // projectId:+projectId, + // startTime:startTime, + } + getOperation(params).then((data)=>{ + if(data.status == 200) { + var list = data.data.judgmentRuleReqs + console.log(list) + } + // const tt1 = JSON.parse(sessionStorage.getItem('tt1')) + // console.log('1-tt1') + // console.log(tt1) + // if(tt1) { + // for(const key in tt1) { + // this.form[tt1] = tt1[key] + // } + // } + }) }, mounted(){ @@ -1924,6 +1946,7 @@ export default { projectId:+projectId, startTime:startTime, } + addOperation(params).then((data)=>{ this.setTipsOperate('成功入库') }).catch((error)=>{