告警管理接口联调,plc异常页面构建接口联调,实时视频流页面bug修复

merge-requests/1/head
张鑫 5 years ago
parent c12238ea68
commit 42db7e0a83

@ -9,6 +9,11 @@ export default {
url: "/realTime", url: "/realTime",
name: "获取实时监控列表" name: "获取实时监控列表"
}, },
getHistoryList: {
method: "POST",
url: "/order/list",
name: "获取历史监控列表"
},
realTimeLychee: { realTimeLychee: {
method: "GET", method: "GET",
url: "/realTime/lychee", url: "/realTime/lychee",
@ -86,10 +91,15 @@ export default {
url: "/camera/io/toPtz", url: "/camera/io/toPtz",
name: "转至球机IO配置点" name: "转至球机IO配置点"
}, },
queryList: { warnList: {
url: '/order/list', url: '/warn/list',
name: '查询', name: 'plc未连接数量',
method: 'POST' method: 'POST'
},
disPlcList: {
url: '/plc/disPlc',
name: 'plc未连接列表',
method: 'GET'
} }
} }

@ -62,7 +62,7 @@ export default {
parents = this.$router.options.routes[0].children.filter(ele => { parents = this.$router.options.routes[0].children.filter(ele => {
if ( if (
this.userInfo.permissionList.some(item => { this.userInfo.permissionList.some(item => {
return item.rights === ele.name && ele.name.indexOf("center") < 0 && item.rights === ele.name && ele.name.indexOf("ioTable") < 0 && item.rights === ele.name && ele.name.indexOf("realTimeMonitoringModel") < 0; return item.rights === ele.name && ele.name.indexOf("center") < 0 && item.rights === ele.name && ele.name.indexOf("ioTable") < 0 && item.rights === ele.name && ele.name.indexOf("realTimeMonitoringModel") < 0 && item.rights === ele.name && ele.name.indexOf("plcStatus") < 0;
}) })
) { ) {
return ele; return ele;
@ -83,7 +83,7 @@ export default {
recursionRoute(parents); recursionRoute(parents);
}else { }else {
parents = this.$router.options.routes[0].children.filter(item => { parents = this.$router.options.routes[0].children.filter(item => {
return !item.name.startsWith("center") && !item.name.startsWith("ioTable") && !item.name.startsWith("realTimeMonitoringModel"); return !item.name.startsWith("center") && !item.name.startsWith("ioTable") && !item.name.startsWith("realTimeMonitoringModel") && !item.name.startsWith("plcStatus");
}); });
} }
this.routes = parents; this.routes = parents;

@ -98,8 +98,8 @@ export default {
.table{ .table{
background: #ffffff; background: #ffffff;
margin: 8px 20px; margin: 8px 20px;
height: calc(100vh - 190px); min-height: calc(100vh - 190px);
padding:20px; padding: 20px;
} }
} }
</style> </style>

@ -11,7 +11,7 @@
</div> </div>
<div class="header-right"> <div class="header-right">
<div class="header-top-right-circle" @click="visible = !visible"></div> <div class="header-top-right-circle" @click="visible = !visible"></div>
<a-badge :count="count"> <a-badge :count="count" @click="openPlc">
<a-icon type="bell" style="font-size:20px;cursor:pointer"/> <a-icon type="bell" style="font-size:20px;cursor:pointer"/>
</a-badge> </a-badge>
<a-popover id="popover" v-model="visible" placement="bottom" trigger="click"> <a-popover id="popover" v-model="visible" placement="bottom" trigger="click">
@ -93,6 +93,9 @@ export default {
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
},
openPlc() {
this.$router.push({name: 'plcStatus'})
} }
} }
}; };

@ -155,6 +155,14 @@ const routes = [{
name: '个人中心' name: '个人中心'
}, },
component: () => import('@/views/center') component: () => import('@/views/center')
},
{
path: 'plcStatus',
name: 'plcStatus',
meta: {
name: 'PLC状态'
},
component: () => import('@/views/plcStatus')
} }
] ]
}, },

@ -5,8 +5,9 @@
<a-row :gutter="12"> <a-row :gutter="12">
<a-col :span="8"> <a-col :span="8">
<a-form-item class="ageInput" label="时间"> <a-form-item class="ageInput" label="时间">
<a-range-picker @change="onTimeChange" v-model="queryParam.time"> <a-range-picker @change="onTimeChange" v-model="queryParam.time"
<a-icon slot="suffixIcon" type="calendar" /> format="YYYY-MM-DD HH:mm">
<a-icon slot="suffixIcon" type="calendar"/>
</a-range-picker> </a-range-picker>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -24,11 +25,33 @@
:pagination="pagination" :pagination="pagination"
@change="handleGetHistoryList" @change="handleGetHistoryList"
> >
<span slot="videoPath1" slot-scope="text">
<a-button type="link" v-if="text.videoPath1" @click="showModel(text.videoPath1)">
查看视频
</a-button>
<span v-else>
</span>
</span>
<span slot="videoPath2" slot-scope="text">
<a-button type="link" v-if="text.videoPath2" @click="showModel(text.videoPath2)">
查看视频
</a-button>
<span v-else>
</span>
</span>
</a-table> </a-table>
<Model
:visible.sync="visible"
:vid.sync="vid"
@close="closeModel"
/>
</div> </div>
</template> </template>
<script> <script>
import Model from "./model.vue"
export default { export default {
name: "historyMonitoring", name: "historyMonitoring",
components: { components: {
@ -54,25 +77,29 @@ export default {
columns: [ columns: [
{ {
title: "时间", title: "时间",
dataIndex: "time", dataIndex: "startTime",
}, },
{ {
title: "球机所属巷道 ", title: "球机所属巷道 ",
dataIndex: "pic", dataIndex: "streetName",
}, },
{ {
title: "视频时长", title: "视频时长",
dataIndex: "mediaTime", dataIndex: "timeLength",
}, },
{ {
title: "球机1", title: "球机1",
dataIndex: "camera1", // dataIndex: "videoPath1",
scopedSlots: {customRender: 'videoPath1'}
}, },
{ {
title: "球机2", title: "球机2",
dataIndex: "camera2", // dataIndex: "videoPath2",
scopedSlots: {customRender: 'videoPath2'}
}, },
], ],
visible: false,
vid: ''
}; };
}, },
mounted() { mounted() {
@ -80,13 +107,8 @@ export default {
}, },
methods: { methods: {
handleSearch(){ handleSearch(){
delete this.queryParam.time
console.log(this.queryParam) console.log(this.queryParam)
if(this.queryParam.con_code || this.queryParam.start_time && this.queryParam.end_time ){ this.handleGetHistoryList()
this.handleGetHistoryList()
}else{
this.$message.error('请输入搜索条件')
}
}, },
handleGetHistoryList(pagination) { handleGetHistoryList(pagination) {
console.log(pagination) console.log(pagination)
@ -99,23 +121,38 @@ export default {
this.request(); this.request();
}, },
request() { request() {
// this.$api.httpApi.queryList({ this.$api.httpApi.warnList({
// data: { data: {
// pageNum:this.pageNum, pageNum: this.pageNum,
// pageSize:this.pageSize, pageSize: this.pageSize,
// ...this.queryParam ...this.queryParam
// } }
// }).then(res => { }).then(res => {
// console.log(res) console.log(res)
// }).catch(err => { this.data = res.data.list
// }).catch(err => {
// });
});
}, },
onTimeChange(date, dateString) { onTimeChange(date, dateString) {
this.handleReset()
console.log(date) console.log(date)
console.log(date[0].format('X')) console.log(date[0].format('YYYY-MM-DD HH:mm:ss'))
this.queryParam.start_time = date[0].format('X') this.queryParam.startTime = date[0].format('YYYY-MM-DD HH:mm:ss')
this.queryParam.end_time = date[1].format('X') this.queryParam.endTime = date[1].format('YYYY-MM-DD HH:mm:ss')
},
handleReset() {
this.queryParam.startTime = ""
this.queryParam.endTime = ""
this.time = ""
},
showModel(data) {
this.visible = true
this.vid = videoUrl + data
},
closeModel(visible, data) {
this.visible = visible
this.vid = data
}, },
}, },
}; };

@ -0,0 +1,102 @@
<template>
<div v-if="isShow">
<a-modal
v-model="isShow"
@cancel="handleCancel"
:footer="null"
:maskClosable="false"
:bodyStyle="{padding:0}"
:centered="true"
class="video-model"
>
<div slot="closeIcon">
<div class="video-close">
</div>
</div>
<div class="test_two_box">
<video
id="myVideo"
class="video-js"
:autoplay="true"
controls
>
<source
:src="video"
type="video/mp4"
>
</video>
</div>
</a-modal>
</div>
</template>
<style lang="scss" scoped>
.video-model {
.across-layout {
display: flex;
}
}
.ant-btn {
white-space: inherit;
text-align: left;
}
.video-js {
width: 100%;
height: 300px;
}
.video-close {
position: absolute;
right: 10px;
top: 10px;
color: #ffffff;
font-size: 18px;
width: 24px;
height: 24px;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
}
</style>
<script>
export default {
props: ['visible', 'vid'],
watch: {
//visibleisShowprops
visible: function (newVal) {
this.isShow = newVal; //newValvisible
// newVal && this.showConfirm(); //newValshowConfirm
},
vid: function (newVal) {
console.log(newVal)
console.log(1111111)
this.video = newVal
this.$nextTick(() => { //this.$nextTick
})
},
},
data() {
return {
isShow: false,
confirmLoading: false,
video: '',
};
},
mounted() {
console.log('mounted执行了')
},
methods: {
handleCancel() {
this.$emit('close', false, '')
},
},
};
</script>

@ -15,7 +15,12 @@
:form="form" :form="form"
:wrapper-col="formItemAcrossLayout.wrapperCol" :wrapper-col="formItemAcrossLayout.wrapperCol"
> >
<a-form-item label="名称" :label-col="formItemVerticalLayout.labelCol"> <a-form-item label="指令编码" :label-col="formItemVerticalLayout.labelCol">
<a-input
v-decorator="['code', { rules: [{ required: true, message: '请输入指令编码!' }] }]"
/>
</a-form-item>
<a-form-item label="指令名称" :label-col="formItemVerticalLayout.labelCol">
<a-input <a-input
v-decorator="['name', { rules: [{ required: true, message: '请输入指令名称!' }] }]" v-decorator="['name', { rules: [{ required: true, message: '请输入指令名称!' }] }]"
/> />
@ -54,9 +59,10 @@ export default {
// console.log('watch') // console.log('watch')
this.$nextTick(()=>{ //this.$nextTick this.$nextTick(()=>{ //this.$nextTick
this.form.setFieldsValue({ //setFieldsValue form this.form.setFieldsValue({ //setFieldsValue form
name:newVal.name, name: newVal.name,
ip:newVal.ip, code: newVal.code,
rtsp:newVal.rtsp ip: newVal.ip,
rtsp: newVal.rtsp
}) })
}) })
}else{ }else{

@ -67,7 +67,11 @@ const columns = [
} }
}, },
{ {
title: 'IO指令', title: '指令编码',
dataIndex: 'code',
},
{
title: '指令名称',
dataIndex: 'name', dataIndex: 'name',
}, },
{ {

@ -1,77 +1,78 @@
<template> <template>
<div class="check-page"> <div class="check-page">
<div class="title-info"> <!-- <div class="title-info">-->
<span class="explain">颜色说明</span> <!-- <span class="explain">颜色说明</span>-->
<span class="info-text"> <!-- <span class="info-text">-->
<a-tag color="#d81e06" style="width:30px;height:20px"></a-tag> <!-- <a-tag color="#d81e06" style="width:30px;height:20px"></a-tag>-->
盘点错误 <!-- 盘点错误-->
</span> <!-- </span>-->
<span class="info-text"> <!-- <span class="info-text">-->
<a-tag color="#1afa29" style="width:30px;height:20px"></a-tag> <!-- <a-tag color="#1afa29" style="width:30px;height:20px"></a-tag>-->
盘点正确 <!-- 盘点正确-->
</span> <!-- </span>-->
<span class="info-text"> <!-- <span class="info-text">-->
<a-tag color="#bfbfbf" style="width:30px;height:20px"></a-tag> <!-- <a-tag color="#bfbfbf" style="width:30px;height:20px"></a-tag>-->
未盘点 <!-- 未盘点-->
</span> <!-- </span>-->
</div> <!-- </div>-->
<div class="check-content"> <!-- <div class="check-content">-->
<div class="roadway-top"> <!-- <div class="roadway-top">-->
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box"> <!-- <happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box">-->
<div class="roadway-box"> <!-- <div class="roadway-box">-->
<div class="line" v-for="item in 20" :key="item"> <!-- <div class="line" v-for="item in 20" :key="item">-->
<div <!-- <div-->
class="ele" <!-- class="ele"-->
:style="{background:i+'-'+item == '4-14'|| i+'-'+item=='8-18'?'#d81e06':'#bfbfbf'}" <!-- :style="{background:i+'-'+item == '4-14'|| i+'-'+item=='8-18'?'#d81e06':'#bfbfbf'}"-->
v-for="i in 60" <!-- v-for="i in 60"-->
:key="i">{{i}}-{{item}} <!-- :key="i">{{i}}-{{item}}-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</happy-scroll> <!-- </happy-scroll>-->
<a-radio-group v-model="size" style="margin:10px 0"> <!-- <a-radio-group v-model="size" style="margin:10px 0">-->
<a-radio-button value="small"> <!-- <a-radio-button value="small">-->
<!-- -->
</a-radio-button> <!-- </a-radio-button>-->
<a-radio-button value="default"> <!-- <a-radio-button value="default">-->
<!-- -->
</a-radio-button> <!-- </a-radio-button>-->
</a-radio-group> <!-- </a-radio-group>-->
</div> <!-- </div>-->
<a-select default-value="jack" style="width: 180px"> <!-- <a-select default-value="jack" style="width: 180px">-->
<a-select-option value="jack"> <!-- <a-select-option value="jack">-->
1号巷道 <!-- 1号巷道-->
</a-select-option> <!-- </a-select-option>-->
<a-select-option value="lucy"> <!-- <a-select-option value="lucy">-->
2号巷道 <!-- 2号巷道-->
</a-select-option> <!-- </a-select-option>-->
<a-select-option value="disabled"> <!-- <a-select-option value="disabled">-->
3号巷道 <!-- 3号巷道-->
</a-select-option> <!-- </a-select-option>-->
</a-select> <!-- </a-select>-->
<div class="roadway-buttom"> <!-- <div class="roadway-buttom">-->
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box"> <!-- <happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box">-->
<div class="roadway-box"> <!-- <div class="roadway-box">-->
<div class="line" v-for="item in 20" :key="item"> <!-- <div class="line" v-for="item in 20" :key="item">-->
<div class="ele" <!-- <div class="ele"-->
:style="{background:i+'-'+item == '5-16'|| i+'-'+item=='9-17'||i+'-'+item=='11-15'?'#1afa29':'#bfbfbf'}" <!-- :style="{background:i+'-'+item == '5-16'|| i+'-'+item=='9-17'||i+'-'+item=='11-15'?'#1afa29':'#bfbfbf'}"-->
v-for="i in 60" <!-- v-for="i in 60"-->
:key="i">{{i}}-{{item}} <!-- :key="i">{{i}}-{{item}}-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</happy-scroll> <!-- </happy-scroll>-->
<a-radio-group v-model="size2" style="margin:10px 0"> <!-- <a-radio-group v-model="size2" style="margin:10px 0">-->
<a-radio-button value="small"> <!-- <a-radio-button value="small">-->
<!-- -->
</a-radio-button> <!-- </a-radio-button>-->
<a-radio-button value="default"> <!-- <a-radio-button value="default">-->
<!-- -->
</a-radio-button> <!-- </a-radio-button>-->
</a-radio-group> <!-- </a-radio-group>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div>功能暂未开发</div>
</div> </div>
</template> </template>
<script> <script>

@ -29,9 +29,12 @@
:pagination="pagination" :pagination="pagination"
@change="handleGetHistoryList" @change="handleGetHistoryList"
> >
<span slot="streetType" slot-scope="text">
{{ text === null ? '-' : text === 0 ? '单伸' : '双伸' }}
</span>
<span slot="pics" slot-scope="text"> <span slot="pics" slot-scope="text">
<template> <template>
<span v-if="text.putPath || text.goodsPath ||text.outputPath"> <span v-if="text.pics">
<viewer :images="text.pics"> <viewer :images="text.pics">
<img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src" <img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src"
:key="index"/> :key="index"/>
@ -44,7 +47,7 @@
</span> </span>
<span slot="status" slot-scope="text"> <span slot="status" slot-scope="text">
<span :style="text.status == 1 ?' color:red': ''"> <span :style="text.status == 1 ?' color:red': ''">
{{ text.status == null ? '-' : text.status == 0 ? '正常' : '告警' }} {{ text.status == null ? ' ' : text.status == 0 ? '正常' : '告警' }}
</span> </span>
</span> </span>
<span slot="videoPath1" slot-scope="text"> <span slot="videoPath1" slot-scope="text">
@ -99,16 +102,17 @@ export default {
}, },
{ {
title: "巷道", title: "巷道",
dataIndex: "str", dataIndex: "streetName",
width: 90 width: 90
}, },
{ {
title: "货架类型", title: "货架类型",
dataIndex: "type", dataIndex: "streetType",
scopedSlots: {customRender: 'streetType'}
}, },
{ {
title: "货位", title: "货位",
dataIndex: "address", dataIndex: "goodsLocation",
}, },
{ {
title: "时间", title: "时间",
@ -117,12 +121,14 @@ export default {
{ {
title: "照片(入库 货位 出库)", title: "照片(入库 货位 出库)",
// dataIndex: "pic", // dataIndex: "pic",
scopedSlots: {customRender: 'pics'} scopedSlots: {customRender: 'pics'},
width: 300
}, },
{ {
title: "视频状态", title: "视频状态",
// dataIndex: "status", // dataIndex: "status",
scopedSlots: {customRender: 'status'} scopedSlots: {customRender: 'status'},
width: 90
}, },
{ {
title: "视频时长", title: "视频时长",
@ -145,16 +151,13 @@ export default {
}, },
mounted() { mounted() {
this.handleGetHistoryList() this.handleGetHistoryList()
console.log(this.imgUrl)
}, },
methods: { methods: {
handleSearch(){ handleSearch() {
delete this.queryParam.time
console.log(this.queryParam) console.log(this.queryParam)
if(this.queryParam.con_code || this.queryParam.start_time && this.queryParam.end_time ){ this.handleGetHistoryList()
this.handleGetHistoryList()
}else{
this.$message.error('请输入搜索条件')
}
}, },
handleGetHistoryList(pagination) { handleGetHistoryList(pagination) {
console.log(pagination) console.log(pagination)
@ -167,7 +170,7 @@ export default {
this.request(); this.request();
}, },
request() { request() {
this.$api.httpApi.queryList({ this.$api.httpApi.getHistoryList({
data: { data: {
pageNum: this.pageNum, pageNum: this.pageNum,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -175,16 +178,16 @@ export default {
} }
}).then(res => { }).then(res => {
// let pics =new Array() // let pics =new Array()
res.data.map(function (item) { // res.data.list.map(function (item) {
console.log(item) // console.log(item)
console.log('000') // console.log('000')
var pic = [ // var pic = [
item.putPath, item.goodsPath, item.outputPath // item.putPath, item.goodsPath, item.outputPath
] // ]
item.pics = pic // item.pics = pic
}) // })
console.log(res.data) console.log(res.data)
this.data = res.data this.data = res.data.list
}).catch(err => { }).catch(err => {
}); });
@ -192,9 +195,9 @@ export default {
onTimeChange(date, dateString) { onTimeChange(date, dateString) {
this.handleReset() this.handleReset()
console.log(date) console.log(date)
console.log(date[0].format('X')) console.log(date[0].format('YYYY-MM-DD HH:mm:ss'))
this.queryParam.startTimestamp = date[0].format('X') this.queryParam.startTimestamp = date[0].format('YYYY-MM-DD HH:mm:ss')
this.queryParam.endTimestamp = date[1].format('X') this.queryParam.endTimestamp = date[1].format('YYYY-MM-DD HH:mm:ss')
}, },
handleReset() { handleReset() {
this.queryParam.startTimestamp = "" this.queryParam.startTimestamp = ""

@ -0,0 +1,139 @@
<template>
<div>
<a-table
:columns="columns"
:row-key="record => record.id"
:data-source="data"
:pagination="pagination"
@change="handleGetCameraIoList"
>
<span slot="status" slot-scope="text">
{{text == false ? text ='连接异常':text ='没有PLC连接异常'}}
</span>
<span slot="action" slot-scope="text, record">
<a @click="reconnection(record)"></a>
</span>
</a-table>
</div>
</template>
<script>
const columns = [
{
title: '序号',
// dataIndex: 'id',
customRender: (text, record, index) => {
return (
(1 - 1) * 10 + index + 1
)
}
},
{
title: 'PLCID',
dataIndex: 'plcId',
},
{
title: '状态',
dataIndex: 'status',
scopedSlots: {customRender: 'status'}
},
{
title: '异常时间',
dataIndex: 'time',
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: {customRender: 'action'}
},
];
export default {
data() {
return {
pageNum: 1,
pageSize: 10,
data: [],
pagination: {
total: 0,
current: 1,
defaultPageSize: 10, //
showTotal: total => `${total} 条数据`, //
showSizeChanger: true, //
pageSizeOptions: ['10', '20', '30'],
onShowSizeChange: (current, pageSize) => this.pageSize = pageSize //
},
loading: false,
columns,
visible: false,
modelType: '',
modelData: [],
};
},
computed: {},
mounted() {
this.handleGetCameraIoList()
},
methods: {
handleGetCameraIoList(pagination) {
console.log(pagination)
if (pagination) {
this.pagination.current = pagination.current;
this.pagination.pageSize = pagination.pageSize;
this.pageNum = pagination.current;
this.pageSize = pagination.pageSize;
}
this.request();
},
request() {
this.$api.httpApi.disPlcList({
data: {
page: this.pageNum,
size: this.pageSize,
}
}).then(res => {
const pagination = {...this.pagination};
pagination.total = res.data.total;
this.data = res.data;
this.pagination = pagination;
res.data.list.forEach((value, index) => {
value.pageNumber = this.pagination.current
});
}).catch(err => {
});
},
reconnection(data) {
console.log(data.streetId)
var id = data.streetId
this.$axios.get('/plc/tcp', {
params: {id: id}
}).then(res => {
if (res.code == 200) {
this.$message.success('连接成功');
this.handleGetStreetList()
} else {
this.$message.error('连接失败');
}
}).catch(err => {
})
}
},
components: {}
};
</script>
<style lang="scss" scoped>
.button-box {
position: absolute;
top: 0;
right: 20px;
display: flex;
align-items: center;
justify-content: center;
.add {
margin-right: 20px;
}
}
</style>

@ -67,7 +67,7 @@ export default {
}, },
beforeRouteLeave(to,form,next) { beforeRouteLeave(to,form,next) {
if (this.vlcz) { if (this.vlcz.playlist) {
this.vlcz.playlist.stop(); this.vlcz.playlist.stop();
next(true) next(true)
} else { } else {

@ -76,6 +76,8 @@ export default {
}, },
mounted() { mounted() {
this.mdata = this.$route.query.modelData this.mdata = this.$route.query.modelData
this.id = this.$route.query.modelData.id
console.log(this.id)
this.getHdVideos(this.$route.query.modelData.rtsp) this.getHdVideos(this.$route.query.modelData.rtsp)
}, },
beforeRouteLeave(to, form, next) { beforeRouteLeave(to, form, next) {
@ -88,7 +90,7 @@ export default {
}, },
methods: { methods: {
handleCancel() { handleCancel() {
this.$router.go(-1); this.$router.push({name: 'realTimeMonitoring'});
}, },
getHdVideos(rtsp) { getHdVideos(rtsp) {
this.$nextTick(() => { this.$nextTick(() => {

@ -22,7 +22,19 @@
</a-form-item> </a-form-item>
<a-form-item label="PLC-ID" :label-col="formItemAcrossLayout.labelCol"> <a-form-item label="PLC-ID" :label-col="formItemAcrossLayout.labelCol">
<a-input <a-input
v-decorator="['plcId', { rules: [{ required: true, message: '请输入PLC-ID!' }] }]" v-decorator="['plcPort', { rules: [{ required: true, message: '请输入PLC-ID!' }] }]"
/>
</a-form-item>
</div>
<div class="across-layout">
<a-form-item label="PLC IP地址" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcIp', { rules: [{ required: true, message: '请输入PLC IP地址!' }] }]"
/>
</a-form-item>
<a-form-item label="端口" :label-col="formItemAcrossLayout.labelCol">
<a-input
v-decorator="['plcId', { rules: [{ required: true, message: '请输入端口!' }] }]"
/> />
</a-form-item> </a-form-item>
</div> </div>
@ -226,18 +238,20 @@ export default {
// console.log('watch') // console.log('watch')
this.$nextTick(()=>{ //this.$nextTick this.$nextTick(()=>{ //this.$nextTick
this.form.setFieldsValue({ //setFieldsValue form this.form.setFieldsValue({ //setFieldsValue form
name:newVal.name, name: newVal.name,
plcId:newVal.plcId, plcId: newVal.plcId,
leftType:newVal.leftType === null ? '' : newVal.leftType === 0 ? '单伸' : '双伸', plcIp: newVal.plcIp,
leftRow:newVal.leftRow, plcPort: newVal.plcPort,
leftColumn:newVal.leftColumn, leftType: newVal.leftType === null ? '' : newVal.leftType === 0 ? '单伸' : '双伸',
leftShelveId:newVal.leftShelveId, leftRow: newVal.leftRow,
leftInsideShelveId:newVal.leftInsideShelveId, leftColumn: newVal.leftColumn,
leftOutsideShelveId:newVal.leftOutsideShelveId, leftShelveId: newVal.leftShelveId,
rightType:newVal.rightType === null ? '' : newVal.rightType === 0 ? '单伸' : '双伸', leftInsideShelveId: newVal.leftInsideShelveId,
rightRow:newVal.rightRow, leftOutsideShelveId: newVal.leftOutsideShelveId,
rightColumn:newVal.rightColumn, rightType: newVal.rightType === null ? '' : newVal.rightType === 0 ? '单伸' : '双伸',
rightShelveId:newVal.rightShelveId, rightRow: newVal.rightRow,
rightColumn: newVal.rightColumn,
rightShelveId: newVal.rightShelveId,
rightInsideShelveId:newVal.rightInsideShelveId, rightInsideShelveId:newVal.rightInsideShelveId,
rightOutsideShelveId:newVal.rightOutsideShelveId, rightOutsideShelveId:newVal.rightOutsideShelveId,
camera1Id:newVal.camera1Name, camera1Id:newVal.camera1Name,

Loading…
Cancel
Save