dev_2022-05-11
yujialong 4 years ago
parent f32d0f1491
commit 7484fc9821
  1. 5
      src/components/page/AddProject.vue
  2. 66
      src/components/page/Staff.vue

@ -317,6 +317,7 @@
isDetail: Boolean(this.$route.query.show), isDetail: Boolean(this.$route.query.show),
roleId: this.$store.state.userRoleId.split('_').join(), roleId: this.$store.state.userRoleId.split('_').join(),
newroleArray: [], newroleArray: [],
userLoginId: this.$store.state.userLoginId,
userId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId,
judgementpointsquery: "", // judgementpointsquery: "", //
flag01: false, // flag01: false, //
@ -869,7 +870,7 @@
if(systemId == 2 || systemId == 3){ if(systemId == 2 || systemId == 3){
let data = { let data = {
systemId, systemId,
userId: this.userId, userId: this.userLoginId,
pageNum: 1, pageNum: 1,
pageSize: 100, pageSize: 100,
judgmentPointsName: this.judgementpointsquery judgmentPointsName: this.judgementpointsquery
@ -891,7 +892,7 @@
this.$get(this.api.queryUserIds).then(res => { this.$get(this.api.queryUserIds).then(res => {
this.$get(this.api.QueryPointOfJudgement, { this.$get(this.api.QueryPointOfJudgement, {
systemId: this.systemId, systemId: this.systemId,
userId: this.userId, userId: this.userLoginId,
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
queryName: this.judgementpointsquery, queryName: this.judgementpointsquery,

@ -72,7 +72,7 @@
<el-checkbox-group v-model="teacherForm.roleValue"> <el-checkbox-group v-model="teacherForm.roleValue">
<el-checkbox label="老师"></el-checkbox> <el-checkbox label="老师"></el-checkbox>
<el-checkbox label="管理员"></el-checkbox> <el-checkbox label="管理员"></el-checkbox>
<el-checkbox label="学生" disabled></el-checkbox> <!-- <el-checkbox label="学生" disabled></el-checkbox> -->
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识"> <el-form-item prop="uniqueIdentificationAccount" label="唯一标识">
@ -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,
@ -571,31 +574,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 = { roleId: 13,
workNumber: this.encodeString(this.teacherForm.managerWorkNumber), schoolId: this.teacherForm.schoolId
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 res = await this.$get(this.api.queryWorkNumberIsExist, data); let data1 = {
if(JSON.stringify(res.message) != '{}'){ workNumber,
this.$message.warning(msg); roleId: 14,
type == 2 ? (this.managerNumberNoAdd = false) : (this.teacherNumberNoAdd = false) schoolId: this.teacherForm.schoolId
}else{ }
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()); 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){
@ -613,6 +630,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) => {

Loading…
Cancel
Save