You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1610 lines
50 KiB

2 years ago
<template>
<!-- 项目基本信息-->
<div class="app-container">
<!-- 面包屑 -->
<el-breadcrumb separator="/" style="margin-bottom: 20px">
1 year ago
<el-breadcrumb-item
v-for="(item, index) in routeList"
:key="item + index"
:to="{ path: item.path }"
>{{ item.routeName }}</el-breadcrumb-item
>
</el-breadcrumb>
1 year ago
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="68px"
>
2 years ago
<el-form-item label="项目名称" prop="projectName">
1 year ago
<el-input
v-model="queryParams.data.projectName"
placeholder="请输入项目名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
>
<el-button
type="primary"
slot="append"
icon="el-icon-search"
size="small"
@click="handleQuery"
></el-button>
</el-input>
2 years ago
</el-form-item>
1 year ago
<el-form-item label="行政区划" prop="projectName">
<el-cascader
:options="areasOptions"
v-model="queryParams.data.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleQuery"
>
</el-cascader>
</el-form-item>
2 years ago
<el-form-item>
1 year ago
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
2 years ago
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
1 year ago
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['build:info:add']"
>新增</el-button
>
2 years ago
</el-col>
<el-col :span="1.5">
1 year ago
<el-button
type="success"
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['build:info:edit']"
>修改</el-button
>
2 years ago
</el-col>
<el-col :span="1.5">
1 year ago
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['build:info:remove']"
>删除</el-button
>
2 years ago
</el-col>
1 year ago
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
2 years ago
</el-row>
1 year ago
<el-table
v-loading="loading"
:data="infoList"
@selection-change="handleSelectionChange"
>
2 years ago
<el-table-column type="selection" width="55" align="center" fixed />
1 year ago
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
2 years ago
1 year ago
<el-table-column
label="项目名称"
align="center"
prop="projectName"
min-width="120"
/>
1 year ago
<el-table-column
label="项目编码"
align="center"
prop="proCode"
min-width="120"
/>
<el-table-column
label="行政区划"
align="center"
prop="adcd"
min-width="120"
:formatter="formatAdcd"
/>
<el-table-column
label="项目类型"
align="center"
prop="projectType"
:formatter="projectTypeFormat"
min-width="120"
/>
1 year ago
<!-- <el-table-column label="项目法人" align="center" prop="unitLeader" min-width="120" /> -->
<!-- <el-table-column
label="项目法人"
align="center"
prop="projectLegalPerson"
min-width="120"
/> -->
1 year ago
<!-- <el-table-column
1 year ago
label="项目法人单位"
align="center"
prop="projectLegalUnit"
min-width="120"
/>
<el-table-column
label="单位负责人电话"
align="center"
prop="projectLegalPhone"
min-width="120"
/>
<el-table-column
label="工程等别"
align="center"
prop="engineeringGrade"
:formatter="engineeringGradeFormat"
min-width="120"
/>
<el-table-column
label="工程用途"
align="center"
prop="engineeringPurposes"
:formatter="engineeringPurposesFormat"
min-width="120"
/>
<el-table-column
label="工程用途"
align="center"
prop="workCategory"
:formatter="workCategoryFormat"
min-width="120"
/>
<el-table-column
label="项目建设地址"
align="center"
prop="constructionAddress"
min-width="120"
/>
<el-table-column
label="建设模式"
align="center"
prop="constructionMode"
:formatter="constructionModeFormat"
min-width="120"
1 year ago
/> -->
1 year ago
<el-table-column
label="建设性质"
align="center"
prop="constructionNature"
:formatter="constructionNatureFormat"
min-width="120"
/>
1 year ago
<!-- <el-table-column
1 year ago
label="建设内容"
align="center"
prop="constructionContent"
min-width="120"
/>
1 year ago
1 year ago
<el-table-column
label="所属流域"
align="center"
prop="basin"
min-width="120"
1 year ago
/> -->
1 year ago
<!-- <el-table-column label="资金来源" align="center" prop="fundingSource"
2 years ago
min-width="120"/> -->
1 year ago
<!-- <el-table-column
1 year ago
label="是否172项重大水利工程"
align="center"
prop="isMajorProject"
:formatter="isBelongPlanningFormat"
min-width="120"
/>
<el-table-column
label="项目投资主体"
align="center"
prop="investmentSubject"
min-width="120"
/>
<el-table-column
label="建设阶段"
align="center"
prop="constructionPhase"
min-width="120"
/>
<el-table-column
label="资金下达文号"
align="center"
prop="fundingNumber"
min-width="120"
1 year ago
/> -->
<el-table-column
label="总投资金额(万元)"
align="center"
prop="total"
min-width="120"
1 year ago
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
min-width="180"
fixed="right"
>
2 years ago
<template slot-scope="scope">
1 year ago
<!-- <el-button
1 year ago
size="mini"
type="text"
icon="el-icon-view"
@click="viewInfo(scope.row)"
>查看</el-button
1 year ago
> -->
1 year ago
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['build:info:edit']"
1 year ago
>项目过程填报</el-button
1 year ago
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['build:info:remove']"
>删除</el-button
>
2 years ago
</template>
</el-table-column>
</el-table>
1 year ago
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
2 years ago
<!-- 添加或修改项目基本信息管理对话框 -->
1 year ago
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
:close-on-click-modal="false"
1 year ago
>
2 years ago
<el-row :gutter="15">
1 year ago
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="180px"
label-position="top"
>
<el-col :span="24">
2 years ago
<el-form-item label="项目名称" prop="projectName">
<!-- <el-input
v-model="form.projectName"
placeholder="请输入项目名称"
/> -->
1 year ago
<el-select
v-model="form.projectName"
placeholder="请输入项目名称"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in projectNameOptions"
:key="dict.projectName + dict.id"
2 years ago
:label="dict.projectName + '[' + dict.projectCode + ']'"
1 year ago
:value="dict.projectName + '[' + dict.projectCode + ']'"
@click.native="getId(dict)"
/>
2 years ago
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
1 year ago
<el-form-item label="项目法人单位" prop="projectLegalUnit">
1 year ago
<el-input
v-model="form.projectLegalUnit"
placeholder="请输入项目法人单位"
/>
1 year ago
</el-form-item>
</el-col>
<!-- <el-col :span="12">
2 years ago
<el-form-item label="项目法人" prop="unitLeader">
<el-input
v-model="form.unitLeader"
placeholder="请输入项目法人"
/>
</el-form-item>
1 year ago
</el-col> -->
<el-col :span="12">
2 years ago
<el-form-item label="项目法人" prop="projectLegalPerson">
1 year ago
<el-input
v-model="form.projectLegalPerson"
placeholder="请输入项目法人"
/>
2 years ago
</el-form-item>
</el-col>
1 year ago
<el-col :span="24">
1 year ago
<el-form-item label="单位负责人电话" prop="projectLegalPhone">
1 year ago
<el-input
v-model="form.projectLegalPhone"
placeholder="请输入单位负责人电话"
/>
2 years ago
</el-form-item>
</el-col>
1 year ago
<el-col :span="24">
<el-form-item label="项目类型" prop="projectType">
<div style="margin-bottom: 10px">
1 year ago
<el-radio v-model="radio" label="zd" @input="changeisMajor()"
>重大项目</el-radio
>
<el-radio v-model="radio" label="ms" @input="changeisMajor()"
>面上项目</el-radio
>
</div>
<div>
1 year ago
<el-radio
v-model="form.projectType"
v-for="dict in radio == 'zd'
? zd_projectTypeOptions
: ms_projectTypeOptions"
:label="dict.dictValue"
:key="dict.dictLabel + dict.id"
>
{{ dict.dictLabel }}
</el-radio>
</div>
<!-- <el-select
v-model="form.projectType"
placeholder="请选择项目类型"
style="width: 100%"
>
<div style="margin-bottom: 10px">
<el-radio v-model="radio" label="zd">重大项目</el-radio>
<el-radio v-model="radio" label="ms">面上项目</el-radio>
</div>
重大项目选项
<template v-if="radio == 'zd'">
<el-option
v-for="dict in zd_projectTypeOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</template>
面上项目选项
<template v-if="radio == 'ms'">
<el-option
v-for="dict in ms_projectTypeOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</template>
</el-select> -->
</el-form-item>
</el-col>
1 year ago
2 years ago
<el-col :span="12">
<el-form-item label="工程等别" prop="engineeringGrade">
<!-- <el-input
2 years ago
v-model="form.engineeringGrade"
placeholder="请输入工程等别"
/> -->
1 year ago
<el-select
v-model="form.engineeringGrade"
placeholder="请输入工程等别"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in engineeringGradeOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工程用途" prop="engineeringPurposes">
<!-- <el-input
2 years ago
v-model="form.engineeringPurposes"
placeholder="请输入工程用途"
/> -->
1 year ago
<el-select
v-model="form.engineeringPurposes"
placeholder="请输入工程用途"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in engineeringPurposesOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工程类别" prop="workCategory">
<!-- <el-input
v-model="form.workCategory"
placeholder="请输入工程类别"
/> -->
1 year ago
<el-select
v-model="form.workCategory"
placeholder="请输入工程用途"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in workCategoryOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="项目建设地址" prop="constructionAddress">
1 year ago
<el-input
v-model="form.constructionAddress"
placeholder="请输入项目建设地址"
/>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设模式" prop="constructionMode">
<!-- <el-input
2 years ago
v-model="form.constructionMode"
placeholder="请输入建设模式"
/> -->
1 year ago
<el-select
v-model="form.constructionMode"
placeholder="请输入建设模式"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in constructionModeOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设性质" prop="constructionNature">
<!-- <el-input
2 years ago
v-model="form.constructionNature"
placeholder="请输入建设性质"
/> -->
1 year ago
<el-select
v-model="form.constructionNature"
placeholder="请输入建设模式"
filterable
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in constructionNatureOptions"
:key="dict.dictLabel + dict.id"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设内容" prop="constructionContent">
1 year ago
<el-input
v-model="form.constructionContent"
placeholder="请输入建设内容"
/>
2 years ago
</el-form-item>
</el-col>
1 year ago
<!-- <el-col :span="12">
2 years ago
<el-form-item label="行政区划" prop="adcd">
1 year ago
<el-cascader
:options="areasOptions"
v-model="adcdArr"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleChange"
>
</el-cascader>
2 years ago
</el-form-item>
1 year ago
</el-col> -->
2 years ago
<el-col :span="12">
<el-form-item label="所属流域" prop="basin">
<el-input v-model="form.basin" placeholder="请输入所属流域" />
</el-form-item>
</el-col>
1 year ago
<el-col :span="12">
<el-form-item label="资金下达文号" prop="fundingNumber">
1 year ago
<el-input
v-model="form.fundingNumber"
placeholder="请输入资金下达文号"
/>
1 year ago
</el-form-item>
</el-col>
2 years ago
<el-col :span="12">
<el-form-item label="中央资金" prop="centralArrangedFunds">
1 year ago
<el-input
v-model="form.centralArrangedFunds"
placeholder="请输入中央资金"
>
<template slot="append">万元</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="中央资金比例" prop="centralArrangedFundsRate">
1 year ago
<el-input
v-model="form.centralArrangedFundsRate"
placeholder="请输入中央资金比例"
1 year ago
readonly
1 year ago
>
<template slot="append">%</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="省级资金" prop="provincialFunding">
1 year ago
<el-input
v-model="form.provincialFunding"
placeholder="请输入省级资金"
>
<template slot="append">万元</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="省级资金比例" prop="provincialFundingRate">
1 year ago
<el-input
v-model="form.provincialFundingRate"
placeholder="请输入省级资金比例"
1 year ago
readonly
1 year ago
>
<template slot="append">%</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地市资金" prop="cityLevelFunds">
1 year ago
<el-input
v-model="form.cityLevelFunds"
placeholder="请输入地市资金"
>
<template slot="append">万元</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地市资金比例" prop="cityLevelFundsRate">
1 year ago
<el-input
v-model="form.cityLevelFundsRate"
placeholder="请输入地市资金比例"
1 year ago
readonly
1 year ago
>
<template slot="append">%</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区县资金" prop="countyLevelFunds">
1 year ago
<el-input
v-model="form.countyLevelFunds"
placeholder="请输入区县资金"
>
<template slot="append">万元</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区县资金比例" prop="cityLevelFundsRate">
1 year ago
<el-input
v-model="form.countyLevelFundsRate"
placeholder="请输入区县资金比例"
1 year ago
readonly
1 year ago
>
<template slot="append">%</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
1 year ago
<el-form-item
label="乡镇及群众自筹和其他投资"
prop="townshipInvestments"
>
<el-input
v-model="form.townshipInvestments"
placeholder="请输入乡镇及群众自筹和其他投资"
>
<template slot="append">万元</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
1 year ago
<el-form-item
label="乡镇及群众自筹和其他投资比例"
prop="townshipInvestmentsRate"
>
<el-input
v-model="form.townshipInvestmentsRate"
placeholder="请输入乡镇及群众自筹和其他投资比例"
1 year ago
readonly
1 year ago
>
<template slot="append">%</template>
</el-input>
2 years ago
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否172项重大水利工程" prop="isMajorProject">
<!-- <el-input
v-model="form.isMajorProject"
placeholder="请输入是否172项重大水利工程"
/> -->
1 year ago
<el-select
v-model="form.isMajorProject"
placeholder="是否172项重大水利工程"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in isMajorProjectOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
2 years ago
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设阶段" prop="constructionPhase">
1 year ago
<el-input
v-model="form.constructionPhase"
placeholder="请输入建设阶段"
/>
2 years ago
</el-form-item>
</el-col>
1 year ago
<el-col :span="24">
<el-form-item label="项目投资主体" prop="investmentSubject">
1 year ago
<el-input
v-model="form.investmentSubject"
placeholder="请输入项目投资主体"
/>
2 years ago
</el-form-item>
</el-col>
</el-form>
</el-row>
1 year ago
<!-- <div slot="footer" class="dialog-footer"> -->
1 year ago
<div class="dialog-footer" slot="footer">
2 years ago
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看 -->
1 year ago
<el-dialog
:title="viewTitle"
:visible.sync="viewOpen"
width="1200px"
append-to-body
@close="closeView"
:close-on-click-modal="false"
1 year ago
>
1 year ago
<!-- 查看在建项目基本信息 -->
<div class="infoTitle">在建项目基本信息</div>
1 year ago
<!-- <div class="draLine"></div> -->
<el-divider content-position="right">
<span @click="handleUpdate(proMsg)">编辑</span>
</el-divider>
<div class="content">
1 year ago
<el-descriptions
class="margin-top"
:column="2"
border
:labelStyle="{
'text-align': 'left',
width: '180px',
height: '50px',
}"
:contentStyle="{ minWidth: '350px' }"
1 year ago
>
<el-descriptions-item span="2">
<template slot="label"> 项目名称 </template>
<!-- {{ this.viewTitle }} -->
{{ this.proMsg.projectName + "[" + this.proMsg.proCode + "]" }}
</el-descriptions-item>
1 year ago
<!-- <el-descriptions-item>
<template slot="label"> 项目法人 </template>
1 year ago
{{ this.proMsg.projectLegalPerson }}
</el-descriptions-item> -->
<el-descriptions-item>
1 year ago
<template slot="label"> 项目编编码 </template>
{{ this.proMsg.proCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 单位负责人电话 </template>
{{ this.proMsg.projectLegalPhone }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程等别 </template>
{{ engineeringGradeFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程用途 </template>
{{ engineeringPurposesFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 工程类别 </template>
{{ workCategoryFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 项目建设地址 </template>
{{ this.proMsg.constructionAddress }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建设模式 </template>
{{ constructionModeFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建设性质 </template>
{{ constructionNatureFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建设内容 </template>
{{ this.proMsg.constructionContent }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 行政区划 </template>
{{ this.proMsg.adcd }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 所属流域 </template>
{{ this.proMsg.basin }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 开工日期 </template>
1 year ago
{{ this.proMsg.commencementDate || "-" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 计划竣工日期 </template>
1 year ago
{{ this.proMsg.plannedCompletionDate || "-" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 项目类型 </template>
{{ projectTypeFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 总投资金额万元 </template>
{{ this.proMsg.total }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 中央资金万元 </template>
{{ this.proMsg.centralArrangedFunds }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 中央资金比例 </template>
{{ this.proMsg.centralArrangedFundsRate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 省级资金万元 </template>
{{ this.proMsg.provincialFunding }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 省级资金比例 </template>
{{ this.proMsg.provincialFundingRate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 地市资金万元 </template>
{{ this.proMsg.cityLevelFunds }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 地市资金比例 </template>
{{ this.proMsg.cityLevelFundsRate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 区县资金万元 </template>
{{ this.proMsg.countyLevelFunds }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 区县资金比例 </template>
{{ this.proMsg.cityLevelFundsRate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 乡镇及群众自筹和其他投资万元 </template>
{{ this.proMsg.countyLevelFunds }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 乡镇及群众自筹和其他投资比例 </template>
{{ this.proMsg.cityLevelFundsRate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 是否172项重大水利工程 </template>
{{ this.proMsg.isMajorProject }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 项目投资主体 </template>
{{ this.proMsg.investmentSubject }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建设阶段 </template>
{{ this.proMsg.constructionPhase }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 资金下达文号 </template>
{{ this.proMsg.fundingNumber }}
</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
2 years ago
</div>
</template>
<script>
import {
listInfo,
getInfo,
delInfo,
addInfo,
updateInfo,
exportInfo,
} from "@/api/build/projectInfo";
import {
listProposal,
getProposal,
delProposal,
addProposal,
updateProposal,
exportProposal,
getProjectCode,
} from "@/api/earlyStage/proposal";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
2 years ago
export default {
name: "Info",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 项目基本信息管理表格数据
infoList: [],
// 弹出层标题
title: "",
viewTitle: "",
2 years ago
// 是否显示弹出层
open: false,
viewOpen: false,
2 years ago
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
isMajor: null,
2 years ago
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
2 years ago
constructionAddress: null,
constructionMode: null,
constructionNature: null,
constructionContent: null,
adcd: null,
basin: null,
projectType: null,
// fundingSource: null,
centralArrangedFunds: null,
centralArrangedFundsRate: null,
provincialFunding: null,
provincialFundingRate: null,
cityLevelFunds: null,
cityLevelFundsRate: null,
countyLevelFunds: null,
countyLevelFundsRate: null,
townshipInvestments: null,
townshipInvestmentsRate: null,
isMajorProject: null,
investmentSubject: null,
constructionPhase: null,
fundingNumber: null,
proCode: null,
proNo: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
owerDept: null,
},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
1 year ago
sortBy: "desc",
},
2 years ago
},
// 表单参数
form: {},
adcdArr: [],
copyForm: {},
2 years ago
// 表单校验
rules: {
1 year ago
projectName: [
{
required: true,
message: "请选择项目名称",
trigger: "blur",
},
],
projectLegalPhone: [
{
required: true,
1 year ago
type: "string",
pattern:
/^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/,
message: "请输入正确的手机号",
trigger: "blur",
},
],
centralArrangedFunds: [
{
1 year ago
required: true,
1 year ago
message: "请输入中央资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: "请输入数字,可保留两位小数",
trigger: "blur",
},
],
provincialFunding: [
{
1 year ago
required: true,
1 year ago
message: "请输入省级资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: "请输入数字,可保留两位小数",
trigger: "blur",
},
],
cityLevelFunds: [
{
1 year ago
required: true,
1 year ago
message: "请输入地市资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: "请输入数字,可保留两位小数",
trigger: "blur",
},
],
countyLevelFunds: [
{
1 year ago
required: true,
1 year ago
message: "请输入区县资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: "请输入数字,可保留两位小数",
trigger: "blur",
},
],
townshipInvestments: [
{
1 year ago
required: true,
1 year ago
message: "请输入乡镇及群众自筹和其他投资",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
message: "请输入数字,可保留两位小数",
trigger: "blur",
},
2 years ago
],
},
//项目名称
projectNameOptions: [],
proNo: "",
proCode: "",
1 year ago
adcd: "",
2 years ago
// 是否是是否172项重大水利工程
isMajorProjectOptions: [],
radio: "zd",
// 重大项目字典
zd_projectTypeOptions: [],
// 面上项目字典
ms_projectTypeOptions: [],
// 工程等别字典
engineeringGradeOptions: [],
// 工程用途字典
engineeringPurposesOptions: [],
// 工程类别字典
workCategoryOptions: [],
// 建设模式字典
constructionModeOptions: [],
// 建设性质字典
constructionNatureOptions: [],
proMsg: {},
// 面包屑,路由信息
routeList: [
{
path: "/building/projectInfo",
routeName: "项目基本信息管理",
},
],
areasOptions: [],
areasOptionProps: {
1 year ago
emitPath: false,
checkStrictly: true, //选择任意一级
},
2 years ago
};
},
created() {
this.getList();
this.getDicts("whether").then((response) => {
this.isMajorProjectOptions = response.data;
});
this.getDicts("major_project").then((response) => {
// console.log("4444444444444444", response.data);
this.zd_projectTypeOptions = response.data;
});
this.getDicts("general_project").then((response) => {
// console.log("5555555555555", response.data);
this.ms_projectTypeOptions = response.data;
});
this.getDicts("engineering_grade").then((response) => {
this.engineeringGradeOptions = response.data;
});
this.getDicts("project_purposes").then((response) => {
this.engineeringPurposesOptions = response.data;
});
this.getDicts("project_category").then((response) => {
this.workCategoryOptions = response.data;
});
this.getDicts("Construction_mode").then((response) => {
this.constructionModeOptions = response.data;
});
this.getDicts("CONSTRUCTION_NATURE").then((response) => {
this.constructionNatureOptions = response.data;
});
this.getTreeData();
2 years ago
},
1 year ago
computed: {
sum() {
return (
Number(this.form.centralArrangedFunds) +
Number(this.form.provincialFunding) +
Number(this.form.cityLevelFunds) +
Number(this.form.countyLevelFunds) +
Number(this.form.townshipInvestments)
);
},
monneyList() {
const {
centralArrangedFunds,
provincialFunding,
cityLevelFunds,
countyLevelFunds,
townshipInvestments,
} = this.form;
return {
centralArrangedFunds,
provincialFunding,
cityLevelFunds,
countyLevelFunds,
townshipInvestments,
};
},
},
watch: {
monneyList: function (n, o) {
// console.log(1111, this.sum, n);
if (
this.form.centralArrangedFunds ||
this.form.provincialFunding ||
this.form.cityLevelFunds ||
this.form.countyLevelFunds ||
this.form.townshipInvestments
) {
for (let key in n) {
// console.log("tttt", n[key]);
this.form[key + "Rate"] = ((n[key] / this.sum) * 100).toFixed(2);
}
}
},
},
2 years ago
methods: {
1 year ago
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2);
let cityCode = row.adcd.slice(2, 4);
let areaCode = row.adcd.slice(4, 6);
if (areaCode != "00") {
return (
codeToText[provinceCode] +
"-" +
codeToText[provinceCode + cityCode] +
"-" +
codeToText[provinceCode + cityCode + areaCode]
);
} else if (cityCode != "00") {
return (
codeToText[provinceCode] + "-" + codeToText[provinceCode + cityCode]
);
} else {
return codeToText[provinceCode];
}
}
},
getTreeData() {
getAreasData().then((items) => {
// console.log("getAreasData", items.data);
let res = [];
let getChildren = (res, pid) => {
for (const i of items.data) {
if (i.parentid === pid) {
const newItem = {
label: i.name,
value: i.id,
};
if (i.layer != 3) newItem.children = [];
res.push(newItem);
getChildren(newItem.children, newItem.value);
}
}
};
getChildren(res, items.data[0].parentid);
// console.log(66666666666, res);
this.areasOptions = res;
// return res;
});
},
handleChange(value) {
//value为省市区code数组
if (value) {
1 year ago
this.form.adcd = JSON.stringify(value);
console.log("value", value, this.form.adcd);
var provinceCode = codeToText[value[0]]; //code转为省
var cityCode = codeToText[value[1]]; //市
var orgion = codeToText[value[2]]; //区
// console.log(44444444, provinceCode, cityCode, orgion);
// this.baseMsg.adcd = value[value.length - 1];
// console.log("this.baseMsg.adcd", this.baseMsg.adcd);
// this.form.province = provinceCode;
// this.form.city = cityCode;
// this.form.area = orgion;
// this.selectedOptions = provinceCode + cityCode + orgion;
}
},
// 保留项目类型
changeisMajor() {
if (this.radio == this.copyForm.isMajor) {
this.form.projectType = this.copyForm.projectType;
} else {
this.form.projectType = "";
}
},
// 工程等别字典翻译
engineeringGradeFormat(row, column) {
return this.selectDictLabel(
this.engineeringGradeOptions,
row.engineeringGrade
);
},
// 工程用途字典翻译
engineeringPurposesFormat(row, column) {
return this.selectDictLabel(
this.engineeringPurposesOptions,
row.engineeringPurposes
);
},
// 工程类别字典翻译
workCategoryFormat(row, column) {
return this.selectDictLabel(this.workCategoryOptions, row.workCategory);
},
// 建设模式字典
constructionModeFormat(row, column) {
return this.selectDictLabel(
this.constructionModeOptions,
row.constructionMode
);
},
// 建设性质字典
constructionNatureFormat(row, column) {
return this.selectDictLabel(
this.constructionNatureOptions,
row.constructionNature
);
},
// 项目类型字典翻译
projectTypeFormat(row, column) {
if (row.isMajor == "zd") {
return this.selectDictLabel(
this.zd_projectTypeOptions,
row.projectType
);
} else if (row.isMajor == "ms") {
return this.selectDictLabel(
this.ms_projectTypeOptions,
row.projectType
);
}
},
2 years ago
// 是否是是否172项重大水利工程
isBelongPlanningFormat(row, column) {
return this.selectDictLabel(
this.isMajorProjectOptions,
row.isMajorProject
);
},
projectNameFormat(row) {
if (row.projectName)
return row.projectName.slice(0, row.projectName.indexOf("["));
},
getId(res) {
// console.log(res)
getProposal(res.id).then((response) => {
// console.log(response.data)
this.proNo = response.data.proNo;
this.proCode = response.data.projectCode;
1 year ago
this.adcd = response.data.adcd;
2 years ago
});
},
/** 查询项目基本信息管理列表 */
getList() {
this.loading = true;
listInfo(this.queryParams).then((response) => {
this.infoList = response.records;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
isMajor: null,
2 years ago
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
2 years ago
constructionAddress: null,
constructionMode: null,
constructionNature: null,
constructionContent: null,
adcd: null,
basin: null,
projectType: null,
// fundingSource: null,
centralArrangedFunds: null,
centralArrangedFundsRate: null,
provincialFunding: null,
provincialFundingRate: null,
cityLevelFunds: null,
cityLevelFundsRate: null,
countyLevelFunds: null,
countyLevelFundsRate: null,
townshipInvestments: null,
townshipInvestmentsRate: null,
isMajorProject: null,
investmentSubject: null,
constructionPhase: null,
fundingNumber: null,
proCode: null,
proNo: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
owerDept: null,
};
this.resetForm("form");
},
// 查询表单重置
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
isMajor: null,
2 years ago
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
2 years ago
constructionAddress: null,
constructionMode: null,
constructionNature: null,
constructionContent: null,
adcd: null,
basin: null,
projectType: null,
// fundingSource: null,
centralArrangedFunds: null,
centralArrangedFundsRate: null,
provincialFunding: null,
provincialFundingRate: null,
cityLevelFunds: null,
cityLevelFundsRate: null,
countyLevelFunds: null,
countyLevelFundsRate: null,
townshipInvestments: null,
townshipInvestmentsRate: null,
isMajorProject: null,
investmentSubject: null,
constructionPhase: null,
fundingNumber: null,
proCode: null,
proNo: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
owerDept: null,
},
1 year ago
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
2 years ago
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetQueryForm();
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
// 查看信息
viewInfo(row) {
this.viewTitle = row.projectName.slice(0, row.projectName.indexOf("["));
this.proMsg = row;
console.log("proMsg", row);
this.viewOpen = true;
},
// 关闭弹窗
closeView() {
this.proMsg = {};
},
2 years ago
/** 新增按钮操作 */
handleAdd() {
this.reset();
listProposal(this.queryParams).then((response) => {
this.projectNameOptions = response.records;
});
this.radio = "zd";
2 years ago
this.open = true;
this.title = "添加项目基本信息管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
// const id = row.id || this.ids;
this.routeList[0].routeName = row.projectName;
this.routeList.push({
path: "/building/projectInfo/projectProcess",
routeName: row.proCode,
isEdit: true,
});
// 存储面包屑信息
this.$store.commit("setRouteList", JSON.stringify(this.routeList));
// 存储专题项目基础信息
// this.$store.commit("setBaseFormData", JSON.stringify(response.data));
// 跳转到选项卡页面
this.$router.push({
// path: "/project/special/options",
path: "/building/projectInfo/projectProcess?baseDataId=" + row.id,
2 years ago
});
// this.reset();
// const id = row.id || this.ids;
// getInfo(id).then((response) => {
// this.form = response.data;
// if (this.form)
// listProposal(this.queryParams).then((response) => {
// this.projectNameOptions = response.records;
// });
// // 重大项目与面上项目 区分
// this.radio = this.form.isMajor;
// this.form.projectName =
// this.form.projectName + "[" + this.form.proCode + "]";
// this.copyForm = { ...this.form };
// this.open = true;
// this.title = "修改项目基本信息管理";
// });
2 years ago
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.isMajor = this.radio;
if (this.proNo) {
this.form.proNo = this.proNo;
}
if (this.proCode) {
this.form.proCode = this.proCode;
}
1 year ago
if (this.adcd) {
this.form.adcd = this.adcd;
}
if (
this.form.projectName &&
this.form.projectName.indexOf("[") != -1
) {
this.form.projectName = this.form.projectName.slice(
0,
this.form.projectName.indexOf("[")
);
}
console.log(this.form);
// console.log("this.form.isMajor", this.form.isMajor);
2 years ago
if (this.form.id != null) {
updateInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delInfo(ids);
})
.then(() => {
this.getList();
this.msgSuccess("删除成功");
})
1 year ago
.catch(function () {});
2 years ago
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
},
};
</script>
1 year ago
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
2 years ago
::v-deep {
.el-dialog {
margin-top: 2vh !important;
}
1 year ago
.el-dialog__body {
transform: scale(1);
}
2 years ago
}
1 year ago
.dialog-footer {
// position: sticky;
}
2 years ago
</style>