<script setup>
|
import GlassInventory from "@/views/pp/glassOptimize/page/GlassInventory.vue"
|
import ProjectDetail from "@/views/pp/glassOptimize/page/ProjectDetail.vue"
|
import ProjectCreate from "@/views/pp/glassOptimize/ProjectCreate.vue"
|
import GlassComputed from "@/views/pp/glassOptimize/GlassComputed.vue";
|
import ProjectMange from "@/views/pp/glassOptimize/ProjectMange.vue";
|
import OptimizationRectPrint from "@/views/pp/glassOptimize/OptimizationRectPrint.vue";
|
|
import {ref} from "vue";
|
import {ElMessage} from "element-plus";
|
let dialogVisible = ref(false)
|
let detailPage = ref(0)
|
let state = ref(1)
|
const changeDialog = (value) => {
|
dialogVisible.value = true
|
detailPage.value = value
|
}
|
|
//从工程管理获取工程号,并跳转
|
const projectNumber = ref();
|
|
const glassInventoryRef=ref(null)
|
const switchDialog = (number) => {
|
projectNumber.value = number;
|
detailPage.value = 3;
|
};
|
|
const switchDialog1 = (number) => {
|
projectNumber.value = number;
|
detailPage.value = 4;
|
state.value=1;
|
};
|
|
const switchDialog2 = (number) => {
|
projectNumber.value = number;
|
detailPage.value = 4;
|
state.value=2;
|
};
|
|
//工程管理关闭弹窗
|
const handlePopupClose = () => {
|
dialogVisible.value = false;
|
};
|
|
//获取SetTrimming的值
|
const dataForGlassInventory = ref();
|
const handleProjectDetailData = (data) => {
|
dataForGlassInventory.value = data;
|
};
|
|
//获取GlassInventory的值(查询库存)
|
const sendDataGlassInventory = ref()
|
const handleInventoyData = (selectedLabel1,selectedLabel2,type) => {
|
sendDataGlassInventory.value = {
|
selectedLabel1, selectedLabel2,type
|
};
|
};
|
|
//右键菜单打开修边
|
const isTrimmingDialogVisible = ref(false);
|
const sendTrimming = (value) => {
|
isTrimmingDialogVisible.value = value;
|
};
|
|
let checkboxChangeData = ref('');
|
const getSmallPieceData = () => {
|
checkboxChangeData.value=glassInventoryRef.value.checkboxChanges();
|
};
|
|
|
|
|
</script>
|
|
<template >
|
<div style="width: 100%;height: 100%">
|
<div id="main-body">
|
<project-detail @changeDialog="changeDialog"
|
@forward-data-to-grandparent="handleProjectDetailData"
|
@send-inventory-to-op="handleInventoyData"
|
@getSmallPieceData="getSmallPieceData"
|
:TrimmingDialogVisible="isTrimmingDialogVisible" :CheckboxChangeData="checkboxChangeData" />
|
</div>
|
<div id="main-footer">
|
<glass-inventory ref="glassInventoryRef"
|
:receivedData="dataForGlassInventory"
|
:InventoryData="sendDataGlassInventory"
|
@select-trimming="sendTrimming"/>
|
</div>
|
|
|
<el-dialog
|
v-model="dialogVisible"
|
:title="detailPage ===1? '创建工程' : detailPage ===2? '工程管理' : detailPage ===3? '模拟计算':''"
|
destroy-on-close
|
style="width: 90%;height:90%;margin-top: 3vh;overflow: auto"
|
z-index="100"
|
>
|
<project-create v-if="detailPage===1" @switch-dialog="switchDialog"/>
|
<project-mange v-if="detailPage===2" @switch-dialog="switchDialog" @switch-dialog-print="switchDialog1"
|
@switch-dialog-print2="switchDialog2" @closeDetailPage="handlePopupClose"/>
|
<glass-computed v-if="detailPage===3" :project="projectNumber"/>
|
<optimization-rect-print v-if="detailPage===4" :project="projectNumber" :state="state"/>
|
<div v-else></div>
|
</el-dialog>
|
|
</div>
|
</template>
|
|
<style scoped>
|
#main-body{
|
width: 100%;
|
height: 60%;
|
}
|
#main-footer{
|
margin-top: 10px;
|
width: 100%;
|
height: calc(40% - 10px);
|
}
|
:deep( .el-dialog__body){
|
height: calc(100% - 55px);
|
width: 100%;
|
margin-top: 30px;
|
/* padding: 0; */
|
}
|
|
</style>
|