From 56f6e57e27b91e33d09e7e13bbf20014e93b81a1 Mon Sep 17 00:00:00 2001
From: e <2432808546@qq.com>
Date: Wed, 17 Nov 2021 18:59:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/case/index.vue | 76 +++++++++++++++++++++++++++-----
src/pages/counter/list/index.vue | 9 ++--
2 files changed, 71 insertions(+), 14 deletions(-)
diff --git a/src/components/case/index.vue b/src/components/case/index.vue
index 2b9a38f..6173785 100644
--- a/src/components/case/index.vue
+++ b/src/components/case/index.vue
@@ -239,17 +239,27 @@ export default {
let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId')
+ let projectId = this.getQueryVariable('projectId')
if (token != null){
sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId)
+ sessionStorage.setItem('projectId', projectId)
}
let tokens = sessionStorage.getItem('token')
if(tokens || token){
this.projectPermissions = this.projectId ? 1 : 0
this.assessmentId && this.projectId && this.checkVer()
this.codeId && this.codeIds.push(this.codeId)
- this.getData()
+ if (projectId !=null){
+ let params = {
+ "projectId":projectId,
+ }
+ this.selectProjects(params)
+ }else{
+ this.getData()
+ }
+
}
},
methods: {
@@ -267,7 +277,7 @@ export default {
//获取项目列表
getData(){
let params = {
- systemId:'11',
+ systemId:sessionStorage.getItem('systemId'),
"permissions":0,
}
getProjectBySystemId(params).then((data)=>{
@@ -288,7 +298,14 @@ export default {
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', startTime)
this.topicList = data.data.projects;
- this.projectId = this.topicList[0].projectId;
+ if(this.topicList.length > 0){
+ let projectId = this.getQueryVariable('projectId')
+ if(projectId){
+ this.projectId = projectId
+ }else{
+ this.projectId = this.topicList[0].projectId;
+ }
+ }
getQueryCache(params).then((data)=>{
if(data.data.status == 200){
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', {
@@ -315,17 +332,28 @@ export default {
}).catch(() => {
})
- sessionStorage.setItem('projectId', this.topicList[0].projectId)
- this.projectId = this.topicList[0].projectId
+ let projectId = this.getQueryVariable('projectId')
+ if(projectId){
+ this.projectId = projectId
+ }else{
+ this.projectId = this.topicList[0].projectId;
+ }
+ sessionStorage.setItem('projectId', this.projectId)
let params = {
- "projectId":this.topicList[0].projectId,
+ "projectId":this.projectId,
}
this.selectProjects(params)
});
}else{
- sessionStorage.setItem('projectId', this.topicList[0].projectId)
+ let projectId = this.getQueryVariable('projectId')
+ if(projectId){
+ this.projectId = projectId
+ }else{
+ this.projectId = this.topicList[0].projectId;
+ }
+ sessionStorage.setItem('projectId', this.projectId)
let params = {
- "projectId":this.topicList[0].projectId,
+ "projectId":this.projectId,
}
this.selectProjects(params)
}
@@ -348,9 +376,35 @@ export default {
selectProjects(params){
getProjectDetail(params).then((data)=>{
if(data.status == 200){
- this.projectName = data.data.projectManage.projectName
- this.projectManage = data.data.projectManage;
- this.requires = data.data.projectJudgmentVos;
+ let projectId = this.getQueryVariable('projectId')
+ if(projectId != null){
+ let dates = new Date().getTime();
+ let date = new Date(dates)
+ let y = date.getFullYear();
+ let MM = date.getMonth() + 1;
+ MM = MM < 10 ? ('0' + MM) : MM;
+ let d = date.getDate();
+ d = d < 10 ? ('0' + d) : d;
+ let h = date.getHours();
+ h = h < 10 ? ('0' + h) : h;
+ let m = date.getMinutes();
+ m = m < 10 ? ('0' + m) : m;
+ let s = date.getSeconds();
+ s = s < 10 ? ('0' + s) : s;
+ let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+ sessionStorage.setItem('startTime', startTime)
+ this.topicList = [data.data.projectManage];
+ this.projectId = +params.projectId
+ console.log(this.projectId)
+ console.log(this.topicList)
+ this.projectName = data.data.projectManage.projectName
+ this.projectManage = data.data.projectManage;
+ this.requires = data.data.projectJudgmentVos;
+ }else{
+ this.projectName = data.data.projectManage.projectName
+ this.projectManage = data.data.projectManage;
+ this.requires = data.data.projectJudgmentVos;
+ }
}
}).catch((error)=>{
})
diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue
index 6a841a5..c6d6b03 100644
--- a/src/pages/counter/list/index.vue
+++ b/src/pages/counter/list/index.vue
@@ -121,7 +121,7 @@
-
+
@@ -215,8 +215,11 @@ export default {
var validatePass2 = (rule, value, callback) => {
if (value === '') {
callback(new Error('请再次输入密码'));
- } else if (value !== this.passwordForm.password) {
- callback(new Error('两次输入密码不一致!'));
+ } else if (value.length == 6) {
+ if(value !== this.passwordForm.password){
+ console.log('=========')
+ callback(new Error('两次输入密码不一致!'));
+ }
} else {
callback();
}