人员流量分析
This commit is contained in:
parent
0c3ba98674
commit
033ca40527
@ -67,6 +67,20 @@ public class ZhcjPersonFlow extends BaseEntity {
|
||||
@Excel(name = "记录设备")
|
||||
private String equipName;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
public String getDataType() {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
public void setDataType(String dataType) {
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="queueTime" column="queue_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="equipName" column="equip_name" />
|
||||
<result property="dataType" column="data_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZhcjPersonFlowVo">
|
||||
select id, user_name, area_info, behavior_type, person_type, purpose_type, enter_time, queue_time, remark, equip_name from zhcj_person_flow
|
||||
select id, user_name, area_info, behavior_type, person_type, purpose_type, enter_time, queue_time, remark, equip_name, data_type from zhcj_person_flow
|
||||
</sql>
|
||||
|
||||
<select id="selectZhcjPersonFlowList" parameterType="ZhcjPersonFlow" resultMap="ZhcjPersonFlowResult">
|
||||
@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="params.beginEnterTime != null and params.beginEnterTime != '' and params.endEnterTime != null and params.endEnterTime != ''"> and enter_time between #{params.beginEnterTime} and #{params.endEnterTime}</if>
|
||||
<if test="queueTime != null and queueTime != ''"> and queue_time like concat('%', #{queueTime}, '%')</if>
|
||||
<if test="equipName != null and equipName != ''"> and equip_name like concat('%', #{equipName}, '%')</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type like concat('%', #{dataType}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="queueTime != null">queue_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="equipName != null">equip_name,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -65,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="queueTime != null">#{queueTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="equipName != null">#{equipName},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -80,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="queueTime != null">queue_time = #{queueTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="equipName != null">equip_name = #{equipName},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -47,6 +47,7 @@
|
||||
"js-beautify": "1.13.0",
|
||||
"js-cookie": "3.0.1",
|
||||
"jsencrypt": "3.0.0-rc.1",
|
||||
"moment": "^2.29.4",
|
||||
"nprogress": "0.2.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
|
@ -244,6 +244,7 @@ export default {
|
||||
purposeType: null,
|
||||
enterTime: null,
|
||||
queueTime: null,
|
||||
dataType: "人员流量",
|
||||
equipName: null
|
||||
},
|
||||
// 表单参数
|
||||
@ -314,6 +315,7 @@ export default {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加人员流量";
|
||||
this.form.dataType = "人员流量";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
387
god-ui/src/views/passenger/flowAnalysis/index.vue
Normal file
387
god-ui/src/views/passenger/flowAnalysis/index.vue
Normal file
@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="区域" prop="areaInfo">
|
||||
<el-input
|
||||
v-model="queryParams.areaInfo"
|
||||
placeholder="请输入区域"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="行为类型" prop="behaviorType">-->
|
||||
<!-- <el-select v-model="queryParams.behaviorType" placeholder="请选择行为类型" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.zhcj_behavior_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="人员类型" prop="personType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.personType"-->
|
||||
<!-- placeholder="请输入人员类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="进出是由" prop="purposeType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.purposeType"-->
|
||||
<!-- placeholder="请输入进出是由"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="统计时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeEnterTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="排队时长" prop="queueTime">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.queueTime"-->
|
||||
<!-- placeholder="请输入排队时长"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['passenger:flow:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['passenger:flow:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['passenger:flow:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['passenger:flow:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="flowList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="姓名" align="center" prop="userName" />-->
|
||||
<el-table-column label="区域" align="center" prop="areaInfo" />
|
||||
<el-table-column label="门禁设备" align="center" prop="equipName" />
|
||||
<el-table-column label="驶入人员数量" align="center" prop="personType" />
|
||||
<el-table-column label="驶出人员数量" align="center" prop="purposeType" />
|
||||
<!-- <el-table-column label="行为类型" align="center" prop="behaviorType">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.zhcj_behavior_type" :value="scope.row.behaviorType"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="统计时间" align="center" prop="enterTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.enterTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="排队时长(分钟)" align="center" prop="queueTime" />-->
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" />-->
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['passenger:flow:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['passenger:flow:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
: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="姓名" prop="userName">-->
|
||||
<!-- <el-input v-model="form.userName" placeholder="请输入姓名" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="区域" prop="areaInfo">
|
||||
<el-input v-model="form.areaInfo" placeholder="请输入区域" />
|
||||
</el-form-item>
|
||||
<el-form-item label="记录设备" prop="equipName">
|
||||
<el-input v-model="form.equipName" placeholder="请输入记录设备" />
|
||||
</el-form-item>
|
||||
<el-form-item label="驶入人员数量" prop="personType">
|
||||
<el-input v-model="form.personType" placeholder="请输入驶入人员数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="驶出人员数量" prop="purposeType">
|
||||
<el-input v-model="form.purposeType" placeholder="请输入驶出人员数量" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="行为类型" prop="behaviorType">-->
|
||||
<!-- <el-select v-model="form.behaviorType" placeholder="请选择行为类型">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.zhcj_behavior_type"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<el-form-item label="发生时间" prop="enterTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.enterTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发生时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="排队时长" prop="queueTime">-->
|
||||
<!-- <el-input v-model="form.queueTime" placeholder="请输入排队时长,单位是分钟" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="备注" prop="remark">-->
|
||||
<!-- <el-input v-model="form.remark" 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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listFlow, getFlow, delFlow, addFlow, updateFlow } from "@/api/passenger/flow";
|
||||
import moment from "moment";
|
||||
|
||||
|
||||
export default {
|
||||
//流量分析
|
||||
name: "FlowAnalysis",
|
||||
dicts: ['zhcj_behavior_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 人员流量表格数据
|
||||
flowList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 记录设备时间范围
|
||||
daterangeEnterTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userName: null,
|
||||
areaInfo: null,
|
||||
behaviorType: null,
|
||||
personType: null,
|
||||
purposeType: null,
|
||||
enterTime: null,
|
||||
queueTime: null,
|
||||
dataType: "流量分析",
|
||||
equipName: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
//今天的日期
|
||||
timeDay: null,
|
||||
//是否将返回日期设置为今天的日期
|
||||
timeDayFalse: true,
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.timeDay = moment().format('YYYY-MM-DD');
|
||||
},
|
||||
methods: {
|
||||
/** 查询人员流量列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeEnterTime && '' != this.daterangeEnterTime) {
|
||||
this.queryParams.params["beginEnterTime"] = this.daterangeEnterTime[0];
|
||||
this.queryParams.params["endEnterTime"] = this.daterangeEnterTime[1];
|
||||
this.timeDayFalse = false;
|
||||
}
|
||||
listFlow(this.queryParams).then(response => {
|
||||
this.flowList = response.rows;
|
||||
//TODO 把返回数据设置为今天的日期
|
||||
if (this.timeDayFalse) {
|
||||
this.flowList.map(item => {
|
||||
item.enterTime = this.timeDay;
|
||||
});
|
||||
}
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userName: null,
|
||||
areaInfo: null,
|
||||
behaviorType: null,
|
||||
personType: null,
|
||||
purposeType: null,
|
||||
enterTime: null,
|
||||
queueTime: null,
|
||||
remark: null,
|
||||
equipName: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeEnterTime = [];
|
||||
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 = "添加人员流量分析";
|
||||
this.form.dataType = "流量分析";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getFlow(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) {
|
||||
updateFlow(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addFlow(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除人员流量分析编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delFlow(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('passenger/flow/export', {
|
||||
...this.queryParams
|
||||
}, `flow_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user