diff --git a/src/components/page/AddClass.vue b/src/components/page/AddClass.vue index 5c7cc27..68bacb5 100644 --- a/src/components/page/AddClass.vue +++ b/src/components/page/AddClass.vue @@ -210,14 +210,14 @@ export default { } }, methods: { - getProjectData(){ + getProjectData(){ let data = this.projectQueryData data.pageNo = this.pageNo data.pageSize = this.pageSize data.projectName = '' - this.$get(this.api.queryManagements,data).then(res => { - this.projectData = res.message.rows - this.totals = res.message.total + this.$get(this.api.queryAllManagements,data).then(res => { + this.projectData = res.pageInfo.list + this.totals = res.pageInfo.total }).catch(res => {}); }, recoveryData(){ @@ -274,14 +274,19 @@ export default { isCode: this.isCode, projectId: this.projectId, projectName: this.projectName, - startTime: this.startTime, status: Number(this.status), - stopTime: this.stopTime, surplusTime: this.surplusTime, type: Number(this.type), userId: this.userId, systemId: this.systemId } + if(this.type == 2){ + data.startTime = this.startTime + data.stopTime = this.stopTime + }else{ + data.startTime = '0000-00-00 00:00:00' + data.stopTime = '0000-00-00 00:00:00' + } if(this.id){ this.$post(this.api.expUpdate, data).then(res => { this.$message.success('修改成功'); diff --git a/src/components/page/AddProject.vue b/src/components/page/AddProject.vue index 1bb1f8a..c3a2a41 100644 --- a/src/components/page/AddProject.vue +++ b/src/components/page/AddProject.vue @@ -575,7 +575,7 @@ }, check(judgmentPointsId) { this.handleCacheData() - this.$router.push(`programOptions?id=${judgmentPointsId}`) + this.$router.push(`programOptions?id=${judgmentPointsId}&pattern=${this.pattern}`) }, judgmentRelease() { //判断能否成功发布 @@ -1009,8 +1009,8 @@ if(row){ location.href = `http://www.liuwanr.cn/jdTrials/#/programOptions?id=${row.judgmentPointsId}&systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id}&token=${this.token}&pattern=${this.pattern}` }else{ - location.href = `http://www.liuwanr.cn/jdTrials/#/list?systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}` - // location.href = `http://192.168.31.154:8080/#/list?systemId=${this.systemId}&userId=${this.userId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}` + location.href = `http://www.liuwanr.cn/jdTrials/#/list?systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}` + // location.href = `http://192.168.31.154:8080/#/list?systemId=${this.systemId}&userId=${this.userId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}` } }, disabledSelection(row,index){ diff --git a/src/components/page/Experiment.vue b/src/components/page/Experiment.vue index cf2b819..4c49a5c 100644 --- a/src/components/page/Experiment.vue +++ b/src/components/page/Experiment.vue @@ -192,7 +192,7 @@ export default { }, getChart(){ let data = [0,0,0,0,0,0,0,0,0,0] - let list = this.listData + let list = this.listDataAll list.map(n => { n.score if(n.score >= 0 && n.score <= 10){ diff --git a/src/components/page/ExperimentTeach.vue b/src/components/page/ExperimentTeach.vue index 87f3dae..d52fdf7 100644 --- a/src/components/page/ExperimentTeach.vue +++ b/src/components/page/ExperimentTeach.vue @@ -196,7 +196,7 @@ export default { }, getChart(){ let data = [0,0,0,0,0,0,0,0,0,0] - let list = this.listData + let list = this.listDataAll list.map(n => { n.score if(n.score >= 0 && n.score <= 10){ diff --git a/src/components/page/ExperimentVir.vue b/src/components/page/ExperimentVir.vue index cb75bd1..99ade86 100644 --- a/src/components/page/ExperimentVir.vue +++ b/src/components/page/ExperimentVir.vue @@ -193,7 +193,7 @@ export default { }, getChart(){ let data = [0,0,0,0,0,0,0,0,0,0] - let list = this.listData + let list = this.listDataAll list.map(n => { n.score if(n.score >= 0 && n.score <= 10){ diff --git a/src/components/page/ProgramOptions.vue b/src/components/page/ProgramOptions.vue index 3160501..d978349 100644 --- a/src/components/page/ProgramOptions.vue +++ b/src/components/page/ProgramOptions.vue @@ -353,6 +353,7 @@ export default { }, ], operatorTwo: 1, + pattern: this.$route.query.pattern }; }, mounted() { @@ -444,7 +445,7 @@ export default { } }, getData() { - this.$post(this.api.queryPoint) + this.$post(`${this.api.queryPoint}?challenge=${this.pattern}`) .then((res) => { this.stepList = res.subject this.getMesg() diff --git a/src/components/page/ShowExperiment.vue b/src/components/page/ShowExperiment.vue index 5e4f7ac..9223aa0 100644 --- a/src/components/page/ShowExperiment.vue +++ b/src/components/page/ShowExperiment.vue @@ -271,6 +271,7 @@ goodsData: [], futuresData: [], futuresLoss: [], + overTotal: false } }, watch: { @@ -279,8 +280,10 @@ let score = 0 let data = this.sjData let over = false + this.overTotal = false data.map(n => { if(n.points < n.score){ + this.overTotal = true over || this.$message.error('得分不得大于该考核点分值') over = true } @@ -461,6 +464,7 @@ } }, saveAdd(){ + if(this.overTotal) return this.$message.error('得分不得大于该考核点分值') this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => {}).catch(res => {}) let data = { comment: this.form.comment, diff --git a/src/components/page/Staff.vue b/src/components/page/Staff.vue index 6e8b414..e766e51 100644 --- a/src/components/page/Staff.vue +++ b/src/components/page/Staff.vue @@ -297,7 +297,8 @@ export default { isNewUser: 1, schoolList: [], uploadFaild: false, - token: '' + token: '', + accountMsg: '' }; }, components: { @@ -540,7 +541,8 @@ export default { if(res.message.user.length != 0){ let user = res.message.user[0]; let or = res.message.OR; - this.$message.warning('该账号已存在'); + this.accountMsg = user.roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(user.roleId)}` + this.$message.warning(this.accountMsg) this.teacherForm.email = user.email this.teacherForm.phone = user.phone this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount @@ -616,7 +618,7 @@ export default { if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加'); if(this.isManager && !this.teacherForm.roleValue.some((n) => n == '老师')) return this.$message.warning('该用户已经是管理员'); if(this.isTeacher && !this.teacherForm.roleValue.some((n) => n == '管理员')) return this.$message.warning('该用户已经是老师'); - if(!this.AccountNoAdd) return this.$message.warning('该账号已存在'); + if(!this.AccountNoAdd) return this.$message.warning(this.accountMsg); if(this.NoAdd == '' && this.teacherForm.phone){ this.phoneChange() if(!this.NoAdd) return false @@ -630,10 +632,8 @@ export default { if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); let roleId = [] - this.teacherForm.roleValue.forEach((n,k) => { - n == '老师' && roleId.push(14) - n == '管理员' && roleId.push(13) - }) + this.teacherForm.roleValue.includes('管理员') && roleId.push(13) + this.teacherForm.roleValue.includes('老师') && roleId.push(14) let data = { userName: this.teacherForm.userName, account: this.teacherForm.userAccount, diff --git a/src/components/page/Student.vue b/src/components/page/Student.vue index 8364ea0..606ac4a 100644 --- a/src/components/page/Student.vue +++ b/src/components/page/Student.vue @@ -244,6 +244,7 @@ export default { schoolList: [], uploadFaild: false, token: '', + accountMsg: '' }; }, mounted() { @@ -393,7 +394,7 @@ export default { saveData() { this.$refs.form.validate((valid) => { if (valid) { - if(this.accountReapeat) return this.$message.warning('该账号已存在') + if(this.accountReapeat) return this.$message.warning(this.accountMsg) if(this.workNumberRepeat) return this.$message.warning('该学生学号已存在') if(this.phoneRepeat) return this.$message.warning('该手机号已存在') if(this.form.studentId) { @@ -432,7 +433,9 @@ export default { schoolId: this.schoolId }); if(res.message.user.length){ - this.$message.warning('该账号已存在'); + let roleId = res.message.user[0].roleId + this.accountMsg = roleId == 4 ? '该账号已存在' : (roleId.includes(',') ? '该账号已绑定老师和管理员' : `该账号已绑定${this.roleStatus(roleId)}`) + this.$message.warning(this.accountMsg) this.accountReapeat = true }else{ this.accountReapeat = false