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_URL = "http://huirong.ybkjyl.com/api"
# VUE_APP_URL = "http://127.0.0.1:7103"
# VUE_APP_URL = "http://huirong.ybkjyl.com/api"
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() {
return request({ url: '/device/getSxtList', method: 'GET' })
export function getOtherList(data) {
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) {
return request({ url: '/deviceImage/getShiPinByChannelNo', method: 'GET', params: data })
// 获取正常视频链接
export function getVedioPcLiveById(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"
@mouseleave="leave" @click.stop="openshipinShipinjiankong(index)">&#xe644;</div>
<div class="seencons shipin_out noneDiv2" v-if="active == index">
<p @click="getShiPin(item.channelNo)">实时视频</p>
<p @click="toMore()">回放视频</p>
<p @click="getVedioPcLive(item.id)">实时视频</p>
<p @click="getVedioPcRec(item.id)">回放视频</p>
</div>
<div class="seenconsc shipin_out noneDiv">
<p>设备名称{{ item.name }}</p>
@ -223,6 +223,13 @@
</iframe>
</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">
<div class="shipin">
@ -241,8 +248,8 @@
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { getSxtList } from '@/api/device/device'
import { getShiPinByChannelNo } from '@/api/deviceImage/deviceImage'
import { getOtherList } from '@/api/device/device'
import { getVedioPcRecById, getVedioPcLiveById } from '@/api/deviceImage/deviceImage'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
@ -321,12 +328,14 @@ export default {
],
dialogImage: false,
dialogImageJK: false,
dialogImageJKRec: false,
//
videoSrc: '../../../image/cangkushipin.mp4',
playStatus: '',
muteStatus: '',
spUrl: '',
spRecUrl: '',
active: -1,
isMute: true,
isPlay: false,
@ -411,6 +420,9 @@ export default {
handleCloseJK() {
this.dialogImageJK = false
},
handleCloseJKRec() {
this.dialogImageJKRec = false
},
handleVideo() {
this.$refs.videoDiolag.dialogImage = true
},
@ -592,8 +604,7 @@ export default {
}
},
init() {
getSxtList().then((res) => {
console.log(res)
getOtherList({ type: 1 }).then((res) => {
if (res.code == 200) {
this.zc_list = res.data
}
@ -737,12 +748,18 @@ export default {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
},
getShiPin(channelNo) {
getShiPinByChannelNo({ channelNo: channelNo }).then(res => {
getVedioPcLive(id) {
getVedioPcLiveById({ id: id }).then(res => {
this.spUrl = res.data
this.dialogImageJK = true
})
},
getVedioPcRec(id) {
getVedioPcRecById({ id: id }).then(res => {
this.spRecUrl = res.data
this.dialogImageJKRec = true
})
},
toMore() {
this.active = -1
this.dialogImage = true

94
src/views/shebeitaizhang/shebeitaizhangAdd.vue

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

83
src/views/shebeitaizhang/shebeitaizhangInfo.vue

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

28
src/views/shebeitaizhang/shebeitaizhangList.vue

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

444
src/views/zhiwujiance/zhiwujianceAdd.vue

@ -12,325 +12,241 @@
<div class="listconadd">
<el-form ref="form_obj" :model="addForm" :rules="rules" class="formadd">
<div class="title">
<div>编辑质物监测信息</div>
<div>设置定时任务</div>
</div>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>质物编码</span>
<span>隔几年执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<el-input v-model="addForm.manufacturerName" maxlength="20" placeholder="请填写质物编码" class="addinputw"
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-input v-model="addForm.year" maxlength="20" placeholder="请填写单位(年),例:0/1(每年执行一次)" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>拍照时间</span>
<span>隔几月执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<!-- <el-date-picker type="datatime" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;"
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-input v-model="addForm.month" maxlength="20" placeholder="请填写单位(月),例:0/1(每月执行一次)" class="addinputw" clearable />
</el-form-item>
</el-col>
</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-row>
<el-col :span="4" class="tleftb">
<span>拍照时间</span>
<span>隔几天执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;"
maxlength="20"></el-date-picker>
<el-input v-model="addForm.day" maxlength="20" placeholder="请填写单位(天),例:0/1(每天执行一次)" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row> -->
<!-- <el-row>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>出厂时间</span>
<span>隔几小时执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;"
maxlength="20"></el-date-picker>
<el-input v-model="addForm.hour" maxlength="20" placeholder="请填写单位(时),例:0/1(每时执行一次)" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>供货商</span>
<span>隔几分钟执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" placeholder="请填写供应商编码"
class="addinputw" 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-input v-model="addForm.divide" maxlength="20" placeholder="请填写单位(分),例:0/1(每分执行一次)" class="addinputw"
clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>保修截止日期</span>
<span>隔几秒钟执行一次</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerFax" style="width: 410px;"
maxlength="20"></el-date-picker>
<el-form-item prop="">
<el-input v-model="addForm.second" maxlength="20" placeholder="请填写单位(秒),例:0/1(每秒执行一次)" class="addinputw"
clearable />
</el-form-item>
</el-col>
</el-row> -->
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
// import req from '@/api/shebeitaizhang/shebeitaizhang'
// import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'shebeitaizhangAdd',
data() {
var checkSubmit = (rule, value, callback) => {
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}$/
if (Submit.test(value)) {
return callback()
}
callback(new Error('请输入手机号'))
import { updateCron } from "@/api/deviceImage/deviceImage"
export default {
name: 'shebeitaizhangAdd',
data() {
var checkSubmit = (rule, value, callback) => {
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}$/
if (Submit.test(value)) {
return callback()
}
var checkChuanzhen = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) {
//
if (!BanGongDianHua.test(value)) {
callback(new Error('请输入正确的传真格式'))
}
callback()
} else {
callback()
callback(new Error('请输入手机号'))
}
var checkChuanzhen = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) {
//
if (!BanGongDianHua.test(value)) {
callback(new Error('请输入正确的传真格式'))
}
callback()
} else {
callback()
}
return {
fileList: [],
tableKey: 0,
index: 0,
viewState: 1,
viewTitle: '',
dialogStatus: '',
sid: '',
isShow: true,
supplierType_list: [
}
return {
fileList: [],
tableKey: 0,
index: 0,
viewState: 1,
viewTitle: '',
dialogStatus: '',
sid: '',
isShow: true,
supplierType_list: [
{ title: '摄像头', id: '1' },
{ title: '电子围栏', id: '2' },
{ title: '门禁', id: '3' },
{ title: '机器人', id: '4' }
],
addForm: {
manufacturerName: '',
manufacturerAs: '',
manufacturerCode: '',
supplierType: '',
supplierTypeValue: '',
manufacturerAddress: '',
manufacturerTelePhone: '',
manufacturerFax: '',
contactName: '',
contactMobile: '',
contactTelePhone: '',
weChatID: '',
zipCode: '',
email: '',
createOrg: '',
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
}
})
{ title: '电子围栏', id: '2' },
{ title: '门禁', id: '3' },
{ title: '机器人', id: '4' }
],
addForm: {
manufacturerName: '',
manufacturerAs: '',
manufacturerCode: '',
supplierType: '',
supplierTypeValue: '',
manufacturerAddress: '',
manufacturerTelePhone: '',
manufacturerFax: '',
contactName: '',
contactMobile: '',
contactTelePhone: '',
weChatID: '',
zipCode: '',
email: '',
createOrg: '',
useOrg: ''
},
changeSupplierType(value) {
let bb = null
this.supplierType_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
key: e.dictKey,
value: e.dictValue
}
}
})
this.addForm.supplierType = bb.key
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'
}]
},
handleSave() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
const formobj = {
baseManufacturerBankDto: this.baseManufacturerBankDto,
addForm: this.addForm
}
if (this.dialogStatus === 'add') {
req.save(formobj).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else if (this.dialogStatus === 'edit') {
req.update(formobj, this.sid).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
}
} else {
return false
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) {
let bb = null
this.supplierType_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
key: e.dictKey,
value: e.dictValue
}
})
},
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')
}
}
})
this.addForm.supplierType = bb.key
},
showAdd() { },
handleSave() {
updateCron(this.addForm).then(resp => {
this.submitdisabled = false
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleReturn('true')
}).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>
<style scoped>
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
text-align: left;
color: #ffffff;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
text-align: left;
color: #ffffff;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

9
src/views/zhiwujiance/zhiwujianceInfo.vue

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

81
src/views/zhiwujiance/zhiwujianceList.vue

@ -31,8 +31,8 @@
<div class="listtop">
<div class="tit">质物监测信息列表</div>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> -->
</div>
<div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@ -53,12 +53,12 @@
</el-table-column>
<el-table-column prop="jc" label="相似度对比" header-align="center" align="center">
<template slot-scope="{row}">
<div v-for="(item, index) in Datalista" :key="index">
<div>
<div class="newslilefts">
<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="time">拍照日期{{ row.createTime }}</div> -->
<div class="time" style="margin-top:10%">拍照时间{{ row.createTime }}</div>
</div>
</div>
@ -68,7 +68,6 @@
<div class="newsli">
<div class="tu"><img :src="row.modifyTime" alt="" /></div>
<div class="rightwen">
<!-- <div class="time">拍照日期{{ row.createTime }}</div> -->
<div class="time" style="margin-top:10%">拍照时间{{ row.modifyTime }}</div>
</div>
</div>
@ -76,19 +75,17 @@
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="220px" class-name="small-padding fixed-width">
<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>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
<!-- <pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> -->
</div>
</div>
</div>
@ -112,7 +109,7 @@ import zhiwujianceAdd from './zhiwujianceAdd'
import zhiwujianceInfo from './zhiwujianceInfo'
import * as echarts from "echarts";
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb'
import { getDeviceImagePage, getShiPinByChannelNo } from '@/api/deviceImage/deviceImage'
import { getDeviceImagePage, getShiPinNormalByChannelNo } from '@/api/deviceImage/deviceImage'
// 1.1
const wanhao_Chart = {
@ -185,11 +182,19 @@ export default {
},
data() {
return {
imgUrl: 'D:/resources/download/1/202306080924311.png',
wanhao_Chart: wanhao_Chart, // 1.1
weixiu_Chart: weixiu_Chart,
sunhai_Chart: sunhai_Chart,
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toAdd',
btnLabel: '设置定时'
},
{
type: 'info',
size: 'small',
@ -204,35 +209,9 @@ export default {
sids: [],
// -----------
tableKey: 0,
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'
},
],
list: [],
Datalistb: [
{ name: '仓库1', cangku: '仓库1003F3', weizhi: '石家庄市长安区和平西路126号', huohao: 'F31006C102325', ren: '李舜华', dianhua: '13933263572' },
],
listLoading: false,
listQuery: {
@ -283,8 +262,8 @@ export default {
this.init()
},
methods: {
toShipin(row) {
getShiPinByChannelNo({ channelNo: row.channelNo }).then(res => {
getVedioPcLive(row) {
getShiPinNormalByChannelNo({ channelNo: row.channelNo }).then(res => {
this.spUrl = res.data
this.dialogImage = true
})
@ -360,20 +339,6 @@ export default {
var pageindex = index + 1 + pagestart
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() {
this.listQuery.current = 1
@ -384,7 +349,7 @@ export default {
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.createOrgSid)
this.$refs['divadd'].showAdd()
},
//
handleDddShebei() {
@ -432,10 +397,6 @@ export default {
return
}
},
handleEdit(row) {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.createOrgSid)
},
//
handleCheck(row) {
this.viewState = 4

Loading…
Cancel
Save