|
|
@@ -2,7 +2,7 @@ |
|
|
|
* @Author: zwq |
|
|
|
* @Date: 2020-12-29 15:41:11 |
|
|
|
* @LastEditors: zwq |
|
|
|
* @LastEditTime: 2022-07-29 16:01:24 |
|
|
|
* @LastEditTime: 2022-08-05 09:09:17 |
|
|
|
* @Description: |
|
|
|
--> |
|
|
|
<template> |
|
|
@@ -20,7 +20,7 @@ |
|
|
|
<span :class="dataForm.communicationState === 0? 'waring' : 'normal'">{{ dataForm.communicationState === 0? 'off' : 'on' }}</span> |
|
|
|
<el-button type="primary" size="mini" @click="switchChange()">控制</el-button> |
|
|
|
</el-form-item> |
|
|
|
<div v-show="communicationShow">Result ={{ communicationStatus }}</div> |
|
|
|
<!-- <div v-show="communicationShow">Result ={{ communicationStatus }}</div> --> |
|
|
|
</el-col> |
|
|
|
<el-col v-if="false" :span="6" :offset="1"> |
|
|
|
<el-form-item label="eqpState" prop="eqpState"> |
|
|
@@ -32,7 +32,7 @@ |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<div v-show="eqpStatusShow">Result ={{ eqpStatus }}</div> |
|
|
|
<!-- <div v-show="eqpStatusShow">Result ={{ eqpStatus }}</div> --> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
@@ -46,13 +46,16 @@ |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<span :class="controllerInfo === 'offline'? 'waring' : 'normal'">{{ controllerInfo }}</span> |
|
|
|
<div v-show="controllerStatusShow">Result ={{ controllerStatus }}</div> |
|
|
|
<!-- <div v-show="controllerStatusShow">Result ={{ controllerStatus }}</div> --> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
<el-col :span="3" :offset="2"> |
|
|
|
<el-button type="primary" @click="sendSecsGemSetting()">Setting</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-button type="primary" @click="sendAlarmReport()">AlarmReport</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col v-if="false" :span="3"> |
|
|
|
<el-button type="primary" @click="sendReportLinkedEventAndVid()"> ReportLinkedEventAndVid </el-button> |
|
|
|
</el-col> |
|
|
@@ -68,8 +71,9 @@ import { |
|
|
|
sendEqpState, |
|
|
|
sendControllerState, |
|
|
|
sendReportLinkedEventAndVid, |
|
|
|
sendSecsGemSetting |
|
|
|
} from '@/api/00a-spc' |
|
|
|
sendSecsGemSetting, |
|
|
|
sendAlarmReport |
|
|
|
} from '@/api/EAP' |
|
|
|
/** |
|
|
|
* 表格表头配置项 TypeScript接口注释 |
|
|
|
* tableConfig<ConfigItem> = [] |
|
|
@@ -216,6 +220,15 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
sendAlarmReport() { |
|
|
|
sendAlarmReport().then(response => { |
|
|
|
this.$message({ |
|
|
|
message: this.$t('module.basicData.visual.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
initWebSocket() { |
|
|
|
// 初始化weosocket |
|
|
|
const path = `ws://${this.url}/opcua/websocket/${Math.round(Math.random() * 100)}` |
|
|
@@ -226,6 +239,7 @@ export default { |
|
|
|
this.websock.onclose = this.websocketclose |
|
|
|
}, |
|
|
|
websocketonopen() { |
|
|
|
console.log('websocketonopen') |
|
|
|
// 连接建立之后执行send方法发送数据 |
|
|
|
// this.websocketsend(JSON.stringify('2')) |
|
|
|
}, |
|
|
@@ -267,6 +281,7 @@ export default { |
|
|
|
websocketclose(e) { |
|
|
|
// 关闭 |
|
|
|
console.log('断开连接', e) |
|
|
|
this.initWebSocket() |
|
|
|
} |
|
|
|
} |
|
|
|
} |