diff --git a/src/components/page/AddProject.vue b/src/components/page/AddProject.vue index b182e72..cabbad2 100644 --- a/src/components/page/AddProject.vue +++ b/src/components/page/AddProject.vue @@ -318,6 +318,7 @@ roleId: Number(this.$store.state.userRoleId), token: this.$store.state.token, newroleArray: [], + userLoginId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId, systemId: this.$config.systemId, judgementpointsquery: "", //筛选判分点 @@ -844,26 +845,29 @@ this.$nextTick(() => { this.$refs.judgementTable.clearSelection() }) - let data = { - systemId: this.systemId, - userId: this.userId, - pageNum: 1, - pageSize: 100, - judgmentPointsName: this.judgementpointsquery - } - this.$get(this.api.queryListTrading,data) - .then((res) => { - let list = res.message.rows - let experimentData = this.experimentData - let result = [] - list.map(n => { - n.judgmentPointsId = n.id - experimentData.find(e => e.judgmentPointsId == n.id) || result.push(n) + this.$get(this.api.queryUserIds).then(res => { + let data = { + systemId: this.systemId, + userId: this.userLoginId, + pageNum: 1, + pageSize: 100, + judgmentPointsName: this.judgementpointsquery, + userIdList: res.message.retvalue.join() + } + this.$get(this.api.queryListTrading,data) + .then((res) => { + let list = res.message.rows + let experimentData = this.experimentData + let result = [] + list.map(n => { + n.judgmentPointsId = n.id + experimentData.find(e => e.judgmentPointsId == n.id) || result.push(n) + }) + this.judgementData = result + }).catch((err) => { + this.judgementData = [] }) - this.judgementData = result - }).catch((err) => { - this.judgementData = [] - }) + }).catch(res => {}) }, objclone(arr) { //数组中有多个对象的深拷贝 diff --git a/src/components/page/PersonalCenter.vue b/src/components/page/PersonalCenter.vue index 2ccfcb3..4723f40 100644 --- a/src/components/page/PersonalCenter.vue +++ b/src/components/page/PersonalCenter.vue @@ -122,7 +122,7 @@
证件 - +
@@ -281,35 +281,35 @@
手机号 -
- {{personalInformation.phone}} - 更换 - 绑定 +
+ {{personalInformation.phone}} + 更换 + 绑定
邮箱 -
- {{personalInformation.email}} - 更换 - 绑定 +
+ {{personalInformation.email}} + 更换 + 绑定
-
+ +
+
+ 密码 +
+ 更换 +
+
-
@@ -1220,6 +1220,11 @@ input:focus { .btns{ display: inline-flex; align-items: center; + border-bottom: 1px solid #b5b5b5; + padding: 5px 0; + } + .flex-end-content{ + justify-content: flex-end; } .selects{ display: inline-flex; @@ -1246,11 +1251,14 @@ input:focus { } /deep/.el-input__inner { color: #656565; - font-size: 16px; + font-size: 14px; border-radius: 0 !important; border: 0px; border-bottom: 1px solid #b5b5b5; } + /deep/.el-input--prefix .el-input__inner{ + padding-left: 15px; + } /deep/.el-input__icon { color: #9278ff; &.el-icon-date{ diff --git a/src/components/page/ShowExperiment.vue b/src/components/page/ShowExperiment.vue index 0734601..e8ddd85 100644 --- a/src/components/page/ShowExperiment.vue +++ b/src/components/page/ShowExperiment.vue @@ -103,19 +103,14 @@

                                 
                             
-                            
-                            
+                            
+                            
                             
                                 
                             
-                            
-                                
-                            
                         
                     
 
@@ -321,9 +316,10 @@
                                 judgmentPointsName: item.judgmentPointsName,
                                 userAnswers: n.userAnswers,
                                 referenceAnswer: item.levelFour,
-                                score: n.userScore,
+                                score: n.score,
                                 id: n.id,
-                                type: n.type
+                                type: n.type,
+                                points: n.points
                             })
                             n.type == 1 && ids.push(`ids=${n.userAnswers}`)
                         })
@@ -429,21 +425,6 @@
             handleRemove(file, fileList) {
                 console.log(file, fileList);
             },
-            save(row){
-                let data = {
-                    id: row.id,
-                    reportId: this.id,
-                    score: row.score
-                }
-                this.$post(this.api.editScore,data).then((res) => {
-                    if(res.status == 10000){
-                        this.$message.error(res.message)
-                    }else{
-                        this.$message.success('修改成功')
-                        this.getData()
-                    }
-                }).catch((err) => {})
-            },
             handleExceed(files, fileList) {
                 this.$message.warning(
                     `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` 
@@ -465,8 +446,27 @@
                     isSignature: Number(this.isSignature)
                 }
                 this.$post(this.api.updateComment,data).then((res) => {
-                    this.$message.success('保存成功')
-                    this.$router.back()
+                    let editScoreVoList = []
+                    let invalid = false
+                    this.sjData.map(n => {
+                        if(n.score < 0) invalid = true
+                        editScoreVoList.push({
+                            id: n.id,
+                            score: Number(n.score)
+                        })
+                    })
+                    if(invalid) return this.$message.error('分数不得小于0')
+                    this.$post(this.api.editScore,{
+                        editScoreVoList,
+                        reportId: Number(this.id)
+                    }).then((res) => {
+                        if(res.status == 10000){
+                            this.$message.error(res.message)
+                        }else{
+                            this.$message.success('保存成功')
+                            this.$router.back()
+                        }
+                    }).catch((err) => {})
                 }).catch((res) => {})
             },
             goback(){
diff --git a/src/components/page/Staff.vue b/src/components/page/Staff.vue
index 8b6fe50..d37d637 100644
--- a/src/components/page/Staff.vue
+++ b/src/components/page/Staff.vue
@@ -290,6 +290,9 @@ export default {
             AccountNoAdd: '',
             managerNumberNoAdd: true,
             teacherNumberNoAdd: true,
+            studentNumberNoAdd: true,
+            managerNumberNoAdd1: true,
+            teacherNumberNoAdd1: true,
             platformId: this.$store.state.platformId,
             isManager: false,
             isTeacher: false,
@@ -572,31 +575,45 @@ export default {
             }
         },
         async OnlyId(type){
-            let data = {};
-            let msg = '';
-            if(type == 13){
-                data = {
-                    workNumber: this.encodeString(this.teacherForm.managerWorkNumber),
-                    roleId: 13,
-                    schoolId: this.teacherForm.schoolId
-                }
-                msg = '该管理员工号已存在'
-            }else if(type == 14){
-                data = {
-                    workNumber: this.encodeString(this.teacherForm.teacherWorkNumber),
-                    roleId: 14,
-                    schoolId: this.teacherForm.schoolId
-                }
-                msg = '该老师工号已存在'
+            let workNumber = type == 13 ? this.encodeString(this.teacherForm.managerWorkNumber) : this.encodeString(this.teacherForm.teacherWorkNumber)
+            let data = {
+                workNumber,
+                roleId: 13,
+                schoolId: this.teacherForm.schoolId
             }
-            let res = await this.$get(this.api.queryWorkNumberIsExist1, data);
-            if(JSON.stringify(res.message) != '{}'){
-                this.$message.warning(msg);
-                type == 2 ? (this.managerNumberNoAdd = false) : (this.teacherNumberNoAdd = false)
-            }else{
+            let data1 = {
+                workNumber,
+                roleId: 14,
+                schoolId: this.teacherForm.schoolId
+            }
+            let data2 = {
+                workNumber,
+                roleId: 4,
+                schoolId: this.teacherForm.schoolId
+            }
+            let res = await this.$get(this.api.queryWorkNumberIsExist, data)
+            let res1 = await this.$get(this.api.queryWorkNumberIsExist, data1)
+            let res2 = await this.$get(this.api.queryWorkNumberIsExist, data2)
+            if(type == 13 && JSON.stringify(res.message) != '{}'){
+                this.$message.warning('该工号已存在');
+                this.managerNumberNoAdd = false
+            }else if(type == 14 && JSON.stringify(res1.message) != '{}'){
+                this.$message.warning('该工号已存在');
+                this.teacherNumberNoAdd = false
+            }else if(JSON.stringify(res2.message) != '{}'){
+                this.$message.warning('该工号已绑定学生角色');
+                this.studentNumberNoAdd = false
+            }else if(type == 14 && JSON.stringify(res.message) != '{}'){
+                this.$message.warning('该工号已绑定管理员角色');
+                this.managerNumberNoAdd1 = false
+            }else if(type == 13 && JSON.stringify(res1.message) != '{}'){
+                this.$message.warning('该工号已绑定老师角色');
+                this.teacherNumberNoAdd1 = false
+            }
+            if(JSON.stringify(res.message) == '{}' && JSON.stringify(res1.message) == '{}' && JSON.stringify(res2.message) == '{}'){
                 let timestamp = Date.parse(new Date());
                 this.teacherForm.uniqueIdentificationAccount = `${this.schoolId}${this.teacherForm.uniqueIdentificationAccount}${timestamp}`
-                type == 2 ? (this.managerNumberNoAdd = true) : (this.teacherNumberNoAdd = true)
+                type == 13 ? (this.managerNumberNoAdd = true) : (this.teacherNumberNoAdd = true)
             }
         },
         async saveSure(teacherForm){
@@ -614,6 +631,9 @@ export default {
                     }
                     if(!this.managerNumberNoAdd) return this.$message.warning('该管理员工号已存在');
                     if(!this.teacherNumberNoAdd) return this.$message.warning('该老师工号已存在');
+                    if(!this.managerNumberNoAdd1) return this.$message.warning('该工号已绑定管理员角色');
+                    if(!this.teacherNumberNoAdd1) return this.$message.warning('该工号已绑定老师角色');
+                    if(!this.studentNumberNoAdd) return this.$message.warning('该工号已绑定学生角色');
                     
                     let roleId = []
                     this.teacherForm.roleValue.forEach((n,k) => {
diff --git a/src/utils/api.js b/src/utils/api.js
index 1299301..086dbc8 100644
--- a/src/utils/api.js
+++ b/src/utils/api.js
@@ -8,14 +8,14 @@
 let uploadURL = 'http://8.134.8.197:8001'
 let host = ''
 if(process.env.NODE_ENV === 'development'){
-  host = 'http://116.63.168.79'
+  host = 'http://122.9.154.146'
 }
 
 export default {
   logins: `${host}/liuwanr/userInfo/adminLogins`, //登录 
 
   fileupload: `${uploadURL}/oss/manage/fileupload`,
-  updateLogInNumber: `http://116.63.168.79/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
+  updateLogInNumber: `${host}/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
   uploadUserAvatars: `${host}/liuwanr/userInfo/uploadUserAvatars`, //上传头像
   queryProvince: `${host}/liuwanr/province/queryProvince`, //查询省份
   queryCity: `${host}/liuwanr/city/queryCity`, //查询城市
@@ -88,6 +88,7 @@ export default {
   updateRole: `${host}/project/ProjectManagement/updateRole`, //修改实验数据—角色信息
   isNameExistis: `${host}/project/ProjectManagement/isNameExistis`, //项目名称是否存在
   QueryPfdInformation: `${host}/judgment/pointOfJudgement/queryPfdInformation`, //判分点详细信息
+  queryUserIds:`${host}/liuwanr/userInfo/queryUserIds`,
 
   // 学生管理
   addStudent: `${host}/evaluation/tms/student/addStudent`,