| | |
| | | <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 v-model="stacker.isConn" :inactive-text="`${stacker.text}`" disabled ></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 v-model="conveyor.isConn" :inactive-text="`${conveyor.text}`" disabled ></el-switch> |
| | | <el-switch v-model="conveyor.isConn" :inactive-text="`${conveyor.text}`" |
| | | disabled></el-switch> |
| | | </el-card> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <div class="card-page"> |
| | | <el-button type="primary" :plain="isPlain1" @click="floorTogglePlain(1)">一层平面</el-button> |
| | | <el-button type="primary" :plain="isPlain2" @click="floorTogglePlain(2)">二层平面</el-button> |
| | | <el-button type="primary" :plain="isPlain3" @click="floorTogglePlain(3)">三层平面</el-button> |
| | | <el-button type="primary" :plain="floorStates.isPlain1" |
| | | @click="floorTogglePlain(1)">一层平面</el-button> |
| | | <el-button type="primary" :plain="floorStates.isPlain2" |
| | | @click="floorTogglePlain(2)">二层平面</el-button> |
| | | <el-button type="primary" :plain="floorStates.isPlain3" |
| | | @click="floorTogglePlain(3)">三层平面</el-button> |
| | | </div> |
| | | <div style="margin: 40px; height: 50%;"> |
| | | <div class="grid-container-line"> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { ref, reactive } from 'vue'; |
| | | import { listStatus } from '/@/api/wcs/wcsPlc'; |
| | | import { ref, reactive, onMounted } from 'vue'; |
| | | import { listStatus, listPosition } from '/@/api/wcs/wcsPlc'; |
| | | import { signalR } from './signalR'; |
| | | |
| | | const state = ref<any>({}); |
| | | const stackers = ref<any>({}); |
| | |
| | | state.value = res.data.result.modService; |
| | | stackers.value = res.data.result.listPlc.filter(s => s.type == 0); |
| | | conveyors.value = res.data.result.listPlc.filter(s => s.type == 1 || s.type == 4); |
| | | |
| | | var res2 = await listPosition(); |
| | | res2.data.result.forEach(s => { |
| | | if (s.type == 0) { |
| | | // 更新堆垛机数据 |
| | | const foundCell = cellsDataLine.value.find(cell => cell.Code === s.stationNum); |
| | | if (foundCell) { |
| | | //修改高度 |
| | | foundCell.BoxHeight = s.boxHeight; |
| | | } |
| | | } |
| | | else if (s.type == 1) { |
| | | // 更新输送线数据 |
| | | updateCellData(cellsDataOne, s); |
| | | updateCellData(cellsDataTwo, s); |
| | | updateCellData(cellsDataThree, s); |
| | | } |
| | | }); |
| | | }; |
| | | handleQuery(); |
| | | |
| | | //连接signalR 监听变更 |
| | | onMounted(async () => { |
| | | signalR.off('PublicPlcConn'); |
| | | signalR.on('PublicPlcConn', (data: any) => { |
| | | console.log(data) |
| | | if (data.type === 0) { |
| | | // 替换 stackers 中的相应项 |
| | | const index = stackers.value.findIndex(item => item.id === data.id); |
| | | if (index !== -1) { |
| | | stackers.value[index] = data; |
| | | } |
| | | } else if (data.type === 1 || data.type === 4) { |
| | | // 替换 conveyors 中的相应项 |
| | | const index = conveyors.value.findIndex(item => item.id === data.id); |
| | | if (index !== -1) { |
| | | conveyors.value[index] = data; |
| | | } |
| | | } |
| | | console.log(stackers.value[0].isConn) |
| | | }); |
| | | signalR.off('UpdateService'); |
| | | signalR.on('UpdateService', (data: any) => { |
| | | state.value = data; |
| | | }); |
| | | signalR.off('PublicPosition'); |
| | | signalR.on('PublicPosition', (data: any) => { |
| | | |
| | | if (data.type == 1) { |
| | | // 更新输送线数据 |
| | | updateCellData(cellsDataOne, data); |
| | | updateCellData(cellsDataTwo, data); |
| | | updateCellData(cellsDataThree, data); |
| | | } |
| | | else if (data.type == 0) { |
| | | // 更新堆垛机数据 |
| | | const foundCell = cellsDataLine.value.find(cell => cell.Code === data.stationNum); |
| | | if (foundCell) { |
| | | //修改高度 |
| | | foundCell.BoxHeight = data.boxHeight; |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | const handleSwitchChange = (field: string, value: boolean) => { |
| | | const param = { [field]: value }; |
| | | debugger; |
| | | signalR.invoke('UpdateService', param); |
| | | }; |
| | | |
| | | // 更新输送线数据的通用函数 |
| | | function updateCellData(cellsData: any[], data: any) { |
| | | const foundCell = cellsData.find(cell => cell.Code === data.stationNum); |
| | | if (foundCell) { |
| | | if (data.boHaveItem) { |
| | | foundCell.IsUse = 1; |
| | | } |
| | | else { |
| | | foundCell.IsUse = 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | const activeName = ['1', '2', '3']; |
| | | const value1 = ref(false); |
| | | const value2 = ref(false); |
| | | const value3 = ref(false); |
| | | |
| | | //堆垛机数据 |
| | | const cellsDataLine = [ |
| | | const cellsDataLine = ref([ |
| | | { Id: 1, Code: '001', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 2, Code: '002', LineCode: '01', EndLocat: '01010101', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 2, Code: '10', LineCode: '01', EndLocat: '01010101', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 3, Code: '003', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 4, Code: '004', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 5, Code: '005', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 6, Code: '006', LineCode: '02', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 50 }, |
| | | { Id: 6, Code: '20', LineCode: '02', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 7, Code: '007', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 8, Code: '008', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 9, Code: '009', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 10, Code: '010', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 11, Code: '011', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 12, Code: '012', LineCode: '03', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 12, Code: '30', LineCode: '03', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 13, Code: '013', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 14, Code: '014', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 15, Code: '015', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 16, Code: '016', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 17, Code: '017', LineCode: '04', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 17, Code: '40', LineCode: '04', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 18, Code: '018', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 19, Code: '019', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 20, Code: '020', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 21, Code: '021', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 22, Code: '022', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 23, Code: '023', LineCode: '05', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 200 }, |
| | | { Id: 23, Code: '50', LineCode: '05', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 24, Code: '024', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 25, Code: '025', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 26, Code: '026', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 27, Code: '027', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 28, Code: '028', LineCode: '06', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 28, Code: '60', LineCode: '06', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 29, Code: '029', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 30, Code: '030', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 31, Code: '031', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 32, Code: '032', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 33, Code: '033', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 34, Code: '034', LineCode: '07', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 34, Code: '70', LineCode: '07', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 35, Code: '035', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 36, Code: '036', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 37, Code: '037', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 38, Code: '038', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 39, Code: '039', LineCode: '08', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 39, Code: '80', LineCode: '08', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 40, Code: '040', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 41, Code: '041', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 42, Code: '042', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 43, Code: '043', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 44, Code: '044', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 45, Code: '045', LineCode: '09', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 45, Code: '90', LineCode: '09', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 46, Code: '046', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 47, Code: '047', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 48, Code: '048', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 49, Code: '049', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 50, Code: '050', LineCode: '10', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 10 }, |
| | | { Id: 50, Code: '100', LineCode: '10', EndLocat: '', IsShow: 0, IsUse: 0, BoxHeight: 0 }, |
| | | { Id: 51, Code: '051', LineCode: '', EndLocat: '', IsShow: 1, IsUse: 0, BoxHeight: 10 }, |
| | | ]; |
| | | ]); |
| | | |
| | | //一层输送线数据 |
| | | const cellsDataOne = [ |
| | |
| | | { Id: 202, Code: '', IsShow: 0, IsUse: 2 }, |
| | | { Id: 203, Code: '', IsShow: 1, IsUse: 0 }, |
| | | { Id: 204, Code: '', IsShow: 0, IsUse: 2 }, |
| | | { Id:205 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:206 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:207 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:208 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:209 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:210 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:211 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:212 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:213 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:214 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:215 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:216 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:217 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:218 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:219 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:220 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:221 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:222 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:223 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:224 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:225 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:226 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:227 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:228 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:229 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:230 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:231 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:232 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:233 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:234 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:235 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:236 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:237 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:238 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:239 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:240 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:241 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:242 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:243 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:244 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:245 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:246 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:247 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:248 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:249 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:250 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:251 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:252 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:253 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id:254 , Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 205, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 206, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 207, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 208, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 209, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 210, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 211, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 212, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 213, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 214, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 215, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 216, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 217, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 218, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 219, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 220, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 221, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 222, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 223, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 224, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 225, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 226, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 227, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 228, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 229, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 230, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 231, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 232, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 233, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 234, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 235, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 236, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 237, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 238, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 239, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 240, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 241, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 242, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 243, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 244, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 245, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 246, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 247, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 248, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 249, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 250, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 251, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 252, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 253, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 254, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 255, Code: '', IsShow: 0, IsUse: 3 }, |
| | | { Id: 256, Code: '', IsShow: 1, IsUse: 0 }, |
| | | { Id: 257, Code: '', IsShow: 1, IsUse: 0 }, |
| | |
| | | //输送线数据 |
| | | let cellsData = ref(cellsDataOne); |
| | | |
| | | const isPlain1 = ref(false);//一层 |
| | | const isPlain2 = ref(true);//二层 |
| | | const isPlain3 = ref(true);//三层 |
| | | |
| | | // 层平面状态 |
| | | const floorStates = ref({ |
| | | isPlain1: false, |
| | | isPlain2: true, |
| | | isPlain3: true |
| | | }); |
| | | |
| | | //切换层平面 |
| | | function floorTogglePlain(buttonNumber) { |
| | | if (buttonNumber === 1) { |
| | | isPlain1.value = !isPlain1.value; |
| | | isPlain2.value = true; |
| | | isPlain3.value = true; |
| | | const floorData = [cellsDataOne, cellsDataTwo, cellsDataThree]; |
| | | |
| | | cellsData.value = cellsDataOne; |
| | | } else if (buttonNumber === 2) { |
| | | isPlain2.value = !isPlain2.value; |
| | | isPlain1.value = true; |
| | | isPlain3.value = true; |
| | | |
| | | cellsData.value = cellsDataTwo; |
| | | } else if (buttonNumber === 3) { |
| | | isPlain3.value = !isPlain3.value; |
| | | isPlain1.value = true; |
| | | isPlain2.value = true; |
| | | |
| | | cellsData.value = cellsDataThree; |
| | | if (buttonNumber >= 1 && buttonNumber <= 3) { |
| | | const index = buttonNumber - 1; |
| | | floorStates.value = { |
| | | isPlain1: index !== 0, |
| | | isPlain2: index !== 1, |
| | | isPlain3: index !== 2 |
| | | }; |
| | | cellsData.value = floorData[index]; |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | .grid-container-line { |
| | | display: grid; |
| | | grid-template-columns: repeat(51, 1fr); /* 自适应列宽 */ |
| | | grid-template-rows: 1fr; /* 自适应行高 */ |
| | | grid-template-columns: repeat(51, 1fr); |
| | | /* 自适应列宽 */ |
| | | grid-template-rows: 1fr; |
| | | /* 自适应行高 */ |
| | | gap: 0; |
| | | margin-top: 25px; |
| | | width: 100%; /* 宽度自适应 */ |
| | | height: 1fr; /* 高度自适应 */ |
| | | width: 100%; |
| | | /* 宽度自适应 */ |
| | | height: 1fr; |
| | | /* 高度自适应 */ |
| | | } |
| | | |
| | | .grid-item-line { |
| | |
| | | background-color: #9c9c9c; |
| | | border: 1px solid #797777; |
| | | text-align: center; |
| | | line-height: 1.4vw; /* 行高 */ |
| | | width: 100%; /* 自适应宽度 */ |
| | | height: 100%; /* 自适应高度 */ |
| | | line-height: 1.4vw; |
| | | /* 行高 */ |
| | | width: 100%; |
| | | /* 自适应宽度 */ |
| | | height: 100%; |
| | | /* 自适应高度 */ |
| | | color: #fff; |
| | | font-size: 0.7vw; |
| | | } |
| | |
| | | .active2>div { |
| | | display: none; |
| | | } |
| | | |
| | | .active3 { |
| | | background-color: #fff; |
| | | border:1px solid red; |
| | | border: 1px solid red; |
| | | } |
| | | |
| | | .active3>div { |
| | | display: none; |
| | | } |