Newer
Older
Nanping_sponge_JXKH / src / views / spongePerformance / rainwaterResourceUtilization / index.vue
@liyingjing’ liyingjing’ on 17 Nov 4 KB 1
<template>
  <div class="water-analysis-page">
    <div class="top">
      <el-form ref="ruleForm" inline :model="tableData" v-show="showSearch">
        <!-- <el-form-item label="考核年度:" prop="time">
              <el-date-picker
                v-model="tableData.time"
                type="year"
                placeholder="请选择年份"
                style="width: 240px"
              />
            </el-form-item>
            <el-form-item label="达标情况:" prop="realValue">
              <el-select
                v-model="tableData.realValue"
                placeholder="请选择达标情况"
                style="width: 240px"
                clearable
              >
                <el-option
                  v-for="dict in IsTrue"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                />
              </el-select>
            </el-form-item> -->
            <el-form-item label="考核年度:" prop="year">
              <el-date-picker
                v-model="tableData.year"
                type="year"
                value-format="YYYY"
                placeholder="请选择年份"
                style="width: 240px"
              />
            </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="Search" @click="searchForm">
            查询</el-button
          >
          <el-button icon="Refresh" @click="resectClcik"> 重置</el-button>
        </el-form-item>
        <!-- <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="Plus" @click="onCheck" v-hasPermi="['system:post:add']">新增</el-button>
      </el-col>
      <right-toolbar v-model:showSearch="showSearch" @queryTable="getDataList"></right-toolbar>
    </el-row> -->
      </el-form>
      <todoDon ref="todoDonRef" :params="tableData"></todoDon>
      </div>
      <el-dialog
      v-model="visible"
      title="雨水资源化利用新增"
      :modal-append-to-body="false"
      :close-on-click-modal="false"
      width="68%"
    >
      <tableDalgo
        ref="tableDalgoRef"
        :typeList="typeList"
        @onModalClose="onModalClose"
      ></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="closed">关闭</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
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");
const todoDonRef = ref(null);
const ruleForm = ref(null);
let typeList = ref({});
const tableDalgoRef = ref();
const showSearch = ref(true);
let visible = ref(false);
const activeName=ref('todo')
let isFlag = ref(1);
const IsTrue = reactive([
  { label: "已达标", value: "1" },
  { label: "未达标", value: "0" },
]);
//动态组件
let dataForm = reactive({
  tableData: {itemDataType:'YSZYHLY'},
  tableDateTwo: "",
  tableLoading: true,
});
let { tableData } = toRefs(dataForm);
//获取列表数据
//搜索
const searchForm = () => {
  todoDonRef.value.search(tableData.value);
};
//重置
const resectClcik = () => {
  ruleForm.value.resetFields();
  todoDonRef.value.search(tableData.value);
};
// 新增
const onCheck = (ty) => {
  visible.value = true;
  typeList.value.type = ty;
  nextTick(() => {
    tableDalgoRef.value.resetFiled();
  });
};
//保存
function open2() {
  tableDalgoRef.value.submit();
}
function onModalClose() {
  visible.value = false;
  todoDonRef.value.search(tableData.value);
}
function handleClick({ props: { name } }){ 
  activeName.value=name
console.log("name", name)
}
onMounted(() => {});
</script>
<style lang="scss" scoped>
.water-analysis-page {
  padding: 20px;
  overflow-y: hidden;
}
:deep(.el-dialog__body) {
 
  height: 520px;
  overflow: auto;
}
</style>