Commit 89e17f37 by 416409548@qq.com

一卡通-门禁设备可视化/门禁设备配置优化

parent 63688d89
......@@ -4,48 +4,26 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="选择楼栋">
<a-select placeholder="选择楼栋" v-model="queryParam.buildingName" @change="buildingChange">
<a-select-option v-for="buildingInfo in buildingInfos" :key="buildingInfo.name">
{{ buildingInfo.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="选择楼层">
<a-select placeholder="选择楼层" v-model="queryParam.floor">
<a-select-option v-for="floor in targetFloorList" :key="floor">
{{ floor }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-col :md="4" :sm="8">
<a-form-item label="设备类型">
<a-select placeholder="设备类型" v-model="queryParam.type">
<a-select-option v-for="type in types" :key="type">
{{ type }}
</a-select-option>
</a-select>
<j-dict-select-tag v-model="queryParam.type" placeholder="请选择设备类型" dict-code="alarm_query_equipmentType"/>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-col :md="4" :sm="8">
<a-form-item label="设备名称">
<j-input placeholder="请输入设备名称" v-model="queryParam.buildingName"></j-input>
<j-input placeholder="请输入设备名称" v-model="queryParam.name"></j-input>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-col :md="4" :sm="8">
<a-space style="float: left">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button type="default" @click="searchReset">重置</a-button>
</a-space>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-col :md="12" :sm="8">
<a-space style="float: right">
<a-button @click="handleAdd" type="primary">新增</a-button>
<a-button @click="handleExportXls('pm_access_control_device')" type="primary">导出</a-button>
<!-- <a-button @click="handleAdd" type="primary">新增</a-button> -->
<a-button @click="handleExportXls('门禁设备配置导出')" type="primary">导出</a-button>
</a-space>
</a-col>
</a-row>
......@@ -167,6 +145,11 @@ export default {
}
},
{
title: '区域名称',
align: "center",
dataIndex: 'districtName'
},
{
title: '设备编码',
align: "center",
dataIndex: 'code'
......@@ -174,7 +157,7 @@ export default {
{
title: '设备类型',
align: "center",
dataIndex: 'type'
dataIndex: 'type_dictText'
},
{
title: '设备名称',
......@@ -187,16 +170,6 @@ export default {
dataIndex: 'ip'
},
{
title: '楼栋',
align: "center",
dataIndex: 'buildingName'
},
{
title: '楼层',
align: "center",
dataIndex: 'floor'
},
{
title: '设备位置',
align: "center",
dataIndex: 'place'
......@@ -219,6 +192,7 @@ export default {
return t + 's';
},
},
{
title: '创建人',
align: "center",
......@@ -256,10 +230,10 @@ export default {
},
created() {
this.getSuperFieldList();
getAction('/pm/pmBuildingInfo/list')
.then(value => this.buildingInfos = value.result);
getAction('/pm/pmAccessControlDevice/types')
.then(value => this.types = value.result);
// getAction('/pm/pmBuildingInfo/list')
// .then(value => this.buildingInfos = value.result);
// getAction('/pm/pmAccessControlDevice/types')
// .then(value => this.types = value.result);
},
computed: {
importExcelUrl: function () {
......
......@@ -5,30 +5,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="选择楼栋">
<a-select placeholder="选择楼栋" v-model="queryParam.buildingName" @change="buildingChange">
<a-select-option v-for="buildingInfo in buildingInfos" :key="buildingInfo.name">
{{ buildingInfo.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="选择楼层">
<a-select placeholder="选择楼层" v-model="queryParam.floor">
<a-select-option v-for="floor in targetFloorList" :key="floor">
{{ floor }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
<a-form-item label="设备类型">
<a-select placeholder="设备类型" v-model="queryParam.type">
<a-select-option v-for="type in types" :key="type">
{{ type }}
</a-select-option>
</a-select>
<j-dict-select-tag v-model="queryParam.type" placeholder="请选择设备类型" dict-code="alarm_query_equipmentType"/>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="4" :md="5" :sm="24">
......@@ -73,12 +51,12 @@
<div style="position: relative">
<img ref="floorImg" src="@/assets/floor.png" alt="floor" width="100%" height="100%"
@load="floorImgLoadComplete()"/>
<img v-for="(item, index) in list"
ref="icon"
:src="item.status === 'NORMAL'
? statusList[0].imgPath
: (item.status === 'OFFLINE' ? statusList[1].imgPath : statusList[2].imgPath)"
:alt="item.name + ':' + item.ip"/>
<img v-for="item in list"
:key="item.id"
ref="icon"
:src="item.status === 1? statusList[0].imgPath
:(item.status === 2 ? statusList[1].imgPath : statusList[2].imgPath)"
:alt="item.name + ':' + item.ip"/>
</div>
</a-col>
</a-row>
......@@ -112,17 +90,17 @@ export default {
targetFloorList: [],
types: [],
statusList: [
{name: '正常', value: 'NORMAL', imgPath: require('@/assets/door-close.png')},
{name: '离线', value: 'OFFLINE', imgPath: require('@/assets/door-offline.png')},
{name: '损坏', value: 'BREAKDOWN', imgPath: require('@/assets/door-warning.png')}],
{name: '正常', value: 1, imgPath: require('@/assets/door-close.png')},
{name: '离线', value: 2, imgPath: require('@/assets/door-offline.png')},
{name: '损坏', value: 3, imgPath: require('@/assets/door-warning.png')}
],
}
},
created() {
getAction('/pm/pmBuildingInfo/list')
.then(value => this.buildingInfos = value.result);
getAction('/pm/pmAccessControlDevice/types')
.then(value => this.types = value.result);
// getAction('/pm/pmBuildingInfo/list')
// .then(value => this.buildingInfos = value.result);
// getAction('/pm/pmAccessControlDevice/types')
// .then(value => this.types = value.result);
},
computed: {
importExcelUrl: function () {
......@@ -132,14 +110,14 @@ export default {
methods: {
initDictConfig() {
},
buildingChange(value) {
let targetList = this.buildingInfos.filter(buildingInfo => buildingInfo.name === value);
if (targetList != null && targetList.length > 0) {
this.targetFloorList = targetList[0].floorList;
} else {
this.targetFloorList = [];
}
},
// buildingChange(value) {
// let targetList = this.buildingInfos.filter(buildingInfo => buildingInfo.name === value);
// if (targetList != null && targetList.length > 0) {
// this.targetFloorList = targetList[0].floorList;
// } else {
// this.targetFloorList = [];
// }
// },
loadComplete() {
if (this.list.length > 0) {
this.list.forEach((item, index) => {
......
......@@ -4,45 +4,49 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="设备编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<a-input v-model="model.code" placeholder="请输入设备编码"></a-input>
<a-form-model-item label="区域名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="districtName">
<a-input v-model="model.districtName" placeholder="请输入区域名称" disabled></a-input>
</a-form-model-item>
</a-col>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入设备名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备ip" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip">
<a-input v-model="model.ip" placeholder="请输入设备ip"></a-input>
<a-form-model-item label="设备编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<a-input v-model="model.code" placeholder="请输入设备编码"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip">
<a-select placeholder="选择设备类型" v-model="model.type">
<a-select-option v-for="type in types" :key="type">
{{ type }}
<a-select v-model="model.type" placeholder="请选择设备类型">
<a-select-option :value="1">
出入口闸机
</a-select-option>
<a-select-option :value="2">
访客一体机
</a-select-option>
<a-select-option :value="3">
自动访客机
</a-select-option>
<a-select-option :value="4">
身份证读卡器
</a-select-option>
<a-select-option :value="5">
人脸识别
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="楼栋" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="buildingName">
<a-select placeholder="选择楼栋" v-model="model.buildingName" @change="buildingChange">
<a-select-option v-for="buildingInfo in buildingInfos" :key="buildingInfo.name">
{{ buildingInfo.name }}
</a-select-option>
</a-select>
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入设备名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="楼层" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="floor">
<a-select placeholder="选择楼层" v-model="model.floor">
<a-select-option v-for="floor in targetFloorList" :key="floor">
{{ floor }}
</a-select-option>
</a-select>
<a-form-model-item label="设备位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="place">
<a-input v-model="model.place" placeholder="请输入设备位置"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备ip" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip">
<a-input v-model="model.ip" placeholder="请输入设备ip" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -53,11 +57,6 @@
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="place">
<a-input v-model="model.place" placeholder="请输入设备位置"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="出产日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dateOfProduction">
<j-date placeholder="请选择生产日期" v-model="model.dateOfProduction" style="width: 100%"/>
</a-form-model-item>
......@@ -79,9 +78,15 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<a-select placeholder="选择状态" v-model="model.status" @change="statusChange">
<a-select-option v-for="status in statusList" :key="status.value">
{{ status.name }}
<a-select v-model="model.type" placeholder="请选择状态" disabled>
<a-select-option :value="1">
正常
</a-select-option>
<a-select-option :value="2">
离线
</a-select-option>
<a-select-option :value="3">
自动访客机
</a-select-option>
</a-select>
</a-form-model-item>
......@@ -243,9 +248,9 @@ export default {
queryById: "/pm/pmAccessControlDevice/queryById"
},
statusList: [
{name: '正常', value: 'NORMAL', imgPath: require('@/assets/door-close.png')},
{name: '离线', value: 'OFFLINE', imgPath: require('@/assets/door-offline.png')},
{name: '损坏', value: 'BREAKDOWN', imgPath: require('@/assets/door-warning.png')}],
{name: '正常', value: 1, imgPath: require('@/assets/door-close.png')},
{name: '离线', value: 2, imgPath: require('@/assets/door-offline.png')},
{name: '损坏', value: 3, imgPath: require('@/assets/door-warning.png')}],
doorIconStyle: {
position: 'absolute',
top: '0px',
......@@ -266,10 +271,10 @@ export default {
created() {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
getAction('/pm/pmBuildingInfo/list')
.then(value => this.buildingInfos = value.result);
getAction('/pm/pmAccessControlDevice/types')
.then(value => this.types = value.result);
// getAction('/pm/pmBuildingInfo/list')
// .then(value => this.buildingInfos = value.result);
// getAction('/pm/pmAccessControlDevice/types')
// .then(value => this.types = value.result);
},
methods: {
add() {
......
......@@ -22,7 +22,7 @@ import java.util.Arrays;
import java.util.List;
/**
* @Description: pm_access_control_device
* @Description: 门禁设备
* @Author: jeecg-boot
* @Date: 2022-03-15
* @Version: V1.0
......@@ -33,7 +33,7 @@ import java.util.List;
@Slf4j
public class PmAccessControlDeviceController extends JeecgController<PmAccessControlDevice, IPmAccessControlDeviceService> {
private static final List<String> TYPES = Arrays.asList("出入口闸机", "访客一体机", "自助访客机", "身份证读卡器", "人脸识别");
// private static final List<String> TYPES = Arrays.asList("出入口闸机", "访客一体机", "自助访客机", "身份证读卡器", "人脸识别");
@Autowired
private IPmAccessControlDeviceService pmAccessControlDeviceService;
......@@ -156,8 +156,8 @@ public class PmAccessControlDeviceController extends JeecgController<PmAccessCon
return super.importExcel(request, response, PmAccessControlDevice.class);
}
@GetMapping("/types")
public Result<List<String>> getTypes() {
return Result.OK(TYPES);
}
// @GetMapping("/types")
// public Result<List<String>> getTypes() {
// return Result.OK(TYPES);
// }
}
......@@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: pm_access_control_device_record
* @Description: 一卡通出入记录
* @Author: jeecg-boot
* @Date: 2022-03-15
* @Version: V1.0
......
......@@ -39,6 +39,12 @@ public class PmAccessControlDevice implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
/**
* 区域名称
*/
@Excel(name = "区域名称", width = 15)
@ApiModelProperty(value = "区域名称")
private String districtName;
/**
* 设备编码
*/
@Excel(name = "设备编码", width = 15)
......@@ -47,9 +53,10 @@ public class PmAccessControlDevice implements Serializable {
/**
* 设备类型
*/
@Excel(name = "设备类型", width = 15)
@ApiModelProperty(value = "设备类型")
private String type;
@ApiModelProperty(value = "设备类型 1:出入口闸机 2:访客一体机 3:自助访客机 4:身份证读卡器 5:人脸识别")
@Excel(name = "设备类型", width = 15,dicCode = "alarm_query_equipmentType")
@Dict(dicCode = "alarm_query_equipmentType")
private Integer type;
/**
* 设备名称
*/
......@@ -63,18 +70,6 @@ public class PmAccessControlDevice implements Serializable {
@ApiModelProperty(value = "设备ip")
private String ip;
/**
* 楼栋
*/
@Excel(name = "楼栋", width = 15)
@ApiModelProperty(value = "楼栋")
private String buildingName;
/**
* 楼层
*/
@Excel(name = "楼层", width = 15)
@ApiModelProperty(value = "楼层")
private String floor;
/**
* 设备位置
*/
@Excel(name = "设备位置", width = 15)
......@@ -83,20 +78,17 @@ public class PmAccessControlDevice implements Serializable {
/**
* xy值
*/
@Excel(name = "xy值", width = 15)
@ApiModelProperty(value = "xy值")
@TableField(typeHandler = Coordinate.TypeHandler.class)
private Coordinate coordinate;
/**
* 开门时间
*/
@Excel(name = "开门时间", width = 15)
@ApiModelProperty(value = "开门时间")
private Integer doorOpenTime;
/**
* 生产日期
*/
@Excel(name = "生产日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "生产日期")
......@@ -104,7 +96,6 @@ public class PmAccessControlDevice implements Serializable {
/**
* 安装日期
*/
@Excel(name = "安装日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "安装日期")
......@@ -112,7 +103,6 @@ public class PmAccessControlDevice implements Serializable {
/**
* 保修截止日期
*/
@Excel(name = "保修截止日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "保修截止日期")
......@@ -126,30 +116,23 @@ public class PmAccessControlDevice implements Serializable {
/**
* 状态
*/
@Excel(name = "状态", width = 15)
@ApiModelProperty(value = "状态")
private Status status;
@Excel(name = "状态", width = 15,dicCode = "access_control_status")
@Dict(dicCode = "access_control_status")
@ApiModelProperty(value = "状态 1:正常 2:离线 3:维修")
private Integer status;
/**
* 创建人Id(sys_user)
*/
@Excel(name = "创建人Id(sys_user)", width = 15)
@ApiModelProperty(value = "创建人Id(sys_user)")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
private String createUserId;
/**
* 修改人Id(sys_user)
*/
@Excel(name = "修改人Id(sys_user)", width = 15)
@ApiModelProperty(value = "修改人Id(sys_user)")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
private String modifyUserId;
/**
* 删除状态
*/
@Excel(name = "删除状态", width = 15)
@ApiModelProperty(value = "删除状态")
private Boolean deleted;
/**
* 创建时间
*/
@Excel(name = "修改时间", width = 15, format = "yyyy-MM-dd hh:mm:ss")
......@@ -160,15 +143,13 @@ public class PmAccessControlDevice implements Serializable {
/**
* 修改时间
*/
@Excel(name = "修改时间", width = 15, format = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd hh:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "修改时间")
private Date modifyTime;
public enum Status {
NORMAL,
OFFLINE,
BREAKDOWN
}
/**
* 删除状态
*/
@ApiModelProperty(value = "删除状态")
private Boolean deleted;
}
......@@ -15,7 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* @Description: pm_event_info
* @Description: 事件详情
* @Author: jeecg-boot
* @Date: 2022-04-01
* @Version: V1.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment