|
|
@@ -572,6 +572,28 @@
|
|
|
<span class="unit-text">个月</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <!--<el-form-item label="安全承诺书" prop="securityCommitmentEnabled">-->
|
|
|
+ <!--<div class="switch-row">-->
|
|
|
+ <!--<el-switch :disabled="showType" v-model="newData.securityCommitmentEnabled" :active-value="1" :inactive-value="0"-->
|
|
|
+ <!--active-color="#0183FB" inactive-color="#AAAAAA"-->
|
|
|
+ <!--/>-->
|
|
|
+ <!--<p v-if="newData.securityCommitmentEnabled==1&&!showType" class="checkButton-p" style="margin-left:20px;"-->
|
|
|
+ <!--@click="openSafetyCommitmentLetterDrawer"-->
|
|
|
+ <!-->选择模板</p>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<div class="mock-stat-bar" style="padding:0 20px;"-->
|
|
|
+ <!--v-if="newData.securityCommitmentTemplateId&&newData.securityCommitmentEnabled == 1">-->
|
|
|
+ <!--<span style="margin-right:20px;"><b>{{ newData.securityCommitmentTemplateName}}</b></span>-->
|
|
|
+ <!--<!–<i class="el-icon-close" @click="newData.certificateTemplateId = null;newData.certificateTemplateName = '';"></i>–>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
+
|
|
|
+ <!--<el-form-item label="承诺书打印" v-if="newData.securityCommitmentEnabled == 1">-->
|
|
|
+ <!--<el-switch :disabled="showType" v-model="newData.securityCommitmentPrintEnabled" :active-value="1" :inactive-value="0"-->
|
|
|
+ <!--active-color="#0183FB" inactive-color="#AAAAAA"-->
|
|
|
+ <!--/>-->
|
|
|
+ <!--</el-form-item>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
@@ -597,6 +619,8 @@
|
|
|
<selectScope v-if="drawerType === 4&&drawer"></selectScope>
|
|
|
<!--选择证书-->
|
|
|
<selectCertificate v-if="drawerType === 6&&drawer"></selectCertificate>
|
|
|
+ <!--选择安全承诺书-->
|
|
|
+ <safetyCommitmentLetter v-if="drawerType === 7&&drawer"></safetyCommitmentLetter>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -609,6 +633,7 @@
|
|
|
import selectUser from './selectUser.vue'
|
|
|
import selectScope from './selectScope.vue'
|
|
|
import selectCertificate from './selectCertificate.vue'
|
|
|
+ import safetyCommitmentLetter from './safetyCommitmentLetter.vue'
|
|
|
import {
|
|
|
examElExamAdd,examElExamEdit,examElExamDetail,examElKnowledgePointTreeList,examElDisciplineTypeList,
|
|
|
examElExamTypeList, laboratoryLevelConfigGetLevelTitleList,examElConfigMasterInitMinHour
|
|
|
@@ -622,7 +647,8 @@
|
|
|
selectCourse,
|
|
|
selectUser,
|
|
|
selectScope,
|
|
|
- selectCertificate
|
|
|
+ selectCertificate,
|
|
|
+ safetyCommitmentLetter,
|
|
|
},
|
|
|
props: {
|
|
|
propsData: {}
|
|
|
@@ -710,6 +736,13 @@
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
+ const validateData9 = (rule, value, callback) => {
|
|
|
+ if (this.newData.securityCommitmentEnabled == 1 && !this.newData.securityCommitmentTemplateId) {
|
|
|
+ callback(new Error('请选择安全承诺书'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
//日期选择范围限制
|
|
|
pickerOptions: {
|
|
|
@@ -798,6 +831,10 @@
|
|
|
certificatePrintEnabled: 0,
|
|
|
certificateValidMonths: 0,
|
|
|
certificateReviewMonths: 0,
|
|
|
+ securityCommitmentEnabled: 0,
|
|
|
+ securityCommitmentTemplateId: null,
|
|
|
+ securityCommitmentTemplateName: '',
|
|
|
+ securityCommitmentPrintEnabled: 0,
|
|
|
mandatoryStudyHoursConfig:{
|
|
|
freshmanNoLabHours:0,
|
|
|
undergraduateHours:0,
|
|
|
@@ -874,6 +911,10 @@
|
|
|
{ required: true, message: '证书复审周期不能为0', trigger: 'change' },
|
|
|
{ validator: validateData8, trigger: 'blur' }
|
|
|
],
|
|
|
+ securityCommitmentEnabled: [
|
|
|
+ { required: true, message: '请选择安全承诺书', trigger: 'change' },
|
|
|
+ { validator: validateData9, trigger: 'blur' }
|
|
|
+ ],
|
|
|
},
|
|
|
//弹窗相关
|
|
|
drawerTitle: '',
|
|
|
@@ -958,6 +999,10 @@
|
|
|
certificatePrintEnabled: response.data.certificateEnabled==1?response.data.certificatePrintEnabled:0,
|
|
|
certificateValidMonths: response.data.certificateEnabled==1?response.data.certificateValidMonths:0,
|
|
|
certificateReviewMonths: response.data.certificateEnabled==1?response.data.certificateReviewMonths:0,
|
|
|
+ securityCommitmentEnabled: response.data.securityCommitmentEnabled,
|
|
|
+ securityCommitmentTemplateId: response.data.securityCommitmentEnabled==1?response.data.securityCommitmentTemplateId:null,
|
|
|
+ securityCommitmentTemplateName: response.data.securityCommitmentEnabled==1?response.data.securityCommitmentTemplateName:'',
|
|
|
+ securityCommitmentPrintEnabled: response.data.securityCommitmentEnabled==1?response.data.securityCommitmentPrintEnabled:0,
|
|
|
mandatoryStudyHoursConfig: response.data.mandatoryStudyHoursConfig,
|
|
|
};
|
|
|
this.$set(this,'scopeList',response.data.ruleScopeItems?response.data.ruleScopeItems:[]);
|
|
|
@@ -982,7 +1027,7 @@
|
|
|
{ tab: 'basic', list: ['examTypeId','disciplineTypeId','riskLevelId','examName','attemptLimit','paperId','enableStatus','answerDuration','scopeType','examTimeRange'] },
|
|
|
{ tab: 'preExam', list: ['studyHoursRequirementEnabled','preCourseEnabled','mockEnabled','commitmentEnabled'] },
|
|
|
// { tab: 'antiCheat', list: ['popupVerifyEnabled'] },
|
|
|
- { tab: 'certificate', list: ['certificateEnabled','certificateValidMonths','certificateReviewMonths'] }
|
|
|
+ { tab: 'certificate', list: ['certificateEnabled','securityCommitmentEnabled','certificateValidMonths','certificateReviewMonths'] }
|
|
|
]
|
|
|
const matchedTab = tabFieldMap.find(item => item.list.includes(firstErrorField))
|
|
|
this.activeTab = matchedTab ? matchedTab.tab : 'basic'
|
|
|
@@ -1049,6 +1094,9 @@
|
|
|
certificatePrintEnabled:this.newData.certificateEnabled == 1?this.newData.certificatePrintEnabled:0,
|
|
|
certificateValidMonths:this.newData.certificateEnabled == 1?this.newData.certificateValidMonths:0,
|
|
|
certificateReviewMonths:this.newData.certificateEnabled == 1?this.newData.certificateReviewMonths:0,
|
|
|
+ securityCommitmentEnabled:this.newData.securityCommitmentEnabled,
|
|
|
+ securityCommitmentTemplateId:this.newData.securityCommitmentEnabled == 1?this.newData.securityCommitmentTemplateId:'',
|
|
|
+ securityCommitmentPrintEnabled:this.newData.securityCommitmentEnabled == 1?this.newData.securityCommitmentPrintEnabled:0,
|
|
|
};
|
|
|
if(this.newData.id){
|
|
|
obj.id = this.newData.id;
|
|
|
@@ -1106,6 +1154,12 @@
|
|
|
this.$set(this, 'drawerType', 6)
|
|
|
this.$set(this, 'drawer', true)
|
|
|
},
|
|
|
+ openSafetyCommitmentLetterDrawer() {
|
|
|
+ // TODO: 打开选择安全承诺书模板弹窗
|
|
|
+ this.$set(this, 'drawerTitle', '选择安全承诺书')
|
|
|
+ this.$set(this, 'drawerType', 7)
|
|
|
+ this.$set(this, 'drawer', true)
|
|
|
+ },
|
|
|
//弹窗关闭
|
|
|
drawerOffButton(data) {
|
|
|
if (this.drawerType == 1) {
|
|
|
@@ -1142,6 +1196,10 @@
|
|
|
//选择证书
|
|
|
this.$set(this.newData, 'certificateTemplateId', data.id)
|
|
|
this.$set(this.newData, 'certificateTemplateName', data.name)
|
|
|
+ }else if(this.drawerType == 7){
|
|
|
+ //选则安全承诺书
|
|
|
+ this.$set(this.newData, 'securityCommitmentTemplateId', data.id)
|
|
|
+ this.$set(this.newData, 'securityCommitmentTemplateName', data.name)
|
|
|
}
|
|
|
this.$refs.drawer.closeDrawer()
|
|
|
},
|