| | |
| | | const cantakea = ref(true); |
| | | const cantakeb = ref(true); |
| | | const canona = ref(true); |
| | | const canons = ref(true); |
| | | const cantakeall = ref(true); |
| | | const canonb = ref(true); |
| | | const canSelectProjectb = ref(true); |
| | |
| | | const engineerId = ref('') |
| | | const router = useRouter() |
| | | const currentGlassId = ref(null); |
| | | const currentstartSlot = ref(null); |
| | | const currentengineerId = ref(null); |
| | | const currenttemperingLayoutId = ref(null); |
| | | const currenttemperingFeedSequence = ref(null); |
| | |
| | | const existingRects = adjustedRects2.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | // 计算新的矩形 |
| | | const newRects = data.intoGlass2[0].map(rect => { |
| | | const scaleFactor = 845/5000; |
| | | const scaleFactorY = 430/2750; |
| | | const scaleFactor = 800/5000; |
| | | const scaleFactorY = 407/2750; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | if (rect.width < rect.height) { |
| | |
| | | const newGlassIds = new Set(data.intoGlass1[0].map(rect => rect.glassId)); |
| | | const existingRects = adjustedRects1.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | const newRects = data.intoGlass1[0].map(rect => { |
| | | const scaleFactor = 845/5000; |
| | | const scaleFactorY = 430/2750; |
| | | const scaleFactor = 800/5000; |
| | | const scaleFactorY = 407/2750; |
| | | // const scaleFactor = 600/5087; |
| | | // const scaleFactorY = 200/2800; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | |
| | | const newGlassIds = new Set(data.intoGlass3[0].map(rect => rect.glassId)); |
| | | const existingRects = adjustedRects3.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | const newRects = data.intoGlass3[0].map(rect => { |
| | | const scaleFactor = 845/5000; |
| | | const scaleFactorY = 430/2750; |
| | | const scaleFactor = 800/5000; |
| | | const scaleFactorY = 407/2750; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | if (rect.width < rect.height) { |
| | |
| | | const existingRects = adjustedRects4.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | // 计算新的矩形 |
| | | const newRects = data.intoGlass4[0].map(rect => { |
| | | const scaleFactor = 845/5000; |
| | | const scaleFactorY = 430/2750; |
| | | const scaleFactor = 800/5000; |
| | | const scaleFactorY = 407/2750; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta; |
| | | let newX = rect.yCoordinate; |
| | | if (rect.width < rect.height) { |
| | |
| | | adjustedRects1.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | adjustedRects3.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | adjustedRects2.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | adjustedRects4.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | adjustedRectsa.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | } |
| | | if (currentRect.value.state == 1) { |
| | | canona.value = false; |
| | | } else if (currentRect.value.state == 0) { |
| | | } else if (currentRect.value.state == 0||currentRect.value.state == -1) { |
| | | canona.value = true; |
| | | } |
| | | if (currentRect.value.state == 1) { |
| | | canons.value = false; |
| | | } else if (currentRect.value.state == -1) { |
| | | canons.value = true; |
| | | } |
| | | |
| | | if (currentRect.value.state > 5) { |
| | | cantakeall.value = false; |
| | | } else{ |
| | |
| | | if (index !== -1) { |
| | | adjustedRectsb.value[index].isActive = true; |
| | | } |
| | | currentGlassId.value = rect.glassId; |
| | | currentGlassId.value = rect.glassId; |
| | | currentstartSlot.value = rect.slot; |
| | | currentengineerId.value = rect.engineerId; |
| | | currenttemperingLayoutId.value = rect.temperingLayoutId; |
| | | currenttemperingFeedSequence.value = rect.temperingFeedSequence; |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 钢化炉 |
| | | const handleal11 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 2, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blinda.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 进炉前人工拿走 |
| | | const takeouta = async () => { |
| | | try { |
| | |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blinda.value = false; |
| | | updateoutColorsa(); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 进炉前出片 |
| | | const outTask = async (line) => { |
| | | try { |
| | | const response = await request.post('/cacheVerticalGlass/bigStorageCageOutTask/temperingOut', { |
| | | glassId: currentGlassId.value, |
| | | endSlot: line, |
| | | startSlot: currentstartSlot.value, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | updateoutColorsa(); |
| | | } else { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleall1 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 3, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blind1.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handletakeall33 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 9, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blind3.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleall3 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 3, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleall2 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 3, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blind2.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handletakeall44 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleall4 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 3, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blind4.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handletakeall4 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 9, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | | blind4.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | // 处理错误 |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 出片 |
| | | const handleall14 = async () => { |
| | | try { |
| | | const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { |
| | | temperingLayoutId: currenttemperingLayoutId.value, |
| | | engineerId: currentengineerId.value, |
| | | state: 4, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success('成功!'); |
| | |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 1000px;" |
| | | v-loading="loading"> |
| | | |
| | | <div style="width: 845px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div style="width: 800px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div v-if="adjustedRects3.length > 0"> |
| | | <!-- <div style="text-align: center;">炉号3:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | | <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects3[0].engineerId }}-{{ adjustedRects3[0].temperingLayoutId }} </div> |
| | | <el-scrollbar height="430px" style="background-color: #e9e9eb;"> |
| | | <el-scrollbar height="417px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;max-width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects3" |
| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <div style="width: 845px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div style="width: 800px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div v-if="adjustedRects4.length > 0"> |
| | | <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects4[0].engineerId }}-{{ adjustedRects4[0].temperingLayoutId }} </div> |
| | | <!-- <div style="text-align: center;">炉号4:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | | <el-scrollbar height="430px" style="background-color: #e9e9eb;"> |
| | | <el-scrollbar height="417px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;max-width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects4" |
| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <div style="width: 845px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div style="width: 800px;float: right;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div v-if="adjustedRects1.length > 0"> |
| | | <!-- <div style="text-align: center;">炉号1:{{ engineerIdDisplay }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | | <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects1[0].engineerId }}-{{ adjustedRects1[0].temperingLayoutId }} </div> |
| | | <el-scrollbar height="430px" style="background-color: #e9e9eb;"> |
| | | <el-scrollbar height="417px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects1" |
| | |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | <div style="width: 845px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div style="width: 800px;float: left;background-color: #f4f4f5;height: 430px;margin-top: 20px;"> |
| | | <div v-if="adjustedRects2.length > 0"> |
| | | <div style="text-align: center;"> {{ $t('processCard.temperinglayout') }}:{{ adjustedRects2[0].engineerId }}-{{ adjustedRects2[0].temperingLayoutId }} </div> |
| | | <!-- <div style="text-align: center;">炉号2:{{ engineerIdDisplay2 }}-{{ adjustedRects[0].temperingLayoutId }}</div> --> |
| | | <el-scrollbar height="430px" style="background-color: #e9e9eb;"> |
| | | <el-scrollbar height="417px" style="background-color: #e9e9eb;"> |
| | | <div style="position: relative;max-width: 1400px;"> |
| | | <div |
| | | v-for="(rect, index) in adjustedRects2" |
| | |
| | | <el-button type="info" plain @click="handletakeall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | <el-button type="info" plain @click="handleall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('processCard.outfurnace') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | <el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2"> |
| | | <el-button :disabled="!canSelectProject2" type="warning" plain :icon="Delete" @click="handleDamage2" style="width: 150px;margin-left: 10px;"> |
| | |
| | | </el-button> |
| | | <el-button type="info" plain @click="handletakeall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | <el-button type="info" plain @click="handleall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('processCard.outfurnace') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | <el-dialog v-model="blind3" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose3"> |
| | |
| | | <el-button type="info" plain @click="handletakeall33" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | <el-button type="info" plain @click="handleall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('processCard.outfurnace') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | <el-dialog v-model="blind4" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose4"> |
| | | <el-button :disabled="!canSelectProject4" type="warning" plain :icon="Delete" @click="handleDamage4" style="width: 150px;margin-left: 10px;"> |
| | |
| | | </el-button> |
| | | <el-button type="info" plain @click="handletakeall44" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | <el-button type="info" plain @click="handleall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('processCard.outfurnace') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | <!-- 进炉前 --> |
| | |
| | | <el-button type="info" plain @click="handletakeall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | <el-button type="info" plain @click="handleal11" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('processCard.intofurnace') }} |
| | | </el-button> |
| | | <el-button type="success" plain :icon="Edit" @click="outTask(3002)" :disabled="!canons" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('searchOrder.specifyout') }} |
| | | </el-button> |
| | | <el-button type="success" plain :icon="Edit" @click="outTask(3001)" :disabled="!canons" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('searchOrder.outfilm') }} |
| | | </el-button> |
| | | </el-dialog> |
| | | <!-- 已出炉 --> |
| | | <el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb"> |
| | |
| | | <el-button type="info" plain @click="handletakeall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeall') }} |
| | | </el-button> |
| | | |
| | | <el-button type="info" plain @click="handleall14" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('searchOrder.outfilm') }} |
| | | </el-button> |
| | | <!-- <el-button type="success" plain :icon="Edit" @click="takeonb" :disabled="!canonb" style="width: 150px;margin-left: 10px;margin-top: 10px;"> |
| | | {{ $t('order.takeon') }} |
| | | </el-button> --> |