|
|
@ -7,21 +7,11 @@ |
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
|
|
|
<div v-show="isSearchShow" class="search"> |
|
|
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> |
|
|
|
<!-- <el-form-item label="设备类型"> |
|
|
|
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" |
|
|
|
class="addinputw"></el-input> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item label="设备类型"> |
|
|
|
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择设备类型"> |
|
|
|
<el-select v-model="listQuery.type" filterable clearable placeholder="请选择设备类型"> |
|
|
|
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label="厂商办公电话"> |
|
|
|
<el-input v-model="listQuery.params.manufacturerTelePhone" maxlength="130" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系人"> |
|
|
|
<el-input v-model="listQuery.params.contactName" maxlength="125" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|
|
@ -40,69 +30,27 @@ |
|
|
|
@selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" align="center" width="50" /> |
|
|
|
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center" /> |
|
|
|
<!-- <el-table-column label="操作" fixed align="center" width="160px" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-button size="mini" type="primary" :disabled="!row.isShow && (row.supplierTypeValue === '主机厂' || row.supplierTypeValue === '分公司')" @click="handleEdit(row)">编辑</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- <el-table-column prop="jc" label="设备" width="220" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.bianma }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- |
|
|
|
<el-table-column label="报警时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.policeTime }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备位置" width="" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.weizhi }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="设备类型" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ getDeviceType(scope.row.deviceType) }}</span> |
|
|
|
<span>{{ getDeviceType(scope.row.type) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="jc" label="设备编码" header-align="center" align="center"> |
|
|
|
<el-table-column prop="jc" label="设备名称" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.bianma }}</span> |
|
|
|
<span>{{ scope.row.name }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="IP地址" align="center"> |
|
|
|
<el-table-column label="设备位置" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.ipAddress }}</span> |
|
|
|
<span>{{ scope.row.position }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="当前状态" width="110" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.supplierTypeValue == 1" style="color:green">{{ getSupplierType(scope.row.supplierTypeValue) }}</span> |
|
|
|
<span v-if="scope.row.supplierTypeValue == 2" style="color:red">{{ getSupplierType(scope.row.supplierTypeValue) }}</span> |
|
|
|
<span v-if="scope.row.status == '1'" style="color:green">在线</span> |
|
|
|
<span v-if="scope.row.status == 2" style="color:red">离线</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="出厂时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.time }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="安装时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.anzhuangtime }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="供货商" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.gonghuashang }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="生产厂家" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.owner }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
@ -112,8 +60,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/> |
|
|
|
<baojingchaxunInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -121,10 +67,7 @@ |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
|
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' |
|
|
|
// import baojingchaxunAdd from './baojingchaxunAdd' |
|
|
|
// import baojingchaxunInfo from './baojingchaxunInfo' |
|
|
|
// import req from '@/api/baojingchaxun/baojingchaxun' |
|
|
|
import { getDeviceStatusPage } from '@/api/device/device' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'baojingchaxunList', |
|
|
@ -132,49 +75,11 @@ |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
ButtonBar, |
|
|
|
// baojingchaxunAdd, |
|
|
|
// baojingchaxunInfo, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
// { |
|
|
|
// type: 'primary', |
|
|
|
// size: 'small', |
|
|
|
// icon: 'plus', |
|
|
|
// btnKey: 'toAdd', |
|
|
|
// btnLabel: '新增' |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// type: 'danger', |
|
|
|
// size: 'small', |
|
|
|
// icon: 'del', |
|
|
|
// btnKey: 'doDel', |
|
|
|
// btnLabel: '删除' |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// type: 'primary', |
|
|
|
// size: 'small', |
|
|
|
// icon: '', |
|
|
|
// btnKey: 'toChangShang', |
|
|
|
// btnLabel: '获取厂商' |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// type: 'primary', |
|
|
|
// size: 'small', |
|
|
|
// icon: '', |
|
|
|
// btnKey: 'toGain', |
|
|
|
// btnLabel: '获取分公司' |
|
|
|
// }, |
|
|
|
|
|
|
|
// { |
|
|
|
// type: 'success', |
|
|
|
// size: 'small', |
|
|
|
// icon: 'export', |
|
|
|
// btnKey: 'build', |
|
|
|
// btnLabel: '导出' |
|
|
|
// }, |
|
|
|
{ |
|
|
|
type: 'info', |
|
|
|
size: 'small', |
|
|
@ -189,39 +94,18 @@ |
|
|
|
sids: [], |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
list: [ |
|
|
|
{ bianma: 'Pro2160901', supplierTypeValue: '1', weizhi: '库房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-18', deviceType: '1', ipAddress: '192.168.5.12' }, |
|
|
|
{ bianma: 'Pro2160902', supplierTypeValue: '1', weizhi: '观察', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19', deviceType: '1', ipAddress: '192.168.5.13' }, |
|
|
|
{ bianma: 'Pro2160903', supplierTypeValue: '2', weizhi: '后院', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19', deviceType: '2', ipAddress: '192.168.5.14' }, |
|
|
|
{ bianma: 'Pro2160904', supplierTypeValue: '2', weizhi: '铁皮', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20', deviceType: '2', ipAddress: '192.168.5.15' }, |
|
|
|
{ bianma: 'Pro2160905', supplierTypeValue: '2', weizhi: '盲点', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20', deviceType: '2', ipAddress: '192.168.5.16' }, |
|
|
|
{ bianma: 'Pro2160906', supplierTypeValue: '1', weizhi: '凉亭', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-21', deviceType: '1', ipAddress: '192.168.5.17' }, |
|
|
|
{ bianma: 'Pro2160907', supplierTypeValue: '1', weizhi: '书房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.18' }, |
|
|
|
{ bianma: 'Pro2160908', supplierTypeValue: '2', weizhi: '藏经阁', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '2', ipAddress: '192.168.5.19' }, |
|
|
|
{ bianma: 'Pro2160909', supplierTypeValue: '1', weizhi: '车库', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.20' }, |
|
|
|
{ bianma: 'ZYR2060810', supplierTypeValue: '2', weizhi: '斜坡', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.21' }, |
|
|
|
], |
|
|
|
list: [], |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
params: { |
|
|
|
manufacturerName: '', |
|
|
|
supplierType: '', |
|
|
|
useOrgSid: '', |
|
|
|
createOrgSid: '', |
|
|
|
manufacturerTelePhone: '', |
|
|
|
contactName: '' |
|
|
|
}, |
|
|
|
current: 1, |
|
|
|
size: 5, |
|
|
|
total: 10 |
|
|
|
}, |
|
|
|
supplierType_list: [ |
|
|
|
{ title: '在线', id: '1' }, |
|
|
|
{ title: '离线', id: '2' }, |
|
|
|
], |
|
|
|
deviceType_list: [ |
|
|
|
{ title: '普通设备', id: '1' }, |
|
|
|
{ title: '人脸设备', id: '2' }, |
|
|
|
{ title: '摄像头', id: '1' }, |
|
|
|
{ title: '电子围栏', id: '2' }, |
|
|
|
{ title: '门禁', id: '3' }, |
|
|
|
{ title: '机器人', id: '4' } |
|
|
|
], |
|
|
|
rules: {} |
|
|
|
} |
|
|
@ -231,23 +115,19 @@ |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
// this.init() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getSupplierType(item) { |
|
|
|
console.log('item', item) |
|
|
|
}, |
|
|
|
getDeviceType(item) { |
|
|
|
for (var i = 0; i < this.supplierType_list.length; i++) { |
|
|
|
if (this.supplierType_list[i].id == item) { |
|
|
|
return this.supplierType_list[i].title |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getDeviceType(item) { |
|
|
|
for (var i = 0; i < this.deviceType_list.length; i++) { |
|
|
|
if (this.deviceType_list[i].id == item) { |
|
|
|
return this.deviceType_list[i].title |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
@ -285,25 +165,18 @@ |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
// init() { |
|
|
|
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
// if (res.success) { |
|
|
|
// this.listQuery.params.createOrgSid = res.data |
|
|
|
// this.getType() |
|
|
|
// this.getList() |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// getType() { |
|
|
|
// typeValues({ |
|
|
|
// type: 'supplierType' |
|
|
|
// }).then((res) => { |
|
|
|
// if (res.code === '200') { |
|
|
|
// this.supplierType_list = res.data |
|
|
|
// console.log('选择楼层', this.supplierType_list) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
init() { |
|
|
|
getDeviceStatusPage(this.listQuery).then((res) => { |
|
|
|
console.log(res) |
|
|
|
if (res.code == 200) { |
|
|
|
this.listQuery.total = res.data.total |
|
|
|
this.list = res.data.records |
|
|
|
} else { |
|
|
|
this.list = [] |
|
|
|
this.listQuery.total = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
@ -312,17 +185,15 @@ |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
// this.listLoading = true |
|
|
|
// req.gysPagerList(this.listQuery).then((response) => { |
|
|
|
// this.listLoading = false |
|
|
|
// if (response.code === '200' && response.data && response.data.total > 0) { |
|
|
|
// this.list = response.data.records |
|
|
|
// this.listQuery.total = response.data.total |
|
|
|
// } else { |
|
|
|
// this.list = [] |
|
|
|
// this.listQuery.total = 0 |
|
|
|
// } |
|
|
|
// }) |
|
|
|
getDeviceStatusPage(this.listQuery).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.listQuery.total = res.data.total |
|
|
|
this.list = res.data.records |
|
|
|
} else { |
|
|
|
this.list = [] |
|
|
|
this.listQuery.total = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
@ -446,5 +317,4 @@ |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
</style> |
|
|
|
<style scoped></style> |
|
|
|