dedsudiyu vor 1 Jahr
Ursprung
Commit
bf248f8791

+ 56 - 3
README.md

@@ -1,4 +1,4 @@
-# 更新日期 2023/07/17
+# 更新日期 2023/07/25
 ## 一.开发
 
     # 安装依赖
@@ -24,11 +24,13 @@
 
 ### 1.版本差异字段
 >##### 配置文件在 .env.development 与 .env.production 文件内
+
     ├─src
     │  └─.env.development         (开发配置)
     │  └─.env.production          (打包配置)
 
 >##### VUE_APP_VERSION_DIFFERENCE_FIELD字段,可通过配置不同的字符来展示各版本差异化内容
+
      矿业大学-环测学院
      VUE_APP_VERSION_DIFFERENCE_FIELD = 'kuangYeDaXue_nanHu'
      苏州大学
@@ -38,6 +40,7 @@
 
 ### 2.版本分支关系
 >##### 修改时务必注意版本分支关系,从底层开始迭代
+
     ├─3.3.1-dspf (定时排风版本)
     ├─3.3.2-dzxxp (电子信息牌版本)
     │  ├─suzhouDX-web (苏州大学-当前线上版本)
@@ -50,10 +53,18 @@
     │  └─3.3.6-zzjg&jzbj (组织架构&建筑布局版本)
     ├─3.3.3-temp (包含 3.3.3 & 3.3.5 & 3.3.6 版本所有内容)
     ├─3.3.7-scxjy (手持巡检仪版本)
+    │
+    │
+    │
+    │
+    │
+    ├─web-v2 (当前正在开发版本)
+    ├─web-v2-pro (当前正在测试版本)
 
 ### 3.多页面路由配置方法用于展示各版本差异化内容(即将废弃,留作备案)
 #### 3.1针对矿大项目修改      针对布局与疏散图 适配多楼栋 多楼层
 >##### 路由配置示意
+
     ├─views
     │  ├─comprehensive
     │  │  └─laboratoryManagement
@@ -68,15 +79,18 @@
     │            └─performEvacuationOne.vue
 
 >##### 静态路由修改项  
+
     path: '/emergencyEvacuationBig' 地址修改为  emergencyEvacuationBigOne  
     path: '/' 地址修改为  home  
   
 >##### 其他修改项
+
     项目名称修改 => 实验室安全智能监测与控制系统
     取消按钮首页注释  layout => components => Navbar.vue
         
 #### 3.2针对空军四医大项目   实验室-物联设备配置只有传感器与智能门禁
 >##### 路由配置示意
+
     ├─views
     │  ├─comprehensive
     │  │  ├─laboratoryManagement
@@ -95,10 +109,49 @@
     │     └─indexOne.vue
 
 >##### 静态路由修改项
+
     path: '/login' 地址修改为  loginOne
     path: '/' 地址修改为  loginOne
-    
+
 >##### 其他修改项
+
     项目名称修改 => 危化品智能存储管理系统
     按钮首页注释掉  layout => components => Navbar.vue
-    
+    
+## 四.二维码相关
+
+### 1.二维码生成规则 
+
+>#### 二维码参数由三部分组成 
+
+##### 微信小程序二维码标识
+
+    需要在微信小程序后台开发配置中配置
+    同时需要在后台配置开发配置中配置 
+    两个配置需要完全一致
+    在用户登录后会存储在local storage中字段为'codeOnlineAdd'
+    
+##### 参数 code
+
+    用于该功能所需参数
+    
+##### 功能标识 type
+
+    用于识别二维码所属功能,用于后续跳转对应后续业务页面
+    
+>##### 示例
+    http://lab.zjznai.com/labAppTest?code=11&type=1
+    微信小程序二维码标识?参数&功能标识
+    
+### 2.功能标识表
+
+| 功能标识 | 功能名称 | 备注 |
+|  ---- | ---- |  ---- | 
+| type == 8 | 化学品柜 | 前端生成 |
+| type == 7 | 培训课程 | 前端生成 |
+| type == 6 | 专项检查 | 前端生成 |
+| type == 5 | 实验室详情 | 后端生成 |
+| type == 3 | 危险源列表 | 后端生成 |
+| type == 2 | 安全制度 | 后端生成 |
+| type == 1 | MSDS说明书 | 后端生成 |
+

+ 25 - 0
src/api/chemicalInventory/index.js

@@ -0,0 +1,25 @@
+import request from '@/utils/request'
+
+// 化学品盘点列表
+export function hxpTakeStockList(query) {
+  return request({
+    url: '/chemical/hxpTakeStock/list',
+    method: 'get',
+    params: query
+  })
+}
+// 化学品盘点详情
+export function hxpTakeStockInfo(id) {
+  return request({
+    url: '/chemical/hxpTakeStock/'+id,
+    method: 'get',
+  })
+}
+// 化学品盘点化学品列表
+export function hxpTakeStockDetailList(query) {
+  return request({
+    url: '/chemical/hxpTakeStockDetail/list',
+    method: 'get',
+    params: query
+  })
+}

+ 115 - 0
src/api/trainingCourse/index.js

@@ -0,0 +1,115 @@
+import request from '@/utils/request'
+
+// 获取培训课程列表
+export function securitycourseList(query) {
+  return request({
+    url: '/exam/securitycourse/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取培训课程详情
+export function securitycourseInfo(id) {
+  return request({
+    url: '/exam/securitycourse/'+id,
+    method: 'get',
+  })
+}
+
+//获取详情学生列表
+export function singList(query) {
+  return request({
+    url: '/exam/securitycourse/singList/',
+    method: 'get',
+    params: query
+  })
+}
+
+//新增课程
+export function securitycourseAdd(data) {
+  return request({
+    url: '/exam/securitycourse/',
+    method: 'post',
+    data: data
+  })
+}
+
+//编辑课程
+export function securitycourseEdit(data) {
+  return request({
+    url: '/exam/securitycourse/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+//删除课程
+export function securitycourseDel(id) {
+  return request({
+    url: '/exam/securitycourse/'+id,
+    method: 'delete',
+  })
+}
+
+// 查询老师列表
+export function selectUser(query) {
+  return request({
+    url: '/system/user/teacher/selectUser',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询学院列表
+export function departmentsList(query) {
+  return request({
+    url: '/system/dept/departments/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询实验室列表
+export function subListAdmin(query) {
+  return request({
+    url: '/laboratory/subject/list/listAdmin',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询学生列表
+export function findUserList(data) {
+  return request({
+    url: '/system/user/findStudenList',
+    method: 'post',
+    data: data
+  })
+}
+
+//手持用户管理列表
+export function pdaUserList(query) {
+  return request({
+    url: '/laboratory/pdaUser/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//手持用户新增
+export function pdaUser(data) {
+  return request({
+    url: '/laboratory/pdaUser/',
+    method: 'post',
+    data: data
+  })
+}
+
+//手持用户删除
+export function pdaUserDel(id) {
+  return request({
+    url: '/laboratory/pdaUser/'+id,
+    method: 'delete',
+  })
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
src/assets/icons/svg/化学品盘点.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
src/assets/icons/svg/培训课程.svg


+ 4 - 0
src/assets/styles/ZDelement.scss

@@ -503,3 +503,7 @@
   height:30px;
   padding:0;
 }
+//时间选择器中间边框位置调整
+.el-time-spinner__wrapper{
+  margin-top:-16px;
+}

+ 142 - 0
src/components/qrCodeDialog/index.vue

@@ -0,0 +1,142 @@
+<!--  公共二维码dialog组件
+
+1.引入方式
+
+  <qr-code-dialog v-if="qrCodeDialogType" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
+
+  import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
+
+  components: {
+    qrCodeDialog
+  },
+
+2.必要参数
+
+  qrCodeDialogType:false,
+  qrCodeDialogData:{},
+
+3.必要方法
+
+  //二维码组件开关
+  qrCodeDialogButton(type,id,name){
+    if(type == 1){
+      this.$set(this,'qrCodeDialogData',{
+        type:'chemicalsCabinet',                                  //二维码类型 用于区分二维码功能类型
+        parameter:id,                                             //二维码参数
+        name:name,                                                //二维码名称用于下载时命名
+      });
+      this.$set(this,'qrCodeDialogType',true);
+    }else{
+      this.$set(this,'qrCodeDialogType',false);
+    }
+  },
+
+-->
+
+<template>
+  <div>
+    <!--添加/编辑弹窗-->
+    <el-dialog class="trainingCourseAddDialog" title=' 1'
+               :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false"
+               :visible.sync="dialogType" v-if="dialogType" width="394px">
+      <div class="trainingCourseAddDialog-title-box">
+        <p></p>
+        <p class="el-icon-close" @click="buttonClick"></p>
+      </div>
+      <vue-qr v-if="vueQrImgType" ref="vueQr" class="trainingCourseAddDialog-vue-qr" :text="vueQrCodeData" :size="200"></vue-qr>
+      <p class="trainingCourseAddDialog-button-p" @click="buttonClick(1)">下载二维码</p>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import vueQr from 'vue-qr'
+  export default {
+    name: 'qrCodeDialog',
+    components: {
+      vueQr
+    },
+    props:{
+      qrCodeDialogData:{},
+    },
+    data(){
+      return{
+        dialogType:true,
+        vueQrCodeData:null,
+        vueQrImgType:false,
+        identification: localStorage.getItem('codeOnlineAdd'),            //二维码规则 服务器域名,需与微信后台开发配置内一致.
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.initialize();
+    },
+    methods:{
+      //初始化
+      initialize(){
+        this.$set(this,'vueQrCodeData', this.identification+'?code='+this.qrCodeDialogData.parameter+'&type='+this.qrCodeDialogData.type);
+        this.$set(this,'vueQrImgType',true);
+      },
+      buttonClick(type){
+        if(type == 1){
+          let base64Str = this.$refs.vueQr.imgUrl;
+          let aLink = document.createElement("a");
+          aLink.style.display = "none";
+          aLink.href = base64Str;
+          aLink.download = this.qrCodeDialogData.name+"-二维码.png";
+          document.body.appendChild(aLink);
+          aLink.click();
+          document.body.removeChild(aLink);
+        }else{
+          this.$parent.qrCodeDialogButton();
+        }
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .trainingCourseAddDialog{
+    font-weight:500;
+    .trainingCourseAddDialog-title-box{
+      display: flex;
+      p:nth-child(1){
+        flex:1;
+      }
+      p:nth-child(2){
+        font-size:18px;
+        width:60px;
+        height:60px;
+        text-align: center;
+        line-height:60px;
+        color:#999;
+        cursor: pointer;
+      }
+    }
+    .trainingCourseAddDialog-vue-qr{
+      display: block!important;
+      height:200px;
+      width:200px;
+      margin:20px auto 27px;
+    }
+    .trainingCourseAddDialog-button-p{
+      width:150px;
+      height:40px;
+      line-height:40px;
+      margin:0 auto 30px;
+      color:#fff;
+      background:#0045AF;
+      border-radius:10px;
+      text-align: center;
+      cursor: pointer;
+    }
+    ::v-deep .el-dialog__header{
+      display: none;
+    }
+    ::v-deep .el-dialog__body{
+      padding:0;
+    }
+  }
+</style>

+ 47 - 3
src/views/comprehensive/laboratoryManagement/subject/associationConfiguration.vue

@@ -136,11 +136,14 @@
         </el-form-item>
         <el-form-item label="型号" :prop="'hazardRelations.'+ index +'.anotherCode'" :rules="rules.anotherCode"
                       class="form-item" label-width="60px">
-          <el-input placeholder="请输入型号"  maxlength="10" v-model="item.anotherCode"/>
+          <el-input placeholder="请输入型号" disabled maxlength="10" v-model="item.anotherCode"/>
         </el-form-item>
         <el-form-item label="" class="form-item" label-width="20px">
           <span class="del-hazard el-icon-error" style="line-height:40px;font-size:24px;" @click="delHazard(index)"></span>
         </el-form-item>
+        <el-form-item label="" class="form-item" v-if="item.xyId">
+          <p class="look-code-p" @click="qrCodeDialogButton(1,item.xyId,item.anotherName+'-'+item.anotherCode)">查看二维码</p>
+        </el-form-item>
       </div>
       <div class="bottom-button-box">
         <p class="reset-button-one left-button" @click="backPage">取消</p>
@@ -190,17 +193,21 @@
         </el-form-item>
         <el-form-item label="型号" :prop="'hazardRelations.'+ index +'.anotherCode'" :rules="rules.anotherCode"
                       class="form-item" label-width="60px">
-          <el-input placeholder="请输入型号"  maxlength="10" v-model="item.anotherCode"/>
+          <el-input placeholder="请输入型号" disabled maxlength="10" v-model="item.anotherCode"/>
         </el-form-item>
         <el-form-item label="" class="form-item" label-width="20px">
           <span class="del-hazard el-icon-error" style="line-height:40px;font-size:24px;" @click="delHazard(index)"></span>
         </el-form-item>
+        <el-form-item label="" class="form-item" v-if="item.xyId">
+          <p class="look-code-p" @click="qrCodeDialogButton(1,item.xyId,item.anotherName+'-'+item.anotherCode)">查看二维码</p>
+        </el-form-item>
       </div>
       <div class="bottom-button-box">
         <p class="reset-button-one left-button" @click="backPage">取消</p>
         <p class="inquire-button-one right-button" @click="upData">提交</p>
       </div>
     </el-form>
+    <qr-code-dialog v-if="qrCodeDialogType" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
   </div>
 </template>
 
@@ -208,11 +215,15 @@
   import { listHazard } from "@/api/permissionRequired";
   import { updateSubjectEditJoinHazard } from "@/api/laboratory/subject";
   import { getBottleInfo} from "@/api/gasManage3_0/gasManage";
+  import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
   export default {
     name: "associationConfiguration",
     props:{
       subjectData:{},
     },
+    components: {
+      qrCodeDialog
+    },
     data() {
       return {
         onepcOutcheckIn:[],
@@ -230,10 +241,12 @@
           ],
         },
         hazardId:"",
+        //二维码组件参数
+        qrCodeDialogType:false,
+        qrCodeDialogData:{},
       }
     },
     created() {
-
     },
     mounted(){
       let self = this;
@@ -303,6 +316,7 @@
         for(let i=0;i<self.subjectData.labHazardList.length;i++){
           list.push({
             hazardId:self.subjectData.labHazardList[i].id,
+            xyId:self.subjectData.labHazardList[i].xyId,
             anotherName:self.subjectData.labHazardList[i].anotherName,
             anotherCode:self.subjectData.labHazardList[i].anotherCode
           })
@@ -312,6 +326,19 @@
       this.radioChange();
     },
     methods:{
+      //二维码组件开关
+      qrCodeDialogButton(type,id,name){
+        if(type == 1){
+          this.$set(this,'qrCodeDialogData',{
+            type:'7',          //二维码类型 用于区分二维码功能类型
+            parameter:id,                     //二维码参数
+            name:name,                        //二维码名称用于下载时命名
+          });
+          this.$set(this,'qrCodeDialogType',true);
+        }else{
+          this.$set(this,'qrCodeDialogType',false);
+        }
+      },
       //删除选中危险源
       delHazard(index){
         this.form.hazardRelations.splice(index, 1);
@@ -444,6 +471,18 @@
               this.msgError('穿戴检查识别上限不能小于2')
               return
             }
+            for(let i=0;i<self.form.hazardRelations.length;i++){
+              let num = 0;
+              for(let o=0;o<self.form.hazardRelations.length;o++){
+                if(self.form.hazardRelations[i].anotherName == self.form.hazardRelations[o].anotherName){
+                  num++
+                }
+                if(num > 1){
+                  this.msgError('危险源名称重复:'+self.form.hazardRelations[i].anotherName);
+                  return
+                }
+              }
+            }
             self.$confirm('是否确认提交?', "", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
@@ -553,6 +592,11 @@
       display: inline-block;
       overflow: hidden;
       min-height:70px;
+      .look-code-p{
+        font-weight:500;
+        color:#0183fa;
+        cursor: pointer;
+      }
     }
     .hazard-for-box{
       .del-hazard{

+ 6 - 2
src/views/comprehensive/laboratoryManagement/subject/index.vue

@@ -132,10 +132,14 @@
           <div class="bottom-max-box" :class="rightButtonType == 4?'overflow-box':''">
             <div class="bottom-sensor-box" v-if="rightButtonType == 1">
               <p class="top-title">
-                <el-tooltip class="item" effect="dark" :content="checkedSubject.deptName" placement="bottom">
+                <el-tooltip class="item" effect="dark"
+                            v-if="checkedSubject.deptName"
+                            :content="checkedSubject.deptName" placement="bottom">
                   <i>{{checkedSubject.deptName}}</i>
                 </el-tooltip>
-                <el-tooltip class="item" effect="dark" :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
+                <el-tooltip class="item" effect="dark"
+                            v-if="checkedSubject.subAddrr.buildName && checkedSubject.subAddrr.floorName"
+                            :content="checkedSubject.subAddrr.buildName+checkedSubject.subAddrr.floorName" placement="bottom">
                   <i>当前位置:{{checkedSubject.subAddrr.buildName}}{{checkedSubject.subAddrr.floorName}}</i>
                 </el-tooltip>
               </p>

+ 205 - 0
src/views/comprehensive/system/handheldEquipmentUsers/index.vue

@@ -0,0 +1,205 @@
+<template>
+  <div class="app-container handheldEquipmentUsers">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
+      <el-form-item label="关键字" prop="userName">
+        <el-input
+          v-model="queryParams.searchValue"
+          placeholder="姓名/工号/联系方式"
+          clearable
+          maxLength="30"
+          size="small"
+        />
+      </el-form-item>
+      <el-form-item>
+        <p class="inquire-button-one" @click="handleQuery">查询</p>
+        <p class="reset-button-one" @click="resetQuery">重置</p>
+      </el-form-item>
+      <el-form-item style="float: right;">
+        <p class="inquire-button-one" style="width:80px;margin-right:0!important;" @click="addButton">新增</p>
+      </el-form-item>
+    </el-form>
+    <el-table v-loading="loading" border :data="dataList" >
+      <el-table-column label="姓名" align="left" prop="nickName"/>
+      <el-table-column label="工号" align="left" prop="userName"/>
+      <el-table-column label="联系方式" align="left" prop="phonenumber"/>
+      <el-table-column label="部门" align="left" prop="deptName"/>
+      <el-table-column label="操作" align="center" width="160">
+        <template slot-scope="scope">
+          <div class="table-button-box">
+            <p class="table-button-null"></p>
+            <p class="table-button-p"
+               @click="delButton(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.pageNum"
+                :limit.sync="queryParams.pageSize"
+                @pagination="getList"
+    />
+    <el-dialog class="handheldEquipmentUsersAddDialog" title='新增' @close="dialogOffButton"
+               :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false"
+               :visible.sync="dialogType" v-if="dialogType" width="600px">
+      <el-form ref="addForm" :model="addForm" :rules="rules" label-width="80px">
+        <el-form-item label="用户" prop="safeUserId" class="form-item" label-width="100px">
+          <el-select
+            style="width:400px;"
+            v-model="addForm.userIds"
+            :multiple-limit="10"
+            multiple
+            filterable
+            remote
+            clearable
+            reserve-keyword
+            placeholder="请输入至少2个字符搜索相关人员"
+            :remote-method="getUserList"
+            :loading="loading">
+            <el-option
+              v-for="item in userOption"
+              :key="item.userId"
+              :label="item.nickName"
+              :value="item.userId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <p class="dialog-footer-null"></p>
+        <el-button @click="dialogOffButton">取 消</el-button>
+        <el-button type="primary" @click="dialogSubmitButton">确 定</el-button>
+        <p class="dialog-footer-null"></p>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { selectUser,pdaUserList,pdaUser,pdaUserDel } from '@/api/trainingCourse/index'
+  export default {
+    name: 'handheldEquipmentUsers',
+    data(){
+      return{
+        queryParams:{
+          pageNum: 1,
+          pageSize:20,
+          searchValue: null,
+        },
+        // 遮罩层
+        loading: false,
+        // 显示搜索条件
+        showSearch: true,
+        dataList:[],
+        // 总条数
+        total: 0,
+        dialogType:false,
+        addForm:{
+          userIds:[]
+        },
+        userOption:[],
+        rules:{
+          userIds: [
+            { required: true, message: "请选择用户", trigger: "change" },
+          ],
+        }
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.getList();
+    },
+    methods:{
+      //获取人员列表
+      getUserList(query){
+        if(query.length > 1){
+          this.loading = true;
+          selectUser({userType:11,nickName:query}).then(response => {
+            this.$set(this,'userOption',response.data)
+            this.loading = false;
+          });
+        }
+      },
+      //弹窗开启
+      addButton(){
+        this.$set(this.addForm,'userIds','');
+        this.$set(this,'dialogType',true);
+      },
+      //弹窗关闭
+      dialogOffButton(){
+        this.$set(this,'dialogType',false);
+      },
+      //弹窗提交
+      dialogSubmitButton(){
+        this.$refs["addForm"].validate(valid => {
+          if (valid) {
+            pdaUser(this.addForm).then(response => {
+              this.msgSuccess(response.msg);
+              this.$set(this,'dialogType',false);
+              this.getList();
+            });
+          }
+        })
+      },
+      //查询
+      handleQuery(){
+        this.$set(this.queryParams,'pageNum',1)
+        this.getList();
+      },
+      //重置
+      resetQuery(){
+        this.$set(this,'queryParams',{
+          pageNum: 1,
+          pageSize:20,
+          searchValue: null,
+        })
+        this.getList();
+      },
+      //数据列表
+      getList(){
+        this.loading = true;
+        pdaUserList(this.queryParams).then(response => {
+          this.$set(this,'dataList',response.rows)
+          this.loading = false;
+        });
+      },
+      //移除
+      delButton(item){
+        let self = this;
+        this.$confirm('确定移除当用户?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          pdaUserDel(item.id).then(response => {
+            self.msgSuccess(response.msg);
+            self.getList();
+          });
+        }).then(() => {}).catch(() => {});
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .handheldEquipmentUsers{
+    padding:20px!important;
+    flex:1;
+    display: flex !important;
+    flex-direction: column;
+    overflow: hidden;
+    .handheldEquipmentUsersAddDialog{
+      .dialog-footer{
+        display: flex;
+        .dialog-footer-null{
+          flex:1;
+        }
+      }
+    }
+  }
+</style>

+ 32 - 34
src/views/comprehensive/system/publicConfig/exploitConfig.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="kkFile预览地址-外网:">
-          <el-input placeholder="请输入"  v-model="form.fileExtranetUrl">
+          <el-input placeholder="请输入"  v-model="form.fileExtranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
@@ -15,7 +15,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="kkFile预览地址-内网:">
-          <el-input placeholder="请输入"  v-model="form.fileIntranetUrl">
+          <el-input placeholder="请输入"  v-model="form.fileIntranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">http://</template>
           </el-input>
         </el-form-item>
@@ -27,7 +27,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="代理访问地址-外网:">
-          <el-input placeholder="请输入"  v-model="form.cameraExtranetAgent">
+          <el-input placeholder="请输入"  v-model="form.cameraExtranetAgent" style="width:400px;" maxLength="50">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
@@ -35,7 +35,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="代理访问地址-内网:">
-          <el-input placeholder="请输入"  v-model="form.cameraIntranetAgent">
+          <el-input placeholder="请输入"  v-model="form.cameraIntranetAgent" style="width:400px;" maxLength="50">
             <template slot="prepend">http://</template>
           </el-input>
         </el-form-item>
@@ -43,14 +43,14 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="内网地址IP段:">
-          <el-input placeholder="请输入"  v-model="form.ipIdentify" style="width: 300px">
+          <el-input placeholder="请输入"  v-model="form.ipIdentify"  style="width:400px;" maxLength="50">
           </el-input>
         </el-form-item>
         <i class="tip"><i class="el-icon-question"></i>用于判断用户当前访问的是内网地址还是外网地址</i>
       </div>
       <div class="form-max-box">
         <el-form-item label="内网访问地址:">
-          <el-input placeholder="请输入"  v-model="form.cameraIntranetUrl">
+          <el-input placeholder="请输入"  v-model="form.cameraIntranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">http://</template>
           </el-input>
         </el-form-item>
@@ -58,7 +58,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="外网访问地址:">
-          <el-input placeholder="请输入"  v-model="form.cameraExtranetUrl">
+          <el-input placeholder="请输入"  v-model="form.cameraExtranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
@@ -70,7 +70,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT地址-外网:">
-          <el-input placeholder="请输入"  v-model="form.mqttExtranetUrl">
+          <el-input placeholder="请输入"  v-model="form.mqttExtranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">wss://</template>
           </el-input>
         </el-form-item>
@@ -78,25 +78,17 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT账号-外网:">
-          <el-input
-            v-model="form.mqttExtranetUser"
-            placeholder="请输入"
-            style="width: 290px"
-          />
+          <el-input v-model="form.mqttExtranetUser" placeholder="请输入" style="width:400px;" maxLength="50"/>
         </el-form-item>
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT密码-外网:">
-          <el-input
-            v-model="form.mqttExtranetPassword"
-            placeholder="请输入"
-            style="width: 290px"
-          />
+          <el-input v-model="form.mqttExtranetPassword" placeholder="请输入" style="width:400px;" maxLength="50"/>
         </el-form-item>
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT地址-内网:">
-          <el-input placeholder="请输入"  v-model="form.mqttIntranetUrl">
+          <el-input placeholder="请输入"  v-model="form.mqttIntranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">ws://</template>
           </el-input>
         </el-form-item>
@@ -104,20 +96,12 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT账号-内网:">
-          <el-input
-            v-model="form.mqttIntranetUser"
-            placeholder="请输入"
-            style="width: 290px"
-          />
+          <el-input v-model="form.mqttIntranetUser" placeholder="请输入" style="width:400px;" maxLength="50"/>
         </el-form-item>
       </div>
       <div class="form-max-box">
         <el-form-item label="MQTT密码-内网:">
-          <el-input
-            v-model="form.mqttIntranetPassword"
-            placeholder="请输入"
-            style="width: 290px"
-          />
+          <el-input v-model="form.mqttIntranetPassword" placeholder="请输入" style="width:400px" maxLength="50"/>
         </el-form-item>
       </div>
       <div class="line"></div>
@@ -126,7 +110,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="访问地址-外网:">
-          <el-input placeholder="请输入"  v-model="form.screenExtranetUrl">
+          <el-input placeholder="请输入"  v-model="form.screenExtranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
@@ -134,7 +118,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="访问地址-内网:">
-          <el-input placeholder="请输入"  v-model="form.screenIntranetUrl">
+          <el-input placeholder="请输入"  v-model="form.screenIntranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">http://</template>
           </el-input>
         </el-form-item>
@@ -142,7 +126,7 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="访问地址-外网:">
-          <el-input placeholder="请输入"  v-model="form.pcExtranetUrl">
+          <el-input placeholder="请输入"  v-model="form.pcExtranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">https://</template>
           </el-input>
         </el-form-item>
@@ -150,13 +134,23 @@
       </div>
       <div class="form-max-box">
         <el-form-item label="访问地址-内网:">
-          <el-input placeholder="请输入"  v-model="form.pcIntranetUrl">
+          <el-input placeholder="请输入"  v-model="form.pcIntranetUrl" style="width:400px;" maxLength="50">
             <template slot="prepend">http://</template>
           </el-input>
         </el-form-item>
         <i class="tip"><i class="el-icon-question"></i>跳转后台时访问的地址</i>
       </div>
-
+      <div class="line"></div>
+      <div class="title-box">
+        <p>微信小程序二维码配置</p>
+      </div>
+      <div class="form-max-box">
+        <el-form-item label="kkFile预览地址-外网:">
+          <el-input placeholder="请输入"  v-model="form.codeOnlineAdd" style="width:400px;" maxLength="50">
+          </el-input>
+        </el-form-item>
+        <i class="tip"><i class="el-icon-question"></i>用于微信外部扫一扫跳转指引,需与微信小程序后台二维码规则配置一致</i>
+      </div>
     </el-form>
     <div class="sub_btn">
       <p class="null-p"></p>
@@ -242,6 +236,10 @@
     display: flex;
     flex-direction: column;
     overflow: hidden;
+    ::v-deep .el-input-group__prepend{
+      padding:0 10px;
+      width:80px;
+    }
     .public-form-box{
       flex:1;
       overflow-y: scroll;

+ 6 - 1
src/views/login.vue

@@ -124,7 +124,7 @@ export default {
         }
       });
     },
-    //获取公共配置数据
+    //获取公共配置
     getLogoInfo(){
       getLogoInfo().then(response => {
         console.log('公共配置',response.data)
@@ -137,6 +137,7 @@ export default {
         localStorage.setItem('schoolName',response.data.schoolName)
       });
     },
+    //获取开发配置数据
     getUrlConfig(){
       getUrlConfig().then(response => {
         console.log('开发配置',response.data)
@@ -180,10 +181,14 @@ export default {
           //可视化大屏访问地址
           localStorage.setItem('screenUrl',urlText+response.data.screenIntranetUrl)
         }
+        //二维码连接地址
+        localStorage.setItem('codeOnlineAdd',response.data.codeOnlineAdd)
 
 
 
       });
+
+
     },
     getCode() {
       getCodeImg().then(res => {

+ 158 - 0
src/views/medicUniversity-3_1/chemicalManagement/chemicalInventory/index.vue

@@ -0,0 +1,158 @@
+<template>
+  <div class="app-container chemicalManagement">
+    <div class="chemicalManagement-page" v-if="pageType == 1">
+      <div class="title-box">新增准入白名单
+      </div>
+      <div class="content-box">
+        <el-table border :data="tableData" ref="multipleTable" @sort-change="sortChange">
+          <el-table-column label="序号"  width="50" align="center"  type="index"/>
+          <el-table-column label="标题" prop="takeTitle" show-overflow-tooltip/>
+          <el-table-column label="学院" prop="takeDpetName" width="200" show-overflow-tooltip/>
+          <el-table-column label="楼栋" prop="takeBuildName" width="180" show-overflow-tooltip/>
+          <el-table-column label="实验室" prop="subName" width="300" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.subName}}-{{scope.row.subRoom}}
+            </template>
+          </el-table-column>
+          <!--<el-table-column label="备注" width="250" show-overflow-tooltip/>-->
+          <el-table-column label="盘点人" prop="createBy" width="120" show-overflow-tooltip/>
+          <el-table-column label="盘点时间" prop="createTimeStr" width="200" sortable="custom" show-overflow-tooltip/>
+          <el-table-column label="操作" width="100">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p" @click="controlsButton(2,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"
+                    layout="total, prev, pager, next, sizes, jumper"
+                    :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+                    @pagination="getList"/>
+      </div>
+    </div>
+    <info-page v-if="pageType == 2" :infoDataProps="infoDataProps"></info-page>
+  </div>
+</template>
+
+<script>
+  import { listDepartments } from "@/api/system/dept";
+  import { hxpTakeStockList } from '@/api/chemicalInventory/index'
+  import infoPage from './infoPage.vue'
+  export default {
+    name: 'chemicalManagement',
+    components: {
+      infoPage
+    },
+    data(){
+      return{
+        pageType:1,
+        deptOptions:[],
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          takeDpetId:"",
+          orderTime:'1',
+        },
+        dateRange:[],
+        tableData:[],
+        total:0,
+        infoDataProps:{},
+      }
+    },
+    created(){},
+    mounted(){
+      this.listDepartments();
+      this.getList();
+    },
+    methods:{
+      //搜索
+      onSearch(){
+        this.$set(this.queryParams,'pageNum',1);
+        this.getList();
+      },
+      //重置
+      resetForm(){
+        this.$set(this,'dateRange',[]);
+        this.$set(this,'queryParams',{
+          pageNum:1,
+          pageSize:20,
+          searchValue:"",
+          takeDpetId:"",
+          orderTime:'1',
+        });
+        this.getList();
+      },
+      //查询列表
+      getList(){
+        this.loading = true;
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTimeStr = this.dateRange[0];
+          obj.endTimeStr = this.dateRange[1];
+        }else {
+          obj.beginTimeStr = null
+          obj.endTimeStr = null
+        }
+        hxpTakeStockList(obj).then( response => {
+          this.$set(this,'tableData',response.rows);
+          this.$set(this,'total',response.total);
+          this.loading = false;
+        });
+      },
+      //时间排序方法
+      sortChange(val){
+        if(val.prop == 'createTimeStr'){
+          this.$set(this.queryParams,'orderTime',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.onSearch();
+        }
+      },
+      //详情
+      controlsButton(type,row){
+        if(type == 1){
+          this.$set(this,'pageType',1);
+        }else if(type == 2){
+          this.$set(this,'pageType',2);
+          this.$set(this,'infoDataProps',row);
+        }
+      },
+      listDepartments(){
+        listDepartments().then( response => {
+          this.$set(this,'deptOptions',response.data);
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .chemicalManagement{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    font-weight: 500;
+    .chemicalManagement-page{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+      overflow: hidden;
+      .title-box{
+        padding-top:20px;
+        .form-box{
+          border-bottom:1px solid #E0E0E0;
+        }
+      }
+      .content-box{
+        flex:1;
+        overflow: hidden;
+        display: flex;
+        flex-direction: column;
+        padding:20px;
+      }
+    }
+  }
+</style>

+ 189 - 0
src/views/medicUniversity-3_1/chemicalManagement/chemicalInventory/infoPage.vue

@@ -0,0 +1,189 @@
+<template>
+  <div class="chemicalInventory-info-page">
+    <div class="title-box">
+      <p>盘点详情</p>
+      <p class="reset-button-one" @click="outButton">返回</p>
+    </div>
+    <div class="info-text-box">
+      <div class="info-text-min-box">
+        <div>
+          <p>标题:</p>
+          <p>{{infoData.takeTitle}}</p>
+        </div>
+        <div>
+          <p>盘点人:</p>
+          <p>{{infoData.createBy}}</p>
+        </div>
+        <div>
+          <p>盘点时间:</p>
+          <p>{{infoData.createTimeStr}}</p>
+        </div>
+      </div>
+      <div class="info-text-min-box">
+        <div>
+          <p>所属部门:</p>
+          <p>{{infoData.takeDpetName}}</p>
+        </div>
+        <div>
+          <p>楼栋:</p>
+          <p>{{infoData.takeBuildName}}</p>
+        </div>
+        <div>
+          <p>实验室:</p>
+          <p>{{infoData.subName}}</p>
+        </div>
+      </div>
+      <div class="info-text-min-box">
+        <div>
+          <p>盘点类型:</p>
+          <p>{{infoData.takeType==1?'按照实验室盘点':'按照化学品柜盘点'}}</p>
+        </div>
+      </div>
+    </div>
+    <div class="table-data-list-box">
+      <el-table border :data="tableData" ref="multipleTable">
+        <el-table-column label="序号"  width="50" align="center"  type="index"/>
+        <el-table-column label="化学品" prop="chemicalName" show-overflow-tooltip/>
+        <el-table-column label="CAS号" prop="casNum" width="130" show-overflow-tooltip/>
+        <el-table-column label="学院" prop="chemicalDpetName" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.dpetFlag == 0?'abnormalColor':''">{{scope.row.chemicalDpetName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="楼栋" prop="chemicalBuildName" width="150" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.buildFlag == 0?'abnormalColor':''">{{scope.row.chemicalBuildName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="实验室" prop="chemicalSubName" width="200" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.subFlag == 0?'abnormalColor':''">{{scope.row.chemicalSubName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="盘点结果" prop="takeResult" width="230"
+                         show-overflow-tooltip v-if="infoData.takeType == 1"/>
+        <el-table-column label="化学品柜" prop="chemicalCabinetName" width="140"
+                         show-overflow-tooltip v-if="infoData.takeType == 2">
+          <template slot-scope="scope">
+            <span :class="scope.row.cabinetFlag == 0?'abnormalColor':''">{{scope.row.chemicalCabinetName}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="盘点结果" prop="takeResult" width="160" s
+                         how-overflow-tooltip v-if="infoData.takeType == 2"/>
+        <el-table-column label="备注" prop="remark" width="120" show-overflow-tooltip/>
+        <el-table-column label="结果" prop="chemicalType" width="80" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span :class="scope.row.chemicalType == 0?'abnormalColor':''">{{scope.row.chemicalType == 1?'正常':'异常'}}</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]" v-show="total>0" :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+                  @pagination="getList"/>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { hxpTakeStockInfo,hxpTakeStockDetailList } from '@/api/chemicalInventory/index'
+  export default {
+    name: 'infoPage',
+    props:{
+      infoDataProps:{},
+    },
+    data(){
+      return{
+        infoData:{},
+        tableData:[],
+        total:10,
+        pageNum:1,
+        pageSize:20,
+        queryParams:{
+          pageNum:1,
+          pageSize:20,
+        },
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.initialization();
+    },
+    methods:{
+      // 初始化
+      initialization(){
+        hxpTakeStockInfo(this.infoDataProps.id).then( response => {
+          this.$set(this,'infoData',response.data);
+        });
+        this.getList();
+      },
+      outButton(){
+        this.$parent.controlsButton(1)
+      },
+      getList(){
+        hxpTakeStockDetailList({takeStockId:this.infoDataProps.id}).then( response => {
+          this.$set(this,'tableData',response.rows);
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .chemicalInventory-info-page{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    .title-box{
+      display: flex;
+      p:nth-child(1){
+        flex:1;
+        line-height:80px;
+        padding-left:20px;
+        color:#0045AF;
+        font-size:16px;
+      }
+      p:nth-child(2){
+        margin:20px;
+        width:90px;
+      }
+      border-bottom:1px solid #E0E0E0;
+    }
+    .info-text-box{
+      padding:36px 80px 0;
+      .info-text-min-box{
+        display: flex;
+        div{
+          flex:1;
+          font-size:16px;
+          display: flex;
+          margin-bottom:36px;
+          p{
+            line-height:20px;
+          }
+          p:nth-child(1){
+            width:80px;
+            text-align: right;
+            margin-right:10px;
+          }
+          p:nth-child(2){
+            flex:1;
+          }
+        }
+      }
+    }
+    .table-data-list-box{
+      flex:1;
+      display: flex!important;
+      flex-direction: column;
+      overflow: hidden;
+      margin:0 80px;
+      .abnormalColor{
+        color:#FF7300
+      }
+    }
+  }
+</style>

+ 26 - 3
src/views/medicUniversity-3_1/chemicalManagement/chemicalLibrary/CabinetManagement/index.vue

@@ -79,7 +79,8 @@
                 <p class="table-button-p">更多>></p>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:1}" v-hasPermiAnd="['chemical:hxpCabinet:query','chemical:hxpCabinet:edit']">编辑</el-dropdown-item>
-                  <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:2}" v-hasPermi="['chemical:hxpCabinet:remove']">删除</el-dropdown-item>
+                  <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;" :command="{row:scope.row,command:2}" v-hasPermi="['chemical:hxpCabinet:remove']">删除</el-dropdown-item>
+                  <el-dropdown-item style="margin:0 10px;" :command="{row:scope.row,command:3}">二维码</el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
               <p class="table-button-null"></p>
@@ -101,6 +102,7 @@
     <list-page v-if="pageType == 3" :listPropsData="listPropsData"></list-page>
     <!--智能锁-->
     <smart-lock v-if="pageType == 4" :smartLockPropsData="smartLockPropsData"></smart-lock>
+    <qr-code-dialog v-if="qrCodeDialogType" :qrCodeDialogData="qrCodeDialogData"></qr-code-dialog>
   </div>
 </template>
 
@@ -110,12 +112,14 @@
   import addPage from "./addPage.vue"
   import listPage from "./listPage.vue"
   import smartLock from "./smartLock.vue"
+  import qrCodeDialog from "@/components/qrCodeDialog/index.vue"
   export default {
     name: "CabinetManagement",
     components: {
       addPage,
       listPage,
-      smartLock
+      smartLock,
+      qrCodeDialog
     },
     data() {
       return {
@@ -147,7 +151,10 @@
         //化学品页面传参
         listPropsData:{},
         //智能锁页面传参
-        smartLockPropsData:{}
+        smartLockPropsData:{},
+        //二维码组件参数
+        qrCodeDialogType:false,
+        qrCodeDialogData:{},
       };
     },
     created() {
@@ -184,6 +191,22 @@
             });
           }).then(() => {
           }).catch(() => {});
+        }else if(data.command == 3){
+          console.log('二维码')
+          this.qrCodeDialogButton(1,data.row.id,data.row.cabinetName)
+        }
+      },
+      //二维码组件开关
+      qrCodeDialogButton(type,id,name){
+        if(type == 1){
+          this.$set(this,'qrCodeDialogData',{
+            type:'8',          //二维码类型 用于区分二维码功能类型
+            parameter:id,                     //二维码参数
+            name:name,                        //二维码名称用于下载时命名
+          });
+          this.$set(this,'qrCodeDialogType',true);
+        }else{
+          this.$set(this,'qrCodeDialogType',false);
         }
       },
       //启用/停用

+ 0 - 311
src/views/safetyEducationExam/safeLearning/hazard_book/index.vue

@@ -1,311 +0,0 @@
-<!--危化品安全技术说明书-->
-<template>
-  <div class="app-container hazard-book">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="108px">
-      <el-form-item label="危险品名称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入危险品名称"
-          maxLength="20"
-          clearable
-          size="small"
-        />
-      </el-form-item>
-      <el-form-item style="float: right;">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['laboratory:hazard_book:add']"
-        >新增</el-button>
-      </el-form-item>
-      <el-form-item>
-        <p class="inquire-button-one" @click="handleQuery">查询</p>
-        <p class="reset-button-one" @click="resetQuery">重置</p>
-      </el-form-item>
-    </el-form>
-    <el-table v-loading="loading" border :data="hazard_bookList" @selection-change="handleSelectionChange">
-      <el-table-column label="序号" type="index" align="center" width="50"/>
-      <el-table-column label="名称" align="left" prop="name" />
-      <el-table-column label="编号" align="left" prop="code"/>
-      <el-table-column label="创建时间" align="left" prop="createTime"/>
-      <el-table-column label="查看次数" align="left" prop="scanCount"/>
-      <el-table-column label="二维码" align="left" width="140">
-        <template slot-scope="scope">
-          <div @click="dialogQrCodeOn(scope.row.qrCodeUrl)">
-            <vue-qr style="height:50px;width:50px;cursor:pointer;" :text="scope.row.qrCodeUrl" :size="200"></vue-qr>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" width="160" v-if="tableButtonType">
-        <template slot-scope="scope">
-          <div class="table-button-box">
-            <p class="table-button-null"></p>
-            <p class="table-button-p"
-               @click="handleUpdate(scope.row)"
-               v-hasPermiAnd="['laboratory:hazard_book:query','laboratory:hazard_book:edit']"
-            >编辑</p>
-            <p class="table-button-p"
-               @click="handleDelete(scope.row)"
-               v-hasPermi="['laboratory:hazard_book:remove']"
-            >删除</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.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改危化品安全技术说明书对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
-        <el-form-item label="危险品名称" prop="name" style="width:498px;">
-          <el-input v-model="form.name" placeholder="请输入名称" maxLength="20"/>
-        </el-form-item>
-        <el-form-item label="编号" prop="code" style="width:498px;">
-          <el-input v-model="form.code" placeholder="请输入编号" maxLength="20"/>
-        </el-form-item>
-        <el-form-item label="详情" prop="content" v-if="open">
-          <!--<editor v-model="form.content" :min-height="192"/>-->
-          <wangEditor :content="form.content" @change="change" :min-height="192"/>
-          <!--<wangEditor v-model="form.content" @change="change" :min-height="192"/>-->
-        </el-form-item>
-        <!--
-        <el-form-item label="二维码地址" prop="qrCodeUrl">
-          <el-input v-model="form.qrCodeUrl" placeholder="请输入二维码地址" />
-        </el-form-item>
-        <el-form-item label="查看次数" prop="scanCount">
-          <el-input v-model="form.scanCount" placeholder="请输入查看次数" />
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        -->
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-    <!-- 二维码展示 -->
-    <el-dialog title="二维码" class="qr-codeUrl-dialog" :visible.sync="dialogQrCodeType" width="300px" append-to-body :close-on-click-modal="false">
-      <vue-qr style="display: block;height:200px;width:200px;cursor:pointer;margin:0 auto;" :text="dialogQrCodeUrl" :size="200"></vue-qr>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { listHazard_book, getHazard_book, delHazard_book, addHazard_book, updateHazard_book } from "@/api/laboratory/hazard_book";
-import vueQr from 'vue-qr'
-
-export default {
-  components:{
-    vueQr
-  },
-  name: "Hazard_book",
-  data() {
-    return {
-      tableButtonType:this.hasPermiDom(['laboratory:hazard_book:query','laboratory:hazard_book:edit','laboratory:hazard_book:remove']),
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 危化品安全技术说明书表格数据
-      hazard_bookList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize:20,
-        name: null,
-        code: null,
-        content: null,
-        qrCodeUrl: null,
-        scanCount: null,
-        userId: null,
-        deptId: null,
-        deptName: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        name:[
-          {required: true, message: '请输入危险品名称', trigger: 'blur'},
-          { required: true, message: "请输入危险品名称", validator: this.spaceJudgment, trigger: "blur" }
-        ],
-        code:[
-          {required: true, message: '请输入编号', trigger: 'blur'},
-          { required: true, message: "请输入危险品名称", validator: this.spaceJudgment, trigger: "blur" }
-        ],
-        content:[
-          {required: true, message: '请输入详情', trigger: 'blur'},
-          { required: true, message: "请输入危险品名称", validator: this.spaceJudgmentHTML, trigger: "blur" }
-        ],
-      },
-      //二维码展示数据
-      dialogQrCodeType:false,
-      dialogQrCodeUrl:"",
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    dialogQrCodeOn(url){
-      this.dialogQrCodeUrl = url;
-      this.dialogQrCodeType = true;
-    },
-    change(val) {
-      this.$set(this.form,'content',val);
-      // this.form.content = val;
-      console.log(val)
-    },
-    /** 查询危化品安全技术说明书列表 */
-    getList() {
-      this.loading = true;
-      listHazard_book(this.queryParams).then( response => {
-        this.hazard_bookList =  response.rows;
-        this.total =  response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        name: null,
-        code: null,
-        content: null,
-        qrCodeUrl: null,
-        scanCount: null,
-        userId: null,
-        createBy: null,
-        updateBy: null,
-        deptId: null,
-        deptName: null,
-        createTime: null,
-        updateTime: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加危化品安全技术说明书";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getHazard_book(id).then( response => {
-        this.form =  response.data;
-        this.form.content = unescape(response.data.content);
-        this.open = true;
-        this.title = "修改危化品安全技术说明书";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          this.form.content = escape(this.form.content);
-          if (this.form.id != null) {
-            updateHazard_book(this.form).then( response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addHazard_book(this.form).then( response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除危化品安全技术说明书编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delHazard_book(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/hazard_book/export', {
-        ...this.queryParams
-      }, `laboratory_hazard_book.xlsx`)
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss">
-  .hazard-book {
-    display: flex !important;
-    flex-direction: column;
-    box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
-    padding:20px!important;
-    .button-box{
-      margin:0 auto;
-      width:190px;
-      display: flex;
-    }
-    .el-input--small{
-      width:260px;
-    }
-  }
-</style>

+ 844 - 0
src/views/safetyEducationExam/trainingCourse/addDialog.vue

@@ -0,0 +1,844 @@
+<template>
+  <!--添加/编辑弹窗-->
+  <el-dialog class="trainingCourseAddDialog" :title='dialogTitle' @close="dialogClose"
+             :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false"
+             :visible.sync="dialogType" v-if="dialogType" width="1373px">
+    <!--提交界面-->
+    <el-form class="add-dialog-form-box" ref="dialogForm" v-show="!dialogUserType" :model="dialogForm" :rules="rules" label-width="120px">
+      <el-form-item label="课程名称:" prop="courseName">
+        <el-input v-model="dialogForm.courseName" placeholder="请输入课程名称"
+                  maxLength="30" style="width:800px;"/>
+      </el-form-item>
+      <div class="dialogFormFlex">
+        <el-form-item label="主讲老师:" prop="lecturerId">
+          <el-select
+            @change="lecturerIdChange"
+            style="width:300px;"
+            v-model="dialogForm.lecturerId"
+            filterable
+            remote
+            reserve-keyword
+            placeholder="请输入姓名"
+            :remote-method="getMainTeacher"
+            :loading="loading">
+            <el-option
+              v-for="item in mainTeacherOptions"
+              :key="item.userId"
+              :label="item.nickName"
+              :value="item.userId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="辅导老师:" prop="tutorId" label-width="200px">
+          <el-select
+            style="width:300px;"
+            v-model="dialogForm.tutorId"
+            multiple
+            filterable
+            remote
+            reserve-keyword
+            collapse-tags
+            :multiple-limit="3"
+            placeholder="请输入姓名"
+            :remote-method="getSecondaryTeacher"
+            :loading="loading">
+            <el-option
+              v-for="item in secondaryTeacherOptions"
+              :key="item.userId"
+              :label="item.nickName"
+              :value="item.userId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="上课人员:" prop="userIds" label-width="200px">
+          <p style="line-height:40px;color:#0183FA;cursor: pointer;width:300px;" @click="addUserButton">
+            已选择 ({{dialogForm.userIds?dialogForm.userIds.length:0}}人)
+          </p>
+        </el-form-item>
+      </div>
+      <div class="dialogFormFlex">
+        <el-form-item label="上课场所:" prop="placeId">
+          <el-select v-model="dialogForm.placeId"
+                     @change="deptChange"
+                     style="width:300px;" placeholder="请选择学院">
+            <el-option
+              v-for="item in deptOptions"
+              :key="item.deptId"
+              :label="item.deptName"
+              :value="item.deptId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="dialogForm.selectType==1?'实验室:':'上课场所:'" prop="subId" label-width="200px">
+          <el-select
+            style="width:300px;"
+            v-if="dialogForm.selectType == 1"
+            v-model="dialogForm.subId"
+            filterable
+            remote
+            reserve-keyword
+            placeholder="请选择实验室"
+            :remote-method="getSubList"
+            :loading="loading">
+            <el-option
+              v-for="item in subOptions"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id">
+            </el-option>
+          </el-select>
+          <el-input v-model="dialogForm.position" v-if="dialogForm.selectType == 2"
+                    placeholder="请输入上课场所" maxLength="20" style="width:300px;"/>
+        </el-form-item>
+        <p class="inquire-button-one"
+           style="margin-left:20px;width:140px;border-radius:4px;" @click="subTypeClick">
+          {{dialogForm.selectType==1?'手动输入上课场所':(dialogForm.selectType==2?'选择学校':'')}}
+        </p>
+      </div>
+      <div class="dialogFormFlex">
+        <el-form-item label="上课时间:" prop="courseTime">
+          <el-time-picker
+            class="trainingCourse-el-time-picker"
+            :popper-append-to-body="true"
+            is-range
+            style="width:300px;"
+            format="HH:mm"
+            value-format="HH:mm"
+            v-model="dialogForm.courseTime"
+            range-separator="至"
+            start-placeholder="开始时间"
+            end-placeholder="结束时间"
+            placeholder="选择时间范围">
+          </el-time-picker>
+        </el-form-item>
+        <el-form-item label="上课日期:" prop="courseDate" label-width="200px"  v-if="!dialogForm.id">
+          <el-date-picker
+            style="width:300px;"
+            value-format="yyyy-MM-dd"
+            v-model="dialogForm.courseDate"
+            type="daterange"
+            :picker-options="pickerOptions"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="上课日期:" prop="courseDate" label-width="200px"  v-if="dialogForm.id">
+          <el-date-picker
+            style="width:300px;"
+            value-format="yyyy-MM-dd"
+            v-model="dialogForm.courseDate"
+            type="date"
+            :picker-options="pickerOptions"
+            placeholder="选择日期">
+          </el-date-picker>
+        </el-form-item>
+      </div>
+      <el-form-item label="课程内容:" prop="content">
+        <el-input type="textarea" v-model="dialogForm.content" resize="none" show-word-limit
+                  :autosize="{ minRows: 10, maxRows: 10}" maxLength="100" placeholder="请输入处理描述"
+                  style="width:1122px;"/>
+      </el-form-item>
+    </el-form>
+    <!--人员选择界面-->
+    <div class="inspectionPlan-dialog-user-box" v-show="dialogUserType">
+      <div class="left-max-box">
+        <div class="dept-table-title-box">
+          <p>待选人员</p>
+          <p>{{userNumLeft}}/{{userTotalLeft}}</p>
+        </div>
+        <div class="dept-table-max-box">
+          <el-form :model="userQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="userQueryParamsLeft.deptId" clearable placeholder="选择部门" style="width: 110px">
+                <el-option
+                  v-for="item in deptOptions"
+                  :key="item.deptId"
+                  :label="item.deptName"
+                  :value="item.deptId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="searchValue" class="form-index">
+              <el-input
+                maxLength="20"
+                v-model="userQueryParamsLeft.searchValue"
+                placeholder="搜索姓名/工号"
+                clearable
+                @clear="userHandleQueryLeft"
+                style="width: 240px">
+                <p class="el-icon-search" slot="append" @click="userHandleQueryLeft"></p>
+              </el-input>
+            </el-form-item>
+            <el-form-item style="margin-right:0;">
+              <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
+            </el-form-item>
+          </el-form>
+          <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
+            <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
+            <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
+            <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
+            <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
+          </el-table>
+          <pagination layout="total, prev, pager, next, jumper"
+                      v-show="userTotalLeft>0"
+                      :total="userTotalLeft"
+                      :pager-count="5"
+                      :page.sync="userQueryParamsLeft.pageNum"
+                      :limit.sync="userQueryParamsLeft.pageSize"
+                      @pagination="userGetListLeft"/>
+        </div>
+      </div>
+      <div class="center-box">
+        <p class="el-icon-arrow-left" @click="userArrowButton(1)"></p>
+        <p class="el-icon-arrow-right" @click="userArrowButton(2)"></p>
+      </div>
+      <div class="right-max-box">
+        <div class="dept-table-title-box">
+          <p>已选成员</p>
+          <p>{{userNumRight}}/{{userTotalRight}}</p>
+        </div>
+        <div class="dept-table-max-box">
+          <el-form :model="userQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="userQueryParamsRight.deptId" clearable placeholder="选择部门" style="width: 110px">
+                <el-option
+                  v-for="item in deptOptions"
+                  :key="item.deptId"
+                  :label="item.deptName"
+                  :value="item.deptId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="searchValue" class="form-index">
+              <el-input
+                maxLength="20"
+                v-model="userQueryParamsRight.searchValue"
+                placeholder="搜索姓名/工号"
+                clearable
+                @clear="userHandleQueryRight"
+                style="width: 240px">
+                <p class="el-icon-search" slot="append" @click="userHandleQueryRight"></p>
+              </el-input>
+            </el-form-item>
+            <el-form-item style="margin-right:0;">
+              <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
+            </el-form-item>
+          </el-form>
+          <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
+            <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
+            <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
+            <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
+            <el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
+          </el-table>
+          <pagination layout="total, prev, pager, next, jumper"
+                      v-show="userTotalRight>0"
+                      :total="userTotalRight"
+                      :pager-count="5"
+                      :page.sync="userQueryParamsRight.pageNum"
+                      :limit.sync="userQueryParamsRight.pageSize"
+                      @pagination="userGetListRight"/>
+        </div>
+      </div>
+    </div>
+    <!--公共操作按钮-->
+    <div slot="footer" class="dialog-footer">
+      <p class="dialog-footer-null-p"></p>
+      <el-button @click="dialogClose">取 消</el-button>
+      <el-button type="primary" @click="dialogSubmit">确认</el-button>
+      <p class="dialog-footer-null-p"></p>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { findUserList,selectUser,departmentsList,subListAdmin,securitycourseAdd,securitycourseEdit } from '@/api/trainingCourse/index'
+  export default {
+    name: 'trainingCourseAddDialog',
+    props:{
+      addDialogData:{},
+    },
+    data(){
+      const timeRules = (rule, value, callback) => {
+        if(value[0] == value[1]){
+          callback(new Error("开始与结束时间不能相同"));
+        }else{
+          callback();
+        }
+      };
+      return{
+        // 设置只能选择当前日期及之后的日期
+        pickerOptions: {
+          disabledDate(time) {
+            const times = new Date(new Date().toLocaleDateString()).getTime() + 30 * 8.64e7 - 1
+            return time.getTime() < Date.now() - 8.64e7 || time.getTime() > times  // 如果没有后面的-8.64e7就是不可以选择今天的
+          }
+        },
+        // 遮罩层
+        loading: false,
+        //弹窗数据
+        dialogType:true,
+        dialogUserType:false,
+        dialogTitle:"",
+        dialogForm:{
+          courseName:"",
+          lecturerId:"",
+          lecturerName:"",
+          tutorId:"",
+          userIds:[],
+          placeId:"",
+          place:"",
+          subId:"",
+          position:"",
+          selectType:1,
+          content:"",
+          courseTime:["00:00","00:00"],
+          courseDate:[],
+        },
+        //验证
+        rules: {
+          phone: [
+            { required: true, message: "请输入联系方式", trigger: "blur" },
+            { required: true, message: "请输入联系方式", validator: this.spaceJudgment, trigger: "blur" },
+            { pattern:/^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(16[0-9])|(17[0,3,5-8])|(18[0-9])|(147))+\d{8}$/, message: "请输入正确的联系方式", trigger: "blur" }
+          ],
+          courseName: [
+            { required: true, message: "请输入课程名称", trigger: "blur" },
+            { required: true, message: "请输入课程名称", validator: this.spaceJudgment, trigger: "blur" }
+          ],
+          lecturerId: [
+            { required: true, message: "请选择主讲老师", trigger: "blur" },
+          ],
+          userIds: [
+            { required: true, message: "请选择上课人员", trigger: "blur" },
+          ],
+          placeId: [
+            { required: true, message: "请选择上课场所", trigger: "blur" },
+          ],
+          courseTime: [
+            { required: true, message: "请选择上课时间", trigger: "blur" },
+            { required: true, message: "开始与结束时间不能相同", validator: timeRules, trigger: "blur" },
+          ],
+          courseDate: [
+            { required: true, message: "请选择上课日期", trigger: "blur" },
+          ],
+        },
+        //主要老师
+        mainTeacherOptions:[],
+        //辅助老师
+        secondaryTeacherOptions:[],
+        //院系列表
+        deptOptions:[],
+        //实验室列表
+        subOptions:[],
+        /**********人员选择数据**********/
+        userQueryParamsLeft:{
+          pageNum: 1,
+          pageSize: 20,
+          deptId:"",
+          searchValue:"",
+          filtType:1
+        },
+        userTableListLeft:[],
+        userTotalLeft:0,
+        userNumLeft:0,
+        userIdsLeft:[],
+        userQueryParamsRight:{
+          pageNum: 1,
+          pageSize: 20,
+          deptId:"",
+          searchValue:"",
+          filtType:2
+        },
+        userTableListRight:[],
+        userTotalRight:0,
+        userNumRight:0,
+        userIdsRight:[],
+        //选择人员交互数据
+        dialogTableDataList:[],
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.initialize();
+    },
+    methods:{
+      //初始化
+      initialize(){
+        let self = this;
+        this.$set(this,'dialogTitle',this.addDialogData.id?'编辑':'添加');
+        if(this.addDialogData.id){
+          //编辑数据
+          let obj = {
+            id:this.addDialogData.id,
+            courseName:this.addDialogData.courseName,
+            lecturerId:this.addDialogData.lecturerId,
+            lecturerName:this.addDialogData.lecturerName,
+            tutorId:'',
+            placeId:parseInt(this.addDialogData.placeId),
+            place:this.addDialogData.place,
+            content:this.addDialogData.content,
+            courseTime:[this.addDialogData.coStartTime,this.addDialogData.coEndTime],
+            courseDate:this.addDialogData.coStartDate,
+            userIds:[],
+          };
+          //处理主要老师列表
+          let mainTeacherList = [{userId:this.addDialogData.lecturerId,nickName:this.addDialogData.lecturerName}];
+          this.$set(this,'mainTeacherOptions',mainTeacherList);
+          //处理辅助老师列表
+          if(this.addDialogData.tutorId){
+            obj.tutorId = this.addDialogData.tutorId.split(',');
+            let userIdList = this.addDialogData.tutorId.split(',');
+            let nickNameList = this.addDialogData.tutorName.split(',');
+            let secondaryTeacherList = [];
+            for(let i=0;i<userIdList.length;i++){
+              secondaryTeacherList.push({userId:userIdList[i],nickName:nickNameList[i]})
+            }
+            this.$set(this,'secondaryTeacherOptions',secondaryTeacherList);
+          }
+          //处理实验室数据&手动输入场地
+          if(this.addDialogData.subId){
+            obj.subId = this.addDialogData.subId;
+            obj.position = "";
+            obj.selectType = 1;
+            //处理实验室列表
+            let subList = [{name:this.addDialogData.subName,id:this.addDialogData.subId}]
+            this.$set(this,'subOptions',subList);
+          }else{
+            if(this.addDialogData.position){
+              obj.subId = "";
+              obj.position = this.addDialogData.position;
+              obj.selectType = 2;
+            }else{
+              obj.subId = "";
+              obj.position = "";
+              obj.selectType = 1;
+            }
+          }
+          //处理学生数据
+          for(let i=0;i<self.addDialogData.userIds.length;i++){
+            obj.userIds.push({userId:self.addDialogData.userIds[i]})
+          }
+          //根据当前选择院系获取实验室列表
+          this.getSubList('',this.addDialogData.placeId)
+          this.$set(this,'dialogForm',obj);
+        }
+        this.getDeptList();
+      },
+      //提交按钮
+      dialogSubmit(){
+        let self = this;
+        if(this.dialogUserType){
+          //选择人员页面
+          if(!this.dialogTableDataList[0]){
+            this.msgError('请选择人员')
+            return
+          }
+          let userList = JSON.parse(JSON.stringify(this.dialogTableDataList))
+          this.$set(this.dialogForm,'userIds',userList)
+          this.$set(this,'dialogUserType',false)
+        }else{
+          //提交页面
+          this.$refs["dialogForm"].validate(valid => {
+            if (valid) {
+              if(this.dialogForm.id){
+                //编辑
+                let obj = {
+                  id:this.dialogForm.id,
+                  courseName:this.dialogForm.courseName,
+                  lecturerId:this.dialogForm.lecturerId,
+                  lecturerName:this.dialogForm.lecturerName,
+                  tutorId:this.dialogForm.tutorId+'',
+                  userIds:[],
+                  placeId:this.dialogForm.placeId,
+                  place:this.dialogForm.place,
+                  coStartTime:this.dialogForm.courseTime[0],
+                  coEndTime:this.dialogForm.courseTime[1],
+                  courseDate:[this.dialogForm.courseDate,this.dialogForm.courseDate],
+                  content:this.dialogForm.content,
+                  peopleCount:this.dialogForm.userIds.length,
+                }
+                if(this.dialogForm.selectType == 1){
+                  obj.subId = this.dialogForm.subId;
+                }else{
+                  obj.position = this.dialogForm.position;
+                }
+                for(let i=0;i<self.dialogForm.userIds.length;i++){
+                  obj.userIds.push(self.dialogForm.userIds[i].userId)
+                }
+                securitycourseEdit(obj).then(response => {
+                  this.msgSuccess(response.msg)
+                  this.$parent.controlsButton(6)
+                });
+              }else{
+                //提交
+                let obj = {
+                  courseName:this.dialogForm.courseName,
+                  lecturerId:this.dialogForm.lecturerId,
+                  lecturerName:this.dialogForm.lecturerName,
+                  tutorId:this.dialogForm.tutorId+'',
+                  userIds:[],
+                  placeId:this.dialogForm.placeId,
+                  place:this.dialogForm.place,
+                  coStartTime:this.dialogForm.courseTime[0],
+                  coEndTime:this.dialogForm.courseTime[1],
+                  courseDate:this.dialogForm.courseDate,
+                  content:this.dialogForm.content,
+                  peopleCount:this.dialogForm.userIds.length,
+                }
+                if(this.dialogForm.selectType == 1){
+                  obj.subId = this.dialogForm.subId;
+                }else{
+                  obj.position = this.dialogForm.position;
+                }
+                for(let i=0;i<self.dialogForm.userIds.length;i++){
+                  obj.userIds.push(self.dialogForm.userIds[i].userId)
+                }
+                securitycourseAdd(obj).then(response => {
+                  this.msgSuccess(response.msg)
+                  this.$parent.controlsButton(6)
+                });
+              }
+              console.log('dialogForm',this.dialogForm)
+
+            }
+          })
+        }
+      },
+      //取消按钮
+      dialogClose(){
+        if(this.dialogUserType){
+          //选择人员页面
+          this.$set(this,'dialogTitle',this.addDialogData.id?'编辑':'添加');
+          this.$set(this,'dialogUserType',false);
+        }else{
+          //提交页面
+          this.$parent.controlsButton(5)
+        }
+      },
+      //主要老师选中
+      lecturerIdChange(val){
+        let self = this;
+        for(let i=0;i<self.mainTeacherOptions.length;i++){
+          if(self.mainTeacherOptions[i].userId == val){
+            this.$set(this.dialogForm,'lecturerName',self.mainTeacherOptions[i].nickName);
+          }
+        }
+      },
+      //主要老师搜索
+      getMainTeacher(query){
+        if(query.length > 1){
+          this.loading = true;
+          selectUser({userType:11,nickName:query}).then(response => {
+            this.$set(this,'mainTeacherOptions',response.data)
+            this.loading = false;
+          });
+        }
+      },
+      //辅助老师搜错
+      getSecondaryTeacher(query){
+        if(query.length > 1){
+          this.loading = true;
+          selectUser({userType:11,nickName:query}).then(response => {
+            this.$set(this,'secondaryTeacherOptions',response.data)
+            this.loading = false;
+          });
+        }
+      },
+      //选择院系
+      deptChange(val){
+        let self = this;
+        for(let i=0;i<self.deptOptions.length;i++){
+          if(self.deptOptions[i].deptId == val){
+            this.$set(this.dialogForm,'place',self.deptOptions[i].deptName);
+          }
+        }
+        this.$set(this.dialogForm,'subId','');
+        this.getSubList('')
+      },
+      //获取院系列表
+      getDeptList(){
+        departmentsList().then(response => {
+          this.$set(this,'deptOptions',response.data);
+        });
+      },
+      //获取实验室列表
+      getSubList(val,deptId){
+        console.log(val,deptId)
+        if(val == '' && deptId){
+          subListAdmin({deptId:deptId,name:val}).then(response => {
+            this.$set(this,'subOptions',response.data);
+          });
+        }else if(this.dialogForm.placeId && (val == '' || val.length > 1)){
+          subListAdmin({deptId:this.dialogForm.placeId,name:val}).then(response => {
+            this.$set(this,'subOptions',response.data);
+          });
+        }
+      },
+      //实验室切换
+      subTypeClick(){
+        this.$set(this.dialogForm,'subId','');
+        this.$set(this.dialogForm,'selectType',this.dialogForm.selectType==1?2:1);
+      },
+      //开启人员选择
+      addUserButton(){
+        let userList = JSON.parse(JSON.stringify(this.dialogForm.userIds))
+        this.$set(this,'dialogTableDataList',userList)
+        this.$set(this,'dialogTitle','选择人员');
+        this.$set(this,'dialogUserType',true);
+        this.userHandleQueryLeft();
+        this.userHandleQueryRight();
+      },
+      /*===================================人员选择相关===================================*/
+      //查询
+      userHandleQueryLeft(){
+        this.$set(this.userQueryParamsLeft,'pageNum',1);
+        this.$set(this,'userNumLeft',0);
+        this.$set(this,'userIdsLeft',[]);
+        this.$refs.leftUserTable.clearSelection();
+        this.userGetListLeft();
+      },
+      //重置
+      userResetQueryLeft(){
+        this.$set(this,'userQueryParamsLeft',{
+          pageNum: 1,
+          pageSize: 20,
+          deptId:"",
+          searchValue:"",
+          filtType:1
+        });
+        this.userHandleQueryLeft();
+      },
+      //查询接口
+      userGetListLeft(){
+        let self = this;
+        let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
+        leftObj.selectedUserIds = [];
+        for(let i=0;i<self.dialogTableDataList.length;i++){
+          leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
+        }
+        findUserList(leftObj).then(response => {
+          this.userTotalLeft = response.total;
+          this.userTableListLeft = response.rows;
+        });
+      },
+      //查询
+      userHandleQueryRight(){
+        this.$set(this.userQueryParamsRight,'pageNum',1);
+        this.$set(this,'userNumRight',0);
+        this.$set(this,'userIdsRight',[]);
+        this.$refs.rightUserTable.clearSelection();
+        this.userGetListRight();
+      },
+      //重置
+      userResetQueryRight(){
+        this.$set(this,'userQueryParamsRight',{
+          pageNum: 1,
+          pageSize: 20,
+          deptId:"",
+          searchValue:"",
+          filtType:2
+        });
+        this.userHandleQueryRight();
+      },
+      //查询接口
+      userGetListRight(){
+        let self = this;
+        let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
+        rightObj.userIds = [];
+        for(let i=0;i<self.dialogTableDataList.length;i++){
+          rightObj.userIds.push(self.dialogTableDataList[i].userId);
+        }
+        findUserList(rightObj).then(response => {
+          this.userTotalRight = response.total;
+          this.userTableListRight = response.rows;
+        });
+      },
+      userChangeLeft(selection){
+        this.userNumLeft = selection.length;
+        this.userIdsLeft = selection.map(item => item.userId);
+      },
+      userChangeRight(selection){
+        this.userNumRight = selection.length;
+        this.userIdsRight = selection.map(item => item.userId);
+      },
+      //人员穿梭按钮
+      userArrowButton(type){
+        let self = this;
+        if(type == 1){
+          //右至左
+          if(this.$refs.rightUserTable.selection[0]){
+            let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
+            let userIdsRight = JSON.parse(JSON.stringify(this.$refs.rightUserTable.selection))
+            for(let i=0;i<userIdsRight.length;i++){
+              for(let s=0;s<list.length;s++){
+                if(userIdsRight[i].userId == list[s].userId){
+                  list.splice(s,1);
+                  s--
+                }
+              }
+            }
+            this.$set(this,'dialogTableDataList',list);
+            this.$refs.rightUserTable.clearSelection();
+            this.userHandleQueryLeft();
+            this.userHandleQueryRight();
+          }else{
+            this.msgError('请先勾选右侧列表')
+          }
+        }else if(type == 2){
+          //左至右
+          if(this.userIdsLeft[0]){
+            let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
+            let userIdsLeft = JSON.parse(JSON.stringify(this.$refs.leftUserTable.selection))
+            for(let i=0;i<userIdsLeft.length;i++){
+              let obj = {
+                userId:userIdsLeft[i].userId,
+                name:userIdsLeft[i].nickName,
+                jobNum:userIdsLeft[i].userName,
+                deptName:userIdsLeft[i].deptName,
+                deptId:userIdsLeft[i].deptId,
+                userType:userIdsLeft[i].userType,
+              }
+              list.push(obj);
+            }
+            if(list.length>50){
+              this.msgError('巡查成员最多50人')
+              return
+            }
+            this.$set(this,'dialogTableDataList',list);
+            this.$refs.leftUserTable.clearSelection();
+            this.userHandleQueryLeft();
+            this.userHandleQueryRight();
+          }else{
+            this.msgError('请先勾选左侧列表')
+          }
+        }
+      },
+      /*===记录勾选数据===
+        需要再el-table 添加  :row-key="getRowKeys"
+        需要在selection 添加 :reserve-selection="true"
+      */
+      getRowKeys(row) {
+        return row.userId
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .trainingCourseAddDialog{
+    .add-dialog-form-box{
+      height: 610px;
+    }
+    .dialogFormFlex{
+      display:flex;
+    }
+    .inspectionPlan-dialog-user-box{
+      display: flex;
+      overflow: hidden;
+      height:610px;
+      .el-table__empty-text{
+        background-size: 30%!important;
+      }
+      .dept-table-title-box{
+        display: flex;
+        padding:0 20px;
+        background: rgba(1,131,250,0.1);
+        p{
+          flex:1;
+          color:#0183FA;
+          font-size:16px;
+          line-height:40px;
+        }
+        p:nth-child(1){
+          text-align: left;
+        }
+        p:nth-child(2){
+          text-align: right;
+        }
+      }
+      .dept-table-max-box{
+        border: 1px solid #e0e0e0;
+        flex:1;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        padding:20px;
+        .form-index{
+          .el-input__inner{
+            border-right:none;
+            padding-right:0;
+          }
+          .el-input-group__append{
+            background: #fff;
+            cursor: pointer;
+            padding:0 10px;
+          }
+        }
+        input{
+          border: 1px solid #DCDFE6;
+        }
+      }
+      .left-max-box{
+        height:610px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        width:632px;
+      }
+      .right-max-box{
+        height:610px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
+        width:632px;
+      }
+      .center-box{
+        width:68px;
+        p{
+          display: block;
+          border-radius:50%;
+          width:30px;
+          height:30px;
+          line-height:30px;
+          text-align: center;
+          background: rgba(245,245,245,1);
+          color:rgba(62,62,62,1);
+          cursor: pointer;
+          font-size:16px;
+        }
+        p:nth-child(1){
+          margin:270px 19px 0;
+        }
+        p:nth-child(2){
+          margin:14px 19px 0;
+        }
+        p:hover{
+          color:#fff;
+          background: #0183fa;
+        }
+      }
+      .el-icon-search{
+        cursor: pointer;
+      }
+      ::v-deep .el-input-group__append{
+        padding:0;
+        p{
+          text-align: center;
+          line-height: 34px;
+          width:50px;
+          height:34px;
+          font-size:16px;
+        }
+      }
+    }
+    .dialog-footer{
+      display: flex;
+      .dialog-footer-null-p{
+        flex:1;
+      }
+    }
+  }
+</style>

+ 248 - 0
src/views/safetyEducationExam/trainingCourse/index.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="app-container trainingCourse">
+    <div class="title-box">
+      <el-form class="form-box" :model="queryParams" ref="examineForm" :inline="true" label-width="65px">
+        <el-form-item label="" prop="name">
+          <div class="query-type-box">
+            <p @click="queryTypeClick(null)" :class="queryParams.isStart == null?'check-p':''">全部</p>
+            <p @click="queryTypeClick(0)" :class="queryParams.isStart == 0?'check-p':''">待开课</p>
+            <p @click="queryTypeClick(1)" :class="queryParams.isStart == 1?'check-p':''">已开课</p>
+          </div>
+        </el-form-item>
+        <el-form-item label="关键字" prop="name">
+          <el-input
+            maxlength="10"
+            v-model="queryParams.searchValue"
+            placeholder="课程名称/主讲老师"
+            clearable
+            size="small"/>
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" @click="onSearch">查询</p>
+          <p class="reset-button-one" @click="resetForm">重置</p>
+        </el-form-item>
+        <el-form-item style="float: right;">
+          <p class="inquire-button-one" style="width:100px;" @click="controlsButton(1)">+  新增课程</p>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="content-box">
+      <el-table border :data="tableData" ref="multipleTable">
+        <el-table-column label="序号"  width="50" align="center"  type="index"/>
+        <el-table-column label="课程名称" prop="courseName" show-overflow-tooltip/>
+        <el-table-column label="学院" prop="place" width="180" show-overflow-tooltip/>
+        <el-table-column label="上课地点" prop="position" width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.subId?scope.row.subName+'-'+scope.row.subRoom:scope.row.position}}
+          </template>
+        </el-table-column>
+        <el-table-column label="主讲老师" prop="lecturerName" width="100" show-overflow-tooltip/>
+        <el-table-column label="辅导老师" prop="tutorName" width="100" show-overflow-tooltip/>
+        <el-table-column label="人数" prop="peopleCount" width="80" show-overflow-tooltip/>
+        <el-table-column label="上课时间" prop="coStartDate" width="150" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.coStartTime}} - {{scope.row.coEndTime}}
+          </template>
+        </el-table-column>
+        <el-table-column label="上课日期" prop="coStartDate" width="200" show-overflow-tooltip/>
+        <el-table-column label="状态" prop="mainPoint" width="112" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.isStart == 1?'已开课':'待开课'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="180">
+          <template slot-scope="scope">
+            <div class="table-button-box">
+              <p class="table-button-null"></p>
+              <p class="table-button-p" @click="controlsButton(3,scope.row)">详情</p>
+              <p class="table-button-p" v-if="scope.row.isStart != 1" @click="controlsButton(2,scope.row)">编辑</p>
+              <p class="table-button-p" v-if="scope.row.isStart != 1" @click="controlsButton(4,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"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+                  @pagination="getList"/>
+    </div>
+    <!--添加/编辑弹窗-->
+    <add-dialog v-if="addDialogType" :addDialogData="addDialogData"></add-dialog>
+    <info-dialog v-if="infoDialogType" :infoDialogData="infoDialogData"></info-dialog>
+  </div>
+</template>
+
+<script>
+  import addDialog from './addDialog.vue'
+  import infoDialog from './infoDialog.vue'
+  import { securitycourseList,securitycourseDel,securitycourseInfo } from '@/api/trainingCourse/index'
+  export default {
+    name: 'trainingCourse',
+    components: {
+      addDialog,
+      infoDialog
+    },
+    data(){
+      return{
+        // 遮罩层
+        loading: false,
+        //查询数据
+        queryParams:{
+          isStart:null,
+          searchValue:"",
+          page:1,
+          pageSize:20,
+        },
+        //列表数据
+        tableData: [],
+        total:0,
+        //新增弹窗数据
+        addDialogType:false,
+        addDialogData:{},
+        //详情弹窗数据
+        infoDialogType:false,
+        infoDialogData:{},
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.getList();
+    },
+    methods:{
+      //列表状态切换
+      queryTypeClick(type){
+        if(this.queryParams.isStart != type){
+          this.$set(this.queryParams,'isStart',type);
+          this.getList();
+        }
+      },
+      //列表搜索
+      onSearch(){
+        this.$set(this.queryParams,'page',1);
+        this.getList();
+      },
+      //列表重置
+      resetForm(){
+        this.$set(this,'queryParams',{
+          isStart:null,
+          searchValue:"",
+          page:1,
+          pageSize:20,
+        });
+        this.onSearch();
+      },
+      // 查询数据列表
+      getList() {
+        this.loading = true;
+        securitycourseList(this.queryParams).then( response => {
+          this.$set(this,'tableData',response.rows);
+          this.$set(this,'total',response.total);
+          this.loading = false;
+        });
+      },
+      //操作按钮
+      controlsButton(type,row){
+        if(type == 1){
+          //新增
+          this.$set(this,'addDialogData',{});
+          this.$set(this,'addDialogType',true);
+        }else if(type == 2){
+          //编辑
+          securitycourseInfo(row.id).then( response => {
+            this.$set(this,'addDialogData',response.data);
+            this.$set(this,'addDialogType',true);
+          });
+        }else if(type == 3){
+          //详情
+          securitycourseInfo(row.id).then( response => {
+            this.$set(this,'infoDialogData',response.data);
+            this.$set(this,'infoDialogType',true);
+          });
+        }else if(type == 4){
+          //删除
+          let self = this;
+          this.$confirm('是否确认删除?', "警告", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(function() {
+            securitycourseDel(row.id).then(response => {
+              console.log('123123')
+              self.msgSuccess(response.msg)
+              self.getList();
+            })
+          }).then(() => {
+          }).catch(() => {});
+        }else if(type == 5){
+          //关闭新增&编辑窗口
+          this.$set(this,'addDialogType',false);
+          this.$set(this,'addDialogData',{});
+        }else if(type == 6){
+          //关闭新增&编辑窗口 并刷新页面
+          this.$set(this,'addDialogType',false);
+          this.$set(this,'addDialogData',{});
+          this.resetForm();
+        }else if(type == 7){
+          //关闭详情窗口
+          this.$set(this,'infoDialogType',false);
+          this.$set(this,'infoDialogData',{});
+        }
+      },
+    }
+  }
+</script>
+
+<style scoped lang="scss">
+  .trainingCourse{
+    flex:1;
+    display: flex!important;
+    flex-direction: column;
+    overflow: hidden;
+    font-weight: 500;
+    .title-box{
+      padding-top:20px;
+      .form-box{
+        border-bottom:1px solid #E0E0E0;
+        .query-type-box{
+          margin-left:20px;
+          display: flex;
+          p{
+            line-height:40px;
+            font-size:14px;
+            color:#333;
+            width:80px;
+            text-align: center;
+            cursor: pointer;
+          }
+          p:nth-child(1){
+            border:1px solid #E0E0E0;
+            border-radius: 4px 0 0 4px
+          }
+          p:nth-child(2){
+            border-top:1px solid #E0E0E0;
+            border-bottom:1px solid #E0E0E0;
+          }
+          p:nth-child(3){
+            border:1px solid #E0E0E0;
+            border-radius: 0 4px 4px 0
+          }
+          .check-p{
+            color:#fff;
+            background: #0045AF;
+            border-color:#0045AF!important;
+          }
+        }
+      }
+    }
+    .content-box{
+      flex:1;
+      overflow: hidden;
+      display: flex;
+      flex-direction: column;
+      padding:20px;
+    }
+  }
+</style>

+ 432 - 0
src/views/safetyEducationExam/trainingCourse/infoDialog.vue

@@ -0,0 +1,432 @@
+<template>
+  <el-dialog class="trainingCourseInfoDialog" :title='dialogTitle'
+             :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false"
+             :visible.sync="dialogType" v-if="dialogType" width="1161px">
+    <div class="info-max-big-box" v-if="infoType == 1">
+      <div class="info-big-box">
+        <div>
+          <p>课程名称:</p>
+          <p>{{infoData.courseName}}</p>
+        </div>
+        <div>
+          <p>是否开课:</p>
+          <p>{{infoData.isStart==1?'已开课':'未开课'}}</p>
+        </div>
+      </div>
+      <div class="info-big-box">
+        <div>
+          <p>主讲老师:</p>
+          <p>{{infoData.lecturerName}}</p>
+        </div>
+        <div>
+          <p>辅导老师:</p>
+          <p>{{infoData.tutorName}}</p>
+        </div>
+      </div>
+      <div class="info-big-box">
+        <div>
+          <p>上课人员:</p>
+          <p class="color-p cursor-p" @click="pageTypeClick(2)">已选择学生 ({{infoData.userIds?infoData.userIds.length:0}}人)</p>
+        </div>
+        <div>
+          <p>上课场所:</p>
+          <p>{{infoData.place}}</p>
+        </div>
+      </div>
+      <div class="info-big-box">
+        <div>
+          <p>上课日期:</p>
+          <p>{{infoData.courseDate}}</p>
+        </div>
+        <div>
+          <p>上课时间:</p>
+          <p>{{infoData.courseTime}}</p>
+        </div>
+      </div>
+      <div class="info-big-box-one">
+        <p>课程内容:</p>
+        <p>{{infoData.content?infoData.content:'无'}}</p>
+      </div>
+      <p class="info-big-box-title" v-if="infoData.isStart==1">课后总结</p>
+      <div class="info-big-box-user" v-if="infoData.isStart==1">
+        <p>签到人员:</p>
+        <p @click="pageTypeClick(3)">
+          <span>实际签到人数({{infoData.actualCount}}人)</span>
+          <span>、有{{infoData.notHaveCount}}人未签到</span>
+          <span>、非计划内签到{{infoData.outPlanCount}}人</span>
+        </p>
+      </div>
+      <div class="info-big-box-img" v-if="infoData.isStart==1" :class="!infoData.courseImg[0]?'info-big-box-img-margin-bottom':''">
+        <p>上传照片:</p>
+        <div>
+          <p v-if="!infoData.courseImg[0]">无</p>
+          <img v-for="(item,index) in infoData.courseImg" :key="index"
+               @click="pageTypeClick(4,item,index)" :src="item">
+        </div>
+      </div>
+      <div class="info-big-box-one" v-if="infoData.isStart==1">
+        <p>课程总结:</p>
+        <p>{{infoData.courseSm?infoData.courseSm:'无'}}</p>
+      </div>
+    </div>
+    <div class="user-max-big-box" v-if="infoType == 2 || infoType == 3">
+      <el-form class="form-box" :model="userQueryParams" ref="examineForm" :inline="true">
+        <el-form-item label="" prop="nickName">
+          <el-input
+            style="width:150px;"
+            maxlength="10"
+            v-model="userQueryParams.nickName"
+            placeholder="请输入姓名"/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-select v-model="userQueryParams.isSing"
+                     style="width:150px;"
+                     placeholder="请选择启动条件">
+            <el-option
+              v-for="dict in typeOptions"
+              :key="dict.key"
+              :label="dict.value"
+              :value="dict.key"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="是否计划内" v-if="infoType == 3">
+          <el-select v-model="userQueryParams.singType"
+                     style="width:150px;"
+                     placeholder="请选择启动条件">
+            <el-option
+              v-for="dict in projectOptions"
+              :key="dict.key"
+              :label="dict.value"
+              :value="dict.key"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <p class="inquire-button-one" @click="onSearch">查询</p>
+          <p class="reset-button-one" @click="resetForm">重置</p>
+        </el-form-item>
+      </el-form>
+      <p class="sign-in-num">
+        <span>签到人数:{{infoData.actualCount}}</span>
+        <span>、未签到人数:{{infoData.notHaveCount}}</span>
+        <span v-if="infoType == 3">、计划外签到人数:{{infoData.outPlanCount}}</span>
+      </p>
+      <el-table border :data="tableData" ref="multipleTable">
+        <el-table-column label="序号"  width="50" align="center"  type="index"/>
+        <el-table-column label="姓名" prop="nickName" show-overflow-tooltip/>
+        <el-table-column label="导师" prop="tutorName" width="150" show-overflow-tooltip/>
+        <el-table-column label="班级" prop="className" width="150" show-overflow-tooltip/>
+        <el-table-column label="所在部门" prop="deptName" width="300" show-overflow-tooltip v-if="infoType == 2"/>
+        <el-table-column label="所在部门" prop="deptName" width="150" show-overflow-tooltip v-if="infoType == 3"/>
+        <el-table-column label="是否计划内" prop="singType" width="150" show-overflow-tooltip v-if="infoType == 3">
+          <template slot-scope="scope">
+            {{scope.row.singType == 1?'否':'是'}}
+          </template>
+        </el-table-column>
+        <el-table-column label="状态" prop="isSing" width="150" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.isSing == 1?'已签到':'未签到'}}
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :page-sizes="[20, 30, 40, 50]" v-show="total>0" :total="total"
+                  layout="total, prev, pager, next, sizes, jumper"
+                  :page.sync="userQueryParams.pageNum" :limit.sync="userQueryParams.pageSize"
+                  @pagination="getList"/>
+    </div>
+    <div class="img-max-big-box" v-if="infoType == 4">
+      <div class="look-img-box scrollbar-box">
+        <img class="look-img" :src="lookUrl">
+      </div>
+    </div>
+    <p class="position-off-button el-icon-close" @click="dialogClose"></p>
+    <div slot="footer" class="img-button-box" v-if="infoType == 4">
+      <p class="img-null-p"></p>
+      <div class="img-button-min-box">
+        <img v-for="(item,index) in infoData.courseImg" :key="index"
+             :class="index==lookIndex?'lookImg':''"
+             @click="lockImgButton(item,index)" :src="item">
+      </div>
+      <p class="img-null-p"></p>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import { singList } from '@/api/trainingCourse/index'
+  export default {
+    name: 'trainingCourseInfoDialog',
+    props:{
+      infoDialogData:{},
+    },
+    data(){
+      return{
+        dialogTitle:"",
+        dialogType:true,
+        dialogUserType:false,
+        //页面状态 1.详情 2.人员 3.照片
+        infoType:1,
+        //详情数据
+        infoData:{},
+        // 查看图片url
+        lookUrl:null,
+        // 查看图片index
+        lookIndex:null,
+        //人员查询相关
+        userQueryParams:{
+          pageNum:1,
+          pageSize:20,
+          nickName:"",
+          isSing:'',
+          singType:'',
+        },
+        typeOptions:[{key:'',value:"全部"},{key:"1",value:"已签到"},{key:"0",value:"未签到"}],
+        projectOptions:[{key:'',value:"全部"},{key:"0",value:"是"},{key:"1",value:"否"}],
+        tableData:[],
+        total:0,
+      }
+    },
+    created(){
+
+    },
+    mounted(){
+      this.initialize();
+    },
+    methods:{
+      //初始化
+      initialize(){
+        this.$set(this,'dialogTitle','详情');
+        let obj = {
+          courseName:this.infoDialogData.courseName,
+          isStart:this.infoDialogData.isStart,
+          lecturerName:this.infoDialogData.lecturerName,
+          tutorName:this.infoDialogData.tutorName,
+          userIds:this.infoDialogData.userIds,
+          place:this.infoDialogData.subId?this.infoDialogData.place+' , '+this.infoDialogData.subName:this.infoDialogData.place+' , '+this.infoDialogData.position,
+          courseDate:this.infoDialogData.coStartDate,
+          courseTime:this.infoDialogData.coStartTime+'至'+this.infoDialogData.coEndTime,
+          content:this.infoDialogData.content,
+          actualCount:this.infoDialogData.actualCount,
+          notHaveCount:this.infoDialogData.notHaveCount,
+          outPlanCount:this.infoDialogData.outPlanCount,
+          courseImg:this.infoDialogData.courseImg?this.infoDialogData.courseImg.split(','):[],
+          courseSm:this.infoDialogData.courseSm,
+        }
+        this.$set(this,'infoData',obj);
+      },
+      //页面状态切换
+      pageTypeClick(type,item,index){
+        if(this.infoType != type){
+          this.$set(this,'dialogTitle',type == 2?'上课人员':(type == 3?'签到人员':(type == 4?'照片':'')));
+          this.$set(this,'infoType',type);
+          if(type == 2 || type == 3){
+            this.resetForm();
+          }else if(type == 4){
+            this.$set(this,'lookUrl',item);
+            this.$set(this,'lookIndex',index);
+          }
+        }
+      },
+      //查看图片切换
+      lockImgButton(item,index){
+        if(index != this.lookIndex){
+          this.$set(this,'lookUrl',item);
+          this.$set(this,'lookIndex',index);
+        }
+      },
+      //页面取消按钮
+      dialogClose(){
+        if(this.infoType == 1){
+          this.$parent.controlsButton(7)
+        }else{
+          this.$set(this,'dialogTitle','详情')
+          this.$set(this,'infoType',1);
+        }
+      },
+      //人员列表查询
+      onSearch(){
+        this.$set(this.userQueryParams,'pageNum',1);
+        this.getList();
+      },
+      //人员列表重置
+      resetForm(){
+        let obj = {
+          pageNum:1,
+          pageSize:20,
+          nickName:"",
+          isSing:'',
+          singType:'',
+        }
+        this.$set(this,'userQueryParams',obj);
+        this.getList();
+      },
+      //获取人员列表
+      getList(){
+        let obj = {
+          courseId:this.infoDialogData.id,
+          pageNum:this.userQueryParams.pageNum,
+          pageSize:this.userQueryParams.pageSize,
+          nickName:this.userQueryParams.nickName,
+          isSing:this.userQueryParams.isSing,
+        }
+        if(this.infoType == 3){
+          obj.singType = this.userQueryParams.singType;
+        }
+        singList(obj).then( response => {
+          this.$set(this,'tableData',response.rows);
+          this.$set(this,'total',response.total);
+        });
+      },
+    },
+  }
+</script>
+
+<style scoped lang="scss">
+  .trainingCourseInfoDialog{
+    .info-max-big-box{
+      height: 600px;
+      .info-big-box:nth-child(1){
+        margin-top:0;
+      }
+      .info-big-box{
+        display: flex;
+        margin:26px 79px 0;
+        div{
+          display: flex;
+          p{
+            font-size:16px;
+            line-height:20px;
+            color:#333;
+          }
+          p:nth-child(1){
+            width:90px;
+          }
+          p:nth-child(2){
+            flex:1;
+          }
+        }
+        div:nth-child(1){
+          width:486px;
+          margin-right:79px;
+        }
+        div:nth-child(2){
+          width:438px;
+        }
+      }
+      .info-big-box-one{
+        display: flex;
+        margin:26px 79px 20px;
+        p{
+          font-size:16px;
+          line-height:20px;
+          color:#333;
+        }
+        p:nth-child(1){
+          width:90px;
+        }
+        p:nth-child(2){
+          flex:1;
+        }
+      }
+      .info-big-box-title{
+        padding:0 30px;
+        font-size:18px;
+        color:#333;
+        line-height: 40px;
+        background: #F5F5F5;
+      }
+      .info-big-box-user{
+        display: flex;
+        margin:26px 79px 0;
+        p{
+          font-size:16px;
+          line-height:20px;
+        }
+        p:nth-child(1){
+          width:90px;
+        }
+        p:nth-child(2){
+          color:#0183fa;
+          cursor: pointer;
+        }
+      }
+      .info-big-box-img{
+        display: flex;
+        margin:26px 79px 0;
+        p{
+          font-size:16px;
+          line-height:20px;
+          width:90px;
+        }
+        div{
+          img{
+            width:160px;
+            height:90px;
+            margin-right:10px;
+            border-radius:4px;
+            cursor: pointer;
+          }
+        }
+      }
+      .cursor-p{
+        cursor: pointer;
+      }
+      .color-p{
+        color:#0183fa!important;
+      }
+    }
+    .user-max-big-box{
+      height: 600px;
+      display: flex;
+      flex-direction: column;
+      padding:0 30px;
+      .sign-in-num{
+        background: rgba(1,131,250,0.2);
+        color:#0183FA;
+        line-height:40px;
+        margin-bottom:20px;
+        padding:0 14px;
+      }
+    }
+    .img-max-big-box{
+      height: 470px;
+      .look-img-box{
+        height:470px;
+        overflow-x: hidden;
+        img{
+          width: 836px;
+          margin:0 137px;
+        }
+      }
+    }
+    .position-off-button{
+      position: absolute;
+      right:20px;
+      top:20px;
+      cursor: pointer;
+      font-size:20px;
+    }
+
+    .img-button-box{
+      display: flex;
+      .img-null-p{
+        flex:1;
+      }
+      .img-button-min-box{
+        display: flex;
+        img{
+          border:4px solid #fff;
+          width:160px;
+          height:90px;
+          margin-right:10px;
+          border-radius:4px;
+          cursor: pointer;
+        }
+        .lookImg{
+          border:4px solid #0183fa!important;
+        }
+      }
+    }
+  }
+</style>