Compare commits
8 Commits
3e6712ddc5
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| f0562eade5 | |||
| 396e09f696 | |||
| 0402b24568 | |||
| dcbece43f8 | |||
| 4cd26e2f47 | |||
| 35c3b18b0c | |||
| b31e9539fd | |||
| 72af437415 |
@@ -3,5 +3,6 @@ ENV = 'production'
|
|||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = ''
|
VUE_APP_BASE_API = ''
|
||||||
|
VUE_APP_WB_API = 'a.wms.picaiba.com'
|
||||||
VUE_APP_REPORT_DESIGN_URL = '/ureport/designer'
|
VUE_APP_REPORT_DESIGN_URL = '/ureport/designer'
|
||||||
VUE_APP_REPORT_VIEW_URL = '/ureport/preview'
|
VUE_APP_REPORT_VIEW_URL = '/ureport/preview'
|
||||||
|
|||||||
2
dist/index.html
vendored
2
dist/index.html
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/static/css/chunk-130d547d.692e3f17.css
vendored
Normal file
1
dist/static/css/chunk-130d547d.692e3f17.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.app-container[data-v-3a23e516]{width:100%;height:200px}.waring[data-v-3a23e516]{padding:5px;border-radius:5px;background-color:#f56c6c;color:#fff}.normal[data-v-3a23e516]{padding:5px;border-radius:5px;background-color:#67c23a;color:#fff}
|
||||||
1
dist/static/css/chunk-fc6258c6.923bc0fc.css
vendored
Normal file
1
dist/static/css/chunk-fc6258c6.923bc0fc.css
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.app-container[data-v-3a23e516]{width:100%;height:200px}.waring[data-v-3a23e516]{padding:5px;border-radius:5px;background-color:#f56c6c;color:#fff}.normal[data-v-3a23e516]{padding:5px;border-radius:5px;background-color:#67c23a;color:#fff}.btn-container[data-v-2e322fe2]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.btndiv[data-v-2e322fe2]{width:20%;height:100px;margin:auto}.box-card[data-v-2e322fe2]{background-color:#3e8ef7;margin:10px;color:#fff}
|
||||||
1
dist/static/js/app.6fb7a37a.js
vendored
Normal file
1
dist/static/js/app.6fb7a37a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/static/js/app.ffca9489.js
vendored
1
dist/static/js/app.ffca9489.js
vendored
File diff suppressed because one or more lines are too long
1
dist/static/js/chunk-130d547d.3fa1079f.js
vendored
Normal file
1
dist/static/js/chunk-130d547d.3fa1079f.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/static/js/chunk-fc6258c6.2ed177c7.js
vendored
Normal file
1
dist/static/js/chunk-fc6258c6.2ed177c7.js
vendored
Normal file
File diff suppressed because one or more lines are too long
244
src/api/EAP.js
Normal file
244
src/api/EAP.js
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function AlarmCleared() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendAlarmClearedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function AlarmDetected() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendAlarmDetectedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CompleteProcessFlow() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendCompleteProcessFlowEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ControlStateLocal() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendControlStateLocalEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ControlStateRemote() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendControlStateRemoteEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function E10StateChanged() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendE10StateChangedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function EmptyCassettereport() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendEmptyCassettereportEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function EquipmentOffline() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendEquipmentOfflineEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MaintenancePlan() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendMaintenancePlanEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MaintenanceRecord() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendMaintenanceRecordEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MaterialReceived() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendMaterialReceivedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function MaterialRemoved() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendMaterialRemovedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function OKsubstratereport() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendOKsubstratereportEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function PowerConsumption() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendPowerConsumptionEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ProcessingCompleted() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendProcessingCompletedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ProcessingStarted() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendProcessingStartedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ProcessingStopped() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendProcessingStoppedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function QCPChange() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendQCPChangeEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function RepairRecord() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendRepairRecordEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Scrapsubstratereport() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendScrapsubstratereportEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ShuttleMovementFinished() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendShuttleMovementFinishedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ShuttleMovementStart() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendShuttleMovementStartEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SpoolTransmitFailure() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendSpoolTransmitFailureEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SpoolingActivated() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendSpoolingActivatedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SpoolingDeactivated() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendSpoolingDeactivatedEvent',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function DisableEnableCommunication(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendDisableEnableCommunication',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain'
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getCommunicationState() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/communicationState/get',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getcontrollerState() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/controllerState/get',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendControllerState(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendControllerState',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain'
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendEqpState(data) {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendEqpState',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'text/plain'
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendReportLinkedEventAndVid() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendReportLinkedEventAndVid',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendSecsGemSetting() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendSecsGemSetting',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function sendAlarmReport() {
|
||||||
|
return request({
|
||||||
|
url: '/cigs-00a/IL1testcontroller/post/sendAlarmReport',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -267,6 +267,14 @@ export default {
|
|||||||
zh: '首页',
|
zh: '首页',
|
||||||
en: 'Home'
|
en: 'Home'
|
||||||
},
|
},
|
||||||
|
eap: {
|
||||||
|
zh: 'EAP',
|
||||||
|
en: 'EAP'
|
||||||
|
},
|
||||||
|
eapControl: {
|
||||||
|
zh: 'EAP控制',
|
||||||
|
en: 'EAP Control'
|
||||||
|
},
|
||||||
basic: {
|
basic: {
|
||||||
zh: '系统管理',
|
zh: '系统管理',
|
||||||
en: 'System Manager',
|
en: 'System Manager',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
{{ 'navbar.homepage' | i18nFilter }}
|
{{ 'navbar.homepage' | i18nFilter }}
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item hover-effect" trigger="click">
|
<el-dropdown :style="showTitle ? 'color: #fff' : '#000'" class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||||
|
<el-dropdown-menu />
|
||||||
<el-badge :hidden="alarmNum>0?false:true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
|
<el-badge :hidden="alarmNum>0?false:true" :value="alarmNum" class="item" style="line-height: 0; margin: 0 10px; vertical-align: -3px" @click.native="handleAlarm">
|
||||||
<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
|
<svg-icon style="width: 24px; height: 24px" class="item-icon" icon-class="alarm" />
|
||||||
</el-badge>
|
</el-badge>
|
||||||
|
|||||||
@@ -92,6 +92,28 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/eap',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/eap',
|
||||||
|
name: 'eap',
|
||||||
|
meta: { title: routerTitle.eap?.[language] || routerTitle.eap.en, icon: 'form', iconPart: 'ArtManager', affix: true, required: true, requireToken: true },
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'eap',
|
||||||
|
component: () => import('@/views/EAP/index'),
|
||||||
|
name: 'eap',
|
||||||
|
meta: { title: routerTitle.eap?.[language] || routerTitle.eap.en, icon: 'form', affix: true, required: true, requireToken: true, noCache: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'eapControl',
|
||||||
|
component: () => import('@/views/EAP/eapControl'),
|
||||||
|
name: 'eapControl',
|
||||||
|
hidden: true,
|
||||||
|
meta: { title: routerTitle.eapControl?.[language] || routerTitle.eapControl.en, icon: 'form', affix: true, required: true, requireToken: true, noCache: true }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
|
|||||||
307
src/views/EAP/eapControl.vue
Normal file
307
src/views/EAP/eapControl.vue
Normal file
@@ -0,0 +1,307 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2020-12-29 15:41:11
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2022-08-05 09:09:17
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-form
|
||||||
|
ref="dataForm"
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="rules"
|
||||||
|
size="medium"
|
||||||
|
label-position="left"
|
||||||
|
>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="communication状态" prop="communicationState" required>
|
||||||
|
<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> -->
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="false" :span="6" :offset="1">
|
||||||
|
<el-form-item label="eqpState" prop="eqpState">
|
||||||
|
<el-select v-model="dataForm.eqpState" placeholder="请选择下拉选择" clearable @change="eqpStateChange">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in eqpStateArr"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<!-- <div v-show="eqpStatusShow">Result ={{ eqpStatus }}</div> -->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="controllerState" prop="controllerState">
|
||||||
|
<el-select v-model="dataForm.controllerState" placeholder="请选择下拉选择" clearable @change="controllerStateChange">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in controllerStateArr"
|
||||||
|
:key="index"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<span :class="controllerInfo === 'offline'? 'waring' : 'normal'">{{ controllerInfo }}</span>
|
||||||
|
<!-- <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>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
DisableEnableCommunication,
|
||||||
|
getCommunicationState,
|
||||||
|
getcontrollerState,
|
||||||
|
sendEqpState,
|
||||||
|
sendControllerState,
|
||||||
|
sendReportLinkedEventAndVid,
|
||||||
|
sendSecsGemSetting,
|
||||||
|
sendAlarmReport
|
||||||
|
} from '@/api/EAP'
|
||||||
|
/**
|
||||||
|
* 表格表头配置项 TypeScript接口注释
|
||||||
|
* tableConfig<ConfigItem> = []
|
||||||
|
*
|
||||||
|
* Interface ConfigItem = {
|
||||||
|
* prop: string,
|
||||||
|
* label: string,
|
||||||
|
* width: string,
|
||||||
|
* align: string,
|
||||||
|
* subcomponent: function,
|
||||||
|
* filter: function
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Aspc',
|
||||||
|
components: { },
|
||||||
|
filters: {
|
||||||
|
statusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
published: 'success',
|
||||||
|
draft: 'info',
|
||||||
|
deleted: 'danger'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataForm: {
|
||||||
|
communicationState: 0,
|
||||||
|
eqpState: undefined,
|
||||||
|
controllerState: undefined
|
||||||
|
},
|
||||||
|
controllerStatus: '',
|
||||||
|
eqpStatus: '',
|
||||||
|
communicationStatus: '',
|
||||||
|
communicationShow: false,
|
||||||
|
eqpStatusShow: false,
|
||||||
|
controllerStatusShow: false,
|
||||||
|
controllerInfo: '',
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
eqpStateArr: [{
|
||||||
|
'label': 'local',
|
||||||
|
'value': 4
|
||||||
|
}, {
|
||||||
|
'label': 'remote',
|
||||||
|
'value': 5
|
||||||
|
}],
|
||||||
|
controllerStateArr: [{
|
||||||
|
'label': 'offline',
|
||||||
|
'value': 1
|
||||||
|
}, {
|
||||||
|
'label': 'local',
|
||||||
|
'value': 2
|
||||||
|
}, {
|
||||||
|
'label': 'remote',
|
||||||
|
'value': 3
|
||||||
|
}],
|
||||||
|
websock: '',
|
||||||
|
url: '',
|
||||||
|
wbData: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getState()
|
||||||
|
this.url = process.env.VUE_APP_WB_API
|
||||||
|
this.initWebSocket()
|
||||||
|
getCommunicationState().then(res => {
|
||||||
|
this.dataForm.communicationState = res.data.communicationState
|
||||||
|
})
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
// 页面销毁时关闭ws连接
|
||||||
|
if (this.websock) {
|
||||||
|
this.websock.close() // 关闭websocket
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
switchChange() {
|
||||||
|
this.communicationShow = false
|
||||||
|
const cState = this.dataForm.communicationState ? 0 : 1
|
||||||
|
DisableEnableCommunication(cState).then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
eqpStateChange() {
|
||||||
|
this.eqpStatusShow = false
|
||||||
|
sendEqpState(this.dataForm.eqpState).then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
controllerStateChange() {
|
||||||
|
this.controllerStatusShow = false
|
||||||
|
sendControllerState(this.dataForm.controllerState).then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getState() {
|
||||||
|
getcontrollerState().then(res => {
|
||||||
|
if (res.data.controllerState === 1) {
|
||||||
|
this.dataForm.controllerState = 1
|
||||||
|
this.controllerInfo = 'offline'
|
||||||
|
} else if (res.data.eqpState === 4) {
|
||||||
|
this.dataForm.controllerState = 2
|
||||||
|
this.controllerInfo = 'local'
|
||||||
|
} else if (res.data.eqpState === 5) {
|
||||||
|
this.dataForm.controllerState = 3
|
||||||
|
this.controllerInfo = 'remote'
|
||||||
|
}
|
||||||
|
this.dataForm.eqpState = res.data.eqpState
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendReportLinkedEventAndVid() {
|
||||||
|
sendReportLinkedEventAndVid().then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
sendSecsGemSetting() {
|
||||||
|
sendSecsGemSetting().then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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)}`
|
||||||
|
this.websock = new WebSocket(path)
|
||||||
|
this.websock.onmessage = this.websocketonmessage
|
||||||
|
this.websock.onopen = this.websocketonopen
|
||||||
|
this.websock.onerror = this.websocketonerror
|
||||||
|
this.websock.onclose = this.websocketclose
|
||||||
|
},
|
||||||
|
websocketonopen() {
|
||||||
|
console.log('websocketonopen')
|
||||||
|
// 连接建立之后执行send方法发送数据
|
||||||
|
// this.websocketsend(JSON.stringify('2'))
|
||||||
|
},
|
||||||
|
websocketonerror() {
|
||||||
|
// 连接建立失败重连
|
||||||
|
this.initWebSocket()
|
||||||
|
},
|
||||||
|
websocketonmessage(e) {
|
||||||
|
// 数据接收
|
||||||
|
this.wbData = JSON.parse(e.data)
|
||||||
|
console.log(this.wbData)
|
||||||
|
if (this.wbData.controllerState) {
|
||||||
|
this.controllerStatus = this.wbData.vidResult
|
||||||
|
if (this.wbData.controllerState === '1') {
|
||||||
|
this.dataForm.controllerState = 1
|
||||||
|
this.controllerInfo = 'offline'
|
||||||
|
} else if (this.wbData.eqpState === '4') {
|
||||||
|
this.dataForm.controllerState = 2
|
||||||
|
this.controllerInfo = 'local'
|
||||||
|
} else if (this.wbData.eqpState === '5') {
|
||||||
|
this.dataForm.controllerState = 3
|
||||||
|
this.controllerInfo = 'remote'
|
||||||
|
}
|
||||||
|
this.controllerStatusShow = true
|
||||||
|
} else if (this.wbData.eqpState) {
|
||||||
|
this.eqpStatus = this.wbData.eqpResult
|
||||||
|
this.dataForm.eqpState = parseInt(this.wbData.eqpState)
|
||||||
|
this.eqpStatusShow = true
|
||||||
|
} else {
|
||||||
|
this.communicationStatus = this.wbData.communicationResult
|
||||||
|
this.dataForm.communicationState = parseInt(this.wbData.connectState)
|
||||||
|
this.communicationShow = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
websocketsend(val) {
|
||||||
|
// 数据发送
|
||||||
|
this.websock.send(val)
|
||||||
|
},
|
||||||
|
websocketclose(e) {
|
||||||
|
// 关闭
|
||||||
|
console.log('断开连接', e)
|
||||||
|
this.initWebSocket()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.app-container{
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.waring{
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #F56C6C;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.normal{
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #67C23A;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
115
src/views/EAP/index.vue
Normal file
115
src/views/EAP/index.vue
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2020-12-29 15:41:11
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2022-08-03 16:30:27
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="btn-container">
|
||||||
|
<div v-for="(item,index) in btnList" :key="index" class="btndiv">
|
||||||
|
<el-card class="box-card" @click.native="sendInfo(item)">{{ item }}</el-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<spc-control />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as spcApi from '@/api/EAP'
|
||||||
|
import spcControl from './eapControl'
|
||||||
|
// , handleLimit
|
||||||
|
/**
|
||||||
|
* 表格表头配置项 TypeScript接口注释
|
||||||
|
* tableConfig<ConfigItem> = []
|
||||||
|
*
|
||||||
|
* Interface ConfigItem = {
|
||||||
|
* prop: string,
|
||||||
|
* label: string,
|
||||||
|
* width: string,
|
||||||
|
* align: string,
|
||||||
|
* subcomponent: function,
|
||||||
|
* filter: function
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Aspc',
|
||||||
|
components: { spcControl },
|
||||||
|
filters: {
|
||||||
|
statusFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
published: 'success',
|
||||||
|
draft: 'info',
|
||||||
|
deleted: 'danger'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btnList: [
|
||||||
|
'EquipmentOffline',
|
||||||
|
'ControlStateLocal',
|
||||||
|
'ControlStateRemote',
|
||||||
|
'AlarmDetected',
|
||||||
|
'AlarmCleared',
|
||||||
|
// 'SpoolTransmitFailure',
|
||||||
|
// 'SpoolingActivated',
|
||||||
|
// 'SpoolingDeactivated',
|
||||||
|
'ProcessingStarted',
|
||||||
|
'ProcessingCompleted',
|
||||||
|
'ProcessingStopped',
|
||||||
|
'MaterialReceived',
|
||||||
|
'MaterialRemoved',
|
||||||
|
'E10StateChanged',
|
||||||
|
'CompleteProcessFlow',
|
||||||
|
'MaintenancePlan',
|
||||||
|
'MaintenanceRecord',
|
||||||
|
'RepairRecord',
|
||||||
|
'ShuttleMovementStart',
|
||||||
|
'ShuttleMovementFinished',
|
||||||
|
'QCPChange',
|
||||||
|
'PowerConsumption',
|
||||||
|
'OKsubstratereport',
|
||||||
|
'Scrapsubstratereport',
|
||||||
|
'EmptyCassettereport'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
sendInfo(name) {
|
||||||
|
spcApi[name]().then(response => {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('module.basicData.visual.success'),
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.btn-container{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.btndiv{
|
||||||
|
width: 20%;
|
||||||
|
height: 100px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.box-card{
|
||||||
|
background-color: #3e8ef7;
|
||||||
|
margin: 10px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user