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.

2459 lines
77 KiB

<template>
<!-- 项目基本信息-->
<div class="app-container">
<el-row class="query-row" :gutter="20">
<!-- <el-col :span="8" style="margin-bottom: 10px;">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-col> -->
<el-col v-show="showSearch" :span="16" style="margin-bottom: 10px;">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
>
<el-form-item label="项目名称" prop="projectName">
<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>
</el-form-item>
<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>
<el-form-item label="是否省重大水利工程项目" prop="isMajorProject">
<el-select
v-model="queryParams.data.isMajorProject"
placeholder="是否省重大水利工程项目"
clearable
size="small"
style="width: 100%"
@change="handleQuery"
>
<el-option
v-for="dict in isMajorProjectOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="infoList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
<el-table-column
label="项目名称"
align="left"
prop="projectName"
min-width="120"
/>
<el-table-column
label="项目编码"
align="left"
prop="proCode"
min-width="120"
/>
<el-table-column
label="行政区划"
align="left"
prop="adcd"
min-width="120"
:formatter="$formatAdcd"
/>
<el-table-column
label="项目类型"
align="left"
prop="projectType"
:formatter="projectTypeFormat"
min-width="120"
/>
<el-table-column
label="建设性质"
align="left"
prop="constructionNature"
:formatter="constructionNatureFormat"
min-width="120"
/>
<!-- <el-table-column
label="建设内容"
align="center"
prop="constructionContent"
min-width="120"
/>
<el-table-column
label="所属流域"
align="center"
prop="basin"
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"-->
<!-- /> -->
<!-- <el-table-column
label="总投资金额(万元)"
align="center"
prop="total"
min-width="150"
/> -->
<el-table-column
label="操作"
align="right"
class-name="small-padding fixed-width"
min-width="180"
fixed="right"
>
<template slot-scope="scope">
<!-- <el-button
size="mini"
type="text"
icon="el-icon-view"
@click="viewInfo(scope.row)"
>查看</el-button
> -->
<el-button
size="mini"
type="text"
icon="el-icon-setting"
@click="handleToList('1', scope.row)"
v-hasPermi="['build:xmgcgl:edit']"
>分级预警条件配置</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改项目基本信息管理对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
:close-on-click-modal="false"
>
<!-- :rules="rules" -->
<el-row :gutter="15">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="180px"
label-position="top"
>
<el-col :span="12">
<el-form-item label="是否有建议书审批" prop="isApproval">
<el-select
v-model="form.isApproval"
placeholder="请选择是否有建议书审批"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in isApprovalOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- 无建议书审批 -->
<el-form-item
label="项目名称"
prop="projectName"
v-if="form.isApproval == '0'"
>
<el-input
v-model="form.projectName"
placeholder="请输入项目名称"
size="small"
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectName" v-else>
<el-select
ref="selectPro"
v-model="form.projectName"
placeholder="请输入项目名称"
filterable
clearable
size="small"
style="width: 100%"
:disabled="!form.isApproval"
remote
:remote-method="remoteMethod"
@change="handleProNameChange"
:loading="selectLoading"
@visible-change="visibleChange"
>
<el-option
v-for="dict in projectNameOptions"
:key="dict.projectName + dict.id"
:label="dict.projectName + '[' + dict.projectCode + ']'"
:value="dict.projectName + '[' + dict.projectCode + ']'"
@click.native="getId(dict)"
/>
</el-select>
</el-form-item>
</el-col>
<!-- 无建议书审批时选择行政区划 -->
<el-col :span="12">
<el-form-item label="行政区划" prop="adcd">
<el-cascader
:options="areasOptions"
v-model="form.adcd"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleChange"
:disabled="form.isApproval == '1'"
>
</el-cascader>
</el-form-item>
</el-col>
<!-- 无建议书审批时填项目编码 -->
<el-col :span="12">
<el-form-item label="项目编码" prop="proCode">
<el-input
v-model="form.proCode"
placeholder="请输入项目编码"
:disabled="form.isApproval == '1'"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="项目种类" prop="projectKinds">
<el-select
v-model="form.projectKinds"
placeholder="请选择项目种类"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in projectKindsOptions"
: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="allLatitudeLongitudeList">
<el-button type="primary" style="width: 150px" @click="openDraw"
>标绘</el-button
>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目法人单位" prop="projectLegalPerson">
<el-input
v-model="form.projectLegalPerson"
placeholder="请输入项目法人单位"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="单位负责人电话" prop="projectLegalPhone">
<el-input
v-model="form.projectLegalPhone"
placeholder="请输入单位负责人电话"
/>
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<el-form-item label="项目负责人" prop="unitLeader">
<el-input
v-model="form.unitLeader"
placeholder="请输入项目法人"
/>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="项目负责人" prop="projectSuperintendent">
<el-input
v-model="form.projectSuperintendent"
placeholder="请输入项目负责人"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="项目负责人电话"
prop="projectSuperintendentPhone"
>
<el-input
v-model="form.projectSuperintendentPhone"
placeholder="请输入项目负责人电话"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单位法定代表人" prop="projectUnitLegal">
<el-input
v-model="form.projectUnitLegal"
placeholder="请输入单位法定代表人"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="单位法定代表人电话"
prop="projectUnitLegalPhone"
>
<el-input
v-model="form.projectUnitLegalPhone"
placeholder="请输入单位法定代表人电话"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目类型" prop="projectType">
<div style="margin-bottom: 10px">
<el-radio v-model="radio" label="zd" @input="changeisMajor()"
>重大项目</el-radio
>
<el-radio v-model="radio" label="ms" @input="changeisMajor()"
>面上项目</el-radio
>
<el-radio v-model="radio" label="qt" @input="changeisMajor()"
>其他</el-radio
>
</div>
<div>
<el-radio v-if="radio!='qt'"
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>
<el-col :span="12">
<el-form-item label="工程等别" prop="engineeringGrade">
<!-- <el-input
v-model="form.engineeringGrade"
placeholder="请输入工程等别"
/> -->
<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>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工程用途" prop="engineeringPurposes">
<!-- <el-input
v-model="form.engineeringPurposes"
placeholder="请输入工程用途"
/> -->
<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-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>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="项目建设地址" prop="constructionAddress">
<el-input
v-model="form.constructionAddress"
placeholder="请输入项目建设地址"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设模式" prop="constructionMode">
<!-- <el-input
v-model="form.constructionMode"
placeholder="请输入建设模式"
/> -->
<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>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设性质" prop="constructionNature">
<!-- <el-input
v-model="form.constructionNature"
placeholder="请输入建设性质"
/> -->
<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>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="建设内容" prop="constructionContent">
<el-input
type="textarea"
rows="4"
v-model="form.constructionContent"
placeholder="请输入建设内容"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="行政区划" prop="adcd">
<el-cascader
:options="areasOptions"
v-model="adcdArr"
:props="areasOptionProps"
placeholder="请选择行政区划"
clearable
size="small"
style="width: 100%"
@change="handleChange"
>
</el-cascader>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="所属流域" prop="basin">
<el-input v-model="form.basin" placeholder="请输入所属流域" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开工日期" prop="commencementDate">
<el-date-picker
clearable
size="small"
style="width: 100%"
v-model="form.commencementDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开工日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划竣工日期" prop="plannedCompletionDate">
<el-date-picker
clearable
size="small"
style="width: 100%"
v-model="form.plannedCompletionDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择计划竣工日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="资金下达文号" prop="fundingNumber">
<el-input
v-model="form.fundingNumber"
placeholder="请输入资金下达文号"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="中央资金" prop="centralArrangedFunds">
<el-input
v-model="form.centralArrangedFunds"
placeholder="请输入中央资金"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="中央资金比例" prop="centralArrangedFundsRate">
<el-input
v-model="form.centralArrangedFundsRate"
placeholder="请输入中央资金比例"
readonly
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="省级资金" prop="provincialFunding">
<el-input
v-model="form.provincialFunding"
placeholder="请输入省级资金"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="省级资金比例" prop="provincialFundingRate">
<el-input
v-model="form.provincialFundingRate"
placeholder="请输入省级资金比例"
readonly
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地市资金" prop="cityLevelFunds">
<el-input
v-model="form.cityLevelFunds"
placeholder="请输入地市资金"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地市资金比例" prop="cityLevelFundsRate">
<el-input
v-model="form.cityLevelFundsRate"
placeholder="请输入地市资金比例"
readonly
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区县资金" prop="countyLevelFunds">
<el-input
v-model="form.countyLevelFunds"
placeholder="请输入区县资金"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="区县资金比例" prop="cityLevelFundsRate">
<el-input
v-model="form.countyLevelFundsRate"
placeholder="请输入区县资金比例"
readonly
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="乡镇及群众自筹和其他投资"
prop="townshipInvestments"
>
<el-input
v-model="form.townshipInvestments"
placeholder="请输入乡镇及群众自筹和其他投资"
>
<template slot="append">万元</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="乡镇及群众自筹和其他投资比例"
prop="townshipInvestmentsRate"
>
<el-input
v-model="form.townshipInvestmentsRate"
placeholder="请输入乡镇及群众自筹和其他投资比例"
readonly
>
<template slot="append">%</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否省重大水利工程项目" prop="isMajorProject">
<!-- <el-input
v-model="form.isMajorProject"
placeholder="请输入是否省重大水利工程项目"
/> -->
<el-select
v-model="form.isMajorProject"
placeholder="是否省重大水利工程项目"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in isMajorProjectOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="建设阶段" prop="constructionPhase">
<el-input
v-model="form.constructionPhase"
placeholder="请输入建设阶段"
/>
</el-form-item>
</el-col> -->
<!-- <el-col :span="24">
<el-form-item label="项目投资主体" prop="investmentSubject">
<el-input
v-model="form.investmentSubject"
placeholder="请输入项目投资主体"
/>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="是否为安全度汛重点工程" prop="isKeyProject">
<el-select
v-model="form.isKeyProject"
placeholder="是否为安全度汛重点工程"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in SFoptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否穿破堤坝施工" prop="isPierceProject">
<el-select
v-model="form.isPierceProject"
placeholder="是否穿破堤坝施工"
clearable
size="small"
style="width: 100%"
>
<el-option
v-for="dict in SFoptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="审核时间" prop="approvalTime"
v-if="form.applicationStatus==2"
>
<el-date-picker
v-model="form.approvalTime"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择审核时间"
style="width: 100%"
readonly="readonly"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
label="审核意见"
prop="applicationResults"
style="width: 100%"
v-if="form.applicationStatus==2"
>
<el-input
v-model="form.applicationResults"
placeholder="请输入审核意见"
type="textarea"
:autosize="{ minRows: 6}"
readonly="readonly"
>
</el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<!-- <div slot="footer" class="dialog-footer"> -->
<div class="dialog-footer" slot="footer">
<el-button type="primary" @click="submitForm" v-if="this.title=='添加项目基本信息管理'"> </el-button>
<el-button type="warning" @click="submitFormApply" v-else> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看 -->
<el-dialog
:title="viewTitle"
:visible.sync="viewOpen"
width="1200px"
append-to-body
@close="closeView"
:close-on-click-modal="false"
>
<!-- 查看在建项目基本信息 -->
<!-- <div class="infoTitle">在建项目基本信息</div>-->
<!-- &lt;!&ndash; <div class="draLine"></div> &ndash;&gt;-->
<!-- <el-divider content-position="right">-->
<!-- <span @click="handleUpdate(proMsg)">编辑</span>-->
<!-- </el-divider>-->
<div class="content">
<el-descriptions
class="margin-top"
:column="2"
border
:labelStyle="{
'text-align': 'left',
width: '180px',
height: '50px',
}"
:contentStyle="{ minWidth: '350px' }"
>
<el-descriptions-item span="2">
<template slot="label"> 项目名称 </template>
<!-- {{ this.viewTitle }} -->
{{ this.proMsg.projectName + "[" + this.proMsg.proCode + "]" }}
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label"> 项目负责人 </template>
{{ this.proMsg.projectLegalPerson }}
</el-descriptions-item> -->
<el-descriptions-item>
<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>
{{ projectTypeFormat(this.proMsg) }}
</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>
{{ constructionModeFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 建设性质 </template>
{{ constructionNatureFormat(this.proMsg) }}
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label"> 项目建设地址 </template>
{{ this.proMsg.constructionAddress }}
</el-descriptions-item>
<el-descriptions-item span="2">
<template slot="label"> 建设内容 </template>
{{ this.proMsg.constructionContent }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 行政区划 </template>
{{ areaCodeFormat(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>
{{ this.proMsg.commencementDate || "-" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 计划竣工日期 </template>
{{ this.proMsg.plannedCompletionDate || "-" }}
</el-descriptions-item>
<!-- <el-descriptions-item>
<template slot="label"> 项目类型 </template>
{{ projectTypeFormat(this.proMsg) }}
</el-descriptions-item> -->
<!-- <el-descriptions-item span="2">
<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"> 是否省重大水利工程项目 </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-item>
<template slot="label"> 是否为安全度汛重点工程 </template>
{{ this.proMsg.isKeyProject }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 是否穿破堤坝施工 </template>
{{ this.proMsg.isPierceProject }}
</el-descriptions-item>
</el-descriptions>
<el-form
ref="form"
:model="proMsg"
:rules="rules"
label-width="180px"
label-position="top"
style="width: 100%"
>
<el-row>
<el-col :span="5">
<el-form-item label="审核时间" prop="approvalTime">
<el-date-picker
v-model="proMsg.approvalTime"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择审核时间"
style="width: 100%"
:readonly="proMsg.applicationStatus!='6'"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item
label="审核意见"
prop="applicationResults"
style="width: 100%"
>
<el-input
v-model="proMsg.applicationResults"
placeholder="请输入审核意见"
type="textarea"
:autosize="{ minRows: 6}"
:readonly="proMsg.applicationStatus!='6'"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="dialog-footer" slot="footer" v-if="proMsg.applicationStatus=='6'">
<el-button type="warning" @click="applyPass">通过</el-button>
<el-button type="danger" @click="applyTurnDown">不通过</el-button>
</div>
</el-dialog>
<el-dialog
title="申请记录"
:visible.sync="applyOpen"
custom-class="draw"
width="1400px"
append-to-body
:close-on-click-modal="false"
>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleApplyAdd"
>新增</el-button
>
</el-col>
</el-row>
<el-table
v-loading="applyLoading"
:data="applyList"
>
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed
/>
<el-table-column
label="项目名称"
align="center"
prop="projectName"
min-width="120"
/>
<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"
/>
<el-table-column
label="审核状态"
align="center"
prop="applicationStatus"
:formatter="reviewFormat"
min-width="120"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
min-width="180"
fixed="right"
>
<template slot-scope="scope">
<!-- <el-button
size="mini"
type="text"
icon="el-icon-view"
@click="viewInfo(scope.row)"
>查看</el-button
> -->
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleViewApply(scope.row)"
v-if="scope.row.applicationStatus=='6'"
>审核</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleViewApply(scope.row)"
v-if="scope.row.applicationStatus=='3'"
>查看</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleApplyUpdate(scope.row)"
v-if="scope.row.applicationStatus=='2'"
>查看</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleApplyDelete(scope.row)"
v-hasPermi="['build:xmgcgl:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="applyTotal > 0"
:total="applyTotal"
:page.sync="applyQueryParams.pageNum"
:limit.sync="applyQueryParams.pageSize"
@pagination="getApplyList"
/>
</el-dialog>
<el-dialog
:title="drawTitle"
:visible.sync="drawOpen"
custom-class="draw"
width="1500px"
append-to-body
:close-on-click-modal="false"
>
<mapEle
v-if="drawOpen"
:potMsg="potMsg"
:lineMsg="lineMsg"
:allDrawMsg="allDrawMsg"
@getMapData="getMapData"
/>
</el-dialog>
</div>
</template>
<script>
import mapEle from "@/components/map/index.vue";
import {
listInfo,
getInfo,
delInfo,
addInfo,
updateInfo,
exportInfo,
} from "@/api/build/projectInfo";
import { listProInfoApply, getProInfoApply, delProInfoApply, addProInfoApply, updateProInfoApply, exportProInfoApply }
from "@/api/build/proInfoApply";
import { listProposal, getProposal } from "@/api/earlyStage/proposal";
// import { listProDesign, getProDesign } from "@/api/earlyStage/preDesign";
import { getAreasData } from "@/api/areas/index";
import { regionData, codeToText, TextToCode } from "element-china-area-data";
import { v4 as uuidv4 } from "uuid";
export default {
name: "Info",
components: { mapEle },
data() {
return {
// 遮罩层
loading: true,
applyLoading:true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
applyOpen:false,
// 总条数
total: 0,
applyQueryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {},
},
// 项目基本信息管理表格数据
infoList: [],
applyList:[],
// 弹出层标题
title: "",
viewTitle: "",
drawTitle: "",
// 是否显示弹出层
open: false,
viewOpen: false,
drawOpen: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
isMajor: null,
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
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,
isKeyProject: null,
isPierceProject: null,
projectKinds: null,
},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
},
proQueryParams: {
pageNum: 1,
pageSize: 10,
ids: null,
data: {
projectName: null,
constructionNature: null,
constructionLocation: null,
projectUnitName: null,
briefIntroduction: null,
projectLandSituation: null,
designEstimateReport: null,
relatedAttachment: null,
projectCode: null,
proNo: null,
createUid: null,
createTime: null,
updateUid: null,
updateTime: null,
owerDept: null,
},
cv: {},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
},
// 表单参数
form: {},
adcdArr: [],
copyForm: {},
// 表单校验
rules: {
isApproval: [
{
required: true,
message: "请选择是否有建议书审批",
trigger: "change",
},
],
proCode: [
{
required: true,
message: "请输入项目编码",
trigger: "blur",
},
],
adcd: [
{
required: true,
message: "请选择行政区划",
trigger: "change",
},
],
projectName: [
{
required: true,
message: "请选择项目名称",
trigger: "change",
},
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
allLatitudeLongitudeList: [
{
required: true,
message: "请进行项目标绘",
trigger: "change",
},
],
projectType: [
{
required: true,
message: "请选择项目类型",
trigger: "change",
validator: (rule, value, callback) => {
if (this.radio !== 'qt' && !value) {
callback(new Error('请选择项目类型'));
} else {
callback();
}
}
},
],
engineeringGrade: [
{
required: true,
message: "请选择工程等别",
trigger: "change",
},
],
engineeringPurposes: [
{
required: true,
message: "请选择工程用途",
trigger: "change",
},
],
projectLegalUnit: [
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
projectLegalPerson: [
{
required: true,
message: "请输入项目法人单位",
trigger: "blur",
},
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
projectLegalPhone: [
{
required: true,
message: "请输入单位负责人电话",
trigger: "blur",
},
{
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",
},
],
projectSuperintendent: [
{
required: true,
message: "请输入项目负责人",
trigger: "blur",
},
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
projectSuperintendentPhone: [
{
required: true,
message: "请输入项目负责人电话",
trigger: "blur",
},
{
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",
},
],
projectUnitLegal: [
{
required: true,
message: "请输入单位法定代表人",
trigger: "blur",
},
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
projectUnitLegalPhone: [
{
required: true,
message: "请输入单位法定代表人电话",
trigger: "blur",
},
{
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",
},
],
constructionAddress: [
{
required: true,
message: "请输入项目建设地址",
trigger: "blur",
},
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
constructionMode: [
{
required: true,
message: "请选择建设模式",
trigger: "change",
},
],
constructionNature: [
{
required: true,
message: "请选择建设性质",
trigger: "change",
},
],
constructionContent: [
{
required: true,
message: "请输入建设内容",
trigger: "blur",
},
{ max: 6550, message: "字符长度最大为6550", trigger: "blur" },
],
basin: [{ max: 250, message: "字符长度最大为250", trigger: "blur" }],
fundingNumber: [
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
centralArrangedFunds: [
{
required: true,
message: "请输入中央资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/,
message: "请输入数字,整数7位,可保留两位小数",
trigger: "blur",
},
],
provincialFunding: [
{
required: true,
message: "请输入省级资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/,
message: "请输入数字,整数7位,可保留两位小数",
trigger: "blur",
},
],
cityLevelFunds: [
{
required: true,
message: "请输入地市资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/,
message: "请输入数字,整数7位,可保留两位小数",
trigger: "blur",
},
],
countyLevelFunds: [
{
required: true,
message: "请输入区县资金",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/,
message: "请输入数字,整数7位,可保留两位小数",
trigger: "blur",
},
],
townshipInvestments: [
{
required: true,
message: "请输入乡镇及群众自筹和其他投资",
trigger: "blur",
},
{
pattern:
/(^[1-9]([0-9]{0,6})?(\.[0-9]{1,2})?$|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$))/,
message: "请输入数字,整数7位,可保留两位小数",
trigger: "blur",
},
],
constructionPhase: [
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
investmentSubject: [
{ max: 250, message: "字符长度最大为250", trigger: "blur" },
],
isMajorProject: [
{
required: true,
message: "请选择是否省重大水利工程项目",
trigger: "blur",
},
],
projectKinds: [
{
required: true,
message: "请选择项目种类",
trigger: "change",
},
],
},
//项目名称
projectNameOptions: [],
proNo: "",
proCode: "",
applyTotal:0,
adcd: "",
// 是否是是否省重大水利工程项目
isMajorProjectOptions: [],
radio: "zd",
// 重大项目字典
zd_projectTypeOptions: [],
// 面上项目字典
ms_projectTypeOptions: [],
// 工程等别字典
engineeringGradeOptions: [],
// 工程用途字典
engineeringPurposesOptions: [],
// 工程类别字典
workCategoryOptions: [],
// 建设模式字典
constructionModeOptions: [],
// 建设性质字典
constructionNatureOptions: [],
// 项目种类字典
projectKindsOptions: [],
proMsg: {},
area:[],
// 面包屑,路由信息
routeList: [
{
path: "/building/projectInfo",
routeName: "项目基本信息管理",
},
],
areasOptions: [],
areasOptionProps: {
emitPath: false,
checkStrictly: true, //选择任意一级
},
// 地图坐标数据
potMsg: [],
lineMsg: [],
allDrawMsg: [],
//是否又建议书审批字典
isApprovalOptions: [],
isEdit: false,
reviewStatus:[],
SFoptions: [
{ label: "是", value: "是" },
{ label: "否", value: "否" },
],
selectLoading: false,
};
},
created() {
this.getList();
this.getDicts("whether").then((response) => {
this.isMajorProjectOptions = response.data;
this.isApprovalOptions = 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.getDicts("type_of_project").then((response) => {
this.projectKindsOptions = response.data;
});
this.getDicts("area_code").then((response)=>{
this.area=response.data;
})
this.getDicts("review_status").then((response)=>{
this.reviewStatus=response.data;
})
this.getTreeData();
},
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);
}
}
},
},
methods: {
handleViewApply(row){
if (row.id) {
this.proMsg=null;
getProInfoApply(row.id).then((res)=>{
this.proMsg=res.data
})
this.viewTitle = "信息审核"
this.viewOpen = true;
}
},
applyPass(row){
this.proMsg.applicationStatus='3'
updateProInfoApply(this.proMsg).then(
(res)=>{
if (res.code === 200) {
addInfo(this.proMsg).then(res=> {
if (res.code === 200) {
this.msgSuccess("审核完成");
this.viewOpen = false;
this.getApplyList();
}
}
)
}
}
)
},
applyTurnDown(row){
this.proMsg.applicationStatus='2'
updateProInfoApply(this.proMsg).then(
(res)=>{
if (res.code === 200) {
this.msgSuccess("审核完成");
this.viewOpen = false;
this.getApplyList();
}
}
)
},
handleApply(){
this.applyOpen=true;
this.getApplyList()
},
getApplyList(){
listProInfoApply(this.applyQueryParams).then((res)=>
{
this.applyList = res.records;
this.applyTotal = res.total;
this.applyLoading = false;
})
},
getMapData(potMsg, lineMsg, allDrawMsg) {
this.potMsg = potMsg;
this.lineMsg = lineMsg;
this.allDrawMsg = allDrawMsg;
console.log("地图坐标数据", this.potMsg, this.lineMsg, this.allDrawMsg);
this.form.pointLatitudeLongitudeList =
this.potMsg.length > 0 ? JSON.stringify(this.potMsg) : null;
this.form.lineLatitudeLongitudeList =
this.lineMsg.length > 0 ? JSON.stringify(this.lineMsg) : null;
this.form.allLatitudeLongitudeList =
this.allDrawMsg.length > 0 ? JSON.stringify(this.allDrawMsg) : null;
this.$refs.form.validateField("allLatitudeLongitudeList");
this.drawOpen = false;
},
openDraw() {
this.drawTitle = "项目标绘";
this.drawOpen = true;
},
formatAdcd(row) {
if (row.adcd) {
let provinceCode = row.adcd.slice(0, 2)+"0000";
let cityCode = row.adcd.slice(0, 4)+"00";
let areaCode = row.adcd;
let s="";
if (areaCode.length > 2) {
s=this.areaCodeFormat(provinceCode)
if (cityCode!=provinceCode){
s+="-"+this.areaCodeFormat(cityCode)
}
if (areaCode!=cityCode){
s+="-" + this.areaCodeFormat(areaCode)
}
}
return s
}
},
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) {
this.form.adcd = 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
);
},
reviewFormat(row,column){
return this.selectDictLabel(
this.reviewStatus,
row.applicationStatus,
);
},
//行政区划字典
areaCodeFormat(adcd, column) {
return this.selectDictLabel(
this.area,
adcd
);
},
// 项目类型字典翻译
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
);
}else if (row.isMajor !=null){
return '其他'
}
},
// 是否是是否省重大水利工程项目
isBelongPlanningFormat(row, column) {
return this.selectDictLabel(
this.isMajorProjectOptions,
row.isMajorProject
);
},
projectNameFormat(row) {
if (row.projectName)
return row.projectName.slice(0, row.projectName.indexOf("["));
},
// 是否有建议书审批字典翻译
isApprovalFormat(row, column) {
return this.selectDictLabel(this.isApprovalOptions, row.isApproval);
},
//项目种类字典翻译
projectKindsFormat(row, column) {
return this.selectDictLabel(this.projectKindsOptions, row.projectKinds);
},
visibleChange(visible) {
// console.log(visible);
// 下拉框显示隐藏
if (visible) {
const ref = this.$refs.selectPro;
let popper = ref.$refs.popper;
if (popper.$el) popper = popper.$el;
// 判断是否有添加按钮
if (
!Array.from(popper.children).some((v) => v.className === "btn-box")
) {
const el = document.createElement("div");
el.className = "btn-box";
el.innerHTML = `<div style="display:flex;align-items:center;justify-content: center;background:#f0f0f0">
<a class="btn" style="font-size:16px;display:block;line-height:38px;text-align:center;" >
<span style="font-size:12px">只展示10个项目其余项目的选择可搜索</span>
</a>
</div>
`;
popper.appendChild(el);
el.onclick = () => {
//TODO
};
}
}
},
remoteMethod(query) {
this.selectLoading = true;
if (query !== "") {
// console.log(444, query);
this.proQueryParams.data.projectName = query;
} else {
// this.reset();
this.proQueryParams.data.projectName = null;
}
listProposal(this.proQueryParams).then((res) => {
this.projectNameOptions = res.records;
this.selectLoading = false;
});
},
handleProNameChange(keyWork) {
// if (!keyWork) {
console.log(666);
this.selectLoading = true;
this.proQueryParams.data.projectName = null;
listProposal(this.proQueryParams).then((res) => {
this.projectNameOptions = res.records;
this.selectLoading = false;
});
// }/
},
getId(res) {
// console.log(res)
getProposal(res.id).then((response) => {
// console.log(response.data)
// this.proNo = response.data.proNo;
// this.proCode = response.data.projectCode;
// this.adcd = response.data.adcd;
this.form.proNo = response.data.proNo;
this.form.proCode = response.data.projectCode;
this.form.adcd = response.data.adcd;
});
},
/** 查询项目基本信息管理列表 */
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.potMsg = [];
this.lineMsg = [];
this.allDrawMsg = [];
this.form = {
id: null,
isKeyProject: null,
isPierceProject: null,
isMajor: null,
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
projectSuperintendent: null,
projectSuperintendentPhone: null,
projectUnitLegal: null,
projectUnitLegalPhone: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
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,
pointLatitudeLongitudeList: null,
lineLatitudeLongitudeList: null,
allLatitudeLongitudeList: null,
projectKinds: null,
};
this.resetForm("form");
},
// 查询表单重置
resetQueryForm() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
data: {
id: null,
isKeyProject: null,
isPierceProject: null,
isMajor: null,
projectName: null,
unitLeader: null,
projectLegalPerson: null,
projectLegalUnit: null,
projectLegalPhone: null,
projectSuperintendent: null,
projectSuperintendentPhone: null,
projectUnitLegal: null,
projectUnitL: null,
engineeringGrade: null,
engineeringPurposes: null,
workCategory: null,
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,
pointLatitudeLongitudeList: null,
lineLatitudeLongitudeList: null,
allLatitudeLongitudeList: null,
projectKinds: null,
},
// 排序方式
params: {
// 按哪个字段排序
orderBy: "create_time",
// desc降序,升序asc
sortBy: "desc",
},
};
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 = {};
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.isEdit = false;
listProposal(this.proQueryParams).then((response) => {
this.projectNameOptions = response.records;
});
this.radio = "zd";
this.open = true;
this.title = "添加项目基本信息管理";
},
handleApplyAdd() {
this.reset();
this.isEdit = false;
listProposal(this.proQueryParams).then((response) => {
this.projectNameOptions = response.records;
});
this.radio = "zd";
this.open = true;
this.title = "项目基本信息上报";
},
/** 修改按钮操作 */
handleUpdate(row) {
// // const id = row.id || this.ids;
// this.routeList[0].routeName = row.projectName;
// this.routeList.push({
// path: "/projectInfo/project-regular",
// 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/project-regular-list",
});
// 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 = "修改项目基本信息管理";
// });
},
handleToList (tabNum, row) {
this.$router.push({
// path: "/project/special/options",
path: "/building/build/costChangeWarning-list",
query: {
baseDataId: row.id,
proNo: row.proNo,
tabNum
}
});
},
handleApplyUpdate(row){
if (row.id){
this.reset();
this.title="审核信息"
this.isEdit = false;
listProposal(this.proQueryParams).then((response) => {
this.projectNameOptions = response.records;
});
getProInfoApply(row.id).then((res) =>
{
this.form=res.data
})
this.open=true;
}
},
/** 提交按钮 */
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;
// }
// 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(999, this.adcd);
// console.log(this.form);
// console.log("this.form.isMajor", this.form.isMajor);
if (this.form.id != null) {
updateInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
if (this.form.isApproval == "0") {
// console.log("uuidv4()", uuidv4());
this.form.proNo = uuidv4();
}
addInfo(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
submitFormApply() {
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;
// }
// 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(999, this.adcd);
// console.log(this.form);
// console.log("this.form.isMajor", this.form.isMajor);
if (this.form.id != null) {
this.form.applicationStatus='6'
this.applicationTime=null;
this.applicationResults=null;
updateProInfoApply(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.open = false;
this.getApplyList();
}
});
} else {
this.form.applicationStatus='6'
if (this.form.isApproval == "0") {
// console.log("uuidv4()", uuidv4());
this.form.proNo = uuidv4();
}
addProInfoApply(this.form).then((response) => {
if (response.code === 200) {
this.msgSuccess("新增成功");
this.open = false;
this.getApplyList();
}
});
}
}
});
},
handleApplyDelete(row){
const ids = row.id || this.ids;
if (ids) {
this.$confirm("是否删除选中的数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(function () {
return delProInfoApply(ids);
})
.then(() => {
this.getApplyList();
this.msgSuccess("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
/** 删除按钮操作 */
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("删除成功");
})
.catch(function () {});
} else {
this.$message.warning("请选择要删除的数据!!");
}
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/css/dialog.scss";
::v-deep {
.el-dialog {
margin-top: 2vh !important;
}
.el-dialog__body {
transform: scale(1);
}
.draw {
margin-top: 10vh !important;
}
}
// .dialog-footer {
// position: sticky;
// }
</style>