<template> <div class="water-analysis-page"> <div class="top"> <el-form ref="ruleForm" inline :model="queryParmas" v-show="showSearch"> <el-form-item label="内涝点:" prop="stCode"> <el-select clearable v-model="queryParmas.stCode" class="m-2" placeholder="请选择内涝点" size="mini" style="width: 100%" > <el-option v-for="i in loggingList" :key="i.stCode" :label="i.stName" :value="i.stCode" /> </el-select> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="searchForm"> 查询</el-button > <!-- <el-button type="primary" plain icon="Plus" @click="onCheck(4)" >新增</el-button > --> <el-button icon="Refresh" @click="resectClcik"> 重置</el-button> <el-button icon="CaretLeft" @click="resect"> 返回</el-button> </el-form-item> </el-form> <todoDon ref="todoDonRef" :params="queryParmas"></todoDon> </div> <el-dialog v-model="visible" title="新增渍水点完工记录" :modal-append-to-body="false" :close-on-click-modal="false" width="55%" > <tableDalgo ref="tableDalgoRef" v-if="visible" @onModalClose="onModalClose" :typeList="typeList" :key="isFlag"> </tableDalgo> <template #footer> <div class="dialog-footer"> <el-button @click="open2" type="primary">保存</el-button> <!-- <el-button @click="submitClict" type="success">提 交</el-button> --> <el-button @click="visible = false">关闭</el-button> </div> </template> </el-dialog> </div> </template> <script setup> import { allWaterloggingList, } from '@/api/waterloggedArea'; import tableDalgo from "./tableDalgo.vue"; import todoDon from "./todoDon.vue"; import emgBox from "@/utils/ElMessageBox"; import home from '@/views/index.vue' const { proxy } = getCurrentInstance(); const { fund_source } = proxy.useDict("fund_source"); import { useRouter } from "vue-router"; import { defineEmits } from "vue"; const todoDonRef = ref(null); const ruleForm = ref(null); let typeList = ref({}); const tableDalgoRef = ref(); const showSearch = ref(true); let visible = ref(false); const useRout=useRouter() const emits=defineEmits() const {isComponent:{data:{examineYear}}}=defineProps(['isComponent']) const loggingList = ref([]); const loggingRemoveStatusList = reactive([ { label: "已消除", value: "1" }, { label: "未消除", value: "0" }, ]); //动态组件 const queryParmas=ref({year:examineYear}) let dataForm = reactive({ tableData:{}, tableDateTwo: "", tableLoading: true, }); let { tableData } = toRefs(dataForm); //获取列表数据 //搜索 const searchForm = () => { todoDonRef.value.search(queryParmas.value); }; //重置 const resectClcik = () => { ruleForm.value.resetFields(); queryParmas.value.stName='' todoDonRef.value.search(queryParmas.value); }; function resect() { // useRout.go(-1) emits('searchClick',0) } // 新增 // const onCheck = (ty) => { // visible.value = true; // typeList.value.type = ty; // typeList.value.loggingList = loggingList.value; // nextTick(() => { // tableDalgoRef.value.resetFiled(); // }); // }; //保存 function open2() { tableDalgoRef.value.submit(); } function onModalClose() { visible.value = false; todoDonRef.value.search(queryParmas.value); } async function waterloggingRelationWaterloggingListM() { let { data } = await allWaterloggingList(); loggingList.value =data; } onMounted(() => { waterloggingRelationWaterloggingListM() }); </script> <style lang="scss" scoped> .water-analysis-page { padding: 20px; overflow-y: hidden; } :deep(.el-dialog__body) { height: 520px; overflow: auto; } </style>