Commit c1ae058b authored by xinzhedeai's avatar xinzhedeai

add:分布页面开发 接口对接 人员轨迹追踪

parent a52e73a8
import request from '@/utils/request'
// 查询人员信息列表
export function getPersonCount(query) {
return request({
url: '/person/count/getPersonCount',
method: 'get',
params: query
})
}
...@@ -356,7 +356,7 @@ export default { ...@@ -356,7 +356,7 @@ export default {
}, },
handleHistory(row) { handleHistory(row) {
// 跳转到李麒麟页面 // 跳转到李麒麟页面
window.open("https://www.baidu.com"); window.open("http://192.168.2.54:9529/personnel/track");
}, },
/** 获取定位卡号列表数据 */ /** 获取定位卡号列表数据 */
......
...@@ -8,13 +8,26 @@ ...@@ -8,13 +8,26 @@
v-show="showSearch" v-show="showSearch"
label-width="68px" label-width="68px"
> >
<el-form-item label="月份查询" prop="realName"> <el-form-item label="月份查询" prop="month">
<el-input <el-select
v-model="queryParams.realName" v-model="queryParams.month"
placeholder="请选择月份"
clearable
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in monthOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-input
v-model="queryParams.month"
placeholder="请输入月份" placeholder="请输入月份"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> /> -->
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
...@@ -46,7 +59,6 @@ ...@@ -46,7 +59,6 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
...@@ -60,12 +72,15 @@ ...@@ -60,12 +72,15 @@
:data="infoList" :data="infoList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column label="序号" align="center" prop="id" width="50" />
<el-table-column label="序号" align="center" type="index" width="50" /> <el-table-column label="日期" align="center" prop="statDate" />
<el-table-column label="日期" align="center" prop="realName" /> <el-table-column label="矿区内人数" align="center" prop="insideCnt" />
<el-table-column label="矿区内人数" align="center" prop="deptName" /> <el-table-column label="矿区外人数" align="center" prop="outsideCnt" />
<el-table-column label="矿区外人数" align="center" prop="positionName" /> <el-table-column
<el-table-column label="矿区外人员姓名" align="center" prop="cardId" /> label="矿区外人员姓名"
align="center"
prop="outsideNames"
/>
</el-table> </el-table>
<pagination <pagination
...@@ -79,13 +94,26 @@ ...@@ -79,13 +94,26 @@
</template> </template>
<script> <script>
import { listInfo } from "@/api/jinrun/renyuan"; import { getPersonCount } from "@/api/jinrun/fenbutongji";
import { getDict } from "@/api/jinrun/common";
export default { export default {
name: "Info", name: "Info",
data() { data() {
return { return {
monthOptions: [
{ value: "1", label: "1月" },
{ value: "2", label: "2月" },
{ value: "3", label: "3月" },
{ value: "4", label: "4月" },
{ value: "5", label: "5月" },
{ value: "6", label: "6月" },
{ value: "7", label: "7月" },
{ value: "8", label: "8月" },
{ value: "9", label: "9月" },
{ value: "10", label: "10月" },
{ value: "11", label: "11月" },
{ value: "12", label: "12月" },
],
// 人员类型下拉列表数据 // 人员类型下拉列表数据
personTypeOptions: [], personTypeOptions: [],
// 遮罩层 // 遮罩层
...@@ -112,6 +140,7 @@ export default { ...@@ -112,6 +140,7 @@ export default {
realName: null, realName: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
month: null,
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -122,12 +151,26 @@ export default { ...@@ -122,12 +151,26 @@ export default {
created() { created() {
this.getList(); this.getList();
}, },
watch: {
"queryParams.dateRange": {
handler(newVal, oldVal) {
if (!newVal) {
this.queryParams.startDate = "";
this.queryParams.endDate = "";
}
},
},
},
methods: { methods: {
/** 查询人员信息列表 */ /** 查询人员信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listInfo(this.queryParams).then((response) => { if (this.queryParams.dateRange && this.queryParams.dateRange.length > 0) {
this.queryParams.startDate = this.queryParams.dateRange[0];
this.queryParams.endDate = this.queryParams.dateRange[1];
}
getPersonCount(this.queryParams).then((response) => {
this.infoList = response.records; this.infoList = response.records;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
...@@ -142,11 +185,15 @@ export default { ...@@ -142,11 +185,15 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.dateRange = null;
this.queryParams.startDate = "";
this.queryParams.endDate = "";
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -158,11 +205,11 @@ export default { ...@@ -158,11 +205,11 @@ export default {
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download( this.download(
"system/info/export", "person/count/exportPersonAttend",
{ {
...this.queryParams, ...this.queryParams,
}, },
`info_${new Date().getTime()}.xlsx` `人员分布数据_${new Date().getTime()}.xlsx`
); );
}, },
}, },
......
...@@ -159,7 +159,16 @@ export default { ...@@ -159,7 +159,16 @@ export default {
this.getList(); this.getList();
this.getPersonTypeOptions(); this.getPersonTypeOptions();
}, },
watch: {
"queryParams.dateRange": {
handler(newVal, oldVal) {
if (!newVal) {
this.queryParams.startDate = "";
this.queryParams.endDate = "";
}
},
},
},
methods: { methods: {
/** 获取人员类型下拉列表数据 */ /** 获取人员类型下拉列表数据 */
getPersonTypeOptions() { getPersonTypeOptions() {
...@@ -176,6 +185,11 @@ export default { ...@@ -176,6 +185,11 @@ export default {
/** 查询人员信息列表 */ /** 查询人员信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
if (this.queryParams.dateRange && this.queryParams.dateRange.length > 0) {
this.queryParams.startDate = this.queryParams.dateRange[0];
this.queryParams.endDate = this.queryParams.dateRange[1];
}
getPersonAttend(this.queryParams).then((response) => { getPersonAttend(this.queryParams).then((response) => {
this.infoList = response.records; this.infoList = response.records;
this.total = response.total; this.total = response.total;
...@@ -196,6 +210,9 @@ export default { ...@@ -196,6 +210,9 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.dateRange = null;
this.queryParams.startDate = "";
this.queryParams.endDate = "";
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
......
...@@ -49,7 +49,7 @@ module.exports = { ...@@ -49,7 +49,7 @@ module.exports = {
}, },
}, },
'/api': { '/api': {
target: `http://192.168.2.53:8080`, // 中控平台 target: `http://192.168.2.53:9995`, // 中控平台
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/api": "", "^/api": "",
......
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