20240205
e 3 years ago
parent 8d3994ac25
commit 56f6e57e27
  1. 76
      src/components/case/index.vue
  2. 9
      src/pages/counter/list/index.vue

@ -239,17 +239,27 @@ export default {
let token = this.getQueryVariable('token') let token = this.getQueryVariable('token')
let cid = this.getQueryVariable('cid') let cid = this.getQueryVariable('cid')
let systemId = this.getQueryVariable('systemId') let systemId = this.getQueryVariable('systemId')
let projectId = this.getQueryVariable('projectId')
if (token != null){ if (token != null){
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('projectId', projectId)
} }
let tokens = sessionStorage.getItem('token') let tokens = sessionStorage.getItem('token')
if(tokens || token){ if(tokens || token){
this.projectPermissions = this.projectId ? 1 : 0 this.projectPermissions = this.projectId ? 1 : 0
this.assessmentId && this.projectId && this.checkVer() this.assessmentId && this.projectId && this.checkVer()
this.codeId && this.codeIds.push(this.codeId) this.codeId && this.codeIds.push(this.codeId)
this.getData() if (projectId !=null){
let params = {
"projectId":projectId,
}
this.selectProjects(params)
}else{
this.getData()
}
} }
}, },
methods: { methods: {
@ -267,7 +277,7 @@ export default {
// //
getData(){ getData(){
let params = { let params = {
systemId:'11', systemId:sessionStorage.getItem('systemId'),
"permissions":0, "permissions":0,
} }
getProjectBySystemId(params).then((data)=>{ getProjectBySystemId(params).then((data)=>{
@ -288,7 +298,14 @@ export default {
let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; let startTime = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
sessionStorage.setItem('startTime', startTime) sessionStorage.setItem('startTime', startTime)
this.topicList = data.data.projects; 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)=>{ getQueryCache(params).then((data)=>{
if(data.data.status == 200){ if(data.data.status == 200){
this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', { this.$confirm('有项目未做完,是否回到未做完的项目?', '提示', {
@ -315,17 +332,28 @@ export default {
}).catch(() => { }).catch(() => {
}) })
sessionStorage.setItem('projectId', this.topicList[0].projectId) let projectId = this.getQueryVariable('projectId')
this.projectId = this.topicList[0].projectId if(projectId){
this.projectId = projectId
}else{
this.projectId = this.topicList[0].projectId;
}
sessionStorage.setItem('projectId', this.projectId)
let params = { let params = {
"projectId":this.topicList[0].projectId, "projectId":this.projectId,
} }
this.selectProjects(params) this.selectProjects(params)
}); });
}else{ }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 = { let params = {
"projectId":this.topicList[0].projectId, "projectId":this.projectId,
} }
this.selectProjects(params) this.selectProjects(params)
} }
@ -348,9 +376,35 @@ export default {
selectProjects(params){ selectProjects(params){
getProjectDetail(params).then((data)=>{ getProjectDetail(params).then((data)=>{
if(data.status == 200){ if(data.status == 200){
this.projectName = data.data.projectManage.projectName let projectId = this.getQueryVariable('projectId')
this.projectManage = data.data.projectManage; if(projectId != null){
this.requires = data.data.projectJudgmentVos; 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)=>{ }).catch((error)=>{
}) })

@ -121,7 +121,7 @@
<el-input v-focus show-password v-model="passwordForm.password" maxlength="6" onkeyup="{this.value=this.value.replace(/\D/g,'')}" autocomplete="off"></el-input> <el-input v-focus show-password v-model="passwordForm.password" maxlength="6" onkeyup="{this.value=this.value.replace(/\D/g,'')}" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="确认密码" prop="passwordAgain"> <el-form-item label="确认密码" prop="passwordAgain">
<el-input show-password :disabled="!passwordForm.password||passwordForm.password.length!=6" v-model="passwordForm.passwordAgain" maxlength="6" onkeyup="this.value=this.value.replace(/\D/g,'')" autocomplete="off"></el-input> <el-input show-password v-model="passwordForm.passwordAgain" maxlength="6" onkeyup="this.value=this.value.replace(/\D/g,'')" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -215,8 +215,11 @@ export default {
var validatePass2 = (rule, value, callback) => { var validatePass2 = (rule, value, callback) => {
if (value === '') { if (value === '') {
callback(new Error('请再次输入密码')); callback(new Error('请再次输入密码'));
} else if (value !== this.passwordForm.password) { } else if (value.length == 6) {
callback(new Error('两次输入密码不一致!')); if(value !== this.passwordForm.password){
console.log('=========')
callback(new Error('两次输入密码不一致!'));
}
} else { } else {
callback(); callback();
} }

Loading…
Cancel
Save