Commit d84505a4 authored by zhengke's avatar zhengke

修改

parent def76c52
<style> <style>
.examConfig .Period-rules { .examConfig .Period-rules {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
padding-left: 20px; padding-left: 20px;
} }
.examConfig .Period_Spreate { .examConfig .Period_Spreate {
flex: 1; flex: 1;
width: 50%; width: 50%;
min-width: 400px; min-width: 400px;
margin-right: 32px; margin-right: 32px;
} }
.examConfig .Period-rule-title { .examConfig .Period-rule-title {
color: #646a73; color: #646a73;
margin-bottom: 4px; margin-bottom: 4px;
white-space: nowrap; white-space: nowrap;
display: flex; }
align-items: baseline;
}
.examConfig .Period-info-icon { .examConfig .Period-info-icon {
margin-left: 8px; margin-left: 8px;
color: #8f959e; color: #8f959e;
line-height: 1; line-height: 1;
vertical-align: top; vertical-align: top;
} }
.process_Btn_List { .process_Btn_List {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
padding: 20px; padding: 20px;
} }
.processBtn_Cancel { .processBtn_Cancel {
width: 90px; width: 90px;
height: 35px; height: 35px;
border: 1px solid #a1aab2; border: 1px solid #a1aab2;
color: #000000; color: #000000;
background-color: #fff; background-color: #fff;
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
margin-right: 20px; margin-right: 20px;
} }
.processBtn_Save { .processBtn_Save {
width: 90px; width: 90px;
height: 35px; height: 35px;
background-color: #2961fe; background-color: #2961fe;
color: #fff; color: #fff;
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
} }
.baseSetForm_Dialog { .baseSetForm_Dialog {
margin: 20px; margin: 20px;
} }
.examConfig_title { .examConfig_title {
font-size: 14px; font-size: 14px;
color: #1f2329; color: #1f2329;
margin-bottom: 20px; margin-bottom: 20px;
} }
.Period-alert { .Period-alert {
padding: 9px 16px; padding: 9px 16px;
border-radius: 4px; border-radius: 4px;
background-color: #f0f4ff; background-color: #f0f4ff;
line-height: 22px; line-height: 22px;
color: #1f2329; color: #1f2329;
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
margin-bottom: 12px; margin-bottom: 12px;
font-size: 13px; font-size: 13px;
} }
.Okr_Length { .Okr_Length {
font-weight: 500; font-weight: 500;
color: #1f2329; color: #1f2329;
} }
.FormItem-asterisk { .FormItem-asterisk {
position: relative; position: relative;
top: 3px; top: 3px;
margin-left: 3px; margin-left: 3px;
color: #f54a45; color: #f54a45;
line-height: 1; line-height: 1;
} }
.baseSetForm_Dialog .el-radio {
display: block;
margin-bottom: 15px;
}
.exam-tip {
white-space: nowrap;
font-size: 10px;
color: #A8A8B3;
margin-top:5px;
}
.baseSetForm_Dialog .el-radio {
display: block;
margin-bottom: 15px;
}
.exam-tip {
white-space: nowrap;
font-size: 10px;
color: red;
}
</style> </style>
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="examConfig"> <div class="examConfig">
<div style="text-align: right"> <div style="text-align: right">
<q-btn <q-btn color="accent" size="sm" class="q-mr-md" @click="geteject" label="修改基础配置" />
color="accent"
size="sm"
class="q-mr-md"
@click="geteject"
label="修改基础配置"
/>
</div> </div>
<div class="Period-rules"> <div class="Period-rules">
<div class="Period_Spreate"> <div class="Period_Spreate">
<div class="Period-rule-title"> <div class="Period-rule-title">
是否开启组卷审批 <div>是否开启组卷审批</div>
<span class="exam-tip" <div class="exam-tip">开启后教师组卷不能直接生成使用,需要等待主管审核</div>
>(开启后教师组卷不能直接生成使用,需要等待主管审核)</span
>
</div> </div>
<div> <div>
<span v-if="baseObj.IsOpenZuJuan === 1"></span> <span v-if="baseObj.IsOpenZuJuan === 1"></span>
...@@ -130,10 +123,8 @@ ...@@ -130,10 +123,8 @@
</div> </div>
<div class="Period_Spreate col-6"> <div class="Period_Spreate col-6">
<div class="Period-rule-title"> <div class="Period-rule-title">
是否开启自动阅卷 <div>是否开启自动阅卷</div>
<span class="exam-tip" <div class="exam-tip">考试不能直接发起,需要等待主管审核通过后自动化发布</div>
>(考试不能直接发起,需要等待主管审核通过后自动化发布)</span
>
</div> </div>
<div> <div>
<span v-if="baseObj.IsOpenAutoMarking === 1"></span> <span v-if="baseObj.IsOpenAutoMarking === 1"></span>
...@@ -144,10 +135,8 @@ ...@@ -144,10 +135,8 @@
<div class="Period-rules"> <div class="Period-rules">
<div class="Period_Spreate"> <div class="Period_Spreate">
<div class="Period-rule-title"> <div class="Period-rule-title">
是否开启考试申请 <div>是否开启考试申请</div>
<span class="exam-tip" <div class="exam-tip">注意:开启后系统将对所有试卷内的客观题进行自动阅卷</div>
>(注意:开启后系统将对所有试卷内的客观题进行自动阅卷)</span
>
</div> </div>
<div> <div>
<span v-if="baseObj.IsOpenExamApply === 1"></span> <span v-if="baseObj.IsOpenExamApply === 1"></span>
...@@ -168,47 +157,18 @@ ...@@ -168,47 +157,18 @@
</div> </div>
</div> </div>
</div> </div>
<q-dialog <q-dialog v-model="isShowBaseSet" maximized full-height seamless position="right" @hide="closeProcess">
v-model="isShowBaseSet" <q-card style="margin-top: 61px; width: 500px" class="no-border-radius classinfo_Dialog">
maximized
full-height
seamless
position="right"
@hide="closeProcess"
>
<q-card
style="margin-top: 61px; width: 500px"
class="no-border-radius classinfo_Dialog"
>
<div class="baseSetForm_Dialog"> <div class="baseSetForm_Dialog">
<div class="examConfig_title"> <div class="cycle_Title">考试配置</div>
<div class="examConfig_title" style="margin-top:10px;">
是否开启组卷审批 是否开启组卷审批
<el-switch <el-switch style="margin-left: 10px" v-model="addMsg.IsOpenZuJuan" :active-value="1" :inactive-value="0"></el-switch>
style="margin-left: 10px"
v-model="addMsg.IsOpenZuJuan"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否"
></el-switch>
</div> </div>
<div v-if="baseObj.IsOpenZuJuan === 1"> <div v-if="baseObj.IsOpenZuJuan === 1">
<q-select <q-select filled stack-label :dense="false" v-model="addMsg.ZuJuanReviewer" :options="EmployeeListOption"
filled option-value="Id" option-label="EmployeeName" emit-value map-options label="组卷审核人" clearable use-input
stack-label :rules="[(val) => !!val || '请选择组卷审核人']" @filter="filterFn" ref="ZuJuanReviewer">
:dense="false"
v-model="addMsg.ZuJuanReviewer"
:options="EmployeeListOption"
option-value="Id"
option-label="EmployeeName"
emit-value
map-options
label="组卷审核人"
use-input
:rules="[(val) => !!val || '请选择组卷审核人']"
@filter="filterFn"
ref="ZuJuanReviewer"
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -218,46 +178,14 @@ ...@@ -218,46 +178,14 @@
</template> </template>
</q-select> </q-select>
</div> </div>
<div class="examConfig_title">
是否开启自动阅卷
<el-switch
style="margin-left: 10px"
v-model="addMsg.IsOpenAutoMarking"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否"
></el-switch>
</div>
<div class="examConfig_title"> <div class="examConfig_title">
是否开启考试申请 是否开启考试申请
<el-switch <el-switch style="margin-left: 10px" v-model="addMsg.IsOpenExamApply" :active-value="1" :inactive-value="0"></el-switch>
style="margin-left: 10px"
v-model="addMsg.IsOpenExamApply"
:active-value="1"
:inactive-value="0"
active-text="是"
inactive-text="否"
></el-switch>
</div> </div>
<div v-if="baseObj.IsOpenExamApply === 1"> <div v-if="baseObj.IsOpenExamApply === 1">
<q-select <q-select filled stack-label :dense="false" v-model="addMsg.ExamApplyReviewer" :options="EmployeeListOption"
filled option-value="Id" option-label="EmployeeName" emit-value map-options label="考试申请审核人" clearable use-input
stack-label :rules="[(val) => !!val || '请选择考试申请审核人']" @filter="filterFn" ref="ExamApplyReviewer">
:dense="false"
v-model="addMsg.ExamApplyReviewer"
:options="EmployeeListOption"
option-value="Id"
option-label="EmployeeName"
emit-value
map-options
label="考试申请审核人"
use-input
:rules="[(val) => !!val || '请选择考试申请审核人']"
@filter="filterFn"
ref="ExamApplyReviewer"
>
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
<q-item-section class="text-grey"> <q-item-section class="text-grey">
...@@ -267,145 +195,211 @@ ...@@ -267,145 +195,211 @@
</template> </template>
</q-select> </q-select>
</div> </div>
<div class="examConfig_title">
是否开启自动阅卷
<el-switch style="margin-left: 10px" v-model="addMsg.IsOpenAutoMarking" :active-value="1"
:inactive-value="0"></el-switch>
</div>
</div> </div>
<div class="process_Btn_List"> <div class="process_Btn_List">
<div class="processBtn_Cancel" @click="closeProcess">关闭</div> <div class="processBtn_Cancel" @click="closeProcess">关闭</div>
<div class="processBtn_Save" @click="setBaseInfo">确定</div> <div class="processBtn_Save" @click="setBaseInfo">确定</div>
</div> </div>
</q-card> </q-card>
<div <div class="dialog-out-close" @click="closeProcess" style="
class="dialog-out-close"
@click="closeProcess"
style="
height: 40px !important; height: 40px !important;
border-top-left-radius: 4px !important; border-top-left-radius: 4px !important;
border-bottom-left-radius: 4px !important; border-bottom-left-radius: 4px !important;
" ">
>
<q-icon name="iconfont icon-jujue1" size="26px" /> <q-icon name="iconfont icon-jujue1" size="26px" />
</div> </div>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
setExaminationConfigure, setExaminationConfigure,
getExaminationConfigureModel, getExaminationConfigureModel,
} from "../../api/system/exam"; } from "../../api/system/exam";
import { queryEmployee } from "../../api/users/user"; //获取业务员 import {
export default { queryEmployee
meta: { } from "../../api/users/user"; //获取业务员
title: "考试设置", export default {
}, meta: {
data() { title: "考试设置",
return {
isShowBaseSet: false,
baseObj: {},
addMsg: {},
// ZuJuanReviewerName: "", //组卷审核人姓名
// ExamApplyReviewerName: "", //考试申请审核人姓名
EmployeeListOption: [],
allEmployeeListOption: [],
};
},
mounted() {
this.getEmployee();
},
methods: {
//获取考试配置信息
getData() {
getExaminationConfigureModel({}).then((res) => {
if (res.Code == 1) {
this.baseObj = res.Data;
this.baseObj.ZuJuanReviewerName = this.getName(
res.Data.ZuJuanReviewer
);
this.baseObj.ExamApplyReviewerName = this.getName(
res.Data.ExamApplyReviewer
);
this.addMsg = res.Data;
}
});
}, },
data() {
//关闭流程设置 return {
closeProcess() { isShowBaseSet: false,
this.isShowBaseSet = false; baseObj: {},
addMsg: {},
// ZuJuanReviewerName: "", //组卷审核人姓名
// ExamApplyReviewerName: "", //考试申请审核人姓名
EmployeeListOption: [],
allEmployeeListOption: [],
};
}, },
geteject() { mounted() {
this.isShowBaseSet = true; this.getEmployee();
}, },
//设置考试信息 methods: {
setBaseInfo() { //获取考试配置信息
this.$refs.ZuJuanReviewer.validate(); getData() {
this.$refs.ExamApplyReviewer.validate(); getExaminationConfigureModel({}).then((res) => {
if (
!this.$refs.ZuJuanReviewer.hasError &&
!this.$refs.ExamApplyReviewer.hasError
) {
this.addMsg.ZuJuanReviewerName = this.getName(
this.addMsg.ZuJuanReviewer
);
this.addMsg.ExamApplyReviewerName = this.getName(
this.addMsg.ExamApplyReviewer
);
setExaminationConfigure(this.addMsg).then((res) => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.baseObj = res.Data;
icon: "iconfont icon-chenggong", this.baseObj.ZuJuanReviewerName = this.getName(
color: "accent", res.Data.ZuJuanReviewer
timeout: 2000, );
message: "数据保存成功!", this.baseObj.ExamApplyReviewerName = this.getName(
position: "top", res.Data.ExamApplyReviewer
}); );
this.getData(); this.addMsg = res.Data;
this.isShowBaseSet = false;
} }
}); });
} },
},
//获取业务员 //关闭流程设置
getEmployee(id) { closeProcess() {
var qMsg = { this.isShowBaseSet = false;
Dept_Id: 0, },
}; geteject() {
qMsg.Dept_Id = id; this.isShowBaseSet = true;
queryEmployee(qMsg) },
.then((res) => { //设置考试信息
if (res.Code == 1) { setBaseInfo() {
this.EmployeeListOption = res.Data; //都选否 直接保存
this.allEmployeeListOption = res.Data; if(this.addMsg.IsOpenZuJuan==0&&this.addMsg.IsOpenExamApply==0){
this.getData(); setExaminationConfigure(this.addMsg).then((res) => {
} if (res.Code == 1) {
}) this.$q.notify({
.catch(() => {}); icon: "iconfont icon-chenggong",
}, color: "accent",
//筛选员工 timeout: 2000,
filterFn(val, update) { message: "数据保存成功!",
update(() => { position: "top",
if (val === "") { });
this.EmployeeListOption = JSON.parse( this.getData();
JSON.stringify(this.allEmployeeListOption) this.isShowBaseSet = false;
}
});
}
//只选择了开启组卷审批
if(this.addMsg.IsOpenZuJuan==1&&this.addMsg.IsOpenExamApply==0){
this.$refs.ZuJuanReviewer.validate();
this.addMsg.ZuJuanReviewerName = this.getName(
this.addMsg.ZuJuanReviewer
); );
} else { if(!this.$refs.ZuJuanReviewer.hasError){
const needle = val.toLowerCase(); setExaminationConfigure(this.addMsg).then((res) => {
this.EmployeeListOption = this.allEmployeeListOption.filter( if (res.Code == 1) {
(v) => v.EmployeeName.toLowerCase().indexOf(needle) > -1 this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top",
});
this.getData();
this.isShowBaseSet = false;
}
});
}
}
//组卷审批关闭 开起考试
if(this.addMsg.IsOpenZuJuan==0&&this.addMsg.IsOpenExamApply==1){
this.$refs.ExamApplyReviewer.validate();
this.addMsg.ExamApplyReviewerName = this.getName(
this.addMsg.ExamApplyReviewer
); );
if(!this.$refs.ExamApplyReviewer.hasError){
setExaminationConfigure(this.addMsg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top",
});
this.getData();
this.isShowBaseSet = false;
}
});
}
} }
}); //组卷审批 开启考试同时打开
}, if(this.addMsg.IsOpenZuJuan==1&&this.addMsg.IsOpenExamApply==1){
//根据Id取名字 this.$refs.ZuJuanReviewer.validate();
getName(id) { this.$refs.ExamApplyReviewer.validate();
let name = ""; if (
this.allEmployeeListOption.map((item) => { !this.$refs.ZuJuanReviewer.hasError &&
if (id == item.Id) { !this.$refs.ExamApplyReviewer.hasError
name = item.EmployeeName; ) {
this.addMsg.ZuJuanReviewerName = this.getName(
this.addMsg.ZuJuanReviewer
);
this.addMsg.ExamApplyReviewerName = this.getName(
this.addMsg.ExamApplyReviewer
);
setExaminationConfigure(this.addMsg).then((res) => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top",
});
this.getData();
this.isShowBaseSet = false;
}
});
}
} }
}); },
return name; //获取业务员
getEmployee(id) {
var qMsg = {
Dept_Id: 0,
};
qMsg.Dept_Id = id;
queryEmployee(qMsg)
.then((res) => {
if (res.Code == 1) {
this.EmployeeListOption = res.Data;
this.allEmployeeListOption = res.Data;
this.getData();
}
})
.catch(() => {});
},
//筛选员工
filterFn(val, update) {
update(() => {
if (val === "") {
this.EmployeeListOption = JSON.parse(
JSON.stringify(this.allEmployeeListOption)
);
} else {
const needle = val.toLowerCase();
this.EmployeeListOption = this.allEmployeeListOption.filter(
(v) => v.EmployeeName.toLowerCase().indexOf(needle) > -1
);
}
});
},
//根据Id取名字
getName(id) {
let name = "";
this.allEmployeeListOption.map((item) => {
if (id == item.Id) {
name = item.EmployeeName;
}
});
return name;
},
}, },
}, };
};
</script> </script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment