|
@@ -50,7 +50,7 @@
|
|
|
</div>
|
|
|
<div class="page-content-box">
|
|
|
<el-table class="table-box" v-loading="loading" border :data="violationList" @sort-change="handleSelectionChange" v-if="pageType==1">
|
|
|
- <el-table-column label="姓名" align="left" prop="userName" />
|
|
|
+ <el-table-column label="姓名" align="left" prop="joinUserName" />
|
|
|
<el-table-column label="学号" align="left" prop="stuNo" />
|
|
|
<el-table-column label="学院" align="left" prop="deptName" />
|
|
|
<el-table-column label="违规次数" align="left" sortable="custom" prop="violationNum" />
|
|
@@ -131,39 +131,39 @@
|
|
|
<el-option
|
|
|
v-for="item in optionsUser"
|
|
|
:key="item.userId"
|
|
|
- :label="item.nickName"
|
|
|
+ :label="item.userName"
|
|
|
:value="item.userId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="学号:" style="width:600px;">
|
|
|
- <el-input v-model="form.stuNo" :disabled="true" placeholder="请选择学员"/>
|
|
|
+ <el-input v-model="form.stuNo" :disabled="true" placeholder="请选择学号"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="学院:" style="width:600px;">
|
|
|
- <el-input v-model="form.deptName" :disabled="true" placeholder="请选择学员" />
|
|
|
+ <el-input v-model="form.deptName" :disabled="true" placeholder="请选择学院" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="实验室" prop="laboratoryId">
|
|
|
- <el-select v-model="form.laboratoryId" style="width:480px;" placeholder="请选择实验室"
|
|
|
+ <el-select v-model="form.subjectId" style="width:480px;" placeholder="请选择实验室"
|
|
|
@change="subjectChange">
|
|
|
<el-option
|
|
|
v-for="item in subjectOptions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
+ :key="item.subId"
|
|
|
+ :label="item.subName"
|
|
|
+ :value="item.subId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="选择违规项" prop="reason">
|
|
|
- <el-select v-model="form.reason" style="width:480px;" placeholder="请选择违规项">
|
|
|
+ <el-form-item label="选择违规项" prop="reasonId">
|
|
|
+ <el-select v-model="form.reasonId" style="width:480px;" placeholder="请选择违规项" @change="reasonChange">
|
|
|
<el-option
|
|
|
v-for="item in violationSiteTypeList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.violationName"
|
|
|
- :value="item.id">
|
|
|
+ :key="item.itemId"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.itemId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="违规原因:" prop="violationReasons" style="width:600px;" v-if="form.reason==-1">
|
|
|
+ <el-form-item label="违规原因:" prop="violationReasons" style="width:600px;" v-if="form.reasonId==-1">
|
|
|
<el-input
|
|
|
v-model="form.violationReasons"
|
|
|
placeholder="请输入违规原因"
|
|
@@ -171,7 +171,7 @@
|
|
|
>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="扣除信用分值:" prop="deductionVal" style="width:600px;" v-if="form.reason==-1">
|
|
|
+ <el-form-item label="扣除信用分值:" prop="deductionVal" style="width:600px;" v-if="form.reasonId==-1">
|
|
|
<el-input
|
|
|
v-model="form.deductionVal"
|
|
|
placeholder="请输入"
|
|
@@ -376,11 +376,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { delNegivelist,delBlacklist,blackAdd,listViolation,
|
|
|
- getViolation, delViolation, addViolation, updateViolation,joinBlackList,getSubjectDictByViolation,
|
|
|
- violationSiteType ,addViolationHistory,getIntegralMatchingRules,addBlacklist } from "@/api/creditViolation/index";
|
|
|
- import { selectListUser } from "@/api/commonality/permission";
|
|
|
- import { listDepartments } from "@/api/commonality/noPermission";
|
|
|
+ import { delNegivelist,delBlacklist,blackAdd,examViolationList,
|
|
|
+ getViolation, delViolation, addViolation, updateViolation,joinBlackList,
|
|
|
+ violationSiteType ,examViolationAdd,getIntegralMatchingRules,addBlacklist } from "@/api/creditViolation/index";
|
|
|
+ import {selectListUser, getDeptDropList, systemUserList} from "@/api/commonality/permission";
|
|
|
+ import { listDepartments,getDicts,laboratorySubRelInfoList} from "@/api/commonality/noPermission";
|
|
|
import violationInfo from "./violationInfo.vue";
|
|
|
export default {
|
|
|
name: "Violation",
|
|
@@ -504,7 +504,7 @@ export default {
|
|
|
{required: true, message: '请输入姓名', trigger: 'blur'},
|
|
|
{ required: true, message: "请输入姓名", validator: this.spaceJudgment, trigger: "blur" }
|
|
|
],
|
|
|
- laboratoryId:[
|
|
|
+ subjectId:[
|
|
|
{required: true, message: '请选择实验室', trigger: 'blur'}
|
|
|
],
|
|
|
reason:[
|
|
@@ -683,9 +683,9 @@ export default {
|
|
|
/** 查询违规记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listViolation(this.queryParams).then(response => {
|
|
|
- this.violationList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
+ examViolationList(this.queryParams).then(response => {
|
|
|
+ this.violationList = response.data.records;
|
|
|
+ this.total = response.data.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
@@ -814,7 +814,7 @@ export default {
|
|
|
userId:"",
|
|
|
userName:"",
|
|
|
deptName:"",
|
|
|
- reason:"",
|
|
|
+ reasonId:"",
|
|
|
checkList:[],
|
|
|
checkListTwo:[],
|
|
|
learnStatusType:false,
|
|
@@ -832,20 +832,20 @@ export default {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
let obj = {
|
|
|
- userId:this.form.userId,
|
|
|
deptId:this.form.deptId,
|
|
|
- userName:this.form.nickName,
|
|
|
- stuNo:this.form.stuNo,
|
|
|
deptName:this.form.deptName,
|
|
|
- laboratoryId:this.form.laboratoryId,
|
|
|
- reason:this.form.reason,
|
|
|
+ joinUserId:this.form.joinUserId,
|
|
|
+ joinUserName:this.form.joinUserName,
|
|
|
+ subjectId:this.form.subjectId,
|
|
|
+ reasonId:this.form.reasonId,
|
|
|
+ violationContent:this.form.violationContent,
|
|
|
deductionVal:this.form.deductionVal,
|
|
|
handleDay:this.form.handleDay,
|
|
|
violationReasons:this.form.violationReasons,
|
|
|
};
|
|
|
for(let i=0;i<self.subjectOptions.length;i++){
|
|
|
- if(self.form.laboratoryId == self.subjectOptions[i].id){
|
|
|
- obj.laboratoryName = self.subjectOptions[i].name
|
|
|
+ if(self.form.subjectId == self.subjectOptions[i].subId){
|
|
|
+ obj.subjectName = self.subjectOptions[i].subName
|
|
|
}
|
|
|
}
|
|
|
//处理二级多选--警告/约谈
|
|
@@ -901,7 +901,7 @@ export default {
|
|
|
obj.numberTopics = "";
|
|
|
obj.numberAccuracy = "";
|
|
|
}
|
|
|
- addViolationHistory(obj).then(response => {
|
|
|
+ examViolationAdd(obj).then(response => {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -914,12 +914,13 @@ export default {
|
|
|
let self = this;
|
|
|
for(let i=0;i<self.optionsUser.length;i++){
|
|
|
if(data == self.optionsUser[i].userId){
|
|
|
- this.form.stuNo = self.optionsUser[i].userName;
|
|
|
+ this.form.stuNo = self.optionsUser[i].account;
|
|
|
this.form.deptId = self.optionsUser[i].deptId;
|
|
|
this.form.deptName = self.optionsUser[i].deptName;
|
|
|
- this.form.nickName = self.optionsUser[i].nickName;
|
|
|
- this.form.laboratoryId = '';
|
|
|
- this.getSubjectDictByViolation();
|
|
|
+ this.form.joinUserId = self.optionsUser[i].userId;
|
|
|
+ this.form.joinUserName = self.optionsUser[i].userName;
|
|
|
+ this.form.subjectId = '';
|
|
|
+ this.laboratorySubRelInfoList();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -973,11 +974,12 @@ export default {
|
|
|
if (query !== '' && query.length>1) {
|
|
|
this.loading = true;
|
|
|
let obj = {
|
|
|
- nickName : query,
|
|
|
- userType: 22,
|
|
|
+ userName : query,
|
|
|
+ userType: 2,
|
|
|
+ pageSize: -1,
|
|
|
};
|
|
|
- selectListUser(obj).then(response => {
|
|
|
- this.optionsUser = response.data;
|
|
|
+ systemUserList(obj).then(response => {
|
|
|
+ this.optionsUser = response.data.records;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
} else {
|
|
@@ -986,34 +988,44 @@ export default {
|
|
|
},
|
|
|
/** 查询学院列表 */
|
|
|
getDeptList() {
|
|
|
- listDepartments().then(response => {
|
|
|
- this.$set(this, 'deptOptions', response.data)
|
|
|
+ getDeptDropList({deptType:1}).then(response => {
|
|
|
+ this.$set(this,'deptOptions',response.data);
|
|
|
});
|
|
|
},
|
|
|
//查询实验室列表
|
|
|
- getSubjectDictByViolation(){
|
|
|
+ laboratorySubRelInfoList(){
|
|
|
if(!this.form.deptId){
|
|
|
this.msgError('请先选择人员');
|
|
|
return
|
|
|
}
|
|
|
let obj = {
|
|
|
- deptId:this.form.deptId
|
|
|
+ deptIds:[this.form.deptId],
|
|
|
+ subName:'',
|
|
|
}
|
|
|
- getSubjectDictByViolation(obj).then(response => {
|
|
|
- this.subjectOptions = response.data;
|
|
|
+ laboratorySubRelInfoList(obj).then(response => {
|
|
|
+ this.subjectOptions = response.data.records;
|
|
|
});
|
|
|
},
|
|
|
//选中实验室
|
|
|
subjectChange(e){
|
|
|
console.log("e",e)
|
|
|
- this.$set(this.form,'laboratoryId',e);
|
|
|
+ this.$set(this.form,'subjectId',e);
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
|
+ //选择违规项
|
|
|
+ reasonChange(e){
|
|
|
+ let self=this;
|
|
|
+ for(let i=0;i<self.violationSiteTypeList.length;i++){
|
|
|
+ if(e == self.violationSiteTypeList[i].itemId){
|
|
|
+ self.form.violationContent = self.violationSiteTypeList[i].label
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//查询实验室列表
|
|
|
violationSiteType(){
|
|
|
- violationSiteType({}).then(response => {
|
|
|
+ this.getDicts("lab_violation_rules").then(response => {
|
|
|
this.violationSiteTypeList = response.data;
|
|
|
- this.violationSiteTypeList.push({"id":"-1","violationName":"其他"});
|
|
|
+ this.violationSiteTypeList.push({"itemId":"-1","label":"其他"});
|
|
|
});
|
|
|
},
|
|
|
}
|