| | |
| | | const messageShow = ref(false); |
| | | const mesData = ref(null); |
| | | function setSchemClick(item) { |
| | | |
| | | mesData.value = item; |
| | | console.log(mesData.value,'dadadaddaadaadadadad'); |
| | | messageShow.value = true; |
| | | } |
| | | function close() { |
| | |
| | | } |
| | | .mess { |
| | | position: absolute; |
| | | top: 160px; |
| | | left: 460px; |
| | | top: 10%; |
| | | left: 100%; |
| | | // top: 160px; |
| | | // left: 460px; |
| | | } |
| | | |
| | | /deep/.el-card__body { |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, defineEmits } from "vue"; |
| | | |
| | | defineProps({ |
| | | data: { |
| | | import { ref, defineProps, defineEmits, watch } from "vue"; |
| | | // 定义 props |
| | | const props = defineProps({ |
| | | mesData: { |
| | | type: Object, |
| | | default: null, |
| | | default: () => ({}), // 默认值是一个空对象 |
| | | }, |
| | | }); |
| | | |
| | | const messageList = ref([ |
| | | { |
| | | name: "方案名称:", |
| | | value: "降雨30mm数据", |
| | | // 定义 messageList |
| | | const messageList = ref([]); |
| | | |
| | | // 监听 props.mesData 的变化 |
| | | watch( |
| | | () => props.mesData, // 监听 props.mesData |
| | | (newMesData) => { |
| | | if (newMesData) { |
| | | messageList.value = [ |
| | | { name: "方案名称:", value: newMesData.name || "无" }, |
| | | { name: "模拟区域:", value: newMesData.area || "无" }, |
| | | { name: "降雨数据:", value: newMesData.fileName || "无" }, |
| | | { name: "预演开始时间:", value: newMesData.startTime || "无" }, |
| | | { name: "预演结束时间:", value: newMesData.endTime || "无" }, |
| | | { name: "创建时间:", value: newMesData.createTime || "无" }, |
| | | ]; |
| | | } |
| | | }, |
| | | { |
| | | name: "模拟区域:", |
| | | value: cityData.listData[0] || "孙胡沟", |
| | | }, |
| | | { |
| | | name: "降雨数据:", |
| | | value: "降雨强度30MM", |
| | | }, |
| | | { |
| | | name: "预演开始时间:", |
| | | value: "2025-01-15 12:55:18", |
| | | }, |
| | | { |
| | | name: "预演结束时间:", |
| | | value: "2025-01-15 18:35:00", |
| | | }, |
| | | { |
| | | name: "创建时间:", |
| | | value: "2025-01-15 8:15:28", |
| | | }, |
| | | ]); |
| | | { immediate: true } // 立即执行一次 |
| | | ); |
| | | |
| | | // 定义 emit 方法 |
| | | const emit = defineEmits(["close"]); |
| | |
| | | } |
| | | |
| | | |
| | | const showLayerTree = ref(true); |
| | | const showLayerTree = ref(false); |
| | | |
| | | const isPopupVisible = ref(false); // 控制弹窗是否可见 |
| | | const currentToolOptions = ref([]); // 当前工具的功能选项 |
| | |
| | | <p><strong>降雨量:</strong>{{ forms.rainfall }} mm</p> |
| | | <p><strong>降雨时长:</strong>{{ forms.duration }} h</p> |
| | | <p><strong>降雨强度:</strong>{{ forms.intensity }} mm/h</p> |
| | | <p><strong>上传文件:</strong>{{ uploadedFilesText }}</p> |
| | | <!-- <p><strong>上传文件:</strong>{{ uploadedFilesText }}</p> --> |
| | | </div> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | |
| | | 降雨量: `${forms.rainfall} mm`, |
| | | 降雨时长: `${forms.duration} h`, |
| | | 降雨强度: `${forms.intensity} mm/h`, |
| | | // 上传文件: forms.fileList.map(file => file.name), |
| | | 上传文件: forms.fileList.map(file => file.name), |
| | | }); |
| | | ElMessage.success('方案已保存'); |
| | | saveDialogVisible.value = false; |
| | |
| | | <HistorySimulation :selectedArea="selectedArea" /> |
| | | </div> |
| | | <div v-if="selectedSimulation === '实时模拟'"> |
| | | <!-- <RealTimeSimulation :selectedArea="selectedArea" /> --> |
| | | <RealTimeSimulation :selectedArea="selectedArea" /> |
| | | </div> |
| | | <div v-if="selectedSimulation === '预测模拟'"> |
| | | <!-- <PredictiveSimulation :selectedArea="selectedArea" /> --> |
| | | <PredictiveSimulation :selectedArea="selectedArea" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div |
| | | style=" |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | padding: 8px 8px 0px 0px; |
| | | justify-content: space-around; |
| | | padding: 8px 8px 8px 0px; |
| | | " |
| | | > |
| | | <el-button @click="handleClick">新建仿真方案</el-button> |