| | |
| | | const flakea = ref(false) |
| | | const flakeb = ref(false) |
| | | const flakec = ref(false) |
| | | const user = ref(''); |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | | const id = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | import { WebSocketHost ,host} from '@/utils/constants' |
| | | import request from "@/utils/request" |
| | | const ida = ref(null); |
| | |
| | | if (response.code == 200) { |
| | | tableDataa.value = response.data |
| | | if (tableDataa.value.length === 4) { |
| | | if (tableDataa.value[0].patternHeight > 0) { |
| | | if (tableDataa.value[0].patternHeight > 0 && tableDataa.value[0].patternWidth > 0 && tableDataa.value[0].number > 0) { |
| | | flake.value = true; |
| | | } |
| | | if (tableDataa.value[1].patternHeight > 0) { |
| | | if (tableDataa.value[1].patternHeight > 0 && tableDataa.value[1].patternWidth > 0 && tableDataa.value[1].number > 0) { |
| | | flakea.value = true; |
| | | } |
| | | if (tableDataa.value[2].patternHeight > 0) { |
| | | if (tableDataa.value[2].patternHeight > 0 && tableDataa.value[2].patternWidth > 0 && tableDataa.value[2].number > 0) { |
| | | flakeb.value = true; |
| | | } |
| | | if (tableDataa.value[3].patternHeight > 0) { |
| | | if (tableDataa.value[3].patternHeight > 0 && tableDataa.value[3].patternWidth > 0 && tableDataa.value[3].number > 0) { |
| | | flakec.value = true; |
| | | } |
| | | } |
| | |
| | | onBeforeUnmount(() => { |
| | | closeWebSocket(); |
| | | }); |
| | | const user = ref(''); |
| | | const projectNo = ref(''); |
| | | const workstationId = ref(''); |
| | | const id = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternWidth = ref(''); |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | // 添加 |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.value) |
| | | // window.localStorage.setItem('workstationId', workstationId.value) |
| | | // window.localStorage.setItem('patternHeight', selectedValuea.value) |
| | | // window.localStorage.setItem('patternWidth', selectedValue.value) |
| | | // window.localStorage.setItem('number', number.value) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | add.value = false; |
| | | tableDataa.value = response.data; |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | let patternHeight = window.localStorage.getItem('patternHeight') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | // let workstationId = window.localStorage.getItem('workstationId') |
| | | // let patternHeight = window.localStorage.getItem('patternHeight') |
| | | // let patternWidth = window.localStorage.getItem('patternWidth') |
| | | // let number = window.localStorage.getItem('number') |
| | | if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '1') { |
| | | flake.value = true |
| | | } else if (patternHeight !== '' && workstationId === '2'){ |
| | | } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '4'){ |
| | | flakec.value = true |
| | | } |
| | | // if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '1') { |
| | | // flake.value = true |
| | | // } else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '2'){ |
| | | // flakea.value = true |
| | | // }else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '3'){ |
| | | // flakeb.value = true |
| | | // }else if (patternHeight !== '0' && patternWidth !== '0' && number !== '0' && workstationId === '4'){ |
| | | // flakec.value = true |
| | | // } |
| | | selectedValuea.value = ''; |
| | | selectedValue.value = ''; |
| | | selectedValueb.value = ''; |
| | |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else if( ida.value === 1 || ida.value === 3){ |
| | |
| | | patternThickness: selectedValuec.value, |
| | | number: number.value |
| | | }); |
| | | window.localStorage.setItem('workstationId', workstationId.value) |
| | | window.localStorage.setItem('patternHeight', selectedValuea.value) |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | | // window.location.reload() |
| | | add.value = false; |
| | | tableDataa.value = response.data; |
| | | let workstationId = window.localStorage.getItem('workstationId') |
| | | let patternHeight = window.localStorage.getItem('patternHeight') |
| | | if (patternHeight !== '' && workstationId === '1') { |
| | | if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '1') { |
| | | flake.value = true |
| | | } else if (patternHeight !== '' && workstationId === '2'){ |
| | | } else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '2'){ |
| | | flakea.value = true |
| | | }else if (patternHeight !== '' && workstationId === '3'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '3'){ |
| | | flakeb.value = true |
| | | }else if (patternHeight !== '' && workstationId === '4'){ |
| | | }else if (selectedValuea.value !== '0' && selectedValue.value !== '0' && number.value !== '0' && workstationId.value === '4'){ |
| | | flakec.value = true |
| | | } |
| | | selectedValuea.value = ''; |
| | |
| | | } |
| | | } catch (error) { |
| | | // 处理请求错误 |
| | | console.error(error); |
| | | alert('请求失败,请稍后再试!'); |
| | | } |
| | | } |
| | | else { |
| | |
| | | :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}" |
| | | :data="tableData" |
| | | > |
| | | <el-table-column prop="engineeringId" :label="$t('basicData.projectnumber')" width="200" align="center"/> |
| | | <el-table-column prop="layoutSequence" :label="$t('basicData.layoutSequence')" width="100" align="center"/> |
| | | <el-table-column prop="engineeringId" :label="$t('basicData.projectnumber')" width="200" align="center"/> |
| | | <el-table-column prop="width" :label="$t('basicData.glasswidth')" align="center"/> |
| | | <el-table-column prop="height" :label="$t('basicData.glassheight')" align="center"/> |
| | | <el-table-column prop="filmsId" :label="$t('basicData.coatingtypes')" align="center"/> |
| | | <el-table-column prop="layoutSequence" :label="$t('basicData.quantity')" align="center"/> |
| | | <el-table-column :label="$t('basicData.quantity')" align="center"> |
| | | <template #default="{ row }"> |
| | | <!-- 这里总是显示 1 --> |
| | | <span>{{ 1 }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="thickness" :label="$t('basicData.thickness')" align="center"/> |
| | | <!-- <el-table-column |
| | | align="center" |
| | |
| | | width: 1500px; |
| | | margin-left: -300px |
| | | } |
| | | #overlay{ |
| | | #overlayb{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -303px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlaya{ |
| | | #overlayc{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -303px; |
| | | margin-left:703px; |
| | | } |
| | | #overlayb{ |
| | | #overlay{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |
| | |
| | | margin-top: -45px; |
| | | margin-left: 355px; |
| | | } |
| | | #overlayc{ |
| | | #overlaya{ |
| | | position: absolute; |
| | | z-index: 1; |
| | | width: 228px; |