|
@@ -9,9 +9,9 @@
|
|
|
</div>
|
|
|
<el-form class="form-content scrollbar-box" ref="form" :model="form" :rules="rules" v-if="pageType">
|
|
|
<div style="display: flex">
|
|
|
- <el-form-item label="信用分合格分值:" prop="passMark" label-width="160px">
|
|
|
+ <el-form-item label="信用分合格分值:" prop="thresholdQualify" label-width="160px">
|
|
|
<el-input
|
|
|
- v-model="form.passMark"
|
|
|
+ v-model="form.thresholdQualify"
|
|
|
placeholder="请输入信用分合格分值"
|
|
|
maxLength="5"
|
|
|
clearable
|
|
@@ -19,15 +19,9 @@
|
|
|
<template slot="append">分</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="信用分合格分值获取条件:" prop="gainSafeCertList" label-width="230px">
|
|
|
- <el-checkbox-group v-model="form.gainSafeCertList" style="width:370px;display: flex;margin-top:2px;">
|
|
|
- <el-checkbox label="gainSafeCert" style="color:#999;">获得安全准入证书</el-checkbox>
|
|
|
- <el-checkbox label="gainSubSafeCert" style="color:#999;">获得实验室安全准入资格</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="黑名单分值:" prop="blackScore" label-width="120px">
|
|
|
+ <el-form-item label="黑名单分值:" prop="thresholdBlacklist" label-width="120px">
|
|
|
<el-input
|
|
|
- v-model="form.blackScore"
|
|
|
+ v-model="form.thresholdBlacklist"
|
|
|
placeholder="请输入黑名单分值"
|
|
|
maxLength="5"
|
|
|
clearable
|
|
@@ -37,17 +31,17 @@
|
|
|
<span class="annotation-span" style="margin-left:20px;">信用分小于等于设定的分值即进入黑名单</span>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
- <el-form-item label="信用分值段设置:" prop="passMark" label-width="160px" style="margin-bottom:10px;">
|
|
|
+ <el-form-item label="信用分值段设置:" prop="thresholdQualify" label-width="160px" style="margin-bottom:10px;">
|
|
|
<span class="annotation-span">可设置多个分值段,系统根据设置自动处理</span>
|
|
|
</el-form-item>
|
|
|
<div class="max-add-for-box">
|
|
|
- <div class="max-add-for-box-min" v-for="(item,index) in form.configDetailList">
|
|
|
+ <div class="max-add-for-box-min" v-for="(item,index) in form.ranges">
|
|
|
<p class="position-del-p el-icon-circle-close" v-if="index!=0" @click="delObj(index)"></p>
|
|
|
<div class="for-interval-flex-box">
|
|
|
<p class="for-interval-title-p min-p-color">信用分值区间</p>
|
|
|
- <el-form-item label="" :rules="rules.beginScore" :prop="'configDetailList.'+ index +'.beginScore'" style="margin-bottom:15px;">
|
|
|
+ <el-form-item label="" :rules="rules.start" :prop="'ranges.'+ index +'.start'" style="margin-bottom:15px;">
|
|
|
<el-input
|
|
|
- v-model="item.beginScore"
|
|
|
+ v-model="item.start"
|
|
|
placeholder="请输入最小值"
|
|
|
maxLength="5"
|
|
|
clearable
|
|
@@ -56,9 +50,9 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<p class="for-interval-p">~</p>
|
|
|
- <el-form-item label="" :rules="rules.endScore" :prop="'configDetailList.'+ index +'.endScore'" style="margin-bottom:15px;">
|
|
|
+ <el-form-item label="" :rules="rules.end" :prop="'ranges.'+ index +'.end'" style="margin-bottom:15px;">
|
|
|
<el-input
|
|
|
- v-model="item.endScore"
|
|
|
+ v-model="item.end"
|
|
|
placeholder="请输入最大值"
|
|
|
maxLength="5"
|
|
|
clearable
|
|
@@ -68,38 +62,26 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="for-check-max-box">
|
|
|
- <el-form-item label="" :rules="rules.checkListTwo" :prop="'configDetailList.'+ index +'.checkListTwo'">
|
|
|
+ <el-form-item label="" :rules="rules.checkListTwo" :prop="'ranges.'+ index +'.checkListTwo'">
|
|
|
<p class="min-p-color" style="margin-bottom:10px;">处理方式</p>
|
|
|
<el-form-item label="">
|
|
|
<el-checkbox-group v-model="item.checkList" style="display: inline-block;width:270px;">
|
|
|
- <el-checkbox label="warningStatus">警告<span style="color:#999;">(系统推送警告消息)</span></el-checkbox>
|
|
|
+ <el-checkbox label="warn">警告<span style="color:#999;">(系统推送警告消息)</span></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<el-checkbox-group v-model="item.checkList" style="display: inline-block;width:270px;">
|
|
|
- <el-checkbox label="interviewStatus">约谈<span style="color:#999;">(线下约谈)</span></el-checkbox>
|
|
|
+ <el-checkbox label="meet">约谈<span style="color:#999;">(线下约谈)</span></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<el-checkbox-group v-model="item.checkListTwo" style="display: inline-block;width:270px;">
|
|
|
- <el-checkbox label="testStatus">考试</el-checkbox>
|
|
|
+ <el-checkbox label="exam">考试</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<div style="display: flex;">
|
|
|
<div class="for-check-box" style="min-width:210px;max-width:520px;">
|
|
|
<el-checkbox-group v-model="item.checkListTwo" @change="(data)=>checkClickOne(data,item,'xx')" style="height:40px;line-height:40px;width:80px;">
|
|
|
- <el-checkbox label="learnStatus">学习</el-checkbox>
|
|
|
+ <el-checkbox label="learn">学习</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<p v-if="item.learnStatusType">学习时长:</p>
|
|
|
- <el-form-item label="" :rules="rules.learnHour" :prop="'configDetailList.'+ index +'.learnHour'" v-if="item.learnStatusType">
|
|
|
- <el-input
|
|
|
- style="width:150px;"
|
|
|
- v-model="item.learnHour"
|
|
|
- placeholder="请输入"
|
|
|
- maxLength="5"
|
|
|
- clearable
|
|
|
- size="small">
|
|
|
- <template slot="append">时</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <p style="width:30px;"></p>
|
|
|
- <el-form-item label="" :rules="rules.learnMinute" :prop="'configDetailList.'+ index +'.learnMinute'" v-if="item.learnStatusType">
|
|
|
+ <el-form-item label="" :rules="rules.learnMinute" :prop="'ranges.'+ index +'.learnMinute'" v-if="item.learnStatusType">
|
|
|
<el-input
|
|
|
style="width:150px;"
|
|
|
v-model="item.learnMinute"
|
|
@@ -113,10 +95,10 @@
|
|
|
</div>
|
|
|
<div class="for-check-box" style="margin-left:60px;">
|
|
|
<el-checkbox-group v-model="item.checkListTwo" @change="(data)=>checkClickTwo(data,item,'zt')" style="height:40px;line-height:40px;width:80px;">
|
|
|
- <el-checkbox label="practiceStatus">做题</el-checkbox>
|
|
|
+ <el-checkbox label="exercise">做题</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<p v-if="item.practiceStatusType">题目数量:</p>
|
|
|
- <el-form-item label="" :rules="rules.numberTopics" :prop="'configDetailList.'+ index +'.numberTopics'" v-if="item.practiceStatusType">
|
|
|
+ <el-form-item label="" :rules="rules.numberTopics" :prop="'ranges.'+ index +'.numberTopics'" v-if="item.practiceStatusType">
|
|
|
<el-input
|
|
|
style="width:150px;"
|
|
|
v-model="item.numberTopics"
|
|
@@ -127,25 +109,13 @@
|
|
|
<template slot="append">道</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <p style="width:87px;text-align: right;" v-if="item.practiceStatusType">正确率:</p>
|
|
|
- <el-form-item label="" :rules="rules.numberAccuracy" :prop="'configDetailList.'+ index +'.numberAccuracy'" v-if="item.practiceStatusType">
|
|
|
- <el-input
|
|
|
- style="width:150px;"
|
|
|
- v-model="item.numberAccuracy"
|
|
|
- placeholder="请输入"
|
|
|
- maxLength="5"
|
|
|
- clearable
|
|
|
- size="small">
|
|
|
- <template slot="append">%</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" :rules="rules.handleDay" :prop="'configDetailList.'+ index +'.handleDay'" style="margin-bottom:0;">
|
|
|
+ <el-form-item label="" :rules="rules.expires" :prop="'ranges.'+ index +'.expires'" style="margin-bottom:0;">
|
|
|
<p class="interval-title-p min-p-color">处理天数时限</p>
|
|
|
<el-input
|
|
|
- v-model="item.handleDay"
|
|
|
+ v-model="item.expires"
|
|
|
placeholder="请输入"
|
|
|
maxLength="5"
|
|
|
clearable
|
|
@@ -162,6 +132,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { examMarkConfigList, examMarkConfigAdd, examMarkConfigEdit } from "@/api/creditViolation/index";
|
|
|
+import { creditCreditConfigQuery,creditCreditConfigAdd } from "@/api/creditViolation/newIndex";
|
|
|
|
|
|
export default {
|
|
|
name: "Markconfig",
|
|
@@ -175,7 +146,7 @@ export default {
|
|
|
form:{},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- passMark: [
|
|
|
+ thresholdQualify: [
|
|
|
{ required: true, message: "请输入信用分合格分值", trigger: "blur" },
|
|
|
{ required: true, message: "请输入信用分合格分值", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
@@ -183,17 +154,17 @@ export default {
|
|
|
gainSafeCertList: [
|
|
|
{ required: true, message: "请选择信用分合格分值获取条件", trigger: "blur" }
|
|
|
],
|
|
|
- blackScore: [
|
|
|
+ thresholdBlacklist: [
|
|
|
{ required: true, message: "请输入黑名单分值", trigger: "blur" },
|
|
|
{ required: true, message: "请输入黑名单分值", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
|
],
|
|
|
- beginScore: [
|
|
|
+ start: [
|
|
|
{ required: true, message: "请输入最小值", trigger: "blur" },
|
|
|
{ required: true, message: "请输入最小值", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
|
],
|
|
|
- endScore: [
|
|
|
+ end: [
|
|
|
{ required: true, message: "请输入最大值", trigger: "blur" },
|
|
|
{ required: true, message: "请输入最大值", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
@@ -221,7 +192,7 @@ export default {
|
|
|
{ required: true, message: "请输入百分比", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
|
],
|
|
|
- handleDay: [
|
|
|
+ expires: [
|
|
|
{ required: true, message: "请输入处理天数时限", trigger: "blur" },
|
|
|
{ required: true, message: "请输入处理天数时限", validator: this.spaceJudgment, trigger: "blur" },
|
|
|
{ required: true, message: "只能输入数字", validator: this.isNum, trigger: "blur" },
|
|
@@ -238,7 +209,7 @@ export default {
|
|
|
if(name == 'xx'){
|
|
|
let num = 0;
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
- if('learnStatus' == data[i]){
|
|
|
+ if('learn' == data[i]){
|
|
|
num++
|
|
|
}
|
|
|
}
|
|
@@ -250,7 +221,7 @@ export default {
|
|
|
if(name == 'zt'){
|
|
|
let num = 0;
|
|
|
for(let i=0;i<data.length;i++){
|
|
|
- if('practiceStatus' == data[i]){
|
|
|
+ if('exercise' == data[i]){
|
|
|
num++
|
|
|
}
|
|
|
}
|
|
@@ -260,148 +231,102 @@ export default {
|
|
|
//添加分值段
|
|
|
addObj(){
|
|
|
let obj = {
|
|
|
- beginScore:"",//最小信用分
|
|
|
- endScore:"",//最大信用分
|
|
|
+ start:"",//最小信用分
|
|
|
+ end:"",//最大信用分
|
|
|
checkList:[],//处理方式
|
|
|
checkListTwo:[],//处理方式
|
|
|
- warningStatus:"",//警告
|
|
|
- interviewStatus:"",//约谈
|
|
|
- testStatus:"",//考试
|
|
|
- learnStatus:"",//学习
|
|
|
+ warn:"",//警告
|
|
|
+ meet:"",//约谈
|
|
|
+ exam:"",//考试
|
|
|
+ learn:"",//学习
|
|
|
learnStatusType:false,
|
|
|
learnHour:"",//学习小时
|
|
|
learnMinute:"",//学习分钟
|
|
|
- practiceStatus:"",//做题
|
|
|
+ exercise:"",//做题
|
|
|
practiceStatusType:false,
|
|
|
numberTopics:"",//做题数量
|
|
|
numberAccuracy:"",//做题准确率
|
|
|
- handleDay:"",//天数
|
|
|
+ expires:"",//天数
|
|
|
};
|
|
|
- this.form.configDetailList.push(obj);
|
|
|
+ this.form.ranges.push(obj);
|
|
|
},
|
|
|
//删除分段数据
|
|
|
delObj(index){
|
|
|
- this.form.configDetailList.splice(index,1);
|
|
|
+ this.form.ranges.splice(index,1);
|
|
|
},
|
|
|
/** 查询数据 */
|
|
|
getList() {
|
|
|
this.pageType = false;
|
|
|
- examMarkConfigList({page:"1",pageSize:"1"}).then( response => {
|
|
|
- if(response.data.records[0]){
|
|
|
- //修改
|
|
|
- let newObj = JSON.parse(JSON.stringify(response.data.records[0]));
|
|
|
+ creditCreditConfigQuery().then( response => {
|
|
|
+ let mod = {
|
|
|
+ thresholdQualify:response.data.thresholdQualify,
|
|
|
+ thresholdBlacklist:response.data.thresholdBlacklist,
|
|
|
+ ranges:[],
|
|
|
+ }
|
|
|
+ for(let i=0;i<response.data.ranges.length;i++){
|
|
|
let obj = {
|
|
|
- id:newObj.id,
|
|
|
- passMark:newObj.passMark,
|
|
|
- blackScore:newObj.blackScore,
|
|
|
- gainSafeCertList:[],
|
|
|
- configDetailList:[],
|
|
|
- };
|
|
|
- //处理一级数据
|
|
|
- if(newObj.gainSafeCert){
|
|
|
- obj.gainSafeCert = true;
|
|
|
- obj.gainSafeCertList.push('gainSafeCert');
|
|
|
- }else{
|
|
|
- obj.gainSafeCert = false
|
|
|
+ start:response.data.ranges[i].start,
|
|
|
+ end:response.data.ranges[i].end,
|
|
|
+ expires:response.data.ranges[i].expires,
|
|
|
+ checkList:[],
|
|
|
+ checkListTwo:[],
|
|
|
}
|
|
|
- if(newObj.gainSubSafeCert){
|
|
|
- obj.gainSubSafeCert = true;
|
|
|
- obj.gainSafeCertList.push('gainSubSafeCert');
|
|
|
- }else{
|
|
|
- obj.gainSubSafeCert = false
|
|
|
- }
|
|
|
- //处理二级数据
|
|
|
- for(let i=0;i<newObj.configDetailList.length;i++){
|
|
|
- let minObj = {
|
|
|
- beginScore:newObj.configDetailList[i].beginScore,
|
|
|
- endScore:newObj.configDetailList[i].endScore,
|
|
|
- handleDay:newObj.configDetailList[i].handleDay,
|
|
|
- checkList:[],
|
|
|
- checkListTwo:[],
|
|
|
- };
|
|
|
- //警告
|
|
|
- if(newObj.configDetailList[i].warningStatus){
|
|
|
- minObj.warningStatus = true;
|
|
|
- minObj.checkList.push('warningStatus');
|
|
|
- }else{
|
|
|
- minObj.warningStatus = false;
|
|
|
+ let learn = false;
|
|
|
+ let exercise = false;
|
|
|
+ for(let o=0;o<response.data.ranges[i].means.length;o++){
|
|
|
+ if(response.data.ranges[i].means[o].meansCode == 'learn'){
|
|
|
+ learn = true;
|
|
|
+ }else if(response.data.ranges[i].means[o].meansCode == 'exercise'){
|
|
|
+ exercise = true;
|
|
|
}
|
|
|
- //约谈
|
|
|
- if(newObj.configDetailList[i].interviewStatus){
|
|
|
- minObj.interviewStatus = true;
|
|
|
- minObj.checkList.push('interviewStatus');
|
|
|
- }else{
|
|
|
- minObj.interviewStatus = false;
|
|
|
- }
|
|
|
- //考试
|
|
|
- if(newObj.configDetailList[i].testStatus){
|
|
|
- minObj.testStatus = true;
|
|
|
- minObj.checkListTwo.push('testStatus');
|
|
|
- }else{
|
|
|
- minObj.testStatus = false;
|
|
|
- }
|
|
|
- //学习
|
|
|
- if(newObj.configDetailList[i].learnStatus){
|
|
|
- minObj.learnStatus = true;
|
|
|
- minObj.learnHour = newObj.configDetailList[i].learnHour;
|
|
|
- minObj.learnMinute = newObj.configDetailList[i].learnMinute;
|
|
|
- minObj.learnStatusType = true;
|
|
|
- minObj.checkListTwo.push('learnStatus');
|
|
|
- }else{
|
|
|
- minObj.learnStatus = false;
|
|
|
- minObj.learnHour = "";
|
|
|
- minObj.learnMinute = "";
|
|
|
- minObj.learnStatusType = false;
|
|
|
- }
|
|
|
- //做题
|
|
|
- if(newObj.configDetailList[i].practiceStatus){
|
|
|
- minObj.practiceStatus = true;
|
|
|
- minObj.numberTopics = newObj.configDetailList[i].numberTopics;
|
|
|
- minObj.numberAccuracy = newObj.configDetailList[i].numberAccuracy;
|
|
|
- minObj.practiceStatusType = true;
|
|
|
- minObj.checkListTwo.push('practiceStatus');
|
|
|
- }else{
|
|
|
- minObj.practiceStatus = false;
|
|
|
- minObj.numberTopics = "";
|
|
|
- minObj.numberAccuracy = "";
|
|
|
- minObj.practiceStatusType = false;
|
|
|
- }
|
|
|
- obj.configDetailList.push(minObj);
|
|
|
}
|
|
|
- this.$set(this,'form',obj);
|
|
|
- this.pageType = true;
|
|
|
- }else{
|
|
|
- //新提交
|
|
|
- let obj = {
|
|
|
- passMark:"",//信用分合格值
|
|
|
- gainSafeCertList:[],//多选数组库
|
|
|
- gainSafeCert:"",//获得安全准入证书
|
|
|
- gainSubSafeCert:"",//获得实验室安全准入资格
|
|
|
- blackScore:"",//黑名单分值
|
|
|
- configDetailList:[
|
|
|
- {
|
|
|
- beginScore:"",//最小信用分
|
|
|
- endScore:"",//最大信用分
|
|
|
- checkList:[],//处理方式
|
|
|
- checkListTwo:[],//处理方式
|
|
|
- warningStatus:"",//警告
|
|
|
- interviewStatus:"",//约谈
|
|
|
- testStatus:"",//考试
|
|
|
- learnStatus:"",//学习
|
|
|
- learnStatusType:false,
|
|
|
- learnHour:"",//学习小时
|
|
|
- learnMinute:"",//学习分钟
|
|
|
- practiceStatus:"",//做题
|
|
|
- practiceStatusType:false,
|
|
|
- numberTopics:"",//做题数量
|
|
|
- numberAccuracy:"",//做题准确率
|
|
|
- handleDay:"",//天数
|
|
|
+ for(let o=0;o<response.data.ranges[i].means.length;o++){
|
|
|
+ if(response.data.ranges[i].means[o].meansCode == 'warn'){
|
|
|
+ if(response.data.ranges[i].means[o].configValue == 1){
|
|
|
+ obj.checkList.push('warn')
|
|
|
}
|
|
|
- ],
|
|
|
- };
|
|
|
- this.$set(this,'form',obj);
|
|
|
- this.pageType = true;
|
|
|
+ }else if(response.data.ranges[i].means[o].meansCode == 'meet'){
|
|
|
+ if(response.data.ranges[i].means[o].configValue == 1){
|
|
|
+ obj.checkList.push('meet')
|
|
|
+ }
|
|
|
+ }else if(response.data.ranges[i].means[o].meansCode == 'exam'){
|
|
|
+ if(response.data.ranges[i].means[o].configValue == 1){
|
|
|
+ obj.checkListTwo.push('exam')
|
|
|
+ }
|
|
|
+ }else if(response.data.ranges[i].means[o].meansCode == 'learn'){
|
|
|
+ if(learn){
|
|
|
+ if(response.data.ranges[i].means[o].configValue != 0){
|
|
|
+ obj.checkListTwo.push('learn')
|
|
|
+ obj.learnMinute = response.data.ranges[i].means[o].configValue;
|
|
|
+ obj.learnStatusType = true;
|
|
|
+ }else {
|
|
|
+ obj.learnMinute = "";
|
|
|
+ obj.learnStatusType = false;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ obj.learnMinute = "";
|
|
|
+ obj.learnStatusType = false;
|
|
|
+ }
|
|
|
+ }else if(response.data.ranges[i].means[o].meansCode == 'exercise'){
|
|
|
+ if(exercise){
|
|
|
+ if(response.data.ranges[i].means[o].configValue != 0){
|
|
|
+ obj.checkListTwo.push('exercise')
|
|
|
+ obj.numberTopics = response.data.ranges[i].means[o].configValue;
|
|
|
+ obj.practiceStatusType = true;
|
|
|
+ }else{
|
|
|
+ obj.numberTopics = "";
|
|
|
+ obj.practiceStatusType = false;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ obj.numberTopics = "";
|
|
|
+ obj.practiceStatusType = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ mod.ranges.push(obj);
|
|
|
}
|
|
|
+ this.$set(this,'form',mod);
|
|
|
+ this.pageType = true;
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -409,114 +334,112 @@ export default {
|
|
|
let self = this;
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- for(let i=0;i<self.form.configDetailList.length;i++){
|
|
|
- if(self.form.configDetailList[i].beginScore >= self.form.configDetailList[i].endScore){
|
|
|
+ for(let i=0;i<self.form.ranges.length;i++){
|
|
|
+ if(self.form.ranges[i].start >= self.form.ranges[i].end){
|
|
|
this.msgError('信用分值区间,最小值不能大于等于最大值')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
let newObj = JSON.parse(JSON.stringify(this.form));
|
|
|
- let obj = {
|
|
|
- passMark:newObj.passMark,
|
|
|
- blackScore:newObj.blackScore,
|
|
|
- configDetailList:[],
|
|
|
+ let mod = {
|
|
|
+ thresholdQualify:newObj.thresholdQualify,
|
|
|
+ thresholdBlacklist:newObj.thresholdBlacklist,
|
|
|
+ ranges:[],
|
|
|
};
|
|
|
- if(newObj.id){
|
|
|
- obj.id = newObj.id;
|
|
|
- }
|
|
|
- //处理一级多选
|
|
|
- let gainSafeCertNum = 0;
|
|
|
- let gainSubSafeCertNum = 0;
|
|
|
- for(let i=0;i<newObj.gainSafeCertList.length;i++){
|
|
|
- if(newObj.gainSafeCertList[i] == 'gainSafeCert'){
|
|
|
- gainSafeCertNum++
|
|
|
- }
|
|
|
- if(newObj.gainSafeCertList[i] == 'gainSubSafeCert'){
|
|
|
- gainSubSafeCertNum++
|
|
|
- }
|
|
|
- }
|
|
|
- if(gainSafeCertNum == 0){
|
|
|
- obj.gainSafeCert = false;
|
|
|
- }else{
|
|
|
- obj.gainSafeCert = true;
|
|
|
- }
|
|
|
- if(gainSubSafeCertNum == 0){
|
|
|
- obj.gainSubSafeCert = false;
|
|
|
- }else{
|
|
|
- obj.gainSubSafeCert = true;
|
|
|
- }
|
|
|
- //处理二级子项
|
|
|
- for(let i=0;i<newObj.configDetailList.length;i++){
|
|
|
- let minObj ={
|
|
|
- beginScore:newObj.configDetailList[i].beginScore,
|
|
|
- endScore:newObj.configDetailList[i].endScore,
|
|
|
- handleDay:newObj.configDetailList[i].handleDay,
|
|
|
+ for(let i=0;i<newObj.ranges.length;i++){
|
|
|
+ let obj = {
|
|
|
+ sort:i,
|
|
|
+ start:newObj.ranges[i].start,
|
|
|
+ end:newObj.ranges[i].end,
|
|
|
+ expires:newObj.ranges[i].expires,
|
|
|
+ means:[],
|
|
|
};
|
|
|
- //处理二级多选--警告/约谈
|
|
|
- let warningStatusNum = 0;
|
|
|
- let interviewStatusNum = 0;
|
|
|
- for(let o=0;o<newObj.configDetailList[i].checkList.length;o++){
|
|
|
- if(newObj.configDetailList[i].checkList[o] == 'warningStatus'){
|
|
|
- warningStatusNum++
|
|
|
+ let meet = false;
|
|
|
+ let warn = false;
|
|
|
+ let exam = false;
|
|
|
+ let learn = false;
|
|
|
+ let exercise = false;
|
|
|
+ for(let o=0;o<newObj.ranges[i].checkList.length;o++){
|
|
|
+ if(newObj.ranges[i].checkList[o] == 'warn'){
|
|
|
+ warn = true;
|
|
|
+ }else if(newObj.ranges[i].checkList[o] == 'meet'){
|
|
|
+ meet = true;
|
|
|
}
|
|
|
- if(newObj.configDetailList[i].checkList[o] == 'interviewStatus'){
|
|
|
- interviewStatusNum++
|
|
|
+ }
|
|
|
+ for(let o=0;o<newObj.ranges[i].checkListTwo.length;o++){
|
|
|
+ if(newObj.ranges[i].checkListTwo[o] == 'exam'){
|
|
|
+ exam = true;
|
|
|
+ }else if(newObj.ranges[i].checkListTwo[o] == 'learn'){
|
|
|
+ learn = true;
|
|
|
+ }else if(newObj.ranges[i].checkListTwo[o] == 'exercise'){
|
|
|
+ exercise = true;
|
|
|
}
|
|
|
}
|
|
|
- if(warningStatusNum == 0){
|
|
|
- minObj.warningStatus = false;
|
|
|
+ //警告
|
|
|
+ if(warn){
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'warn',
|
|
|
+ configValue:1
|
|
|
+ })
|
|
|
}else{
|
|
|
- minObj.warningStatus = true;
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'warn',
|
|
|
+ configValue:0
|
|
|
+ })
|
|
|
}
|
|
|
- if(interviewStatusNum == 0){
|
|
|
- minObj.interviewStatus = false;
|
|
|
+ //约谈
|
|
|
+ if(meet){
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'meet',
|
|
|
+ configValue:1
|
|
|
+ })
|
|
|
}else{
|
|
|
- minObj.interviewStatus = true;
|
|
|
- }
|
|
|
- //处理二级多选--考试
|
|
|
- let testStatusNum = 0;
|
|
|
- for(let o=0;o<newObj.configDetailList[i].checkListTwo.length;o++){
|
|
|
- if(newObj.configDetailList[i].checkListTwo[o] == 'testStatus'){
|
|
|
- testStatusNum++
|
|
|
- }
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'meet',
|
|
|
+ configValue:0
|
|
|
+ })
|
|
|
}
|
|
|
- if(testStatusNum == 0){
|
|
|
- minObj.testStatus = false;
|
|
|
+ //考试
|
|
|
+ if(exam){
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'exam',
|
|
|
+ configValue:1
|
|
|
+ })
|
|
|
}else{
|
|
|
- minObj.testStatus = true;
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'exam',
|
|
|
+ configValue:0
|
|
|
+ })
|
|
|
}
|
|
|
- //处理二级多选--学习
|
|
|
- if(newObj.configDetailList[i].learnStatusType){
|
|
|
- minObj.learnStatus = true;
|
|
|
- minObj.learnHour = newObj.configDetailList[i].learnHour;
|
|
|
- minObj.learnMinute = newObj.configDetailList[i].learnMinute;
|
|
|
+ //学习
|
|
|
+ if(learn){
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'learn',
|
|
|
+ configValue:newObj.ranges[i].learnMinute
|
|
|
+ })
|
|
|
}else{
|
|
|
- minObj.learnStatus = false;
|
|
|
- minObj.learnHour = "";
|
|
|
- minObj.learnMinute = "";
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'learn',
|
|
|
+ configValue:0
|
|
|
+ })
|
|
|
}
|
|
|
- //处理二级多选--做题
|
|
|
- if(newObj.configDetailList[i].practiceStatusType){
|
|
|
- minObj.practiceStatus = true;
|
|
|
- minObj.numberTopics = newObj.configDetailList[i].numberTopics;
|
|
|
- minObj.numberAccuracy = newObj.configDetailList[i].numberAccuracy;
|
|
|
+ //做题
|
|
|
+ if(exercise){
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'exercise',
|
|
|
+ configValue:newObj.ranges[i].numberTopics
|
|
|
+ })
|
|
|
}else{
|
|
|
- minObj.practiceStatus = false;
|
|
|
- minObj.numberTopics = "";
|
|
|
- minObj.numberAccuracy = "";
|
|
|
+ obj.means.push({
|
|
|
+ meansCode:'exercise',
|
|
|
+ configValue:0
|
|
|
+ })
|
|
|
}
|
|
|
- obj.configDetailList.push(minObj);
|
|
|
- }
|
|
|
- if(this.form.id){
|
|
|
- examMarkConfigEdit(obj).then( response => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("保存成功");
|
|
|
- });
|
|
|
- }else{
|
|
|
- examMarkConfigAdd(obj).then( response => {
|
|
|
- this.msgSuccess("保存成功");
|
|
|
- });
|
|
|
+ mod.ranges.push(obj)
|
|
|
}
|
|
|
+ creditCreditConfigAdd(mod).then( response => {
|
|
|
+ this.msgSuccess("保存成功");
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|