语法检查格式修复

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

@ -51,7 +51,7 @@
</template> </template>
<script> <script>
import Model from "./model.vue" import Model from "./model.vue"
export default { export default {
name: "historyMonitoring", name: "historyMonitoring",
components: { components: {

@ -63,40 +63,40 @@
} }
</style> </style>
<script> <script>
export default { export default {
props: ['visible', 'vid'], props: ['visible', 'vid'],
watch: { watch: {
//visibleisShowprops //visibleisShowprops
visible: function (newVal) { visible: function (newVal) {
this.isShow = newVal; //newValvisible this.isShow = newVal; //newValvisible
// newVal && this.showConfirm(); //newValshowConfirm // newVal && this.showConfirm(); //newValshowConfirm
}, },
vid: function (newVal) { vid: function (newVal) {
console.log(newVal) console.log(newVal)
console.log(1111111) console.log(1111111)
this.video = newVal this.video = newVal
this.$nextTick(() => { //this.$nextTick this.$nextTick(() => { //this.$nextTick
}) })
},
},
data() {
return {
isShow: false,
confirmLoading: false,
video: '',
};
}, },
mounted() { },
console.log('mounted执行了') data() {
return {
isShow: false,
confirmLoading: false,
video: '',
};
},
mounted() {
console.log('mounted执行了')
},
methods: {
handleCancel() {
this.$emit('close', false, '')
}, },
methods: {
handleCancel() {
this.$emit('close', false, '')
},
}, },
}; };
</script> </script>

@ -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 {

Loading…
Cancel
Save