dedsudiyu 1 týždeň pred
rodič
commit
af91bd3dae
21 zmenil súbory, kde vykonal 2662 pridanie a 418 odobranie
  1. 143 6
      src/api/safetyEducationExaminationNew/index.js
  2. 60 1
      src/views/basicsModules/home.vue
  3. 336 0
      src/views/safetyEducationExaminationNew/courseManagement/courseManagement/drawerItem.vue
  4. 2 2
      src/views/safetyEducationExaminationNew/courseManagement/courseManagement/index.vue
  5. 22 10
      src/views/safetyEducationExaminationNew/courseManagement/courseManagement/studyCourses.vue
  6. 14 14
      src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/addPage.vue
  7. 11 27
      src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/index.vue
  8. 243 0
      src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue
  9. 243 0
      src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue
  10. 243 0
      src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/index.vue
  11. 51 60
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/classHoursConfiguration.vue
  12. 32 19
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/examinationConfiguration.vue
  13. 52 38
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/gradingConfiguration.vue
  14. 18 10
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/index.vue
  15. 21 7
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/otherConfiguration.vue
  16. 227 0
      src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/specialtyConfiguration.vue
  17. 121 72
      src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/addPage.vue
  18. 81 55
      src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/index.vue
  19. 211 97
      src/views/safetyEducationExaminationNew/publicConfiguration/knowledgePointManagement/index.vue
  20. 262 0
      src/views/safetyEducationExaminationNew/questionBankManagement/practiceSolvingProblems/index.vue
  21. 269 0
      src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/index.vue

+ 143 - 6
src/api/safetyEducationExaminationNew/index.js

@@ -1,19 +1,156 @@
 import request from '@/utils/request'
 
-// post方法demo
-export function postDame(data) {
+// 分页查询证书模板
+export function examElCertificateTemplatePage(data) {
   return request({
-    url: '/postDame/postDame/postDame',
+    url: '/exam/elCertificateTemplate/page',
+    method: 'post',
+    data: data
+  })
+}
+// 查询证书模板列表
+export function examElCertificateTemplateList(data) {
+  return request({
+    url: '/exam/elCertificateTemplate/list',
+    method: 'post',
+    data: data
+  })
+}
+// 查询全部考试类型
+export function examElExamTypeList(data) {
+  return request({
+    url: '/exam/elExamType/list',
+    method: 'post',
+    data: data
+  })
+}
+// 编辑考试类别
+export function examElExamTypeBbatchSave(data) {
+  return request({
+    url: '/exam/elExamType/batch-save',
+    method: 'post',
+    data: data
+  })
+}
+// 获取当前登录用户的部门列表
+export function systemDeptCurrentDept(data) {
+  return request({
+    url: '/system/dept/currentDept',
+    method: 'post',
+    data: data
+  })
+}
+// 新增证书模板
+export function examElCertificateTemplateAdd(data) {
+  return request({
+    url: '/exam/elCertificateTemplate/add',
+    method: 'post',
+    data: data
+  })
+}
+// 修改证书模板
+export function examElCertificateTemplateEdit(data) {
+  return request({
+    url: '/exam/elCertificateTemplate/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 删除证书模板
+export function examElCertificateTemplateDel(data) {
+  return request({
+    url: '/exam/elCertificateTemplate/del',
+    method: 'post',
+    data: data
+  })
+}
+// 查询全部专业类别
+export function examElDisciplineTypeList(data) {
+  return request({
+    url: '/exam/elDisciplineType/list',
+    method: 'post',
+    data: data
+  })
+}
+// 编辑专业类别
+export function examElDisciplineTypeBatchSave(data) {
+  return request({
+    url: '/exam/elDisciplineType/batch-save',
+    method: 'post',
+    data: data
+  })
+}
+// 修改专业类别
+export function examElDisciplineTypeEdit(data) {
+  return request({
+    url: '/exam/elDisciplineType/edit',
+    method: 'post',
+    data: data
+  })
+}
+// 删除专业类别
+export function examElDisciplineTypeDel(data) {
+  return request({
+    url: '/exam/elDisciplineType/del',
     method: 'post',
     data: data
   })
 }
 
-// get方法demo
-export function getDame(query) {
+// 查询基础配置 1.分级要求配置 2.学时积分配置 3.其他配置
+export function examElConfigValueMap(query) {
   return request({
-    url: '/getDame/getDame',
+    url: '/exam/elConfig/value-map',
     method: 'get',
     params: query
   })
 }
+// 保存基础配置
+export function examElConfigSave(data) {
+  return request({
+    url: '/exam/elConfig/save',
+    method: 'post',
+    data: data
+  })
+}
+//查询知识点树
+export function examElKnowledgePointTreeList(data) {
+  return request({
+    url: '/exam/elKnowledgePoint/tree-list',
+    method: 'post',
+    data: data
+  })
+}
+//添加知识点
+export function examElKnowledgePointAdd(data) {
+  return request({
+    url: '/exam/elKnowledgePoint/add',
+    method: 'post',
+    data: data
+  })
+}
+//批量添加知识点
+export function examElKnowledgePointBatchAdd(data) {
+  return request({
+    url: '/exam/elKnowledgePoint/batch-add',
+    method: 'post',
+    data: data
+  })
+}
+//编辑知识点
+export function examElKnowledgePointEdit(data) {
+  return request({
+    url: '/exam/elKnowledgePoint/edit',
+    method: 'post',
+    data: data
+  })
+}
+//删除知识点
+export function examElKnowledgePointDel(data) {
+  return request({
+    url: '/exam/elKnowledgePoint/del',
+    method: 'post',
+    data: data
+  })
+}
+

+ 60 - 1
src/views/basicsModules/home.vue

@@ -4,6 +4,8 @@
 </template>
 
 <script>
+  import { Encrypt,Decrypt} from '@/utils/secret'
+  import { getConfigByType } from "@/api/commonality/permission";
   export default {
     name: "home",
     data() {
@@ -15,9 +17,66 @@
 
     },
     mounted(){
-      this.autoSkip();
+      this.getExploitConfig();
     },
     methods: {
+      //获取开发配置
+      getExploitConfig(){
+        getConfigByType({ category: 2, configType: 5 }).then(response => {
+          let obj = JSON.parse(response.data.configValue)
+          //判定http或者https
+          let urlText = window.location.href.split('://')[0]+'://';
+          let outerNet = window.location.href.indexOf(obj.ipIdentify) == -1//true外网 false 内网
+          if(outerNet){//外网
+            //文件预览地址
+            localStorage.setItem('filePreviewUrl',urlText+obj.fileExtranetUrl)
+            //摄像头代理访问地址
+            localStorage.setItem('cameraExtranetAgent',urlText+obj.cameraExtranetAgent)
+            //摄像头地址ip段
+            localStorage.setItem('ipIdentify',obj.ipIdentify)
+            //摄像头访问地址
+            localStorage.setItem('cameraUrl','wss://'+obj.cameraExtranetUrl)
+            //MQTT地址
+            localStorage.setItem('mqttUrl','wss://'+Decrypt(obj.mqttExtranetUrl))
+            //MQTT账号
+            localStorage.setItem('mqttUser',Decrypt(obj.mqttExtranetUser))
+            //MQTT密码
+            localStorage.setItem('mqttPassword',Decrypt(obj.mqttExtranetPassword))
+            //可视化大屏访问地址
+            localStorage.setItem('screenUrl',urlText+obj.screenExtranetUrl)
+            //小程序二维码规则
+            localStorage.setItem('codeOnlineAdd',obj.codeOnlineAdd)
+            //文件浏览环境
+            localStorage.setItem('fileBrowseEnvironment',window.location.href.split('://')[0]+'://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
+            localStorage.setItem('fileBrowseEnvironmentInterior',window.location.href.split('://')[0]+'://'+Decrypt(obj.fileBrowseEnvironment))
+            localStorage.setItem('fileBrowseEnvironmentExtranet','https://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
+          }else{
+            //文件预览地址
+            localStorage.setItem('filePreviewUrl',urlText+obj.fileIntranetUrl)
+            //摄像头代理访问地址
+            localStorage.setItem('cameraExtranetAgent',urlText+obj.cameraIntranetAgent)
+            //摄像头地址ip段
+            localStorage.setItem('ipIdentify',obj.ipIdentify)
+            //摄像头访问地址
+            localStorage.setItem('cameraUrl','wss://'+obj.cameraIntranetUrl)
+            //MQTT地址
+            localStorage.setItem('mqttUrl','ws://'+Decrypt(obj.mqttIntranetUrl))
+            //MQTT账号
+            localStorage.setItem('mqttUser',Decrypt(obj.mqttIntranetUser))
+            //MQTT密码
+            localStorage.setItem('mqttPassword',Decrypt(obj.mqttIntranetPassword))
+            //可视化大屏访问地址
+            localStorage.setItem('screenUrl',urlText+obj.screenIntranetUrl)
+            //小程序二维码规则
+            localStorage.setItem('codeOnlineAdd',obj.codeOnlineAdd)
+            //文件浏览环境
+            localStorage.setItem('fileBrowseEnvironment',window.location.href.split('://')[0]+'://'+Decrypt(obj.fileBrowseEnvironment))
+            localStorage.setItem('fileBrowseEnvironmentInterior',window.location.href.split('://')[0]+'://'+Decrypt(obj.fileBrowseEnvironment))
+            localStorage.setItem('fileBrowseEnvironmentExtranet','https://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
+          }
+          this.autoSkip();
+        });
+      },
       //自动跳转
       autoSkip(){
         let path = this.circularCallSortSkip(this.routeData);

+ 336 - 0
src/views/safetyEducationExaminationNew/courseManagement/courseManagement/drawerItem.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="page-container studyCourses-drawerItem">
+    <div class="drawerItem-left-box">
+      <el-form class="drawerItem-left-form" :model="leftData" ref="form">
+        <el-form-item label="" prop="data4" label-width="0">
+          <el-input v-model="leftData.leftData1" placeholder="关键字搜索知识点" maxLength="20" style="width:260px;">
+            <el-button slot="append" icon="el-icon-search" @click="leftButton()"></el-button>
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div class="drawerItem-left-list-box scrollbar-box">
+        <p v-for="(item,index) in leftList" :key="index"
+           @click="leftCheckButton(index)"
+           :class="index == leftCheckIndex?'checkIndex':''">{{item.name}}</p>
+      </div>
+    </div>
+    <div class="drawerItem-right-box">
+      <el-form class="drawerItem-right-form" :model="queryParams" ref="form">
+        <div class="table-top-button-box">
+          <div>
+            <p :class="tableType == 1?'check-table-button':''" @click="tableTypeButton(1)">全部</p>
+            <p :class="tableType == 2?'check-table-button':''" @click="tableTypeButton(2)">共享</p>
+            <p :class="tableType == 3?'check-table-button':''" @click="tableTypeButton(3)">不共享</p>
+          </div>
+        </div>
+        <el-form-item label="" prop="queryParamsData1">
+          <el-select v-model="queryParams.queryParamsData1" placeholder="课件类型" style="width: 200px">
+            <el-option
+              v-for="dict in optionListA"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="queryParamsData2">
+          <el-select v-model="queryParams.queryParamsData2" placeholder="专业类别" style="width: 200px">
+            <el-option
+              v-for="dict in optionListB"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="" prop="queryParamsData3">
+          <el-input
+            maxLength="30"
+            v-model="queryParams.queryParamsData3"
+            placeholder="搜索名称"
+            style="width: 200px"
+          />
+        </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 class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="rightList"
+                  ref="multipleTable" :row-key="getRowKey" @selection-change="handleSelectionChange">
+          <el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
+          <el-table-column label="课件名称" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="知识点" prop="content" width="120" show-overflow-tooltip/>
+          <el-table-column label="专业类别" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="是否共享" prop="content" width="100" 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)">共享</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)">不共享</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="课件类型" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="文件大小" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="要求时长" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="可得学时" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="可得积分" prop="content" width="100" show-overflow-tooltip/>
+          <el-table-column label="来源" prop="content" width="100" show-overflow-tooltip/>
+        </el-table>
+        <div class="right-bottom-button-box">
+          <pagination :page-sizes="[20, 30, 40, 50]"
+                      v-show="total>0"
+                      :total="total"
+                      :page.sync="queryParams.page"
+                      :limit.sync="queryParams.pageSize"
+                      @pagination="rightGetList"
+          />
+          <p class="null-p"></p>
+          <p class="drawer-item-button-1" @click="returnButton">取消</p>
+          <p class="drawer-item-button-2" @click="confirmButton">确定</p>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  export default {
+    name: 'drawerItem',
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        // 左侧
+        leftData:{
+          leftData1:'',
+        },
+        leftList:[{name:'知识点1',value:'1'},{name:'知识点2',value:'2'},{name:'知识点3',value:'3'},],
+        leftCheckIndex:0,
+        //右侧
+        tableType:1,
+        optionListA:[],
+        optionListB:[],
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:null,
+          queryParamsData2:null,
+          queryParamsData3:'',
+        },
+        rightList:[],
+        loading:false,
+        total:10,
+        multipleSelection: [], // 存储所有被勾选的数据
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    },
+    methods:{
+      // 左侧搜索
+      leftButton(){
+        console.log('左侧搜索')
+      },
+      //左侧切换
+      leftCheckButton(index){
+        if(this.leftCheckIndex != index){
+          this.$set(this,'leftCheckIndex',index);
+        }
+      },
+      //右侧切换按钮
+      tableTypeButton(val){
+        if(this.tableType != val){
+          this.$set(this,'tableType',val);
+          this.handleQuery();
+        }
+      },
+      //右侧获取数据
+      rightGetList(){
+
+      },
+      //查询
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:null,
+          queryParamsData2:null,
+          queryParamsData3:'',
+        });
+        this.getList();
+      },
+      //返回
+      returnButton(){
+        this.$parent.$parent.drawerReturnButton();
+      },
+      //确定
+      confirmButton(){
+        this.$parent.$parent.drawerConfirmButton();
+      },
+      //获取数据列表
+      getList(){
+        // this.$set(this,'loading',true);
+        // let obj = JSON.parse(JSON.stringify(this.queryParams))
+        // terminalUpgradeWebTaskList(obj).then(response => {
+        //   this.$set(this,'loading',false);
+        //   this.$set(this,'dataList',response.data.records);
+        //   this.$set(this,'total',response.data.total);
+        // });
+      },
+
+      // 2. 指定表格行的唯一标识(必须是数据中绝对唯一的字段,如 id)
+      getRowKey(row) {
+        return row.id;
+      },
+
+      // 3. 监听勾选状态的变化
+      handleSelectionChange(val) {
+        this.multipleSelection = val;
+        console.log('当前所有选中的数据:', this.multipleSelection);
+      },
+
+      // 4. 翻页/改变每页条数时的处理
+      handlePageChange(pageNum) {
+        this.queryParams.pageNum = pageNum;
+        this.getList();
+      },
+      handleSizeChange(pageSize) {
+        this.queryParams.pageSize = pageSize;
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+
+      // 5. 核心方法:翻页后恢复之前的勾选状态
+      restoreSelection() {
+        if (this.multipleSelection.length > 0) {
+          this.rightList.forEach(row => {
+            const isSelected = this.multipleSelection.some(item => item.id === row.id);
+            this.$refs.multipleTable.toggleRowSelection(row, isSelected);
+          });
+        }
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .studyCourses-drawerItem{
+    flex:1;
+    display: flex;
+    overflow: hidden;
+    .drawerItem-left-box{
+      width:300px;
+      display: flex;
+      padding:20px;
+      border-right:1px solid #dedede;
+      flex-direction: column;
+      overflow: hidden;
+      .drawerItem-left-form{
+
+      }
+      .drawerItem-left-list-box{
+        flex:1;
+        p{
+          line-height:40px;
+          font-size:16px;
+          color:#333;
+          cursor: pointer;
+        }
+        .checkIndex{
+          color:#0183fa!important;
+        }
+      }
+    }
+    .drawerItem-right-box{
+      flex:1;
+      display: flex;
+      flex-direction: column;
+      overflow: hidden;
+      .drawerItem-right-form{
+        display: flex;
+        margin:20px 0 0 20px;
+        .el-form-item{
+          margin-right:10px;
+        }
+      }
+      .table-top-button-box{
+        display: inline-block;
+        vertical-align: top;
+        margin-right:10px;
+        margin-left:0;
+        div{
+          display: flex;
+          p{
+            border:1px solid #DCDFE6;
+            width:80px;
+            text-align: center;
+            height:40px;
+            line-height:40px;
+            cursor: pointer;
+            font-size:14px;
+          }
+          p:nth-child(1){
+            border-top-left-radius:4px;
+            border-bottom-left-radius:4px;
+          }
+          p:nth-child(2){
+            border-left:none;
+            border-right:none;
+          }
+          p:nth-child(3){
+            border-top-right-radius:4px;
+            border-bottom-right-radius:4px;
+          }
+          .check-table-button{
+            border:1px solid #0183fa;
+            background-color: #0183fa;
+            color:#fff;
+          }
+        }
+      }
+      .page-content-box{
+        padding-top:0;
+        .right-bottom-button-box{
+          display: flex;
+          .null-p{
+            flex:1;
+          }
+          .drawer-item-button-1{
+            background-color: #dedede;
+            border-radius:4px;
+            margin-right:20px;
+            margin-top:15px;
+            line-height:40px;
+            width:80px;
+            text-align: center;
+            font-size:14px;
+            color:#333;
+            cursor: pointer;
+          }
+          .drawer-item-button-2{
+            background-color: #0183fa;
+            border-radius:4px;
+            margin-right:20px;
+            margin-top:15px;
+            line-height:40px;
+            width:80px;
+            text-align: center;
+            font-size:14px;
+            color:#fff;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 2 - 2
src/views/safetyEducationExaminationNew/courseManagement/courseManagement/index.vue

@@ -5,7 +5,7 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-button-box">
+          <div class="table-top-button-box">
             <div>
               <p :class="tableType == 1?'check-table-button':''" @click="tableTypeButton(1)">全部</p>
               <p :class="tableType == 2?'check-table-button':''" @click="tableTypeButton(2)">共享</p>
@@ -261,7 +261,7 @@
   }
   .courseManagement{
     .courseManagementPage{
-      .table-button-box{
+      .table-top-button-box{
         display: inline-block;
         vertical-align: top;
         margin-right:10px;

+ 22 - 10
src/views/safetyEducationExaminationNew/courseManagement/courseManagement/studyCourses.vue

@@ -57,14 +57,13 @@
     </div>
     <el-drawer
       size="100%"
-      class="courseManagement-drawer"
+      custom-class="courseManagement-drawer"
       :append-to-body="true"
       title="选择课件"
+      ref="drawer"
       :visible.sync="drawer"
       direction="rtl">
-      <div class="el-drawer-content scrollbar-box">
-
-      </div>
+      <drawerItem ref="drawerItem"></drawerItem>
     </el-drawer>
   </div>
 </template>
@@ -73,8 +72,12 @@
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
+  import drawerItem from "./drawerItem.vue";
   export default {
     name: 'studyCourses',
+    components: {
+      drawerItem,
+    },
     props:{
       propsData:{},
     },
@@ -148,6 +151,14 @@
 
     },
     methods:{
+      //弹窗返回
+      drawerReturnButton(){
+        this.$refs.drawer.closeDrawer();
+      },
+      //弹窗确定
+      drawerConfirmButton(){
+        this.$refs.drawer.closeDrawer();
+      },
       //添加大项
       addBigItem(){
         this.$set(this,'drawer',true);
@@ -461,12 +472,13 @@
     }
   }
 </style>
-<style>
-.courseManagement-studyCourses{
-  .el-drawer-content{
-    display: flex;
-    flex:1;
-    flex-direction: column;
+<style lang="scss">
+.courseManagement-drawer{
+  .el-drawer__body{
+    padding:0;
+  }
+  .el-drawer__header{
+    margin:0;
   }
 }
 </style>

+ 14 - 14
src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/addPage.vue

@@ -12,8 +12,8 @@
         <div class="form-big-box">
           <div class="form-box">
             <div class="form-flex-box">
-              <el-form-item label="类型" prop="data1">
-                <el-select v-model="newData.data1" @change="changeUpDataNumType" placeholder="请选择课件类型" style="width: 400px">
+              <el-form-item label="类型" prop="materialType">
+                <el-select v-model="newData.materialType" @change="changeUpDataNumType" placeholder="请选择课件类型" style="width: 400px">
                   <el-option
                     v-for="dict in optionListA"
                     :key="dict.value"
@@ -58,7 +58,7 @@
               </el-form-item>
             </div>
           </div>
-          <div class="form-box" v-if="newData.data1 == 1">
+          <div class="form-box" v-if="newData.materialType == 1">
             <el-form-item label="视频上传" prop="data41">
               <div class="form-flex-box">
                 <uploader
@@ -87,12 +87,12 @@
               </div>
             </el-form-item>
           </div>
-          <div class="form-box" v-if="newData.data1 == 1">
+          <div class="form-box" v-if="newData.materialType == 1">
             <el-form-item label="">
               <el-input v-model="newData.data411" placeholder="添加视频水印文字" maxLength="20" style="width:960px;"></el-input>
             </el-form-item>
           </div>
-          <div class="form-box" v-if="newData.data1 == 2">
+          <div class="form-box" v-if="newData.materialType == 2">
             <el-form-item label="文档上传" prop="data42">
               <div class="form-flex-box">
                 <el-upload
@@ -107,7 +107,7 @@
                   <i class="el-icon-upload"></i>
                   <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
                   <p style="line-height:25px;color:#333;">上传文件大小不超过1G</p>
-                  <p style="line-height:25px;color:#333;">支持dox/xlsx/pdf格式文档</p>
+                  <p style="line-height:25px;color:#333;">支持docx/xlsx/pdf格式文档</p>
                   <p style="line-height:25px;color:#333;">支持批量上传文档</p>
                 </el-upload>
                 <div class="for-up-list-box scrollbar-box">
@@ -120,7 +120,7 @@
               </div>
             </el-form-item>
           </div>
-          <div class="form-box" v-if="newData.data1 == 3">
+          <div class="form-box" v-if="newData.materialType == 3">
             <el-form-item label="文章内容" prop="data43">
               <div class="rich-text" >
                 <UEditor ref="UEditor" :content="newData.data43" :min-height="192" :width="960" :height="330"/>
@@ -222,11 +222,11 @@
         upDataNumType:false,
         //页面状态
         buttonType:1,
-        optionListA:[{label:'视频类',value:'1'},{label:'文档类',value:'2'},{label:'文章类',value:'3'}],
+        optionListA:[{value:1,label:'视频'},{value:3,label:'文档'},{value:4,label:'文章'}],
         optionListB:[],
         optionListC:[],
         newData:{
-          data1:null,
+          materialType:null,
           data2:null,
           data3:null,
           data41:'',
@@ -242,7 +242,7 @@
           data11:true,
         },
         rules:{
-          data1: [
+          materialType: [
             { required: true, message: "请选择课件类型", trigger: "blur" },
             { required: true, message: "请选择课件类型", validator: this.spaceJudgment, trigger: "blur" }
           ],
@@ -342,7 +342,7 @@
       },
       //提交
       submitButton(){
-        if(this.newData.data1 == 3){
+        if(this.newData.materialType == 3){
           this.$set(this.newData,'data43',escape(this.$refs.UEditor.text));
         }
         this.$refs["form"].validate(valid => {
@@ -353,7 +353,7 @@
       },
       //类型切换
       changeUpDataNumType(){
-        if(this.newData.data1 == 2){
+        if(this.newData.materialType == 2){
           if(this.newData.data42[1]){
             this.$set(this,'upDataNumType',true);
           }else{
@@ -366,7 +366,7 @@
       //删除文档
       delList(index){
         this.newData.data42.splice(index,1);
-        if(this.newData.data1 == 2){
+        if(this.newData.materialType == 2){
           if(this.newData.data42[1]){
             this.$set(this,'upDataNumType',true);
           }else{
@@ -381,7 +381,7 @@
           return
         }
         this.newData.data42.push(res.data);
-        if(this.newData.data1 == 2){
+        if(this.newData.materialType == 2){
           if(this.newData.data42[1]){
             this.$set(this,'upDataNumType',true);
           }else{

+ 11 - 27
src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/index.vue

@@ -5,15 +5,15 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-button-box">
+          <div class="table-top-button-box">
             <div>
               <p :class="tableType == 1?'check-table-button':''" @click="tableTypeButton(1)">全部</p>
               <p :class="tableType == 2?'check-table-button':''" @click="tableTypeButton(2)">共享</p>
               <p :class="tableType == 3?'check-table-button':''" @click="tableTypeButton(3)">不共享</p>
             </div>
           </div>
-          <el-form-item label="" prop="queryParamsData1">
-            <el-select v-model="queryParams.queryParamsData1" placeholder="课件类型" style="width: 200px">
+          <el-form-item label="" prop="materialType">
+            <el-select v-model="queryParams.materialType" placeholder="课件类型" style="width: 200px">
               <el-option
                 v-for="dict in optionListA"
                 :key="dict.value"
@@ -55,11 +55,8 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-             v-hasPermiRouter="['demo:demo:add']"
+             v-hasPermiRouter="['exam:courseware:add']"
           >添加课件</p>
-          <el-form-item v-hasPermiRouter="['demo:demo:demo']">
-            <import-component :importConfig="importConfig"></import-component>
-          </el-form-item>
         </el-form>
       </div>
       <div class="page-content-box">
@@ -91,11 +88,11 @@
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-                   v-hasPermiRouter="['demo:demo:edit']"
+                   v-hasPermiRouter="['exam:courseware:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-                   v-hasPermiRouter="['demo:demo:del']"
+                   v-hasPermiRouter="['exam:courseware:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -115,7 +112,6 @@
   </div>
 </template>
 <script>
-  import importComponent from "@/components/importComponent/importComponent.vue";
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
@@ -124,17 +120,16 @@
     name: 'index',
     components: {
       addPage,
-      importComponent,
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['exam:courseware:edit','exam:courseware:del',]),
         //页面状态
         pageType:1,
         //页面遮罩
         loading:false,
         //下拉列表数据
-        optionListA:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        optionListA:[{value:1,label:'视频'},{value:3,label:'文档'},{value:4,label:'文章'}],
         optionListB:[{value:true,label:'启用'},{value:false,label:'停用'}],
         optionListC:[{value:true,label:'启用'},{value:false,label:'停用'}],
         //查询条件
@@ -142,7 +137,7 @@
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
+          materialType:"",
           queryParamsData2 :null,
         },
         //列表数据
@@ -151,17 +146,6 @@
         total:0,
         //组件传参
         propsData:{},
-        //导入配置
-        importConfig:{
-          upLoadApi:'/system/user/student/importData',                //上传接口地址
-          downloadApi:'/system/user/student/importTemplate',          //下载模板接口地址
-          downloadCustomKey:null,                                     //下载模板自定义参数KEY(非必填)
-          downloadCustomValue:null,                                   //下载模板自定义参数VALUE(非必填)
-          loseApi:'/system/user/student/importErrorData',             //失败报表接口地址
-          loseCustomKey:null,                                         //失败报表自定义参数KEY(非必填)
-          loseCustomValue:null,                                       //失败报表自定义参数VALUE(非必填)
-          fileName:'导入模板-',                                       //下载模板命名
-        },
       }
     },
     created () {
@@ -188,7 +172,7 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
+          materialType:"",
           queryParamsData2 :null,
         });
         this.getList();
@@ -266,7 +250,7 @@
   }
   .coursewareManagement{
     .coursewareManagementPage{
-      .table-button-box{
+      .table-top-button-box{
         display: inline-block;
         vertical-align: top;
         margin-right:10px;

+ 243 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationArrange/index.vue

@@ -0,0 +1,243 @@
+<!-- 考试安排 -->
+<template>
+  <div class="app-container examinationArrange">
+    <div class="page-container examinationArrangePage" v-if="pageType === 1">
+      <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="queryParamsData1">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData1"
+              placeholder="请输入"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
+              <el-option
+                v-for="dict in optionList"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >新增</p>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="名称" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-switch
+                @click.native="tableButton(5,scope.row)"
+                class="switch captcha-img"
+                :active-value="true"
+                :inactive-value="false"
+                active-color="#0183FA"
+                inactive-color="#999"
+                v-model="scope.row.state"
+                active-text="启用"
+                inactive-text="停用"
+                disabled
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(2,scope.row)"
+                   v-hasPermiRouter="['demo:demo:detail']"
+                >详情</p>
+                <p class="table-button-p"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['demo:demo:edit']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['demo:demo:del']"
+                >删除</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>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .examinationArrange{
+    .examinationArrangePage{
+
+    }
+  }
+</style>

+ 243 - 0
src/views/safetyEducationExaminationNew/examManagement/examinationResult/index.vue

@@ -0,0 +1,243 @@
+<!-- 考试结果 -->
+<template>
+  <div class="app-container examinationResult">
+    <div class="page-container examinationResultPage" v-if="pageType === 1">
+      <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="queryParamsData1">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData1"
+              placeholder="请输入"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
+              <el-option
+                v-for="dict in optionList"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >新增</p>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="名称" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-switch
+                @click.native="tableButton(5,scope.row)"
+                class="switch captcha-img"
+                :active-value="true"
+                :inactive-value="false"
+                active-color="#0183FA"
+                inactive-color="#999"
+                v-model="scope.row.state"
+                active-text="启用"
+                inactive-text="停用"
+                disabled
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(2,scope.row)"
+                   v-hasPermiRouter="['demo:demo:detail']"
+                >详情</p>
+                <p class="table-button-p"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['demo:demo:edit']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['demo:demo:del']"
+                >删除</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>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .examinationResult{
+    .examinationResultPage{
+
+    }
+  }
+</style>

+ 243 - 0
src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/index.vue

@@ -0,0 +1,243 @@
+<!-- 试卷管理 -->
+<template>
+  <div class="app-container testPaperManagement">
+    <div class="page-container testPaperManagementPage" v-if="pageType === 1">
+      <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="queryParamsData1">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData1"
+              placeholder="请输入"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
+              <el-option
+                v-for="dict in optionList"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >新增</p>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="名称" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="内容" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="状态" prop="state" width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-switch
+                @click.native="tableButton(5,scope.row)"
+                class="switch captcha-img"
+                :active-value="true"
+                :inactive-value="false"
+                active-color="#0183FA"
+                inactive-color="#999"
+                v-model="scope.row.state"
+                active-text="启用"
+                inactive-text="停用"
+                disabled
+              ></el-switch>
+            </template>
+          </el-table-column>
+          <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(2,scope.row)"
+                   v-hasPermiRouter="['demo:demo:detail']"
+                >详情</p>
+                <p class="table-button-p"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['demo:demo:edit']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['demo:demo:del']"
+                >删除</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>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .testPaperManagement{
+    .testPaperManagementPage{
+
+    }
+  }
+</style>

+ 51 - 60
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/classHoursConfiguration.vue

@@ -5,28 +5,21 @@
       <el-form class="add-form-box" :model="newData" ref="form" :rules="rules" label-width="120px">
         <p class="title-p">学时计算</p>
         <div class="form-big-box">
-          <el-form-item label="" prop="data1" label-width="0">
+          <el-form-item label="" label-width="0">
             <div class="form-min-box">
-              <el-input-number  class="form-input-number"
-                                style="width:60px"
-                                :min="0"
-                                :max="9999"
-                                :step="1" :precision="0" step-strictly
-                                v-model="newData.data1"
-                                :controls="false">
-              </el-input-number>
+              <p class="form-min-left-p">1</p>
               <p class="form-min-p">分钟</p>
             </div>
           </el-form-item>
           <p class="form-text-p" style="margin:0 18px;">=</p>
-          <el-form-item label="" prop="data9" label-width="0">
+          <el-form-item label="" prop="studyHours" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data2">
+                                v-model="newData.studyHours">
               </el-input-number>
               <p class="form-min-p">学时</p>
             </div>
@@ -38,14 +31,14 @@
         </div>
         <div class="form-big-box">
           <p class="form-text-p" style="margin:0 20px 0 0;">重复学习同一课件超过</p>
-          <el-form-item label="" prop="data3" label-width="0">
+          <el-form-item label="" prop="repeatGetStudyDay" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data3">
+                                v-model="newData.repeatGetStudyDay">
               </el-input-number>
               <p class="form-min-p">学时</p>
             </div>
@@ -55,28 +48,21 @@
         <p class="border-top"></p>
         <p class="title-p">积分计算</p>
         <div class="form-big-box">
-          <el-form-item label="" prop="data4" label-width="0">
+          <el-form-item label="" label-width="0">
             <div class="form-min-box">
-              <el-input-number  class="form-input-number"
-                                style="width:60px"
-                                :min="0"
-                                :max="9999"
-                                :step="1" :precision="0" step-strictly
-                                v-model="newData.data4"
-                                :controls="false">
-              </el-input-number>
+              <p class="form-min-left-p">1</p>
               <p class="form-min-p">分钟</p>
             </div>
           </el-form-item>
           <p class="form-text-p" style="margin:0 18px;">=</p>
-          <el-form-item label="" prop="data5" label-width="0">
+          <el-form-item label="" prop="studuHoursPoint" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data5">
+                                v-model="newData.studuHoursPoint">
               </el-input-number>
               <p class="form-min-p">积分</p>
             </div>
@@ -87,28 +73,21 @@
           </div>
         </div>
         <div class="form-big-box">
-          <el-form-item label="" prop="data6" label-width="0">
+          <el-form-item label="" label-width="0">
             <div class="form-min-box">
-              <el-input-number  class="form-input-number"
-                                style="width:60px"
-                                :min="0"
-                                :max="9999"
-                                :step="1" :precision="0" step-strictly
-                                v-model="newData.data6"
-                                :controls="false">
-              </el-input-number>
+              <p class="form-min-left-p">1</p>
               <p class="form-min-p">分</p>
             </div>
           </el-form-item>
           <p class="form-text-p" style="margin:0 18px;">=</p>
-          <el-form-item label="" prop="data7" label-width="0">
+          <el-form-item label="" prop="examScorePoint" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="1" :precision="0" step-strictly
-                                v-model="newData.data7">
+                                v-model="newData.examScorePoint">
               </el-input-number>
               <p class="form-min-p">积分</p>
             </div>
@@ -119,28 +98,21 @@
           </div>
         </div>
         <div class="form-big-box">
-          <el-form-item label="" prop="data8" label-width="0">
+          <el-form-item label="" label-width="0">
             <div class="form-min-box">
-              <el-input-number  class="form-input-number"
-                                style="width:60px"
-                                :min="0"
-                                :max="9999"
-                                :step="1" :precision="0" step-strictly
-                                v-model="newData.data8"
-                                :controls="false">
-              </el-input-number>
+              <p class="form-min-left-p">1</p>
               <p class="form-min-p">个试题</p>
             </div>
           </el-form-item>
           <p class="form-text-p" style="margin:0 18px;">=</p>
-          <el-form-item label="" prop="data9" label-width="0">
+          <el-form-item label="" prop="practisePoint" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="1" :precision="0" step-strictly
-                                v-model="newData.data9">
+                                v-model="newData.practisePoint">
               </el-input-number>
               <p class="form-min-p">积分</p>
             </div>
@@ -152,14 +124,14 @@
         </div>
         <div class="form-big-box">
           <p class="form-text-p" style="margin:0 20px 0 0;">重复学习同一课件超过</p>
-          <el-form-item label="" prop="data10" label-width="0">
+          <el-form-item label="" prop="repeatGetPointDat" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
                                 :max="9999"
                                 :step="1" :precision="0" step-strictly
-                                v-model="newData.data10">
+                                v-model="newData.repeatGetPointDat">
               </el-input-number>
               <p class="form-min-p">学时</p>
             </div>
@@ -175,6 +147,7 @@
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
+  import { examElConfigValueMap,examElConfigSave } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'classHoursConfiguration',
     props:{
@@ -183,16 +156,12 @@
     data(){
       return{
         newData:{
-          data1:0,
-          data2:0,
-          data3:0,
-          data4:0,
-          data5:0,
-          data6:0,
-          data7:0,
-          data8:0,
-          data9:0,
-          data10:0,
+          studyHours:0,
+          repeatGetStudyDay:0,
+          studuHoursPoint:0,
+          examScorePoint:0,
+          practisePoint:0,
+          repeatGetPointDat:0,
         },
         rules:{},
       }
@@ -204,6 +173,11 @@
 
     },
     methods:{
+      initialize(){
+        examElConfigValueMap({configType:2}).then(response => {
+          this.$set(this,'newData',response.data);
+        });
+      },
       //重置
       resetButton(){
         let self = this;
@@ -213,7 +187,7 @@
           type: "warning"
         }).then(function() {
         }).then(() => {
-
+          this.initialize();
         }).catch(() => {});
       },
       //提交
@@ -227,7 +201,15 @@
               type: "warning"
             }).then(function() {
             }).then(() => {
-
+              const list = Object.entries(self.newData).map(([key, value]) => ({
+                configType: 2,
+                configCode: key,
+                configValue: value // 确保 configValue 是字符串类型
+              }));
+              examElConfigSave(list).then(response => {
+                self.msgSuccess(response.message);
+                self.initialize();
+              });
             }).catch(() => {});
           }
         })
@@ -270,6 +252,15 @@
             border-top-right-radius: 0;
             border-bottom-right-radius:0;
           }
+          .form-min-left-p{
+            width:60px;
+            background-color: #fff;
+            border:1px solid #DCDFE6;
+            text-align: center;
+            border-top-left-radius: 4px;
+            border-bottom-left-radius: 4px;
+            line-height: 40px;
+          }
           .form-min-p{
             width:72px;
             background-color: #DCDFE6;

+ 32 - 19
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/examinationConfiguration.vue

@@ -2,10 +2,10 @@
 <template>
   <div class="page-container basicConfiguration-examinationConfiguration">
     <div class="top-box">
-      <el-form class="add-form-box" :model="newData" ref="form" :rules="rules" label-width="">
-        <el-form-item label="" prop="name">
+      <el-form class="add-form-box" :model="newData" ref="form" label-width="">
+        <el-form-item label="" prop="examTypeName">
           <div style="display: flex">
-            <el-input v-model="newData.name" placeholder="输入考试类型名称" maxLength="20" style="width:500px;"></el-input>
+            <el-input v-model="newData.examTypeName" placeholder="输入考试类型名称" maxLength="20" style="width:500px;"></el-input>
             <p class="form-button" @click="addButton()">+ 添加</p>
           </div>
         </el-form-item>
@@ -15,12 +15,12 @@
     <div class="bottom-box scrollbar-box">
       <div class="for-box" v-for="(item,index) in dataList" :key="index">
         <div class="input-box" v-if="editorIndex === index">
-          <el-input v-model="item.name" placeholder="输入考试类型名称"
+          <el-input v-model="item.examTypeName" placeholder="输入考试类型名称"
                     maxLength="20" style="flex:1;margin:10px 0 10px 5px;"></el-input>
           <p @click="confirmButton()">确定</p>
         </div>
         <div class="text-box" v-else>
-          <p>{{item.name}}</p>
+          <p>{{item.examTypeName}}</p>
           <p @click="editorButton(index)">修改</p>
           <p @click="delButton(index)">删除</p>
         </div>
@@ -32,7 +32,7 @@
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import { examElExamTypeList,examElExamTypeBbatchSave } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'examinationConfiguration',
     props:{
@@ -40,13 +40,10 @@
     },
     data(){
       return{
-        newData:{},
-        dataList:[
-          {name:'常规类型'},{name:'分级分类'},{name:'新生入学'},
-          {name:'常规类型'},{name:'分级分类'},{name:'新生入学'},
-          {name:'常规类型'},{name:'分级分类'},{name:'新生入学'},
-          {name:'常规类型'},{name:'分级分类'},{name:'新生入学'},
-        ],
+        newData:{
+          examTypeName:'',
+        },
+        dataList:[],
         editorIndex:null,
       }
     },
@@ -57,13 +54,18 @@
 
     },
     methods:{
+      initialize(){
+        examElExamTypeList({}).then(response => {
+          this.$set(this,'dataList',response.data);
+        });
+      },
       //修改按钮
       editorButton(index){
         this.$set(this,'editorIndex',index);
       },
       //确定
       confirmButton(){
-        if(!this.dataList[this.editorIndex].name){
+        if(!this.dataList[this.editorIndex].examTypeName){
           this.msgError('输入考试类型名称')
           return
         }
@@ -73,14 +75,14 @@
         this.dataList.splice(index,1)
       },
       addButton(){
-        if(!this.newData.name){
+        if(!this.newData.examTypeName){
           this.msgError('输入考试类型名称')
           return
         }
         this.dataList.push({
-          name:this.newData.name
+          examTypeName:this.newData.examTypeName
         })
-        this.$set(this.newData,'name','');
+        this.$set(this.newData,'examTypeName','');
       },
       //重置
       resetButton(){
@@ -91,7 +93,7 @@
           type: "warning"
         }).then(function() {
         }).then(() => {
-
+          this.initialize();
         }).catch(() => {});
       },
       //提交
@@ -107,7 +109,18 @@
           type: "warning"
         }).then(function() {
         }).then(() => {
-
+          let list = [];
+          for(let i=0;i<self.dataList.length;i++){
+            let obj = {
+              id:self.dataList[i].id?self.dataList[i].id:'',
+              examTypeName:self.dataList[i].examTypeName,
+            }
+            list.push(obj);
+          }
+          examElExamTypeBbatchSave(list).then(response => {
+            self.msgSuccess(response.message);
+            self.initialize();
+          });
         }).catch(() => {});
       },
     },

+ 52 - 38
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/gradingConfiguration.vue

@@ -4,14 +4,14 @@
     <div class="content-box scrollbar-box">
       <el-form class="add-form-box" :model="newData" ref="form"
                :rules="rules">
-        <el-form-item label="学时计算" prop="data1" label-width="112px">
+        <el-form-item label="学时计算" prop="gradeStudyHour" label-width="112px">
           <div class="form-min-box">
             <el-input-number  class="form-input-number"
                               style="width:100px"
                               :min="0"
                               :max="9999"
                               :step="1" :precision="0" step-strictly
-                              v-model="newData.data1"
+                              v-model="newData.gradeStudyHour"
                               :controls="false">
             </el-input-number>
             <p class="form-min-p">分钟</p>
@@ -20,26 +20,26 @@
         </el-form-item>
         <p class="title-1-p">Ⅰ级分级</p>
         <div class="form-flex-box">
-          <el-form-item label="第一学年完成不少于" prop="data2" label-width="182px">
+          <el-form-item label="第一学年完成不少于" prop="levelOneInitMinHour" label-width="182px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data2">
+                                v-model="newData.levelOneInitMinHour">
               </el-input-number>
               <p class="form-min-p">学时,</p>
             </div>
           </el-form-item>
-          <el-form-item label="后续每学年完成不少于" prop="data3" label-width="170px">
+          <el-form-item label="后续每学年完成不少于" prop="levelOneFollowMinHour" label-width="170px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data3">
+                                v-model="newData.levelOneFollowMinHour">
               </el-input-number>
               <p class="form-min-p">学时学习</p>
             </div>
@@ -47,26 +47,26 @@
         </div>
         <p class="title-2-p">Ⅱ级分级</p>
         <div class="form-flex-box">
-          <el-form-item label="第一学年完成不少于" prop="data4" label-width="182px">
+          <el-form-item label="第一学年完成不少于" prop="leveltwoInitMinHour" label-width="182px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data4">
+                                v-model="newData.leveltwoInitMinHour">
               </el-input-number>
               <p class="form-min-p">学时,</p>
             </div>
           </el-form-item>
-          <el-form-item label="后续每学年完成不少于" prop="data5" label-width="170px">
+          <el-form-item label="后续每学年完成不少于" prop="levelTwoFollowMinHour" label-width="170px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data5">
+                                v-model="newData.levelTwoFollowMinHour">
               </el-input-number>
               <p class="form-min-p">学时学习</p>
             </div>
@@ -74,26 +74,26 @@
         </div>
         <p class="title-3-p">Ⅲ级分级</p>
         <div class="form-flex-box">
-          <el-form-item label="第一学年完成不少于" prop="data6" label-width="182px">
+          <el-form-item label="第一学年完成不少于" prop="levelThreeInitMinHour" label-width="182px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data6">
+                                v-model="newData.levelThreeInitMinHour">
               </el-input-number>
               <p class="form-min-p">学时,</p>
             </div>
           </el-form-item>
-          <el-form-item label="后续每学年完成不少于" prop="data7" label-width="170px">
+          <el-form-item label="后续每学年完成不少于" prop="levelThreeFollowMinHour" label-width="170px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data7">
+                                v-model="newData.levelThreeFollowMinHour">
               </el-input-number>
               <p class="form-min-p">学时学习</p>
             </div>
@@ -101,26 +101,26 @@
         </div>
         <p class="title-4-p">Ⅳ级分级</p>
         <div class="form-flex-box">
-          <el-form-item label="第一学年完成不少于" prop="data8" label-width="182px">
+          <el-form-item label="第一学年完成不少于" prop="levelFourInitMinHour" label-width="182px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data8">
+                                v-model="newData.levelFourInitMinHour">
               </el-input-number>
               <p class="form-min-p">学时,</p>
             </div>
           </el-form-item>
-          <el-form-item label="后续每学年完成不少于" prop="data9" label-width="170px">
+          <el-form-item label="后续每学年完成不少于" prop="levelFourFollowMinHour" label-width="170px">
             <div class="form-min-box-2">
               <el-input-number  class="form-input-number"
                                 style="width:260px"
                                 :min="0"
                                 :max="9999"
                                 :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data9">
+                                v-model="newData.levelFourFollowMinHour">
               </el-input-number>
               <p class="form-min-p">学时学习</p>
             </div>
@@ -135,6 +135,7 @@
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
+  import { examElConfigValueMap,examElConfigSave } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'gradingConfiguration',
     props:{
@@ -143,50 +144,50 @@
     data(){
       return{
         newData:{
-          data1:0,
-          data2:0,
-          data3:0,
-          data4:0,
-          data5:0,
-          data6:0,
-          data7:0,
-          data8:0,
-          data9:0,
+          gradeStudyHour:0,
+          levelOneInitMinHour:0,
+          levelOneFollowMinHour:0,
+          leveltwoInitMinHour:0,
+          levelTwoFollowMinHour:0,
+          levelThreeInitMinHour:0,
+          levelThreeFollowMinHour:0,
+          levelFourInitMinHour:0,
+          levelFourFollowMinHour:0,
         },
         rules:{
-          // data1: [
+          // gradeStudyHour: [
           //   { required: true, message: "请输入学时计算", trigger: "blur" },
           //   { required: true, message: "请输入学时计算", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data2: [
+          // levelOneInitMinHour: [
           //   { required: true, message: "请输入第一学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入第一学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data3: [
+          // levelOneFollowMinHour: [
           //   { required: true, message: "请输入后续每学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入后续每学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data4: [
+          // leveltwoInitMinHour: [
           //   { required: true, message: "请输入第二学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入第二学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data5: [
+          // levelTwoFollowMinHour: [
           //   { required: true, message: "请输入后续每学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入后续每学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data6: [
+          // levelThreeInitMinHour: [
           //   { required: true, message: "请输入第三学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入第三学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data7: [
+          // levelThreeFollowMinHour: [
           //   { required: true, message: "请输入后续每学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入后续每学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data8: [
+          // levelFourInitMinHour: [
           //   { required: true, message: "请输入第四学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入第四学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
-          // data9: [
+          // levelFourFollowMinHour: [
           //   { required: true, message: "请输入后续每学年完成所需学时", trigger: "blur" },
           //   { required: true, message: "请输入后续每学年完成所需学时", validator: this.spaceJudgment, trigger: "blur" }
           // ],
@@ -200,6 +201,11 @@
 
     },
     methods:{
+      initialize(){
+        examElConfigValueMap({configType:1}).then(response => {
+          this.$set(this,'newData',response.data);
+        });
+      },
       //重置
       resetButton(){
         let self = this;
@@ -209,7 +215,7 @@
           type: "warning"
         }).then(function() {
         }).then(() => {
-
+          this.initialize();
         }).catch(() => {});
       },
       //提交
@@ -223,7 +229,15 @@
               type: "warning"
             }).then(function() {
             }).then(() => {
-
+              const list = Object.entries(self.newData).map(([key, value]) => ({
+                configType: 1,
+                configCode: key,
+                configValue: value // 确保 configValue 是字符串类型
+              }));
+              examElConfigSave(list).then(response => {
+                self.msgSuccess(response.message);
+                self.initialize();
+              });
             }).catch(() => {});
           }
         })

+ 18 - 10
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/index.vue

@@ -13,9 +13,10 @@
            v-for="(item,index) in buttonList" :key="index">{{item.name}}</p>
       </div>
       <examinationConfiguration ref="examinationConfiguration" class="right-max-big-box" v-if="buttonType == 1"></examinationConfiguration>
-      <gradingConfiguration ref="gradingConfiguration" class="right-max-big-box" v-if="buttonType == 2"></gradingConfiguration>
-      <classHoursConfiguration ref="classHoursConfiguration" class="right-max-big-box" v-if="buttonType == 3"></classHoursConfiguration>
-      <otherConfiguration ref="otherConfiguration" class="right-max-big-box" v-if="buttonType == 4"></otherConfiguration>
+      <specialtyConfiguration ref="specialtyConfiguration" class="right-max-big-box" v-if="buttonType == 2"></specialtyConfiguration>
+      <gradingConfiguration ref="gradingConfiguration" class="right-max-big-box" v-if="buttonType == 3"></gradingConfiguration>
+      <classHoursConfiguration ref="classHoursConfiguration" class="right-max-big-box" v-if="buttonType == 4"></classHoursConfiguration>
+      <otherConfiguration ref="otherConfiguration" class="right-max-big-box" v-if="buttonType == 5"></otherConfiguration>
     </div>
   </div>
 </template>
@@ -24,6 +25,7 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   import examinationConfiguration from "./examinationConfiguration.vue";
+  import specialtyConfiguration from "./specialtyConfiguration.vue";
   import gradingConfiguration from "./gradingConfiguration.vue";
   import classHoursConfiguration from "./classHoursConfiguration.vue";
   import otherConfiguration from "./otherConfiguration.vue";
@@ -31,6 +33,7 @@
     name: 'index',
     components: {
       examinationConfiguration,
+      specialtyConfiguration,
       gradingConfiguration,
       classHoursConfiguration,
       otherConfiguration,
@@ -43,9 +46,10 @@
         //菜单按钮
         buttonList:[
           {name:'考试类型配置',value:'1'},
-          {name:'分级要求配置',value:'2'},
-          {name:'学时积分配置',value:'3'},
-          {name:'其他配置',value:'4'},
+          {name:'专业类别配置',value:'2'},
+          {name:'分级要求配置',value:'3'},
+          {name:'学时积分配置',value:'4'},
+          {name:'其他配置',value:'5'},
         ],
       }
     },
@@ -65,10 +69,12 @@
         if(this.buttonType == 1){
           this.$refs.examinationConfiguration.resetButton();
         }else if(this.buttonType == 2){
-          this.$refs.gradingConfiguration.resetButton();
+          this.$refs.specialtyConfiguration.resetButton();
         }else if(this.buttonType == 3){
-          this.$refs.classHoursConfiguration.resetButton();
+          this.$refs.gradingConfiguration.resetButton();
         }else if(this.buttonType == 4){
+          this.$refs.classHoursConfiguration.resetButton();
+        }else if(this.buttonType == 5){
           this.$refs.otherConfiguration.resetButton();
         }
       },
@@ -77,10 +83,12 @@
         if(this.buttonType == 1){
           this.$refs.examinationConfiguration.submitButton();
         }else if(this.buttonType == 2){
-          this.$refs.gradingConfiguration.submitButton();
+          this.$refs.specialtyConfiguration.submitButton();
         }else if(this.buttonType == 3){
-          this.$refs.classHoursConfiguration.submitButton();
+          this.$refs.gradingConfiguration.submitButton();
         }else if(this.buttonType == 4){
+          this.$refs.classHoursConfiguration.submitButton();
+        }else if(this.buttonType == 5){
           this.$refs.otherConfiguration.submitButton();
         }
       },

+ 21 - 7
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/otherConfiguration.vue

@@ -6,14 +6,14 @@
         <p class="title-p">课件资料文件上传设置</p>
         <div class="form-big-box">
           <p class="form-text-p" style="margin:0 20px 0 0;">课件文件限制默认最大上传</p>
-          <el-form-item label="" prop="data1" label-width="0">
+          <el-form-item label="" prop="uploadMaxSize" label-width="0">
             <div class="form-min-box">
               <el-input-number  class="form-input-number"
                                 style="width:160px"
                                 :min="0"
-                                :max="9999"
-                                :step="0.1" :precision="1" step-strictly
-                                v-model="newData.data1">
+                                :max="10"
+                                :step="1" :precision="0" step-strictly
+                                v-model="newData.uploadMaxSize">
               </el-input-number>
               <p class="form-min-p">G</p>
             </div>
@@ -28,6 +28,7 @@
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
+  import { examElConfigValueMap,examElConfigSave } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'otherConfiguration',
     props:{
@@ -36,7 +37,7 @@
     data(){
       return{
         newData:{
-          data1:0,
+          uploadMaxSize:0,
         },
       }
     },
@@ -47,6 +48,11 @@
 
     },
     methods:{
+      initialize(){
+        examElConfigValueMap({configType:3}).then(response => {
+          this.$set(this,'newData',response.data);
+        });
+      },
       //重置
       resetButton(){
         let self = this;
@@ -56,7 +62,7 @@
           type: "warning"
         }).then(function() {
         }).then(() => {
-
+          this.initialize();
         }).catch(() => {});
       },
       //提交
@@ -70,7 +76,15 @@
               type: "warning"
             }).then(function() {
             }).then(() => {
-
+              const list = Object.entries(self.newData).map(([key, value]) => ({
+                configType: 3,
+                configCode: key,
+                configValue: value // 确保 configValue 是字符串类型
+              }));
+              examElConfigSave(list).then(response => {
+                self.msgSuccess(response.message);
+                self.initialize();
+              });
             }).catch(() => {});
           }
         })

+ 227 - 0
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/specialtyConfiguration.vue

@@ -0,0 +1,227 @@
+<!--专业类别-->
+<template>
+  <div class="page-container basicConfiguration-specialtyConfiguration">
+    <div class="top-box">
+      <el-form class="add-form-box" :model="newData" ref="form" label-width="">
+        <el-form-item label="" prop="disciplineName">
+          <div style="display: flex">
+            <el-input v-model="newData.disciplineName" placeholder="输入考试类型名称" maxLength="20" style="width:500px;"></el-input>
+            <p class="form-button" @click="addButton()">+ 添加</p>
+          </div>
+        </el-form-item>
+      </el-form>
+    </div>
+    <p class="title-p">专业类别名称</p>
+    <div class="bottom-box scrollbar-box">
+      <div class="for-box" v-for="(item,index) in dataList" :key="index">
+        <div class="input-box" v-if="editorIndex === index">
+          <el-input v-model="item.disciplineName" placeholder="输入考试类型名称"
+                    maxLength="20" style="flex:1;margin:10px 0 10px 5px;"></el-input>
+          <p @click="confirmButton()">确定</p>
+        </div>
+        <div class="text-box" v-else>
+          <p>{{item.disciplineName}}</p>
+          <p @click="editorButton(index)">修改</p>
+          <p @click="delButton(index)">删除</p>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  import { examElDisciplineTypeList,examElDisciplineTypeBatchSave } from "@/api/safetyEducationExaminationNew/index";
+  export default {
+    name: 'specialtyConfiguration',
+    props:{
+      propsData:{},
+    },
+    data(){
+      return{
+        newData:{
+          disciplineName:'',
+        },
+        dataList:[],
+        editorIndex:null,
+      }
+    },
+    created(){
+      this.initialize();
+    },
+    mounted(){
+
+    },
+    methods:{
+      initialize(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'dataList',response.data);
+        });
+      },
+      //修改按钮
+      editorButton(index){
+        this.$set(this,'editorIndex',index);
+      },
+      //确定
+      confirmButton(){
+        if(!this.dataList[this.editorIndex].disciplineName){
+          this.msgError('输入考试类型名称')
+          return
+        }
+        this.$set(this,'editorIndex',null);
+      },
+      delButton(index){
+        this.dataList.splice(index,1)
+      },
+      addButton(){
+        if(!this.newData.disciplineName){
+          this.msgError('输入考试类型名称')
+          return
+        }
+        this.dataList.push({
+          disciplineName:this.newData.disciplineName
+        })
+        this.$set(this.newData,'disciplineName','');
+      },
+      //重置
+      resetButton(){
+        let self = this;
+        this.$confirm('确认重置?', "警告", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          this.initialize();
+        }).catch(() => {});
+      },
+      //提交
+      submitButton(){
+        let self = this;
+        if(this.editorIndex!=null){
+          this.msgError('请确认考试类型名称')
+          return
+        }
+        this.$confirm('确认提交?', "警告", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+        }).then(() => {
+          let list = [];
+          for(let i=0;i<self.dataList.length;i++){
+            let obj = {
+              id:self.dataList[i].id?self.dataList[i].id:'',
+              disciplineName:self.dataList[i].disciplineName,
+            }
+            list.push(obj);
+          }
+          examElDisciplineTypeBatchSave(list).then(response => {
+            self.msgSuccess(response.message);
+            self.initialize();
+          });
+        }).catch(() => {});
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .basicConfiguration-specialtyConfiguration{
+    display: flex;
+    flex-direction: column;
+    flex:1;
+    overflow: hidden;
+    .top-box{
+      height:60px;
+      margin:20px 0 0 40px;
+      .form-button{
+        height:40px;
+        line-height:38px;
+        margin:0 0 0 10px;
+        padding:0 20px;
+        border-radius:4px;
+        background-color: #0183fa;
+        border:1px solid #0183fa;
+        color:#fff;
+        cursor: pointer;
+      }
+    }
+    .title-p{
+      width:600px;
+      line-height:60px;
+      //background-color: #dedede;
+      border-bottom:1px solid #dedede;
+      margin-left:40px;
+      padding-left:20px;
+      font-weight:600;
+    }
+    .bottom-box{
+      flex:1;
+      padding:0 20px 0 20px;
+      .for-box{
+        width:600px;
+        border-bottom:1px solid #dedede;
+        padding:0 20px 0 0;
+        margin-left:20px;
+        .text-box{
+          display: flex;
+          p{
+            font-size:14px;
+          }
+          p:nth-child(1){
+            flex:1;
+            line-height:60px;
+            font-weight:600;
+            margin-left:20px;
+          }
+          p:nth-child(2){
+            height:40px;
+            line-height:38px;
+            margin:10px 0 0 10px;
+            padding:0 20px;
+            border-radius:4px;
+            background-color: #0183fa;
+            border:1px solid #0183fa;
+            color:#fff;
+            cursor: pointer;
+          }
+          p:nth-child(3){
+            height:40px;
+            line-height:38px;
+            margin:10px 0 0 10px;
+            padding:0 20px;
+            border-radius:4px;
+            background-color: #fff;
+            border:1px solid #999;
+            color:#999;
+            cursor: pointer;
+          }
+        }
+        .input-box{
+          display: flex;
+          p{
+            font-size:14px;
+          }
+          p:nth-child(1){
+            flex:1;
+            line-height:60px;
+          }
+          p:nth-child(2){
+            height:40px;
+            line-height:38px;
+            margin:10px 0 0 10px;
+            padding:0 20px;
+            border-radius:4px;
+            background-color: #FF6666;
+            border:1px solid #FF6666;
+            color:#fff;
+            cursor: pointer;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 121 - 72
src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/addPage.vue

@@ -9,59 +9,54 @@
     <div class="content-box">
       <div class="left-content-box">
         <el-form class="add-form-box" :model="newData" ref="form" :rules="rules" label-width="120px">
-          <el-form-item label="证书模板名称" prop="data1" style="margin-top:20px;">
-            <el-input v-model="newData.data1" placeholder="请输入证书模板名称" maxLength="20" style="width:500px;"></el-input>
+          <el-form-item label="证书模板名称" prop="templateName" style="margin-top:20px;">
+            <el-input v-model="newData.templateName" placeholder="请输入证书模板名称" maxLength="20" style="width:500px;"></el-input>
           </el-form-item>
-          <el-form-item label="适用考试类型" prop="data2">
-            <el-select v-model="newData.data2" placeholder="考试类型" style="width: 500px">
+          <el-form-item label="适用考试类型" prop="examTypeId">
+            <el-select v-model="newData.examTypeId" placeholder="请选择考试类型" style="width: 500px">
               <el-option
                 v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                :key="dict.id"
+                :label="dict.examTypeName"
+                :value="dict.id"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="颁发单位" prop="data3">
-            <el-select v-model="newData.data3" placeholder="考试类型" style="width: 500px">
+          <el-form-item label="颁发单位" prop="deptId">
+            <el-select v-model="newData.deptId" placeholder="请选择颁发单位" style="width: 500px">
               <el-option
                 v-for="dict in optionDeptList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="证书模板" prop="data4">
+          <el-form-item label="证书模板" prop="templateWordPath">
             <el-upload
-              class="upload-demo"
-              ref="upload"
               drag
-              :show-file-list="false"
-              :auto-upload="false"
               :action="uploadImgUrl"
+              :show-file-list="false"
+              accept=".docx"
+              :on-success="handleAvatarSuccess"
               :headers="headers"
-              :limit="1"
-              :on-change="handleFileChange"
-              :on-exceed="onExceed"
-              :file-list="newData.data4"
-              accept=".doc, .docx">
+              :before-upload="beforeAvatarUpload">
               <i class="el-icon-upload"></i>
-              <p v-if="newData.data4.length > 0" style="margin-top: 10px; color: #606266;">
-                已选中文件:<strong>{{ newData.data4[0].name }}</strong>
+              <p v-if="upData.length > 0" style="margin-top: 10px; color: #606266;">
+                已选中文件:<strong>{{ upData[0].name }}</strong>
               </p>
               <div v-else class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-              <div class="el-upload__tip" slot="tip">只能上传doc/docx文件,且不超过{{ fileSizeLimit }}MB</div>
+              <div class="el-upload__tip" slot="tip">只能上传docx文件,且不超过{{ fileSizeLimit }}MB</div>
             </el-upload>
           </el-form-item>
-          <el-form-item label="描述说明" prop="data5">
-            <el-input v-model="newData.data5" placeholder="请输入描述说明" maxLength="20" style="width:500px;"></el-input>
+          <el-form-item label="描述说明" prop="description">
+            <el-input v-model="newData.description" placeholder="请输入描述说明" maxLength="20" style="width:500px;"></el-input>
           </el-form-item>
-          <el-form-item label="是否共享" prop="data6">
+          <el-form-item label="是否共享" prop="shareStatus">
             <el-switch
-              :active-value="true"
-              :inactive-value="false"
-              v-model="newData.data6"
+              :active-value="1"
+              :inactive-value="0"
+              v-model="newData.shareStatus"
               active-color="#0183FB"
               inactive-color="#AAAAAA">
             </el-switch>
@@ -86,7 +81,7 @@
   import { getToken } from "@/utils/auth";
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import { examElExamTypeList,systemDeptCurrentDept,examElCertificateTemplateAdd,examElCertificateTemplateEdit } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'addPage',
     props:{
@@ -97,20 +92,36 @@
         fileSizeLimit:20,//文件大小限制
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
-          Authorization: "Bearer " + getToken(),
+          Authorization: getToken(),
         },
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
-        optionDeptList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        upData:[],
+        optionList:[],
+        optionDeptList:[],
         newData:{
-          data1:'',
-          data2:null,
-          data3:null,
-          data4:[],
-          data5:'',
-          data6:false,
+          templateName:'',
+          examTypeId:null,
+          deptId:null,
+          templateWordPath:'',
+          description:'',
+          shareStatus:1,
         },
         rules:{
-
+          templateName: [
+            { required: true, message: "请输入证书模板名称", trigger: "blur" },
+            { required: true, message: "请输入证书模板名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          examTypeId: [
+            { required: true, message: "请选择考试类型", trigger: "blur" },
+            { required: true, message: "请选择考试类型", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          deptId: [
+            { required: true, message: "请选择颁发单位", trigger: "blur" },
+            { required: true, message: "请选择颁发单位", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          templateWordPath: [
+            { required: true, message: "请上传证书模板", trigger: "blur" },
+            { required: true, message: "请上传证书模板", validator: this.spaceJudgment, trigger: "blur" }
+          ],
         },
         textList:[
           {value:'{{name}}',name:'名称'},
@@ -123,9 +134,27 @@
 
     },
     mounted(){
-
+      this.initialize();
+      this.examElExamTypeList();
+      this.systemDeptCurrentDept();
     },
     methods:{
+      initialize(){
+        if(this.propsData.id){
+          this.$set(this,'newData',{
+            id:this.propsData.id,
+            templateName:this.propsData.templateName,
+            examTypeId:this.propsData.examTypeId,
+            deptId:this.propsData.deptId,
+            templateWordPath:this.propsData.templateWordPath,
+            description:this.propsData.description,
+            shareStatus:this.propsData.shareStatus,
+          });
+          this.$set(this,'upData',[{
+            name:this.propsData.templateName+'.docx'
+          }]);
+        }
+      },
       // 返回按钮
       backPage(){
         this.$parent.tableButton(6);
@@ -135,49 +164,57 @@
         let self = this;
         this.$refs["form"].validate(valid => {
           if (valid) {
-
-            self.$refs.upload.submit();
+            if(this.newData.id){
+              this.examElCertificateTemplateEdit();
+            }else{
+              this.examElCertificateTemplateAdd();
+            }
           }
         })
       },
-      // 首次上传
-      handleFileChange(file) {
-        if (!this.checkFileType(file)) {
-          this.$refs.upload.clearFiles();
-          return;
-        }
-        this.$refs.upload.clearFiles();
-        this.newData.data4 = [file];
+      examElCertificateTemplateAdd(){
+        let obj = JSON.parse(JSON.stringify(this.newData));
+        obj.enableStatus = 1;
+        examElCertificateTemplateAdd(obj).then(response => {
+          this.msgSuccess(response.message);
+          this.$parent.tableButton(6);
+        });
+      },
+      examElCertificateTemplateEdit(){
+        let obj = JSON.parse(JSON.stringify(this.newData));
+        obj.enableStatus = 1;
+        examElCertificateTemplateEdit(obj).then(response => {
+          this.msgSuccess(response.message);
+          this.$parent.tableButton(6);
+        });
       },
-      // 二次上传
-      onExceed(files){
-        if (!this.checkFileType(files[0])) {
-          this.$refs.upload.clearFiles();
+      //上传
+      handleAvatarSuccess(res, file) {
+        this.$set(this.newData,'templateWordPath',res.data.url);
+        this.$set(this,'upData',[res.data]);
+        this.$forceUpdate()
+      },
+      beforeAvatarUpload(file) {
+        if (!this.checkFileType(file)) {
           return;
         }
-        this.$refs.upload.clearFiles();
-        if (this.$refs.upload) {
-          this.$refs.upload.uploadFiles = [];
+        let type = false;
+        if (file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
+          type = true;
+        }else{
+          this.msgError('只能上传docx格式文件');
+          type = false;
         }
-        const newRawFile = files[0];
-        const newFileObject = {
-          name: newRawFile.name,
-          raw: newRawFile,
-          size: newRawFile.size,
-          status: 'ready',
-          uid: Date.now(),
-          percentage: 0
-        };
-        this.newData.data4.splice(0, this.newData.data4.length, newFileObject);
+        return type;
       },
       //文件校验
       checkFileType(file) {
         // 提取文件后缀并转小写
         const fileName = file.name || '';
         const fileExt = fileName.split('.').pop().toLowerCase();
-        const validTypes = ['doc', 'docx'];
+        const validTypes = ['docx'];
         if (!validTypes.includes(fileExt)) {
-          this.$message.error('只能上传 doc 或 docx 格式的文件!');
+          this.$message.error('只能上传 docx 格式的文件!');
           return false;
         }
         const isLt20M = file.size / 1024 / 1024 < this.fileSizeLimit;
@@ -187,6 +224,18 @@
         }
         return true;
       },
+      //考试类型
+      examElExamTypeList(){
+        examElExamTypeList({}).then(response => {
+          this.$set(this,'optionList',response.data);
+        });
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          this.$set(this,'optionDeptList',response.data);
+        });
+      },
     },
   }
 </script>

+ 81 - 55
src/views/safetyEducationExaminationNew/publicConfiguration/certificateTemplate/index.vue

@@ -5,37 +5,37 @@
       <div class="page-form-title-box">
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
-          <div class="table-button-box">
+          <div class="table-top-button-box">
             <div>
-              <p :class="tableType == 1?'check-table-button':''" @click="tableTypeButton(1)">全部</p>
-              <p :class="tableType == 2?'check-table-button':''" @click="tableTypeButton(2)">共享</p>
-              <p :class="tableType == 3?'check-table-button':''" @click="tableTypeButton(3)">不共享</p>
+              <p :class="shareStatus === ''?'check-table-button':''" @click="tableTypeButton('')">全部</p>
+              <p :class="shareStatus === 1?'check-table-button':''" @click="tableTypeButton(1)">共享</p>
+              <p :class="shareStatus === 0?'check-table-button':''" @click="tableTypeButton(0)">不共享</p>
             </div>
           </div>
-          <el-form-item label="" prop="queryParamsData1">
-            <el-select v-model="queryParams.queryParamsData1" placeholder="考试类型" style="width: 200px">
+          <el-form-item label="" prop="examTypeId">
+            <el-select v-model="queryParams.examTypeId" placeholder="考试类型" style="width: 200px">
               <el-option
                 v-for="dict in optionClassList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                :key="dict.id"
+                :label="dict.examTypeName"
+                :value="dict.id"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="模板状态" style="width: 200px">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="颁发单位" style="width: 200px">
               <el-option
                 v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData3">
+          <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData3"
+              v-model="queryParams.searchValue"
               placeholder="证书名称"
               style="width: 200px"
             />
@@ -45,38 +45,38 @@
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-             v-hasPermiRouter="['demo:demo:add']"
+             v-hasPermiRouter="['exam:certificateTemplate:add']"
           >新增</p>
         </el-form>
       </div>
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="序号" type="index" align="center" width="50"/>
-          <el-table-column label="证书模板名称" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="适用考试类型" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="是否共享" prop="content" width="120" show-overflow-tooltip>
+          <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="120" 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)">共享</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)">不共享</span>
+              <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="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="更新人" prop="content" width="200" show-overflow-tooltip/>
+          <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 v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
                    @click="tableButton(2,scope.row)"
-                   v-hasPermiRouter="['demo:demo:detail']"
+                   v-hasPermiRouter="['exam:certificateTemplate:detail']"
                 >预览</p>
                 <p class="table-button-p"
                    @click="tableButton(3,scope.row)"
-                   v-hasPermiRouter="['demo:demo:edit']"
+                   v-hasPermiRouter="['exam:certificateTemplate:edit']"
                 >编辑</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-                   v-hasPermiRouter="['demo:demo:del']"
+                   v-hasPermiRouter="['exam:certificateTemplate:del']"
                 >删除</p>
                 <p class="table-button-null"></p>
               </div>
@@ -93,39 +93,45 @@
       </div>
     </div>
     <add-page :propsData="propsData" v-if="pageType === 2"></add-page>
+    <fullScreenFileLook ref="fullScreenFileLook"></fullScreenFileLook>
   </div>
 </template>
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import {
+    examElCertificateTemplatePage,examElExamTypeList,
+    systemDeptCurrentDept,examElCertificateTemplateDel,
+  } from "@/api/safetyEducationExaminationNew/index";
   import addPage from "./addPage.vue";
+  import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
   export default {
     name: 'index',
     components: {
-     addPage
+      addPage,
+      fullScreenFileLook,
     },
     data () {
       return {
-        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        tableButtonType:this.hasPermiDom(['exam:certificateTemplate:detail','exam:certificateTemplate:edit','exam:certificateTemplate:del',]),
         //页面状态
         pageType:1,
         //页面遮罩
         loading:false,
         //下拉列表数据
-        optionClassList:[{value:true,label:'启用'},{value:false,label:'停用'}],
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        optionClassList:[],
+        optionList:[],
         //查询条件
-        tableType:1,
+        shareStatus:'',
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2:null,
-          queryParamsData3:'',
+          examTypeId:null,
+          deptId:null,
+          searchValue:'',
         },
         //列表数据
-        dataList:[{}],
+        dataList:[],
         //数据数量
         total:0,
         //组件传参
@@ -136,13 +142,15 @@
 
     },
     mounted () {
-      //this.getList();
+      this.examElExamTypeList();
+      this.systemDeptCurrentDept();
+      this.getList();
     },
     methods: {
       //切换按钮
       tableTypeButton(val){
-        if(this.tableType != val){
-          this.$set(this,'tableType',val);
+        if(this.shareStatus != val){
+          this.$set(this,'shareStatus',val);
           this.handleQuery();
         }
       },
@@ -153,12 +161,13 @@
       },
       //重置按钮
       resetQuery(){
+        this.$set(this,'shareStatus','')
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2:null,
-          queryParamsData3:'',
+          examTypeId:null,
+          deptId:null,
+          searchValue:'',
         });
         this.getList();
       },
@@ -166,12 +175,25 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        obj.shareStatus = this.shareStatus;
+        examElCertificateTemplatePage(obj).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
         });
       },
+      //证书模板列表
+      examElExamTypeList(){
+        examElExamTypeList({}).then(response => {
+          this.$set(this,'optionClassList',response.data);
+        });
+      },
+      //证书模板列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          this.$set(this,'optionList',response.data);
+        });
+      },
       //操作按钮
       tableButton(type,row){
         let self = this;
@@ -181,15 +203,16 @@
           this.$set(this,'propsData',{});
         }else if(type == 2){
           //详情
-          this.$set(this,'pageType',2);
-          let obj = JSON.parse(JSON.stringify(row))
-          obj.showType = true;
-          this.$set(this,'propsData',obj);
+          let obj = {
+            name:row.templateName,
+            url:localStorage.getItem('fileBrowseEnvironment') +row.templateWordPath,
+            type:'docx'
+          }
+          this.fullScreenFileLookClick(obj);
         }else if(type == 3){
           //编辑
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
-          obj.showType = false;
           this.$set(this,'propsData',obj);
         }else if(type == 4){
           //删除
@@ -199,7 +222,7 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
+            examElCertificateTemplateDel({id:row.id}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
@@ -213,10 +236,7 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            stateFunction({id:row.id,state:!row.state,}).then(response => {
-              self.msgSuccess(response.message)
-              self.getList();
-            });
+
           }).catch(() => {});
         }else if(type == 6){
           //返回并刷新
@@ -224,13 +244,19 @@
           this.getList();
         }
       },
+      fullScreenFileLookClick(item){
+        this.$refs['fullScreenFileLook'].initialize(item.name,item.url,item.type);
+      },
     },
   }
 </script>
 <style scoped lang="scss">
   .certificateTemplate{
+    ::v-deep .docx{
+      padding:0!important;
+    }
     .certificateTemplatePage{
-      .table-button-box{
+      .table-top-button-box{
         display: inline-block;
         vertical-align: top;
         margin-right:10px;

+ 211 - 97
src/views/safetyEducationExaminationNew/publicConfiguration/knowledgePointManagement/index.vue

@@ -5,69 +5,75 @@
       <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="queryParamsData1">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="请输入"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="请选择" style="width: 200px">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+          <el-form-item label="" prop="id">
+            <el-cascader
+              v-model="queryParams.id"
+              :options="options"
+              :props="{
+                emitPath:false,
+                checkStrictly: true,
+                value: 'id',
+                label: 'knowledgePointName',
+                children: 'children',
+              }"
+              :show-all-levels="false"
+              filterable
+              placeholder="请选择知识点"
+            ></el-cascader>
           </el-form-item>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
           <p class="page-submit-common-style-button"
              style="float: right;"
              @click="tableButton(1)"
-             v-hasPermiRouter="['demo:demo:add']"
           >添加</p>
+          <p class="page-save-common-style-button"
+             style="float: right;margin-right:10px;"
+             @click="tableButton(2)"
+          >批量添加</p>
+          <el-form-item
+            style="float: right;">
+            <import-component :importConfig="importConfig"></import-component>
+          </el-form-item>
         </el-form>
       </div>
       <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList">
-          <el-table-column label="序号" type="index" align="center" width="50"/>
-          <el-table-column label="知识点" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="课件数量" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="试题数量" prop="content" width="200" show-overflow-tooltip/>
-          <el-table-column label="创建人" prop="content" width="200" show-overflow-tooltip/>
+        <el-table class="table-box" v-loading="loading"
+                  row-key="id"
+                  :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+                  default-expand-all
+                  border :data="dataList">
+          <el-table-column label="知识点" prop="knowledgePointName" inline  show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span class="label-name-check">{{scope.row.knowledgePointName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="编码" prop="knowledgePointCode" width="200" show-overflow-tooltip/>
           <el-table-column label="创建时间" prop="createTime" width="200" show-overflow-tooltip>
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+<!--          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">-->
+          <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"
+                   v-if="scope.row.parentId == 0"
                    @click="tableButton(3,scope.row)"
-                   v-hasPermiRouter="['demo:demo:edit']"
-                >编辑</p>
+                >下级</p>
                 <p class="table-button-p"
                    @click="tableButton(4,scope.row)"
-                   v-hasPermiRouter="['demo:demo:del']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(5,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>
 
@@ -77,19 +83,36 @@
                :title="dialogTitle"
                :visible.sync="dialogType"
                v-if="dialogType"
-               width="500px"
+               width="560px"
                append-to-body>
-      <div style="height:60px;overflow: hidden">
+      <div style="min-height:60px;overflow: hidden">
         <div>
           <el-form :model="dialogData" ref="dialogForm" :rules="dialogRules">
-            <el-form-item label="知识点:" prop="name" label-width="120px">
+            <el-form-item label="" prop="knowledgePointName" label-width="0">
               <el-input
+                v-if="dialogStatus==1"
                 maxLength="30"
-                v-model="dialogData.name"
+                v-model="dialogData.knowledgePointName"
                 placeholder="请输入知识点名称"
-                style="width: 280px"
+                style="width: 520px"
               />
+              <el-input
+                type="textarea"
+                v-if="dialogStatus==2"
+                :autosize="{ minRows: 10, maxRows: 10}"
+                placeholder="请输入原因"
+                maxLength="100"
+                resize="none"
+                style="width: 520px"
+                v-model="dialogData.knowledgePointName">
+              </el-input>
             </el-form-item>
+            <div style="padding:0 20px;font-size:14px;line-height:30px;color:#999;">
+              <p>知识点层级用”-"隔开,根知识点无需”-",每行一个知识点,格式示例如下:</p>
+              <p>通识安全</p>
+              <p>-应急</p>
+              <p>-其他</p>
+            </div>
           </el-form>
         </div>
       </div>
@@ -105,42 +128,57 @@
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
+  import { examElKnowledgePointTreeList,examElKnowledgePointEdit,
+    examElKnowledgePointAdd,examElKnowledgePointBatchAdd,examElKnowledgePointDel } from "@/api/safetyEducationExaminationNew/index";
+  import importComponent from "@/components/importComponent/importComponent.vue";
   export default {
     name: 'index',
-    //components: {
-    //  addPage
-    //},
+    components: {
+      importComponent,
+    },
     data () {
       return {
         tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
         //页面遮罩
         loading:false,
         //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        options:[],
+        cascaderProps: {
+          checkStrictly: true, // 核心:允许选择任意一级
+          lazy: true,
+          lazyLoad: this.lazyLoad,
+          value: 'id',
+          label: 'knowledgePointName',
+          emitPath: true // 保持默认,返回完整路径数组
+        },
         //查询条件
         queryParams:{
-          page:1,
-          pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2:null,
-          queryParamsData3:'',
+          id:null,
         },
         //列表数据
         dataList:[],
-        //数据数量
-        total:0,
         //组件传参
-        propsData:{},
+        importConfig:{
+          upLoadApi:'/exam/elKnowledgePoint/importData',                //上传接口地址
+          downloadApi:'/exam/elKnowledgePoint/importTemplate',          //下载模板接口地址
+          downloadCustomKey:null,                                     //下载模板自定义参数KEY(非必填)
+          downloadCustomValue:null,                                   //下载模板自定义参数VALUE(非必填)
+          loseApi:'/exam/elKnowledgePoint/importErrorData',             //失败报表接口地址
+          loseCustomKey:null,                                         //失败报表自定义参数KEY(非必填)
+          loseCustomValue:null,                                       //失败报表自定义参数VALUE(非必填)
+          fileName:'知识点导入模板',                                       //下载模板命名
+        },
         // 弹窗相关
         dialogType:false,
+        dialogStatus:1,
+        dialogId:null,
         dialogTitle:'',
         dialogData: {
-          name:'',
+          knowledgePointName:'',
         },
         dialogRules:{
-          name: [
+          knowledgePointName: [
             { required: true, message: "请输入知识点名称", trigger: "blur" }
           ],
         }
@@ -150,22 +188,18 @@
 
     },
     mounted () {
-      //this.getList();
+      this.examElKnowledgePointTreeList();
+      this.getList();
     },
     methods: {
       //查询按钮
       handleQuery(){
-        this.$set(this.queryParams,'page',1);
         this.getList();
       },
       //重置按钮
       resetQuery(){
         this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          queryParamsData1:null,
-          queryParamsData2:null,
-          queryParamsData3:'',
+          id:null,
         });
         this.getList();
       },
@@ -173,27 +207,66 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        getListFunction(obj).then(response => {
+        examElKnowledgePointTreeList(obj).then(response => {
           this.$set(this,'loading',false);
-          this.$set(this,'dataList',response.data.records);
-          this.$set(this,'total',response.data.total);
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this,'dataList',list);
+        });
+      },
+      examElKnowledgePointTreeList(){
+        examElKnowledgePointTreeList({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this, 'options', list);
+        });
+      },
+      formatTreeData(data) {
+        data.forEach(item => {
+          // 如果 children 存在,且是数组,且长度为 0(即 children: [])
+          if (Array.isArray(item.children) && item.children.length === 0) {
+            // 将 children 设为 undefined(或直接 delete item.children;)
+            item.children = undefined;
+          } else if (item.children && item.children.length > 0) {
+            // 如果还有下一级,继续递归处理
+            this.formatTreeData(item.children);
+          }
         });
       },
       //操作按钮
       tableButton(type,row){
+        console.log('row',row)
         let self = this;
         if(type == 1){
-          //新增
-          this.$set(this.dialogData,'name','');
+          //添加
+          this.$set(this.dialogData,'knowledgePointName','');
+          this.$set(this,'dialogStatus','1');
+          this.$set(this,'dialogId',null);
           this.$set(this,'dialogTitle','添加知识点');
           this.$set(this,'dialogType',true);
-
+        }else if(type == 2){
+          //批量添加
+          this.$set(this.dialogData,'knowledgePointName','');
+          this.$set(this,'dialogStatus','2');
+          this.$set(this,'dialogTitle','批量添加知识点');
+          this.$set(this,'dialogType',true);
         }else if(type == 3){
+          //子项添加
+          this.$set(this.dialogData,'knowledgePointName','');
+          this.$set(this,'dialogStatus','1');
+          this.$set(this,'dialogId',row.id);
+          this.$set(this,'dialogTitle',row.knowledgePointName+' 下添加知识点');
+          this.$set(this,'dialogType',true);
+        }else if(type == 4){
           //编辑
-          this.$set(this.dialogData,'name',row.name);
+          this.$set(this,'dialogData', {
+            id:row.id,
+            knowledgePointName:row.knowledgePointName,
+          });
+          this.$set(this,'dialogStatus','1');
           this.$set(this,'dialogTitle','编辑知识点');
           this.$set(this,'dialogType',true);
-        }else if(type == 4){
+        }else if(type == 5){
           //删除
           this.$confirm('是否确认删除?', "警告", {
             confirmButtonText: "确定",
@@ -201,21 +274,8 @@
             type: "warning"
           }).then(function() {
           }).then(() => {
-            deleteFunction({id:row.id}).then(response => {
-              self.msgSuccess(response.message)
-              self.getList();
-            });
-          }).catch(() => {});
-        }else if(type == 5){
-          //启用&停用
-          let text = row.state  ? "停用" : "启用";
-          this.$confirm('是否确认' + text + '?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-          }).then(() => {
-            stateFunction({id:row.id,state:!row.state,}).then(response => {
+            console.log(111)
+            examElKnowledgePointDel({id:row.id}).then(response => {
               self.msgSuccess(response.message)
               self.getList();
             });
@@ -230,22 +290,63 @@
       dialogSubmit(){
         this.$refs["dialogForm"].validate(valid => {
           if (valid) {
-            if(this.dialogForm.appId){
-              terminalAppUpdate(this.dialogForm).then( response => {
-                this.msgSuccess(response.message);
-                this.$set(this,'dialogType',false);
-                this.resetQuery();
-              });
+            if(this.dialogData.id){
+              //编辑
+              this.examElKnowledgePointEdit();
             }else{
-              terminalAppAdd(this.dialogForm).then( response => {
-                this.msgSuccess(response.message);
-                this.$set(this,'dialogType',false);
-                this.resetQuery();
-              });
+              //新增
+              if(this.dialogStatus == 1){
+                //单体添加
+                if(this.dialogId){
+                  //子级添加
+                  this.examElKnowledgePointAdd(this.dialogId);
+                }else {
+                  //父级添加
+                  this.examElKnowledgePointAdd();
+                }
+              }else if(this.dialogStatus == 2){
+                //批量添加
+                this.examElKnowledgePointBatchAdd();
+              }
             }
           }
         })
       },
+      //添加
+      examElKnowledgePointAdd(parentId){
+        let obj = {
+          knowledgePointName:this.dialogData.knowledgePointName,
+          parentId:parentId?parentId:'',
+        };
+        examElKnowledgePointAdd(obj).then( response => {
+          this.msgSuccess(response.message);
+          this.$set(this,'dialogType',false);
+          this.resetQuery();
+        });
+      },
+      //编辑
+      examElKnowledgePointEdit(){
+        let obj = {
+          id:this.dialogData.id,
+          knowledgePointName:this.dialogData.knowledgePointName,
+        };
+        examElKnowledgePointEdit(obj).then( response => {
+          this.msgSuccess(response.message);
+          this.$set(this,'dialogType',false);
+          this.resetQuery();
+        });
+      },
+      //编辑
+      examElKnowledgePointBatchAdd(){
+        let obj = {
+          knowledgePointText:this.dialogData.knowledgePointName,
+        };
+        examElKnowledgePointBatchAdd(obj).then( response => {
+          this.msgSuccess(response.message);
+          this.$set(this,'dialogType',false);
+          this.resetQuery();
+        });
+      },
       //关闭按钮
       dialogCancel(){
         this.$set(this,'dialogType',false);
@@ -256,7 +357,20 @@
 <style scoped lang="scss">
   .knowledgePointManagement{
     .knowledgePointManagementPage{
-
+      ::v-deep .el-table__indent{
+        padding:0!important;
+      }
+      ::v-deep .el-table_1_column_1 .cell{
+        padding-left:60px;
+      }
+      ::v-deep .label-name-check{
+        padding-left:60px;
+      }
+      ::v-deep .el-table__expand-icon{
+        font-size: 28px;
+        position: absolute;
+        left: 24px;
+      }
     }
   }
 </style>

+ 262 - 0
src/views/safetyEducationExaminationNew/questionBankManagement/practiceSolvingProblems/index.vue

@@ -0,0 +1,262 @@
+<!-- 刷题练习 -->
+<template>
+  <div class="app-container practiceSolvingProblems">
+    <div class="page-container practiceSolvingProblemsPage" v-if="pageType === 1">
+      <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="queryParamsData1">
+            <el-select v-model="queryParams.queryParamsData1" placeholder="学年" style="width: 200px">
+              <el-option
+                v-for="dict in optionListA"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width: 200px">
+              <el-option
+                v-for="dict in optionListB"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData3">
+            <el-cascader
+              v-model="queryParams.queryParamsData3"
+              :options="optionListC"
+              :props="{
+                emitPath:false,
+                checkStrictly: true,
+                value: 'id',
+                label: 'knowledgePointName',
+                children: 'children',
+              }"
+              style="width: 180px"
+              :show-all-levels="false"
+              filterable
+              placeholder="知识点"
+            ></el-cascader>
+          </el-form-item>
+          <el-form-item label="" prop="state">
+            <el-date-picker
+              :clearable="false"
+              v-model="dateRange"
+              size="small"
+              style="width: 240px"
+              value-format="yyyy-MM-dd"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            ></el-date-picker>
+          </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" v-loading="loading" border :data="dataList">
+          <el-table-column label="知识点" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="试题总数" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="练习人数" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="答题总数" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="答对题数" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="整体正确率%" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(2,scope.row)"
+                   v-hasPermiRouter="['demo:demo:detail']"
+                >练习统计</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>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  //import { getInfo } from "@/api/basicsModules/index";
+  //import addPage from "./addPage.vue";
+  import { examElKnowledgePointTreeList,systemDeptCurrentDept, } from "@/api/safetyEducationExaminationNew/index";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionListA:[],
+        optionListB:[],
+        optionListC:[],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        },
+        //时间数据
+        dateRange:[],
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      this.systemDeptCurrentDept();
+      this.examElKnowledgePointTreeList();
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'dateRange',[])
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:"",
+          queryParamsData2 :null,
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.startTime = this.dateRange[0]+'T00:00:00'
+          obj.endTime = this.dateRange[1]+'T23:59:59'
+        }else{
+          obj.startTime = "";
+          obj.endTime = "";
+        }
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+      //学院列表
+      systemDeptCurrentDept(){
+        systemDeptCurrentDept({}).then(response => {
+          this.$set(this,'optionListB',response.data);
+        });
+      },
+      examElKnowledgePointTreeList(){
+        examElKnowledgePointTreeList({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this, 'optionListC', list);
+        });
+      },
+      formatTreeData(data) {
+        data.forEach(item => {
+          // 如果 children 存在,且是数组,且长度为 0(即 children: [])
+          if (Array.isArray(item.children) && item.children.length === 0) {
+            // 将 children 设为 undefined(或直接 delete item.children;)
+            item.children = undefined;
+          } else if (item.children && item.children.length > 0) {
+            // 如果还有下一级,继续递归处理
+            this.formatTreeData(item.children);
+          }
+        });
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .practiceSolvingProblems{
+    .practiceSolvingProblemsPage{
+
+    }
+  }
+</style>

+ 269 - 0
src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/index.vue

@@ -0,0 +1,269 @@
+<!-- 试题管理 -->
+<template>
+  <div class="app-container questionBankManagement">
+    <div class="page-container questionBankManagementPage" v-if="pageType === 1">
+      <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="queryParamsData1">
+            <el-select v-model="queryParams.queryParamsData1" placeholder="是否共享" style="width: 180px">
+              <el-option
+                v-for="dict in optionListA"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData2">
+            <el-cascader
+              v-model="queryParams.queryParamsData2"
+              :options="optionListB"
+              :props="{
+                emitPath:false,
+                checkStrictly: true,
+                value: 'id',
+                label: 'knowledgePointName',
+                children: 'children',
+              }"
+              style="width: 180px"
+              :show-all-levels="false"
+              filterable
+              placeholder="知识点"
+            ></el-cascader>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData3">
+            <el-select v-model="queryParams.queryParamsData3" placeholder="题型" style="width: 180px">
+              <el-option
+                v-for="dict in optionListC"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData4">
+            <el-select v-model="queryParams.queryParamsData4" placeholder="难度" style="width: 180px">
+              <el-option
+                v-for="dict in optionListD"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item label="" prop="queryParamsData5">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.queryParamsData5"
+              placeholder="搜索试题"
+              style="width: 200px"
+            />
+          </el-form-item>
+          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+          <p class="page-submit-common-style-button"
+             style="float: right;"
+             @click="tableButton(1)"
+             v-hasPermiRouter="['demo:demo:add']"
+          >添加试题</p>
+        </el-form>
+      </div>
+      <div class="page-content-box">
+        <el-table class="table-box" v-loading="loading" border :data="dataList">
+          <el-table-column label="题干" prop="name"  show-overflow-tooltip/>
+          <el-table-column label="知识点" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="题型" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="难度" prop="content" width="200" show-overflow-tooltip/>
+          <el-table-column label="是否共享" prop="content" 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)">共享</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)">不共享</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p"
+                   @click="tableButton(3,scope.row)"
+                   v-hasPermiRouter="['demo:demo:edit']"
+                >编辑</p>
+                <p class="table-button-p"
+                   @click="tableButton(4,scope.row)"
+                   v-hasPermiRouter="['demo:demo:del']"
+                >删除</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>
+    <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
+  </div>
+</template>
+<script>
+  //import { getDicts } from "@/api/commonality/noPermission";
+  //import { systemUserSelect } from "@/api/commonality/permission";
+  import { examElKnowledgePointTreeList, } from "@/api/safetyEducationExaminationNew/index";
+  //import addPage from "./addPage.vue";
+  export default {
+    name: 'index',
+    //components: {
+    //  addPage
+    //},
+    data () {
+      return {
+        tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
+        //页面状态
+        pageType:1,
+        //页面遮罩
+        loading:false,
+        //下拉列表数据
+        optionListA:[{value:true,label:'共享'},{value:false,label:'不共享'}],
+        optionListB:[],
+        optionListC:[{value:1,label:'单选'},{value:2,label:'多选'},{value:3,label:'判断'}],
+        optionListD:[{value:1,label:'简单'},{value:2,label:'一般'},{value:3,label:'较难'},{value:4,label:'极难'}],
+        //查询条件
+        queryParams:{
+          page:1,
+          pageSize:20,
+          queryParamsData1:null,
+          queryParamsData2 :null,
+          queryParamsData3 :null,
+          queryParamsData4 :null,
+          queryParamsData5 :'',
+        },
+        //列表数据
+        dataList:[],
+        //数据数量
+        total:0,
+        //组件传参
+        propsData:{},
+      }
+    },
+    created () {
+
+    },
+    mounted () {
+      this.examElKnowledgePointTreeList();
+      //this.getList();
+    },
+    methods: {
+      //查询按钮
+      handleQuery(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //重置按钮
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          page:1,
+          pageSize:20,
+          queryParamsData1:null,
+          queryParamsData2 :null,
+          queryParamsData3 :null,
+          queryParamsData4 :null,
+          queryParamsData5 :'',
+        });
+        this.getList();
+      },
+      //获取数据列表
+      getList(){
+        this.$set(this,'loading',true);
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        getListFunction(obj).then(response => {
+          this.$set(this,'loading',false);
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+        });
+      },
+      //操作按钮
+      tableButton(type,row){
+        let self = this;
+        if(type == 1){
+          //新增
+          this.$set(this,'pageType',2);
+          this.$set(this,'propsData',{});
+        }else if(type == 2){
+          //详情
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = true;
+          this.$set(this,'propsData',obj);
+        }else if(type == 3){
+          //编辑
+          this.$set(this,'pageType',2);
+          let obj = JSON.parse(JSON.stringify(row))
+          obj.showType = false;
+          this.$set(this,'propsData',obj);
+        }else if(type == 4){
+          //删除
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            deleteFunction({id:row.id}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 5){
+          //启用&停用
+          let text = row.state  ? "停用" : "启用";
+          this.$confirm('是否确认' + text + '?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+          }).then(() => {
+            stateFunction({id:row.id,state:!row.state,}).then(response => {
+              self.msgSuccess(response.message)
+              self.getList();
+            });
+          }).catch(() => {});
+        }else if(type == 6){
+          //返回并刷新
+          this.$set(this,'pageType',1);
+          this.getList();
+        }
+      },
+      examElKnowledgePointTreeList(){
+        examElKnowledgePointTreeList({}).then(response => {
+          const list = response.data || [];
+          this.formatTreeData(list);
+          this.$set(this, 'optionListB', list);
+        });
+      },
+      formatTreeData(data) {
+        data.forEach(item => {
+          // 如果 children 存在,且是数组,且长度为 0(即 children: [])
+          if (Array.isArray(item.children) && item.children.length === 0) {
+            // 将 children 设为 undefined(或直接 delete item.children;)
+            item.children = undefined;
+          } else if (item.children && item.children.length > 0) {
+            // 如果还有下一级,继续递归处理
+            this.formatTreeData(item.children);
+          }
+        });
+      },
+    },
+  }
+</script>
+<style scoped lang="scss">
+  .questionBankManagement{
+    .questionBankManagementPage{
+
+    }
+  }
+</style>