feat: 新增投资项目退出反馈、进度报告、计划申请及退出计划等管理功能模块及相关组件
This commit is contained in:
@@ -5,11 +5,12 @@
|
||||
<div class="form-meta">
|
||||
<div class="meta-item">
|
||||
<span>{{ t('projectExitPlan.form.applyDepartmentLabel') }}:</span>
|
||||
<el-input v-model="formData.applicationDept" size="small" :placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
<el-input v-model="formData.applicationDept" size="small"
|
||||
:placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
</div>
|
||||
<div class="meta-item">
|
||||
<span>{{ t('projectExitPlan.form.applyDateLabel') }}:</span>
|
||||
<span>{{new Date().toLocaleDateString('zh-CN')}}</span>
|
||||
<span>{{ new Date().toLocaleDateString('zh-CN') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,7 +21,8 @@
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.projectName') }}</div>
|
||||
</template>
|
||||
<div class="table-cell value project-name-cell">
|
||||
<el-input v-model="formData.projectName" :placeholder="t('projectExitPlan.form.projectNamePlaceholder')" readonly>
|
||||
<el-input v-model="formData.projectName"
|
||||
:placeholder="t('projectExitPlan.form.projectNamePlaceholder')" readonly>
|
||||
<template #suffix>
|
||||
<el-icon class="cursor-pointer interactive-icon" @click="handleSelectProject">
|
||||
<FolderOpened />
|
||||
@@ -38,7 +40,8 @@
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.exitSuggestion') }}</div>
|
||||
</template>
|
||||
<div class="table-cell value">
|
||||
<el-input v-model="formData.exitRecommendation" :placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
<el-input v-model="formData.exitRecommendation"
|
||||
:placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
@@ -65,7 +68,8 @@
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.taskDescription') }}</div>
|
||||
</template>
|
||||
<div class="table-cell value">
|
||||
<el-input v-model="formData.taskDescription" type="textarea" :rows="1" :placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
<el-input v-model="formData.taskDescription" type="textarea" :rows="1"
|
||||
:placeholder="t('projectExitPlan.placeholder.input')" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
@@ -74,8 +78,10 @@
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.executor') }}</div>
|
||||
</template>
|
||||
<div class="table-cell value">
|
||||
<el-select v-model="formData.executor" clearable :placeholder="t('projectExitPlan.form.executorPlaceholder')">
|
||||
<el-option :label="t('projectExitPlan.form.executorPlaceholder')" value="executor-placeholder" />
|
||||
<el-select v-model="formData.executor" clearable
|
||||
:placeholder="t('projectExitPlan.form.executorPlaceholder')">
|
||||
<el-option :label="t('projectExitPlan.form.executorPlaceholder')"
|
||||
value="executor-placeholder" />
|
||||
</el-select>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -85,23 +91,13 @@
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.taskStartTime') }}</div>
|
||||
</template>
|
||||
<div class="table-cell value">
|
||||
<el-date-picker
|
||||
v-model="formData.taskStartDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
:placeholder="t('projectExitPlan.placeholder.select')"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker v-model="formData.taskStartDate" type="date" value-format="YYYY-MM-DD"
|
||||
:placeholder="t('projectExitPlan.placeholder.select')" style="width: 100%" />
|
||||
</div>
|
||||
<div class="table-cell label">{{ t('projectExitPlan.form.taskEndTime') }}</div>
|
||||
<div class="table-cell value">
|
||||
<el-date-picker
|
||||
v-model="formData.taskEndDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
:placeholder="t('projectExitPlan.placeholder.select')"
|
||||
style="width: 100%"
|
||||
/>
|
||||
<el-date-picker v-model="formData.taskEndDate" type="date" value-format="YYYY-MM-DD"
|
||||
:placeholder="t('projectExitPlan.placeholder.select')" style="width: 100%" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -117,31 +113,39 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<el-table :data="tableData" style="width: 100%" height="50vh" highlight-current-row border @current-change="handleSelectionChange">
|
||||
<el-table :data="tableData" style="width: 100%" height="50vh" highlight-current-row border
|
||||
@current-change="handleSelectionChange">
|
||||
<el-table-column label="选择" width="80">
|
||||
<template #default="scope">
|
||||
<div class="options" :class="active === scope.$index ? 'active' : ''"></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectName" :label="t('projectLibrary.table.projectName')" min-width="200" />
|
||||
<el-table-column prop="projectStartTime" :label="t('projectLibrary.table.projectImplementationStart')" min-width="160" />
|
||||
<el-table-column prop="projectStartTime" :label="t('projectLibrary.table.projectImplementationStart')"
|
||||
min-width="160" />
|
||||
<el-table-column prop="projectNature" :label="t('projectLibrary.table.projectNature')" min-width="140">
|
||||
<template #default="{ row }">
|
||||
{{ projectNatureOptions.find((item: Enums) => item.value === row.projectNature)?.label }}
|
||||
{{projectNatureOptions.find((item: Enums) => item.value === row.projectNature)?.label}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="projectOwnerUnit" :label="t('projectLibrary.table.projectOwnerUnit')" min-width="200" />
|
||||
<el-table-column prop="projectOwnerUnit" :label="t('projectLibrary.table.projectOwnerUnit')"
|
||||
min-width="200" />
|
||||
<el-table-column prop="" label="项目实施单位" />
|
||||
<el-table-column prop="projectInvestmentDirection" :label="t('projectLibrary.table.projectDirection')" min-width="160" />
|
||||
<el-table-column prop="mainBusinessTypes" :label="t('planApply.applySection.mainBusinessType')" min-width="160">
|
||||
<el-table-column prop="projectInvestmentDirection" :label="t('projectLibrary.table.projectDirection')"
|
||||
min-width="160" />
|
||||
<el-table-column prop="mainBusinessTypes" :label="t('planApply.applySection.mainBusinessType')"
|
||||
min-width="160">
|
||||
<template #default="{ row }">
|
||||
{{ mainBusinessOptions.find((item: Enums) => item.value === row.mainBusinessTypes)?.label }}
|
||||
{{mainBusinessOptions.find((item: Enums) => item.value === row.mainBusinessTypes)?.label}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="constructionStage" :label="t('projectLibrary.table.constructionStage')" min-width="120" />
|
||||
<el-table-column prop="investmentCategory" :label="t('projectLibrary.table.investmentCategory')" min-width="140">
|
||||
<el-table-column prop="constructionStage" :label="t('projectLibrary.table.constructionStage')"
|
||||
min-width="120" />
|
||||
<el-table-column prop="investmentCategory" :label="t('projectLibrary.table.investmentCategory')"
|
||||
min-width="140">
|
||||
<template #default="{ row }">
|
||||
{{ investmentCategoryOptions.find((item: Enums) => item.value === row.investmentCategory)?.label }}
|
||||
{{investmentCategoryOptions.find((item: Enums) => item.value === row.investmentCategory)?.label
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" label="操作" fixed="right" width="100">
|
||||
@@ -151,16 +155,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="mt15 flex justify-end pagination-wrapper">
|
||||
<el-pagination
|
||||
background
|
||||
layout="sizes, prev, pager, next, jumper, total"
|
||||
:total="total"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
v-model:page-size="queryForm.size"
|
||||
v-model:current-page="queryForm.page"
|
||||
@size-change="handlePageSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
/>
|
||||
<el-pagination background layout="sizes, prev, pager, next, jumper, total" :total="total"
|
||||
:page-sizes="[10, 20, 50, 100]" v-model:page-size="queryForm.size"
|
||||
v-model:current-page="queryForm.page" @size-change="handlePageSizeChange"
|
||||
@current-change="handlePageChange" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="tableSubmit">确定</el-button>
|
||||
@@ -190,7 +188,7 @@ const visible = ref<boolean>(false);
|
||||
const visible2 = ref<boolean>(false);
|
||||
const props = defineProps<{
|
||||
modelValue?: ProjectTask;
|
||||
rules:FormRules;
|
||||
rules: FormRules;
|
||||
}>();
|
||||
const useForm = ref<FormInstance | undefined>();
|
||||
const emit = defineEmits<{
|
||||
@@ -202,11 +200,11 @@ const defaultForm: ProjectTask = {
|
||||
projectName: '',
|
||||
projectId: undefined,
|
||||
exitRecommendation: '',
|
||||
executionTask:'',
|
||||
taskDescription:'',
|
||||
executor:'',
|
||||
taskStartDate:new Date().toISOString().substring(0,10),
|
||||
taskEndDate:new Date().toISOString().substring(0,10),
|
||||
executionTask: '',
|
||||
taskDescription: '',
|
||||
executor: '',
|
||||
taskStartDate: new Date().toISOString().substring(0, 10),
|
||||
taskEndDate: new Date().toISOString().substring(0, 10),
|
||||
};
|
||||
|
||||
const formData = reactive<ProjectTask>({ ...defaultForm, ...props.modelValue });
|
||||
@@ -238,17 +236,17 @@ const handlePageChange = (page: number) => {
|
||||
getListOfProjects();
|
||||
};
|
||||
getListOfProjects();
|
||||
const getListSearch = () =>{
|
||||
const getListSearch = () => {
|
||||
queryForm.value.page = 1;
|
||||
getListOfProjects();
|
||||
}
|
||||
const handleReset = () =>{
|
||||
const handleReset = () => {
|
||||
queryForm.value.projectName = '';
|
||||
}
|
||||
watch(
|
||||
formData,
|
||||
(newVal) => {
|
||||
console.log(newVal,'formData');
|
||||
console.log(newVal, 'formData');
|
||||
emit('update:modelValue', { ...newVal });
|
||||
},
|
||||
{ deep: true }
|
||||
@@ -258,7 +256,7 @@ watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
console.log(newVal,'asdas');
|
||||
console.log(newVal, 'asdas');
|
||||
Object.assign(formData, newVal);
|
||||
}
|
||||
},
|
||||
@@ -371,9 +369,11 @@ defineExpose({
|
||||
.table-cell.value {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.table-row.two-columns .table-cell.label {
|
||||
width: 160px;
|
||||
}
|
||||
@@ -405,6 +405,7 @@ defineExpose({
|
||||
.exit-plan-table :deep(.el-date-editor) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.options {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
@@ -412,6 +413,7 @@ defineExpose({
|
||||
border: 1px solid var(--el-border-color);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: var(--el-color-primary);
|
||||
color: white;
|
||||
@@ -421,6 +423,7 @@ defineExpose({
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label:before) {
|
||||
left: 4px;
|
||||
position: absolute;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<el-row class="page-title-row mb10">
|
||||
<div class="page-title">{{ title ? title : t('progressReport.form.title') }}</div>
|
||||
<div class="page-report-time">{{ t('progressReport.form.reportTime') }}: {{formData.createTime || reportTime }}</div>
|
||||
<div class="page-report-time">{{ t('progressReport.form.reportTime') }}: {{ formData.createTime || reportTime }}
|
||||
</div>
|
||||
<div class="page-unit">{{ t('progressReport.form.unit') }}</div>
|
||||
</el-row>
|
||||
<div class="project-progress-report-form">
|
||||
@@ -10,55 +11,60 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.projectName')" required prop="projectName">
|
||||
<span>{{formData.projectName }}</span>
|
||||
<span>{{ formData.projectName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.projectStatus')" required prop="projectStatus">
|
||||
<span v-for="item in projectStatusOptions" :key="item.value">{{formData.projectStatus == item.value ? item.label : ''}}</span>
|
||||
<span v-for="item in projectStatusOptions" :key="item.value">{{ formData.projectStatus ==
|
||||
item.value ? item.label : '' }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.constructionStage')">
|
||||
<span v-for="item in constructionStageOptions" :key="item.value">{{formData.constructionStage == item.value ? item.label : ''}}</span>
|
||||
<span v-for="item in constructionStageOptions" :key="item.value">{{ formData.constructionStage
|
||||
==
|
||||
item.value ? item.label : '' }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.projectImplementationUnit')">
|
||||
<span>{{formData.implementingBody}}</span>
|
||||
<span>{{ formData.implementingBody }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required prop="projectTotalAmount">
|
||||
<span>{{formData.projectTotalAmount }}</span>
|
||||
<el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required
|
||||
prop="projectTotalAmount">
|
||||
<span>{{ formData.projectTotalAmount }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required prop="cumulativeInvestmentToDate">
|
||||
<span>{{formData.cumulativeInvestmentToDate}}</span>
|
||||
<el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required
|
||||
prop="cumulativeInvestmentToDate">
|
||||
<span>{{ formData.cumulativeInvestmentToDate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.completionRate')" required prop="completionRate">
|
||||
<span>{{formData.completionRate}}</span>
|
||||
<span>{{ formData.completionRate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.cumulativePaymentToMonthEnd')">
|
||||
<span>{{formData.cumulativePaymentToDate}}</span>
|
||||
<span>{{ formData.cumulativePaymentToDate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.paymentCompletionRate')">
|
||||
<span>{{formData.paymentCompletionRate}}</span>
|
||||
<span>{{ formData.paymentCompletionRate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -69,19 +75,23 @@
|
||||
<div class="panel-title">{{ t('progressReport.form.currentYearImageAmount') }}</div>
|
||||
<div style="flex: 1;">
|
||||
<el-form-item style="height: 82px;" :label="t('progressReport.form.reportYear')">
|
||||
<span>{{formData.annualReport}}</span>
|
||||
<span>{{ formData.annualReport }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.currentYearPlannedInvestment')" required prop="annualPlannedInvestment">
|
||||
<span>{{formData.investmentTotalAmount ?? 0 + ' ' + t('progressReport.form.unitSuffix')}}</span>
|
||||
:label="t('progressReport.form.currentYearPlannedInvestment')" required
|
||||
prop="annualPlannedInvestment">
|
||||
<span>{{ formData.investmentTotalAmount ?? 0 + ' ' +
|
||||
t('progressReport.form.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required prop="ytdRemainingInvestment">
|
||||
<span>{{ formData.ytdRemainingInvestment + ' ' + t('progressReport.form.unitSuffix')}}</span>
|
||||
:label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required
|
||||
prop="ytdRemainingInvestment">
|
||||
<span>{{ formData.ytdRemainingInvestment + ' ' +
|
||||
t('progressReport.form.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.investmentCompletionRate')">
|
||||
<span>{{formData.investmentCompletionRate}}%</span>
|
||||
<span>{{ formData.investmentCompletionRate }}%</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -91,15 +101,15 @@
|
||||
<div class="panel-title">{{ t('progressReport.form.currentYearPlannedAmount') }}</div>
|
||||
<div style="flex: 1;">
|
||||
<el-form-item style="height: 82px;" :label="t('progressReport.form.plannedPaymentAmount')">
|
||||
<span>{{formData.plannedPayment + ' ' + t('progressReport.form.unitSuffix')}}</span>
|
||||
<span>{{ formData.plannedPayment + ' ' + t('progressReport.form.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.completedPaymentAmount')">
|
||||
<span>{{formData.actualPayment + ' ' + t('progressReport.form.unitSuffix')}}</span>
|
||||
<span>{{ formData.actualPayment + ' ' + t('progressReport.form.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.plannedAmountPaymentCompletionRate')">
|
||||
<span>{{formData.investmentPlanCompletionRate}} %</span>
|
||||
<span>{{ formData.investmentPlanCompletionRate }} %</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,7 +119,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.effectiveness')">
|
||||
<span>{{formData.achievements}}</span>
|
||||
<span>{{ formData.achievements }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -117,7 +127,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.coordinationMatters')">
|
||||
<span>{{formData.coordinationIssues}}</span>
|
||||
<span>{{ formData.coordinationIssues }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -125,7 +135,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.nextWorkArrangements')">
|
||||
<span>{{formData.nextWorkPlan}}</span>
|
||||
<span>{{ formData.nextWorkPlan }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -133,8 +143,9 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.currentStageEvidenceMaterials')">
|
||||
<uploadFile :modelValue="JSON.parse(formData.supportingDocuments || '[]') || []" @change="uploadChange" :fileSize="20" type="simple" :limit="10"
|
||||
:isShowTip="false" disabled></uploadFile>
|
||||
<uploadFile :modelValue="JSON.parse(formData.supportingDocuments || '[]') || []"
|
||||
@change="uploadChange" :fileSize="20" type="simple" :limit="10" :isShowTip="false" disabled>
|
||||
</uploadFile>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -142,7 +153,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.remark')">
|
||||
<span>{{formData.remarks}}</span>
|
||||
<span>{{ formData.remarks }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -150,7 +161,8 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.isLastDeclaration')">
|
||||
<span>{{formData.isFinalApplication == '1' ? t('progressReport.form.yes') : t('progressReport.form.no')}}</span>
|
||||
<span>{{ formData.isFinalApplication == '1' ? t('progressReport.form.yes') :
|
||||
t('progressReport.form.no') }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -200,8 +212,8 @@ export interface ProjectProgressReportFormData {
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue?: InvestmentProjectProgress;
|
||||
rules?:FormRules;
|
||||
title?: string;
|
||||
rules?: FormRules;
|
||||
title?: string;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -209,37 +221,37 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
const useForm = ref<FormInstance | undefined>()
|
||||
const defaultForm = reactive<InvestmentProjectProgress>({
|
||||
id: undefined,
|
||||
projectName: '',
|
||||
projectId: undefined,
|
||||
projectStatus: '',
|
||||
constructionStage: '',
|
||||
implementingBody: '',
|
||||
projectTotalAmount: undefined,
|
||||
cumulativeInvestmentToDate: undefined,
|
||||
completionRate: undefined,
|
||||
cumulativePaymentToDate: undefined,
|
||||
paymentCompletionRate: undefined,
|
||||
annualReport: undefined,
|
||||
annualPlannedInvestment: undefined,
|
||||
ytdRemainingInvestment: undefined,
|
||||
investmentCompletionRate: undefined,
|
||||
plannedPayment: undefined,
|
||||
actualPayment: undefined,
|
||||
investmentPlanCompletionRate: undefined,
|
||||
achievements: '',
|
||||
coordinationIssues: '',
|
||||
nextWorkPlan: '',
|
||||
supportingDocuments: '',
|
||||
remarks: '',
|
||||
isFinalApplication: undefined,
|
||||
createBy: '',
|
||||
createTime: '',
|
||||
updateBy: '',
|
||||
updateTime: '',
|
||||
delFlag: '',
|
||||
processInstanceId: '',
|
||||
status: '',
|
||||
id: undefined,
|
||||
projectName: '',
|
||||
projectId: undefined,
|
||||
projectStatus: '',
|
||||
constructionStage: '',
|
||||
implementingBody: '',
|
||||
projectTotalAmount: undefined,
|
||||
cumulativeInvestmentToDate: undefined,
|
||||
completionRate: undefined,
|
||||
cumulativePaymentToDate: undefined,
|
||||
paymentCompletionRate: undefined,
|
||||
annualReport: undefined,
|
||||
annualPlannedInvestment: undefined,
|
||||
ytdRemainingInvestment: undefined,
|
||||
investmentCompletionRate: undefined,
|
||||
plannedPayment: undefined,
|
||||
actualPayment: undefined,
|
||||
investmentPlanCompletionRate: undefined,
|
||||
achievements: '',
|
||||
coordinationIssues: '',
|
||||
nextWorkPlan: '',
|
||||
supportingDocuments: '',
|
||||
remarks: '',
|
||||
isFinalApplication: undefined,
|
||||
createBy: '',
|
||||
createTime: '',
|
||||
updateBy: '',
|
||||
updateTime: '',
|
||||
delFlag: '',
|
||||
processInstanceId: '',
|
||||
status: '',
|
||||
})
|
||||
const formData = reactive<InvestmentProjectProgress>({ ...defaultForm, ...props.modelValue });
|
||||
const projectNameData = ref<ProjectPlanApplyFormItem[]>([]);
|
||||
@@ -257,30 +269,30 @@ const queryForm = reactive<investmentProjectsPlanList>({
|
||||
size: 10,
|
||||
});
|
||||
const getProjectNameList = async () => {
|
||||
try {
|
||||
const res = await investmentProjectsPlanPage(queryForm);
|
||||
projectNameData.value = res.data?.records || [];
|
||||
total.value = res.data?.total || 0;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
projectNameData.value = []; // 出错时设置为空数组
|
||||
}
|
||||
try {
|
||||
const res = await investmentProjectsPlanPage(queryForm);
|
||||
projectNameData.value = res.data?.records || [];
|
||||
total.value = res.data?.total || 0;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
projectNameData.value = []; // 出错时设置为空数组
|
||||
}
|
||||
}
|
||||
getProjectNameList();
|
||||
/**
|
||||
* 初始化图片
|
||||
* */
|
||||
const uploadChange = (_:any,data:any[]) =>{
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
|
||||
formData.supportingDocuments = [];
|
||||
return;
|
||||
}
|
||||
formData.supportingDocuments = data.map((item:any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
}
|
||||
})
|
||||
const uploadChange = (_: any, data: any[]) => {
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) {
|
||||
formData.supportingDocuments = [];
|
||||
return;
|
||||
}
|
||||
formData.supportingDocuments = data.map((item: any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
}
|
||||
})
|
||||
}
|
||||
// 监听 formData 变化,同步到父组件
|
||||
watch(
|
||||
@@ -296,18 +308,18 @@ watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString()
|
||||
Object.assign(formData, defaultForm, newVal);
|
||||
if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString()
|
||||
Object.assign(formData, newVal);
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
defineExpose({
|
||||
validate: async () => {
|
||||
const isValid = await useForm.value?.validate();
|
||||
if (!isValid) return false
|
||||
return formData
|
||||
},
|
||||
validate: async () => {
|
||||
const isValid = await useForm.value?.validate();
|
||||
if (!isValid) return false
|
||||
return formData
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user