Browse Source

定时任务可修改

视频可回放
摄像头绑定在nvr下
nvr绑定在仓库下
master
yangzongjia 2 years ago
parent
commit
76ffd17b99
  1. 4
      .env.development
  2. 4
      src/api/device/device.js
  3. 24
      src/api/deviceImage/deviceImage.js
  4. 33
      src/views/monitor/videos/index.vue
  5. 94
      src/views/shebeitaizhang/shebeitaizhangAdd.vue
  6. 83
      src/views/shebeitaizhang/shebeitaizhangInfo.vue
  7. 28
      src/views/shebeitaizhang/shebeitaizhangList.vue
  8. 444
      src/views/zhiwujiance/zhiwujianceAdd.vue
  9. 9
      src/views/zhiwujiance/zhiwujianceInfo.vue
  10. 81
      src/views/zhiwujiance/zhiwujianceList.vue

4
.env.development

@ -5,5 +5,5 @@ ENV = 'development'
VUE_APP_BASE_API = '/api' VUE_APP_BASE_API = '/api'
## 配置测试和本地开发时的 接口地址 ## 配置测试和本地开发时的 接口地址
VUE_APP_URL = "http://huirong.ybkjyl.com/api" # VUE_APP_URL = "http://huirong.ybkjyl.com/api"
# VUE_APP_URL = "http://127.0.0.1:7103" VUE_APP_URL = "http://127.0.0.1:7103"

4
src/api/device/device.js

@ -38,8 +38,8 @@ export function getInfoById(data) {
} }
// 获取摄像头列表 // 获取摄像头列表
export function getSxtList() { export function getOtherList(data) {
return request({ url: '/device/getSxtList', method: 'GET' }) return request({ url: '/device/getOtherList', method: 'GET',params:data })
} }
/******************************************************************************************************************************************** */ /******************************************************************************************************************************************** */

24
src/api/deviceImage/deviceImage.js

@ -14,9 +14,27 @@ export function getDeviceImageById(data) {
} }
// 获取视频 // 获取正常视频链接
export function getShiPinByChannelNo(data) { export function getVedioPcLiveById(data) {
return request({ url: '/deviceImage/getShiPinByChannelNo', method: 'GET', params: data }) return request({ url: '/deviceImage/getVedioPcLiveById', method: 'GET', params: data })
} }
// 获取回放视频链接
export function getVedioPcRecById(data) {
return request({ url: '/deviceImage/getVedioPcRecById', method: 'GET', params: data })
}
// 质物检测获取正常视频链接
export function getShiPinNormalByChannelNo(data) {
return request({ url: '/deviceImage/getShiPinNormalByChannelNo', method: 'GET', params: data })
}
// 手动调整定时
export function updateCron(data) {
return request({ url: '/updateCron', method: 'GET', params: data })
}

33
src/views/monitor/videos/index.vue

@ -69,8 +69,8 @@
<div class="myiconfont jingicon bluezibg" v-if="showShipinjiankong_zhengchang" @mouseover="enter" <div class="myiconfont jingicon bluezibg" v-if="showShipinjiankong_zhengchang" @mouseover="enter"
@mouseleave="leave" @click.stop="openshipinShipinjiankong(index)">&#xe644;</div> @mouseleave="leave" @click.stop="openshipinShipinjiankong(index)">&#xe644;</div>
<div class="seencons shipin_out noneDiv2" v-if="active == index"> <div class="seencons shipin_out noneDiv2" v-if="active == index">
<p @click="getShiPin(item.channelNo)">实时视频</p> <p @click="getVedioPcLive(item.id)">实时视频</p>
<p @click="toMore()">回放视频</p> <p @click="getVedioPcRec(item.id)">回放视频</p>
</div> </div>
<div class="seenconsc shipin_out noneDiv"> <div class="seenconsc shipin_out noneDiv">
<p>设备名称{{ item.name }}</p> <p>设备名称{{ item.name }}</p>
@ -223,6 +223,13 @@
</iframe> </iframe>
</el-dialog> </el-dialog>
<!-- 查看回放监控 -->
<el-dialog title="查看视频" :visible.sync="dialogImageJKRec" width="800px" :before-close="handleCloseJKRec"
style="z-index:999">
<iframe :src="this.spRecUrl" width="750" height="400" id="ysOpenDevice" allowfullscreen>
</iframe>
</el-dialog>
<!-- 查看视频 --> <!-- 查看视频 -->
<el-dialog title="查看视频" :visible.sync="dialogImage" width="800px" :before-close="handleClose"> <el-dialog title="查看视频" :visible.sync="dialogImage" width="800px" :before-close="handleClose">
<div class="shipin"> <div class="shipin">
@ -241,8 +248,8 @@
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 { getSxtList } from '@/api/device/device' import { getOtherList } from '@/api/device/device'
import { getShiPinByChannelNo } from '@/api/deviceImage/deviceImage' import { getVedioPcRecById, getVedioPcLiveById } from '@/api/deviceImage/deviceImage'
// import baojingchaxunAdd from './baojingchaxunAdd' // import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo' // import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun' // import req from '@/api/baojingchaxun/baojingchaxun'
@ -321,12 +328,14 @@ export default {
], ],
dialogImage: false, dialogImage: false,
dialogImageJK: false, dialogImageJK: false,
dialogImageJKRec: false,
// //
videoSrc: '../../../image/cangkushipin.mp4', videoSrc: '../../../image/cangkushipin.mp4',
playStatus: '', playStatus: '',
muteStatus: '', muteStatus: '',
spUrl: '', spUrl: '',
spRecUrl: '',
active: -1, active: -1,
isMute: true, isMute: true,
isPlay: false, isPlay: false,
@ -411,6 +420,9 @@ export default {
handleCloseJK() { handleCloseJK() {
this.dialogImageJK = false this.dialogImageJK = false
}, },
handleCloseJKRec() {
this.dialogImageJKRec = false
},
handleVideo() { handleVideo() {
this.$refs.videoDiolag.dialogImage = true this.$refs.videoDiolag.dialogImage = true
}, },
@ -592,8 +604,7 @@ export default {
} }
}, },
init() { init() {
getSxtList().then((res) => { getOtherList({ type: 1 }).then((res) => {
console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.zc_list = res.data this.zc_list = res.data
} }
@ -737,12 +748,18 @@ export default {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1) this.$router.go(-1)
}, },
getShiPin(channelNo) { getVedioPcLive(id) {
getShiPinByChannelNo({ channelNo: channelNo }).then(res => { getVedioPcLiveById({ id: id }).then(res => {
this.spUrl = res.data this.spUrl = res.data
this.dialogImageJK = true this.dialogImageJK = true
}) })
}, },
getVedioPcRec(id) {
getVedioPcRecById({ id: id }).then(res => {
this.spRecUrl = res.data
this.dialogImageJKRec = true
})
},
toMore() { toMore() {
this.active = -1 this.active = -1
this.dialogImage = true this.dialogImage = true

94
src/views/shebeitaizhang/shebeitaizhangAdd.vue

@ -46,8 +46,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="type"> <el-form-item prop="type">
<el-select v-model="addForm.type" filterable clearable placeholder="请选择设备类型" style="width: 410px;"> <el-select v-model="addForm.type" filterable clearable placeholder="请选择设备类型" style="width: 410px;"
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" @change="changeType">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.name" :value="item.id"
class="addinputw" /> class="addinputw" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -71,17 +72,30 @@
clearable /> clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb" v-if="sxtFlag">
<span>上偏移</span> <span>上偏移</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8" v-if="sxtFlag">
<el-form-item prop="topPosition"> <el-form-item prop="topPosition">
<el-input v-model="addForm.topPosition" maxlength="20" placeholder="请填写上偏移" class="addinputw" <el-input v-model="addForm.topPosition" maxlength="20" placeholder="请填写上偏移" class="addinputw" clearable />
clearable /> </el-form-item>
</el-col>
<el-col :span="4" class="tleftb" v-if="ckFlag">
<span>仓库</span>
</el-col>
<el-col :span="8" v-if="ckFlag">
<el-form-item prop="ckId">
<el-select v-model="addForm.ckId" filterable clearable placeholder="请选择仓库" style="width: 410px;">
<el-option v-for="item in ckList" :key="item.id" :label="item.name" :value="item.id"
class="addinputw" />
</el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item prop="topPosition">
<el-input v-model="addForm.topPosition" maxlength="20" placeholder="请填写仓库" class="addinputw" clearable />
</el-form-item> -->
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row v-if="sxtFlag">
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>左偏移</span> <span>左偏移</span>
</el-col> </el-col>
@ -101,6 +115,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="sxtFlag">
<el-col :span="4" class="tleftb">
<span>请选择所属Nvr</span>
</el-col>
<el-col :span="8">
<el-form-item prop="nvrId">
<el-select v-model="addForm.nvrId" filterable clearable placeholder="请选择所属Nvr" style="width: 410px;">
<el-option v-for="item in nvrList" :key="item.id" :label="item.name" :value="item.id"
class="addinputw" />
</el-select>
</el-form-item>
<!-- <el-form-item prop="nvrSerial">
<el-input v-model="addForm.nvrSerial" maxlength="20" placeholder="请填写所属nvr序列号" class="addinputw"
clearable />
</el-form-item> -->
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -108,7 +139,7 @@
</template> </template>
<script> <script>
import { createDevice, updateDevice, createDeviceGroup } from '@/api/device/device' import { createDevice, updateDevice, getOtherList } from '@/api/device/device'
export default { export default {
name: 'shebeitaizhangAdd', name: 'shebeitaizhangAdd',
@ -135,16 +166,19 @@ export default {
return { return {
tableKey: 0, tableKey: 0,
index: 0, index: 0,
sxtFlag: false,
ckFlag: false,
viewState: 1, viewState: 1,
viewTitle: '', viewTitle: '',
dialogStatus: '', dialogStatus: '',
sid: '', sid: '',
isShow: true, isShow: true,
supplierType_list: [ supplierType_list: [
{ title: '摄像头', id: '1' }, { name: '摄像头', id: '1' },
{ title: '电子围栏', id: '2' }, { name: '电子围栏', id: '2' },
{ title: '门禁', id: '3' }, { name: '门禁', id: '3' },
{ title: '机器人', id: '4' } { name: '机器人', id: '4' },
{ name: '网络录像机', id: '5' }
], ],
addForm: {}, addForm: {},
baseManufacturerBankDto: [], baseManufacturerBankDto: [],
@ -170,10 +204,31 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
}, },
submitdisabled: false submitdisabled: false,
nvrList: [],
ckList: [
{ name: '仓库1', id: '1' },
{ name: '仓库2', id: '2' },
]
} }
}, },
methods: { methods: {
changeType(item) {
this.sxtFlag = false
this.ckFlag = false
if (item == '1') {
this.sxtFlag = true
} else if (item == '5') {
this.ckFlag = true
}
getOtherList({ type: 5 }).then(res => {
if (res.code == 200) {
this.nvrList = res.data
}
})
},
init() { init() {
typeValues({ type: 'supplierType' }).then((res) => { typeValues({ type: 'supplierType' }).then((res) => {
if (res.success) { if (res.success) {
@ -194,12 +249,25 @@ export default {
this.addForm.supplierType = bb.key this.addForm.supplierType = bb.key
}, },
showAdd(typeSubmit) { showAdd(typeSubmit) {
this.sxtFlag = false
this.dialogStatus = typeSubmit this.dialogStatus = typeSubmit
}, },
showEdit(param) { showEdit(param) {
getOtherList({ type: 5 }).then(res => {
if (res.code == 200) {
this.nvrList = res.data
console.log(this.nvrList)
}
})
this.dialogStatus = param.typeSubmit this.dialogStatus = param.typeSubmit
this.addForm = param.info this.addForm = param.info
this.addForm.vCode = param.info.vcode this.addForm.vCode = param.info.vcode
if (this.addForm.type == '1') {
this.sxtFlag = true
} else {
this.sxtFlag = false
}
console.log(this.nvrId)
}, },
handleSave() { handleSave() {
this.$refs['form_obj'].validate(valid => { this.$refs['form_obj'].validate(valid => {

83
src/views/shebeitaizhang/shebeitaizhangInfo.vue

@ -57,12 +57,50 @@
<span>{{ infoForm.serialNumber }}</span> <span>{{ infoForm.serialNumber }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb" v-if="sxtFlag">
<span>上偏移</span>
</el-col>
<el-col :span="8" v-if="sxtFlag">
<el-form-item>
<span>{{ infoForm.topPosition }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb" v-if="nvrFlag">
<span>仓库</span>
</el-col>
<el-col :span="8" v-if="nvrFlag">
<el-form-item>
<span>{{ getCkTitle(infoForm.ckId) }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="sxtFlag">
<el-col :span="4" class="tleftb">
<span>左偏移</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.leftPosition }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>摄像头编数</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.channelNo }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="sxtFlag">
<el-col :span="4" class="tleftb">
<span>所属Nvr</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item>
<span>{{ getNvrTitle(infoForm.nvrId) }}</span>
</el-form-item> </el-form-item>
</el-col> --> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -71,19 +109,27 @@
</template> </template>
<script> <script>
import { getOtherList } from '@/api/device/device'
export default { export default {
name: 'shebeitaizhangInfo', name: 'shebeitaizhangInfo',
data() { data() {
return { return {
ckList: [
{ name: '仓库1', id: '1' },
{ name: '仓库2', id: '2' }
],
// tableKey: 0, // tableKey: 0,
// index: 0, // index: 0,
viewTitle: '', viewTitle: '',
supplierType_list: [ supplierType_list: [
{ title: '摄像头', id: '1' }, { name: '摄像头', id: '1' },
{ title: '电子围栏', id: '2' }, { name: '电子围栏', id: '2' },
{ title: '门禁', id: '3' }, { name: '门禁', id: '3' },
{ title: '机器人', id: '4' } { name: '机器人', id: '4' },
{ name: '网络录像机', id: '5' }
], ],
sxtFlag: false,
nvrFlag: false,
status_list: [ status_list: [
{ title: '已损坏', id: '1' }, { title: '已损坏', id: '1' },
{ title: '已维修', id: '2' }, { title: '已维修', id: '2' },
@ -104,19 +150,42 @@ export default {
} }
} }
}, },
getCkTitle(item) {
for (var i = 0; i < this.ckList.length; i++) {
if (this.ckList[i].id == item) {
return this.ckList[i].name
}
}
},
getNvrTitle(item) {
for (var i = 0; i < this.nvrList.length; i++) {
if (this.nvrList[i].id == item) {
return this.nvrList[i].name
}
}
},
getSupplierType(item) { getSupplierType(item) {
for (var i = 0; i < this.supplierType_list.length; i++) { for (var i = 0; i < this.supplierType_list.length; i++) {
if (this.supplierType_list[i].id == item) { if (this.supplierType_list[i].id == item) {
return this.supplierType_list[i].title return this.supplierType_list[i].name
} }
} }
}, },
showInfo(row) { showInfo(row) {
getOtherList({ type: 5 }).then(res => {
if (res.code == 200) {
this.nvrList = res.data
}
})
this.sxtFlag = false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['form_obj'].clearValidate() this.$refs['form_obj'].clearValidate()
}) })
this.viewTitle = '设备台账详情' this.viewTitle = '设备台账详情'
this.infoForm = row.info this.infoForm = row.info
if (this.infoForm.type == '1') {
this.sxtFlag = true
}
}, },
handleReturn() { handleReturn() {
this.$emit('doback') this.$emit('doback')

28
src/views/shebeitaizhang/shebeitaizhangList.vue

@ -44,7 +44,7 @@
</el-form-item> --> </el-form-item> -->
<el-form-item label="设备类型"> <el-form-item label="设备类型">
<el-select v-model="listQuery.type" 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.name" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="设备名称"> <el-form-item label="设备名称">
@ -103,7 +103,7 @@
</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.cangku }}</span> <span>{{ getCkTitle(scope.row.ckId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="状态" align="center"> <!-- <el-table-column label="状态" align="center">
@ -262,10 +262,11 @@ export default {
total: 0 total: 0
}, },
supplierType_list: [ supplierType_list: [
{ title: '摄像头', id: '1' }, { name: '摄像头', id: '1' },
{ title: '电子围栏', id: '2' }, { name: '电子围栏', id: '2' },
{ title: '门禁', id: '3' }, { name: '门禁', id: '3' },
{ title: '机器人', id: '4' } { name: '机器人', id: '4' },
{ name: '网络录像机', id: '5' }
], ],
floor_list: [ floor_list: [
{ title: '一层', id: '1' }, { title: '一层', id: '1' },
@ -273,9 +274,9 @@ export default {
{ title: '三层', id: '3' }, { title: '三层', id: '3' },
{ title: '四层', id: '4' }, { title: '四层', id: '4' },
], ],
cangku_list: [ ckList: [
{ title: '仓库1', id: '1' }, { name: '仓库1', id: '1' },
{ title: '仓库2', id: '2' } { name: '仓库2', id: '2' }
], ],
status_list: [ status_list: [
{ title: '已损坏', id: '1' }, { title: '已损坏', id: '1' },
@ -303,13 +304,20 @@ export default {
getSupplierType(item) { getSupplierType(item) {
for (var i = 0; i < this.supplierType_list.length; i++) { for (var i = 0; i < this.supplierType_list.length; i++) {
if (this.supplierType_list[i].id == item) { if (this.supplierType_list[i].id == item) {
return this.supplierType_list[i].title return this.supplierType_list[i].name
} }
} }
}, },
resetState() { resetState() {
this.viewState = 1 this.viewState = 1
}, },
getCkTitle(item) {
for (var i = 0; i < this.ckList.length; i++) {
if (this.ckList[i].id == item) {
return this.ckList[i].name
}
}
},
btnHandle(btnKey) { btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey) console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) { switch (btnKey) {

444
src/views/zhiwujiance/zhiwujianceAdd.vue

@ -12,325 +12,241 @@
<div class="listconadd"> <div class="listconadd">
<el-form ref="form_obj" :model="addForm" :rules="rules" class="formadd"> <el-form ref="form_obj" :model="addForm" :rules="rules" class="formadd">
<div class="title"> <div class="title">
<div>编辑质物监测信息</div> <div>设置定时任务</div>
</div> </div>
<el-row> <el-row>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span><span class="icon">*</span>质物编码</span> <span>隔几年执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop=""> <el-form-item prop="">
<el-input v-model="addForm.manufacturerName" maxlength="20" placeholder="请填写质物编码" class="addinputw" <el-input v-model="addForm.year" maxlength="20" placeholder="请填写单位(年),例:0/1(每年执行一次)" class="addinputw" clearable />
clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>质物位置</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.manufacturerAs" maxlength="20" placeholder="请填写质物位置 " class="addinputw"
clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span><span class="icon">*</span>拍照时间</span> <span>隔几月执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop=""> <el-form-item prop="">
<!-- <el-date-picker type="datatime" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" <el-input v-model="addForm.month" maxlength="20" placeholder="请填写单位(月),例:0/1(每月执行一次)" class="addinputw" clearable />
maxlength="20"></el-date-picker> -->
<el-date-picker style="width: 80%;"
v-model="addForm.value1"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>拍照图片</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:file-list="fileList">
<el-button size="small" type="primary">添加图片</el-button>
</el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row> <el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>质物类型</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-select v-model="addForm.manufacturerCode" filterable clearable placeholder="请选择质物类型"
style="width: 410px;">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id"
class="addinputw" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>拍照时间</span> <span>隔几天执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop=""> <el-form-item prop="">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" <el-input v-model="addForm.day" maxlength="20" placeholder="请填写单位(天),例:0/1(每天执行一次)" class="addinputw" clearable />
maxlength="20"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> --> </el-row>
<!-- <el-row> <el-row>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span><span class="icon">*</span>出厂时间</span> <span>隔几小时执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop=""> <el-form-item prop="">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;" <el-input v-model="addForm.hour" maxlength="20" placeholder="请填写单位(时),例:0/1(每时执行一次)" class="addinputw" clearable />
maxlength="20"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>供货商</span> <span>隔几分钟执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop=""> <el-form-item prop="">
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" placeholder="请填写供应商编码" <el-input v-model="addForm.divide" maxlength="20" placeholder="请填写单位(分),例:0/1(每分执行一次)" class="addinputw"
class="addinputw" clearable /> clearable />
</el-form-item>
</el-col>
</el-row> -->
<!-- <el-row>
<el-col :span="4" class="tleftb">
<span>生产厂家</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.manufacturerTelePhone" maxlength="20" placeholder="请填写生产厂家编码"
class="addinputw" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"> <el-col :span="4" class="tleftb">
<span>保修截止日期</span> <span>隔几秒钟执行一次</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item> <el-form-item prop="">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerFax" style="width: 410px;" <el-input v-model="addForm.second" maxlength="20" placeholder="请填写单位(秒),例:0/1(每秒执行一次)" class="addinputw"
maxlength="20"></el-date-picker> clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> --> </el-row>
</el-form> </el-form>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// import req from '@/api/shebeitaizhang/shebeitaizhang' import { updateCron } from "@/api/deviceImage/deviceImage"
// import { typeValues } from '@/api/cheliang/dictcommons' export default {
name: 'shebeitaizhangAdd',
export default { data() {
name: 'shebeitaizhangAdd', var checkSubmit = (rule, value, callback) => {
data() { const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
var checkSubmit = (rule, value, callback) => { if (Submit.test(value)) {
const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ return callback()
if (Submit.test(value)) {
return callback()
}
callback(new Error('请输入手机号'))
} }
var checkChuanzhen = (rule, value, callback) => { callback(new Error('请输入手机号'))
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/ }
if (value) { var checkChuanzhen = (rule, value, callback) => {
// const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (!BanGongDianHua.test(value)) { if (value) {
callback(new Error('请输入正确的传真格式')) //
} if (!BanGongDianHua.test(value)) {
callback() callback(new Error('请输入正确的传真格式'))
} else {
callback()
} }
callback()
} else {
callback()
} }
return { }
fileList: [], return {
tableKey: 0, fileList: [],
index: 0, tableKey: 0,
viewState: 1, index: 0,
viewTitle: '', viewState: 1,
dialogStatus: '', viewTitle: '',
sid: '', dialogStatus: '',
isShow: true, sid: '',
supplierType_list: [ isShow: true,
supplierType_list: [
{ title: '摄像头', id: '1' }, { title: '摄像头', id: '1' },
{ title: '电子围栏', id: '2' }, { title: '电子围栏', id: '2' },
{ title: '门禁', id: '3' }, { title: '门禁', id: '3' },
{ title: '机器人', id: '4' } { title: '机器人', id: '4' }
], ],
addForm: { addForm: {
manufacturerName: '', manufacturerName: '',
manufacturerAs: '', manufacturerAs: '',
manufacturerCode: '', manufacturerCode: '',
supplierType: '', supplierType: '',
supplierTypeValue: '', supplierTypeValue: '',
manufacturerAddress: '', manufacturerAddress: '',
manufacturerTelePhone: '', manufacturerTelePhone: '',
manufacturerFax: '', manufacturerFax: '',
contactName: '', contactName: '',
contactMobile: '', contactMobile: '',
contactTelePhone: '', contactTelePhone: '',
weChatID: '', weChatID: '',
zipCode: '', zipCode: '',
email: '', email: '',
createOrg: '', createOrg: '',
useOrg: '' useOrg: ''
},
baseManufacturerBankDto: [],
rules: {
manufacturerName: [{
required: true,
message: '请填写供应商名称',
trigger: 'blur'
}],
supplierTypeValue: [{
required: true,
message: '请选择分类',
trigger: 'change'
}],
manufacturerAddress: [{
required: true,
message: '请填写供应商通讯地址',
trigger: 'blur'
}],
manufacturerFax: [{
required: true,
validator: checkChuanzhen,
trigger: 'blur'
}],
contactName: [{
required: true,
message: '请填写联系人名字',
trigger: 'blur'
}],
contactMobile: [{
required: true,
validator: checkSubmit,
trigger: 'blur'
}],
manufacturerCode: [{
required: true,
message: '编码不能为空',
trigger: 'blur'
}]
},
submitdisabled: false
}
},
methods: {
//
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${ file.name }`);
},
//
init() {
typeValues({ type: 'supplierType' }).then((res) => {
if (res.success) {
this.supplierType_list = res.data
}
})
}, },
changeSupplierType(value) { baseManufacturerBankDto: [],
let bb = null rules: {
this.supplierType_list.forEach((e) => { manufacturerName: [{
if (e.dictValue === value) { required: true,
bb = { message: '请填写供应商名称',
key: e.dictKey, trigger: 'blur'
value: e.dictValue }],
} supplierTypeValue: [{
} required: true,
}) message: '请选择分类',
this.addForm.supplierType = bb.key trigger: 'change'
}],
manufacturerAddress: [{
required: true,
message: '请填写供应商通讯地址',
trigger: 'blur'
}],
manufacturerFax: [{
required: true,
validator: checkChuanzhen,
trigger: 'blur'
}],
contactName: [{
required: true,
message: '请填写联系人名字',
trigger: 'blur'
}],
contactMobile: [{
required: true,
validator: checkSubmit,
trigger: 'blur'
}],
manufacturerCode: [{
required: true,
message: '编码不能为空',
trigger: 'blur'
}]
}, },
handleSave() { submitdisabled: false
this.$refs['form_obj'].validate(valid => { }
if (valid) { },
this.submitdisabled = true methods: {
const formobj = { //
baseManufacturerBankDto: this.baseManufacturerBankDto, handleRemove(file, fileList) {
addForm: this.addForm console.log(file, fileList);
} },
if (this.dialogStatus === 'add') { handlePreview(file) {
req.save(formobj).then(resp => { console.log(file);
this.submitdisabled = false },
if (resp.success) { handleExceed(files, fileList) {
this.$message({ showClose: true, type: 'success', message: resp.msg }) this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
this.handleReturn('true') },
} beforeRemove(file, fileList) {
}).catch(() => { return this.$confirm(`确定移除 ${file.name}`);
this.submitdisabled = false },
}) //
} else if (this.dialogStatus === 'edit') { init() {
req.update(formobj, this.sid).then(resp => { typeValues({ type: 'supplierType' }).then((res) => {
this.submitdisabled = false if (res.success) {
if (resp.success) { this.supplierType_list = res.data
this.$message({ showClose: true, type: 'success', message: resp.msg }) }
this.handleReturn('true') })
} },
}).catch(() => { changeSupplierType(value) {
this.submitdisabled = false let bb = null
}) this.supplierType_list.forEach((e) => {
} if (e.dictValue === value) {
} else { bb = {
return false key: e.dictKey,
value: e.dictValue
} }
}) }
}, })
handleReturn(isreload) { this.addForm.supplierType = bb.key
if (isreload === 'true') this.$emit('reloadlist') },
this.dialogStatus = '' showAdd() { },
this.sid = '' handleSave() {
this.addForm = {} updateCron(this.addForm).then(resp => {
this.baseManufacturerBankDto = [] this.submitdisabled = false
this.isShow = true this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.$refs['form_obj'].resetFields() this.handleReturn('true')
this.$emit('doback') }).catch(() => {
} this.submitdisabled = false
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.dialogStatus = ''
this.sid = ''
this.addForm = {}
this.baseManufacturerBankDto = []
this.isShow = true
this.$refs['form_obj'].resetFields()
this.$emit('doback')
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.divStyle { .divStyle {
padding: 7px; padding: 7px;
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
background-color: #0294d7; background-color: #0294d7;
text-align: left; text-align: left;
color: #ffffff; color: #ffffff;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
</style> </style>

9
src/views/zhiwujiance/zhiwujianceInfo.vue

@ -114,9 +114,12 @@ export default {
manufacturerFax: '2023-05-23', manufacturerFax: '2023-05-23',
status: '1', status: '1',
cangku: '仓库1', cangku: '仓库1',
tuUrl: './image/tu1.jpg' tuUrl: './image/tu1.jpg',
modifyTime: '',
imgAfter: ''
}, },
rules: {}, rules: {},
infoOne: {}
} }
}, },
methods: { methods: {
@ -142,8 +145,8 @@ export default {
getDeviceImageById({ id: row.id }).then(resp => { getDeviceImageById({ id: row.id }).then(resp => {
console.log('resp', resp) console.log('resp', resp)
// this.infoForm = resp.data // this.infoForm = resp.data
this.infoForm.modifyTime = resp.data.modifyTime this.infoOne.modifyTime = resp.data.modifyTime
this.infoForm.imgAfter = resp.data.imgAfter this.infoOne.imgAfter = resp.data.imgAfter
}).catch(e => { }).catch(e => {
this.formobj = row this.formobj = row
}) })

81
src/views/zhiwujiance/zhiwujianceList.vue

@ -31,8 +31,8 @@
<div class="listtop"> <div class="listtop">
<div class="tit">质物监测信息列表</div> <div class="tit">质物监测信息列表</div>
<!-- 翻页分页 --> <!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" <!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> :limit.sync="listQuery.size" class="pagination" @pagination="getList" /> -->
</div> </div>
<div> <div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" <el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@ -53,12 +53,12 @@
</el-table-column> </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="{row}"> <template slot-scope="{row}">
<div v-for="(item, index) in Datalista" :key="index"> <div>
<div class="newslilefts"> <div class="newslilefts">
<div class="newsli"> <div class="newsli">
<div class="tu"><img :src="row.imgBrfore" alt="" /></div> <!-- <div class="tu"><img :src="require(imgUrl)" alt="" /></div> -->
<div class="tu"><img :src="require('D:/resources/download/1/202306081713001.png')" alt="" /></div>
<div class="rightwen"> <div class="rightwen">
<!-- <div class="time">拍照日期{{ row.createTime }}</div> -->
<div class="time" style="margin-top:10%">拍照时间{{ row.createTime }}</div> <div class="time" style="margin-top:10%">拍照时间{{ row.createTime }}</div>
</div> </div>
</div> </div>
@ -68,7 +68,6 @@
<div class="newsli"> <div class="newsli">
<div class="tu"><img :src="row.modifyTime" alt="" /></div> <div class="tu"><img :src="row.modifyTime" alt="" /></div>
<div class="rightwen"> <div class="rightwen">
<!-- <div class="time">拍照日期{{ row.createTime }}</div> -->
<div class="time" style="margin-top:10%">拍照时间{{ row.modifyTime }}</div> <div class="time" style="margin-top:10%">拍照时间{{ row.modifyTime }}</div>
</div> </div>
</div> </div>
@ -76,19 +75,17 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="220px" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="220px" class-name="small-padding fixed-width">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button size="mini" type="primary" @click="toShipin(row)">视频</el-button> <el-button size="mini" type="primary" @click="getVedioPcLive(row)">视频</el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button> <el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="pages"> <div class="pages">
<!-- 翻页 --> <!-- <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList" /> -->
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div> </div>
</div> </div>
</div> </div>
@ -112,7 +109,7 @@ import zhiwujianceAdd from './zhiwujianceAdd'
import zhiwujianceInfo from './zhiwujianceInfo' import zhiwujianceInfo from './zhiwujianceInfo'
import * as echarts from "echarts"; import * as echarts from "echarts";
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb' import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb'
import { getDeviceImagePage, getShiPinByChannelNo } from '@/api/deviceImage/deviceImage' import { getDeviceImagePage, getShiPinNormalByChannelNo } from '@/api/deviceImage/deviceImage'
// 1.1 // 1.1
const wanhao_Chart = { const wanhao_Chart = {
@ -185,11 +182,19 @@ export default {
}, },
data() { data() {
return { return {
imgUrl: 'D:/resources/download/1/202306080924311.png',
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: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toAdd',
btnLabel: '设置定时'
},
{ {
type: 'info', type: 'info',
size: 'small', size: 'small',
@ -204,35 +209,9 @@ export default {
sids: [], sids: [],
// ----------- // -----------
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',
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'
},
],
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'
},
],
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: {
@ -283,8 +262,8 @@ export default {
this.init() this.init()
}, },
methods: { methods: {
toShipin(row) { getVedioPcLive(row) {
getShiPinByChannelNo({ channelNo: row.channelNo }).then(res => { getShiPinNormalByChannelNo({ channelNo: row.channelNo }).then(res => {
this.spUrl = res.data this.spUrl = res.data
this.dialogImage = true this.dialogImage = true
}) })
@ -360,20 +339,6 @@ export default {
var pageindex = index + 1 + pagestart var pageindex = index + 1 + pagestart
return pageindex return pageindex
}, },
//
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
// }
// })
},
// //
handleFilter() { handleFilter() {
this.listQuery.current = 1 this.listQuery.current = 1
@ -384,7 +349,7 @@ export default {
// //
toAdd() { toAdd() {
this.viewState = 2 this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.createOrgSid) this.$refs['divadd'].showAdd()
}, },
// //
handleDddShebei() { handleDddShebei() {
@ -432,10 +397,6 @@ export default {
return return
} }
}, },
handleEdit(row) {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.createOrgSid)
},
// //
handleCheck(row) { handleCheck(row) {
this.viewState = 4 this.viewState = 4

Loading…
Cancel
Save