|
|
|
@ -19,109 +19,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
const columns = [
|
|
|
|
const columns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '序号',
|
|
|
|
title: '序号',
|
|
|
|
// dataIndex: 'id',
|
|
|
|
// dataIndex: 'id',
|
|
|
|
customRender: (text, record, index) => {
|
|
|
|
customRender: (text, record, index) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
(1 - 1) * 10 + index + 1
|
|
|
|
(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() {
|
|
|
|
title: 'PLCID',
|
|
|
|
this.$api.httpApi.disPlcList({
|
|
|
|
dataIndex: 'plcId',
|
|
|
|
data: {
|
|
|
|
},
|
|
|
|
page: this.pageNum,
|
|
|
|
{
|
|
|
|
size: this.pageSize,
|
|
|
|
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();
|
|
|
|
}).then(res => {
|
|
|
|
},
|
|
|
|
const pagination = {...this.pagination};
|
|
|
|
request() {
|
|
|
|
pagination.total = res.data.total;
|
|
|
|
this.$api.httpApi.disPlcList({
|
|
|
|
this.data = res.data;
|
|
|
|
data: {
|
|
|
|
this.pagination = pagination;
|
|
|
|
page: this.pageNum,
|
|
|
|
res.data.list.forEach((value, index) => {
|
|
|
|
size: this.pageSize,
|
|
|
|
value.pageNumber = this.pagination.current
|
|
|
|
}
|
|
|
|
|
|
|
|
}).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 => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
}).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: {}
|
|
|
|
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>
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.button-box {
|
|
|
|
.button-box {
|
|
|
|
|