dedsudiyu 1 miesiąc temu
rodzic
commit
443ae4d6f1

+ 60 - 2
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/addPage.vue

@@ -555,6 +555,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>
@@ -580,6 +602,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>
@@ -592,6 +616,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
@@ -605,7 +630,8 @@
       selectCourse,
       selectUser,
       selectScope,
-      selectCertificate
+      selectCertificate,
+      safetyCommitmentLetter,
     },
     props: {
       propsData: {}
@@ -700,6 +726,13 @@
           callback()
         }
       }
+      const validateData9 = (rule, value, callback) => {
+        if (this.newData.securityCommitmentEnabled == 1 && !this.newData.securityCommitmentTemplateId) {
+          callback(new Error('请选择安全承诺书'))
+        } else {
+          callback()
+        }
+      }
       return {
         //日期选择范围限制
         pickerOptions: {
@@ -783,6 +816,10 @@
           certificatePrintEnabled: 0,
           certificateValidMonths: 0,
           certificateReviewMonths: 0,
+          securityCommitmentEnabled: 0,
+          securityCommitmentTemplateId: null,
+          securityCommitmentTemplateName: '',
+          securityCommitmentPrintEnabled: 0,
           mandatoryStudyHoursConfig:{
             freshmanNoLabHours:0,
             undergraduateHours:0,
@@ -855,6 +892,10 @@
             { required: true, message: '证书复审周期不能为0', trigger: 'change' },
             { validator: validateData8, trigger: 'blur' }
           ],
+          securityCommitmentEnabled: [
+            { required: true, message: '请选择安全承诺书', trigger: 'change' },
+            { validator: validateData9, trigger: 'blur' }
+          ],
         },
         //弹窗相关
         drawerTitle: '',
@@ -938,6 +979,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:[]);
@@ -962,7 +1007,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'
@@ -1023,6 +1068,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;
@@ -1080,6 +1128,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) {
@@ -1116,6 +1170,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()
       },

+ 182 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/safetyCommitmentLetter.vue

@@ -0,0 +1,182 @@
+<!-- 选择证书 -->
+<template>
+  <div class="page-container safetyCommitmentLetter-addPage">
+    <div class="page-form-title-box">
+      <el-form :model="queryParams" class="form-box" ref="queryForm"
+               :inline="true" style="width:100%;">
+        <el-form-item label="" prop="shareStatus">
+          <el-select v-model="queryParams.shareStatus" placeholder="是否共享" style="width: 120px">
+            <el-option label="共享" value="1"/>
+            <el-option label="不共享" value="0"/>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item label="" prop="templateType">-->
+        <!--<el-select v-model="queryParams.templateType" placeholder="考试类型" style="width: 140px">-->
+        <!--<el-option-->
+        <!--v-for="dict in optionListA"-->
+        <!--:key="dict.id"-->
+        <!--:label="dict.examTypeName"-->
+        <!--:value="dict.id"-->
+        <!--/>-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item label="" prop="deptId">
+          <el-cascader
+            style="width: 180px"
+            v-model="queryParams.deptId"
+            :options="optionListB"
+            :props="{
+                    emitPath:false,
+                    checkStrictly: true,
+                    value: 'deptId',
+                    label: 'deptName',
+                    children: 'child',
+                  }"
+            :show-all-levels="false"
+            filterable
+            placeholder="颁发单位"
+          ></el-cascader>
+        </el-form-item>
+        <el-form-item label="" prop="searchValue">
+          <el-input
+            maxLength="30"
+            v-model="queryParams.searchValue"
+            placeholder="搜索名称"
+            style="width: 140px"
+          />
+        </el-form-item>
+        <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+        <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+      </el-form>
+    </div>
+    <div class="page-content-box">
+      <el-table class="table-box"  border :data="dataList">
+        <el-table-column label="证书模板名称" prop="templateName"  show-overflow-tooltip/>
+        <el-table-column label="适用考试类型" prop="examTypeName" width="200" show-overflow-tooltip/>
+        <el-table-column label="是否共享" prop="shareStatus" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus === 1">共享</span>
+            <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus === 0">不共享</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="颁发单位" prop="deptName" width="200" show-overflow-tooltip/>
+        <el-table-column label="更新人" prop="updateName" width="200" show-overflow-tooltip/>
+        <el-table-column label="操作" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p"
+                 @click="checkButton(scope.row)"
+              >选择</p>
+              <p class="table-button-null"></p>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]"
+                  v-show="total>0"
+                  :total="total"
+                  :page.sync="queryParams.page"
+                  :limit.sync="queryParams.pageSize"
+                  @pagination="getList"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import { examElCertificateTemplatePage,examElExamTypeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  export default {
+    name: 'safetyCommitmentLetter',
+    props: {
+      propsData: {}
+    },
+    data() {
+      return {
+        //下拉列表数据
+        optionListA:[],
+        optionListB:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          shareStatus:null,
+          templateType :3,
+          deptId :null,
+          searchValue :'',
+        },
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      this.getList();
+      this.examElExamTypeList();
+      this.systemDeptCurrentDept();
+    },
+    methods: {
+      // 提交按钮
+      checkButton(row) {
+        this.$parent.$parent.drawerOffButton({
+          id:row.id,
+          name:row.templateName,
+        })
+      },
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          shareStatus:null,
+          templateType :3,
+          deptId :null,
+          searchValue :'',
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        examElCertificateTemplatePage(obj).then(response => {
+
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //查询全部考试类型
+      examElExamTypeList(){
+        examElExamTypeList({}).then(response => {
+          this.$set(this,'optionListA',response.data);
+        });
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'optionListB',list);
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .safetyCommitmentLetter-addPage {
+    flex:1;
+    display: flex;
+    flex-direction: column;
+    overflow: hidden;
+  }
+</style>

+ 1 - 1
src/views/safetyEducationExaminationNew/featurePage/mockExam/index.vue

@@ -10,7 +10,7 @@
       <div class="left-panel">
         <div class="exam-title">{{ examInfo.examTypeName }}</div>
         <div class="exam-subtitle">总{{ examInfo.questionCount }}题 / 共{{ examInfo.totalScore }}分</div>
-        <div class="exam-name-box scrollbar-box">{{ examInfo.examName }}</div>
+        <div class="exam-name-box">{{ examInfo.examName }}</div>
         <div class="question-group-max-box">
           <!-- 题目导航 -->
           <div v-for="(item,index) in questionTypeGroups" :key="index" class="question-group">

+ 1 - 1
src/views/safetyEducationExaminationNew/featurePage/startPracticing/index.vue

@@ -10,7 +10,7 @@
       <div class="left-panel">
         <div class="exam-title">刷题练习</div>
         <div class="exam-subtitle">总{{ examInfo.totalCount }}题</div>
-        <div class="exam-name-box scrollbar-box">{{ examInfo.knowledgePointName }}</div>
+        <div class="exam-name-box">{{ examInfo.knowledgePointName }}</div>
         <div class="question-group-max-box">
           <!-- 题目导航 -->
           <div v-for="(item,index) in questionTypeGroups" :key="index" class="question-group">

+ 1 - 1
src/views/safetyEducationExaminationNew/featurePage/startTheExam/index.vue

@@ -10,7 +10,7 @@
       <div class="left-panel">
         <div class="exam-title">{{ examInfo.examTypeName }}</div>
         <div class="exam-subtitle">总{{ examInfo.questionCount }}题 / 共{{ examInfo.totalScore }}分</div>
-        <div class="exam-name-box scrollbar-box">{{ examInfo.examName }}</div>
+        <div class="exam-name-box">{{ examInfo.examName }}</div>
         <p class="examKindType" v-if="examInfo.examKind== 2">补考</p>
         <div class="question-group-max-box">
           <!-- 题目导航 -->

+ 1 - 1
src/views/safetyEducationExaminationNew/featurePage/startTraining/index.vue

@@ -10,7 +10,7 @@
       <div class="left-panel">
         <div class="exam-title">刷题练习</div>
         <div class="exam-subtitle">总{{ examInfo.totalCount }}题</div>
-        <div class="exam-name-box scrollbar-box">{{ examInfo.knowledgePointName }}</div>
+        <div class="exam-name-box">{{ examInfo.knowledgePointName }}</div>
         <div class="question-group-max-box">
           <!-- 题目导航 -->
           <div v-for="(item,index) in questionTypeGroups" :key="index" class="question-group">

+ 4 - 2
src/views/safetyEducationExaminationNew/personnelApproval/index.vue

@@ -54,7 +54,9 @@
                 <p class="table-button-null"></p>
                 <p class="button-color-a" v-if="scope.row.statusCode==0" @click="tableButton(1,scope.row)">通过</p>
                 <p class="button-color-b" v-if="scope.row.statusCode==0" @click="tableButton(2,scope.row)">驳回</p>
-                <p class="button-color-c" v-if="scope.row.statusCode==1" @click="tableButton(3,scope.row)">解绑</p>
+                <p class="button-color-c" v-if="scope.row.statusCode==1"
+                   v-hasPermiRouter="['exam:personnelApproval:edit']"
+                   @click="tableButton(3,scope.row)">解绑</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -170,7 +172,7 @@
           this.$set(this,'dialogType',true);
         } else if(val == 3) {
           //解绑
-          this.$confirm('确认解除 '+row.userName+' 与 '+row.subName+'('+row.roomNum+')'+' 的绑定?', "提示", {
+          this.$confirm('确认解除 '+row.userName+' 与 '+row.subName+'('+row.roomNum+')'+' 的绑定关系?', "提示", {
             confirmButtonText: "确认",
             cancelButtonText: "取消",
             type: "warning"

+ 1 - 1
src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/addPage.vue

@@ -102,7 +102,7 @@
           Authorization: getToken(),
         },
         upData:[],
-        optionList:[{value:1,label:'考试证书'},{value:2,label:'培训证书'},],
+        optionList:[{value:1,label:'考试证书'},{value:2,label:'培训证书'},{value:3,label:'安全承诺书'},],
         optionDeptList:[],
         newData:{
           templateName:'',

+ 2 - 2
src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/index.vue

@@ -61,7 +61,7 @@
           <el-table-column label="证书模板名称" prop="templateName"  show-overflow-tooltip/>
           <el-table-column label="证书类型" prop="templateType" width="200" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{scope.row.templateType==1?'考试证书':'培训证书'}}</span>
+              <span>{{scope.row.templateType==1?'考试证书':(scope.row.templateType==2?'培训证书':(scope.row.templateType==3?'安全承诺书':''))}}</span>
             </template>
           </el-table-column>
           <el-table-column label="是否共享" prop="shareStatus" width="120" show-overflow-tooltip>
@@ -127,7 +127,7 @@
         //页面状态
         pageType:1,
         //下拉列表数据
-        optionClassList:[{value:1,label:'考试证书'},{value:2,label:'培训证书'},],
+        optionClassList:[{value:1,label:'考试证书'},{value:2,label:'培训证书'},{value:3,label:'安全承诺书'},],
         optionList:[],
         queryParams:{
           page:1,