dedsudiyu месяцев назад: 10
Родитель
Сommit
0af9525789

+ 33 - 0
src/api/integratedManagement/index.js

@@ -739,3 +739,36 @@ export function listStandard(query) {
     params: query
   })
 }
+
+//进出记录-列表
+export function laboratorySubPassOutList(data) {
+  return request({
+    url: '/laboratory/subPassOut/list',
+    method: 'post',
+    data: data
+  })
+}
+//进出记录-个人列表
+export function laboratorySubPassOutMyList(data) {
+  return request({
+    url: '/laboratory/subPassOut/myList',
+    method: 'post',
+    data: data
+  })
+}
+//进出记录-照片列表
+export function laboratorySubPassOutPhotoList(data) {
+  return request({
+    url: '/laboratory/subPassOut/photoList',
+    method: 'post',
+    data: data
+  })
+}
+//进出记录-有记录的实验室列表
+export function laboratorySubPassOutCheckedSubList(data) {
+  return request({
+    url: '/laboratory/subPassOut/checkedSubList',
+    method: 'post',
+    data: data
+  })
+}

+ 86 - 149
src/views/integratedManagement/laboratoryManagement/record/index.vue

@@ -4,10 +4,10 @@
     <div class="record-page" v-if="pageType == 1">
       <div class="page-form-title-box">
         <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-          <el-form-item label="" prop="nickName">
+          <el-form-item label="" prop="searchValue">
             <el-input
               style="width:200px;"
-              v-model="queryParams.nickName"
+              v-model="queryParams.searchValue"
               placeholder="请输入姓名"
               clearable
               size="small"
@@ -23,8 +23,8 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="subjectId">
-            <el-select v-model="queryParams.subjectId" placeholder="请选择学院再选择实验室" style="width:220px;">
+          <el-form-item label="" prop="subId">
+            <el-select v-model="queryParams.subId" placeholder="请选择学院再选择实验室" style="width:220px;">
               <el-option
                 v-for="item in subjectOptions"
                 :key="item.subId"
@@ -33,7 +33,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="subjectId">
+          <el-form-item label="">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -48,7 +48,7 @@
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
           <el-form-item>
-            <el-dropdown @command="exportButton" v-hasPermiRouter="['chemical:hxpapply:export']">
+            <el-dropdown @command="exportButton" v-hasPermiRouter="['laboratory:passout:export']">
               <div class="form-dropdown-box">
                 <img src="@/assets/ZDimages/basicsModules/icon_jzgxx_sc.png">
                 <p>导出</p>
@@ -71,19 +71,20 @@
         </el-form>
       </div>
       <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
+        <el-table class="table-box" v-loading="loading" border :data="recordList"
+                  @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
           <el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
-          <el-table-column label="姓名" align="left" prop="nickName" show-overflow-tooltip width="170"/>
+          <el-table-column label="姓名" align="left" prop="userName" show-overflow-tooltip width="170"/>
           <el-table-column label="学院" align="left" prop="deptName" show-overflow-tooltip width="250"/>
-          <el-table-column label="实验室" align="left" prop="subjectName" show-overflow-tooltip/>
+          <el-table-column label="实验室" align="left" prop="subName" show-overflow-tooltip/>
           <el-table-column label="进入时间" align="left" prop="inTime" show-overflow-tooltip width="220"/>
           <el-table-column label="离开时间" align="left" prop="outTime" show-overflow-tooltip width="220"/>
-          <el-table-column label="停留时间" align="left" prop="intervalTime" show-overflow-tooltip width="220"/>
+          <el-table-column label="停留时间" align="left" prop="hoursMinutes" show-overflow-tooltip width="220"/>
           <el-table-column label="操作" align="left" width="210">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
-                <p class="table-button-p" v-if="scope.row.outTime" @click="lookInfo(scope.row)">详情</p>
+                <p class="table-button-p" v-if="scope.row.accessStatus == 2" @click="lookInfo(scope.row)">详情</p>
                 <p class="table-button-null"></p>
               </div>
             </template>
@@ -100,15 +101,21 @@
       </div>
     </div>
     <my-record v-if="pageType == 2"></my-record>
-
-    <el-dialog class="record-el-dialog-max-box" :title="infoList[infoIndex].imgName" :visible.sync="infoShadeType" v-if="infoShadeType" width="1070px" height="700" append-to-body
-               :close-on-click-modal="false">
-      <div class="record-el-dialog-min-box scrollbar-box">
-        <img style="width:1026px;" :src="infoList[infoIndex].imgUrl">
+    <el-dialog class="record-el-dialog-max-box" title="详情" width="770px" append-to-body
+               :visible.sync="infoShadeType" v-if="infoShadeType"
+                @close="dialogOff()" :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="record-el-dialog-big-box scrollbar-box">
+        <div class="record-el-dialog-for-box" v-for="(item,index) in infoList" :key="index">
+          <img v-if="item.subUrl" :src="item.subUrl">
+          <p :class="item.subUrl?'borderA':'borderB'">{{item.checkOutName}}</p>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer dialog-footer-box">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-info" @click="dialogOff">取消</p>
+        <p class="dialog-footer-button-primary" @click="dialogOff()">确定</p>
+        <p class="dialog-footer-button-null"></p>
       </div>
-      <p class="el-icon-arrow-left left-i-button" @click="infoLeftButton"></p>
-      <p class="el-icon-arrow-right right-i-button" @click="infoRightButton"></p>
-      <p class="record-el-dialog-bottom-text">{{infoIndex+1}}/{{infoList.length}}</p>
     </el-dialog>
   </div>
 </template>
@@ -123,6 +130,7 @@ import myRecord from "./myRecord.vue";
 //                                    V3
 import { getDeptDropList } from '@/api/commonality/permission'
 import { laboratorySubRelInfoGetRelList } from '@/api/commonality/noPermission'
+import { laboratorySubPassOutList,laboratorySubPassOutPhotoList } from '@/api/integratedManagement/index'
 
 
 export default {
@@ -145,37 +153,22 @@ export default {
       multiple: true,
       // 显示搜索条件
       showSearch: true,
-      // 总条数
-      total: 0,
-      // 实验室进出记录表格数据
-      recordList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
       // 部门树选项
       deptOptions: [],
-      //  进入或离开时间
-      inOutTypeOptions: [{
-        value: '1',
-        label: '进入时间'
-      }, {
-        value: '2',
-        label: '离开时间'
-      }],
+      // 实验室进出记录表格数据
+      recordList: [],
+      // 总条数
+      total: 0,
       // 查询参数
       queryParams: {
         page: 1,
         pageSize:20,
-        nickName: null,
-        subjectId: null,
+        searchValue: null,
+        subId: null,
         deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        userId: null,
-        inOutType: ''
       },
+      //进入时间
+      dateRange:[],
       // 表单参数
       form: {},
       // 表单校验
@@ -185,41 +178,27 @@ export default {
       subjectOptions: [],
       //表格扩展选择器---需要在@selection-change绑定的方法内监控selection数组长度
       selectedNum:0,
-      //进入时间
-      dateRange:[],
       //详情遮罩开关
       infoShadeType:false,
-      infoIndex:0,
       infoList:[],
     };
   },
   created() {
-    // this.getList();
+    this.getList();
     this.getDeptDropList();
   },
   methods: {
+    //关闭弹层
+    dialogOff() {
+      this.$set(this, 'infoShadeType', false)
+    },
     //查看详情
     lookInfo(row){
-      getDetial(row.id).then(response => {
-        this.$set(this,'infoIndex',0);
-        this.$set(this,'infoList',response.rows);
+      laboratorySubPassOutPhotoList({passOutId:row.passOutId}).then(response => {
+        this.$set(this,'infoList',response.data);
         this.$set(this,'infoShadeType',true);
       });
     },
-    infoLeftButton(){
-      if (this.infoIndex == 0){
-        this.msgError('当前是第一张')
-      }else{
-        this.infoIndex--
-      }
-    },
-    infoRightButton(){
-      if (this.infoIndex == this.infoList.length-1){
-        this.msgError('当前是最后一张')
-      }else{
-        this.infoIndex++
-      }
-    },
     clickPage(type){
       if(this.pageType != type){
         this.pageType = type;
@@ -240,8 +219,8 @@ export default {
         return
       }
       let obj = JSON.parse(JSON.stringify(this.queryParams));
-      obj.accessIds = this.ids;
-      this.download('laboratory/record/export', {
+      obj.ids = this.ids;
+      this.download('laboratory/subPassOut/export', {
         ...obj
       }, `进出记录.xlsx`)
       this.$refs.multipleTable.clearSelection();
@@ -249,8 +228,7 @@ export default {
     /* 全部导出按钮操作 */
     handleExport() {
       let obj = JSON.parse(JSON.stringify(this.queryParams));
-      obj.accessIds = '';
-      this.download('laboratory/record/export', {
+      this.download('laboratory/subPassOut/export', {
         ...obj
       }, `进出记录.xlsx`)
       this.$refs.multipleTable.clearSelection();
@@ -260,24 +238,21 @@ export default {
       需要在selection 添加 :reserve-selection="true"
     */
     getRowKeys(row) {
-      return row.id
+      return row.passOutId
     },
     //=========表格扩展选择器方法---结束=========
-    /** 查询实验室进出记录列表 */
     getList() {
       this.loading = true;
-      if(this.dateRange&&this.dateRange.length>0) {
-        this.queryParams.inTime = this.dateRange[0];
-        this.queryParams.outTime = this.dateRange[1];
-        this.queryParams.inOutType = 1
+      if(this.dateRange[0]) {
+        this.queryParams.startTime = this.dateRange[0]+ 'T00:00:00';
+        this.queryParams.endTime = this.dateRange[1]+ 'T23:59:59';
       } else {
-        this.queryParams.inTime = null;
-        this.queryParams.outTime = null;
-        this.queryParams.inOutType = null
+        this.queryParams.startTime = null;
+        this.queryParams.endTime = null;
       }
-      examPointsRecordList(this.queryParams).then(response => {
-        this.recordList = response.rows;
-        this.total = response.total;
+      laboratorySubPassOutList(this.queryParams).then(response => {
+        this.recordList = response.data.records;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -297,33 +272,8 @@ export default {
     // 学院选择事件
     handleNodeClick(data) {
       this.$set(this.queryParams,'deptId',data);
-      this.$set(this.queryParams,'subjectId','');
+      this.$set(this.queryParams,'subId','');
       this.laboratorySubRelInfoGetRelList(data);
-      // this.getList();
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        joinUserId: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null,
-        remark: null,
-      };
-      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -337,12 +287,9 @@ export default {
       this.$set(this,'queryParams',{
         page: 1,
         pageSize:20,
-        nickName:"",
+        searchValue:"",
         deptId:"",
-        subjectId: '',
-        inOutType: '',
-        inTime: '',
-        outTime: '',
+        subId: '',
       });
       this.dateRange = [];
       this.handleQuery();
@@ -350,7 +297,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.selectedNum = selection.length;
-      this.ids = selection.map(item => item.id)
+      this.ids = selection.map(item => item.passOutId)
       this.single = selection.length!==1
       this.multiple = !selection.length
     },
@@ -461,44 +408,34 @@ export default {
 </style>
 <style lang="scss">
   .record-el-dialog-max-box{
-    .left-i-button{
-      cursor: pointer;
-      text-align: center;
-      line-height:28px;
-      color:#fff;
-      font-size:16px;
-      top:350px;
-      left:40px;
-      position: absolute;
-      width:30px;
-      height:30px;
-      border:1px solid #fff;
-      border-radius:50%;
-    }
-    .right-i-button{
-      cursor: pointer;
-      text-align: center;
-      line-height:28px;
-      color:#fff;
-      font-size:16px;
-      position: absolute;
-      top:350px;
-      right:40px;
-      width:30px;
-      height:30px;
-      border:1px solid #fff;
-      border-radius:50%;
-    }
-    .record-el-dialog-bottom-text{
-      text-align: center;
-      line-height: 30px;
-      font-size:16px;
+    .record-el-dialog-big-box{
+      height:500px;
+      .record-el-dialog-for-box{
+        padding-bottom:20px;
+        overflow: hidden;
+        img{
+          display: block;
+          width:730px;
+          height:400px;
+          border-top-left-radius:6px;
+          border-top-right-radius:6px;
+          overflow: hidden;
+        }
+        p{
+          font-size:16px;
+          padding:0 20px;
+          line-height:40px;
+          overflow: hidden;
+          background-color: #E0E0E0;
+        }
+        .borderA{
+          border-bottom-left-radius:6px;
+          border-bottom-right-radius:6px;
+        }
+        .borderB{
+          border-radius:6px;
+        }
+      }
     }
   }
-  .record-el-dialog-min-box{
-    height:560px;
-  }
-  .el-dialog__body{
-    padding-bottom:0;
-  }
 </style>

+ 89 - 235
src/views/integratedManagement/laboratoryManagement/record/myRecord.vue

@@ -8,18 +8,8 @@
     <div class="record-my-page">
       <div class="page-form-title-box">
         <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="请选择学院" @change="handleNodeClick" style="width:180px;">
-              <el-option
-                v-for="dict in deptOptions"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="subjectId">
-            <el-select v-model="queryParams.subjectId" placeholder="请选择实验室" style="width:180px;">
+          <el-form-item label="" prop="subId">
+            <el-select v-model="queryParams.subId" placeholder="选择实验室" style="width:220px;">
               <el-option
                 v-for="item in subjectOptions"
                 :key="item.subId"
@@ -28,7 +18,7 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="subjectId">
+          <el-form-item label="">
             <el-date-picker
               :clearable="false"
               v-model="dateRange"
@@ -47,16 +37,21 @@
         </el-form>
       </div>
       <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
-          <el-table-column label="实验室" align="left" prop="subjectName" />
-          <el-table-column label="学院" align="left" prop="deptName" />
-          <el-table-column label="进入时间" align="left" prop="inTime">
-
+        <el-table class="table-box" v-loading="loading" border :data="recordList" ref="multipleTable">
+          <el-table-column label="实验室" align="left" prop="subName" show-overflow-tooltip/>
+          <el-table-column label="学院" align="left" prop="deptName" show-overflow-tooltip width="300"/>
+          <el-table-column label="进入时间" align="left" prop="inTime" show-overflow-tooltip width="210"/>
+          <el-table-column label="离开时间" align="left" prop="outTime" show-overflow-tooltip width="210"/>
+          <el-table-column label="停留时间" align="left" prop="hoursMinutes" show-overflow-tooltip width="210"/>
+          <el-table-column label="操作" align="left" width="160">
+            <template slot-scope="scope">
+              <div class="table-button-box">
+                <p class="table-button-null"></p>
+                <p class="table-button-p" v-if="scope.row.accessStatus == 2" @click="lookInfo(scope.row)">详情</p>
+                <p class="table-button-null"></p>
+              </div>
+            </template>
           </el-table-column>
-          <el-table-column label="离开时间" align="left" prop="outTime">
-
-          </el-table-column>
-          <el-table-column label="停留时间" align="left" prop="intervalTime" />
         </el-table>
         <pagination
           v-show="total>0"
@@ -68,50 +63,19 @@
         />
       </div>
     </div>
-
-    <!-- 添加或修改实验室进出记录对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body
-               :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="出进人员id" prop="joinUserId">
-          <el-input v-model="form.joinUserId" placeholder="请输入出进人员id" />
-        </el-form-item>
-        <el-form-item label="实验室id" prop="subjectId">
-          <el-input v-model="form.subjectId" placeholder="请输入实验室id" />
-        </el-form-item>
-        <el-form-item label="部门id" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门id" />
-        </el-form-item>
-        <el-form-item label="部门名称" prop="deptName">
-          <el-input v-model="form.deptName" placeholder="请输入部门名称" />
-        </el-form-item>
-        <el-form-item label="进入时间" prop="inTime">
-          <el-date-picker clearable size="small"
-            v-model="form.inTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择进入时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="离开时间" prop="outTime">
-          <el-date-picker clearable size="small"
-            v-model="form.outTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择离开时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="创建人" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" />
-        </el-form-item>
-      </el-form>
+    <el-dialog class="record-el-dialog-max-box" title="详情" width="770px" append-to-body
+               :visible.sync="infoShadeType" v-if="infoShadeType"
+               @close="dialogOff()" :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="record-el-dialog-big-box scrollbar-box">
+        <div class="record-el-dialog-for-box" v-for="(item,index) in infoList" :key="index">
+          <img v-if="item.subUrl" :src="item.subUrl">
+          <p :class="item.subUrl?'borderA':'borderB'">{{item.checkOutName}}</p>
+        </div>
+      </div>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
-        <p class="dialog-footer-button-info" @click="cancel">取消</p>
-        <p class="dialog-footer-button-primary" @click="submitForm">提交</p>
+        <p class="dialog-footer-button-info" @click="dialogOff">取消</p>
+        <p class="dialog-footer-button-primary" @click="dialogOff()">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </el-dialog>
@@ -126,8 +90,7 @@ import { treeselect } from "@/apiDemo/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 //                                    V3
-import { getDeptDropList } from '@/api/commonality/permission'
-import { laboratorySubRelInfoGetRelList } from '@/api/commonality/noPermission'
+import { laboratorySubPassOutMyList,laboratorySubPassOutPhotoList,laboratorySubPassOutCheckedSubList } from '@/api/integratedManagement/index'
 
 export default {
   name: "Record",
@@ -148,135 +111,62 @@ export default {
       total: 0,
       // 实验室进出记录表格数据
       recordList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 部门树选项
-      deptOptions: undefined,
+      subjectOptions:[],
       // 查询参数
       queryParams: {
         page: 1,
         pageSize:20,
-        joinUserId: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        userId: null,
-        inOutType: ''
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
+        subId: null,
       },
-      //实验室列表
-      subjectOptions: [],
-      //  进入或离开时间
-      inOutTypeOptions: [{
-        value: '1',
-        label: '进入时间'
-      }, {
-        value: '2',
-        label: '离开时间'
-      }],
       //表格扩展选择器---需要在@selection-change绑定的方法内监控selection数组长度
       selectedNum:0,
       dateRange:[],
+      //详情遮罩开关
+      infoShadeType:false,
+      infoList:[],
     };
   },
   created() {
     this.getList();
-    this.getDeptDropList();
+    this.laboratorySubPassOutCheckedSubList();
   },
   methods: {
+    //关闭弹层
+    dialogOff() {
+      this.$set(this, 'infoShadeType', false)
+    },
     backPage(){
       this.$parent.clickPage(1);
     },
-    //=========表格扩展选择器方法---开始=========
-    //选择本页
-    selectPage(){
-      this.$refs.multipleTable.toggleAllSelection()
-    },
-    //清除选择
-    clearSelection(){
-      this.$refs.multipleTable.clearSelection()
-    },
-    /*===记录勾选数据===
-      需要再el-table 添加  :row-key="getRowKeys"
-      需要在selection 添加 :reserve-selection="true"
-    */
-    getRowKeys(row) {
-      return row.id
+    //查看详情
+    lookInfo(row){
+      laboratorySubPassOutPhotoList({passOutId:row.passOutId}).then(response => {
+        this.$set(this,'infoList',response.data);
+        this.$set(this,'infoShadeType',true);
+      });
     },
     //=========表格扩展选择器方法---结束=========
-    /** 查询实验室进出记录列表 */
     getList() {
       this.loading = true;
       if(this.dateRange&&this.dateRange.length>0) {
-        this.queryParams.inTime = this.dateRange[0];
-        this.queryParams.outTime = this.dateRange[1];
-        this.queryParams.inOutType = 1
+        this.queryParams.startTime = this.dateRange[0]+ 'T00:00:00';
+        this.queryParams.endTime = this.dateRange[1]+ 'T23:59:59';
       } else {
-        this.queryParams.inTime = null;
-        this.queryParams.outTime = null;
-        this.queryParams.inOutType = null
+        this.queryParams.startTime = null;
+        this.queryParams.endTime = null;
       }
-      myListRecord(this.queryParams).then(response => {
-        this.recordList = response.rows;
-        this.total = response.total;
+      laboratorySubPassOutMyList(this.queryParams).then(response => {
+        this.recordList = response.data.records;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 筛选节点
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.label.indexOf(value) !== -1;
-    },
-    /** 查询学院列表 */
-    getDeptDropList() {
-      getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
-        this.$set(this, 'deptOptions', response.data)
-      });
-    },
-    //根据楼栋id查询实验室列表
-    laboratorySubRelInfoGetRelList(data,type){
-      laboratorySubRelInfoGetRelList({deptId:data}).then(response => {
+    //查询有进出记录的实验室
+    laboratorySubPassOutCheckedSubList(){
+      laboratorySubPassOutCheckedSubList({}).then(response => {
         this.subjectOptions = response.data;
       });
     },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.$set(this.queryParams,'deptId',data);
-      this.$set(this.queryParams,'subjectId','');
-      this.laboratorySubRelInfoGetRelList(data);
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        joinUserId: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.page = 1;
@@ -284,83 +174,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      // this.queryParams = {};
-      // this.resetForm("queryForm");
       this.dateRange = [];
       this.$set(this,'queryParams',{
         page: 1,
         pageSize:20,
-        deptId:"",
-        subjectId: '',
-        inOutType: '',
-        inTime: '',
-        outTime: '',
+        subId: null,
       });
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.selectedNum = selection.length;
-      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
-      getRecord(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改实验室进出记录";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateRecord(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addRecord(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('确认删除实验室进出记录吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delRecord(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/record/export', {
-        ...this.queryParams
-      }, `laboratory_record.xlsx`)
-    }
   }
 };
 </script>
@@ -454,3 +275,36 @@ export default {
     }
   }
 </style>
+<style lang="scss">
+  .record-el-dialog-max-box{
+    .record-el-dialog-big-box{
+      height:500px;
+      .record-el-dialog-for-box{
+        padding-bottom:20px;
+        overflow: hidden;
+        img{
+          display: block;
+          width:730px;
+          height:400px;
+          border-top-left-radius:6px;
+          border-top-right-radius:6px;
+          overflow: hidden;
+        }
+        p{
+          font-size:16px;
+          padding:0 20px;
+          line-height:40px;
+          overflow: hidden;
+          background-color: #E0E0E0;
+        }
+        .borderA{
+          border-bottom-left-radius:6px;
+          border-bottom-right-radius:6px;
+        }
+        .borderB{
+          border-radius:6px;
+        }
+      }
+    }
+  }
+</style>

+ 68 - 290
src/views/integratedManagement/laboratoryManagement/record_my/index.vue

@@ -2,18 +2,8 @@
 <template>
   <div class="app-container record-my">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="" prop="deptId" >
-        <el-select v-model="queryParams.deptId" placeholder="请选择学院" @change="handleNodeClick" style="width:200px;">
-          <el-option
-            v-for="dict in deptOptions"
-            :key="dict.deptId"
-            :label="dict.deptName"
-            :value="dict.deptId"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="" prop="subjectId">
-        <el-select v-model="queryParams.subjectId" placeholder="请选择学院再选择实验室" style="width:220px;">
+      <el-form-item label="" prop="subId">
+        <el-select v-model="queryParams.subId" placeholder="选择实验室" style="width:220px;">
           <el-option
             v-for="item in subjectOptions"
             :key="item.subId"
@@ -22,7 +12,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="" prop="subjectId" >
+      <el-form-item label="">
         <el-date-picker
           :clearable="false"
           v-model="dateRange"
@@ -37,17 +27,17 @@
       <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
       <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
     </el-form>
-    <el-table class="table-box" v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
-      <el-table-column label="实验室" align="left" prop="subjectName" show-overflow-tooltip/>
+    <el-table class="table-box" v-loading="loading" border :data="recordList" ref="multipleTable">
+      <el-table-column label="实验室" align="left" prop="subName" show-overflow-tooltip/>
       <el-table-column label="学院" align="left" prop="deptName" show-overflow-tooltip width="300"/>
       <el-table-column label="进入时间" align="left" prop="inTime" show-overflow-tooltip width="210"/>
       <el-table-column label="离开时间" align="left" prop="outTime" show-overflow-tooltip width="210"/>
-      <el-table-column label="停留时间" align="left" prop="intervalTime" show-overflow-tooltip width="210"/>
+      <el-table-column label="停留时间" align="left" prop="hoursMinutes" show-overflow-tooltip width="210"/>
       <el-table-column label="操作" align="left" width="160">
         <template slot-scope="scope">
           <div class="table-button-box">
             <p class="table-button-null"></p>
-            <p class="table-button-p" v-if="scope.row.outTime" @click="lookInfo(scope.row)">详情</p>
+            <p class="table-button-p" v-if="scope.row.accessStatus == 2" @click="lookInfo(scope.row)">详情</p>
             <p class="table-button-null"></p>
           </div>
         </template>
@@ -62,60 +52,22 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
-    <!-- 添加或修改实验室进出记录对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="出进人员id" prop="joinUserId">
-          <el-input v-model="form.joinUserId" placeholder="请输入出进人员id" />
-        </el-form-item>
-        <el-form-item label="实验室id" prop="subjectId">
-          <el-input v-model="form.subjectId" placeholder="请输入实验室id" />
-        </el-form-item>
-        <el-form-item label="部门id" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门id" />
-        </el-form-item>
-        <el-form-item label="部门名称" prop="deptName">
-          <el-input v-model="form.deptName" placeholder="请输入部门名称" />
-        </el-form-item>
-        <el-form-item label="进入时间" prop="inTime">
-          <el-date-picker clearable size="small"
-            v-model="form.inTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择进入时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="离开时间" prop="outTime">
-          <el-date-picker clearable size="small"
-            v-model="form.outTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择离开时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="创建人" prop="userId">
-          <el-input v-model="form.userId" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" placeholder="请输入备注" />
-        </el-form-item>
-      </el-form>
+    <el-dialog class="record-el-dialog-max-box" title="详情" width="770px" append-to-body
+               :visible.sync="infoShadeType" v-if="infoShadeType"
+               @close="dialogOff()" :close-on-click-modal="false" :close-on-press-escape="false">
+      <div class="record-el-dialog-big-box scrollbar-box">
+        <div class="record-el-dialog-for-box" v-for="(item,index) in infoList" :key="index">
+          <img v-if="item.subUrl" :src="item.subUrl">
+          <p :class="item.subUrl?'borderA':'borderB'">{{item.checkOutName}}</p>
+        </div>
+      </div>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
-        <p class="dialog-footer-button-info" @click="cancel">取消</p>
-        <p class="dialog-footer-button-primary" @click="submitForm">提交</p>
+        <p class="dialog-footer-button-info" @click="dialogOff">取消</p>
+        <p class="dialog-footer-button-primary" @click="dialogOff()">确定</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </el-dialog>
-    <el-dialog class="record-my-el-dialog-max-box" :title="infoList[infoIndex].imgName" :visible.sync="infoShadeType" v-if="infoShadeType" width="1070px" height="700" append-to-body>
-      <div class="record-el-dialog-min-box scrollbar-box">
-        <img style="width:1026px;" :src="infoList[infoIndex].imgUrl">
-      </div>
-      <p class="el-icon-arrow-left left-i-button" @click="infoLeftButton"></p>
-      <p class="el-icon-arrow-right right-i-button" @click="infoRightButton"></p>
-      <p class="record-el-dialog-bottom-text">{{infoIndex+1}}/{{infoList.length}}</p>
-    </el-dialog>
   </div>
 </template>
 
@@ -127,8 +79,7 @@ import { treeselect } from "@/apiDemo/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 //                                    V3
-import { getDeptDropList } from '@/api/commonality/permission'
-import { laboratorySubRelInfoGetRelList } from '@/api/commonality/noPermission'
+import { laboratorySubPassOutMyList,laboratorySubPassOutPhotoList,laboratorySubPassOutCheckedSubList } from '@/api/integratedManagement/index'
 
 export default {
   name: "Record",
@@ -149,6 +100,7 @@ export default {
       total: 0,
       // 实验室进出记录表格数据
       recordList: [],
+      subjectOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -159,149 +111,54 @@ export default {
       queryParams: {
         page: 1,
         pageSize:20,
-        joinUserId: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        userId: null,
-        inOutType: ''
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
+        subId: null,
       },
-      //实验室列表
-      subjectOptions: [],
-      //  进入或离开时间
-      inOutTypeOptions: [{
-        value: '1',
-        label: '进入时间'
-      }, {
-        value: '2',
-        label: '离开时间'
-      }],
       //表格扩展选择器---需要在@selection-change绑定的方法内监控selection数组长度
       selectedNum:0,
       dateRange:[],
       //详情遮罩开关
       infoShadeType:false,
-      infoIndex:0,
       infoList:[],
     };
   },
   created() {
     this.getList();
-    this.getDeptDropList();
+    this.laboratorySubPassOutCheckedSubList();
   },
   methods: {
+    //关闭弹层
+    dialogOff() {
+      this.$set(this, 'infoShadeType', false)
+    },
     //查看详情
     lookInfo(row){
-      getDetial(row.id).then(response => {
-        this.$set(this,'infoIndex',0);
-        this.$set(this,'infoList',response.rows);
+      laboratorySubPassOutPhotoList({passOutId:row.passOutId}).then(response => {
+        this.$set(this,'infoList',response.data);
         this.$set(this,'infoShadeType',true);
       });
     },
-    infoLeftButton(){
-      if (this.infoIndex == 0){
-        this.msgError('当前是第一张')
-      }else{
-        this.infoIndex--
-      }
-    },
-    infoRightButton(){
-      if (this.infoIndex == this.infoList.length-1){
-        this.msgError('当前是最后一张')
-      }else{
-        this.infoIndex++
-      }
-    },
-    //=========表格扩展选择器方法---开始=========
-    //选择本页
-    selectPage(){
-      this.$refs.multipleTable.toggleAllSelection()
-    },
-    //清除选择
-    clearSelection(){
-      this.$refs.multipleTable.clearSelection()
-    },
-    /*===记录勾选数据===
-      需要再el-table 添加  :row-key="getRowKeys"
-      需要在selection 添加 :reserve-selection="true"
-    */
-    getRowKeys(row) {
-      return row.id
-    },
     //=========表格扩展选择器方法---结束=========
-    /** 查询实验室进出记录列表 */
     getList() {
       this.loading = true;
       if(this.dateRange&&this.dateRange.length>0) {
-        this.queryParams.inTime = this.dateRange[0];
-        this.queryParams.outTime = this.dateRange[1];
-        this.queryParams.inOutType = 1
+        this.queryParams.startTime = this.dateRange[0]+ 'T00:00:00';
+        this.queryParams.endTime = this.dateRange[1]+ 'T23:59:59';
       } else {
-        this.queryParams.inTime = null;
-        this.queryParams.outTime = null;
-        this.queryParams.inOutType = null
+        this.queryParams.startTime = null;
+        this.queryParams.endTime = null;
       }
-      myListRecord(this.queryParams).then(response => {
-        this.recordList = response.rows;
-        this.total = response.total;
+      laboratorySubPassOutMyList(this.queryParams).then(response => {
+        this.recordList = response.data.records;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 筛选节点
-    filterNode(value, data) {
-      if (!value) return true;
-      return data.label.indexOf(value) !== -1;
-    },
-    /** 查询学院列表 */
-    getDeptDropList() {
-      getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
-        this.$set(this, 'deptOptions', response.data)
-      });
-    },
-    //根据楼栋id查询实验室列表
-    laboratorySubRelInfoGetRelList(data,type){
-      laboratorySubRelInfoGetRelList({deptId:data}).then(response => {
+    //查询有进出记录的实验室
+    laboratorySubPassOutCheckedSubList(){
+      laboratorySubPassOutCheckedSubList({}).then(response => {
         this.subjectOptions = response.data;
       });
     },
-    // 节点单击事件
-    handleNodeClick(data) {
-      this.$set(this.queryParams,'deptId',data);
-      this.$set(this.queryParams,'subjectId','');
-      this.laboratorySubRelInfoGetRelList(data);
-      // this.getList();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        joinUserId: null,
-        subjectId: null,
-        deptId: null,
-        deptName: null,
-        inTime: null,
-        outTime: null,
-        createTime: null,
-        userId: null,
-        createBy: null,
-        updateTime: null,
-        updateBy: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.page = 1;
@@ -309,83 +166,14 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      // this.queryParams = {};
-      // this.resetForm("queryForm");
       this.dateRange = [];
       this.$set(this,'queryParams',{
         page: 1,
         pageSize:20,
-        deptId:"",
-        subjectId: '',
-        inOutType: '',
-        inTime: '',
-        outTime: '',
+        subId: null,
       });
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.selectedNum = selection.length;
-      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
-      getRecord(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改实验室进出记录";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateRecord(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addRecord(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('确认删除实验室进出记录吗?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delRecord(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('laboratory/record/export', {
-        ...this.queryParams
-      }, `laboratory_record.xlsx`)
-    }
   }
 };
 </script>
@@ -460,45 +248,35 @@ export default {
 </style>
 
 <style lang="scss">
-  .record-my-el-dialog-max-box{
-    .left-i-button{
-      cursor: pointer;
-      text-align: center;
-      line-height:28px;
-      color:#fff;
-      font-size:16px;
-      top:350px;
-      left:40px;
-      position: absolute;
-      width:30px;
-      height:30px;
-      border:1px solid #fff;
-      border-radius:50%;
-    }
-    .right-i-button{
-      cursor: pointer;
-      text-align: center;
-      line-height:28px;
-      color:#fff;
-      font-size:16px;
-      position: absolute;
-      top:350px;
-      right:40px;
-      width:30px;
-      height:30px;
-      border:1px solid #fff;
-      border-radius:50%;
-    }
-    .record-el-dialog-bottom-text{
-      text-align: center;
-      line-height: 30px;
-      font-size:16px;
+  .record-el-dialog-max-box{
+    .record-el-dialog-big-box{
+      height:500px;
+      .record-el-dialog-for-box{
+        padding-bottom:20px;
+        overflow: hidden;
+        img{
+          display: block;
+          width:730px;
+          height:400px;
+          border-top-left-radius:6px;
+          border-top-right-radius:6px;
+          overflow: hidden;
+        }
+        p{
+          font-size:16px;
+          padding:0 20px;
+          line-height:40px;
+          overflow: hidden;
+          background-color: #E0E0E0;
+        }
+        .borderA{
+          border-bottom-left-radius:6px;
+          border-bottom-right-radius:6px;
+        }
+        .borderB{
+          border-radius:6px;
+        }
+      }
     }
   }
-  .record-el-dialog-min-box{
-    height:560px;
-  }
-  .el-dialog__body{
-    padding-bottom:0;
-  }
 </style>

+ 3 - 3
src/views/integratedManagement/laboratoryManagement/subject/associationConfiguration.vue

@@ -13,7 +13,7 @@
         </div>
         <div>
           <el-form-item label="穿戴检查项:"  prop="checkIn" class="form-item" v-if="form.checkIn">
-            <el-select v-model="form.checkIn" multiple placeholder="请选择穿戴检查项目"
+            <el-select v-model="form.checkIn" multiple collapse-tags placeholder="请选择穿戴检查项目"
                        @change="radioChange" style="width:250px;">
               <el-option
                 v-for="dict in onepcOutcheckIn"
@@ -42,7 +42,7 @@
         </div>
         <div>
           <el-form-item label="离开检查项:"  prop="checkOut" class="form-item">
-            <el-select v-model="form.checkOut" multiple placeholder="请选择离开检查项" style="width:250px;">
+            <el-select v-model="form.checkOut" multiple collapse-tags placeholder="请选择离开检查项" style="width:250px;">
               <el-option
                 v-for="dict in onepcOutcheck"
                 :key="dict.value"
@@ -73,7 +73,7 @@
         </div>
         <div>
           <el-form-item label="穿戴检查项:"  prop="inspectCheckIn" class="form-item" v-if="form.inspectCheckIn">
-            <el-select v-model="form.inspectCheckIn" multiple placeholder="请选择穿戴检查项目"
+            <el-select v-model="form.inspectCheckIn" multiple collapse-tags placeholder="请选择穿戴检查项目"
                        @change="radioChange" style="width:250px;">
               <el-option
                 v-for="dict in onepcOutcheckIn"