master
yujialong 4 years ago
parent 4363089165
commit 8b292d53d5
  1. 42
      src/components/page/AddProject.vue
  2. 46
      src/components/page/PersonalCenter.vue
  3. 54
      src/components/page/ShowExperiment.vue
  4. 64
      src/components/page/Staff.vue
  5. 5
      src/utils/api.js

@ -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) {
//

@ -122,7 +122,7 @@
</div>
<div class="item">
<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 class="line">
@ -281,35 +281,35 @@
</div>
<div class="item">
<span>手机号</span>
<div class="btns">
{{personalInformation.phone}}
<el-button v-if="personalInformation.phone" style="margin-left: 5px;width:100%;" size="small" @click="bindPhone">更换</el-button>
<el-button v-else style="width:100%;" size="small" @click="bindPhone">绑定</el-button>
<div class="btns flex-between">
<span>{{personalInformation.phone}}</span>
<el-button v-if="personalInformation.phone" type="primary" size="small" @click="bindPhone">更换</el-button>
<el-button v-else type="primary" size="small" @click="bindPhone">绑定</el-button>
</div>
</div>
</div>
<div class="line">
<div class="item">
<span>邮箱</span>
<div class="btns">
{{personalInformation.email}}
<el-button v-if="personalInformation.email" style="margin-left: 5px;width:100%;" size="small" @click="bindEmail">更换</el-button>
<el-button v-else style="width:100%;" size="small" @click="bindEmail">绑定</el-button>
<div class="btns flex-between">
<span>{{personalInformation.email}}</span>
<el-button v-if="personalInformation.email" type="primary" size="small" @click="bindEmail">更换</el-button>
<el-button v-else type="primary" size="small" @click="bindEmail">绑定</el-button>
</div>
</div>
<div class="item">
<!-- <div class="item">
<span>微信</span>
<input id="weChat" class="weChat" disabled placeholder="微信" type="text" v-model="personalInformation.weChatID"/>
</div>
</div>
<div class="line">
<div class="item">
<span>密码</span>
<div class="btns">
<el-button size="small" style="width:100%;" @click="bindPassword">更换密码</el-button>
</div> -->
<div class="line">
<div class="item">
<span>密码</span>
<div class="btns flex-end-content">
<el-button type="primary" size="small" @click="bindPassword">更换</el-button>
</div>
</div>
<!-- <div class="item"></div> -->
</div>
<div class="item"></div>
</div>
</div>
</div>
@ -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{

@ -103,19 +103,14 @@
<pre v-html="scope.row.userAnswers"></pre>
</template>
</el-table-column>
<el-table-column prop="referenceAnswer" label="参考答案" align="center">
</el-table-column>
<el-table-column prop="referenceAnswer" label="参考答案" align="center"></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">
<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>
</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>
</div>
@ -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(){

@ -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) => {

@ -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`,

Loading…
Cancel
Save