master V1.0.0
yujialong 4 years ago
parent f439bbd3ea
commit 6dd02d5d25
  1. 17
      src/components/page/AddClass.vue
  2. 6
      src/components/page/AddProject.vue
  3. 2
      src/components/page/Experiment.vue
  4. 2
      src/components/page/ExperimentTeach.vue
  5. 2
      src/components/page/ExperimentVir.vue
  6. 3
      src/components/page/ProgramOptions.vue
  7. 4
      src/components/page/ShowExperiment.vue
  8. 14
      src/components/page/Staff.vue
  9. 7
      src/components/page/Student.vue

@ -210,14 +210,14 @@ export default {
} }
}, },
methods: { methods: {
getProjectData(){ getProjectData(){
let data = this.projectQueryData let data = this.projectQueryData
data.pageNo = this.pageNo data.pageNo = this.pageNo
data.pageSize = this.pageSize data.pageSize = this.pageSize
data.projectName = '' data.projectName = ''
this.$get(this.api.queryManagements,data).then(res => { this.$get(this.api.queryAllManagements,data).then(res => {
this.projectData = res.message.rows this.projectData = res.pageInfo.list
this.totals = res.message.total this.totals = res.pageInfo.total
}).catch(res => {}); }).catch(res => {});
}, },
recoveryData(){ recoveryData(){
@ -274,14 +274,19 @@ export default {
isCode: this.isCode, isCode: this.isCode,
projectId: this.projectId, projectId: this.projectId,
projectName: this.projectName, projectName: this.projectName,
startTime: this.startTime,
status: Number(this.status), status: Number(this.status),
stopTime: this.stopTime,
surplusTime: this.surplusTime, surplusTime: this.surplusTime,
type: Number(this.type), type: Number(this.type),
userId: this.userId, userId: this.userId,
systemId: this.systemId 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){ if(this.id){
this.$post(this.api.expUpdate, data).then(res => { this.$post(this.api.expUpdate, data).then(res => {
this.$message.success('修改成功'); this.$message.success('修改成功');

@ -575,7 +575,7 @@
}, },
check(judgmentPointsId) { check(judgmentPointsId) {
this.handleCacheData() this.handleCacheData()
this.$router.push(`programOptions?id=${judgmentPointsId}`) this.$router.push(`programOptions?id=${judgmentPointsId}&pattern=${this.pattern}`)
}, },
judgmentRelease() { judgmentRelease() {
// //
@ -1009,8 +1009,8 @@
if(row){ 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}` 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{ }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://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}` // 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){ disabledSelection(row,index){

@ -192,7 +192,7 @@ export default {
}, },
getChart(){ getChart(){
let data = [0,0,0,0,0,0,0,0,0,0] let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData let list = this.listDataAll
list.map(n => { list.map(n => {
n.score n.score
if(n.score >= 0 && n.score <= 10){ if(n.score >= 0 && n.score <= 10){

@ -196,7 +196,7 @@ export default {
}, },
getChart(){ getChart(){
let data = [0,0,0,0,0,0,0,0,0,0] let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData let list = this.listDataAll
list.map(n => { list.map(n => {
n.score n.score
if(n.score >= 0 && n.score <= 10){ if(n.score >= 0 && n.score <= 10){

@ -193,7 +193,7 @@ export default {
}, },
getChart(){ getChart(){
let data = [0,0,0,0,0,0,0,0,0,0] let data = [0,0,0,0,0,0,0,0,0,0]
let list = this.listData let list = this.listDataAll
list.map(n => { list.map(n => {
n.score n.score
if(n.score >= 0 && n.score <= 10){ if(n.score >= 0 && n.score <= 10){

@ -353,6 +353,7 @@ export default {
}, },
], ],
operatorTwo: 1, operatorTwo: 1,
pattern: this.$route.query.pattern
}; };
}, },
mounted() { mounted() {
@ -444,7 +445,7 @@ export default {
} }
}, },
getData() { getData() {
this.$post(this.api.queryPoint) this.$post(`${this.api.queryPoint}?challenge=${this.pattern}`)
.then((res) => { .then((res) => {
this.stepList = res.subject this.stepList = res.subject
this.getMesg() this.getMesg()

@ -271,6 +271,7 @@
goodsData: [], goodsData: [],
futuresData: [], futuresData: [],
futuresLoss: [], futuresLoss: [],
overTotal: false
} }
}, },
watch: { watch: {
@ -279,8 +280,10 @@
let score = 0 let score = 0
let data = this.sjData let data = this.sjData
let over = false let over = false
this.overTotal = false
data.map(n => { data.map(n => {
if(n.points < n.score){ if(n.points < n.score){
this.overTotal = true
over || this.$message.error('得分不得大于该考核点分值') over || this.$message.error('得分不得大于该考核点分值')
over = true over = true
} }
@ -461,6 +464,7 @@
} }
}, },
saveAdd(){ saveAdd(){
if(this.overTotal) return this.$message.error('得分不得大于该考核点分值')
this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => {}).catch(res => {}) this.$post(`${this.api.selectSignature}?reportId=${this.id}&id=${this.signId}`).then(res => {}).catch(res => {})
let data = { let data = {
comment: this.form.comment, comment: this.form.comment,

@ -297,7 +297,8 @@ export default {
isNewUser: 1, isNewUser: 1,
schoolList: [], schoolList: [],
uploadFaild: false, uploadFaild: false,
token: '' token: '',
accountMsg: ''
}; };
}, },
components: { components: {
@ -540,7 +541,8 @@ export default {
if(res.message.user.length != 0){ if(res.message.user.length != 0){
let user = res.message.user[0]; let user = res.message.user[0];
let or = res.message.OR; 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.email = user.email
this.teacherForm.phone = user.phone this.teacherForm.phone = user.phone
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount
@ -616,7 +618,7 @@ export default {
if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加'); if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加');
if(this.isManager && !this.teacherForm.roleValue.some((n) => n == '老师')) 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.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){ if(this.NoAdd == '' && this.teacherForm.phone){
this.phoneChange() this.phoneChange()
if(!this.NoAdd) return false if(!this.NoAdd) return false
@ -630,10 +632,8 @@ export default {
if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在'); if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在');
let roleId = [] let roleId = []
this.teacherForm.roleValue.forEach((n,k) => { this.teacherForm.roleValue.includes('管理员') && roleId.push(13)
n == '老师' && roleId.push(14) this.teacherForm.roleValue.includes('老师') && roleId.push(14)
n == '管理员' && roleId.push(13)
})
let data = { let data = {
userName: this.teacherForm.userName, userName: this.teacherForm.userName,
account: this.teacherForm.userAccount, account: this.teacherForm.userAccount,

@ -244,6 +244,7 @@ export default {
schoolList: [], schoolList: [],
uploadFaild: false, uploadFaild: false,
token: '', token: '',
accountMsg: ''
}; };
}, },
mounted() { mounted() {
@ -393,7 +394,7 @@ export default {
saveData() { saveData() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (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.workNumberRepeat) return this.$message.warning('该学生学号已存在')
if(this.phoneRepeat) return this.$message.warning('该手机号已存在') if(this.phoneRepeat) return this.$message.warning('该手机号已存在')
if(this.form.studentId) { if(this.form.studentId) {
@ -432,7 +433,9 @@ export default {
schoolId: this.schoolId schoolId: this.schoolId
}); });
if(res.message.user.length){ 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 this.accountReapeat = true
}else{ }else{
this.accountReapeat = false this.accountReapeat = false

Loading…
Cancel
Save