You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

188 lines
4.4 KiB
Vue

<template>
<el-dialog
class="gpsSiteDialog"
title="GPS位置数据"
:visible.sync="isShow"
:close-on-click-modal="false"
2 years ago
width="1280px"
>
<el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="开始日期">
<el-date-picker
v-model="formdata.starttime"
type="datetime"
placeholder="开始日期"
value-format="timestamp"
>
</el-date-picker>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="formdata.endtime"
type="datetime"
default-time="23:59:59"
placeholder="结束日期"
value-format="timestamp"
class="ml10"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button type="primary">导出</el-button>
</el-form-item>
</el-form>
<el-table
ref="multipleTable"
:data="listData"
stripe
tooltip-effect="dark"
style="width: 100%"
v-loading="loading"
>
<el-table-column min-width="45" label="序号">
<template slot-scope="scope">
<span>{{ (page - 1) * pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="采集时间"
min-width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="name"
label="设备名称"
min-width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="name"
label="设备编号"
min-width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="name"
label="半径"
min-width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="name"
label="维度"
min-width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="name"
label="经度"
min-width="80"
show-overflow-tooltip
></el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
</el-pagination>
</div>
2 years ago
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getLineListJoggle } from "@/utils/api/index";
export default {
data() {
return {
isShow: false,
formdata: {},
2 years ago
listData: [
{
name: "测试",
},
{
name: "测试2",
},
],
loading: false,
seltermid: "", //装置id
selcmdId: "", //cmdId
requestId: "",
page: 1, // 当前页数
pageSize: 20, // 每页数量
total: 0, //总条数
};
},
mounted() {},
methods: {
//查询
onSubmit() {
if (this.formdata.starttime > this.formdata.endtime) {
return this.$message({
duration: 1500,
showClose: true,
message: "开始日期不能大于结束日期",
type: "warning",
});
}
this.getlistnr();
},
//获取数据
getlistnr(val) {
console.log(val);
this.seltermid = val.id;
this.selcmdId = val.cmdid;
this.loading = true;
getLineListJoggle({
pageindex: this.page,
pagesize: this.pageSize,
}).then((res) => {
this.listData = res.data.list;
this.total = res.data.total;
this.loading = false;
});
},
//点击分页
handleCurrentChange(val) {
this.page = val;
this.getlistnr();
},
//每页条数
handleSizeChange(val) {
this.pageSize = val;
this.getlistnr();
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
},
};
</script>
<style lang="less">
.gpsSiteDialog {
2 years ago
.pageNation {
justify-content: flex-start;
margin-top: 16px;
.el-pagination {
padding: 0px;
.el-select .el-input {
margin-left: 0px;
}
}
}
}
</style>