| | |
| | | </template>
|
| | |
|
| | | <script setup>
|
| | | import { ref } from 'vue';
|
| | | import { ref,onMounted } from 'vue';
|
| | | import RectRenderer from './page/RectRenderer.vue';
|
| | | import mockLayoutData from '../../../components/pp/MockData';
|
| | | import request from "@/utils/request";
|
| | |
| | | import { ElMessage } from "element-plus";
|
| | |
|
| | | const { t } = useI18n();
|
| | | const layoutData = ref(mockLayoutData);
|
| | | // const layoutData = ref(mockLayoutData);
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | const savedProjectNo = localStorage.getItem('projectNo');
|
| | | const processId = savedProjectNo;
|
| | | const layoutData = ref(null);
|
| | |
|
| | |
|
| | |
|
| | | const selectLayout = () => {
|
| | | request.post(`/glassOptimize/selectOptimizeResult/${processId}`)
|
| | | .then((res) => {
|
| | | if (res.code == 200) {
|
| | | try {
|
| | | const parsedData = JSON.parse(res.data.data[0].Layouts);
|
| | | layoutData.value = parsedData;
|
| | | } catch (error) {
|
| | | |
| | | |
| | | }
|
| | | } else {
|
| | |
|
| | | }
|
| | | })
|
| | | .catch((error) => {
|
| | | console.error("请求失败:", error);
|
| | | ElMessage.error(t('basicData.msg.requestFailed'));
|
| | | });
|
| | | }
|
| | |
|
| | | onMounted(() => {
|
| | | selectLayout();
|
| | |
|
| | | });
|
| | |
|
| | | const submitLayouts = async () => {
|
| | | try {
|