feat: 新增投资项目退出反馈、进度报告、计划申请及退出计划等管理功能模块及相关组件

This commit is contained in:
2025-12-27 01:11:47 +08:00
parent b29d128e41
commit 915cb66b40
11 changed files with 968 additions and 684 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -1,12 +1,12 @@
export interface InvestmentProjects {
id?: number;
plannedInvestmentYear: string;
plannedImageAmount: string;
plannedPaymentAmount: string;
selfFunding: string;
externalFunding: string;
fiscalFunding: string;
otherFunding: string;
plannedImageAmount: string | number | null;
plannedPaymentAmount: string | number | null;
selfFunding: string | number | null;
externalFunding: string | number | null;
fiscalFunding: string | number | null;
otherFunding: string | number | null;
fiscalFundingSource: string;
otherFundingSource: string;
}
@@ -25,7 +25,7 @@ export interface EvaluationRecordEntitiesT {
createBy: string;
createTime: string
}
export interface ProjectPlanApplyFormItem{
export interface ProjectPlanApplyFormItem {
id?: any;
projectName: string;
projectNature: string;
@@ -75,7 +75,7 @@ export interface ProjectPlanApplyFormItem{
projectDesc: string;
promotionPlan: string;
projectPreliminaryPlan: string;
projectPreliminaryPlanAttachment:any[] | string;
projectPreliminaryPlanAttachment: any[] | string;
attachments: any[] | string;
remark: string;
decisionType: string;
@@ -89,16 +89,16 @@ export interface ProjectPlanApplyFormItem{
groupInvestmentDeptOpinion: string;
submitUnitLeadershipOpinion: string;
submitUnitMainLeadershipOpinion: string;
planImageQuota:string;
projectInvestmentEntities?:InvestmentProjects[];
evaluationRecordEntities?:EvaluationRecordEntitiesT[];
planImageQuota: string;
projectInvestmentEntities?: InvestmentProjects[];
evaluationRecordEntities?: EvaluationRecordEntitiesT[];
delFlag?: number;
projectId?: number;
processInstanceId:string;
status:number;
deptId:number
processInstanceId: string;
status: number;
deptId: number
}
export interface ProjectPlanApplyFormData {
entity:ProjectPlanApplyFormItem;
entity: ProjectPlanApplyFormItem;
investmentProjects: InvestmentProjects[];
}

View File

@@ -15,7 +15,8 @@
</el-button>
</div>
<div class="opinion-input">
<el-input v-model="opinionText" type="textarea" :rows="4" :placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
<el-input v-model="opinionText" type="textarea" :rows="4"
:placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
</div>
<!-- <div class="opinion-attachment">
<el-icon class="attachment-icon">
@@ -30,7 +31,8 @@
<!-- 撤回区域可撤回状态显示 -->
<div v-if="status === 'withdrawable'" class="withdraw-section">
<div class="withdraw-input">
<el-input v-model="opinionText" type="textarea" :rows="4" :placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
<el-input v-model="opinionText" type="textarea" :rows="4"
:placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
</div>
<div class="withdraw-action">
<el-button type="primary" @click="handleWithdraw">
@@ -58,10 +60,11 @@
</div>
<div class="record-time">{{ item.showTime || '待审核' }}</div>
</div>
<!-- <div v-if="record.action" class="record-action">{{ record.action }}</div> -->
<template v-if="record.id !== 'root' && item.status === 2">
<div class="record-status" :class="getStatusClass(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved')">
<div class="record-status"
:class="getStatusClass(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved')">
{{ getStatusLabel(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved') }}
</div>
<div class="record-opinion">
@@ -79,7 +82,8 @@
</div>
</div>
<template v-if="selectUser">
<EmployeesDialog :visible="selectUserDialog" :data="[]" type="user" @change="changeUser" @update:visible="(e:boolean) => selectUserDialog = e"/>
<EmployeesDialog :visible="selectUserDialog" :data="[]" type="user" @change="changeUser"
@update:visible="(e: boolean) => selectUserDialog = e" />
</template>
</div>
</template>
@@ -100,37 +104,37 @@ const selectUserDialog = ref<boolean>(false);
const nextNodeId = ref<string>('');
const isApprovalUser = computed(() => {
const currentUserId = userInfo.userInfos.user?.userId
const currentNode = hierarchicalLookup(nodeList.value,taskDetails.value?.nodeId)
const currentNodeUser = currentNode ?.userVoList?.find((item:any) => item.id === currentUserId)
selectUser.value = nextNodeIsSelectUser(nodeList.value,currentNode?.id)
const currentNode = hierarchicalLookup(nodeList.value, taskDetails.value?.nodeId)
const currentNodeUser = currentNode?.userVoList?.find((item: any) => item.id === currentUserId)
selectUser.value = nextNodeIsSelectUser(nodeList.value, currentNode?.id)
return currentNodeUser?.status === 1
})
function hierarchicalLookup(nodeList:any[],nodeId:string):any {
function hierarchicalLookup(nodeList: any[], nodeId: string): any {
for (const nodeItem of nodeList) {
if (nodeItem.id === nodeId){
if (nodeItem.id === nodeId) {
return nodeItem
}
if (nodeItem.children && nodeItem.children.length > 0){
const children = hierarchicalLookup(nodeItem.children,nodeId)
if (children){
if (nodeItem.children && nodeItem.children.length > 0) {
const children = hierarchicalLookup(nodeItem.children, nodeId)
if (children) {
return children
}
}
if (nodeItem.branch && nodeItem.branch.length > 0){
const branch = hierarchicalLookup(nodeItem.branch,nodeId)
if (branch){
if (nodeItem.branch && nodeItem.branch.length > 0) {
const branch = hierarchicalLookup(nodeItem.branch, nodeId)
if (branch) {
return branch
}
}
}
}
function nextNodeIsSelectUser(nodeList:any[],currentNodeId:any):boolean{
if (!nodeList || nodeList.length === 0){
function nextNodeIsSelectUser(nodeList: any[], currentNodeId: any): boolean {
if (!nodeList || nodeList.length === 0) {
return false
}
const index = nodeList.findIndex(item => item.id === currentNodeId)
if (index === -1){
if (index === -1) {
return false
}
const node = nodeList[index + 1]
@@ -138,25 +142,25 @@ function nextNodeIsSelectUser(nodeList:any[],currentNodeId:any):boolean{
return node?.selectUser || false
}
interface UserVoList {
id: string;
name: string;
showTime?: string;
avatar: string;
approveDesc?: string;
operType?: string;
status: number;
id: string;
name: string;
showTime?: string;
avatar: string;
approveDesc?: string;
operType?: string;
status: number;
}
interface ApprovalRecord {
id: string;
userVoList: UserVoList[];
placeholder: string;
status: number;
name: string;
type: number;
selectUser: boolean;
multiple?: null;
children?: ApprovalRecord[];
branch: { children: ApprovalRecord[] }[];
id: string;
userVoList: UserVoList[];
placeholder: string;
status: number;
name: string;
type: number;
selectUser: boolean;
multiple?: null;
children?: ApprovalRecord[];
branch: { children: ApprovalRecord[] }[];
}
const props = defineProps<{
@@ -194,7 +198,7 @@ const emit = defineEmits<{
(e: 'add-attachment'): void;
}>();
const obj = ref<any>({})
const changeUser = (checkedList: any[]) =>{
const changeUser = (checkedList: any[]) => {
obj.value[`${nextNodeId.value}_assignee_select`] = checkedList;
selectUser.value = false;
selectUserDialog.value = false;
@@ -211,7 +215,7 @@ const handleApprove = async () => {
}
approving.value = true
try {
if (selectUser.value && nextNodeId.value){
if (selectUser.value && nextNodeId.value) {
selectUserDialog.value = true;
return;
}
@@ -374,6 +378,7 @@ onMounted(() => {
display: flex;
/* gap: 8px; */
margin-bottom: 16px;
.el-button {
flex: 1;
}