This commit is contained in:
2025-12-27 12:52:38 +08:00
parent b674b78621
commit 2529c5fa6f
44 changed files with 942 additions and 1196 deletions

2
.env
View File

@@ -30,7 +30,7 @@ VITE_OAUTH2_MOBILE_CLIENT='app:app'
VITE_OAUTH2_SOCIAL_CLIENT='social:social' VITE_OAUTH2_SOCIAL_CLIENT='social:social'
# 是否开启前端滑块验证码 # 是否开启前端滑块验证码
VITE_VERIFY_ENABLE = true VITE_VERIFY_ENABLE = false
# 是否开启前端图形验证码 # 是否开启前端图形验证码
VITE_VERIFY_IMAGE_ENABLE = false VITE_VERIFY_IMAGE_ENABLE = false

View File

@@ -8,7 +8,7 @@ VITE_OPEN = true
ENV = 'development' ENV = 'development'
# ADMIN 服务地址 # ADMIN 服务地址
VITE_ADMIN_PROXY_PATH = http://panel1.nanxiislet.com:9999 # VITE_ADMIN_PROXY_PATH = http://panel1.nanxiislet.com:9999
# VITE_ADMIN_PROXY_PATH = http://192.168.2.102:9999 # VITE_ADMIN_PROXY_PATH = http://192.168.2.102:9999
# 罗老师本地 # 罗老师本地
# VITE_ADMIN_PROXY_PATH = http://10.30.148.198:7777 VITE_ADMIN_PROXY_PATH = http://10.30.148.198:7777

View File

@@ -10,3 +10,14 @@ export const getByProcessInstanceId = (processInstanceId: any) => {
} }
}); });
} }
// 企业微信登录
export const loginWx = (code: any) => {
return request({
url: '/oauth2/token',
method: 'post',
data:{
grant_type: 'wechat_work',
code:''
}
});
}

View File

@@ -53,3 +53,11 @@ export const getPropertyRightsByProcessInstanceIdAPI = (processInstanceId: strin
params: { processInstanceId }, params: { processInstanceId },
}); });
} }
// 根据id查询流程详情
export const getProcessInfoByIdAPI = (id: string | number) => {
return request({
url:'/admin/flow/form/processInfo',
method: 'get',
params: { id },
})
}

View File

@@ -16,7 +16,9 @@
> >
<template v-if="imageUrl"> <template v-if="imageUrl">
<!-- 如果返回的是OSS 地址则不需要增加 baseURL --> <!-- 如果返回的是OSS 地址则不需要增加 baseURL -->
<img :src="imageUrl.includes('http') ? imageUrl : baseURL + imageUrl" class="upload-image" /> <el-image :src="imageUrl.includes('http') ? imageUrl : baseURL + imageUrl" class="upload-image" @error="()=>imageUrl=''">
</el-image>
<div class="upload-handle" @click.stop> <div class="upload-handle" @click.stop>
<div class="handle-icon" @click="editImg" v-if="!self_disabled"> <div class="handle-icon" @click="editImg" v-if="!self_disabled">
<el-icon :size="props.iconSize"><Edit /></el-icon> <el-icon :size="props.iconSize"><Edit /></el-icon>
@@ -99,7 +101,7 @@ const formContext = inject(formContextKey, void 0);
const formItemContext = inject(formItemContextKey, void 0); const formItemContext = inject(formItemContextKey, void 0);
// 判断是否禁用上传和删除 // 判断是否禁用上传和删除
const self_disabled = computed(() => { const self_disabled = computed(() => {
return props.disabled || formContext?.disabled; return props.disabled || formContext?.disabled ;
}); });
/** /**

View File

@@ -5,18 +5,18 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="actualTotalIncome" :label="t('postInvestmentEvaluationForm.actualTotalRevenue')" required> <el-form-item prop="actualTotalIncome" :label="t('postInvestmentEvaluationForm.actualTotalRevenue')" required>
<el-input v-model="submitFormData.actualTotalIncome" <el-input-number :controls="false" v-model="submitFormData.actualTotalIncome"
:placeholder="t('postInvestmentEvaluationForm.inputPlaceholder')"> :placeholder="t('postInvestmentEvaluationForm.inputPlaceholder')">
<template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template> <template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template>
</el-input> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="actualInvestmentGain" :label="t('postInvestmentEvaluationForm.actualInvestmentIncome')" required> <el-form-item prop="actualInvestmentGain" :label="t('postInvestmentEvaluationForm.actualInvestmentIncome')" required>
<el-input v-model="submitFormData.actualInvestmentGain" <el-input-number :controls="false" v-model="submitFormData.actualInvestmentGain"
:placeholder="t('postInvestmentEvaluationForm.inputPlaceholder')"> :placeholder="t('postInvestmentEvaluationForm.inputPlaceholder')">
<template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template> <template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template>
</el-input> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -125,7 +125,7 @@
<div class="info-row"> <div class="info-row">
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.projectDirection') }} <div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.projectDirection') }}
</div> </div>
<div class="info-value required">{{ formData.projectInvestmentDirection || 'XXX' }}</div> <div class="info-value required">{{ initTypeString(projectDirectionOptions,formData.projectInvestmentDirection) }}</div>
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.directionSubdivision') <div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.directionSubdivision')
}} }}
</div> </div>
@@ -143,7 +143,7 @@
<div class="info-label required">{{ <div class="info-label required">{{
t('postInvestmentEvaluationForm.basicInfo.majorInvestmentProject') }} t('postInvestmentEvaluationForm.basicInfo.majorInvestmentProject') }}
</div> </div>
<div class="info-value required">{{ formData.majorInvestmentProjects || 'XXX' }}</div> <div class="info-value required"> {{ initTypeString(yesOrNo,formData.majorInvestmentProjects) }}</div>
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.keyProject') }}</div> <div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.keyProject') }}</div>
<div class="info-value required">{{ initTypeString(projectImportantOptions,formData.keyProject) || 'XXX' }}</div> <div class="info-value required">{{ initTypeString(projectImportantOptions,formData.keyProject) || 'XXX' }}</div>
</div> </div>
@@ -151,7 +151,7 @@
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.isWithinMainBusiness') <div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.isWithinMainBusiness')
}} }}
</div> </div>
<div class="info-value required">{{ formData.isMainBusiness || 'XXX' }}</div> <div class="info-value required">{{ initTypeString(yesOrNo,formData.isMainBusiness) }}</div>
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.mainBusinessType') }} <div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.mainBusinessType') }}
</div> </div>
<div class="info-value required">{{ initTypeString(mainBusinessOptions,formData.mainBusinessTypes) || 'XXX' }}</div> <div class="info-value required">{{ initTypeString(mainBusinessOptions,formData.mainBusinessTypes) || 'XXX' }}</div>
@@ -274,7 +274,7 @@
<div class="info-value">{{ formData.decisionType || 'XXX' }}</div> <div class="info-value">{{ formData.decisionType || 'XXX' }}</div>
<div class="info-label">{{ <div class="info-label">{{
t('postInvestmentEvaluationForm.decisionInfo.isProjectApprovalProcedureCompleted') }}</div> t('postInvestmentEvaluationForm.decisionInfo.isProjectApprovalProcedureCompleted') }}</div>
<div class="info-value">{{ formData.isProjectApprovalCompleted || 'XXX' <div class="info-value">{{ initTypeString(yesOrNo,formData.isProjectApprovalCompleted) || 'XXX'
}}</div> }}</div>
</div> </div>
<div class="info-row"> <div class="info-row">
@@ -292,7 +292,7 @@
<div class="info-label">{{ <div class="info-label">{{
t('postInvestmentEvaluationForm.decisionInfo.isDecisionProcedureCompleted') t('postInvestmentEvaluationForm.decisionInfo.isDecisionProcedureCompleted')
}}</div> }}</div>
<div class="info-value">{{ formData.isDecisionProcedureCompleted || 'XXX' }}</div> <div class="info-value">{{ initTypeString(yesOrNo,formData.isDecisionProcedureCompleted) || 'XXX' }}</div>
<div class="info-label">{{ <div class="info-label">{{
t('postInvestmentEvaluationForm.decisionInfo.decisionProcedureDocumentNumber') }}</div> t('postInvestmentEvaluationForm.decisionInfo.decisionProcedureDocumentNumber') }}</div>
<div class="info-value">{{ formData.decisionProcedureFileNo || 'XXX' }} <div class="info-value">{{ formData.decisionProcedureFileNo || 'XXX' }}
@@ -531,7 +531,8 @@ import {
constructionNatureOptions, constructionStageOptions, constructionNatureOptions, constructionStageOptions,
Enums, investmentAreaOptions, investmentCategoryOptions, mainBusinessOptions, projectDirectionDetailsOptions, Enums, investmentAreaOptions, investmentCategoryOptions, mainBusinessOptions, projectDirectionDetailsOptions,
projectImportantOptions, projectNatureOptions, projectImportantOptions, projectNatureOptions,
projectSourceOptions, projectStatusOptions, strategicIndustryOptions projectSourceOptions, projectStatusOptions, strategicIndustryOptions,projectDirectionOptions,
yesOrNo
} from '/@/hooks/enums'; } from '/@/hooks/enums';
import { PostInvestmentEvaluation, ProjectInvestmentInfo } from '/@/views/invBid/postInvestmentEvaluation/interface/type'; import { PostInvestmentEvaluation, ProjectInvestmentInfo } from '/@/views/invBid/postInvestmentEvaluation/interface/type';
import { InvestmentProjectProgress } from '/@/views/invMid/progressReport/interface/type'; import { InvestmentProjectProgress } from '/@/views/invMid/progressReport/interface/type';
@@ -648,7 +649,7 @@ const formData = reactive<ProjectInvestmentInfo>({ ...defaultForm });
* 提交数据表单 * 提交数据表单
* */ * */
const submitFormData = ref<PostInvestmentEvaluation>({} as PostInvestmentEvaluation); const submitFormData = ref<PostInvestmentEvaluation>({} as PostInvestmentEvaluation);
const requiredRule = [{ required: true, message: `${t('该字段必填')}` },{validator: (rule: any, value:any,callback: (e?: Error) => void) => { const requiredRule = [{ required: true, message: `该字段必填` },{validator: (rule: any, value:any,callback: (e?: Error) => void) => {
// 检查是否为空值 // 检查是否为空值
if (value === '' || value === null || value === undefined) { if (value === '' || value === null || value === undefined) {
callback() callback()
@@ -659,7 +660,7 @@ const requiredRule = [{ required: true, message: `${t('该字段必填')}` },{va
if (!isNaN(numValue) && isFinite(numValue)) { if (!isNaN(numValue) && isFinite(numValue)) {
callback() callback()
} else { } else {
callback(new Error(`${t('common.isNumber')}`)) callback(new Error(`必须是一个数字`))
} }
}}] }}]
const rules = ref<FormRules<PostInvestmentEvaluation>>({ const rules = ref<FormRules<PostInvestmentEvaluation>>({
@@ -763,7 +764,7 @@ defineExpose({
if (res){ if (res){
return submitFormData.value; return submitFormData.value;
} }
return false; return false
}, },
}) })
const uploadChange = (type:number,_:any,data:any[],index?:number) => { const uploadChange = (type:number,_:any,data:any[],index?:number) => {

View File

@@ -32,7 +32,7 @@
{{ detail.workUnit || '-' }} {{ detail.workUnit || '-' }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="t('expertApply.table.level')"> <el-descriptions-item :label="t('expertApply.table.level')">
{{ levelLabel(detail.level) }} <span>{{ level.find((item:any) => item.value === detail.level)?.label || '--' }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="t('expertLibrary.table.status')"> <el-descriptions-item :label="t('expertLibrary.table.status')">
<el-tag :type="['info', 'primary', 'success', 'danger'][detail.status]">{{ statusLabel(detail.status) }}</el-tag> <el-tag :type="['info', 'primary', 'success', 'danger'][detail.status]">{{ statusLabel(detail.status) }}</el-tag>
@@ -82,6 +82,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import {level} from "/@/hooks/enums";
const baseURL = import.meta.env.VITE_API_URL const baseURL = import.meta.env.VITE_API_URL

View File

@@ -251,7 +251,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')" required prop="strategicEmergingIndustry"> <el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')" required prop="strategicEmergingIndustry">
<el-select v-model="formData.strategicEmergingIndustry" :placeholder="t('reserveRegistration.basicInfo.selectPlaceholder')" > <el-select v-model="formData.strategicEmergingIndustry" :placeholder="t('reserveRegistration.basicInfo.selectPlaceholder')" >
<el-option v-for="item in yesOrNo" :key="item.value" :label="item.label" :value="item.value"/> <el-option v-for="item in strategicIndustryOptions" :key="item.value" :label="item.label" :value="item.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -572,12 +572,12 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.establishmentDocumentNumber')" :prop="formData.isCompleteEstablishmentProcedures === '1' ? 'establishmentDocumentNumber':''"> <el-form-item :label="t('reserveRegistration.decisionInfo.establishmentDocumentNumber')" :prop="formData.isCompleteEstablishmentProcedures === '0' ? 'establishmentDocumentNumber':''">
<el-input maxlength="255" v-model="formData.establishmentDocumentNumber" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" /> <el-input maxlength="255" v-model="formData.establishmentDocumentNumber" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.establishmentDocumentInfo')" :prop="formData.isCompleteEstablishmentProcedures === '1'?'establishmentDocumentInfo':''"> <el-form-item :label="t('reserveRegistration.decisionInfo.establishmentDocumentInfo')" :prop="formData.isCompleteEstablishmentProcedures === '0'?'establishmentDocumentInfo':''">
<el-input maxlength="255" v-model="formData.establishmentDocumentInfo" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" /> <el-input maxlength="255" v-model="formData.establishmentDocumentInfo" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -597,14 +597,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.decisionProgramDocumentNumber')" :prop="formData.isCompleteDecisionProcedures === '1'?'decisionProgramDocumentNumber' : ''"> <el-form-item :label="t('reserveRegistration.decisionInfo.decisionProgramDocumentNumber')" :prop="formData.isCompleteDecisionProcedures === '0'?'decisionProgramDocumentNumber' : ''">
<el-input maxlength="255" v-model="formData.decisionProgramDocumentNumber" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" /> <el-input maxlength="255" v-model="formData.decisionProgramDocumentNumber" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('reserveRegistration.decisionInfo.decisionDocumentInfo')" :prop="formData.isCompleteDecisionProcedures === '1'?'decisionDocumentInfo':''"> <el-form-item :label="t('reserveRegistration.decisionInfo.decisionDocumentInfo')" :prop="formData.isCompleteDecisionProcedures === '0'?'decisionDocumentInfo':''">
<el-input maxlength="255" v-model="formData.decisionDocumentInfo" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" /> <el-input maxlength="255" v-model="formData.decisionDocumentInfo" :placeholder="t('reserveRegistration.decisionInfo.inputPlaceholder')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -646,7 +646,8 @@ import {
projectSourceOptions, projectSourceOptions,
constructionNatureOptions, constructionNatureOptions,
investmentAreaOptions, yesOrNo, decisionTypeOptions, projectImportantOptions, cooperationPartnerNatureOptions, investmentAreaOptions, yesOrNo, decisionTypeOptions, projectImportantOptions, cooperationPartnerNatureOptions,
cityStrategyOptions, mainBusinessOptions, projectDirectionDetailsOptions,projectDirectionOptions cityStrategyOptions, mainBusinessOptions, projectDirectionDetailsOptions, projectDirectionOptions,
strategicIndustryOptions
} from '/@/hooks/enums'; } from '/@/hooks/enums';
import UserSelect from '/@/components/UserSelect/index.vue'; import UserSelect from '/@/components/UserSelect/index.vue';
import ProjectNameList from '/@/components/ProjectNameList/index.vue'; import ProjectNameList from '/@/components/ProjectNameList/index.vue';

View File

@@ -103,12 +103,12 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.keyProject')"> <el-form-item :label="t('reserveRegistration.basicInfo.keyProject')">
{{ formData.keyProject === 'yes' ? '是' : '' }} {{ projectImportantOptions.find(item => item.value === formData.keyProject)?.label || formData.keyProject || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.majorInvestmentProject')"> <el-form-item :label="t('reserveRegistration.basicInfo.majorInvestmentProject')">
{{ formData.majorInvestmentProject || '--' }} {{ yesOrNo.find(item => item.value === formData.majorInvestmentProject)?.label || formData.majorInvestmentProject || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -116,7 +116,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('reserveRegistration.basicInfo.withinMainBusiness')"> <el-form-item :label="t('reserveRegistration.basicInfo.withinMainBusiness')">
{{ formData.withinMainBusiness || '--' }} {{ yesOrNo.find(item => item.value === formData.withinMainBusiness)?.label || formData.withinMainBusiness || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -124,7 +124,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.mainBusinessType')"> <el-form-item :label="t('reserveRegistration.basicInfo.mainBusinessType')">
{{ formData.mainBusinessType || '--' }} {{ mainBusinessOptions.find(item => item.value === formData.mainBusinessType)?.label || formData.mainBusinessType || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -138,12 +138,12 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.projectDirection')"> <el-form-item :label="t('reserveRegistration.basicInfo.projectDirection')">
{{ formData.projectDirection || '--' }} {{ projectDirectionOptions.find(item => item.value === formData.projectDirection)?.label || formData.projectDirection || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.directionSubdivision')"> <el-form-item :label="t('reserveRegistration.basicInfo.directionSubdivision')">
{{ formData.directionSubdivision || '--' }} {{ projectDirectionDetailsOptions.find(item => item.value === formData.directionSubdivision)?.label || formData.directionSubdivision || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -151,12 +151,12 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')"> <el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')">
{{ formData.strategicEmergingIndustry || '--' }} {{ yesOrNo.find(item => item.value === formData.strategicEmergingIndustry)?.label || formData.strategicEmergingIndustry || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.urbanStrategy')"> <el-form-item :label="t('reserveRegistration.basicInfo.urbanStrategy')">
{{ formData.urbanStrategy || '--' }} {{ cityStrategyOptions.find(item => item.value === formData.urbanStrategy)?.label || formData.urbanStrategy || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -164,7 +164,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.isManufacturing')"> <el-form-item :label="t('reserveRegistration.basicInfo.isManufacturing')">
{{ formData.isManufacturing || '--' }} {{ yesOrNo.find(item => item.value === formData.isManufacturing)?.label || formData.isManufacturing || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -191,7 +191,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.isControllingShareholder')"> <el-form-item :label="t('reserveRegistration.basicInfo.isControllingShareholder')">
{{ formData.isControllingShareholder || '--' }} {{ yesOrNo.find(item => item.value === formData.isControllingShareholder)?.label || formData.isControllingShareholder || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -307,12 +307,12 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.decisionType')"> <el-form-item :label="t('reserveRegistration.decisionInfo.decisionType')">
{{ formData.decisionType || '--' }} {{ decisionTypeOptions.find(item => item.value === formData.decisionType)?.label || formData.decisionType || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.isCompleteEstablishmentProcedures')"> <el-form-item :label="t('reserveRegistration.decisionInfo.isCompleteEstablishmentProcedures')">
{{ formData.isCompleteEstablishmentProcedures === 'yes' ? '是' : '' }} {{ yesOrNo.find(item => item.value === formData.isCompleteEstablishmentProcedures)?.label || formData.isCompleteEstablishmentProcedures || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -333,7 +333,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.isCompleteDecisionProcedures')"> <el-form-item :label="t('reserveRegistration.decisionInfo.isCompleteDecisionProcedures')">
{{ formData.isCompleteDecisionProcedures === 'yes' ? '是' : '' }} {{ yesOrNo.find(item => item.value === formData.isCompleteDecisionProcedures)?.label || formData.isCompleteDecisionProcedures || '--' }}
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -369,14 +369,21 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, watch, ref } from 'vue'; import { reactive, watch, ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { import {
projectNatureOptions, projectNatureOptions,
investmentCategoryOptions, investmentCategoryOptions,
projectSourceOptions, projectSourceOptions,
constructionNatureOptions, constructionNatureOptions,
investmentAreaOptions investmentAreaOptions,
yesOrNo,
decisionTypeOptions,
projectImportantOptions,
cityStrategyOptions,
mainBusinessOptions,
projectDirectionDetailsOptions,
projectDirectionOptions
} from '/@/hooks/enums' } from '/@/hooks/enums'
import type { ExternalCooperationUnitItemT } from '/@/api/investment/cooperationUnit' import type { ExternalCooperationUnitItemT } from '/@/api/investment/cooperationUnit'
@@ -433,7 +440,10 @@ export interface ProjectBasicInfoFormData {
isCompleteDecisionProcedures: string; isCompleteDecisionProcedures: string;
reviewOpinions: ReviewOpinions; reviewOpinions: ReviewOpinions;
processInstanceId: string; processInstanceId: string;
cooperationUnits?: ExternalCooperationUnitItemT[] cooperationUnits?: ExternalCooperationUnitItemT[];
parentId?: string;
status: number;
deptId: string;
} }
export interface PartnerInfo { export interface PartnerInfo {
@@ -442,6 +452,7 @@ export interface PartnerInfo {
nature: string; nature: string;
controller: string; controller: string;
share: string; share: string;
cooperationController: string;
} }
export interface ReviewOpinions { export interface ReviewOpinions {
@@ -451,9 +462,15 @@ export interface ReviewOpinions {
submitUnitMainLeadershipOpinion: string; submitUnitMainLeadershipOpinion: string;
} }
const props = defineProps<{ const props = withDefaults(defineProps<{
modelValue?: ProjectBasicInfoFormData; modelValue?: ProjectBasicInfoFormData;
}>(); mainTitle?: string;
}>(), {
mainTitle: ''
});
const mainTitle = computed(() => props.mainTitle);
watch(mainTitle, () => undefined);
const defaultPartnerRow: PartnerInfo = { const defaultPartnerRow: PartnerInfo = {
id: '', id: '',
@@ -519,6 +536,10 @@ const defaultFormData: ProjectBasicInfoFormData = {
submitUnitLeadershipOpinion: '', submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '', submitUnitMainLeadershipOpinion: '',
}, },
parentId: '',
status: 1,
deptId: '',
cooperationUnits: [],
}; };
const formData = reactive<ProjectBasicInfoFormData>({ ...defaultFormData }); const formData = reactive<ProjectBasicInfoFormData>({ ...defaultFormData });
@@ -570,6 +591,19 @@ watch(
.form-row:last-of-type { .form-row:last-of-type {
margin-bottom: 0; margin-bottom: 0;
} }
/* 新增确保el-form-item内容自动换行 */
:deep(.el-form-item) {
word-wrap: break-word;
word-break: break-all;
overflow-wrap: break-word;
}
/* 对于表格中的内容也确保换行 */
:deep(.el-table .cell) {
word-wrap: break-word;
word-break: break-all;
overflow-wrap: break-word;
white-space: pre-wrap;
}
:deep(.el-form-item__label) { :deep(.el-form-item__label) {
font-weight: 500; font-weight: 500;

View File

@@ -5,12 +5,11 @@
<div class="form-meta"> <div class="form-meta">
<div class="meta-item"> <div class="meta-item">
<span>{{ t('projectExitPlan.form.applyDepartmentLabel') }}</span> <span>{{ t('projectExitPlan.form.applyDepartmentLabel') }}</span>
<el-input v-model="formData.applicationDept" size="small" <el-input v-model="formData.applicationDept" size="small" :placeholder="t('projectExitPlan.placeholder.input')" />
:placeholder="t('projectExitPlan.placeholder.input')" />
</div> </div>
<div class="meta-item"> <div class="meta-item">
<span>{{ t('projectExitPlan.form.applyDateLabel') }}</span> <span>{{ t('projectExitPlan.form.applyDateLabel') }}</span>
<span>{{ new Date().toLocaleDateString('zh-CN') }}</span> <span>{{new Date().toLocaleDateString('zh-CN')}}</span>
</div> </div>
</div> </div>
</div> </div>
@@ -21,8 +20,7 @@
<div class="table-cell label">{{ t('projectExitPlan.form.projectName') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.projectName') }}</div>
</template> </template>
<div class="table-cell value project-name-cell"> <div class="table-cell value project-name-cell">
<el-input v-model="formData.projectName" <el-input v-model="formData.projectName" :placeholder="t('projectExitPlan.form.projectNamePlaceholder')" readonly>
:placeholder="t('projectExitPlan.form.projectNamePlaceholder')" readonly>
<template #suffix> <template #suffix>
<el-icon class="cursor-pointer interactive-icon" @click="handleSelectProject"> <el-icon class="cursor-pointer interactive-icon" @click="handleSelectProject">
<FolderOpened /> <FolderOpened />
@@ -40,8 +38,7 @@
<div class="table-cell label">{{ t('projectExitPlan.form.exitSuggestion') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.exitSuggestion') }}</div>
</template> </template>
<div class="table-cell value"> <div class="table-cell value">
<el-input v-model="formData.exitRecommendation" <el-input v-model="formData.exitRecommendation" :placeholder="t('projectExitPlan.placeholder.input')" />
:placeholder="t('projectExitPlan.placeholder.input')" />
</div> </div>
</el-form-item> </el-form-item>
@@ -68,8 +65,7 @@
<div class="table-cell label">{{ t('projectExitPlan.form.taskDescription') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.taskDescription') }}</div>
</template> </template>
<div class="table-cell value"> <div class="table-cell value">
<el-input v-model="formData.taskDescription" type="textarea" :rows="1" <el-input v-model="formData.taskDescription" type="textarea" :rows="1" :placeholder="t('projectExitPlan.placeholder.input')" />
:placeholder="t('projectExitPlan.placeholder.input')" />
</div> </div>
</el-form-item> </el-form-item>
@@ -78,10 +74,8 @@
<div class="table-cell label">{{ t('projectExitPlan.form.executor') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.executor') }}</div>
</template> </template>
<div class="table-cell value"> <div class="table-cell value">
<el-select v-model="formData.executor" clearable <el-select v-model="formData.executor" clearable :placeholder="t('projectExitPlan.form.executorPlaceholder')">
:placeholder="t('projectExitPlan.form.executorPlaceholder')"> <el-option :label="t('projectExitPlan.form.executorPlaceholder')" value="executor-placeholder" />
<el-option :label="t('projectExitPlan.form.executorPlaceholder')"
value="executor-placeholder" />
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item>
@@ -91,13 +85,23 @@
<div class="table-cell label">{{ t('projectExitPlan.form.taskStartTime') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.taskStartTime') }}</div>
</template> </template>
<div class="table-cell value"> <div class="table-cell value">
<el-date-picker v-model="formData.taskStartDate" type="date" value-format="YYYY-MM-DD" <el-date-picker
:placeholder="t('projectExitPlan.placeholder.select')" style="width: 100%" /> v-model="formData.taskStartDate"
type="date"
value-format="YYYY-MM-DD"
:placeholder="t('projectExitPlan.placeholder.select')"
style="width: 100%"
/>
</div> </div>
<div class="table-cell label">{{ t('projectExitPlan.form.taskEndTime') }}</div> <div class="table-cell label">{{ t('projectExitPlan.form.taskEndTime') }}</div>
<div class="table-cell value"> <div class="table-cell value">
<el-date-picker v-model="formData.taskEndDate" type="date" value-format="YYYY-MM-DD" <el-date-picker
:placeholder="t('projectExitPlan.placeholder.select')" style="width: 100%" /> v-model="formData.taskEndDate"
type="date"
value-format="YYYY-MM-DD"
:placeholder="t('projectExitPlan.placeholder.select')"
style="width: 100%"
/>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -113,39 +117,31 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<el-table :data="tableData" style="width: 100%" height="50vh" highlight-current-row border <el-table :data="tableData" style="width: 100%" height="50vh" highlight-current-row border @current-change="handleSelectionChange">
@current-change="handleSelectionChange">
<el-table-column label="选择" width="80"> <el-table-column label="选择" width="80">
<template #default="scope"> <template #default="scope">
<div class="options" :class="active === scope.$index ? 'active' : ''"></div> <div class="options" :class="active === scope.$index ? 'active' : ''"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" :label="t('projectLibrary.table.projectName')" min-width="200" /> <el-table-column prop="projectName" :label="t('projectLibrary.table.projectName')" min-width="200" />
<el-table-column prop="projectStartTime" :label="t('projectLibrary.table.projectImplementationStart')" <el-table-column prop="projectStartTime" :label="t('projectLibrary.table.projectImplementationStart')" min-width="160" />
min-width="160" />
<el-table-column prop="projectNature" :label="t('projectLibrary.table.projectNature')" min-width="140"> <el-table-column prop="projectNature" :label="t('projectLibrary.table.projectNature')" min-width="140">
<template #default="{ row }"> <template #default="{ row }">
{{projectNatureOptions.find((item: Enums) => item.value === row.projectNature)?.label}} {{ projectNatureOptions.find((item: Enums) => item.value === row.projectNature)?.label }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectOwnerUnit" :label="t('projectLibrary.table.projectOwnerUnit')" <el-table-column prop="projectOwnerUnit" :label="t('projectLibrary.table.projectOwnerUnit')" min-width="200" />
min-width="200" />
<el-table-column prop="" label="项目实施单位" /> <el-table-column prop="" label="项目实施单位" />
<el-table-column prop="projectInvestmentDirection" :label="t('projectLibrary.table.projectDirection')" <el-table-column prop="projectInvestmentDirection" :label="t('projectLibrary.table.projectDirection')" min-width="160" />
min-width="160" /> <el-table-column prop="mainBusinessTypes" :label="t('planApply.applySection.mainBusinessType')" min-width="160">
<el-table-column prop="mainBusinessTypes" :label="t('planApply.applySection.mainBusinessType')"
min-width="160">
<template #default="{ row }"> <template #default="{ row }">
{{mainBusinessOptions.find((item: Enums) => item.value === row.mainBusinessTypes)?.label}} {{ mainBusinessOptions.find((item: Enums) => item.value === row.mainBusinessTypes)?.label }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="constructionStage" :label="t('projectLibrary.table.constructionStage')" <el-table-column prop="constructionStage" :label="t('projectLibrary.table.constructionStage')" min-width="120" />
min-width="120" /> <el-table-column prop="investmentCategory" :label="t('projectLibrary.table.investmentCategory')" min-width="140">
<el-table-column prop="investmentCategory" :label="t('projectLibrary.table.investmentCategory')"
min-width="140">
<template #default="{ row }"> <template #default="{ row }">
{{investmentCategoryOptions.find((item: Enums) => item.value === row.investmentCategory)?.label {{ investmentCategoryOptions.find((item: Enums) => item.value === row.investmentCategory)?.label }}
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="操作" fixed="right" width="100"> <el-table-column prop="" label="操作" fixed="right" width="100">
@@ -155,10 +151,16 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="mt15 flex justify-end pagination-wrapper"> <div class="mt15 flex justify-end pagination-wrapper">
<el-pagination background layout="sizes, prev, pager, next, jumper, total" :total="total" <el-pagination
:page-sizes="[10, 20, 50, 100]" v-model:page-size="queryForm.size" background
v-model:current-page="queryForm.page" @size-change="handlePageSizeChange" layout="sizes, prev, pager, next, jumper, total"
@current-change="handlePageChange" /> :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> </div>
<template #footer> <template #footer>
<el-button type="primary" @click="tableSubmit">确定</el-button> <el-button type="primary" @click="tableSubmit">确定</el-button>
@@ -188,7 +190,7 @@ const visible = ref<boolean>(false);
const visible2 = ref<boolean>(false); const visible2 = ref<boolean>(false);
const props = defineProps<{ const props = defineProps<{
modelValue?: ProjectTask; modelValue?: ProjectTask;
rules: FormRules; rules:FormRules;
}>(); }>();
const useForm = ref<FormInstance | undefined>(); const useForm = ref<FormInstance | undefined>();
const emit = defineEmits<{ const emit = defineEmits<{
@@ -200,11 +202,11 @@ const defaultForm: ProjectTask = {
projectName: '', projectName: '',
projectId: undefined, projectId: undefined,
exitRecommendation: '', exitRecommendation: '',
executionTask: '', executionTask:'',
taskDescription: '', taskDescription:'',
executor: '', executor:'',
taskStartDate: new Date().toISOString().substring(0, 10), taskStartDate:new Date().toISOString().substring(0,10),
taskEndDate: new Date().toISOString().substring(0, 10), taskEndDate:new Date().toISOString().substring(0,10),
}; };
const formData = reactive<ProjectTask>({ ...defaultForm, ...props.modelValue }); const formData = reactive<ProjectTask>({ ...defaultForm, ...props.modelValue });
@@ -236,17 +238,17 @@ const handlePageChange = (page: number) => {
getListOfProjects(); getListOfProjects();
}; };
getListOfProjects(); getListOfProjects();
const getListSearch = () => { const getListSearch = () =>{
queryForm.value.page = 1; queryForm.value.page = 1;
getListOfProjects(); getListOfProjects();
} }
const handleReset = () => { const handleReset = () =>{
queryForm.value.projectName = ''; queryForm.value.projectName = '';
} }
watch( watch(
formData, formData,
(newVal) => { (newVal) => {
console.log(newVal, 'formData'); console.log(newVal,'formData');
emit('update:modelValue', { ...newVal }); emit('update:modelValue', { ...newVal });
}, },
{ deep: true } { deep: true }
@@ -256,7 +258,7 @@ watch(
() => props.modelValue, () => props.modelValue,
(newVal) => { (newVal) => {
if (newVal) { if (newVal) {
console.log(newVal, 'asdas'); console.log(newVal,'asdas');
Object.assign(formData, newVal); Object.assign(formData, newVal);
} }
}, },
@@ -369,11 +371,9 @@ defineExpose({
.table-cell.value { .table-cell.value {
flex: 1; flex: 1;
} }
.table-row { .table-row {
margin: 0; margin: 0;
} }
.table-row.two-columns .table-cell.label { .table-row.two-columns .table-cell.label {
width: 160px; width: 160px;
} }
@@ -405,7 +405,6 @@ defineExpose({
.exit-plan-table :deep(.el-date-editor) { .exit-plan-table :deep(.el-date-editor) {
width: 100%; width: 100%;
} }
.options { .options {
width: 20px; width: 20px;
height: 20px; height: 20px;
@@ -413,7 +412,6 @@ defineExpose({
border: 1px solid var(--el-border-color); border: 1px solid var(--el-border-color);
border-radius: 50%; border-radius: 50%;
} }
.active { .active {
background-color: var(--el-color-primary); background-color: var(--el-color-primary);
color: white; color: white;
@@ -423,7 +421,6 @@ defineExpose({
height: 100%; height: 100%;
position: relative; position: relative;
} }
:deep(.el-form-item__label:before) { :deep(.el-form-item__label:before) {
left: 4px; left: 4px;
position: absolute; position: absolute;

File diff suppressed because it is too large Load Diff

View File

@@ -438,7 +438,7 @@ import {projectNatureOptions,
cityStrategyOptions, Enums cityStrategyOptions, Enums
} from "/@/hooks/enums" } from "/@/hooks/enums"
import type { FormInstance, FormRules } from 'element-plus'; import type { FormInstance, FormRules } from 'element-plus';
import FlowFormView from '/@/components/workbench/common/FlowFormView.vue' import FlowFormView from '/@/components/workbench/common/FlowFormView.vue';
const { t } = useI18n(); const { t } = useI18n();
const useForm = ref<FormInstance | undefined>(); const useForm = ref<FormInstance | undefined>();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
@@ -523,6 +523,9 @@ const defaultForm: ProjectPlanApplyFormData = {
submitUnitLeadershipOpinion: '', submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '', submitUnitMainLeadershipOpinion: '',
planImageQuota:'', planImageQuota:'',
status:0,
deptId:0,
processInstanceId:'',
}, },
investmentProjects: [ investmentProjects: [
{ {

View File

@@ -207,13 +207,8 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.currentStageEvidenceMaterials')"> <el-form-item :label="t('progressReport.form.currentStageEvidenceMaterials')">
<el-input v-model="formData.supportingDocuments" <UploadFile :modelValue="formData.supportingDocuments" @change="uploadChange" :fileSize="20"
:placeholder="t('progressReport.form.selectAttachmentPlaceholder')" readonly> type="simple" :limit="10" :isShowTip="false" />
<template #append>
<UploadFile :modelValue="formData.supportingDocuments" @change="uploadChange" :fileSize="20"
type="simple" :limit="10" :isShowTip="false" />
</template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@@ -1,8 +1,7 @@
<template> <template>
<el-row class="page-title-row mb10"> <el-row class="page-title-row mb10">
<div class="page-title">{{ title ? title : t('progressReport.form.title') }}</div> <div class="page-title">{{ title ? title : t('progressReport.form.title') }}</div>
<div class="page-report-time">{{ t('progressReport.form.reportTime') }}: {{ formData.createTime || reportTime }} <div class="page-report-time">{{ t('progressReport.form.reportTime') }}: {{formData.createTime || reportTime }}</div>
</div>
<div class="page-unit">{{ t('progressReport.form.unit') }}</div> <div class="page-unit">{{ t('progressReport.form.unit') }}</div>
</el-row> </el-row>
<div class="project-progress-report-form"> <div class="project-progress-report-form">
@@ -11,60 +10,55 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.projectName')" required prop="projectName"> <el-form-item :label="t('progressReport.form.projectName')" required prop="projectName">
<span>{{ formData.projectName }}</span> <span>{{formData.projectName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.projectStatus')" required prop="projectStatus"> <el-form-item :label="t('progressReport.form.projectStatus')" required prop="projectStatus">
<span v-for="item in projectStatusOptions" :key="item.value">{{ formData.projectStatus == <span v-for="item in projectStatusOptions" :key="item.value">{{formData.projectStatus == item.value ? item.label : ''}}</span>
item.value ? item.label : '' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.constructionStage')"> <el-form-item :label="t('progressReport.form.constructionStage')">
<span v-for="item in constructionStageOptions" :key="item.value">{{ formData.constructionStage <span v-for="item in constructionStageOptions" :key="item.value">{{formData.constructionStage == item.value ? item.label : ''}}</span>
==
item.value ? item.label : '' }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.projectImplementationUnit')"> <el-form-item :label="t('progressReport.form.projectImplementationUnit')">
<span>{{ formData.implementingBody }}</span> <span>{{formData.implementingBody}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required <el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required prop="projectTotalAmount">
prop="projectTotalAmount"> <span>{{formData.projectTotalAmount }}</span>
<span>{{ formData.projectTotalAmount }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required <el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required prop="cumulativeInvestmentToDate">
prop="cumulativeInvestmentToDate"> <span>{{formData.cumulativeInvestmentToDate}}</span>
<span>{{ formData.cumulativeInvestmentToDate }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.completionRate')" required prop="completionRate"> <el-form-item :label="t('progressReport.form.completionRate')" required prop="completionRate">
<span>{{ formData.completionRate }}</span> <span>{{formData.completionRate}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.cumulativePaymentToMonthEnd')"> <el-form-item :label="t('progressReport.form.cumulativePaymentToMonthEnd')">
<span>{{ formData.cumulativePaymentToDate }}</span> <span>{{formData.cumulativePaymentToDate}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="t('progressReport.form.paymentCompletionRate')"> <el-form-item :label="t('progressReport.form.paymentCompletionRate')">
<span>{{ formData.paymentCompletionRate }}</span> <span>{{formData.paymentCompletionRate}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -75,23 +69,19 @@
<div class="panel-title">{{ t('progressReport.form.currentYearImageAmount') }}</div> <div class="panel-title">{{ t('progressReport.form.currentYearImageAmount') }}</div>
<div style="flex: 1;"> <div style="flex: 1;">
<el-form-item style="height: 82px;" :label="t('progressReport.form.reportYear')"> <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>
<el-form-item style="height: 82px;" <el-form-item style="height: 82px;"
:label="t('progressReport.form.currentYearPlannedInvestment')" required :label="t('progressReport.form.currentYearPlannedInvestment')" required prop="annualPlannedInvestment">
prop="annualPlannedInvestment"> <span>{{formData.investmentTotalAmount ?? 0 + ' ' + t('progressReport.form.unitSuffix')}}</span>
<span>{{ formData.investmentTotalAmount ?? 0 + ' ' +
t('progressReport.form.unitSuffix') }}</span>
</el-form-item> </el-form-item>
<el-form-item style="height: 82px;" <el-form-item style="height: 82px;"
:label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required :label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required prop="ytdRemainingInvestment">
prop="ytdRemainingInvestment"> <span>{{ formData.ytdRemainingInvestment + ' ' + t('progressReport.form.unitSuffix')}}</span>
<span>{{ formData.ytdRemainingInvestment + ' ' +
t('progressReport.form.unitSuffix') }}</span>
</el-form-item> </el-form-item>
<el-form-item style="height: 82px;" <el-form-item style="height: 82px;"
:label="t('progressReport.form.investmentCompletionRate')"> :label="t('progressReport.form.investmentCompletionRate')">
<span>{{ formData.investmentCompletionRate }}%</span> <span>{{formData.investmentCompletionRate}}%</span>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
@@ -101,15 +91,15 @@
<div class="panel-title">{{ t('progressReport.form.currentYearPlannedAmount') }}</div> <div class="panel-title">{{ t('progressReport.form.currentYearPlannedAmount') }}</div>
<div style="flex: 1;"> <div style="flex: 1;">
<el-form-item style="height: 82px;" :label="t('progressReport.form.plannedPaymentAmount')"> <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>
<el-form-item style="height: 82px;" <el-form-item style="height: 82px;"
:label="t('progressReport.form.completedPaymentAmount')"> :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>
<el-form-item style="height: 82px;" <el-form-item style="height: 82px;"
:label="t('progressReport.form.plannedAmountPaymentCompletionRate')"> :label="t('progressReport.form.plannedAmountPaymentCompletionRate')">
<span>{{ formData.investmentPlanCompletionRate }} %</span> <span>{{formData.investmentPlanCompletionRate}} %</span>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
@@ -119,7 +109,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.effectiveness')"> <el-form-item :label="t('progressReport.form.effectiveness')">
<span>{{ formData.achievements }}</span> <span>{{formData.achievements}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -127,7 +117,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.coordinationMatters')"> <el-form-item :label="t('progressReport.form.coordinationMatters')">
<span>{{ formData.coordinationIssues }}</span> <span>{{formData.coordinationIssues}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -135,7 +125,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.nextWorkArrangements')"> <el-form-item :label="t('progressReport.form.nextWorkArrangements')">
<span>{{ formData.nextWorkPlan }}</span> <span>{{formData.nextWorkPlan}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -143,9 +133,8 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.currentStageEvidenceMaterials')"> <el-form-item :label="t('progressReport.form.currentStageEvidenceMaterials')">
<uploadFile :modelValue="JSON.parse(formData.supportingDocuments || '[]') || []" <uploadFile :modelValue="JSON.parse(formData.supportingDocuments || '[]') || []" @change="uploadChange" :fileSize="20" type="simple" :limit="10"
@change="uploadChange" :fileSize="20" type="simple" :limit="10" :isShowTip="false" disabled> :isShowTip="false" disabled></uploadFile>
</uploadFile>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -153,7 +142,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.remark')"> <el-form-item :label="t('progressReport.form.remark')">
<span>{{ formData.remarks }}</span> <span>{{formData.remarks}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -161,8 +150,7 @@
<el-row :gutter="20" class="form-row"> <el-row :gutter="20" class="form-row">
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="t('progressReport.form.isLastDeclaration')"> <el-form-item :label="t('progressReport.form.isLastDeclaration')">
<span>{{ formData.isFinalApplication == '1' ? t('progressReport.form.yes') : <span>{{formData.isFinalApplication == '1' ? t('progressReport.form.yes') : t('progressReport.form.no')}}</span>
t('progressReport.form.no') }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -212,8 +200,8 @@ export interface ProjectProgressReportFormData {
const props = defineProps<{ const props = defineProps<{
modelValue?: InvestmentProjectProgress; modelValue?: InvestmentProjectProgress;
rules?: FormRules; rules?:FormRules;
title?: string; title?: string;
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{
@@ -221,37 +209,37 @@ const emit = defineEmits<{
}>(); }>();
const useForm = ref<FormInstance | undefined>() const useForm = ref<FormInstance | undefined>()
const defaultForm = reactive<InvestmentProjectProgress>({ const defaultForm = reactive<InvestmentProjectProgress>({
id: undefined, id: undefined,
projectName: '', projectName: '',
projectId: undefined, projectId: undefined,
projectStatus: '', projectStatus: '',
constructionStage: '', constructionStage: '',
implementingBody: '', implementingBody: '',
projectTotalAmount: undefined, projectTotalAmount: undefined,
cumulativeInvestmentToDate: undefined, cumulativeInvestmentToDate: undefined,
completionRate: undefined, completionRate: undefined,
cumulativePaymentToDate: undefined, cumulativePaymentToDate: undefined,
paymentCompletionRate: undefined, paymentCompletionRate: undefined,
annualReport: undefined, annualReport: undefined,
annualPlannedInvestment: undefined, annualPlannedInvestment: undefined,
ytdRemainingInvestment: undefined, ytdRemainingInvestment: undefined,
investmentCompletionRate: undefined, investmentCompletionRate: undefined,
plannedPayment: undefined, plannedPayment: undefined,
actualPayment: undefined, actualPayment: undefined,
investmentPlanCompletionRate: undefined, investmentPlanCompletionRate: undefined,
achievements: '', achievements: '',
coordinationIssues: '', coordinationIssues: '',
nextWorkPlan: '', nextWorkPlan: '',
supportingDocuments: '', supportingDocuments: '',
remarks: '', remarks: '',
isFinalApplication: undefined, isFinalApplication: undefined,
createBy: '', createBy: '',
createTime: '', createTime: '',
updateBy: '', updateBy: '',
updateTime: '', updateTime: '',
delFlag: '', delFlag: '',
processInstanceId: '', processInstanceId: '',
status: '', status: '',
}) })
const formData = reactive<InvestmentProjectProgress>({ ...defaultForm, ...props.modelValue }); const formData = reactive<InvestmentProjectProgress>({ ...defaultForm, ...props.modelValue });
const projectNameData = ref<ProjectPlanApplyFormItem[]>([]); const projectNameData = ref<ProjectPlanApplyFormItem[]>([]);
@@ -269,30 +257,30 @@ const queryForm = reactive<investmentProjectsPlanList>({
size: 10, size: 10,
}); });
const getProjectNameList = async () => { const getProjectNameList = async () => {
try { try {
const res = await investmentProjectsPlanPage(queryForm); const res = await investmentProjectsPlanPage(queryForm);
projectNameData.value = res.data?.records || []; projectNameData.value = res.data?.records || [];
total.value = res.data?.total || 0; total.value = res.data?.total || 0;
} catch (error) { } catch (error) {
console.error(error); console.error(error);
projectNameData.value = []; // 出错时设置为空数组 projectNameData.value = []; // 出错时设置为空数组
} }
} }
getProjectNameList(); getProjectNameList();
/** /**
* 初始化图片 * 初始化图片
* */ * */
const uploadChange = (_: any, data: any[]) => { const uploadChange = (_:any,data:any[]) =>{
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) { if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
formData.supportingDocuments = []; formData.supportingDocuments = [];
return; return;
} }
formData.supportingDocuments = data.map((item: any) => { formData.supportingDocuments = data.map((item:any) => {
return { return {
name: item.name, name: item.name,
url: item.url url: item.url
} }
}) })
} }
// 监听 formData 变化,同步到父组件 // 监听 formData 变化,同步到父组件
watch( watch(
@@ -308,18 +296,18 @@ watch(
() => props.modelValue, () => props.modelValue,
(newVal) => { (newVal) => {
if (newVal) { if (newVal) {
if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString() if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString()
Object.assign(formData, newVal); Object.assign(formData, defaultForm, newVal);
} }
}, },
{ immediate: true, deep: true } { immediate: true, deep: true }
); );
defineExpose({ defineExpose({
validate: async () => { validate: async () => {
const isValid = await useForm.value?.validate(); const isValid = await useForm.value?.validate();
if (!isValid) return false if (!isValid) return false
return formData return formData
}, },
}) })
</script> </script>

View File

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

View File

@@ -53,7 +53,7 @@
</div> </div>
<!-- 输入框 --> <!-- 输入框 -->
<template v-else> <template v-else>
<el-input-number v-if="field.type === 'number'" :length="field.length" v-model="basicInfoForm[field.key]" <el-input-number v-if="field.type === 'number'" align="left" v-model="basicInfoForm[field.key]"
:controls="false" :min="0"/> :controls="false" :min="0"/>
<el-input v-else maxlength="255" v-model="basicInfoForm[field.key]" :placeholder="t('mixedRegister.placeholder.input')" /> <el-input v-else maxlength="255" v-model="basicInfoForm[field.key]" :placeholder="t('mixedRegister.placeholder.input')" />
</template> </template>
@@ -69,6 +69,7 @@
import type { FormInstance } from 'element-plus'; import type { FormInstance } from 'element-plus';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import LibrarySelect from '/@/views/investment/mixedReformRegister/components/LibrarySelect.vue'; import LibrarySelect from '/@/views/investment/mixedReformRegister/components/LibrarySelect.vue';
import{ElInputNumber} from 'element-plus'
const { t } = useI18n(); const { t } = useI18n();
type FieldConfig = { type FieldConfig = {
@@ -76,7 +77,7 @@ type FieldConfig = {
label: string; label: string;
span?: number; span?: number;
type?: string; type?: string;
fieldProps?: any; fieldProps?: any; length?: number;
}; };
const props = defineProps<{ const props = defineProps<{

View File

@@ -30,6 +30,8 @@ import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import {queryMineStarted, queryMineTask} from "/@/api/flow/task"; import {queryMineStarted, queryMineTask} from "/@/api/flow/task";
import {useMessage} from "/@/hooks/message"; import {useMessage} from "/@/hooks/message";
import request from "/@/utils/request";
import {examineDict} from "/@/hooks/enums";
const { t } = useI18n(); const { t } = useI18n();
const router = useRouter(); const router = useRouter();
@@ -46,27 +48,7 @@ const emit = defineEmits<{
const activeTab = ref('pending'); const activeTab = ref('pending');
const tableData = ref<any[]>([]); const tableData = ref<any[]>([]);
const loading = ref(false); const loading = ref(false);
/**
* 根据任务名称判断类型
* @param name 任务名称
* @returns 任务类型
*/
const getTaskType = (name: string): string => {
if (name.includes('投资申报') || name.includes('项目投资')) {
return 'investment';
}
if (name.includes('专家') || name.includes('专家登记')) {
return 'expert';
}
if (name.includes('投资储备') || name.includes('储备')) {
return 'reserve';
}
if (name.includes('合作单位') || name.includes('合作')) {
return 'cooperation';
}
// 默认类型
return 'default';
};
/** /**
* 根据类型获取审批页面路由 * 根据类型获取审批页面路由
@@ -91,20 +73,29 @@ const getApprovalRoute = (type: string, taskId: string): string => {
* @param row 行数据 * @param row 行数据
*/ */
const handleRowClick = (row: any) => { const handleRowClick = (row: any) => {
const taskType = row.type || getTaskType(row.name); console.log(row);
const taskId = row.taskId || row.id; const taskId = row.taskId || row.id;
const route = getApprovalRoute(taskType, taskId); const route = getApprovalRoute(row.flowType, taskId);
const routePath = examineDict[row.flowType]
if (!routePath){
useMessage().error('未定义的审批类型!')
return
}
console.log(routePath)
// 跳转到对应的审批页面 // 跳转到对应的审批页面
router.push({ router.push({
path: route.split('?')[0], path: routePath,
query: { query: {
id: taskId, processInstanceId: row.processInstanceId,
type: taskType,
tab: activeTab.value, // 传递当前标签页信息,用于返回时定位 tab: activeTab.value, // 传递当前标签页信息,用于返回时定位
}, },
}); });
}; };
// request('admin/sys/code/list',{
// method:'get',
// }).then(res=>{
// console.log('test',res)
// })
const getQueryMineTask = () =>{ const getQueryMineTask = () =>{
return new Promise((resolve, reject) =>{ return new Promise((resolve, reject) =>{
queryMineTask({ queryMineTask({

View File

@@ -15,8 +15,7 @@
</el-button> </el-button>
</div> </div>
<div class="opinion-input"> <div class="opinion-input">
<el-input v-model="opinionText" type="textarea" :rows="4" <el-input v-model="opinionText" type="textarea" :rows="4" :placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
:placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
</div> </div>
<!-- <div class="opinion-attachment"> <!-- <div class="opinion-attachment">
<el-icon class="attachment-icon"> <el-icon class="attachment-icon">
@@ -31,8 +30,7 @@
<!-- 撤回区域可撤回状态显示 --> <!-- 撤回区域可撤回状态显示 -->
<div v-if="status === 'withdrawable'" class="withdraw-section"> <div v-if="status === 'withdrawable'" class="withdraw-section">
<div class="withdraw-input"> <div class="withdraw-input">
<el-input v-model="opinionText" type="textarea" :rows="4" <el-input v-model="opinionText" type="textarea" :rows="4" :placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
:placeholder="t('workbench.approval.opinion.inputPlaceholder')" resize="vertical" />
</div> </div>
<div class="withdraw-action"> <div class="withdraw-action">
<el-button type="primary" @click="handleWithdraw"> <el-button type="primary" @click="handleWithdraw">
@@ -63,12 +61,11 @@
<!-- <div v-if="record.action" class="record-action">{{ record.action }}</div> --> <!-- <div v-if="record.action" class="record-action">{{ record.action }}</div> -->
<template v-if="record.id !== 'root' && item.status === 2"> <template v-if="record.id !== 'root' && item.status === 2">
<div class="record-status" <div class="record-status" :class="getStatusClass(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved')">
:class="getStatusClass(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved')">
{{ getStatusLabel(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved') }} {{ getStatusLabel(item.approveDesc?.startsWith('拒绝原因:') ? 'rejected' : 'approved') }}
</div> </div>
<div class="record-opinion"> <div class="record-opinion">
{{ item.approveDesc }} <span>{{ item.approveDesc }}</span>
</div> </div>
</template> </template>
<div class="record-opinion" v-else> <div class="record-opinion" v-else>
@@ -82,8 +79,7 @@
</div> </div>
</div> </div>
<template v-if="selectUser"> <template v-if="selectUser">
<EmployeesDialog :visible="selectUserDialog" :data="[]" type="user" @change="changeUser" <EmployeesDialog :visible="selectUserDialog" :data="[]" type="user" @change="changeUser" @update:visible="(e:boolean) => selectUserDialog = e"/>
@update:visible="(e: boolean) => selectUserDialog = e" />
</template> </template>
</div> </div>
</template> </template>
@@ -104,37 +100,37 @@ const selectUserDialog = ref<boolean>(false);
const nextNodeId = ref<string>(''); const nextNodeId = ref<string>('');
const isApprovalUser = computed(() => { const isApprovalUser = computed(() => {
const currentUserId = userInfo.userInfos.user?.userId const currentUserId = userInfo.userInfos.user?.userId
const currentNode = hierarchicalLookup(nodeList.value, taskDetails.value?.nodeId) const currentNode = hierarchicalLookup(nodeList.value,taskDetails.value?.nodeId)
const currentNodeUser = currentNode?.userVoList?.find((item: any) => item.id === currentUserId) const currentNodeUser = currentNode ?.userVoList?.find((item:any) => item.id === currentUserId)
selectUser.value = nextNodeIsSelectUser(nodeList.value, currentNode?.id) selectUser.value = nextNodeIsSelectUser(nodeList.value,currentNode?.id)
return currentNodeUser?.status === 1 return currentNodeUser?.status === 1
}) })
function hierarchicalLookup(nodeList: any[], nodeId: string): any { function hierarchicalLookup(nodeList:any[],nodeId:string):any {
for (const nodeItem of nodeList) { for (const nodeItem of nodeList) {
if (nodeItem.id === nodeId) { if (nodeItem.id === nodeId){
return nodeItem return nodeItem
} }
if (nodeItem.children && nodeItem.children.length > 0) { if (nodeItem.children && nodeItem.children.length > 0){
const children = hierarchicalLookup(nodeItem.children, nodeId) const children = hierarchicalLookup(nodeItem.children,nodeId)
if (children) { if (children){
return children return children
} }
} }
if (nodeItem.branch && nodeItem.branch.length > 0) { if (nodeItem.branch && nodeItem.branch.length > 0){
const branch = hierarchicalLookup(nodeItem.branch, nodeId) const branch = hierarchicalLookup(nodeItem.branch,nodeId)
if (branch) { if (branch){
return branch return branch
} }
} }
} }
} }
function nextNodeIsSelectUser(nodeList: any[], currentNodeId: any): boolean { function nextNodeIsSelectUser(nodeList:any[],currentNodeId:any):boolean{
if (!nodeList || nodeList.length === 0) { if (!nodeList || nodeList.length === 0){
return false return false
} }
const index = nodeList.findIndex(item => item.id === currentNodeId) const index = nodeList.findIndex(item => item.id === currentNodeId)
if (index === -1) { if (index === -1){
return false return false
} }
const node = nodeList[index + 1] const node = nodeList[index + 1]
@@ -142,25 +138,25 @@ function nextNodeIsSelectUser(nodeList: any[], currentNodeId: any): boolean {
return node?.selectUser || false return node?.selectUser || false
} }
interface UserVoList { interface UserVoList {
id: string; id: string;
name: string; name: string;
showTime?: string; showTime?: string;
avatar: string; avatar: string;
approveDesc?: string; approveDesc?: string;
operType?: string; operType?: string;
status: number; status: number;
} }
interface ApprovalRecord { interface ApprovalRecord {
id: string; id: string;
userVoList: UserVoList[]; userVoList: UserVoList[];
placeholder: string; placeholder: string;
status: number; status: number;
name: string; name: string;
type: number; type: number;
selectUser: boolean; selectUser: boolean;
multiple?: null; multiple?: null;
children?: ApprovalRecord[]; children?: ApprovalRecord[];
branch: { children: ApprovalRecord[] }[]; branch: { children: ApprovalRecord[] }[];
} }
const props = defineProps<{ const props = defineProps<{
@@ -198,7 +194,7 @@ const emit = defineEmits<{
(e: 'add-attachment'): void; (e: 'add-attachment'): void;
}>(); }>();
const obj = ref<any>({}) const obj = ref<any>({})
const changeUser = (checkedList: any[]) => { const changeUser = (checkedList: any[]) =>{
obj.value[`${nextNodeId.value}_assignee_select`] = checkedList; obj.value[`${nextNodeId.value}_assignee_select`] = checkedList;
selectUser.value = false; selectUser.value = false;
selectUserDialog.value = false; selectUserDialog.value = false;
@@ -215,7 +211,7 @@ const handleApprove = async () => {
} }
approving.value = true approving.value = true
try { try {
if (selectUser.value && nextNodeId.value) { if (selectUser.value && nextNodeId.value){
selectUserDialog.value = true; selectUserDialog.value = true;
return; return;
} }
@@ -378,7 +374,6 @@ onMounted(() => {
display: flex; display: flex;
/* gap: 8px; */ /* gap: 8px; */
margin-bottom: 16px; margin-bottom: 16px;
.el-button { .el-button {
flex: 1; flex: 1;
} }
@@ -508,7 +503,13 @@ onMounted(() => {
font-size: 14px; font-size: 14px;
} }
.record-status { .record-item .record-content .record-status {
max-width: 100%;
text-wrap: wrap;
word-wrap: break-word; /* 允许长单词换行 */
word-break: break-all; /* 打断所有单词 */
white-space: pre-wrap; /* 保留空白符和换行符 */
overflow-wrap: break-word; /* 确保超长内容能换行 */
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
line-height: 1; line-height: 1;
@@ -526,7 +527,15 @@ onMounted(() => {
color: var(--el-text-color-regular); color: var(--el-text-color-regular);
} }
.record-opinion { .record-item .record-content .record-opinion {
max-width: 100%;
text-wrap: wrap;
word-wrap: break-word; /* 允许长单词换行 */
word-break: break-all; /* 打断所有单词 */
white-space: pre-wrap; /* 保留空白符和换行符 */
overflow-wrap: break-word; /* 确保超长内容能换行 */
overflow-x: hidden;
height: auto;
color: var(--el-text-color-regular); color: var(--el-text-color-regular);
font-size: 14px; font-size: 14px;
line-height: 1.6; line-height: 1.6;

View File

@@ -82,8 +82,8 @@ const setShowAside = computed(() => {
if(layout !== 'classic'){ if(layout !== 'classic'){
return true return true
} }
// 首页和工作台不显示侧边栏 // 首页不显示侧边栏
return (route.path !== '/home' && route.path !== '/workbench/index') return route.path !== '/home'
}); });
// 设置显示/隐藏 logo // 设置显示/隐藏 logo

View File

@@ -55,7 +55,7 @@
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="/workbench/index">{{ $t('user.dropdown1') }}</el-dropdown-item> <el-dropdown-item command="/home">{{ $t('user.dropdown1') }}</el-dropdown-item>
<el-dropdown-item command="personal">{{ $t('user.dropdown2') }}</el-dropdown-item> <el-dropdown-item command="personal">{{ $t('user.dropdown2') }}</el-dropdown-item>
<el-dropdown-item divided command="logOut">{{ $t('user.dropdown5') }}</el-dropdown-item> <el-dropdown-item divided command="logOut">{{ $t('user.dropdown5') }}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>

View File

@@ -22,30 +22,30 @@
</el-col> </el-col>
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item label="用户名" prop="username"> <el-form-item label="用户名" prop="username">
<el-input v-model="formData.username" clearable disabled></el-input> <el-input v-model="formData.name" clearable disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item label="手机" prop="phone"> <el-form-item label="账号" prop="phone">
<el-input v-model="formData.phone" placeholder="请输入手机" clearable></el-input> <el-input disabled v-model="formData.username" placeholder="请输入账号" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item label="邮箱" prop="email"> <el-form-item label="公司" prop="orgName">
<el-input v-model="formData.email" placeholder="请输入邮箱" clearable></el-input> <el-input v-model="formData.orgName" placeholder="请输入公司" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item label="昵称" prop="nickname"> <el-form-item label="部门" prop="deptName">
<el-input v-model="formData.nickname" placeholder="请输入昵称" clearable></el-input> <el-input v-model="formData.deptName" placeholder="请输入部门" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="姓名" prop="name">
<el-input v-model="formData.name" placeholder="请输入姓名" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="24" class="mb20">-->
<!-- <el-form-item label="姓名" prop="name">-->
<!-- <el-input v-model="formData.name" placeholder="请输入姓名" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24" class="mb20"> <el-col :span="24" class="mb20">
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSaveUser"> 更新个人信息 </el-button> <el-button type="primary" @click="handleSaveUser"> 更新个人信息 </el-button>
@@ -154,9 +154,9 @@ const formData = ref({
userId: '', userId: '',
username: '', username: '',
name: '', name: '',
email: '', orgName: '',
avatar: '', avatar: '',
nickname: '', deptName: '',
wxDingUserid: '', wxDingUserid: '',
wxCpUserid: '', wxCpUserid: '',
phone: ('' as string) || undefined, phone: ('' as string) || undefined,
@@ -177,9 +177,9 @@ const ruleForm = reactive({
{ required: true, message: '手机号不能为空', trigger: 'blur' }, { required: true, message: '手机号不能为空', trigger: 'blur' },
{ validator: rule.validatePhone, trigger: 'blur' }, { validator: rule.validatePhone, trigger: 'blur' },
], ],
nickname: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '昵称不能为空', trigger: 'blur' }], deptName: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '部门不能为空', trigger: 'blur' }],
email: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '邮箱不能为空', trigger: 'blur' }], orgName: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '邮箱不能为空', trigger: 'blur' }],
name: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '姓名不能为空', trigger: 'blur' }], userId: [{ validator: rule.overLength, trigger: 'blur' },{ required: true, message: '姓名不能为空', trigger: 'blur' }],
}); });
const validatorPassword2 = (rule: any, value: any, callback: any) => { const validatorPassword2 = (rule: any, value: any, callback: any) => {
if (value !== passwordFormData.newpassword1) { if (value !== passwordFormData.newpassword1) {

View File

@@ -21,7 +21,7 @@
> >
<el-table-column type="index" :label="$t('projectReviewPolicy.index')" width="60" /> <el-table-column type="index" :label="$t('projectReviewPolicy.index')" width="60" />
<el-table-column prop="projectType" :label="$t('projectReviewPolicy.projectType')"> <el-table-column prop="projectType" label="投资类别">
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-select <el-select
v-model="row.projectType" v-model="row.projectType"
@@ -30,7 +30,7 @@
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
v-for="item in projectTypeOptions" v-for="item in investmentCategoryOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@@ -109,6 +109,7 @@ import {
deleteProjectReviewPolicy deleteProjectReviewPolicy
} from '/@/api/config/projectReviewPolicy'; } from '/@/api/config/projectReviewPolicy';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { investmentCategoryOptions } from '/@/hooks/enums';
const { t } = useI18n(); const { t } = useI18n();
const message = useMessage(); const message = useMessage();

View File

@@ -33,15 +33,15 @@
<!-- Content Area --> <!-- Content Area -->
<el-scrollbar class="h-[calc(100vh-20px)]"> <el-scrollbar class="h-[calc(100vh-20px)]">
<step1 v-show="activeStep === 0" :groupId="paramGroupId" ref="step1Ref" /> <step1 v-show="activeStep === 0" :groupId="paramGroupId" ref="step1Ref" />
<step2 v-show="activeStep === 1" ref="step2Ref" /> <!-- <step2 v-show="activeStep === 1" ref="step2Ref" />-->
<step3 v-show="activeStep === 2" :nodeConfigObj="step3NodeConfig" ref="step3Ref" /> <step3 v-show="activeStep === 1" :nodeConfigObj="step3NodeConfig" ref="step3Ref" />
</el-scrollbar> </el-scrollbar>
<!-- Validation Dialog --> <!-- Validation Dialog -->
<el-dialog v-model="validateDialogShow" :title="$t('flow.processCheck')"> <el-dialog v-model="validateDialogShow" :title="$t('flow.processCheck')">
<el-steps :active="validateFlowStep" finish-status="success" simple class="mt-5"> <el-steps :active="validateFlowStep" finish-status="success" simple class="mt-5">
<el-step :title="$t('flow.basicInformation')" /> <el-step :title="$t('flow.basicInformation')" />
<el-step :title="$t('flow.formDesign')" /> <!-- <el-step :title="$t('flow.formDesign')" />-->
<el-step :title="$t('flow.processDesign')" /> <el-step :title="$t('flow.processDesign')" />
</el-steps> </el-steps>
@@ -181,7 +181,7 @@ const checkStep1 = () => {
validateFlowStep.value = 1; validateFlowStep.value = 1;
setTimeout(function () { setTimeout(function () {
checkStep2(); checkStep3();
}, 500); }, 500);
} else { } else {
validatingShow.value = false; validatingShow.value = false;
@@ -251,5 +251,7 @@ const submitFlow = () => {
}; };
// Add steps data // Add steps data
const steps = [{ title: 'flow.basicInformation' }, { title: 'flow.formDesign' }, { title: 'flow.processDesign' }]; const steps = [{ title: 'flow.basicInformation' },
// { title: 'flow.formDesign' },
{ title: 'flow.processDesign' }];
</script> </script>

View File

@@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import selectShow from '/@/components/OrgSelector/index.vue'; import selectShow from '/@/components/OrgSelector/index.vue';
import uploadImg from "/@/components/Upload/Image.vue"
interface UserVo { interface UserVo {
id: string; id: string;
name: string; name: string;
@@ -28,6 +28,7 @@ const props = defineProps<{
nodeUser: Record<string, any>; nodeUser: Record<string, any>;
row: FlowNode[]; row: FlowNode[];
disableSelect: boolean; disableSelect: boolean;
disabled: boolean;
}>(); }>();
// Create a map to store active tabs for each node // Create a map to store active tabs for each node
@@ -71,7 +72,7 @@ import { Check, Plus, Refresh } from '@element-plus/icons-vue';
<div v-if="node.userVoList?.length" class="flex flex-wrap gap-2 mb-3"> <div v-if="node.userVoList?.length" class="flex flex-wrap gap-2 mb-3">
<div v-for="(item1, index1) in node.userVoList" :key="index1" class="w-10 text-center"> <div v-for="(item1, index1) in node.userVoList" :key="index1" class="w-10 text-center">
<div class="flex flex-col items-center"> <div class="flex flex-col items-center">
<upload-img v-model:image-url="item1.avatar" width="30px" height="30px"></upload-img> <upload-img v-model:image-url="item1.avatar" width="30px" height="30px" :disabled="disabled"></upload-img>
<div class="mt-1 w-full text-xs truncate">{{ item1.name }}</div> <div class="mt-1 w-full text-xs truncate">{{ item1.name }}</div>
</div> </div>
</div> </div>
@@ -89,7 +90,7 @@ import { Check, Plus, Refresh } from '@element-plus/icons-vue';
<span class="ml-1 text-gray-500">(添加了评论) {{ item1.showTime }}</span> <span class="ml-1 text-gray-500">(添加了评论) {{ item1.showTime }}</span>
</div> </div>
</div> </div>
<div class="p-3 text-sm bg-gray-50 rounded">{{ item1.approveDesc }}</div> <div class="p-3 text-sm bg-gray-50 rounded break-words break-all whitespace-pre-wrap">{{ item1.approveDesc }}</div>
</div> </div>
</div> </div>

View File

@@ -28,6 +28,10 @@ let props = defineProps({
type: Array, type: Array,
dafault: () => [], dafault: () => [],
}, },
disabled: {
type: Boolean,
default: false,
},
}); });
const row = ref([]); const row = ref([]);
@@ -88,5 +92,5 @@ defineExpose({ validate, formatSelectNodeUser });
</script> </script>
<template> <template>
<flow-node-format :row="row" :node-user="nodeUser" :disableSelect="disableSelect" ref="flowNodeFormatRef"></flow-node-format> <flow-node-format :row="row" :node-user="nodeUser" :disableSelect="disableSelect" ref="flowNodeFormatRef" :disabled="disabled"></flow-node-format>
</template> </template>

View File

@@ -59,16 +59,17 @@ const handleSubmit = async () => {
return; return;
} }
const submitFormData = await formDataRef.value.validateRefFn(); const submitFormData:PostInvestmentEvaluation|boolean = await formDataRef.value.validateRefFn();
// 提交表单数据 // 提交表单数据
if (submitFormData) { if (submitFormData) {
submitFormData.attachmentUrl = JSON.stringify(submitFormData.attachmentUrl); submitFormData.attachmentUrl = JSON.stringify(submitFormData.attachmentUrl);
submitFormData.deptId = formData.value.deptId;
await addInvestmentEvaluation(submitFormData as PostInvestmentEvaluation); await addInvestmentEvaluation(submitFormData as PostInvestmentEvaluation);
message.success(t('common.success')); message.success(t('成功'));
router.back(); router.back();
} }
} catch (error: any) { } catch (error: any) {
message.error(error.msg || 'Submission failed'); message.error(error.msg || '失败');
} }
}; };

View File

@@ -513,6 +513,9 @@ const createEmptyDetail = (): ProjectPlanApplyFormData => ({
submitUnitLeadershipOpinion: '', submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '', submitUnitMainLeadershipOpinion: '',
planImageQuota:'', planImageQuota:'',
deptId:0,
status:0,
processInstanceId:'',
}, },
investmentProjects: [ investmentProjects: [
{ {

View File

@@ -40,6 +40,8 @@ export interface PostInvestmentEvaluation {
/** 创建时间 */ /** 创建时间 */
createTime?: string; // date-time createTime?: string; // date-time
/**部门id*/
deptId?: string; // integer(int64)
} }
/** /**
@@ -225,6 +227,8 @@ export interface ProjectInvestmentInfo {
/** 投资项目进度实体列表 */ /** 投资项目进度实体列表 */
investmentProjectsProgressEntities?: InvestmentProjectProgress[]; investmentProjectsProgressEntities?: InvestmentProjectProgress[];
/**部门id*/
deptId?: string; // integer(int64)
} }
export interface requestData { export interface requestData {
page: number, page: number,

View File

@@ -76,12 +76,12 @@
</el-col> </el-col>
<el-col :span="20"> <el-col :span="20">
<el-form-item> <el-form-item>
<el-input v-model="formData.projectName" :placeholder="t('committeeReview.form.selectPlaceholder')" readonly> <el-input v-model="formData.projectName" :placeholder="t('committeeReview.form.inputPlaceholder')">
<template #append> <!-- <template #append>-->
<el-icon class="cursor-pointer interactive-icon" @click="handleSelect"> <!-- <el-icon class="cursor-pointer interactive-icon" @click="handleSelect">-->
<FolderOpened /> <!-- <FolderOpened />-->
</el-icon> <!-- </el-icon>-->
</template> <!-- </template>-->
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -177,10 +177,10 @@
@select="handleProjectSelect" @select="handleProjectSelect"
/> />
<LibrarySelect <!-- <LibrarySelect-->
v-model="librarySelectVisible" <!-- v-model="librarySelectVisible"-->
@select="handleLibrarySelect" <!-- @select="handleLibrarySelect"-->
/> <!-- />-->
<templet-table-comom/> <templet-table-comom/>
</div> </div>
</template> </template>

View File

@@ -27,45 +27,41 @@
<!-- 标题描述上传附件 --> <!-- 标题描述上传附件 -->
<el-row class="mb10"> <el-row class="mb10">
<el-form :model="headerForm" label-width="80px" class="w-full" :rules="headerRequiredRule" <el-form :model="headerForm" label-width="80px" class="w-full" :rules="headerRequiredRule" ref="headerFormRef">
ref="headerFormRef">
<el-form-item :label="t('planApply.headerForm.title')" prop="title"> <el-form-item :label="t('planApply.headerForm.title')" prop="title">
<el-input v-model="headerForm.title" <el-input v-model="headerForm.title" :placeholder="t('planApply.headerForm.titlePlaceholder')"/>
:placeholder="t('planApply.headerForm.titlePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('planApply.headerForm.description')"> <el-form-item :label="t('planApply.headerForm.description')">
<el-input v-model="headerForm.description" <el-input v-model="headerForm.description" :placeholder="t('planApply.headerForm.descriptionPlaceholder')"/>
:placeholder="t('planApply.headerForm.descriptionPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('planApply.headerForm.attachments')"> <el-form-item :label="t('planApply.headerForm.attachments')">
<UploadFile :modelValue="headerForm.attachments" :fileSize="20" type="simple" :limit="10" <UploadFile :modelValue="headerForm.attachments" :fileSize="20" type="simple" :limit="10"
@change="uploadChange" /> @change="uploadChange"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
<ProjectPlanApplyForm v-model="formData" :rules="formDataRules" ref="formDataRef" <ProjectPlanApplyForm v-model="formData" :rules="formDataRules" ref="formDataRef" :is-update="props.isUpdate"/>
:is-update="props.isUpdate" />
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref } from 'vue'; import {reactive, ref} from 'vue';
import { useI18n } from 'vue-i18n'; import {useI18n} from 'vue-i18n';
import { useMessage } from '/@/hooks/message'; import {useMessage} from '/@/hooks/message';
import { import {
investmentProjectsPlanAdd, investmentProjectsPlanGetById, investmentProjectsPlanAdd, investmentProjectsPlanGetById,
investmentProjectsPlanUserDeptBelong investmentProjectsPlanUserDeptBelong
} from '/@/api/investment/investmentManagement'; } from '/@/api/investment/investmentManagement';
import ProjectPlanApplyForm from '/@/components/investment/common/ProjectPlanApplyForm.vue'; import ProjectPlanApplyForm from '/@/components/investment/common/ProjectPlanApplyForm.vue';
import type { ProjectPlanApplyFormData } from '/@/components/investment/interface/types'; import type {ProjectPlanApplyFormData} from '/@/components/investment/interface/types';
import type { FormInstance, FormRules } from 'element-plus'; import type {FormInstance, FormRules} from 'element-plus';
import UploadFile from '/@/components/Upload/index.vue'; import UploadFile from '/@/components/Upload/index.vue';
import { useRoute } from 'vue-router'; import {useRoute} from 'vue-router';
import { flowFn } from "/@/utils/flowFn"; import {flowFn} from "/@/utils/flowFn";
import { addFlowForm } from "/@/api/flow/flow"; import {addFlowForm} from "/@/api/flow/flow";
import { flowNameOptions } from "/@/hooks/enums"; import {flowNameOptions} from "/@/hooks/enums";
const props = defineProps({ const props = defineProps({
isUpdate: { isUpdate: {
@@ -73,7 +69,7 @@ const props = defineProps({
default: false default: false
} }
}) })
const { t } = useI18n(); const {t} = useI18n();
const message = useMessage(); const message = useMessage();
const route = useRoute(); const route = useRoute();
const submitLoading = ref(false); const submitLoading = ref(false);
@@ -82,7 +78,7 @@ const headerForm = reactive<{ title: string, description: string, attachments: a
description: '', description: '',
attachments: [] as any[], attachments: [] as any[],
}); });
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }]; const requiredRule = [{required: true, message: `${t('该字段必填')}`}];
const headerRequiredRule = ref<FormRules<{ title: string, description: string, attachments: any[] | string }>>({ const headerRequiredRule = ref<FormRules<{ title: string, description: string, attachments: any[] | string }>>({
title: requiredRule, title: requiredRule,
}); });
@@ -154,9 +150,9 @@ const formData = ref<ProjectPlanApplyFormData>({
submitUnitLeadershipOpinion: '', submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '', submitUnitMainLeadershipOpinion: '',
planImageQuota: '', planImageQuota: '',
status: 1, status:1,
processInstanceId: '', processInstanceId:'',
deptId: 0, deptId:0,
}, },
investmentProjects: [], investmentProjects: [],
}); });
@@ -207,51 +203,40 @@ const formDataRules = ref<FormRules<ProjectPlanApplyFormData>>({
'entity.financialFunds': requiredRule, 'entity.financialFunds': requiredRule,
'entity.planImageQuota': requiredRule, 'entity.planImageQuota': requiredRule,
'entity.planPaymentLimit': requiredRule, 'entity.planPaymentLimit': requiredRule,
'entity.projectApprovalFileNo': [{ 'entity.projectApprovalFileNo':[{validator:(rule: any, value: any, callback: any) =>{
validator: (rule: any, value: any, callback: any) => { if (formData.value.entity.isProjectApprovalCompleted === '1' && !value){
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value) { callback(new Error(`${t('该字段必填')}`));
callback(new Error(`${t('该字段必填')}`)); }else {
} else { callback();
callback(); }
} },required:true,trigger: ['blur', 'change']}],
}, required: true, trigger: ['blur', 'change'] 'entity.projectApprovalFileInfo':[{validator:(rule: any, value: any, callback: any) =>{
}], if (formData.value.entity.isProjectApprovalCompleted === '1' && !value){
'entity.projectApprovalFileInfo': [{ callback(new Error(`${t('该字段必填')}`));
validator: (rule: any, value: any, callback: any) => { }else {
if (formData.value.entity.isProjectApprovalCompleted === '1' && !value) { callback();
callback(new Error(`${t('该字段必填')}`)); }
} else { },required: true,trigger: ['blur', 'change']}],
callback(); 'entity.decisionProcedureFileNo':[{validator:(rule: any, value: any, callback: any) =>{
} if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value){
}, required: true, trigger: ['blur', 'change'] callback(new Error(`${t('该字段必填')}`));
}], }else {
'entity.decisionProcedureFileNo': [{ callback();
validator: (rule: any, value: any, callback: any) => { }
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value) { },required:true,trigger: ['blur', 'change']}],
callback(new Error(`${t('该字段必填')}`)); 'entity.decisionFileInfo':[{validator:(rule: any, value: any, callback: any) =>{
} else { if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value){
callback(); callback(new Error(`${t('该字段必填')}`));
} }else {
}, required: true, trigger: ['blur', 'change'] callback();
}], }
'entity.decisionFileInfo': [{ },required: true,trigger: ['blur', 'change']}],
validator: (rule: any, value: any, callback: any) => {
if (formData.value.entity.isDecisionProcedureCompleted === '1' && !value) {
callback(new Error(`${t('该字段必填')}`));
} else {
callback();
}
}, required: true, trigger: ['blur', 'change']
}],
}); });
const handleInitiateApproval = async () => { const handleInitiateApproval = async () => {
try { try {
const headerValid = await headerFormRef.value?.validate().catch(() => false); const headerValid = await headerFormRef.value?.validate();
if (!headerValid) return; const valid = await formDataRef.value?.validateForm();
if (!valid && !headerValid) return;
const valid = await formDataRef.value?.validateForm().catch(() => false);
if (!valid) return;
submitLoading.value = true; submitLoading.value = true;
let flowIdKey = '' let flowIdKey = ''
const data = await investmentProjectsPlanUserDeptBelong() const data = await investmentProjectsPlanUserDeptBelong()
@@ -271,7 +256,7 @@ const handleInitiateApproval = async () => {
default: default:
flowIdKey = props.isUpdate ? 'VITE_FLOWID_27' : 'VITE_FLOWID_23'; flowIdKey = props.isUpdate ? 'VITE_FLOWID_27' : 'VITE_FLOWID_23';
} }
const { processInstanceId } = await flowFn(flowIdKey, { const {processInstanceId} = await flowFn(flowIdKey, {
paramMap: {} paramMap: {}
}) })
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration'; const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
@@ -286,7 +271,7 @@ const handleInitiateApproval = async () => {
formData.value.entity.processInstanceId = processInstanceId; formData.value.entity.processInstanceId = processInstanceId;
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment); formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
formData.value.entity.status = 1 formData.value.entity.status = 1
Object.assign(formData.value.entity, { flowType: flowNameObj.value }) Object.assign(formData.value.entity,{flowType:flowNameObj.value})
const params = { const params = {
...formData.value, ...formData.value,
entity: { entity: {
@@ -296,14 +281,14 @@ const handleInitiateApproval = async () => {
} }
} }
investmentProjectsPlanAdd(params) investmentProjectsPlanAdd(params)
.then(() => { .then(() => {
submitLoading.value = false; submitLoading.value = false;
message.success(t('planApply.messages.initiateApproval')); message.success(t('planApply.messages.initiateApproval'));
}) })
.catch((err: any) => { .catch((err: any) => {
submitLoading.value = false; submitLoading.value = false;
message.error(err.msg); message.error(err.msg);
}); });
} catch (error) { } catch (error) {
console.log(error, 'error'); console.log(error, 'error');
} }
@@ -311,32 +296,28 @@ const handleInitiateApproval = async () => {
const saveLoading = ref<boolean>(false); const saveLoading = ref<boolean>(false);
const handleSaveDraft = async () => { const handleSaveDraft = async () => {
try { const headerValid = await headerFormRef.value?.validate();
const headerValid = await headerFormRef.value?.validate().catch(() => false); const valid = await formDataRef.value?.validateForm();
if (!headerValid) return; if (!valid && !headerValid) return;
saveLoading.value = true;
const valid = await formDataRef.value?.validateForm().catch(() => false); const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
if (!valid) return; const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
saveLoading.value = true; formData.value.entity.status = 1
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration'; Object.assign(formData.value.entity,{flowType:flowNameObj.value})
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0] const params = {
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment); ...formData.value,
formData.value.entity.status = 1 entity: {
Object.assign(formData.value.entity, { flowType: flowNameObj.value }) ...formData.value.entity,
const params = { attachments: formData.value.entity.attachments ? JSON.stringify(formData.value.entity.attachments) : '',
...formData.value, projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment ? JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment) : ''
entity: { },
...formData.value.entity, temporaryStorage:{
attachments: formData.value.entity.attachments ? JSON.stringify(formData.value.entity.attachments) : '', title: headerForm.title,
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment ? JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment) : '' businessType: flowNameObj.value,
},
temporaryStorage: {
title: headerForm.title,
businessType: flowNameObj.value,
}
} }
investmentProjectsPlanAdd(params) }
investmentProjectsPlanAdd(params)
.then(() => { .then(() => {
saveLoading.value = false; saveLoading.value = false;
message.success('保存代发成功'); message.success('保存代发成功');
@@ -345,9 +326,6 @@ const handleSaveDraft = async () => {
saveLoading.value = false; saveLoading.value = false;
message.error(err.msg); message.error(err.msg);
}); });
} catch (error) {
console.log(error, 'error');
}
}; };
const handleLoadTemplate = () => { const handleLoadTemplate = () => {

View File

@@ -27,19 +27,15 @@
<!-- 标题描述上传附件 --> <!-- 标题描述上传附件 -->
<el-row class="mb10"> <el-row class="mb10">
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px" <el-form :model="headerForm" label-width="80px" class="w-full">
class="w-full"> <el-form-item :label="t('progressReport.headerForm.title')">
<el-form-item :label="t('progressReport.headerForm.title')" prop="title" required> <el-input v-model="headerForm.title" :placeholder="t('progressReport.headerForm.titlePlaceholder')" />
<el-input v-model="headerForm.title"
:placeholder="t('progressReport.headerForm.titlePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('progressReport.headerForm.description')"> <el-form-item :label="t('progressReport.headerForm.description')">
<el-input v-model="headerForm.description" <el-input v-model="headerForm.description" :placeholder="t('progressReport.headerForm.descriptionPlaceholder')" />
:placeholder="t('progressReport.headerForm.descriptionPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('progressReport.headerForm.attachments')"> <el-form-item :label="t('progressReport.headerForm.attachments')">
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" <UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
type="simple" :limit="10" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
@@ -50,7 +46,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref } from 'vue'; import { reactive } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useMessage } from '/@/hooks/message'; import { useMessage } from '/@/hooks/message';
import ProjectProgressReportForm from '/@/components/investment/common/ProjectProgressReportForm.vue'; import ProjectProgressReportForm from '/@/components/investment/common/ProjectProgressReportForm.vue';
@@ -61,18 +57,14 @@ import {
getInvestmentProjectsProgressUserDeptBelongAPI getInvestmentProjectsProgressUserDeptBelongAPI
} from '/@/api/investment/progressOfInvestmentProjects'; } from '/@/api/investment/progressOfInvestmentProjects';
import UploadFile from "/@/components/Upload/index.vue"; import UploadFile from "/@/components/Upload/index.vue";
import { flowFn } from "/@/utils/flowFn"; import {flowFn} from "/@/utils/flowFn";
import { addFlowForm } from "/@/api/flow/flow"; import {addFlowForm} from "/@/api/flow/flow";
import { flowNameOptions } from "/@/hooks/enums"; import {flowNameOptions} from "/@/hooks/enums";
const { t } = useI18n(); const { t } = useI18n();
const message = useMessage(); const message = useMessage();
const headerFormRef = ref<any>(); const headerForm = reactive<{ title: string; description: string; attachments: any[] | string}>({
const headerFormRules = {
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
};
const headerForm = reactive<{ title: string; description: string; attachments: any[] | string }>({
title: '', title: '',
description: '', description: '',
attachments: [], attachments: [],
@@ -111,7 +103,6 @@ const formData = reactive<InvestmentProjectProgress>({
delFlag: '', delFlag: '',
processInstanceId: '', processInstanceId: '',
status: '', status: '',
deptId: '',
}); });
// 必填规则 // 必填规则
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }]; const requiredRule = [{ required: true, message: `${t('该字段必填')}` }];
@@ -127,10 +118,6 @@ const formDataRef = ref<FormRules<InvestmentProjectProgress>>({
const handleInitiateApproval = async () => { const handleInitiateApproval = async () => {
// message.info(t('progressReport.messages.initiateApproval')); // message.info(t('progressReport.messages.initiateApproval'));
try { try {
const headerValid = await headerFormRef.value?.validate().catch(() => false);
if (!headerValid) {
return;
}
const valid = await formRef.value?.validate(); const valid = await formRef.value?.validate();
submitLoading.value = true; submitLoading.value = true;
let flowIdKey = ''; let flowIdKey = '';
@@ -152,14 +139,10 @@ const handleInitiateApproval = async () => {
flowIdKey = 'VITE_FLOWID_31'; flowIdKey = 'VITE_FLOWID_31';
} }
headerForm.attachments = JSON.stringify(headerForm.attachments); headerForm.attachments = JSON.stringify(headerForm.attachments);
const flowResult = await flowFn(flowIdKey, { const {processInstanceId} = await flowFn(flowIdKey,{
paramMap: { paramMap:{
} }
}) })
if (flowResult instanceof Error) {
throw flowResult;
}
const { processInstanceId } = flowResult;
const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0] const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0]
await addFlowForm({ await addFlowForm({
title: headerForm.title, title: headerForm.title,
@@ -171,9 +154,10 @@ const handleInitiateApproval = async () => {
valid.processInstanceId = processInstanceId; valid.processInstanceId = processInstanceId;
valid.supportingDocuments = JSON.stringify(valid.supportingDocuments); valid.supportingDocuments = JSON.stringify(valid.supportingDocuments);
valid.status = 1; valid.status = 1;
await addInvestmentProjectsProgressAPI(valid).then(() => { valid.flowType = flowNameObj.value
await addInvestmentProjectsProgressAPI(valid).then(()=>{
message.success(t('common.success')); message.success(t('common.success'));
}).finally(() => { }).finally(()=>{
submitLoading.value = false; submitLoading.value = false;
}).catch((err: any) => { }).catch((err: any) => {
submitLoading.value = false; submitLoading.value = false;
@@ -199,12 +183,12 @@ const handleSaveTemplate = () => {
const handleViewWorkflow = () => { const handleViewWorkflow = () => {
message.info(t('progressReport.messages.viewWorkflow')); message.info(t('progressReport.messages.viewWorkflow'));
}; };
const uploadChange = (_: any, data: any[]) => { const uploadChange = (_:any,data:any[]) =>{
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) { if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
headerForm.attachments = []; headerForm.attachments = [];
return; return;
} }
headerForm.attachments = data.map((item: any) => { headerForm.attachments = data.map((item:any) => {
return { return {
name: item.name, name: item.name,
url: item.url url: item.url

View File

@@ -1,8 +1,8 @@
<!-- 进度申报审核--> <!-- 进度申报审核-->
<script setup lang="ts"> <script setup lang="ts">
import { onMounted } from 'vue'; import {onMounted} from 'vue';
import ApprovalAction from '/@//components/workbench/common/ApprovalAction.vue'; import ApprovalAction from '/@//components/workbench/common/ApprovalAction.vue';
import { useRoute } from 'vue-router'; import {useRoute} from 'vue-router';
import ProjectProgressReportFormDeatils from '/@/components/investment/common/ProjectProgressReportFormDeatils.vue'; import ProjectProgressReportFormDeatils from '/@/components/investment/common/ProjectProgressReportFormDeatils.vue';
import { import {
getInvestmentProjectsProgressGetByProcessInstanceIdAPI, getInvestmentProjectsProgressGetByProcessInstanceIdAPI,
@@ -15,13 +15,13 @@ const taskId = ref<string>('0');
const status = ref<'pending' | 'reviewed' | 'withdrawable'>('pending'); const status = ref<'pending' | 'reviewed' | 'withdrawable'>('pending');
const projectId = ref<string>('0'); const projectId = ref<string>('0');
const detailFormData = ref<InvestmentProjectProgress>({} as InvestmentProjectProgress); const detailFormData = ref<InvestmentProjectProgress>({} as InvestmentProjectProgress);
const getProjectDetail = (id: string) => { const getProjectDetail = (id:string) =>{
getInvestmentProjectsProgressGetByProcessInstanceIdAPI(id).then(res => { getInvestmentProjectsProgressGetByProcessInstanceIdAPI(id).then(res =>{
detailFormData.value = res.data detailFormData.value = res.data
}); });
} }
onMounted(() => { onMounted(() =>{
if (route.query.processInstanceId) { if (route.query.processInstanceId){
taskId.value = <string>route.query.tId; taskId.value = <string>route.query.tId;
projectId.value = <string>route.query.processInstanceId; projectId.value = <string>route.query.processInstanceId;
getProjectDetail(projectId.value); getProjectDetail(projectId.value);
@@ -33,12 +33,11 @@ onMounted(() => {
<el-card> <el-card>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="isPreview ? 24 : 18"> <el-col :span="isPreview ? 24 : 18">
<FlowFormView :process-instance-id="projectId" /> <FlowFormView :process-instance-id="projectId"/>
<ProjectProgressReportFormDeatils v-model="detailFormData" title="投资项目进度审核" /> <ProjectProgressReportFormDeatils v-model="detailFormData" title="投资项目进度审核"/>
</el-col> </el-col>
<el-col :span="6" v-if="!isPreview"> <el-col :span="6" v-if="!isPreview">
<ApprovalAction :status="status" :approval-records="[]" :task-id="taskId" <ApprovalAction :status="status" :approval-records="[]" :task-id="taskId" :process-instance-id="projectId"/>
:process-instance-id="projectId" />
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>

View File

@@ -26,9 +26,8 @@
</el-row> </el-row>
<el-row class="mb10"> <el-row class="mb10">
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px" <el-form :model="headerForm" label-width="80px" class="w-full">
class="w-full"> <el-form-item :label="t('projectExitFeedback.headerForm.title')">
<el-form-item :label="t('projectExitFeedback.headerForm.title')" prop="title" required>
<el-input v-model="headerForm.title" <el-input v-model="headerForm.title"
:placeholder="t('projectExitFeedback.headerForm.titlePlaceholder')" /> :placeholder="t('projectExitFeedback.headerForm.titlePlaceholder')" />
</el-form-item> </el-form-item>
@@ -37,8 +36,7 @@
:placeholder="t('projectExitFeedback.headerForm.descriptionPlaceholder')" /> :placeholder="t('projectExitFeedback.headerForm.descriptionPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item :label="t('projectExitFeedback.headerForm.attachments')"> <el-form-item :label="t('projectExitFeedback.headerForm.attachments')">
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" <UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
type="simple" :limit="10" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
@@ -49,25 +47,20 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref } from 'vue'; import { reactive } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useMessage } from '/@/hooks/message'; import { useMessage } from '/@/hooks/message';
import ProjectExitFeedbackForm from '/@/components/investment/common/ProjectExitFeedbackForm.vue'; import ProjectExitFeedbackForm from '/@/components/investment/common/ProjectExitFeedbackForm.vue';
import { ProjectExitFeedback } from '/@/views/invMid/projectExitFeedback/interface/type'; import { ProjectExitFeedback } from '/@/views/invMid/projectExitFeedback/interface/type';
import { addProjectExitPlanFeedback } from "/@/api/investment/projectExitPlan"; import {addProjectExitPlanFeedback} from "/@/api/investment/projectExitPlan";
import { ProjectTask } from "/@/views/invMid/projectExitPlan/interface/type";
import UploadFile from "/@/components/Upload/index.vue"; import UploadFile from "/@/components/Upload/index.vue";
import { flowFn } from "/@/utils/flowFn"; import {flowFn} from "/@/utils/flowFn";
import { addFlowForm } from "/@/api/flow/flow"; import {addFlowForm} from "/@/api/flow/flow";
import { flowNameOptions } from "/@/hooks/enums"; import {flowNameOptions} from "/@/hooks/enums";
const { t } = useI18n(); const { t } = useI18n();
const message = useMessage(); const message = useMessage();
const headerFormRef = ref<any>(); const headerForm = reactive<{ title: string, description: string, attachments: any[] | string}>({
const headerFormRules = {
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
};
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string }>({
title: '', title: '',
description: '', description: '',
attachments: [] as any[], attachments: [] as any[],
@@ -75,57 +68,47 @@ const headerForm = reactive<{ title: string, description: string, attachments: a
const formData = ref<ProjectExitFeedback>({ const formData = ref<ProjectExitFeedback>({
exitTime: '', exitTime: '',
exitExecutor: '', exitExecutor: '',
exitRemark: '', exitRemark: '',
exitAttachment: '', exitAttachment: '',
deptId: '',
}); });
const submitLoading = ref(false); const submitLoading = ref(false);
const handleInitiateApproval = async () => { const handleInitiateApproval = async () => {
const headerValid = await headerFormRef.value?.validate().catch(() => false); if (!formData.value.projectId){
if (!headerValid) { message.error('项目名称必填');
return; return
} }
if (!formData.value.projectId) { submitLoading.value = true;
message.error('项目名称必填'); const attachments = JSON.stringify(headerForm.attachments);
return const {processInstanceId} = await flowFn('VITE_FLOWID_36',{
} paramMap:{
submitLoading.value = true; // miu0ilc1tfa61_assignee_select: [
const attachments = JSON.stringify(headerForm.attachments); // {
const flowResult = await flowFn('VITE_FLOWID_36', { // "type": "user",
paramMap: { // "id": "1",
// miu0ilc1tfa61_assignee_select: [ // "name": "admin",
// { // "avatar": "/admin/sys-file/local/2a14ae08150e483c93e12ac8934173e2.png"
// "type": "user", // }
// "id": "1", // ]
// "name": "admin", }
// "avatar": "/admin/sys-file/local/2a14ae08150e483c93e12ac8934173e2.png" })
// } const flowNameObj = flowNameOptions.filter(item => item.label === 'exitFeedback')[0]
// ] await addFlowForm({
} title: headerForm.title,
}) description: headerForm.description,
if (flowResult instanceof Error) { attachments,
submitLoading.value = false; processInstanceId,
throw flowResult; flowType: flowNameObj.value
} })
const { processInstanceId } = flowResult; formData.value.processInstanceId = processInstanceId;
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitFeedback')[0] const exitAttachment = JSON.stringify(formData.value.exitAttachment);
await addFlowForm({ const params = { ...formData.value, exitAttachment }
title: headerForm.title, addProjectExitPlanFeedback(params).then(()=>{
description: headerForm.description, message.success(t('common.success'));
attachments, }).catch((err: any) => {
processInstanceId, message.error(err.msg);
flowType: flowNameObj.value }).finally(() => {
}) submitLoading.value = false;
formData.value.processInstanceId = processInstanceId; });
const exitAttachment = JSON.stringify(formData.value.exitAttachment);
const params = { ...formData.value, exitAttachment } as ProjectTask;
addProjectExitPlanFeedback(params).then(() => {
message.success(t('common.success'));
}).catch((err: any) => {
message.error(err.msg);
}).finally(() => {
submitLoading.value = false;
});
}; };
const handleSaveDraft = () => { const handleSaveDraft = () => {
@@ -143,17 +126,17 @@ const handleSaveTemplate = () => {
const handleViewWorkflow = () => { const handleViewWorkflow = () => {
message.info(t('projectExitFeedback.messages.viewWorkflow')); message.info(t('projectExitFeedback.messages.viewWorkflow'));
}; };
const uploadChange = (_: any, data: any[]) => { const uploadChange = (_:any,data:any[]) =>{
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) { if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
headerForm.attachments = []; headerForm.attachments = [];
return; return;
} }
headerForm.attachments = data.map((item: any) => { headerForm.attachments = data.map((item:any) => {
return { return {
name: item.name, name: item.name,
url: item.url url: item.url
} }
}) })
} }
</script> </script>

View File

@@ -34,12 +34,10 @@ export interface ProjectExitFeedback {
/** 状态 */ /** 状态 */
status?: string; status?: string;
/** 项目id */ /** 项目id */
projectId?: number; projectId?:number;
/** 项目名称*/ /** 项目名称*/
projectName?: string; projectName?:string;
/** 部门id */
deptId: string;
} }
export interface paramsDataProjectExitPlanFeedback { export interface paramsDataProjectExitPlanFeedback {
@@ -50,31 +48,31 @@ export interface paramsDataProjectExitPlanFeedback {
exitRemark: string exitRemark: string
} }
export interface projectExitPlanFeedbackItem { export interface projectExitPlanFeedbackItem {
id?: number, id?: number,
projectName?: string, projectName?: string,
projectId?: number, projectId?: number,
exitRecommendation?: string, exitRecommendation?: string,
exitMethod?: string, exitMethod?: string,
executionTask?: string, executionTask?: string,
taskDescription?: string, taskDescription?: string,
executor?: string, executor?: string,
taskStartDate?: string, taskStartDate?: string,
taskEndDate?: string, taskEndDate?: string,
createBy?: string, createBy?: string,
createTime?: string, createTime?: string,
updateBy?: string, updateBy?: string,
updateTime?: string, updateTime?: string,
delFlag?: string, delFlag?: string,
processInstanceId?: string, processInstanceId?: string,
status?: string, status?: string,
reviewNotes?: string, reviewNotes?: string,
applicationDept?: string applicationDept?: string
} }
export interface feedbackResponseData { export interface feedbackResponseData {
total: number, total: number,
records: projectExitPlanFeedbackItem[]; records: projectExitPlanFeedbackItem[];
current: number, current: number,
size: number, size: number,
pages: number, pages: number,
} }

View File

@@ -1,55 +1,53 @@
<template> <template>
<div class="layout-padding"> <div class="layout-padding">
<div class="layout-padding-auto layout-padding-view"> <div class="layout-padding-auto layout-padding-view">
<el-row class="mb10"> <el-row class="mb10">
<div class="form-header-actions" style="width: 100%;"> <div class="form-header-actions" style="width: 100%;">
<div> <div>
<el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval"> <el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval">
{{ t('projectExitPlan.actions.initiateApproval') }} {{ t('projectExitPlan.actions.initiateApproval') }}
</el-button> </el-button>
<el-button icon="Document" @click="handleSaveDraft"> <el-button icon="Document" @click="handleSaveDraft">
{{ t('projectExitPlan.actions.saveDraft') }} {{ t('projectExitPlan.actions.saveDraft') }}
</el-button> </el-button>
<el-button icon="FolderOpened" @click="handleLoadTemplate"> <el-button icon="FolderOpened" @click="handleLoadTemplate">
{{ t('projectExitPlan.actions.loadTemplate') }} {{ t('projectExitPlan.actions.loadTemplate') }}
</el-button> </el-button>
<el-button icon="FolderAdd" @click="handleSaveTemplate"> <el-button icon="FolderAdd" @click="handleSaveTemplate">
{{ t('projectExitPlan.actions.saveTemplate') }} {{ t('projectExitPlan.actions.saveTemplate') }}
</el-button> </el-button>
</div> </div>
<div style="margin-left:auto;"> <div style="margin-left:auto;">
<el-button icon="View" @click="handleViewWorkflow"> <el-button icon="View" @click="handleViewWorkflow">
{{ t('projectExitPlan.actions.viewWorkflow') }} {{ t('projectExitPlan.actions.viewWorkflow') }}
</el-button> </el-button>
</div> </div>
</div> </div>
</el-row> </el-row>
<el-row class="mb10"> <el-row class="mb10">
<el-form :model="headerForm" :rules="headerFormRules" ref="headerFormRef" label-width="80px" <el-form :model="headerForm" label-width="80px" class="w-full">
class="w-full"> <el-form-item :label="t('projectExitPlan.headerForm.title')">
<el-form-item :label="t('projectExitPlan.headerForm.title')" prop="title" required> <el-input v-model="headerForm.title"
<el-input v-model="headerForm.title" :placeholder="t('projectExitPlan.headerForm.titlePlaceholder')" />
:placeholder="t('projectExitPlan.headerForm.titlePlaceholder')" /> </el-form-item>
</el-form-item> <el-form-item :label="t('projectExitPlan.headerForm.description')">
<el-form-item :label="t('projectExitPlan.headerForm.description')"> <el-input v-model="headerForm.description"
<el-input v-model="headerForm.description" :placeholder="t('projectExitPlan.headerForm.descriptionPlaceholder')" />
:placeholder="t('projectExitPlan.headerForm.descriptionPlaceholder')" /> </el-form-item>
</el-form-item> <el-form-item :label="t('projectExitPlan.headerForm.attachments')">
<el-form-item :label="t('projectExitPlan.headerForm.attachments')"> <UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" type="simple" :limit="10" />
<UploadFile :modelValue="headerForm.attachments" @change="uploadChange" :fileSize="20" </el-form-item>
type="simple" :limit="10" /> </el-form>
</el-form-item> </el-row>
</el-form>
</el-row>
<ProjectExitPlanForm v-model="formData" :rules="rules" ref="formDataRef" /> <ProjectExitPlanForm v-model="formData" :rules="rules" ref="formDataRef"/>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { reactive, ref } from 'vue'; import { reactive } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useMessage } from '/@/hooks/message'; import { useMessage } from '/@/hooks/message';
@@ -58,33 +56,28 @@ import ProjectExitPlanForm from '/@/components/investment/common/ProjectExitPlan
import { FormRules } from 'element-plus'; import { FormRules } from 'element-plus';
import { addProjectExitPlan } from '/@/api/investment/projectExitPlan'; import { addProjectExitPlan } from '/@/api/investment/projectExitPlan';
import UploadFile from "/@/components/Upload/index.vue"; import UploadFile from "/@/components/Upload/index.vue";
import { flowFn } from "/@/utils/flowFn"; import {flowFn} from "/@/utils/flowFn";
import { addFlowForm } from "/@/api/flow/flow"; import {addFlowForm} from "/@/api/flow/flow";
import { flowNameOptions } from "/@/hooks/enums"; import {flowNameOptions} from "/@/hooks/enums";
const formDataRef = ref<HTMLFormElement | null>() const formDataRef = ref<HTMLFormElement | null>()
const { t } = useI18n(); const { t } = useI18n();
const message = useMessage(); const message = useMessage();
const headerFormRef = ref<any>(); const headerForm = reactive<{ title: string, description: string, attachments: any[] | string}>({
const headerFormRules = { title: '',
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }] description: '',
}; attachments: [] as any[],
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string }>({
title: '',
description: '',
attachments: [] as any[],
}); });
const formData = ref<ProjectTask>({ const formData = ref<ProjectTask>({
id: undefined, id: undefined,
projectName: '', projectName: '',
exitRecommendation: '', exitRecommendation: '',
executionTask: '', executionTask:'',
taskDescription: '', taskDescription:'',
executor: '', executor:'',
taskStartDate: new Date().toISOString().substring(0, 10), taskStartDate:new Date().toISOString().substring(0,10),
taskEndDate: new Date().toISOString().substring(0, 10), taskEndDate:new Date().toISOString().substring(0,10),
deptId: ''
}); });
const requiredRule = [{ required: true, message: `${t('该字段必填')}` }] const requiredRule = [{ required: true, message: `${t('该字段必填')}` }]
const rules = reactive<FormRules<ProjectTask>>({ const rules = reactive<FormRules<ProjectTask>>({
@@ -94,17 +87,13 @@ const rules = reactive<FormRules<ProjectTask>>({
const submitLoading = ref<boolean>(false); const submitLoading = ref<boolean>(false);
const handleInitiateApproval = async () => { const handleInitiateApproval = async () => {
try { try {
const headerValid = await headerFormRef.value?.validate().catch(() => false); const valid = await formDataRef?.value?.validateRef();
if (!headerValid) {
return;
}
const valid = await formDataRef?.value?.validateRef();
if (!valid) return; if (!valid) return;
submitLoading.value = true; submitLoading.value = true;
const folowIdKey = 'VITE_FLOWID_35' const folowIdKey = 'VITE_FLOWID_35'
const attachments = JSON.stringify(headerForm.attachments); const attachments = JSON.stringify(headerForm.attachments);
const flowResult = await flowFn(folowIdKey, { const {processInstanceId} = await flowFn(folowIdKey,{
paramMap: { paramMap:{
// miu0ilc1tfa61_assignee_select: [ // miu0ilc1tfa61_assignee_select: [
// { // {
// "type": "user", // "type": "user",
@@ -115,11 +104,6 @@ const handleInitiateApproval = async () => {
// ] // ]
} }
}) })
if (flowResult instanceof Error) {
submitLoading.value = false;
throw flowResult;
}
const { processInstanceId } = flowResult;
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0] const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0]
await addFlowForm({ await addFlowForm({
title: headerForm.title, title: headerForm.title,
@@ -129,14 +113,14 @@ const handleInitiateApproval = async () => {
flowType: flowNameObj.value flowType: flowNameObj.value
}) })
formData.value.processInstanceId = processInstanceId; formData.value.processInstanceId = processInstanceId;
addProjectExitPlan(formData.value).then((res: any) => { addProjectExitPlan(formData.value).then((res:any) => {
useMessage().success(t('common.success')); useMessage().success(t('common.success'));
}).catch((err: any) => { }).catch((err:any) => {
useMessage().error(err.msg); useMessage().error(err.msg);
}).finally(() => { }).finally(() => {
submitLoading.value = false; submitLoading.value = false;
}); });
} catch (e) { }catch (e) {
console.log(e); console.log(e);
submitLoading.value = false; submitLoading.value = false;
} }
@@ -144,26 +128,26 @@ const handleInitiateApproval = async () => {
}; };
const handleSaveDraft = () => { const handleSaveDraft = () => {
message.info(t('projectExitPlan.messages.saveDraft')); message.info(t('projectExitPlan.messages.saveDraft'));
}; };
const handleLoadTemplate = () => { const handleLoadTemplate = () => {
message.info(t('projectExitPlan.messages.loadTemplate')); message.info(t('projectExitPlan.messages.loadTemplate'));
}; };
const handleSaveTemplate = () => { const handleSaveTemplate = () => {
message.info(t('projectExitPlan.messages.saveTemplate')); message.info(t('projectExitPlan.messages.saveTemplate'));
}; };
const handleViewWorkflow = () => { const handleViewWorkflow = () => {
message.info(t('projectExitPlan.messages.viewWorkflow')); message.info(t('projectExitPlan.messages.viewWorkflow'));
}; };
const uploadChange = (_: any, data: any[]) => { const uploadChange = (_:any,data:any[]) =>{
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) { if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0){
headerForm.attachments = []; headerForm.attachments = [];
return; return;
} }
headerForm.attachments = data.map((item: any) => { headerForm.attachments = data.map((item:any) => {
return { return {
name: item.name, name: item.name,
url: item.url url: item.url
@@ -174,13 +158,13 @@ const uploadChange = (_: any, data: any[]) => {
<style scoped> <style scoped>
.layout-container .layout-padding { .layout-container .layout-padding {
height: auto; height: auto;
overflow: auto; overflow: auto;
} }
.form-header-actions { .form-header-actions {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
</style> </style>

View File

@@ -774,7 +774,7 @@ onMounted(() => {
const projectMainEntityOptions = ref([]); const projectMainEntityOptions = ref([]);
const getDeptTree = async () => { const getDeptTree = async () => {
const res = await selectTreeCompanyTree(); const res = await selectTreeCompanyTree();
projectMainEntityOptions.value = res.data || []; projectMainEntityOptions.value = res.data?.filter((item:any) => item.id !== '-7283586818552608318');
}; };
getDeptTree() getDeptTree()
watch(editId, (id) => { watch(editId, (id) => {

View File

@@ -149,16 +149,6 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="isUpdate" prop="expertStatus" min-width="120" :label="t('expertApply.table.expertStatus')">
<template #default="scope">
<el-select v-model="scope.row.expertStatus" :placeholder="t('expertApply.table.selectPlaceholder')"
style="width: 100%;">
<el-option :label="t('expertApply.expertStatusOptions.normal')" value="normal" />
<el-option :label="t('expertApply.expertStatusOptions.invalid')" value="invalid" />
</el-select>
</template>
</el-table-column>
</el-table> </el-table>
<!-- 选择专家弹窗 --> <!-- 选择专家弹窗 -->
<SelectExpertDialog v-model:visible="expertDialogVisible" @confirm="onExpertSelected" /> <SelectExpertDialog v-model:visible="expertDialogVisible" @confirm="onExpertSelected" />
@@ -230,7 +220,6 @@ const createEmptyExpert = () => ({
attachments: '', attachments: '',
evidences: '', evidences: '',
level: '', level: '',
expertStatus: 'normal',
externalStatus: '', externalStatus: '',
attachmentUrl: '', attachmentUrl: '',
testimonyMaterials: '', testimonyMaterials: '',
@@ -267,7 +256,6 @@ const onExpertSelected = (row: any) => {
target.professionalTitle = row?.professionalTitle ?? target.professionalTitle; target.professionalTitle = row?.professionalTitle ?? target.professionalTitle;
target.workUnit = row?.workUnit ?? target.workUnit; target.workUnit = row?.workUnit ?? target.workUnit;
target.level = row?.level ?? target.level; target.level = row?.level ?? target.level;
target.expertStatus = row?.expertStatus ?? target.expertStatus;
target.attachments = row?.attachmentUrl ? JSON.parse(row.attachmentUrl) : [] target.attachments = row?.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
target.evidences = row?.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : [] target.evidences = row?.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
}; };
@@ -312,7 +300,6 @@ const toSubmitExpert = (expert: ReturnType<typeof createEmptyExpert>) => ({
attachmentUrl: JSON.stringify(expert.attachments), attachmentUrl: JSON.stringify(expert.attachments),
testimonyMaterials: JSON.stringify(expert.evidences), testimonyMaterials: JSON.stringify(expert.evidences),
level: expert.level || '', level: expert.level || '',
expertStatus: expert.expertStatus || 'normal',
externalStatus: expert.externalStatus || '', externalStatus: expert.externalStatus || '',
createBy: expert.createBy || '', createBy: expert.createBy || '',
createTime: expert.createTime || '', createTime: expert.createTime || '',
@@ -460,7 +447,6 @@ watch(()=>tempId.value,()=>{
professionalTitle: item.professionalTitle, professionalTitle: item.professionalTitle,
workUnit: item.workUnit, workUnit: item.workUnit,
level: item.level, level: item.level,
expertStatus: item.expertStatus || 'normal',
attachments: item.attachmentUrl ? JSON.parse(item.attachmentUrl) : [], attachments: item.attachmentUrl ? JSON.parse(item.attachmentUrl) : [],
evidences: item.testimonyMaterials ? JSON.parse(item.testimonyMaterials) : [] evidences: item.testimonyMaterials ? JSON.parse(item.testimonyMaterials) : []
} }

View File

@@ -26,7 +26,7 @@
<el-table-column :label="t('expertLibrary.table.level')" prop="level" min-width="100" <el-table-column :label="t('expertLibrary.table.level')" prop="level" min-width="100"
show-overflow-tooltip> show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<span>{{ levelLabel(row.level) }}</span> <span>{{ level.find((item:any) => item.value === row.level)?.label || '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="t('expertLibrary.table.status')" prop="externalStatus" min-width="120" <el-table-column :label="t('expertLibrary.table.status')" prop="externalStatus" min-width="120"
@@ -60,6 +60,7 @@ import ExpertDetailDialog from '/@/components/investment/ExpertDetailDialog.vue'
import { useUserInfo } from '/@/stores/userInfo'; import { useUserInfo } from '/@/stores/userInfo';
import { dayjs } from 'element-plus'; import { dayjs } from 'element-plus';
import FlowFormView from '/@/components/workbench/common/FlowFormView.vue'; import FlowFormView from '/@/components/workbench/common/FlowFormView.vue';
import {level} from "/@/hooks/enums";
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute() const route = useRoute()

View File

@@ -179,46 +179,16 @@ const detailMeta = reactive({
date: new Date().toISOString().slice(0, 10), date: new Date().toISOString().slice(0, 10),
}); });
const handleView = (row: any) => { const handleView = (row: any) => {
// 解析附件,支持对象数组和字符串数组两种格式 // 转换为详情组件需要的格式
let attachmentUrl: any[] = []; const attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
try { const attachments = attachmentUrl.map((url: string) => {
attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : []; return { url, name: url.split('fileName=')[1] }
} catch { })
attachmentUrl = []; // 转换为详情组件需要的格式
} const testimonyMaterials = row.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
const attachments = attachmentUrl.map((item: any) => { const evidences = testimonyMaterials.map((url: string) => {
// 如果已经是对象格式 { name, url },直接使用 return { url, name: url.split('fileName=')[1] }
if (typeof item === 'object' && item !== null) { })
return { url: item.url || '', name: item.name || '' };
}
// 如果是字符串格式,尝试从 URL 中提取文件名
if (typeof item === 'string') {
const fileName = item.split('fileName=')[1] || item.split('/').pop() || '附件';
return { url: item, name: fileName };
}
return { url: '', name: '' };
});
// 解析佐证材料,支持对象数组和字符串数组两种格式
let testimonyMaterials: any[] = [];
try {
testimonyMaterials = row.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : [];
} catch {
testimonyMaterials = [];
}
const evidences = testimonyMaterials.map((item: any) => {
// 如果已经是对象格式 { name, url },直接使用
if (typeof item === 'object' && item !== null) {
return { url: item.url || '', name: item.name || '' };
}
// 如果是字符串格式,尝试从 URL 中提取文件名
if (typeof item === 'string') {
const fileName = item.split('fileName=')[1] || item.split('/').pop() || '佐证材料';
return { url: item, name: fileName };
}
return { url: '', name: '' };
});
currentDetail.value = { ...row, currentDetail.value = { ...row,
attachments, attachments,
evidences, evidences,

View File

@@ -109,14 +109,9 @@ export default {
attachments: 'Attachments', attachments: 'Attachments',
evidences: 'Supporting Materials', evidences: 'Supporting Materials',
level: 'Level', level: 'Level',
expertStatus: 'Expert Status',
inputPlaceholder: 'Please enter', inputPlaceholder: 'Please enter',
selectPlaceholder: 'Please select', selectPlaceholder: 'Please select',
}, },
expertStatusOptions: {
normal: 'Normal',
invalid: 'Invalid',
},
}, },
expertLibrary: { expertLibrary: {
title: 'Expert Repository', title: 'Expert Repository',

View File

@@ -109,14 +109,9 @@ export default {
attachments: '附件', attachments: '附件',
evidences: '佐证材料', evidences: '佐证材料',
level: '级别', level: '级别',
expertStatus: '专家状态',
inputPlaceholder: '请输入', inputPlaceholder: '请输入',
selectPlaceholder: '请选择', selectPlaceholder: '请选择',
}, },
expertStatusOptions: {
normal: '正常',
invalid: '作废',
},
}, },
expertLibrary: { expertLibrary: {
title: '专家智库', title: '专家智库',

View File

@@ -138,7 +138,7 @@ const instructionFields = computed<Array<{ key: InstructionFieldKey; label: stri
const basicInfoFields = computed<Array<{ key: BasicFieldKey; label: string }>>(() => [ const basicInfoFields = computed<Array<{ key: BasicFieldKey; label: string }>>(() => [
{key: 'groupBelonging', label: t('mixedRegister.basicFields.groupName')}, {key: 'groupBelonging', label: t('mixedRegister.basicFields.groupName')},
{key: 'projectYear', label: t('mixedRegister.basicFields.year')}, {key: 'projectYear', label: t('mixedRegister.basicFields.year'),type:'number',length:4},
{key: 'projectName', label: t('mixedRegister.basicFields.projectName')}, {key: 'projectName', label: t('mixedRegister.basicFields.projectName')},
{key: 'implementEnterprise', label: t('mixedRegister.basicFields.companyFullName')}, {key: 'implementEnterprise', label: t('mixedRegister.basicFields.companyFullName')},
{key: 'enterpriseCreditCode', label: t('mixedRegister.basicFields.creditCode')}, {key: 'enterpriseCreditCode', label: t('mixedRegister.basicFields.creditCode')},

View File

@@ -57,11 +57,11 @@
min-width="180" /> min-width="180" />
<el-table-column prop="status" :label="t('workbenchPage.pending.table.status')" min-width="140"> <el-table-column prop="status" :label="t('workbenchPage.pending.table.status')" min-width="140">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.status == 1" type="primary">待审批</el-tag> <el-tag v-if="scope.row.status == 1" type="primary">进行中</el-tag>
<el-tag v-else type="success">已结束</el-tag> <el-tag v-else type="success">已结束</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="t('workbenchPage.pending.table.actions')" width="120" fixed="right"> <el-table-column label="查看" width="120" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button link type="primary" @click="handleView(row)"> <el-button link type="primary" @click="handleView(row)">
{{ t('workbenchPage.pending.actions.view') }} {{ t('workbenchPage.pending.actions.view') }}
@@ -75,6 +75,27 @@
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination> <pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
</el-card> </el-card>
</div> </div>
<!-- <el-dialog v-model="visible" width="80%" title="流程节点">-->
<!-- <flow-node-format :selectUserNodeId="flowUserData.root.map(item => item.id)" :flow-id="flowIdCon" ref="flowNodeFormatRef"></flow-node-format>-->
<!-- </el-dialog>-->
<!-- v-if="visible" 确保关闭时销毁组件 -->
<el-drawer v-model="visible" v-if="visible" direction="rtl" size="600px">
<template #header>
<h3>{{ currentData?.name }}</h3>
</template>
<template #default>
<el-card class="box-card">
<FormCreate :rule="rule" v-model="formData" v-model:api="fApi" />
</el-card>
<flow-node-format
:disableSelect="true"
:processInstanceId="currentData.processInstanceId"
:flow-id="currentData.flowId"
ref="flowNodeFormatRef"
:disabled="true"
></flow-node-format>
</template>
</el-drawer>
</div> </div>
</template> </template>
@@ -86,13 +107,15 @@ import { queryMineStarted } from '/@/api/flow/task';
import { BasicTableProps, useTable } from '/@/hooks/table'; import { BasicTableProps, useTable } from '/@/hooks/table';
import { useUserInfo } from '/@/stores/userInfo'; import { useUserInfo } from '/@/stores/userInfo';
import { flowNameOptions } from '/@/hooks/enums'; import { flowNameOptions } from '/@/hooks/enums';
import { getProcessInfoByIdAPI } from '/@/api/workbench/miOwLibr/ownershipCreate';
import FlowNodeFormat from "/@/views/flow/form/tools/FlowNodeFormatData.vue";
import FormCreate from "/@/views/flow/workflow/components/FormCreate.vue";
const { t } = useI18n(); const { t } = useI18n();
const message = useMessage(); const message = useMessage();
const loading = ref(false); const loading = ref(false);
const stores = useUserInfo(); const stores = useUserInfo();
const { userInfos } = storeToRefs(stores); const { userInfos } = storeToRefs(stores);
const state: BasicTableProps = reactive<BasicTableProps>({ const state: BasicTableProps = reactive<BasicTableProps>({
pageList: queryMineStarted, pageList: queryMineStarted,
queryForm: { queryForm: {
@@ -117,9 +140,18 @@ const handleSearch = () => {
state.queryForm.title = keyword.value state.queryForm.title = keyword.value
getDataList(true) getDataList(true)
}; };
const currentData = ref<any>(null);
const visible = ref(false);
/**查看流程*/
const handleView = (row: any) => { const handleView = (row: any) => {
message.info(`${row.title} ${t('workbenchPage.pending.messages.viewPlaceholder')}`); getProcessInfoByIdAPI(row.id).then(res =>{
currentData.value = {
name: res.data.name,
processInstanceId: res.data.processInstanceId,
flowId: res.data.flowId
}
visible.value = true
})
}; };
const handleReview = (row: any) => { const handleReview = (row: any) => {

View File

@@ -57,34 +57,6 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
open: env.VITE_OPEN === 'true', // 是否自动打开浏览器 open: env.VITE_OPEN === 'true', // 是否自动打开浏览器
hmr: true, // 启用热更新 hmr: true, // 启用热更新
proxy: { proxy: {
'/api/auth': {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket
changeOrigin: true, // 是否修改请求头中的 Origin 字段
rewrite: (path) => path.replace(/^\/api\/auth/, '/admin'),
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
console.log('代理请求admin:', req.url, '->', options.target + req.url);
});
proxy.on('proxyRes', (proxyRes, req, res) => {
console.log('代理响应admin:', req.url, '状态:', proxyRes.statusCode);
});
},
},
'/api/task': {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket
changeOrigin: true, // 是否修改请求头中的 Origin 字段
rewrite: (path) => path.replace(/^\/api\/task/, '/admin'),
configure: (proxy, options) => {
proxy.on('proxyReq', (proxyReq, req, res) => {
console.log('代理请求task:', req.url, '->', options.target + req.url);
});
proxy.on('proxyRes', (proxyRes, req, res) => {
console.log('代理响应task:', req.url, '状态:', proxyRes.statusCode);
});
},
},
'/api': { '/api': {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址 target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket ws: true, // 是否启用 WebSocket