|
@@ -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>
|