Browse Source

定时获取消息,分别添加到消息表,报警表,日志表。

添加设备的时候不再对海康接口进行操作。直接存库。
测试摄像头抓拍接口。
master
yangzongjia 2 years ago
parent
commit
6fbace53ee
  1. 8
      src/api/callPolice/callPolice.js
  2. 10
      src/api/device/device.js
  3. 8
      src/api/deviceImage/deviceImage.js
  4. 8
      src/api/deviceLog/deviceLog.js
  5. 156
      src/views/baojingchaxun/baojingchaxunList.vue
  6. 140
      src/views/shebeirizhi/shebeirizhiList.vue
  7. 18
      src/views/shebeitaizhang/shebeitaizhangAdd.vue
  8. 4
      src/views/shebeitaizhang/shebeitaizhangList.vue
  9. 239
      src/views/zhiwujiance/zhiwujianceList.vue

8
src/api/callPolice/callPolice.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取报警列表
export function getCallPolicePage(data) {
return request({ url: '/callPolice/getCallPolicePage', method: 'GET', params: data })
}

10
src/api/device/device.js

@ -2,11 +2,21 @@ import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import qs from 'qs' import qs from 'qs'
// 添加设备
export function createDeviceGroup(data) {
return request({ url: '/device/createDeviceGroup', method: 'post', params: data })
}
// 添加设备 // 添加设备
export function createDevice(data) { export function createDevice(data) {
return request({ url: '/device/createDevice', method: 'post', params: data }) return request({ url: '/device/createDevice', method: 'post', params: data })
} }
// 删除设备
export function removeDevice(data) {
return request({ url: '/device/removeDevice', method: 'post', params: data })
}
// 获取设备列表 // 获取设备列表
export function getDevicePage(data) { export function getDevicePage(data) {
return request({ url: '/device/getDevicePage', method: 'GET', params: data }) return request({ url: '/device/getDevicePage', method: 'GET', params: data })

8
src/api/deviceImage/deviceImage.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取设备日志列表
export function getDeviceImagePage(data) {
return request({ url: '/deviceImage/getDeviceImagePage', method: 'GET', params: data })
}

8
src/api/deviceLog/deviceLog.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取设备日志列表
export function getDeviceLogPage(data) {
return request({ url: '/deviceLog/getDeviceLogPage', method: 'GET', params: data })
}

156
src/views/baojingchaxun/baojingchaxunList.vue

@ -8,36 +8,21 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="设备名称"> <el-form-item label="设备名称">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" <el-input v-model="listQuery.name" clearable placeholder="" class="addinputw"></el-input>
class="addinputw"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备类型"> <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-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="开始时间"> <el-form-item label="开始时间">
<el-date-picker v-model="listQuery.params.time1" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.startTIme" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
<!-- <el-select v-model="listQuery.params.time1" 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>
<el-form-item label="结束时间"> <el-form-item label="结束时间">
<el-date-picker v-model="listQuery.params.time2" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.endTime" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
<!-- <el-select v-model="listQuery.params.time2" 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>
<el-form-item label="联系人">
<el-input v-model="listQuery.params.contactName" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-form-item> -->
</el-form> </el-form>
<div class="btn"> <div class="btn">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
@ -56,30 +41,9 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <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 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 prop="jc" label="设备编码" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bianma }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="设备类型" width="110" align="center">
<template slot-scope="scope">
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
</template>
</el-table-column> -->
<el-table-column label="报警时间" align="center"> <el-table-column label="报警时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.policeTime }}</span> <span>{{ scope.row.createTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备名称" width="" header-align="center" align="center"> <el-table-column label="设备名称" width="" header-align="center" align="center">
@ -89,29 +53,9 @@
</el-table-column> </el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center"> <el-table-column label="设备位置" width="" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.weizhi }}</span> <span>{{ scope.row.position }}</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> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产厂家" align="center">
<template slot-scope="scope">
<span>{{ scope.row.owner }}</span>
</template>
</el-table-column> -->
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span> <span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
@ -126,69 +70,27 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<baojingchaxunInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/> -->
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' import { getCallPolicePage } from '@/api/callPolice/callPolice'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
export default { export default {
name: 'baojingchaxunList', name: 'baojingchaxunList',
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar, ButtonBar,
// baojingchaxunAdd,
// baojingchaxunInfo,
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
btnList: [ 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', type: 'info',
size: 'small', size: 'small',
@ -217,14 +119,6 @@
], ],
listLoading: false, listLoading: false,
listQuery: { listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1, current: 1,
size: 5, size: 5,
total: 10 total: 10
@ -244,7 +138,7 @@
}, },
created() { created() {
// //
// this.init() this.init()
}, },
methods: { methods: {
getSupplierType(item) { getSupplierType(item) {
@ -291,15 +185,16 @@
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
// init() { init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { getCallPolicePage(this.listQuery).then((res) => {
// if (res.success) { if (res.code == 200) {
// this.listQuery.params.createOrgSid = res.data // this.list = res.data.records
// this.getType() this.total = res.total
// this.getList() } else {
// } // this.list = []
// }) }
// }, })
},
// getType() { // getType() {
// typeValues({ // typeValues({
// type: 'supplierType' // type: 'supplierType'
@ -449,8 +344,7 @@
this.$router.go(-1) this.$router.go(-1)
} }
} }
} }
</script> </script>
<style scoped> <style scoped></style>
</style>

140
src/views/shebeirizhi/shebeirizhiList.vue

@ -8,29 +8,26 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="时间"> <el-form-item label="时间">
<el-date-picker v-model="listQuery.params.supplierType" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.startTime" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="设备名称"> <el-form-item label="设备名称">
<el-select v-model="listQuery.params.supplierType1" filterable clearable placeholder="请选择设备名称"> <el-select v-model="listQuery.name" filterable clearable placeholder="请选择设备名称">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" /> <el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="地点名称"> <el-form-item label="地点名称">
<el-input v-model="listQuery.params.ress" clearable placeholder="" class="addinputw" placeholder="请填写地点名称"></el-input> <el-input v-model="listQuery.position" clearable placeholder="" class="addinputw"
</el-form-item> placeholder="请填写地点名称"></el-input>
<el-form-item label="名称">
<el-input v-model="listQuery.params.name" clearable placeholder="" class="addinputw" placeholder="请填写名称"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="名称">
<el-input v-model="listQuery.params.name" clearable placeholder="" class="addinputw"
placeholder="请填写名称"></el-input>
</el-form-item> -->
<el-form-item label="卡号"> <el-form-item label="卡号">
<el-input v-model="listQuery.params.code" clearable placeholder="" class="addinputw" placeholder="请填写卡号"></el-input> <el-input v-model="listQuery.code" clearable placeholder="" class="addinputw"
</el-form-item> placeholder="请填写卡号"></el-input>
<!-- <el-form-item label="厂商办公电话">
<el-input v-model="listQuery.params.manufacturerTelePhone" maxlength="130" placeholder="" class="addinputw" clearable/>
</el-form-item> </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> </el-form>
<div class="btn"> <div class="btn">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
@ -49,17 +46,6 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <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 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 prop="jc" label="时间" header-align="center" align="center"> <el-table-column prop="jc" label="时间" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.time }}</span> <span>{{ scope.row.time }}</span>
@ -67,7 +53,7 @@
</el-table-column> </el-table-column>
<el-table-column label="设备名称" width="" header-align="center" align="center"> <el-table-column label="设备名称" width="" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.deviceName }}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="地点名称" align="center"> <el-table-column label="地点名称" align="center">
@ -75,11 +61,11 @@
<span>{{ scope.row.position }}</span> <span>{{ scope.row.position }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="名称" align="center"> <!-- <el-table-column label="名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.name }}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="卡号" align="center"> <el-table-column label="卡号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.code }}</span> <span>{{ scope.row.code }}</span>
@ -94,69 +80,27 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<baojingchaxunInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/> -->
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' import { getDeviceLogPage } from '@/api/deviceLog/deviceLog'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
export default { export default {
name: 'baojingchaxunList', name: 'baojingchaxunList',
components: { components: {
Pagination, Pagination,
pageye, pageye,
ButtonBar, ButtonBar,
// baojingchaxunAdd,
// baojingchaxunInfo,
}, },
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
btnList: [ 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', type: 'info',
size: 'small', size: 'small',
@ -184,14 +128,6 @@
], ],
listLoading: false, listLoading: false,
listQuery: { listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1, current: 1,
size: 5, size: 5,
total: 0 total: 0
@ -208,11 +144,11 @@
} }
}, },
mounted() { mounted() {
this.$refs['btnbar'].setButtonList(this.btnList) // this.$refs['btnbar'].setButtonList(this.btnList)
}, },
created() { created() {
// //
// this.init() this.init()
}, },
methods: { methods: {
getPosition(item) { getPosition(item) {
@ -259,25 +195,16 @@
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
// init() { init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { getDeviceLogPage(this.listQuery).then((res) => {
// if (res.success) { if (res.code == 200) {
// this.listQuery.params.createOrgSid = res.data this.list = res.data.records
// this.getType() this.total = res.total
// this.getList() } else {
// } this.list = []
// }) }
// }, })
// getType() { },
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
// //
indexMethod(index) { indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size var pagestart = (this.listQuery.current - 1) * this.listQuery.size
@ -417,8 +344,7 @@
this.$router.go(-1) this.$router.go(-1)
} }
} }
} }
</script> </script>
<style scoped> <style scoped></style>
</style>

18
src/views/shebeitaizhang/shebeitaizhangAdd.vue

@ -64,6 +64,15 @@
<el-input v-model="addForm.name" maxlength="20" placeholder="请填写设备名称" class="addinputw" clearable /> <el-input v-model="addForm.name" maxlength="20" placeholder="请填写设备名称" class="addinputw" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>设备序列号</span>
</el-col>
<el-col :span="8">
<el-form-item prop="deviceSerial">
<el-input v-model="addForm.deviceSerial" maxlength="20" placeholder="请填写设备序列号" class="addinputw"
clearable />
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -72,7 +81,7 @@
</template> </template>
<script> <script>
import { createDevice, updateDevice } from '@/api/device/device' import { createDevice, updateDevice, createDeviceGroup } from '@/api/device/device'
export default { export default {
name: 'shebeitaizhangAdd', name: 'shebeitaizhangAdd',
@ -127,7 +136,12 @@ export default {
required: true, required: true,
message: '请选择设备类型', message: '请选择设备类型',
trigger: 'change' trigger: 'change'
}] }],
deviceSerial: [{
required: true,
message: '请选择序列号',
trigger: 'blur'
}],
}, },
submitdisabled: false submitdisabled: false
} }

4
src/views/shebeitaizhang/shebeitaizhangList.vue

@ -133,7 +133,7 @@ import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' // import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import shebeitaizhangAdd from './shebeitaizhangAdd' import shebeitaizhangAdd from './shebeitaizhangAdd'
import shebeitaizhangInfo from './shebeitaizhangInfo' import shebeitaizhangInfo from './shebeitaizhangInfo'
import { getDevicePage, getInfoById } from '@/api/device/device' import { getDevicePage, getInfoById,removeDevice } from '@/api/device/device'
// import req from '@/api/shebeitaizhang/shebeitaizhang' // import req from '@/api/shebeitaizhang/shebeitaizhang'
import * as echarts from "echarts"; import * as echarts from "echarts";
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb' import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb'
@ -426,7 +426,7 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.delBySids(this.sids.toString()).then(resp => { removeDevice(this.sids.toString()).then(resp => {
if (resp.success) { if (resp.success) {
loading.close() loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true }) this.$message({ type: 'success', message: resp.msg, showClose: true })

239
src/views/zhiwujiance/zhiwujianceList.vue

@ -1,42 +1,26 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="app-containerb" v-show="viewState == 1"> <div class="app-containerb" v-show="viewState == 1">
<div class="webye" > <div class="webye">
<button-bar view-title="质物监测" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" /> <button-bar view-title="质物监测" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content"> <div class="main-content">
<div class="searchcon"> <div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> <el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<!-- <el-form-item label="设备类型">
<el-select v-model="listQuery.params.supplierType" 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-select v-model="listQuery.params.supplierType1" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in floor_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select>
</el-form-item> -->
<el-form-item label="物品名称"> <el-form-item label="物品名称">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" class="addinputw"></el-input> <el-input v-model="listQuery.manufacturerName" clearable placeholder="" class="addinputw"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="选择楼层"> <el-form-item label="选择楼层">
<el-select v-model="listQuery.params.supplierType1" filterable clearable placeholder="请选择楼层"> <el-select v-model="listQuery.supplierType1" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in floor_list" :key="item.id" :label="item.title" :value="item.id" /> <el-option v-for="item in floor_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选择仓库"> <el-form-item label="选择仓库">
<el-select v-model="listQuery.params.supplierType2" filterable clearable placeholder="请选择仓库"> <el-select v-model="listQuery.supplierType2" filterable clearable placeholder="请选择仓库">
<el-option v-for="item in cangku_list" :key="item.id" :label="item.title" :value="item.id" /> <el-option v-for="item in cangku_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </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> </el-form>
<div class="btn"> <div class="btn">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
@ -58,11 +42,11 @@
<el-table-column prop="jc" width="320" label="质物信息" header-align="center" align="center"> <el-table-column prop="jc" width="320" label="质物信息" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="newsname" v-for="(item, index) in Datalistb" :key="index"> <div class="newsname" v-for="(item, index) in Datalistb" :key="index">
<div class="tit">仓库名称{{item.name}}</div> <div class="tit">仓库名称{{ item.name }}</div>
<div class="time">仓库位置{{item.weizhi}}</div> <div class="time">仓库位置{{ item.weizhi }}</div>
<div class="time">货架号{{item.huohao}}</div> <div class="time">货架号{{ item.huohao }}</div>
<div class="time">联系人{{item.ren}}</div> <div class="time">联系人{{ item.ren }}</div>
<div class="time">联系电话{{item.dianhua}}</div> <div class="time">联系电话{{ item.dianhua }}</div>
</div> </div>
</template> </template>
@ -70,17 +54,14 @@
<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"> <template slot-scope="scope">
<div v-for="(item, index) in Datalista" :key="index"> <div v-for="(item, index) in Datalista" :key="index">
<div class="newslilefts" > <div class="newslilefts">
<!-- <span class="tits">图库照</span> --> <!-- <span class="tits">图库照</span> -->
<div class="newsli"> <div class="newsli">
<div class="tu"><img :src="item.tuUrl" alt="" /></div> <div class="tu"><img :src="item.tuUrl" alt="" /></div>
<div class="rightwen"> <div class="rightwen">
<!-- <div class="tit">位置{{item.cangku}}</div> --> <!-- <div class="tit">位置{{item.cangku}}</div> -->
<div class="time">拍照日期{{item.createTime}}</div> <div class="time">拍照日期{{ item.createTime }}</div>
<div class="time">拍照时间{{item.createTime2}}</div> <div class="time">拍照时间{{ item.createTime2 }}</div>
<!-- <div class="time">生产厂家{{item.changjia}}</div>
<div class="time">数量{{item.shuliang}}</div> -->
<!-- <div class="time">重量{{item.zhongliang}}千克</div> -->
</div> </div>
</div> </div>
<div class="yuans"> <div class="yuans">
@ -91,8 +72,8 @@
<div class="tu"><img :src="item.tuUrlb" alt="" /></div> <div class="tu"><img :src="item.tuUrlb" alt="" /></div>
<div class="rightwen"> <div class="rightwen">
<!-- <div class="tit">位置{{item.cangku}}</div> --> <!-- <div class="tit">位置{{item.cangku}}</div> -->
<div class="time">拍照日期{{item.createTime}}</div> <div class="time">拍照日期{{ item.createTime }}</div>
<div class="time">拍照时间{{item.createTime2}}</div> <div class="time">拍照时间{{ item.createTime2 }}</div>
</div> </div>
</div> </div>
@ -135,23 +116,25 @@
<zhiwujianceAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter" /> <zhiwujianceAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter" />
<!-- <zhiwujianceAddShebei v-show="viewState == 5" ref="divaddshebei" @doback="resetState" @reloadlist="handleFilter" /> --> <!-- <zhiwujianceAddShebei v-show="viewState == 5" ref="divaddshebei" @doback="resetState" @reloadlist="handleFilter" /> -->
<zhiwujianceInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" /> <zhiwujianceInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" />
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' // import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import zhiwujianceAdd from './zhiwujianceAdd' import zhiwujianceAdd from './zhiwujianceAdd'
// import zhiwujianceAddShebei from '@/views/zhiwujiance/shebei/shebeiList' // import zhiwujianceAddShebei from '@/views/zhiwujiance/shebei/shebeiList'
import zhiwujianceInfo from './zhiwujianceInfo' import zhiwujianceInfo from './zhiwujianceInfo'
// import req from '@/api/zhiwujiance/zhiwujiance' // import req from '@/api/zhiwujiance/zhiwujiance'
import * as echarts from "echarts"; import * as echarts from "echarts";
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb' import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb'
// 1.1 import { getDeviceImagePage } from '@/api/deviceImage/deviceImage'
const wanhao_Chart = {
// 1.1
const wanhao_Chart = {
// seriesName: '', // seriesName: '',
unit: '次', unit: '次',
color: ['#30e9ff', '#d9d9d9', '#fdc004'], color: ['#30e9ff', '#d9d9d9', '#fdc004'],
@ -171,8 +154,8 @@
// radius: ['50%', '55%'] // radius: ['50%', '55%']
} }
// 1.2 // 1.2
const weixiu_Chart = { const weixiu_Chart = {
// seriesName: '', // seriesName: '',
unit: '次', unit: '次',
color: ['#fe7f02', '#fdc004'], color: ['#fe7f02', '#fdc004'],
@ -192,11 +175,11 @@
// radius: ['50%', '55%'] // radius: ['50%', '55%']
} }
// 1.3 // 1.3
const sunhai_Chart = { const sunhai_Chart = {
// seriesName: '', // seriesName: '',
unit: '次', unit: '次',
color: [ '#d2cece','#ff0202', '#fdc004'], color: ['#d2cece', '#ff0202', '#fdc004'],
Data: { Data: {
seriesData: [ seriesData: [
{ value: 10, name: '损害' }, { value: 10, name: '损害' },
@ -213,7 +196,7 @@
// radius: ['50%', '55%'] // radius: ['50%', '55%']
} }
export default { export default {
name: 'zhiwujianceList', name: 'zhiwujianceList',
components: { components: {
Pagination, Pagination,
@ -221,12 +204,12 @@
ButtonBar, ButtonBar,
zhiwujianceAdd, zhiwujianceAdd,
// zhiwujianceAddShebei, // zhiwujianceAddShebei,
zhiwujianceInfo,PieChartrenyuan zhiwujianceInfo, PieChartrenyuan
}, },
data() { data() {
return { return {
wanhao_Chart: wanhao_Chart, // 1.1 wanhao_Chart: wanhao_Chart, // 1.1
weixiu_Chart:weixiu_Chart, weixiu_Chart: weixiu_Chart,
sunhai_Chart: sunhai_Chart, sunhai_Chart: sunhai_Chart,
btndisabled: false, btndisabled: false,
btnList: [ btnList: [
@ -287,14 +270,22 @@
// ----------- // -----------
tableKey: 0, tableKey: 0,
list: [ list: [
{cangku:'仓库1003F3',name: '康师傅矿泉水',tuUrl:'./image/tu1.jpg', createTime: '2023-05-03',createTime2: '18:26:38', changjia: '康师傅',shuliang:'1000',zhongliang:'500', {
nameb: '康师傅矿泉水2',tuUrlb:'./image/tu2.jpg', createTimeb: '2023-05-03',createTime2: '18:26:38',changjiab: '康师傅',shuliangb:'1000',zhongliangb:'500'}, cangku: '仓库1003F3', name: '康师傅矿泉水', tuUrl: './image/tu1.jpg', createTime: '2023-05-03', createTime2: '18:26:38', changjia: '康师傅', shuliang: '1000', zhongliang: '500',
{cangku:'仓库1003F3',name: '康师傅矿泉水',tuUrl:'./image/tu1.jpg', createTime: '2023-05-03',createTime2: '18:26:38', changjia: '康师傅',shuliang:'1000',zhongliang:'500', nameb: '康师傅矿泉水2', tuUrlb: './image/tu2.jpg', createTimeb: '2023-05-03', createTime2: '18:26:38', changjiab: '康师傅', shuliangb: '1000', zhongliangb: '500'
nameb: '康师傅矿泉水2',tuUrlb:'./image/tu2.jpg', createTimeb: '2023-05-03',createTime2: '18:26:38',changjiab: '康师傅',shuliangb:'1000',zhongliangb:'500'}, },
{cangku:'仓库1003F3',name: '康师傅矿泉水',tuUrl:'./image/tu1.jpg', createTime: '2023-05-03',createTime2: '18:26:38', changjia: '康师傅',shuliang:'1000',zhongliang:'500', {
nameb: '康师傅矿泉水2',tuUrlb:'./image/tu2.jpg', createTimeb: '2023-05-03',createTime2: '18:26:38',changjiab: '康师傅',shuliangb:'1000',zhongliangb:'500'}, cangku: '仓库1003F3', name: '康师傅矿泉水', tuUrl: './image/tu1.jpg', createTime: '2023-05-03', createTime2: '18:26:38', changjia: '康师傅', shuliang: '1000', zhongliang: '500',
{cangku:'仓库1003F3',name: '康师傅矿泉水',tuUrl:'./image/tu1.jpg', createTime: '2023-05-03',createTime2: '18:26:38', changjia: '康师傅',shuliang:'1000',zhongliang:'500', nameb: '康师傅矿泉水2', tuUrlb: './image/tu2.jpg', createTimeb: '2023-05-03', createTime2: '18:26:38', changjiab: '康师傅', shuliangb: '1000', zhongliangb: '500'
nameb: '康师傅矿泉水2',tuUrlb:'./image/tu2.jpg', createTimeb: '2023-05-03',createTime2: '18:26:38',changjiab: '康师傅',shuliangb:'1000',zhongliangb:'500'}, },
{
cangku: '仓库1003F3', name: '康师傅矿泉水', tuUrl: './image/tu1.jpg', createTime: '2023-05-03', createTime2: '18:26:38', changjia: '康师傅', shuliang: '1000', zhongliang: '500',
nameb: '康师傅矿泉水2', tuUrlb: './image/tu2.jpg', createTimeb: '2023-05-03', createTime2: '18:26:38', changjiab: '康师傅', shuliangb: '1000', zhongliangb: '500'
},
{
cangku: '仓库1003F3', name: '康师傅矿泉水', tuUrl: './image/tu1.jpg', createTime: '2023-05-03', createTime2: '18:26:38', changjia: '康师傅', shuliang: '1000', zhongliang: '500',
nameb: '康师傅矿泉水2', tuUrlb: './image/tu2.jpg', createTimeb: '2023-05-03', createTime2: '18:26:38', changjiab: '康师傅', shuliangb: '1000', zhongliangb: '500'
},
// { weizhi: '', quyu: '', mianji: '2000', // { weizhi: '', quyu: '', mianji: '2000',
// cenggao: '23', jiage: '263', xingzhi: '', // cenggao: '23', jiage: '263', xingzhi: '',
// fangyuan: '', lianxiren: '', dianhua: '17073404927' ,leibie: '',beizhu:'2'}, // fangyuan: '', lianxiren: '', dianhua: '17073404927' ,leibie: '',beizhu:'2'},
@ -313,24 +304,18 @@
], ],
Datalista: [ Datalista: [
{cangku:'仓库1003F3',name: '康师傅矿泉水',tuUrl:'./image/tu1.jpg', createTime: '2023-05-03',createTime2: '18:26:38', changjia: '康师傅',shuliang:'1000',zhongliang:'500', {
nameb: '康师傅矿泉水2',tuUrlb:'./image/tu2.jpg', createTimeb: '2023-05-03',createTime2: '18:26:38',changjiab: '康师傅',shuliangb:'1000',zhongliangb:'500'}, cangku: '仓库1003F3', name: '康师傅矿泉水', tuUrl: './image/tu1.jpg', createTime: '2023-05-03', createTime2: '18:26:38', changjia: '康师傅', shuliang: '1000', zhongliang: '500',
nameb: '康师傅矿泉水2', tuUrlb: './image/tu2.jpg', createTimeb: '2023-05-03', createTime2: '18:26:38', changjiab: '康师傅', shuliangb: '1000', zhongliangb: '500'
},
], ],
Datalistb: [ Datalistb: [
{name:'仓库1',cangku:'仓库1003F3',weizhi: '石家庄市长安区和平西路126号', huohao: 'F31006C102325',ren:'李舜华',dianhua:'13933263572'}, { name: '仓库1', cangku: '仓库1003F3', weizhi: '石家庄市长安区和平西路126号', huohao: 'F31006C102325', ren: '李舜华', dianhua: '13933263572' },
], ],
listLoading: false, listLoading: false,
listQuery: { listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1, current: 1,
size: 5, size: 5,
total: 0 total: 0
@ -375,7 +360,7 @@
}, },
created() { created() {
// //
// this.init() this.init()
}, },
methods: { methods: {
toShipin() { toShipin() {
@ -441,15 +426,10 @@
this.searchxianshitit = '显示查询条件' this.searchxianshitit = '显示查询条件'
} }
}, },
// init() { init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { getDeviceImagePage(this.listQuery).then((res) => {
// if (res.success) { })
// this.listQuery.params.createOrgSid = res.data },
// this.getType()
// this.getList()
// }
// })
// },
// getType() { // getType() {
// typeValues({ // typeValues({
// type: 'supplierType' // type: 'supplierType'
@ -503,7 +483,7 @@
// //
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid) this.$refs['divadd'].showAdd(this.listQuery.createOrgSid)
}, },
// //
handleDddShebei() { handleDddShebei() {
@ -573,7 +553,7 @@
// this.viewState = 3 // this.viewState = 3
// this.$refs['divadd'].showEdit(row) // this.$refs['divadd'].showEdit(row)
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid) this.$refs['divadd'].showAdd(this.listQuery.createOrgSid)
// if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') { // if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') {
// this.viewState = 3 // this.viewState = 3
// this.$refs['divadd'].showEdit(row) // this.$refs['divadd'].showEdit(row)
@ -608,29 +588,62 @@
this.$router.go(-1) this.$router.go(-1)
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.app-containerb{ .app-containerb {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: flex-start;align-items: flex-start; justify-content: flex-start;
align-items: flex-start;
}
.webye {
flex: 1;
text-align: left;
} }
.webye{flex: 1;text-align: left;}
/* ///// */ /* ///// */
.newslilefts{ display: flex; .newslilefts {
display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: flex-start;align-items: center;} justify-content: flex-start;
/* .news .contents .newslis .tits{padding: 0;width: 20px;color: #8e8e8e;} */ align-items: center;
}
/* .news .contents .newslis .tits{padding: 0;width: 20px;color: #8e8e8e;} */
/* /*
.news .contents .newslis .rentu{padding: 0;width: 80px;height: 80px;border-radius: 5px;border: 1px solid #ff2424;margin: 0 20px;} */ .news .contents .newslis .rentu{padding: 0;width: 80px;height: 80px;border-radius: 5px;border: 1px solid #ff2424;margin: 0 20px;} */
.newslilefts .yuans{padding: 0;margin: 0 20px;width: 80px;height: 80px !important;border-radius: 80px;border: 1px solid #ff2424;text-align: center;display:inline-block;} .newslilefts .yuans {
.newslilefts .yuans p{padding: 23px 0 10px 0;color: #ff2424;font-size: 26px;margin: 0;} padding: 0;
.newslilefts .yuans span{padding: 0;margin: 0;color: #8e8e8e;font-size: 14px;display: block;} margin: 0 20px;
width: 80px;
height: 80px !important;
border-radius: 80px;
border: 1px solid #ff2424;
text-align: center;
display: inline-block;
}
.newslilefts .yuans p {
padding: 23px 0 10px 0;
color: #ff2424;
font-size: 26px;
margin: 0;
}
.newslilefts .yuans span {
padding: 0;
margin: 0;
color: #8e8e8e;
font-size: 14px;
display: block;
}
/* .news .contents .newslis .rightzi{padding: 0 10px;color: #8e8e8e;text-align: left;} /* .news .contents .newslis .rightzi{padding: 0 10px;color: #8e8e8e;text-align: left;}
.news .contents .newslis .rightzi p{padding: 1px 0;color: #8e8e8e;font-size: 12px;margin: 0;} */ .news .contents .newslis .rightzi p{padding: 1px 0;color: #8e8e8e;font-size: 12px;margin: 0;} */
.newslilefts .newsli { .newslilefts .newsli {
@ -642,24 +655,37 @@
padding: 5px 10px; padding: 5px 10px;
/* border-bottom: 1px solid #ececee; */ /* border-bottom: 1px solid #ececee; */
} }
.newslilefts .newsli .tu { .newslilefts .newsli .tu {
padding: 0px 0 0 0; padding: 0px 0 0 0;
width: 120px;height: 120px;border-radius: 5px;border: 1px solid #ff2424; width: 120px;
height: 120px;
border-radius: 5px;
border: 1px solid #ff2424;
} }
.newslilefts .newsli .tu img { .newslilefts .newsli .tu img {
width: 100%;height: 100%;border-radius: 5px;border: 1px solid #ff2424; width: 100%;
height: 100%;
border-radius: 5px;
border: 1px solid #ff2424;
} }
.newslilefts .newsli .rightwen { .newslilefts .newsli .rightwen {
padding: 20px 0 0 20px;text-align: left; padding: 20px 0 0 20px;
text-align: left;
flex: 3; flex: 3;
} }
.newslilefts .newsli .rightwen .tit { .newslilefts .newsli .rightwen .tit {
padding: 7px 0; padding: 7px 0;
font-size: 14px;font-weight: bold; font-size: 14px;
font-weight: bold;
/* height: 25px; /* height: 25px;
overflow: hidden; overflow: hidden;
line-height: 25px; */ line-height: 25px; */
} }
.newslilefts .newsli .rightwen .time { .newslilefts .newsli .rightwen .time {
padding: 12px 0; padding: 12px 0;
/* color: #848383; */ /* color: #848383; */
@ -667,7 +693,9 @@
/* height: 25px; /* height: 25px;
line-height: 25px; */ line-height: 25px; */
} }
.news .contents .newslis .caozuos {width: 180px;
.news .contents .newslis .caozuos {
width: 180px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -676,6 +704,7 @@
padding: 5px 10px; padding: 5px 10px;
text-align: right; text-align: right;
} }
/* //// */ /* //// */
.newsname { .newsname {
/* display: flex; /* display: flex;
@ -683,16 +712,20 @@
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: space-between; */ justify-content: space-between; */
margin: 0px 0px; margin: 0px 0px;
padding: 5px 10px;text-align: left; padding: 5px 10px;
text-align: left;
/* border-bottom: 1px solid #ececee; */ /* border-bottom: 1px solid #ececee; */
} }
.newsname .tit { .newsname .tit {
padding: 5px 0; padding: 5px 0;
font-size: 14px;font-weight: bold; font-size: 14px;
font-weight: bold;
/* height: 25px; /* height: 25px;
overflow: hidden; overflow: hidden;
line-height: 25px; */ line-height: 25px; */
} }
.newsname .time { .newsname .time {
padding: 5px 0; padding: 5px 0;
/* color: #848383; */ /* color: #848383; */

Loading…
Cancel
Save