Newer
Older
Nanping_sponge_GCGL / src / views / project / itemSecurity / environmentalMonitoring.vue
@liyingjing liyingjing on 25 Oct 2023 4 KB 海绵工程管理
<template>
  <div class="water-analysis-page">
    <div class="top">
      <el-form
        label-width="auto"
        ref="ruleForm"
        inline
        :model="tableData"
        v-show="showSearch"
      >
        <el-form-item label="项目名称:" prop="projectName">
          <el-input
            clearable
            v-model="tableData.projectName"
            placeholder="请输入项目名称"
            style="width: 220px"
          ></el-input>
        </el-form-item>
        <el-form-item label="处置方式:" prop="disposalWay">
          <el-input
            clearable
            v-model="tableData.disposalWay"
            style="width: 220px"
            placeholder="请输入处置方式"
          ></el-input>
        </el-form-item>
        <el-form-item label="环境因素:" prop="environmentElement">
          <el-input
            clearable
            v-model="tableData.environmentElement"
            style="width: 220px"
            placeholder="请输入环境因素"
          ></el-input>
        </el-form-item>

        <el-form-item label="责任人:" prop="chargeUser">
          <el-input
            clearable
            v-model="tableData.chargeUser"
            style="width: 200px"
            placeholder="请输入责任人"
          ></el-input>
        </el-form-item>
        <el-form-item label="识别日期:" style="width: 308px">
          <el-date-picker
            v-model="tableData.timer"
            format="YYYY-MM-DD" value-format="YYYY-MM-DD"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="Search" @click="searchForm">
            查询</el-button
          >
          <el-button icon="Refresh" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            plain
            icon="Plus"
            @click="onCheck(4)"
            v-hasPermi="['system:post:add']"
            >新增</el-button
          >
        </el-col>
        <right-toolbar
          v-model:showSearch="showSearch"
          @queryTable="searchForm"
        ></right-toolbar>
      </el-row>
    </div>
    <!-- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" style="margin-top: -10px;" type="border-card">
      <el-tab-pane label="待办列表" name="1"> -->
    <todoDon ref="todoDonRef"></todoDon>
    <!-- </el-tab-pane>
      <el-tab-pane label="已办列表" name="2">
        <todoDon   ref="todoDonRef"></todoDon>
      </el-tab-pane>
    </el-tabs> -->
    <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 v-show="typeList.type != 2" type="primary" @click="submit"
            >保存
          </el-button>
          <el-button @click="visible = false">关闭</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
  <!-- 查看详情弹框 -->
</template>
<script setup>
import { reactive } from "vue";
import tableDalgo from "./environmentalMonitoringComponents/tableDalgo";
import todoDon from "./environmentalMonitoringComponents/todoDon.vue";
const { proxy } = getCurrentInstance();
const { project_operation_pattern } = proxy.useDict(
  "project_operation_pattern"
);
const todoDonRef = ref(null);
const lcProject = ref([{}, {}]);
let typeList = ref({});
const showSearch = ref(true);
const activeName = ref("1");
const acKey = ref(0);
let visible = ref(false);
const tableDalgoRef = ref();
//动态组件
let dataForm = reactive({
  tableData: { pageNum: 1, pageSize: 10, workFlag: 1 },
});
let { tableData } = toRefs(dataForm);
//搜索
const searchForm = () => {
  todoDonRef.value.getInfoList(tableData.value);
};
function resetQuery() {
  tableData.value = { pageNum: 1, pageSize: 10 };
 
  todoDonRef.value.getInfoList(tableData.value);
}
// 新增
const onCheck = (v) => {
  typeList.value.type = v;
  visible.value = true;
  nextTick(() => {
    tableDalgoRef.value.desertFilds();
  });
};
//关闭
function onModalClose() {
  visible.value = false;
  todoDonRef.value.getInfoList(tableData.value);
}
function submit() {
  tableDalgoRef.value.submit();
}
onMounted(() => {
  todoDonRef.value.getInfoList(tableData.value);
});
</script>
<style lang="scss" scoped>
.water-analysis-page {
  padding: 20px;
  height: 90vh;
  .top {
    // margin-bottom: 15px;
  }
  .el-input__inner {
    // color: #fff;//
  }
}
::v-deep .el-dialog__body {
  background-color: #eef1fb;
  height: 750px;
  overflow: hidden;
}
</style>