Newer
Older
KaiFengPC / src / views / spongePerformance / waterlogging / waterloggedArea / jcdetial / index.vue
@鲁yixuan 鲁yixuan on 19 Aug 3 KB updata
  1. <template>
  2. <div class="water-analysis-page">
  3. <div class="top">
  4. <el-form ref="ruleForm" inline :model="queryParmas" v-show="showSearch">
  5. <el-form-item label="内涝点:" prop="stCode">
  6. <el-select clearable v-model="queryParmas.stCode" class="m-2" placeholder="请选择内涝点" size="mini" style="width: 100%">
  7. <el-option v-for="i in loggingList" :key="i.stCode" :label="i.stName" :value="i.stCode" />
  8. </el-select>
  9. </el-form-item>
  10. <el-form-item>
  11. <el-button type="primary" icon="Search" @click="searchForm"> 搜索</el-button>
  12. <!-- <el-button type="primary" plain icon="Plus" @click="onCheck(4)"
  13. >新增</el-button
  14. > -->
  15. <el-button icon="Refresh" @click="resectClcik"> 重置</el-button>
  16. <el-button icon="CaretLeft" @click="resect"> 返回</el-button>
  17. </el-form-item>
  18. </el-form>
  19. <todoDon ref="todoDonRef" :params="queryParmas"></todoDon>
  20. </div>
  21. <el-dialog v-model="visible" title="新增积水点完工记录" :modal-append-to-body="false" :close-on-click-modal="false" width="55%">
  22. <tableDalgo ref="tableDalgoRef" v-if="visible" @onModalClose="onModalClose" :typeList="typeList" :key="isFlag"> </tableDalgo>
  23. <template #footer>
  24. <div class="dialog-footer">
  25. <el-button @click="open2" type="primary">确定</el-button>
  26. <!-- <el-button @click="submitClict" type="success">提 交</el-button> -->
  27. <el-button @click="visible = false">关闭</el-button>
  28. </div>
  29. </template>
  30. </el-dialog>
  31. </div>
  32. </template>
  33. <script setup>
  34. import { allWaterloggingList } from '@/api/spongePerformance/waterloggedArea';
  35. import tableDalgo from './tableDalgo.vue';
  36. import todoDon from './todoDon.vue';
  37. import emgBox from '@/utils/ElMessageBox';
  38. import home from '@/views/index.vue';
  39.  
  40. const { proxy } = getCurrentInstance();
  41. const { fund_source } = proxy.useDict('fund_source');
  42. import { useRouter } from 'vue-router';
  43. import { defineEmits } from 'vue';
  44. const todoDonRef = ref(null);
  45. const ruleForm = ref(null);
  46. let typeList = ref({});
  47. const tableDalgoRef = ref();
  48. const showSearch = ref(true);
  49. let visible = ref(false);
  50. const useRout = useRouter();
  51. const emits = defineEmits();
  52. const {
  53. isComponent: {
  54. data: { examineYear },
  55. },
  56. } = defineProps(['isComponent']);
  57. const loggingList = ref([]);
  58. const loggingRemoveStatusList = reactive([
  59. { label: '已消除', value: '1' },
  60. { label: '未消除', value: '0' },
  61. ]);
  62. //动态组件
  63. const queryParmas = ref({ year: examineYear });
  64. let dataForm = reactive({
  65. tableData: {},
  66. tableDateTwo: '',
  67. tableLoading: true,
  68. });
  69. let { tableData } = toRefs(dataForm);
  70. //获取列表数据
  71. //搜索
  72. const searchForm = () => {
  73. todoDonRef.value.search(queryParmas.value);
  74. };
  75. //重置
  76. const resectClcik = () => {
  77. ruleForm.value.resetFields();
  78. queryParmas.value.stName = '';
  79. todoDonRef.value.search(queryParmas.value);
  80. };
  81. function resect() {
  82. // useRout.go(-1)
  83. emits('searchClick', 0);
  84. }
  85. // 新增
  86. // const onCheck = (ty) => {
  87. // visible.value = true;
  88. // typeList.value.type = ty;
  89. // typeList.value.loggingList = loggingList.value;
  90. // nextTick(() => {
  91. // tableDalgoRef.value.resetFiled();
  92. // });
  93. // };
  94. //确定
  95. function open2() {
  96. tableDalgoRef.value.submit();
  97. }
  98. function onModalClose() {
  99. visible.value = false;
  100. todoDonRef.value.search(queryParmas.value);
  101. }
  102. async function waterloggingRelationWaterloggingListM() {
  103. let { data } = await allWaterloggingList();
  104. loggingList.value = data;
  105. }
  106. onMounted(() => {
  107. waterloggingRelationWaterloggingListM();
  108. });
  109. </script>
  110. <style lang="scss" scoped>
  111. .water-analysis-page {
  112. padding: 20px;
  113. overflow-y: hidden;
  114. }
  115. </style>