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_VERIFY_ENABLE = true
VITE_VERIFY_ENABLE = false
# 是否开启前端图形验证码
VITE_VERIFY_IMAGE_ENABLE = false

View File

@@ -8,7 +8,7 @@ VITE_OPEN = true
ENV = 'development'
# 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://10.30.148.198:7777
VITE_ADMIN_PROXY_PATH = http://10.30.148.198:7777

View File

@@ -9,4 +9,15 @@ export const getByProcessInstanceId = (processInstanceId: any) => {
processInstanceId
}
});
}
// 企业微信登录
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 },
});
}
// 根据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">
<!-- 如果返回的是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="handle-icon" @click="editImg" v-if="!self_disabled">
<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 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-col :span="12">
<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')">
<template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template>
</el-input>
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<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')">
<template #append>{{ t('postInvestmentEvaluationForm.unitSuffix') }}</template>
</el-input>
</el-input-number>
</el-form-item>
</el-col>
</el-row>
@@ -125,7 +125,7 @@
<div class="info-row">
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.projectDirection') }}
</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>
@@ -143,7 +143,7 @@
<div class="info-label required">{{
t('postInvestmentEvaluationForm.basicInfo.majorInvestmentProject') }}
</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-value required">{{ initTypeString(projectImportantOptions,formData.keyProject) || 'XXX' }}</div>
</div>
@@ -151,7 +151,7 @@
<div class="info-label required">{{ t('postInvestmentEvaluationForm.basicInfo.isWithinMainBusiness')
}}
</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>
<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-label">{{
t('postInvestmentEvaluationForm.decisionInfo.isProjectApprovalProcedureCompleted') }}</div>
<div class="info-value">{{ formData.isProjectApprovalCompleted || 'XXX'
<div class="info-value">{{ initTypeString(yesOrNo,formData.isProjectApprovalCompleted) || 'XXX'
}}</div>
</div>
<div class="info-row">
@@ -292,7 +292,7 @@
<div class="info-label">{{
t('postInvestmentEvaluationForm.decisionInfo.isDecisionProcedureCompleted')
}}</div>
<div class="info-value">{{ formData.isDecisionProcedureCompleted || 'XXX' }}</div>
<div class="info-value">{{ initTypeString(yesOrNo,formData.isDecisionProcedureCompleted) || 'XXX' }}</div>
<div class="info-label">{{
t('postInvestmentEvaluationForm.decisionInfo.decisionProcedureDocumentNumber') }}</div>
<div class="info-value">{{ formData.decisionProcedureFileNo || 'XXX' }}
@@ -531,7 +531,8 @@ import {
constructionNatureOptions, constructionStageOptions,
Enums, investmentAreaOptions, investmentCategoryOptions, mainBusinessOptions, projectDirectionDetailsOptions,
projectImportantOptions, projectNatureOptions,
projectSourceOptions, projectStatusOptions, strategicIndustryOptions
projectSourceOptions, projectStatusOptions, strategicIndustryOptions,projectDirectionOptions,
yesOrNo
} from '/@/hooks/enums';
import { PostInvestmentEvaluation, ProjectInvestmentInfo } from '/@/views/invBid/postInvestmentEvaluation/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 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) {
callback()
@@ -659,7 +660,7 @@ const requiredRule = [{ required: true, message: `${t('该字段必填')}` },{va
if (!isNaN(numValue) && isFinite(numValue)) {
callback()
} else {
callback(new Error(`${t('common.isNumber')}`))
callback(new Error(`必须是一个数字`))
}
}}]
const rules = ref<FormRules<PostInvestmentEvaluation>>({
@@ -763,7 +764,7 @@ defineExpose({
if (res){
return submitFormData.value;
}
return false;
return false
},
})
const uploadChange = (type:number,_:any,data:any[],index?:number) => {

View File

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

View File

@@ -251,7 +251,7 @@
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')" required prop="strategicEmergingIndustry">
<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-form-item>
</el-col>
@@ -572,12 +572,12 @@
<el-row :gutter="20" class="form-row">
<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-form-item>
</el-col>
<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-form-item>
</el-col>
@@ -597,14 +597,14 @@
</el-form-item>
</el-col>
<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-form-item>
</el-col>
</el-row>
<el-row :gutter="20" class="form-row">
<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-form-item>
</el-col>
@@ -646,7 +646,8 @@ import {
projectSourceOptions,
constructionNatureOptions,
investmentAreaOptions, yesOrNo, decisionTypeOptions, projectImportantOptions, cooperationPartnerNatureOptions,
cityStrategyOptions, mainBusinessOptions, projectDirectionDetailsOptions,projectDirectionOptions
cityStrategyOptions, mainBusinessOptions, projectDirectionDetailsOptions, projectDirectionOptions,
strategicIndustryOptions
} from '/@/hooks/enums';
import UserSelect from '/@/components/UserSelect/index.vue';
import ProjectNameList from '/@/components/ProjectNameList/index.vue';

View File

@@ -103,12 +103,12 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<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-col>
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.majorInvestmentProject')">
{{ formData.majorInvestmentProject || '--' }}
{{ yesOrNo.find(item => item.value === formData.majorInvestmentProject)?.label || formData.majorInvestmentProject || '--' }}
</el-form-item>
</el-col>
</el-row>
@@ -116,7 +116,7 @@
<el-row :gutter="20" class="form-row">
<el-col :span="24">
<el-form-item :label="t('reserveRegistration.basicInfo.withinMainBusiness')">
{{ formData.withinMainBusiness || '--' }}
{{ yesOrNo.find(item => item.value === formData.withinMainBusiness)?.label || formData.withinMainBusiness || '--' }}
</el-form-item>
</el-col>
</el-row>
@@ -124,7 +124,7 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.mainBusinessType')">
{{ formData.mainBusinessType || '--' }}
{{ mainBusinessOptions.find(item => item.value === formData.mainBusinessType)?.label || formData.mainBusinessType || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
@@ -138,12 +138,12 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.projectDirection')">
{{ formData.projectDirection || '--' }}
{{ projectDirectionOptions.find(item => item.value === formData.projectDirection)?.label || formData.projectDirection || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.directionSubdivision')">
{{ formData.directionSubdivision || '--' }}
{{ projectDirectionDetailsOptions.find(item => item.value === formData.directionSubdivision)?.label || formData.directionSubdivision || '--' }}
</el-form-item>
</el-col>
</el-row>
@@ -151,12 +151,12 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')">
{{ formData.strategicEmergingIndustry || '--' }}
{{ yesOrNo.find(item => item.value === formData.strategicEmergingIndustry)?.label || formData.strategicEmergingIndustry || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.urbanStrategy')">
{{ formData.urbanStrategy || '--' }}
{{ cityStrategyOptions.find(item => item.value === formData.urbanStrategy)?.label || formData.urbanStrategy || '--' }}
</el-form-item>
</el-col>
</el-row>
@@ -164,7 +164,7 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.isManufacturing')">
{{ formData.isManufacturing || '--' }}
{{ yesOrNo.find(item => item.value === formData.isManufacturing)?.label || formData.isManufacturing || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
@@ -191,7 +191,7 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.basicInfo.isControllingShareholder')">
{{ formData.isControllingShareholder || '--' }}
{{ yesOrNo.find(item => item.value === formData.isControllingShareholder)?.label || formData.isControllingShareholder || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
@@ -307,12 +307,12 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<el-form-item :label="t('reserveRegistration.decisionInfo.decisionType')">
{{ formData.decisionType || '--' }}
{{ decisionTypeOptions.find(item => item.value === formData.decisionType)?.label || formData.decisionType || '--' }}
</el-form-item>
</el-col>
<el-col :span="12">
<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-col>
</el-row>
@@ -333,7 +333,7 @@
<el-row :gutter="20" class="form-row">
<el-col :span="12">
<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-col>
<el-col :span="12">
@@ -369,14 +369,21 @@
</template>
<script lang="ts" setup>
import { reactive, watch, ref } from 'vue';
import { reactive, watch, ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import {
projectNatureOptions,
investmentCategoryOptions,
projectSourceOptions,
constructionNatureOptions,
investmentAreaOptions
investmentAreaOptions,
yesOrNo,
decisionTypeOptions,
projectImportantOptions,
cityStrategyOptions,
mainBusinessOptions,
projectDirectionDetailsOptions,
projectDirectionOptions
} from '/@/hooks/enums'
import type { ExternalCooperationUnitItemT } from '/@/api/investment/cooperationUnit'
@@ -433,7 +440,10 @@ export interface ProjectBasicInfoFormData {
isCompleteDecisionProcedures: string;
reviewOpinions: ReviewOpinions;
processInstanceId: string;
cooperationUnits?: ExternalCooperationUnitItemT[]
cooperationUnits?: ExternalCooperationUnitItemT[];
parentId?: string;
status: number;
deptId: string;
}
export interface PartnerInfo {
@@ -442,6 +452,7 @@ export interface PartnerInfo {
nature: string;
controller: string;
share: string;
cooperationController: string;
}
export interface ReviewOpinions {
@@ -451,9 +462,15 @@ export interface ReviewOpinions {
submitUnitMainLeadershipOpinion: string;
}
const props = defineProps<{
const props = withDefaults(defineProps<{
modelValue?: ProjectBasicInfoFormData;
}>();
mainTitle?: string;
}>(), {
mainTitle: ''
});
const mainTitle = computed(() => props.mainTitle);
watch(mainTitle, () => undefined);
const defaultPartnerRow: PartnerInfo = {
id: '',
@@ -519,6 +536,10 @@ const defaultFormData: ProjectBasicInfoFormData = {
submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '',
},
parentId: '',
status: 1,
deptId: '',
cooperationUnits: [],
};
const formData = reactive<ProjectBasicInfoFormData>({ ...defaultFormData });
@@ -570,6 +591,19 @@ watch(
.form-row:last-of-type {
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) {
font-weight: 500;
@@ -614,4 +648,4 @@ watch(
:deep(.el-table th .cell) {
font-weight: 500;
}
</style>
</style>

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -438,7 +438,7 @@ import {projectNatureOptions,
cityStrategyOptions, Enums
} from "/@/hooks/enums"
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 useForm = ref<FormInstance | undefined>();
const props = withDefaults(defineProps<{
@@ -523,6 +523,9 @@ const defaultForm: ProjectPlanApplyFormData = {
submitUnitLeadershipOpinion: '',
submitUnitMainLeadershipOpinion: '',
planImageQuota:'',
status:0,
deptId:0,
processInstanceId:'',
},
investmentProjects: [
{

View File

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

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,8 @@ import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import {queryMineStarted, queryMineTask} from "/@/api/flow/task";
import {useMessage} from "/@/hooks/message";
import request from "/@/utils/request";
import {examineDict} from "/@/hooks/enums";
const { t } = useI18n();
const router = useRouter();
@@ -46,27 +48,7 @@ const emit = defineEmits<{
const activeTab = ref('pending');
const tableData = ref<any[]>([]);
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 行数据
*/
const handleRowClick = (row: any) => {
const taskType = row.type || getTaskType(row.name);
console.log(row);
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({
path: route.split('?')[0],
path: routePath,
query: {
id: taskId,
type: taskType,
processInstanceId: row.processInstanceId,
tab: activeTab.value, // 传递当前标签页信息,用于返回时定位
},
});
};
// request('admin/sys/code/list',{
// method:'get',
// }).then(res=>{
// console.log('test',res)
// })
const getQueryMineTask = () =>{
return new Promise((resolve, reject) =>{
queryMineTask({

View File

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

View File

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

View File

@@ -55,7 +55,7 @@
</span>
<template #dropdown>
<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 divided command="logOut">{{ $t('user.dropdown5') }}</el-dropdown-item>
</el-dropdown-menu>

View File

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

View File

@@ -21,7 +21,7 @@
>
<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 }">
<el-select
v-model="row.projectType"
@@ -30,7 +30,7 @@
style="width: 100%"
>
<el-option
v-for="item in projectTypeOptions"
v-for="item in investmentCategoryOptions"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -109,6 +109,7 @@ import {
deleteProjectReviewPolicy
} from '/@/api/config/projectReviewPolicy';
import { debounce } from 'lodash';
import { investmentCategoryOptions } from '/@/hooks/enums';
const { t } = useI18n();
const message = useMessage();

View File

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

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import selectShow from '/@/components/OrgSelector/index.vue';
import uploadImg from "/@/components/Upload/Image.vue"
interface UserVo {
id: string;
name: string;
@@ -28,6 +28,7 @@ const props = defineProps<{
nodeUser: Record<string, any>;
row: FlowNode[];
disableSelect: boolean;
disabled: boolean;
}>();
// 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-for="(item1, index1) in node.userVoList" :key="index1" class="w-10 text-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>
</div>
@@ -89,7 +90,7 @@ import { Check, Plus, Refresh } from '@element-plus/icons-vue';
<span class="ml-1 text-gray-500">(添加了评论) {{ item1.showTime }}</span>
</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>

View File

@@ -28,6 +28,10 @@ let props = defineProps({
type: Array,
dafault: () => [],
},
disabled: {
type: Boolean,
default: false,
},
});
const row = ref([]);
@@ -88,5 +92,5 @@ defineExpose({ validate, formatSelectNodeUser });
</script>
<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>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -149,16 +149,6 @@
</el-select>
</template>
</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>
<!-- 选择专家弹窗 -->
<SelectExpertDialog v-model:visible="expertDialogVisible" @confirm="onExpertSelected" />
@@ -230,7 +220,6 @@ const createEmptyExpert = () => ({
attachments: '',
evidences: '',
level: '',
expertStatus: 'normal',
externalStatus: '',
attachmentUrl: '',
testimonyMaterials: '',
@@ -267,7 +256,6 @@ const onExpertSelected = (row: any) => {
target.professionalTitle = row?.professionalTitle ?? target.professionalTitle;
target.workUnit = row?.workUnit ?? target.workUnit;
target.level = row?.level ?? target.level;
target.expertStatus = row?.expertStatus ?? target.expertStatus;
target.attachments = row?.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
target.evidences = row?.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
};
@@ -312,7 +300,6 @@ const toSubmitExpert = (expert: ReturnType<typeof createEmptyExpert>) => ({
attachmentUrl: JSON.stringify(expert.attachments),
testimonyMaterials: JSON.stringify(expert.evidences),
level: expert.level || '',
expertStatus: expert.expertStatus || 'normal',
externalStatus: expert.externalStatus || '',
createBy: expert.createBy || '',
createTime: expert.createTime || '',
@@ -460,7 +447,6 @@ watch(()=>tempId.value,()=>{
professionalTitle: item.professionalTitle,
workUnit: item.workUnit,
level: item.level,
expertStatus: item.expertStatus || 'normal',
attachments: item.attachmentUrl ? JSON.parse(item.attachmentUrl) : [],
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"
show-overflow-tooltip>
<template #default="{ row }">
<span>{{ levelLabel(row.level) }}</span>
<span>{{ level.find((item:any) => item.value === row.level)?.label || '--' }}</span>
</template>
</el-table-column>
<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 { dayjs } from 'element-plus';
import FlowFormView from '/@/components/workbench/common/FlowFormView.vue';
import {level} from "/@/hooks/enums";
const { t } = useI18n();
const route = useRoute()

View File

@@ -179,46 +179,16 @@ const detailMeta = reactive({
date: new Date().toISOString().slice(0, 10),
});
const handleView = (row: any) => {
// 解析附件,支持对象数组和字符串数组两种格式
let attachmentUrl: any[] = [];
try {
attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : [];
} catch {
attachmentUrl = [];
}
const attachments = attachmentUrl.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: '' };
});
// 解析佐证材料,支持对象数组和字符串数组两种格式
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: '' };
});
// 转换为详情组件需要的格式
const attachmentUrl = row.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
const attachments = attachmentUrl.map((url: string) => {
return { url, name: url.split('fileName=')[1] }
})
// 转换为详情组件需要的格式
const testimonyMaterials = row.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
const evidences = testimonyMaterials.map((url: string) => {
return { url, name: url.split('fileName=')[1] }
})
currentDetail.value = { ...row,
attachments,
evidences,

View File

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

View File

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

View File

@@ -138,7 +138,7 @@ const instructionFields = computed<Array<{ key: InstructionFieldKey; label: stri
const basicInfoFields = computed<Array<{ key: BasicFieldKey; label: string }>>(() => [
{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: 'implementEnterprise', label: t('mixedRegister.basicFields.companyFullName')},
{key: 'enterpriseCreditCode', label: t('mixedRegister.basicFields.creditCode')},

View File

@@ -57,11 +57,11 @@
min-width="180" />
<el-table-column prop="status" :label="t('workbenchPage.pending.table.status')" min-width="140">
<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>
</template>
</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 }">
<el-button link type="primary" @click="handleView(row)">
{{ t('workbenchPage.pending.actions.view') }}
@@ -75,6 +75,27 @@
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
</el-card>
</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>
</template>
@@ -86,13 +107,15 @@ import { queryMineStarted } from '/@/api/flow/task';
import { BasicTableProps, useTable } from '/@/hooks/table';
import { useUserInfo } from '/@/stores/userInfo';
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 message = useMessage();
const loading = ref(false);
const stores = useUserInfo();
const { userInfos } = storeToRefs(stores);
const state: BasicTableProps = reactive<BasicTableProps>({
pageList: queryMineStarted,
queryForm: {
@@ -117,9 +140,18 @@ const handleSearch = () => {
state.queryForm.title = keyword.value
getDataList(true)
};
const currentData = ref<any>(null);
const visible = ref(false);
/**查看流程*/
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) => {

View File

@@ -57,34 +57,6 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
open: env.VITE_OPEN === 'true', // 是否自动打开浏览器
hmr: true, // 启用热更新
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': {
target: env.VITE_ADMIN_PROXY_PATH, // 目标服务器地址
ws: true, // 是否启用 WebSocket