|
|
|
@ -3,20 +3,57 @@
|
|
|
|
|
<!-- 顶部信息 -->
|
|
|
|
|
<div class="containertop">
|
|
|
|
|
<div class="topleft">
|
|
|
|
|
<img src="@/assets/images/detailsicon/1.png" alt="">
|
|
|
|
|
<span>月度进展信息</span>
|
|
|
|
|
<img src="@/assets/images/detailsicon/1.png" alt="" />
|
|
|
|
|
<span class="lefttitle">月度进展信息</span>
|
|
|
|
|
<el-tooltip
|
|
|
|
|
:content="bindText"
|
|
|
|
|
placement="top"
|
|
|
|
|
:disabled="bindText.length <= 15"
|
|
|
|
|
>
|
|
|
|
|
<div class="bind-project" @click="handleBindProject">
|
|
|
|
|
{{ bindText }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="topright" v-if="action === 'fill' || !action || action === 'okay'">
|
|
|
|
|
<el-button type="primary" size="medium" plain
|
|
|
|
|
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleAdd">
|
|
|
|
|
<img src="@/assets/images/detailsicon/icon-xz@2x.png" alt="新增"
|
|
|
|
|
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
|
|
|
|
|
<div
|
|
|
|
|
class="topright"
|
|
|
|
|
v-if="action === 'fill' || !action || action === 'okay'"
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="medium"
|
|
|
|
|
plain
|
|
|
|
|
style="
|
|
|
|
|
border: none;
|
|
|
|
|
background-color: rgba(43, 98, 241, 0.1);
|
|
|
|
|
color: #2b62f1;
|
|
|
|
|
"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
src="@/assets/images/detailsicon/icon-xz@2x.png"
|
|
|
|
|
alt="新增"
|
|
|
|
|
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
|
|
|
|
|
/>
|
|
|
|
|
新增
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common','gov'])"
|
|
|
|
|
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport">
|
|
|
|
|
<img src="@/assets/images/detailsicon/icon-dc@2x.png" alt="导出"
|
|
|
|
|
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="medium"
|
|
|
|
|
plain
|
|
|
|
|
v-if="checkRole(['admin', 'common', 'gov'])"
|
|
|
|
|
style="
|
|
|
|
|
border: none;
|
|
|
|
|
background-color: rgba(43, 98, 241, 0.1);
|
|
|
|
|
color: #2b62f1;
|
|
|
|
|
"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
>
|
|
|
|
|
<img
|
|
|
|
|
src="@/assets/images/detailsicon/icon-dc@2x.png"
|
|
|
|
|
alt="导出"
|
|
|
|
|
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
|
|
|
|
|
/>
|
|
|
|
|
导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
@ -30,22 +67,38 @@
|
|
|
|
|
<div class="table-cell">当月完成投资</div>
|
|
|
|
|
<div class="table-cell">累计完成投资</div>
|
|
|
|
|
<div
|
|
|
|
|
style="width: auto; text-align: center;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;padding: 0 0.5rem;">
|
|
|
|
|
截止目前累计建成面积(平方米)</div>
|
|
|
|
|
style="
|
|
|
|
|
width: auto;
|
|
|
|
|
text-align: center;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
padding: 0 0.5rem;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
截止目前累计建成面积(平方米)
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-cell">项目进展详情</div>
|
|
|
|
|
<div class="table-cell">操作</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="custom-table-body">
|
|
|
|
|
<div v-if="tableData.length === 0" class="no-data-row">
|
|
|
|
|
暂无数据
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else v-for="item in tableData" :key="item.id" class="custom-table-row">
|
|
|
|
|
<div v-if="tableData.length === 0" class="no-data-row">暂无数据</div>
|
|
|
|
|
<div
|
|
|
|
|
v-else
|
|
|
|
|
v-for="item in tableData"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
class="custom-table-row"
|
|
|
|
|
>
|
|
|
|
|
<!-- 进度月份 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<template v-if="item.isEditing">
|
|
|
|
|
<el-date-picker v-model="item.month" type="month" value-format="yyyy-MM"
|
|
|
|
|
style="width: 100%;"></el-date-picker>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="item.month"
|
|
|
|
|
type="month"
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
{{ item.month }}
|
|
|
|
@ -54,13 +107,19 @@
|
|
|
|
|
|
|
|
|
|
<!-- 状态(始终不编辑) -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<span :style="getStatusColor(item.status)">{{ item.status }}</span>
|
|
|
|
|
<span :style="getStatusColor(item.status)">{{
|
|
|
|
|
item.status
|
|
|
|
|
}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 当月完成投资 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<template v-if="item.isEditing">
|
|
|
|
|
<el-input-number v-model.number="item.monthDoneAmount" :controls="false" style="width: 100%;" />
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model.number="item.monthDoneAmount"
|
|
|
|
|
:controls="false"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
{{ item.monthDoneAmount }}
|
|
|
|
@ -70,7 +129,11 @@
|
|
|
|
|
<!-- 累计完成投资 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<template v-if="item.isEditing">
|
|
|
|
|
<el-input-number v-model.number="item.totalDoneAmount" :controls="false" style="width: 100%;" />
|
|
|
|
|
<el-input-number
|
|
|
|
|
v-model.number="item.totalDoneAmount"
|
|
|
|
|
:controls="false"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
{{ item.totalDoneAmount }}
|
|
|
|
@ -80,7 +143,7 @@
|
|
|
|
|
<!-- 累计建成面积 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<template v-if="item.isEditing">
|
|
|
|
|
<el-input v-model="item.jzmqjc" style="width: 100%;" />
|
|
|
|
|
<el-input v-model="item.jzmqjc" style="width: 100%" />
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
{{ item.jzmqjc }}
|
|
|
|
@ -90,7 +153,7 @@
|
|
|
|
|
<!-- 项目进展详情 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<template v-if="item.isEditing">
|
|
|
|
|
<el-input v-model="item.xmjzxq" style="width: 100%;" />
|
|
|
|
|
<el-input v-model="item.xmjzxq" style="width: 100%" />
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
{{ formattedXmjzxq(item.xmjzxq) }}
|
|
|
|
@ -99,10 +162,27 @@
|
|
|
|
|
|
|
|
|
|
<!-- 操作列 -->
|
|
|
|
|
<div class="table-cell">
|
|
|
|
|
<el-button v-if="!item.isEditing" type="text" icon="el-icon-edit" @click="handleEdit(item)">编辑</el-button>
|
|
|
|
|
<el-button v-else type="text" icon="el-icon-check" @click="handleSave(item)">保存</el-button>
|
|
|
|
|
<el-button type="text" icon="el-icon-delete" style="color: #F25353;"
|
|
|
|
|
@click="handleDelete(item)">删除</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="!item.isEditing"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleEdit(item)"
|
|
|
|
|
>编辑</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
v-else
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-check"
|
|
|
|
|
@click="handleSave(item)"
|
|
|
|
|
>保存</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
style="color: #f25353"
|
|
|
|
|
@click="handleDelete(item)"
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -114,13 +194,22 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="进度月份" prop="month">
|
|
|
|
|
<el-date-picker v-model="form.month" type="month" placeholder="选择月份" value-format="yyyy-MM"
|
|
|
|
|
style="width: 100%;"></el-date-picker>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.month"
|
|
|
|
|
type="month"
|
|
|
|
|
placeholder="选择月份"
|
|
|
|
|
value-format="yyyy-MM"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
></el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="状态" prop="status" style="display: none;">
|
|
|
|
|
<el-select v-model="form.status" placeholder="请选择状态" style="width: 100%;">
|
|
|
|
|
<el-form-item label="状态" prop="status" style="display: none">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.status"
|
|
|
|
|
placeholder="请选择状态"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-option label="未更新" value="未更新"></el-option>
|
|
|
|
|
<el-option label="已更新" value="已更新"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -128,22 +217,36 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="当月完成投资" prop="monthDoneAmount">
|
|
|
|
|
<el-input v-model.number="form.monthDoneAmount" placeholder="请输入金额"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model.number="form.monthDoneAmount"
|
|
|
|
|
placeholder="请输入金额"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="累计完成投资" prop="totalDoneAmount">
|
|
|
|
|
<el-input v-model.number="form.totalDoneAmount" placeholder="请输入金额"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model.number="form.totalDoneAmount"
|
|
|
|
|
placeholder="请输入金额"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="截止目前累计建成面积(平方米)" prop="jzmqjc">
|
|
|
|
|
<el-input v-model="form.jzmqjc" placeholder="请输入面积"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.jzmqjc"
|
|
|
|
|
placeholder="请输入面积"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="项目进展详情" prop="xmjzxq">
|
|
|
|
|
<el-input v-model="form.xmjzxq" type="textarea" :rows="3" placeholder="请输入详情"></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.xmjzxq"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:rows="3"
|
|
|
|
|
placeholder="请输入详情"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -155,6 +258,109 @@
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 绑定项目的弹窗 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="绑定项目信息"
|
|
|
|
|
:visible.sync="bindDialogVisible"
|
|
|
|
|
width="50%"
|
|
|
|
|
>
|
|
|
|
|
<el-form label-width="200px">
|
|
|
|
|
<el-form-item label="当前系统产业项目名称:">
|
|
|
|
|
<el-input v-model="formDialog.name" style="width: 100%" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="绑定固投平台项目名称:"
|
|
|
|
|
required
|
|
|
|
|
v-if="!bindSuccess"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="bindForm.projectName"
|
|
|
|
|
placeholder="请输入绑定固投平台项目名称"
|
|
|
|
|
style="width: 84%"
|
|
|
|
|
:clearable="!bindSuccess"
|
|
|
|
|
:disabled="bindSuccess"
|
|
|
|
|
/>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="searchProjects"
|
|
|
|
|
style="margin-left: 3%"
|
|
|
|
|
:disabled="bindSuccess"
|
|
|
|
|
>查询</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- 显示项目详情 -->
|
|
|
|
|
<div
|
|
|
|
|
v-if="selectedProject"
|
|
|
|
|
style="margin-top: 1rem; margin-left: 3rem; width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<div class="grid-content">
|
|
|
|
|
<el-tooltip
|
|
|
|
|
:content="selectedProject.projectName || '暂无'"
|
|
|
|
|
placement="top"
|
|
|
|
|
:disabled="
|
|
|
|
|
!(
|
|
|
|
|
selectedProject.projectName &&
|
|
|
|
|
selectedProject.projectName.length > 20
|
|
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
style="
|
|
|
|
|
display: inline-block;
|
|
|
|
|
max-width: 500px;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
项目名称:{{ selectedProject.projectName || "暂无" }}
|
|
|
|
|
</span>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<div class="grid-content">
|
|
|
|
|
项目单位:{{ selectedProject.companyName || "暂无" }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" style="margin-top: 10px">
|
|
|
|
|
<div class="grid-content">
|
|
|
|
|
联系人:{{ selectedProject.contactName || "暂无" }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" style="margin-top: 10px">
|
|
|
|
|
<div class="grid-content">
|
|
|
|
|
联系电话:{{ selectedProject.contactPhone || "暂无" }}
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 已经绑定的 项目信息 -->
|
|
|
|
|
<el-form-item
|
|
|
|
|
label="固投平台项目名称:"
|
|
|
|
|
style="margin-top: 1rem"
|
|
|
|
|
v-if="bindSuccess"
|
|
|
|
|
>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="bindForm.projectName"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
disabled
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<span slot="footer">
|
|
|
|
|
<el-button @click="bindDialogVisible = false">取消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="confirmBinding"
|
|
|
|
|
:disabled="bindSuccess"
|
|
|
|
|
>确定</el-button
|
|
|
|
|
>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- <div class="yuedu">
|
|
|
|
|
<yuedutouzi :xmId="xmId" />
|
|
|
|
|
</div> -->
|
|
|
|
@ -165,45 +371,64 @@
|
|
|
|
|
// 查看详情信息
|
|
|
|
|
import { getMonthInformationPage } from "@/api/ManageApi/index";
|
|
|
|
|
// 在Apitwo里
|
|
|
|
|
import { updateProjectProgress, deletemonth, addmonth } from "@/api/manageApitwo/index";
|
|
|
|
|
import {
|
|
|
|
|
updateProjectProgress,
|
|
|
|
|
deletemonth,
|
|
|
|
|
addmonth,
|
|
|
|
|
bindProject,
|
|
|
|
|
searchProjects,
|
|
|
|
|
} from "@/api/manageApitwo/index";
|
|
|
|
|
|
|
|
|
|
import { checkPermi, checkRole } from "@/utils/permission";
|
|
|
|
|
// 投资
|
|
|
|
|
import yuedutouzi from '@/views/components/analysis/yuedutouzi.vue'
|
|
|
|
|
|
|
|
|
|
import yuedutouzi from "@/views/components/analysis/yuedutouzi.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: { yuedutouzi },
|
|
|
|
|
props: {
|
|
|
|
|
action: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
xmId: {
|
|
|
|
|
type: Number,
|
|
|
|
|
required: true
|
|
|
|
|
}
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
basicInfo: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
formDialog: {
|
|
|
|
|
name: "",
|
|
|
|
|
},
|
|
|
|
|
userInput: "", // 新增,记录用户输入
|
|
|
|
|
tableData: [], // 表格数据
|
|
|
|
|
dialogVisible: false, // 控制弹窗显示
|
|
|
|
|
bindDialogVisible: false, //用于绑定的弹窗
|
|
|
|
|
bindText: "绑定项目", // 初始状态为“绑定项目”
|
|
|
|
|
bindSuccess: false, // 新增:是否已绑定
|
|
|
|
|
bindForm: {
|
|
|
|
|
projectName: "",
|
|
|
|
|
},
|
|
|
|
|
selectedProject: null, // 绑定的项目对象
|
|
|
|
|
form: {
|
|
|
|
|
month: "", // 进度月份
|
|
|
|
|
status: "已更新", // 状态固定为“已更新”
|
|
|
|
|
monthDoneAmount: "", // 当月完成投资
|
|
|
|
|
totalDoneAmount: "", // 累计完成投资
|
|
|
|
|
jzmqjc: "", // 截止目前累计建成面积
|
|
|
|
|
xmjzxq: "" // 项目进展详情
|
|
|
|
|
xmjzxq: "", // 项目进展详情
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
month: [
|
|
|
|
|
{ required: true, message: "请选择月份", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
month: [{ required: true, message: "请选择月份", trigger: "change" }],
|
|
|
|
|
monthDoneAmount: [
|
|
|
|
|
{ required: true, message: "请输入当月完成投资", trigger: "blur" },
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (value === '' || value === null) {
|
|
|
|
|
if (value === "" || value === null) {
|
|
|
|
|
callback(new Error("请输入数字"));
|
|
|
|
|
} else if (isNaN(value)) {
|
|
|
|
|
callback(new Error("只能输入数字"));
|
|
|
|
@ -211,14 +436,14 @@ export default {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
totalDoneAmount: [
|
|
|
|
|
{ required: true, message: "请输入累计完成投资", trigger: "blur" },
|
|
|
|
|
{
|
|
|
|
|
validator: (rule, value, callback) => {
|
|
|
|
|
if (value === '' || value === null) {
|
|
|
|
|
if (value === "" || value === null) {
|
|
|
|
|
callback(new Error("请输入数字"));
|
|
|
|
|
} else if (isNaN(value)) {
|
|
|
|
|
callback(new Error("只能输入数字"));
|
|
|
|
@ -226,23 +451,91 @@ export default {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
trigger: "blur",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
formattedXmjzxq() {
|
|
|
|
|
return (text) => {
|
|
|
|
|
return text === 'etry' ? '' : text;
|
|
|
|
|
return text === "etry" ? "" : text;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
basicInfo: {
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
if (newVal && newVal.name) {
|
|
|
|
|
this.formDialog = {
|
|
|
|
|
...this.formDialog,
|
|
|
|
|
name: newVal.name,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
immediate: true,
|
|
|
|
|
deep: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
checkPermi,
|
|
|
|
|
checkRole,
|
|
|
|
|
|
|
|
|
|
async searchProjects() {
|
|
|
|
|
const userInput = this.bindForm.projectName.trim();
|
|
|
|
|
this.userInput = userInput;
|
|
|
|
|
if (!userInput) {
|
|
|
|
|
this.$message.warning("请输入项目名称");
|
|
|
|
|
this.selectedProject = null;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const res = await searchProjects({ projectName: userInput });
|
|
|
|
|
// 这里修正为 res.data 是数组
|
|
|
|
|
if (
|
|
|
|
|
res.code === 200 &&
|
|
|
|
|
Array.isArray(res.data) &&
|
|
|
|
|
res.data.length > 0
|
|
|
|
|
) {
|
|
|
|
|
this.selectedProject = res.data[0];
|
|
|
|
|
} else {
|
|
|
|
|
this.selectedProject = null;
|
|
|
|
|
this.$message.warning("未查询到相关项目");
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.$message.error("查询失败,请稍后再试");
|
|
|
|
|
this.selectedProject = null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async confirmBinding() {
|
|
|
|
|
if (!this.selectedProject) {
|
|
|
|
|
this.$message.warning("请先查询固投平台项目");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
const res = await bindProject({
|
|
|
|
|
id: this.xmId,
|
|
|
|
|
projectId: this.selectedProject.projectId,
|
|
|
|
|
});
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.$message.success("绑定成功");
|
|
|
|
|
this.bindText = `已绑定 ${this.selectedProject.projectName} 项目`;
|
|
|
|
|
this.bindForm.projectName = this.selectedProject.projectName;
|
|
|
|
|
this.bindSuccess = true;
|
|
|
|
|
this.bindDialogVisible = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.msg || "绑定失败");
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.$message.error("绑定失败,请稍后再试");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleBindProject() {
|
|
|
|
|
this.bindForm.projectName = "";
|
|
|
|
|
this.selectedProject = null;
|
|
|
|
|
this.bindSuccess = false;
|
|
|
|
|
this.bindDialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
// 新增按钮点击
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.form = {
|
|
|
|
@ -251,22 +544,22 @@ export default {
|
|
|
|
|
monthDoneAmount: "",
|
|
|
|
|
totalDoneAmount: "",
|
|
|
|
|
jzmqjc: "",
|
|
|
|
|
xmjzxq: ""
|
|
|
|
|
xmjzxq: "",
|
|
|
|
|
};
|
|
|
|
|
this.dialogVisible = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 提交新增表单
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs.formRef.validate(valid => {
|
|
|
|
|
this.$refs.formRef.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
const payload = {
|
|
|
|
|
...this.form,
|
|
|
|
|
xmId: this.xmId
|
|
|
|
|
xmId: this.xmId,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
addmonth(payload)
|
|
|
|
|
.then(response => {
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.$message.success("新增成功");
|
|
|
|
|
this.dialogVisible = false;
|
|
|
|
@ -275,7 +568,7 @@ export default {
|
|
|
|
|
this.$message.error(response.msg || "新增失败");
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
console.error("新增失败:", error);
|
|
|
|
|
this.$message.error("新增失败,请稍后再试");
|
|
|
|
|
});
|
|
|
|
@ -291,7 +584,7 @@ export default {
|
|
|
|
|
this.download(
|
|
|
|
|
"/gysl/projectProgress/export",
|
|
|
|
|
{
|
|
|
|
|
xmId: this.xmId
|
|
|
|
|
xmId: this.xmId,
|
|
|
|
|
},
|
|
|
|
|
`月度信息${new Date().getTime()}.xlsx`
|
|
|
|
|
);
|
|
|
|
@ -304,13 +597,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
if (Array.isArray(response.data) && response.data.length > 0) {
|
|
|
|
|
// 接口返回的数据处理:统一 status 为 “已更新”
|
|
|
|
|
this.tableData = response.data.map(item => ({
|
|
|
|
|
this.tableData = response.data.map((item) => ({
|
|
|
|
|
...item,
|
|
|
|
|
status: '已更新',
|
|
|
|
|
status: "已更新",
|
|
|
|
|
monthDoneAmount: item.monthDoneAmount ?? 0,
|
|
|
|
|
totalDoneAmount: item.totalDoneAmount ?? 0,
|
|
|
|
|
jzmqjc: item.jzmqjc ?? '',
|
|
|
|
|
xmjzxq: item.xmjzxq ?? ''
|
|
|
|
|
jzmqjc: item.jzmqjc ?? "",
|
|
|
|
|
xmjzxq: item.xmjzxq ?? "",
|
|
|
|
|
}));
|
|
|
|
|
} else {
|
|
|
|
|
this.tableData = [];
|
|
|
|
@ -324,8 +617,8 @@ export default {
|
|
|
|
|
// 编辑某一行
|
|
|
|
|
handleEdit(row) {
|
|
|
|
|
// 设置当前行为可编辑状态
|
|
|
|
|
this.tableData.forEach(item => {
|
|
|
|
|
this.$set(item, 'isEditing', item.id === row.id);
|
|
|
|
|
this.tableData.forEach((item) => {
|
|
|
|
|
this.$set(item, "isEditing", item.id === row.id);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -338,14 +631,14 @@ export default {
|
|
|
|
|
monthDoneAmount: row.monthDoneAmount,
|
|
|
|
|
totalDoneAmount: row.totalDoneAmount,
|
|
|
|
|
jzmqjc: row.jzmqjc,
|
|
|
|
|
xmjzxq: row.xmjzxq
|
|
|
|
|
xmjzxq: row.xmjzxq,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const response = await updateProjectProgress(updateData);
|
|
|
|
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.$message.success("更新成功");
|
|
|
|
|
this.$set(row, 'isEditing', false);
|
|
|
|
|
this.$set(row, "isEditing", false);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.msg || "更新失败");
|
|
|
|
|
}
|
|
|
|
@ -360,7 +653,7 @@ export default {
|
|
|
|
|
this.$confirm("确定要删除此条月度进展记录吗?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning"
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(async () => {
|
|
|
|
|
try {
|
|
|
|
@ -369,11 +662,13 @@ export default {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "删除成功!"
|
|
|
|
|
message: "删除成功!",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 从本地数据中移除
|
|
|
|
|
const index = this.tableData.findIndex(item => item.id === row.id);
|
|
|
|
|
const index = this.tableData.findIndex(
|
|
|
|
|
(item) => item.id === row.id
|
|
|
|
|
);
|
|
|
|
|
if (index !== -1) {
|
|
|
|
|
this.tableData.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
@ -388,7 +683,7 @@ export default {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "info",
|
|
|
|
|
message: "已取消删除"
|
|
|
|
|
message: "已取消删除",
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -403,11 +698,11 @@ export default {
|
|
|
|
|
default:
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getMonthInformationPage();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@ -416,7 +711,7 @@ export default {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
width: 100%;
|
|
|
|
|
background-color: #FFFFFF;
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
|
|
|
|
|
border-radius: 0.5rem;
|
|
|
|
|
}
|
|
|
|
@ -425,12 +720,12 @@ export default {
|
|
|
|
|
height: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: .5rem;
|
|
|
|
|
border-bottom: 1px solid #E5E5E5;
|
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
border-bottom: 1px solid #e5e5e5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.topleft {
|
|
|
|
|
width: 8rem;
|
|
|
|
|
width: 50%;
|
|
|
|
|
height: 2rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 0.4rem;
|
|
|
|
@ -442,29 +737,36 @@ export default {
|
|
|
|
|
height: 0.81rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.topleft span {
|
|
|
|
|
.lefttitle {
|
|
|
|
|
font-family: aliregular;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
color: #3D424C;
|
|
|
|
|
color: #3d424c;
|
|
|
|
|
line-height: 1rem;
|
|
|
|
|
}
|
|
|
|
|
.bind-project {
|
|
|
|
|
font-size: 0.88rem;
|
|
|
|
|
color: #1890ff;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
max-width: 200px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
padding: 1rem 1rem 1rem 2rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 自定义表格样式 */
|
|
|
|
|
.custom-table-container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border: 1px solid #EBEEF5;
|
|
|
|
|
border: 1px solid #ebeef5;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.custom-table-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
background-color: #f5f7fa;
|
|
|
|
|
/* font-weight: bold; */
|
|
|
|
|
font-size: 0.88rem;
|
|
|
|
|
padding: 0.5rem 0;
|
|
|
|
|
}
|
|
|
|
@ -480,7 +782,7 @@ export default {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 0.5rem 0;
|
|
|
|
|
border-bottom: 1px solid #EBEEF5;
|
|
|
|
|
border-bottom: 1px solid #ebeef5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.table-cell {
|
|
|
|
@ -498,9 +800,18 @@ export default {
|
|
|
|
|
color: #999;
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
}
|
|
|
|
|
.yuedu{
|
|
|
|
|
.yuedu {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 0rem 1rem 1rem 2rem;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
.grid-content {
|
|
|
|
|
min-height: 36px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center; /* 垂直居中 */
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
color: #666;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|