master
yujialong 4 years ago
parent 4363089165
commit 8b292d53d5
  1. 8
      src/components/page/AddProject.vue
  2. 40
      src/components/page/PersonalCenter.vue
  3. 50
      src/components/page/ShowExperiment.vue
  4. 52
      src/components/page/Staff.vue
  5. 5
      src/utils/api.js

@ -318,6 +318,7 @@
roleId: Number(this.$store.state.userRoleId), roleId: Number(this.$store.state.userRoleId),
token: this.$store.state.token, token: this.$store.state.token,
newroleArray: [], newroleArray: [],
userLoginId: this.$store.state.userLoginId,
userId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId,
systemId: this.$config.systemId, systemId: this.$config.systemId,
judgementpointsquery: "", // judgementpointsquery: "", //
@ -844,12 +845,14 @@
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.judgementTable.clearSelection() this.$refs.judgementTable.clearSelection()
}) })
this.$get(this.api.queryUserIds).then(res => {
let data = { let data = {
systemId: this.systemId, systemId: this.systemId,
userId: this.userId, userId: this.userLoginId,
pageNum: 1, pageNum: 1,
pageSize: 100, pageSize: 100,
judgmentPointsName: this.judgementpointsquery judgmentPointsName: this.judgementpointsquery,
userIdList: res.message.retvalue.join()
} }
this.$get(this.api.queryListTrading,data) this.$get(this.api.queryListTrading,data)
.then((res) => { .then((res) => {
@ -864,6 +867,7 @@
}).catch((err) => { }).catch((err) => {
this.judgementData = [] this.judgementData = []
}) })
}).catch(res => {})
}, },
objclone(arr) { objclone(arr) {
// //

@ -122,7 +122,7 @@
</div> </div>
<div class="item"> <div class="item">
<span>证件</span> <span>证件</span>
<input id="idnumber" class="idnumber" placeholder="请输入姓名" type="text" v-model="personalInformation.idNumber"/> <input id="idnumber" class="idnumber" placeholder="请输入证件" type="text" v-model="personalInformation.idNumber"/>
</div> </div>
</div> </div>
<div class="line"> <div class="line">
@ -281,35 +281,35 @@
</div> </div>
<div class="item"> <div class="item">
<span>手机号</span> <span>手机号</span>
<div class="btns"> <div class="btns flex-between">
{{personalInformation.phone}} <span>{{personalInformation.phone}}</span>
<el-button v-if="personalInformation.phone" style="margin-left: 5px;width:100%;" size="small" @click="bindPhone">更换</el-button> <el-button v-if="personalInformation.phone" type="primary" size="small" @click="bindPhone">更换</el-button>
<el-button v-else style="width:100%;" size="small" @click="bindPhone">绑定</el-button> <el-button v-else type="primary" size="small" @click="bindPhone">绑定</el-button>
</div> </div>
</div> </div>
</div> </div>
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<span>邮箱</span> <span>邮箱</span>
<div class="btns"> <div class="btns flex-between">
{{personalInformation.email}} <span>{{personalInformation.email}}</span>
<el-button v-if="personalInformation.email" style="margin-left: 5px;width:100%;" size="small" @click="bindEmail">更换</el-button> <el-button v-if="personalInformation.email" type="primary" size="small" @click="bindEmail">更换</el-button>
<el-button v-else style="width:100%;" size="small" @click="bindEmail">绑定</el-button> <el-button v-else type="primary" size="small" @click="bindEmail">绑定</el-button>
</div> </div>
</div> </div>
<div class="item"> <!-- <div class="item">
<span>微信</span> <span>微信</span>
<input id="weChat" class="weChat" disabled placeholder="微信" type="text" v-model="personalInformation.weChatID"/> <input id="weChat" class="weChat" disabled placeholder="微信" type="text" v-model="personalInformation.weChatID"/>
</div> </div> -->
</div>
<div class="line"> <div class="line">
<div class="item"> <div class="item">
<span>密码</span> <span>密码</span>
<div class="btns"> <div class="btns flex-end-content">
<el-button size="small" style="width:100%;" @click="bindPassword">更换密码</el-button> <el-button type="primary" size="small" @click="bindPassword">更换</el-button>
</div> </div>
</div> </div>
<div class="item"></div> <!-- <div class="item"></div> -->
</div>
</div> </div>
</div> </div>
</div> </div>
@ -1220,6 +1220,11 @@ input:focus {
.btns{ .btns{
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
border-bottom: 1px solid #b5b5b5;
padding: 5px 0;
}
.flex-end-content{
justify-content: flex-end;
} }
.selects{ .selects{
display: inline-flex; display: inline-flex;
@ -1246,11 +1251,14 @@ input:focus {
} }
/deep/.el-input__inner { /deep/.el-input__inner {
color: #656565; color: #656565;
font-size: 16px; font-size: 14px;
border-radius: 0 !important; border-radius: 0 !important;
border: 0px; border: 0px;
border-bottom: 1px solid #b5b5b5; border-bottom: 1px solid #b5b5b5;
} }
/deep/.el-input--prefix .el-input__inner{
padding-left: 15px;
}
/deep/.el-input__icon { /deep/.el-input__icon {
color: #9278ff; color: #9278ff;
&.el-icon-date{ &.el-icon-date{

@ -103,19 +103,14 @@
<pre v-html="scope.row.userAnswers"></pre> <pre v-html="scope.row.userAnswers"></pre>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="referenceAnswer" label="参考答案" align="center"> <el-table-column prop="referenceAnswer" label="参考答案" align="center"></el-table-column>
</el-table-column> <el-table-column prop="points" label="分值" width="100" align="center"></el-table-column>
<el-table-column prop="score" label="得分" width="100" align="center"> <el-table-column prop="score" label="得分" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="edit" type="number" v-model="scope.row.score"></el-input> <el-input v-if="edit" type="number" min="0" v-model="scope.row.score"></el-input>
<template v-else>{{scope.row.score}}</template> <template v-else>{{scope.row.score}}</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" v-if="edit">
<template slot-scope="scope">
<el-button type="text" @click="save(scope.row)">保存</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
@ -321,9 +316,10 @@
judgmentPointsName: item.judgmentPointsName, judgmentPointsName: item.judgmentPointsName,
userAnswers: n.userAnswers, userAnswers: n.userAnswers,
referenceAnswer: item.levelFour, referenceAnswer: item.levelFour,
score: n.userScore, score: n.score,
id: n.id, id: n.id,
type: n.type type: n.type,
points: n.points
}) })
n.type == 1 && ids.push(`ids=${n.userAnswers}`) n.type == 1 && ids.push(`ids=${n.userAnswers}`)
}) })
@ -429,21 +425,6 @@
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(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) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
@ -465,8 +446,27 @@
isSignature: Number(this.isSignature) isSignature: Number(this.isSignature)
} }
this.$post(this.api.updateComment,data).then((res) => { this.$post(this.api.updateComment,data).then((res) => {
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.$message.success('保存成功')
this.$router.back() this.$router.back()
}
}).catch((err) => {})
}).catch((res) => {}) }).catch((res) => {})
}, },
goback(){ goback(){

@ -290,6 +290,9 @@ export default {
AccountNoAdd: '', AccountNoAdd: '',
managerNumberNoAdd: true, managerNumberNoAdd: true,
teacherNumberNoAdd: true, teacherNumberNoAdd: true,
studentNumberNoAdd: true,
managerNumberNoAdd1: true,
teacherNumberNoAdd1: true,
platformId: this.$store.state.platformId, platformId: this.$store.state.platformId,
isManager: false, isManager: false,
isTeacher: false, isTeacher: false,
@ -572,31 +575,45 @@ export default {
} }
}, },
async OnlyId(type){ async OnlyId(type){
let data = {}; let workNumber = type == 13 ? this.encodeString(this.teacherForm.managerWorkNumber) : this.encodeString(this.teacherForm.teacherWorkNumber)
let msg = ''; let data = {
if(type == 13){ workNumber,
data = {
workNumber: this.encodeString(this.teacherForm.managerWorkNumber),
roleId: 13, roleId: 13,
schoolId: this.teacherForm.schoolId schoolId: this.teacherForm.schoolId
} }
msg = '该管理员工号已存在' let data1 = {
}else if(type == 14){ workNumber,
data = {
workNumber: this.encodeString(this.teacherForm.teacherWorkNumber),
roleId: 14, roleId: 14,
schoolId: this.teacherForm.schoolId schoolId: this.teacherForm.schoolId
} }
msg = '该老师工号已存在' let data2 = {
workNumber,
roleId: 4,
schoolId: this.teacherForm.schoolId
} }
let res = await this.$get(this.api.queryWorkNumberIsExist1, data); let res = await this.$get(this.api.queryWorkNumberIsExist, data)
if(JSON.stringify(res.message) != '{}'){ let res1 = await this.$get(this.api.queryWorkNumberIsExist, data1)
this.$message.warning(msg); let res2 = await this.$get(this.api.queryWorkNumberIsExist, data2)
type == 2 ? (this.managerNumberNoAdd = false) : (this.teacherNumberNoAdd = false) if(type == 13 && JSON.stringify(res.message) != '{}'){
}else{ 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()); let timestamp = Date.parse(new Date());
this.teacherForm.uniqueIdentificationAccount = `${this.schoolId}${this.teacherForm.uniqueIdentificationAccount}${timestamp}` 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){ async saveSure(teacherForm){
@ -614,6 +631,9 @@ export default {
} }
if(!this.managerNumberNoAdd) return this.$message.warning('该管理员工号已存在'); if(!this.managerNumberNoAdd) return this.$message.warning('该管理员工号已存在');
if(!this.teacherNumberNoAdd) 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 = [] let roleId = []
this.teacherForm.roleValue.forEach((n,k) => { this.teacherForm.roleValue.forEach((n,k) => {

@ -8,14 +8,14 @@
let uploadURL = 'http://8.134.8.197:8001' let uploadURL = 'http://8.134.8.197:8001'
let host = '' let host = ''
if(process.env.NODE_ENV === 'development'){ if(process.env.NODE_ENV === 'development'){
host = 'http://116.63.168.79' host = 'http://122.9.154.146'
} }
export default { export default {
logins: `${host}/liuwanr/userInfo/adminLogins`, //登录 logins: `${host}/liuwanr/userInfo/adminLogins`, //登录
fileupload: `${uploadURL}/oss/manage/fileupload`, fileupload: `${uploadURL}/oss/manage/fileupload`,
updateLogInNumber: `http://116.63.168.79/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间 updateLogInNumber: `${host}/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
uploadUserAvatars: `${host}/liuwanr/userInfo/uploadUserAvatars`, //上传头像 uploadUserAvatars: `${host}/liuwanr/userInfo/uploadUserAvatars`, //上传头像
queryProvince: `${host}/liuwanr/province/queryProvince`, //查询省份 queryProvince: `${host}/liuwanr/province/queryProvince`, //查询省份
queryCity: `${host}/liuwanr/city/queryCity`, //查询城市 queryCity: `${host}/liuwanr/city/queryCity`, //查询城市
@ -88,6 +88,7 @@ export default {
updateRole: `${host}/project/ProjectManagement/updateRole`, //修改实验数据—角色信息 updateRole: `${host}/project/ProjectManagement/updateRole`, //修改实验数据—角色信息
isNameExistis: `${host}/project/ProjectManagement/isNameExistis`, //项目名称是否存在 isNameExistis: `${host}/project/ProjectManagement/isNameExistis`, //项目名称是否存在
QueryPfdInformation: `${host}/judgment/pointOfJudgement/queryPfdInformation`, //判分点详细信息 QueryPfdInformation: `${host}/judgment/pointOfJudgement/queryPfdInformation`, //判分点详细信息
queryUserIds:`${host}/liuwanr/userInfo/queryUserIds`,
// 学生管理 // 学生管理
addStudent: `${host}/evaluation/tms/student/addStudent`, addStudent: `${host}/evaluation/tms/student/addStudent`,

Loading…
Cancel
Save