Commit 2432df21 authored by caicaicai's avatar caicaicai

各个接口链接

parent 1e3236b4
......@@ -3,3 +3,5 @@ export const login = 'auth/login'; //登录
export const code = 'auth/code';
export const mainCamera = 'camera/list'; //视频监控分区表
export const mainCameraDetail = 'cameraDetail/list'; //视频监控分区摄像头详情表
export const deviceRegister = 'device/list'; //车辆登记详情表
export const personRegister = 'person/list'; //车辆登记详情表
......@@ -26,7 +26,7 @@ const mineMonitoring = {
name:"生产自动化",
context:[{name:"发货车辆",num:"36辆"},{name:"发货量",num:"36辆"}],
},
user:"",
user:"管理员",
},
mutations:{
changeUser(userName){
......@@ -57,12 +57,6 @@ const automation = {
}
//默认vuex
export default new Vuex.Store({
state: {
......
<template>
<div>
<span>门禁系统首页</span>
<div class="AuHiViewBody">
<div class="AuHiTop">
<div style="font-size:25px;font-weight:600;text-align:center">门禁数据明细</div>
<div style="margin-top:10px;display:flex;float: right;">
<div style="margin-right:20px;">
<template>
<el-date-picker
v-model="dateDate1.value"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</template>
</div>
<el-input v-model="search" placeholder="请输入内容" style="margin-right:20px;"></el-input>
<el-button type="primary" @click="dayin()">确认</el-button>
</div>
</div>
<div class="AuHiBottom">
<!-- 将获取到的数据进行计算 -->
<el-table :data="tableData.slice((currentPage-1)*PageSize,currentPage*PageSize)" border style="width: 100%" height="650">
<el-table-column prop="id" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="企业名称" align="center"></el-table-column>
<el-table-column prop="carNumber" label="车牌号码" align="center"></el-table-column>
<el-table-column prop="carImg" label="车牌照片" align="center"></el-table-column>
<el-table-column prop="enterTime" label="进厂时间" align="center"></el-table-column>
<el-table-column prop="outTime" label="出厂时间" align="center"></el-table-column>
</el-table>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="pageSizes"
:page-size="PageSize" layout="total, sizes, prev, pager, next, jumper"
:total="totalCount">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
dateDate1:{
value:""
},
tableData:[],
// 默认显示第几页
currentPage:1,
// 总条数
totalCount:1,
// 个数选择器
pageSizes:[2,4,6,8,10],
// 默认每页显示的条数
PageSize:10,
search:"",
}
},
methods:{
getTabData(){
//此处直接赋值代替发Ajax获取数据
this.tableData=[{
id:"1",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"2",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"3",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"4",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"5",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"6",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
},{
id:"7",
name: '晶合1',
carNumber:"鲁A11111",
carImg:"aaaaa",
enterTime: '2021-05-02',
outTime: '2021-05-05'
}]
this.totalCount=this.tableData.length
},
// 分页
// 每页显示的条数
handleSizeChange(val) {
// 改变每页显示的条数
this.PageSize=val
// 在改变每页显示的条数时,要将页码显示到第一页
this.currentPage=1
},
// 显示第几页
handleCurrentChange(val) {
// 改变默认的页数
this.currentPage=val
},
},
created:function(){
this.getTabData()
}
}
</script>
<style>
<style scoped>
.el-pagination{
float: right;
}
.AuHiViewBody{
width: 100%;
height:100%;
background-color: rgb(245,246,251);
padding: 30px;
box-sizing: border-box;
}
.AuHiTop{
height: 110px;
background-color: white;
border-radius: 10px;
padding: 18px 20px 0px ;
box-sizing: border-box;
}
.AuHiBottom{
width: 100%;
background-color: white;
padding: 30px;
box-sizing: border-box;
height: 750px;
margin-top: 20px;
}
.el-table .warning{
background: red !important;
}
.el-table .success-row {
background: blue;
}
</style>
\ No newline at end of file
......@@ -7,10 +7,10 @@
<div class="AuHiBottom">
<template>
<el-table :data="carRegistrationData" height="700" border style="width: 100%">
<el-table-column prop="car_id" label="车牌号" align="center"></el-table-column>
<el-table-column prop="carId" label="车牌号" align="center"></el-table-column>
<el-table-column prop="type" label="车类型" align="center"></el-table-column>
<el-table-column prop="name" label="负责人" align="center"></el-table-column>
<el-table-column prop="gnss_id" label="gnss编号" align="center"></el-table-column>
<el-table-column prop="gnssId" label="gnss编号" align="center"></el-table-column>
<el-table-column prop="note" label="备注" align="center"></el-table-column>
<el-table-column label="操作" width="150" align="center">
<template slot-scope="scope">
......@@ -25,7 +25,7 @@
<el-dialog :title="formTitle" :visible.sync="formVisible" width="30%">
<el-form ref="form" :model="formData" label-width="80px">
<el-form-item label="车牌号">
<el-input v-model="formData.car_id" :disabled="inpDisable"></el-input>
<el-input v-model="formData.carId" :disabled="inpDisable"></el-input>
</el-form-item>
<el-form-item label="车类型">
<el-input v-model="formData.type"></el-input>
......@@ -34,7 +34,7 @@
<el-input v-model="formData.name"></el-input>
</el-form-item>
<el-form-item label="gnss编号">
<el-input v-model="formData.gnss_id"></el-input>
<el-input v-model="formData.gnssId"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="formData.note"></el-input>
......@@ -55,63 +55,31 @@
</template>
<script>
import { httpGet, httpPost,httpPostForJson } from "@/common/httpBean.js"
import {deviceRegister} from "@/axios/api.js"
export default {
created(){
this.getCode()
},
data() {
return {
carRegistrationData:[],
formTitle:"",
formType:"",
carRegistrationData:[{
car_id: '鲁A45454',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},{
car_id: '鲁A48888',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},{
car_id: '鲁A66666',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},{
car_id: '鲁A11111',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},{
car_id: '鲁A77777',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},{
car_id: '鲁A0000',
type: '马自达',
name: '王一',
gnss_id: '19919191919',
note: '',
},],
formVisible:false,
formData: {
car_id: '',
type: '',
name: '',
gnss_id: '',
note: '',
},
formData: {carId: '',type: '',name: '',gnssId: '',note: '',},
inpDisable:false,
deleteVisible:false,
}
},
methods:{
getCode() {
httpGet(deviceRegister).then(res => {
this.carRegistrationData = res.content;
});
},
formOpen(type,row){
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
this.formVisible = true;
this.formType = type;
if(this.formType === "add"){
......@@ -131,12 +99,12 @@ export default {
}
this.carRegistrationData.unshift(this.formData);
this.formVisible = false;
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
}else if(this.formType === "change"){
const that = this;
const newData = [];
this.carRegistrationData.forEach(function(item){
if(item.car_id === that.formData.car_id){
if(item.carId === that.formData.carId){
newData.push(that.formData);
}else{
newData.push(item);
......@@ -144,12 +112,12 @@ export default {
})
this.carRegistrationData = newData;
this.formVisible = false;
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
}
},
formcancel(){
this.formVisible = false;
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
},
deleteFormOpen(row){
console.log(row);
......@@ -160,7 +128,7 @@ export default {
const that = this;
const newData = [];
this.carRegistrationData = that.carRegistrationData.forEach(function(item){
if(item.car_id === that.formData.car_id){
if(item.carId === that.formData.carId){
return;
}else{
newData.push(item);
......@@ -168,11 +136,11 @@ export default {
})
this.carRegistrationData = newData;
this.deleteVisible = false;
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
},
cancelDelete(){
this.deleteVisible = false;
this.formData = {car_id: '',type: '',name: '',gnss_id: '',note: '',};
this.formData = {carId: '',type: '',name: '',gnssId: '',note: '',};
}
}
}
......
......@@ -5,7 +5,7 @@
<span>{{ $store.state.platformName }}</span>
<div class="userInformationBar">
<div style="margin-right:10px;">
<span>{{userName}}</span>
<span>{{ $store.state.a.user }}</span>
<span class="iconfont icon-xiajiantou xiajiantou" style="font-size:18px;"></span>
</div>
<el-button type="primary" circle @click="handleFullScreen()" size="small" style="margin-right:10px;"><span :class="quanping"></span></el-button>
......
......@@ -7,13 +7,13 @@
<div class="AuHiBottom">
<template>
<el-table :data="PersonRegistrationData" height="700" border style="width: 100%">
<el-table-column prop="employee_id" label="员工编号" align="center"></el-table-column>
<el-table-column prop="employeeId" label="员工编号" align="center"></el-table-column>
<el-table-column prop="name" label="员工名" align="center"></el-table-column>
<el-table-column prop="sex" label="性别" align="center"></el-table-column>
<el-table-column prop="age" label="年龄" align="center"></el-table-column>
<el-table-column prop="phone" label="电话" align="center"></el-table-column>
<el-table-column prop="dept" label="部门" align="center"></el-table-column>
<el-table-column prop="hat_number" label="帽子编号" align="center"></el-table-column>
<el-table-column prop="hatNumber" label="帽子编号" align="center"></el-table-column>
<el-table-column label="操作" width="150" align="center">
<template slot-scope="scope">
<el-button @click="formOpen('change',scope.row)" type="text">编辑</el-button>
......@@ -27,7 +27,7 @@
<el-dialog :title="formTitle" :visible.sync="formVisible" width="30%">
<el-form ref="form" :model="formData" label-width="80px">
<el-form-item label="员工编号">
<el-input v-model="formData.employee_id"></el-input>
<el-input v-model="formData.employeeId"></el-input>
</el-form-item>
<el-form-item label="员工名">
<el-input v-model="formData.name" :disabled="inpDisable"></el-input>
......@@ -48,7 +48,7 @@
<el-input v-model="formData.dept"></el-input>
</el-form-item>
<el-form-item label="帽子编号">
<el-input v-model="formData.hat_number"></el-input>
<el-input v-model="formData.hatNumber"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -66,93 +66,31 @@
</template>
<script>
import { httpGet, httpPost,httpPostForJson } from "@/common/httpBean.js"
import {personRegister} from "@/axios/api.js"
export default {
created(){
this.getCode()
},
data() {
return {
formTitle:"",
formType:"",
PersonRegistrationData:[{
employee_id: '20210901',
name: '王一',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王二',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王三',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王四',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王五',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王六',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王七',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
},{
employee_id: '20210901',
name: '王八',
sex: '',
age: '22',
phone: '19919191919',
dept: '开发',
hat_number: '01110'
}],
PersonRegistrationData:[],
formVisible:false,
formData: {
employee_id: '',
name: '',
sex: '',
age: '',
phone: '',
dept: '',
hat_number: ''
},
formData: {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''},
inpDisable:false,
deleteVisible:false,
}
},
methods:{
getCode() {
httpGet(personRegister).then(res => {
this.PersonRegistrationData = res.content;
});
},
formOpen(type,row){
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
this.formVisible = true;
this.formType = type;
if(this.formType === "add"){
......@@ -172,7 +110,7 @@ export default {
}
this.PersonRegistrationData.unshift(this.formData);
this.formVisible = false;
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
}else if(this.formType === "change"){
const that = this;
const newData = [];
......@@ -185,12 +123,12 @@ export default {
})
this.PersonRegistrationData = newData;
this.formVisible = false;
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
}
},
formcancel(){
this.formVisible = false;
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
},
deleteFormOpen(row){
console.log(row);
......@@ -209,11 +147,11 @@ export default {
})
this.PersonRegistrationData = newData;
this.deleteVisible = false;
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
},
cancelDelete(){
this.deleteVisible = false;
this.formData = {employee_id: '',name: '',sex: '',age: '',phone: '',dept: '',hat_number: ''};
this.formData = {employeeId: '',name: '',sex: '',age: '',phone: '',dept: '',hatNumber: ''};
}
}
}
......
......@@ -21,15 +21,20 @@
</div>
<div class="AuHiBottom">
<template>
<el-table :data="unmanTableData" height="700" border style="width: 100%" :row-style="tableRowStyle">
<el-table :data="unmanTableData.slice((currentPage-1)*PageSize,currentPage*PageSize)" border style="width: 100%" height="650">
<el-table-column prop="id" label="序号" align="center"></el-table-column>
<el-table-column prop="type" label="品种" align="center"></el-table-column>
<el-table-column prop="carNumber" label="车牌号" align="center"></el-table-column>
<el-table-column prop="other" label="看不清" align="center"></el-table-column>
<el-table-column prop="weight" label="重量" align="center"></el-table-column>
<el-table-column prop="time" label="时间" align="center"></el-table-column>
</el-table>
</template>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="pageSizes"
:page-size="PageSize" layout="total, sizes, prev, pager, next, jumper"
:total="totalCount">
</el-pagination>
</div>
</div>
......@@ -42,51 +47,72 @@ export default {
dateDate1:{
value:""
},
unmanTableData:[{
unmanTableData:[],
// 默认显示第几页
currentPage:1,
// 总条数
totalCount:1,
// 个数选择器
pageSizes:[2,4,6,8,10],
// 默认每页显示的条数
PageSize:10,
}
},
methods:{
getTabData(){
//此处直接赋值代替发Ajax获取数据
this.unmanTableData=[{
id: '1',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
},{
id: '2',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
},{
id: '3',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
},{
id: '4',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
},{
id: '5',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
},{
id: '6',
type: '无人',
carNumber: '123456',
other: '看不清',
weight: '25kg',
time: '2021-9-6',
}],
}
}]
this.totalCount=this.unmanTableData.length
},
methods:{
tableRowStyle({row, rowIndex}) {
// if (row.name == "王小虎") {
// return 'background: rgb(255,232,232);';
// }
// 分页
// 每页显示的条数
handleSizeChange(val) {
// 改变每页显示的条数
this.PageSize=val
// 在改变每页显示的条数时,要将页码显示到第一页
this.currentPage=1
},
// 显示第几页
handleCurrentChange(val) {
// 改变默认的页数
this.currentPage=val
},
daochu(){
//获取表格
......@@ -115,11 +141,17 @@ export default {
newWin.print();//打印
newWin.close();//关闭窗口
},
},
created:function(){
this.getTabData()
}
}
</script>
<style scoped>
.el-pagination{
float: right;
}
.AuHiViewBody{
width: 100%;
height:100%;
......
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