| | |
| | | <el-collapse v-model="activeName"> |
| | | <el-collapse-item title="设备控制" name="1"> |
| | | <el-card class="box-card" shadow="hover"> |
| | | <el-switch v-model="state.boRunningState" active-text="" inactive-text="程序服务"></el-switch> |
| | | <el-switch v-model="state.boRunningState" active-text="" inactive-text="程序服务" |
| | | @change="handleSwitchChange('boRunningState', $event)"></el-switch> |
| | | </el-card> |
| | | <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> |
| | | <el-switch v-model="state.boOffline" active-text="" inactive-text="脱机模式"></el-switch> |
| | | <el-switch v-model="state.boOffline" active-text="" inactive-text="脱机模式" |
| | | @change="handleSwitchChange('boOffline', $event)"></el-switch> |
| | | </el-card> |
| | | <el-card class="box-card" shadow="hover" style="margin-top: 3px;"> |
| | | <el-switch v-model="state.boRefresh" active-text="" inactive-text="自刷新"></el-switch> |
| | | <el-switch v-model="state.boRefresh" active-text="" inactive-text="自刷新" |
| | | @change="handleSwitchChange('boRefresh', $event)"></el-switch> |
| | | </el-card> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="堆垛机" name="2"> |
| | | <div style="overflow-x: auto;white-space: nowrap;"> |
| | | <el-card v-for="(stacker, index) in stackers" :key="index" class="box-card" shadow="hover"> |
| | | <el-switch disabled v-model="stacker.isConn" :inactive-text="`${stacker.text}`"></el-switch> |
| | | <el-switch v-model="stacker.isConn" :inactive-text="`${stacker.text}`" |
| | | disabled></el-switch> |
| | | </el-card> |
| | | </div> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="输送线" name="3"> |
| | | <el-card v-for="(conveyor, index) in conveyors" :key="index" class="box-card" shadow="hover"> |
| | | <el-switch disabled v-model="conveyor.isConn" :inactive-text="`${conveyor.text}`"></el-switch> |
| | | <el-switch v-model="conveyor.isConn" :inactive-text="`${conveyor.text}`" |
| | | disabled></el-switch> |
| | | </el-card> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | |
| | | import { listStatus } from '/@/api/wcs/wcsPlc'; |
| | | import { signalR } from './signalR'; |
| | | |
| | | |
| | | const state = ref<any>({}); |
| | | const stackers = ref<any>({}); |
| | | const conveyors = ref<any>({}); |
| | |
| | | } |
| | | console.log(stackers.value[0].isConn) |
| | | }); |
| | | signalR.off('UpdateService'); |
| | | signalR.on('UpdateService', (data: any) => { |
| | | state.value = data; |
| | | }); |
| | | }); |
| | | const handleSwitchChange = (field: string, value: boolean) => { |
| | | signalR.invoke('UpdateService',state.value); |
| | | }; |
| | | |
| | | |
| | | const activeName = ['1', '2', '3']; |
| | | const value1 = ref(false); |
| | |
| | | |
| | | |
| | | //输送线数据 |
| | | let cellsData = ref(cellsDataOne);; |
| | | let cellsData = ref(cellsDataOne); |
| | | |
| | | const isPlain1 = ref(false);//一层 |
| | | const isPlain2 = ref(true);//二层 |
| | |
| | | .active2>div { |
| | | display: none; |
| | | } |
| | | |
| | | .active3 { |
| | | background-color: #fff; |
| | | border:1px solid red; |
| | | } |
| | | |
| | | .active3>div { |
| | | display: none; |
| | | } |