Newer
Older
Nanping_sponge_GCGL / src / views / project / projectConfiguration / imgwh / index copy.vue
@liyingjing liyingjing on 25 Oct 2023 4 KB 海绵工程管理
<template>
  <div class="water-analysis-page" :key="isFlag">
    <div class="top">
      <el-form ref="ruleForm" inline :model="tableData" v-show="showSearch">
        <el-form-item label="项目名称:" prop="projectName">
          <el-input
            clearable
            v-model="tableData.projectName"
            placeholder="请输入项目名称"
            style="width: 240px"
          ></el-input>
        </el-form-item>
        <el-form-item
            label="项目类别:"
            style="width: 30%"
            prop="projectTypeId"
          >
            <el-select
              clearable
              v-model="tableData.projectTypeId"
              class="m-2"
              placeholder="请选择项目类别"
              size="mini"
              style="width: 100%"
            >
              <el-option
                v-for="item in project_TypeId"
                :key="item.value"
                :label="item.projectTypeName"
                :value="item.id"
              />
            </el-select>
          </el-form-item>
        <el-form-item label="项目资金来源:" prop="fundSource">
          <el-select
            clearable
            v-model="tableData.fundSource"
            placeholder="请选择资金来源"
          >
            <el-option
              v-for="dict in fund_source"
              :key="dict.stCode"
              :label="dict.label"
              :value="dict.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="招标方式">
          <el-select
            clearable
            v-model="tableData.contractType"
            placeholder="请选择招标方式"
          >
            <el-option
              v-for="dict in contract_type"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="责任人:" props="chargeUser">
          <el-input
            clearable
            style="width: 240px"
            v-model="tableData.chargeUser"
            placeholder="请输入责任人"
          />
        </el-form-item>
        <el-form-item label="项目状态:">
          <el-select
            v-model="tableData.projectStatus"
            placeholder="请选择项目状态"
            clearable
          >
            <el-option
              v-for="dict in project_status"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </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-form>

    </div>
    <todoDon ref="todoDonRef"></todoDon>
  </div>
  
</template>
<script setup>
import todoDon from "./todoDon.vue";
import { downloadBlob, formatDate, formatMonths } from "@/utils/projectTable";
import emgBox from "@/utils/ElMessageBox";
import {
  projectTypeList,
} from "@/api/projectInformation";
const { proxy } = getCurrentInstance();
const { project_status,contract_type, contract_status ,fund_source,dangerous_status} = proxy.useDict(
  "contract_type",
  "contract_status",
  'fund_source',
  'dangerous_status',
  'project_status'
);
const todoDonRef = ref(null);
const fromMoney = ref([{}, {}]);
const lcProject = ref([{}, {}]);
const ruleForm = ref(null);
let typeList = ref({});
const project_TypeId = ref([]);

const showSearch = ref(true);
import { reactive } from "vue";
const activeName = ref("first");
let visible = ref(false);
let isFlag = ref(1);
//动态组件
let dataForm = reactive({
  date: formatMonths(new Date()),
  tableData: {},
  tableDateTwo: "",
  tableLoading: true,
});
let { tableData } = toRefs(dataForm);
//获取列表数据
//切换table
const handleClick = ({ props }, event) => {
  tableData.value.name = props.name;
  todoDonRef.value.search(tableData.value);
};
//搜索
const searchForm = () => {
  todoDonRef.value.search(tableData.value);
};
const projectTypeListM = async () => {
  let { data } = await projectTypeList();
  console.log("datadatadata", data)
  project_TypeId.value = data;
};
//重置
function  resectClcik() {
  tableData.value={pageNum: 1,pageSize: 10}
  todoDonRef.value.search(tableData.value);
};

// 查看上报数据
const onCheck = (ty) => {
  typeList.value.type = ty;
  visible.value = true;
};
function onModalClose() {
  visible.value = false;
  todoDonRef.value.search(tableData.value);
}
onMounted(() => {
  projectTypeListM()
  // getTableData(Date.parse(date.value));
});
</script>
<style lang="scss" scoped>
.water-analysis-page {
  padding: 20px;
  height: 90vh;
  .el-input__inner {
  }
}
</style>