Compare commits
8 Commits
915cb66b40
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| e19c8ae50e | |||
| a8ab4382a2 | |||
| 92b9bf9dd1 | |||
| 53fd697d46 | |||
| ed87a4e929 | |||
| a8cb979339 | |||
| b674b78621 | |||
| c0f2dc43c0 |
2
.env
2
.env
@@ -1,5 +1,5 @@
|
||||
# 网站主标题
|
||||
VITE_GLOBAL_TITLE= 'PIGX ADMIN'
|
||||
VITE_GLOBAL_TITLE= '投资管理门户'
|
||||
|
||||
# footer
|
||||
VITE_FOOTER_TITLE= '©2025 pig4cloud.com'
|
||||
|
||||
@@ -9,4 +9,15 @@ export const getByProcessInstanceId = (processInstanceId: any) => {
|
||||
processInstanceId
|
||||
}
|
||||
});
|
||||
}
|
||||
// 企业微信登录
|
||||
export const loginWx = (code: any) => {
|
||||
return request({
|
||||
url: '/admin/oauth2/token',
|
||||
method: 'get',
|
||||
params:{
|
||||
grant_type: 'wechat_work',
|
||||
code:code
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -35,6 +35,16 @@ export const investmentProjectsPlanGetById = (id: number|string) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
// 根据模板id查询项目投资计划
|
||||
export const getInvestmentProjectsPlanByTemplateId = (templateId: string) => {
|
||||
return request({
|
||||
url: '/admin/investmentProjectsPlan/getByTemplateId',
|
||||
method: 'get',
|
||||
params: {
|
||||
templateId: templateId
|
||||
}
|
||||
})
|
||||
}
|
||||
// 推送国资 投资项目计划
|
||||
export const investmentProjectsPlanPush = (id: string) => {
|
||||
return request({
|
||||
|
||||
@@ -46,6 +46,14 @@ export const getInvestmentProjectsProgressViewAPI = (id: number|string) => {
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
// 根据模板id查询投资项目进度
|
||||
export const getInvestmentProjectsProgressByTemplateIdAPI = (templateId: string) => {
|
||||
return request<InvestmentProjectProgress>({
|
||||
url: '/admin/investmentProjectsProgress/getByTemplateId',
|
||||
method: 'get',
|
||||
params: { templateId }
|
||||
})
|
||||
}
|
||||
// 报送国资
|
||||
export const investmentProjectsProgressSubmitAPI = (id: string) => {
|
||||
return request({
|
||||
|
||||
@@ -27,3 +27,11 @@ export function getProjectExitPlanFeedbackByProcessInstanceId(processInstanceId:
|
||||
export function getProjectExitPlanFeedbackPage(data: paramsDataProjectExitPlanFeedback) {
|
||||
return request<feedbackResponseData>({ url: '/admin/projectExitPlan/feedbackPage', method: 'post', data })
|
||||
}
|
||||
// 根据模板id查询项目退出计划详情
|
||||
export function getProjectExitPlanByTemplateId(templateId: string) {
|
||||
return request({ url: '/admin/projectExitPlan/getByTemplateId?templateId=' + templateId, method: 'get' })
|
||||
}
|
||||
// 根据模板id查询项目退出计划反馈详情
|
||||
export function getProjectExitPlanFeedbackByTemplateId(templateId: string) {
|
||||
return request({ url: '/admin/projectExitPlan/getFeedbackByTemplateId?templateId=' + templateId, method: 'get' })
|
||||
}
|
||||
@@ -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 },
|
||||
})
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
<script setup lang="ts" name="StrengthMeter">
|
||||
import { verifyPasswordStrength } from '/@/utils/toolsValidate';
|
||||
const props = defineProps({
|
||||
value: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
},
|
||||
showInput: {
|
||||
@@ -28,7 +28,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['score', 'change', 'update:value']);
|
||||
const emit = defineEmits(['score', 'change', 'update:modelValue']);
|
||||
|
||||
// 计算密码强度
|
||||
const getPasswordStrength = computed(() => {
|
||||
@@ -47,13 +47,13 @@ const handleChange = (e: any) => {
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
innerValueRef.value = props.value || '';
|
||||
innerValueRef.value = props.modelValue || '';
|
||||
});
|
||||
|
||||
watch(
|
||||
() => unref(innerValueRef),
|
||||
(val) => {
|
||||
emit('update:value', val);
|
||||
emit('update:modelValue', val);
|
||||
emit('change', val);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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 ;
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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>
|
||||
@@ -172,7 +172,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, watch } from 'vue';
|
||||
import { reactive, watch, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { FolderOpened, OfficeBuilding } from '@element-plus/icons-vue';
|
||||
import { investmentProjectsPlanGetById, investmentProjectsPlanPage } from '/@/api/investment/investmentManagement';
|
||||
@@ -205,6 +205,7 @@ const defaultForm: ProjectTask = {
|
||||
executor: '',
|
||||
taskStartDate: new Date().toISOString().substring(0, 10),
|
||||
taskEndDate: new Date().toISOString().substring(0, 10),
|
||||
deptId: ''
|
||||
};
|
||||
|
||||
const formData = reactive<ProjectTask>({ ...defaultForm, ...props.modelValue });
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
</template>
|
||||
<el-select v-model="formData.entity.constructionNature"
|
||||
:placeholder="t('planApply.placeholder.select')" clearable>
|
||||
<el-option v-for="item in constructionNatureOptions" :key="item.value" :label="item.label"
|
||||
<el-option v-for="item in ziDian" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -452,8 +452,8 @@
|
||||
</div>
|
||||
<el-table :data="formData.investmentProjects" border style="width: 100%" class="annual-investment-table">
|
||||
<el-table-column width="60" align="center">
|
||||
<template>
|
||||
<el-radio v-model="selectedAnnualInvestmentIndex" />
|
||||
<template #default="{ $index }">
|
||||
<el-radio v-model="selectedAnnualInvestmentIndex" :value="$index" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.index')" width="60" align="center">
|
||||
@@ -488,9 +488,9 @@
|
||||
'(万元)' }}</span>
|
||||
</template>
|
||||
<template #default="{ row }">
|
||||
<el-input-number :precision="2" :controls="false" :min="0" :value-on-clear="null"
|
||||
v-model="row.plannedPaymentAmount" :placeholder="t('planApply.placeholder.input')"
|
||||
:class="{ 'is-error': row.plannedPaymentAmount === null }" />
|
||||
<el-input-number :precision="2" :controls="false" readonly
|
||||
:model-value="calculateRowPaymentLimit(row)"
|
||||
:placeholder="t('planApply.placeholder.input')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.fundingSources')" align="center">
|
||||
@@ -659,7 +659,8 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<ProjectNameList :visible="visible" @emit:cancel="visible = false" @emit:confirm="projectNameFn" />
|
||||
<ProjectNameList :visible="visible" :isSelect="false" :selectedId="''" @emit:cancel="visible = false"
|
||||
@emit:confirm="projectNameFn" />
|
||||
<LibrarySelect v-model="librarySelectVisible" @select="handleLibrarySelect" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -686,6 +687,7 @@ import { ElMessage } from 'element-plus';
|
||||
import { FolderOpened } from '@element-plus/icons-vue';
|
||||
import LibrarySelect from '/@/views/invMid/projectLibrary/components/LibrarySelect.vue';
|
||||
import { selectTreeCompanyTree } from '/@/api/admin/dept';
|
||||
import {formatStartNodeShow} from "/@/api/flow/task";
|
||||
const { t } = useI18n();
|
||||
const useForm = ref<FormInstance | undefined>();
|
||||
const props = withDefaults(
|
||||
@@ -858,7 +860,7 @@ const defaultForm: ProjectPlanApplyFormData = {
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: '',
|
||||
planImageQuota: '',
|
||||
deptId: 0,
|
||||
deptId:'0',
|
||||
processInstanceId: '',
|
||||
status: 0,
|
||||
},
|
||||
@@ -903,6 +905,18 @@ const safeParseFloat = (value: string | number | null): number => {
|
||||
const parsed = typeof value === 'string' ? parseFloat(value) : value;
|
||||
return isNaN(parsed) ? 0 : parsed;
|
||||
};
|
||||
|
||||
// 计算表格每行的计划支付额度 = 自有资金 + 对外募集资金 + 财政资金 + 其他资金
|
||||
const calculateRowPaymentLimit = (row: InvestmentProjects): number => {
|
||||
const selfFunding = safeParseFloat(row.selfFunding);
|
||||
const externalFunding = safeParseFloat(row.externalFunding);
|
||||
const fiscalFunding = safeParseFloat(row.fiscalFunding);
|
||||
const otherFunding = safeParseFloat(row.otherFunding);
|
||||
const total = selfFunding + externalFunding + fiscalFunding + otherFunding;
|
||||
// 同步更新 row.plannedPaymentAmount 以便后续计算汇总
|
||||
row.plannedPaymentAmount = total;
|
||||
return total;
|
||||
};
|
||||
// 监听投资计划数据变化
|
||||
watch(() => formData.value.investmentProjects, (newValue) => {
|
||||
if (!year.value) return;
|
||||
@@ -1048,9 +1062,56 @@ const validateForm = async () => {
|
||||
return Promise.resolve(true);
|
||||
};
|
||||
const projectNameFn = (row: any) => {
|
||||
Object.assign(formData.value.entity, row);
|
||||
// 映射 API 返回的字段名到表单字段名
|
||||
const mappedData = {
|
||||
...row,
|
||||
// 资金相关字段映射
|
||||
ownedFunds: row.enterpriseOwnFunds ?? row.ownedFunds ?? '',
|
||||
financialFunds: row.governmentInvestmentFunds ?? row.financialFunds ?? '',
|
||||
externalRaisedCapital: row.externalRaisedFunds ?? row.externalRaisedCapital ?? '',
|
||||
otherFunds: row.otherFunds ?? '',
|
||||
// 计划投资年度信息映射
|
||||
planInvestmentYear: row.planInvestmentYear ?? '',
|
||||
planImageQuota: row.planImageQuota ?? '',
|
||||
planPaymentLimit: row.planPaymentLimit ?? '',
|
||||
governmentFundSourceDesc: row.governmentFundSourceDesc ?? '',
|
||||
otherFundSourceDesc: row.otherFundSourceDesc ?? '',
|
||||
// 主业相关字段映射
|
||||
isMainBusiness: row.isMainBusiness ?? '',
|
||||
mainBusinessTypes: row.mainBusinessTypes ?? '',
|
||||
mainBusinessCode: row.mainBusinessCode ?? '',
|
||||
// 项目信息字段映射
|
||||
projectInvestmentDirection: row.projectInvestmentDirection ?? '',
|
||||
investmentDirectionSegmentation: row.investmentDirectionSegmentation ?? '',
|
||||
isStrategicEmergingIndustries: row.isStrategicEmergingIndustries ?? '',
|
||||
urbanStrategy: row.urbanStrategy ?? '',
|
||||
isManufacturingIndustry: row.isManufacturingIndustry ?? '',
|
||||
majorInvestmentProjects: row.majorInvestmentProjects ?? '',
|
||||
// 决策信息字段映射
|
||||
decisionType: row.decisionType ?? '',
|
||||
isProjectApprovalCompleted: row.isProjectApprovalCompleted ?? '',
|
||||
projectApprovalFileNo: row.projectApprovalFileNo ?? '',
|
||||
projectApprovalFileInfo: row.projectApprovalFileInfo ?? '',
|
||||
isDecisionProcedureCompleted: row.isDecisionProcedureCompleted ?? '',
|
||||
decisionProcedureFileNo: row.decisionProcedureFileNo ?? '',
|
||||
decisionFileInfo: row.decisionFileInfo ?? '',
|
||||
// 其他字段映射
|
||||
projectDesc: row.projectDesc ?? '',
|
||||
progressDesc: row.progressDesc ?? '',
|
||||
shareholdingRatio: row.shareholdingRatio ?? '',
|
||||
isControllingStake: row.isControllingStake ?? '',
|
||||
};
|
||||
Object.assign(formData.value.entity, mappedData);
|
||||
visible.value = false;
|
||||
};
|
||||
const initYiJR = (data:any[]) => {
|
||||
if (data.length < 0){
|
||||
return []
|
||||
}
|
||||
// formData.entity.submitUnitOpinion
|
||||
return data.map(item => item.userVoList)
|
||||
}
|
||||
const userYj = ref<any[]>([]);
|
||||
const handleLibrarySelect = (row: any) => {
|
||||
Object.assign(formData.value.entity, {
|
||||
...row,
|
||||
@@ -1058,6 +1119,13 @@ const handleLibrarySelect = (row: any) => {
|
||||
parentId: row.id,
|
||||
projectPreliminaryPlanAttachment: row.projectPreliminaryPlanAttachment ? JSON.parse(row.projectPreliminaryPlanAttachment) : [],
|
||||
});
|
||||
// processInstanceId
|
||||
const id:string = row.processInstanceId;
|
||||
formatStartNodeShow({
|
||||
processInstanceId: id,
|
||||
}).then((res:any)=>{
|
||||
userYj.value = initYiJR(res.data)
|
||||
})
|
||||
librarySelectVisible.value = false;
|
||||
};
|
||||
defineExpose({
|
||||
@@ -1107,6 +1175,30 @@ const ProjectDirectionDetailsOptionsEnums = computed(() => {
|
||||
const handleProjectMainUnitChange = (value: any) => {
|
||||
formData.value.entity.deptId = value.id
|
||||
}
|
||||
const ziDian = computed(() => {
|
||||
if (formData.value.entity.investmentCategory === '1'){
|
||||
return [
|
||||
{ label: '新开工', value: '1' },
|
||||
{ label: '续建', value: '2' },
|
||||
{ label: '加快前期', value: '3' },
|
||||
]
|
||||
}
|
||||
if(formData.value.entity.investmentCategory === '2'){
|
||||
return [{ label: '新设', value: '4' },
|
||||
{ label: '续投', value: '5' },
|
||||
{ label: '完成', value: '6' },
|
||||
{ label: '储备', value: '7' },]
|
||||
}
|
||||
if (formData.value.entity.investmentCategory === '99'){
|
||||
return [
|
||||
{ label: '新增', value: '8' },
|
||||
{ label: '续投', value: '5' },
|
||||
{ label: '完成', value: '6' },
|
||||
{ label: '储备', value: '7' },
|
||||
]
|
||||
}
|
||||
return []
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,189 +1,231 @@
|
||||
<template>
|
||||
<div class="project-plan-apply-form border-r border-[#e5e7eb]">
|
||||
<FlowFormView :process-instance-id="processInstanceId"/>
|
||||
<FlowFormView :process-instance-id="processInstanceId" />
|
||||
<div style="display: flex;justify-content: space-between;align-items: center">
|
||||
<div class="form-section-title">
|
||||
{{ t('planApply.applySection.title') }}
|
||||
</div>
|
||||
<div class="page-title">{{ title ? title : '' }}</div>
|
||||
<div class="page-unit">
|
||||
{{ t('planApply.detail.unitLabel') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-section-title">
|
||||
{{ t('planApply.applySection.title') }}
|
||||
</div>
|
||||
<div class="page-title">{{ title ? title : '' }}</div>
|
||||
<div class="page-unit">
|
||||
{{ t('planApply.detail.unitLabel') }}
|
||||
</div>
|
||||
</div>
|
||||
<el-form :model="formData" label-width="165px" class="plan-form" :rules="rules" ref="useForm">
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('planApply.applySection.projectName')" required prop="entity.projectName">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.projectName')}}</span>
|
||||
</template>
|
||||
<span>{{formData.entity.projectName}}</span>
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.projectName') }}</span>
|
||||
</template>
|
||||
<span>{{ formData.entity.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('planApply.applySection.groupName')" required prop="entity.groupCompany">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.groupName')}}</span>
|
||||
</template>
|
||||
<span>{{formData.entity.groupCompany}}</span>
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.groupName') }}</span>
|
||||
</template>
|
||||
<span>{{ formData.entity.groupCompany }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.projectNature')">
|
||||
<span>{{projectNatureOptions.find((item:Enums) => item.value === formData.entity.projectNature)?.label}}</span>
|
||||
<span>{{projectNatureOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.projectNature)?.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('planApply.applySection.projectMainUnit')" required prop="entity.projectMainEntity">
|
||||
<span>{{formData.entity.projectMainEntity}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.projectMainUnit')" required
|
||||
prop="entity.projectMainEntity">
|
||||
<span>{{ formData.entity.projectMainEntity }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.projectOwnerUnit')">
|
||||
<span>{{formData.entity.projectOwnerUnit}}</span>
|
||||
<span>{{ formData.entity.projectOwnerUnit }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.investmentCategory')" required prop="entity.investmentCategory">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.investmentCategory')}}</span>
|
||||
</template>
|
||||
<span>{{investmentCategoryOptions.find((item:Enums) => item.value === formData.entity.investmentCategory)?.label}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.investmentCategory')" required
|
||||
prop="entity.investmentCategory">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.investmentCategory') }}</span>
|
||||
</template>
|
||||
<span>{{investmentCategoryOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.investmentCategory)?.label}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.investmentType')" required prop="entity.investmentArea">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.investmentType')}}</span>
|
||||
</template>
|
||||
<span>{{investmentAreaOptions.find((item:Enums) => item.value ===formData.entity.investmentArea)?.label}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.investmentType')" required
|
||||
prop="entity.investmentArea">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.investmentType') }}</span>
|
||||
</template>
|
||||
<span>{{investmentAreaOptions.find((item: Enums) => item.value
|
||||
=== formData.entity.investmentArea)?.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('planApply.applySection.projectAddress')" required prop="entity.projectAddress">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.projectAddress')}}</span>
|
||||
</template>
|
||||
<span>{{formData.entity.projectAddress}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.projectAddress')" required
|
||||
prop="entity.projectAddress">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.projectAddress') }}</span>
|
||||
</template>
|
||||
<span>{{ formData.entity.projectAddress }}</span>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.projectDetailAddress')" required prop="entity.projectAddressDetail">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.projectDetailAddress')}}</span>
|
||||
</template>
|
||||
<span>{{formData.entity.projectAddressDetail}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.projectDetailAddress')" required
|
||||
prop="entity.projectAddressDetail">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.projectDetailAddress') }}</span>
|
||||
</template>
|
||||
<span>{{ formData.entity.projectAddressDetail }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.projectDirection')" required prop="entity.projectInvestmentDirection">
|
||||
<span>{{formData.entity.projectInvestmentDirection}}</span>
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.projectDirection')" required
|
||||
prop="entity.projectInvestmentDirection">
|
||||
<span>{{ formData.entity.projectInvestmentDirection }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.directionSubdivision')" required prop="entity.investmentDirectionSegmentation">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('reserveRegistration.basicInfo.directionSubdivision')}}</span>
|
||||
</template>
|
||||
<span>{{projectDirectionDetailsOptions.find((item:Enums) => item.value ===formData.entity.investmentDirectionSegmentation)?.label}}</span>
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.directionSubdivision')" required
|
||||
prop="entity.investmentDirectionSegmentation">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('reserveRegistration.basicInfo.directionSubdivision') }}</span>
|
||||
</template>
|
||||
<span>{{projectDirectionDetailsOptions.find((item: Enums) => item.value
|
||||
=== formData.entity.investmentDirectionSegmentation)?.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('reserveRegistration.basicInfo.projectSource')" required prop="entity.projectSource">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('reserveRegistration.basicInfo.projectSource')}}</span>
|
||||
</template>
|
||||
<span>{{projectSourceOptions.find((item:Enums) => item.value === formData.entity.projectSource)?.label}}</span>
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.projectSource')" required
|
||||
prop="entity.projectSource">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('reserveRegistration.basicInfo.projectSource') }}</span>
|
||||
</template>
|
||||
<span>{{projectSourceOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.projectSource)?.label}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.constructionNature')" required prop="entity.constructionNature">
|
||||
<template #label>
|
||||
<span style="color: var(--el-text-color-regular)">{{t('planApply.applySection.constructionNature')}}</span>
|
||||
</template>
|
||||
<span>{{constructionNatureOptions.find((item:Enums) => item.value === formData.entity.constructionNature)?.label}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.constructionNature')" required
|
||||
prop="entity.constructionNature">
|
||||
<template #label>
|
||||
<span
|
||||
style="color: var(--el-text-color-regular)">{{ t('planApply.applySection.constructionNature') }}</span>
|
||||
</template>
|
||||
<span>{{constructionNatureOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.constructionNature)?.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('reserveRegistration.basicInfo.majorInvestmentProject')" required prop="entity.majorInvestmentProjects">
|
||||
<span>{{formData.entity.majorInvestmentProjects}}</span>
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.majorInvestmentProject')" required
|
||||
prop="entity.majorInvestmentProjects">
|
||||
<span>{{ formData.entity.majorInvestmentProjects }}</span>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.keyProject')" required prop="entity.keyProject">
|
||||
<span>{{projectImportantOptions.find((item:Enums) => item.value === formData.entity.keyProject)?.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('planApply.applySection.isWithinMainBusiness')" required prop="entity.isMainBusiness">
|
||||
<span>{{formData.entity.isMainBusiness == t('planApply.common.yes') ? t('planApply.common.yes') : t('planApply.common.no')}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.mainBusinessType')" :required="formData.entity.isMainBusiness === t('planApply.common.yes')" prop="entity.mainBusinessTypes">
|
||||
<span>{{mainBusinessOptions.find((item:Enums) => item.value === formData.entity.mainBusinessTypes)?.label}}</span>
|
||||
<span>{{projectImportantOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.keyProject)?.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('reserveRegistration.basicInfo.mainBusinessCode')" required prop="entity.mainBusinessCode">
|
||||
<span>{{formData.entity.mainBusinessTypes}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.isWithinMainBusiness')" required
|
||||
prop="entity.isMainBusiness">
|
||||
<span>{{ formData.entity.isMainBusiness == t('planApply.common.yes') ? t('planApply.common.yes')
|
||||
:
|
||||
t('planApply.common.no')}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.isManufacturing')" required prop="entity.isManufacturingIndustry">
|
||||
<span>{{formData.entity.isManufacturingIndustry == t('planApply.common.yes') ? t('planApply.common.yes') : t('planApply.common.no')}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')" required prop="entity.isStrategicEmergingIndustries">
|
||||
<span>{{strategicIndustryOptions.find((item:Enums) => item.value === formData.entity.isStrategicEmergingIndustries)?.label}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.cityStrategy')" required prop="entity.urbanStrategy">
|
||||
<span>{{cityStrategyOptions.find((item:Enums) => item.value === formData.entity.urbanStrategy)?.label}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.mainBusinessType')"
|
||||
:required="formData.entity.isMainBusiness === t('planApply.common.yes')"
|
||||
prop="entity.mainBusinessTypes">
|
||||
<span>{{mainBusinessOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.mainBusinessTypes)?.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('planApply.applySection.projectImplementationStart')" required prop="entity.projectStartTime">
|
||||
<span>{{formData.entity.projectStartTime}}</span>
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.mainBusinessCode')" required
|
||||
prop="entity.mainBusinessCode">
|
||||
<span>{{ formData.entity.mainBusinessTypes }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.projectImplementationEnd')" required prop="entity.projectEndTime">
|
||||
<span>{{formData.entity.projectEndTime}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.isManufacturing')" required
|
||||
prop="entity.isManufacturingIndustry">
|
||||
<span>{{ formData.entity.isManufacturingIndustry == t('planApply.common.yes') ?
|
||||
t('planApply.common.yes') :
|
||||
t('planApply.common.no')}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('reserveRegistration.basicInfo.strategicEmergingIndustry')" required
|
||||
prop="entity.isStrategicEmergingIndustries">
|
||||
<span>{{strategicIndustryOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.isStrategicEmergingIndustries)?.label}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.cityStrategy')" required
|
||||
prop="entity.urbanStrategy">
|
||||
<span>{{cityStrategyOptions.find((item: Enums) => item.value ===
|
||||
formData.entity.urbanStrategy)?.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('planApply.applySection.projectImplementationStart')" required
|
||||
prop="entity.projectStartTime">
|
||||
<span>{{ formData.entity.projectStartTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.applySection.projectImplementationEnd')" required
|
||||
prop="entity.projectEndTime">
|
||||
<span>{{ formData.entity.projectEndTime }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -194,15 +236,17 @@
|
||||
<div class="panel-title">{{ t('planApply.planInvestment.currentYearTotalTitle') }}</div>
|
||||
<div style="flex: 1;">
|
||||
<el-form-item style="height: 82px;" :label="t('planApply.planInvestment.planYear')">
|
||||
<span>{{formData.entity.planInvestmentYear}}</span>
|
||||
<span>{{ formData.entity.planInvestmentYear }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;" :label="t('planApply.planInvestment.plannedImageQuota')"
|
||||
required prop="entity.planImageQuota">
|
||||
<span>{{formData.entity.planImageQuota}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ formData.entity.planImageQuota }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;" :label="t('planApply.planInvestment.annualPlanPayment')"
|
||||
required prop="entity.planPaymentLimit">
|
||||
<span>{{formData.entity.planPaymentLimit}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ formData.entity.planPaymentLimit }}{{
|
||||
t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,24 +255,33 @@
|
||||
<div class="plan-investment-panel right-panel">
|
||||
<div class="panel-title">{{ t('planApply.planInvestment.currentYearFundingTitle') }}</div>
|
||||
<div style="flex: 1;">
|
||||
<el-form-item :label="t('planApply.investmentEstimate.capitalFunding')" required prop="entity.ownedFunds">
|
||||
<span>{{formData.entity.ownedFunds}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.capitalFunding')" required
|
||||
prop="entity.ownedFunds">
|
||||
<span>{{ formData.entity.ownedFunds }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.financialFunding')" required prop="entity.financialFunds">
|
||||
<span>{{formData.entity.financialFunds}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.financialFunding')" required
|
||||
prop="entity.financialFunds">
|
||||
<span>{{ formData.entity.financialFunds }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.externalRaisedFunds')" required prop="entity.externalRaisedCapital">
|
||||
<el-form-item :label="t('planApply.investmentEstimate.externalRaisedFunds')" required
|
||||
prop="entity.externalRaisedCapital">
|
||||
|
||||
<span>{{formData.entity.externalRaisedCapital}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ formData.entity.externalRaisedCapital }}{{
|
||||
t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.otherFunding')" required prop="entity.otherFunds">
|
||||
<span>{{formData.entity.otherFunds}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.otherFunding')" required
|
||||
prop="entity.otherFunds">
|
||||
<span>{{ formData.entity.otherFunds }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.financialFundingDescription')">
|
||||
<span>{{formData.entity.governmentFundSourceDesc}}</span>
|
||||
<span>{{ formData.entity.governmentFundSourceDesc }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.investmentEstimate.otherFundingDescription')">
|
||||
<span>{{formData.entity.otherFundSourceDesc}}</span>
|
||||
<span>{{ formData.entity.otherFundSourceDesc }}</span>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,8 +290,9 @@
|
||||
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('planApply.applySection.projectOverview')" required prop="entity.projectDesc">
|
||||
<span>{{formData.entity.projectDesc}}</span>
|
||||
<el-form-item :label="t('planApply.applySection.projectOverview')" required
|
||||
prop="entity.projectDesc">
|
||||
<span>{{ formData.entity.projectDesc }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -246,18 +300,19 @@
|
||||
<el-row class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('planApply.applySection.projectInitialPlan')">
|
||||
<span>{{formData.entity.projectPreliminaryPlan}}</span>
|
||||
<span>{{ formData.entity.projectPreliminaryPlan }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.headerForm.attachments')">
|
||||
<UploadFile :modelValue="formData.entity.projectPreliminaryPlanAttachment" :fileSize="20"
|
||||
type="simple" :limit="10" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('planApply.headerForm.attachments')">
|
||||
<UploadFile :modelValue="formData.entity.projectPreliminaryPlanAttachment" :fileSize="20" type="simple" :limit="10"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('planApply.applySection.remark')">
|
||||
<span>{{formData.entity.remark}}</span>
|
||||
<span>{{ formData.entity.remark }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -266,28 +321,35 @@
|
||||
<div class="form-section-title">{{ t('planApply.investmentStatus.title') }}</div>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.investmentStatus.totalInvestmentAmount')" required prop="entity.projectTotalAmount">
|
||||
<span>{{formData.entity.projectTotalAmount}}{{t('planApply.investmentEstimate.unitSuffix')}}</span>
|
||||
<el-form-item :label="t('planApply.investmentStatus.totalInvestmentAmount')" required
|
||||
prop="entity.projectTotalAmount">
|
||||
<span>{{ formData.entity.projectTotalAmount }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.investmentStatus.cumulativeInvestmentLastYear')" required prop="entity.lastYearCompleted">
|
||||
<span>{{formData.entity.lastYearCompleted}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<el-form-item :label="t('planApply.investmentStatus.cumulativeInvestmentLastYear')" required
|
||||
prop="entity.lastYearCompleted">
|
||||
<span>{{ formData.entity.lastYearCompleted }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.investmentStatus.ourTotalInvestmentAmount')" required prop="entity.ourInvestmentTotalAmount">
|
||||
<el-form-item :label="t('planApply.investmentStatus.ourTotalInvestmentAmount')" required
|
||||
prop="entity.ourInvestmentTotalAmount">
|
||||
|
||||
<span>{{formData.entity.ourInvestmentTotalAmount}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ formData.entity.ourInvestmentTotalAmount }}{{
|
||||
t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.investmentStatus.ourCumulativeInvestmentLastYear')" required prop="entity.ourLastYearCompleted">
|
||||
<el-form-item :label="t('planApply.investmentStatus.ourCumulativeInvestmentLastYear')" required
|
||||
prop="entity.ourLastYearCompleted">
|
||||
|
||||
<span>{{formData.entity.ourLastYearCompleted}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ formData.entity.ourLastYearCompleted }}{{ t('planApply.investmentEstimate.unitSuffix')
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -320,53 +382,53 @@
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.planYear')" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.plannedInvestmentYear}}</span>
|
||||
<span>{{ row.plannedInvestmentYear }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.plannedImageQuota')" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.plannedImageAmount}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ row.plannedImageAmount }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.annualPlanPayment')" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.plannedPaymentAmount}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ row.plannedPaymentAmount }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.fundingSources')" align="center">
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.capitalFunding')" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.selfFunding}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ row.selfFunding }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.externalRaisedFunds')"
|
||||
min-width="150">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.fiscalFunding}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ row.fiscalFunding }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.financialFunding')"
|
||||
min-width="140">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.fiscalFunding}}{{ t('planApply.investmentEstimate.unitSuffix') }} </span>
|
||||
<span>{{ row.fiscalFunding }}{{ t('planApply.investmentEstimate.unitSuffix') }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.otherFunding')" min-width="140">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.otherFunding}}{{ t('planApply.investmentEstimate.unitSuffix') }} </span>
|
||||
<span>{{ row.otherFunding }}{{ t('planApply.investmentEstimate.unitSuffix') }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.financialFundingDescription')"
|
||||
min-width="200">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.fiscalFundingSource}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
<span>{{ row.fiscalFundingSource }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('planApply.annualInvestmentInfo.table.otherFundingDescription')"
|
||||
min-width="200">
|
||||
<template #default="{ row }">
|
||||
<span>{{row.otherFundingSource}}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
<span>{{ row.otherFundingSource }}{{ t('planApply.investmentEstimate.unitSuffix') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -374,13 +436,14 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.decisionType')">
|
||||
<span>{{formData.entity.decisionType}}</span>
|
||||
<span>{{ formData.entity.decisionType }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.isCompleteEstablishmentProcedures')" required prop="entity.isProjectApprovalCompleted">
|
||||
<el-form-item :label="t('planApply.decisionInfo.isCompleteEstablishmentProcedures')" required
|
||||
prop="entity.isProjectApprovalCompleted">
|
||||
|
||||
<span>{{formData.entity.isProjectApprovalCompleted}}</span>
|
||||
<span>{{ formData.entity.isProjectApprovalCompleted }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -388,25 +451,26 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.establishmentDocumentNumber')">
|
||||
<span>{{formData.entity.projectApprovalFileNo}}</span>
|
||||
<span>{{ formData.entity.projectApprovalFileNo }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.establishmentDocumentInfo')">
|
||||
<span>{{formData.entity.projectApprovalFileInfo}}</span>
|
||||
<span>{{ formData.entity.projectApprovalFileInfo }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.isCompleteDecisionProcedures')" required prop="entity.isDecisionProcedureCompleted">
|
||||
<span>{{formData.entity.isDecisionProcedureCompleted}}</span>
|
||||
<el-form-item :label="t('planApply.decisionInfo.isCompleteDecisionProcedures')" required
|
||||
prop="entity.isDecisionProcedureCompleted">
|
||||
<span>{{ formData.entity.isDecisionProcedureCompleted }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('planApply.decisionInfo.decisionProgramDocumentNumber')">
|
||||
<span>{{formData.entity.decisionProcedureFileNo}}</span>
|
||||
<span>{{ formData.entity.decisionProcedureFileNo }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -414,7 +478,7 @@
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('planApply.decisionInfo.decisionDocumentInfo')">
|
||||
<span>{{formData.entity.decisionFileInfo}}</span>
|
||||
<span>{{ formData.entity.decisionFileInfo }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -425,32 +489,33 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import type { InvestmentProjects,ProjectPlanApplyFormData } from "../interface/types";
|
||||
import {projectNatureOptions,
|
||||
investmentAreaOptions,
|
||||
investmentCategoryOptions,
|
||||
projectDirectionDetailsOptions,
|
||||
projectSourceOptions,
|
||||
constructionNatureOptions,
|
||||
projectImportantOptions,
|
||||
mainBusinessOptions,
|
||||
strategicIndustryOptions,
|
||||
cityStrategyOptions, Enums
|
||||
import type { InvestmentProjects, ProjectPlanApplyFormData } from "../interface/types";
|
||||
import {
|
||||
projectNatureOptions,
|
||||
investmentAreaOptions,
|
||||
investmentCategoryOptions,
|
||||
projectDirectionDetailsOptions,
|
||||
projectSourceOptions,
|
||||
constructionNatureOptions,
|
||||
projectImportantOptions,
|
||||
mainBusinessOptions,
|
||||
strategicIndustryOptions,
|
||||
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<{
|
||||
modelValue?: ProjectPlanApplyFormData;
|
||||
rules?: FormRules;
|
||||
isEdit: boolean;
|
||||
title:string;
|
||||
processInstanceId: string;
|
||||
modelValue?: ProjectPlanApplyFormData;
|
||||
rules?: FormRules;
|
||||
isEdit?: boolean;
|
||||
title?: string;
|
||||
processInstanceId?: string;
|
||||
}>(), {
|
||||
isEdit: true,
|
||||
title:'',
|
||||
processInstanceId:''
|
||||
isEdit: true,
|
||||
title: '',
|
||||
processInstanceId: ''
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -523,6 +588,9 @@ const defaultForm: ProjectPlanApplyFormData = {
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: '',
|
||||
planImageQuota:'',
|
||||
status:0,
|
||||
deptId:0,
|
||||
processInstanceId:'',
|
||||
},
|
||||
investmentProjects: [
|
||||
{
|
||||
@@ -584,7 +652,7 @@ watch(
|
||||
() => props.modelValue,
|
||||
newVal => {
|
||||
Object.assign(formData.value, newVal || {});
|
||||
formData.value.entity.planInvestmentYear = String(newVal?.entity?.planInvestmentYear);
|
||||
formData.value.entity.planInvestmentYear = String(newVal?.entity?.planInvestmentYear);
|
||||
// 如果有数据且没有选中,默认选中第一行
|
||||
if (formData.value.investmentProjects.length > 0 && selectedAnnualInvestmentIndex.value === -1) {
|
||||
selectedAnnualInvestmentIndex.value = 0;
|
||||
@@ -594,7 +662,7 @@ watch(
|
||||
);
|
||||
|
||||
watch(
|
||||
()=> formData.value,
|
||||
() => formData.value,
|
||||
() => {
|
||||
emit('update:modelValue', { ...formData.value });
|
||||
},
|
||||
@@ -604,7 +672,7 @@ const validateForm = () => {
|
||||
return useForm.value?.validate();
|
||||
}
|
||||
defineExpose({
|
||||
validateForm: validateForm
|
||||
validateForm: validateForm
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<el-row class="page-title-row mb10">
|
||||
<div class="page-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,26 +12,14 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="t('progressReport.form.projectName')" required prop="projectName">
|
||||
<el-select v-model="formData.projectId"
|
||||
:placeholder="t('progressReport.form.selectPlaceholder')"
|
||||
@change="handelSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in projectNameData"
|
||||
:key="item.id"
|
||||
:label="item.projectName || ''"
|
||||
:value="item.id"
|
||||
/>
|
||||
:placeholder="t('progressReport.form.selectPlaceholder')" @change="handelSelectChange">
|
||||
<el-option v-for="item in projectNameData" :key="item.id" :label="item.projectName || ''"
|
||||
:value="item.id" />
|
||||
<template #footer>
|
||||
<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" />
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -40,24 +29,18 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.projectStatus')" required prop="projectStatus">
|
||||
<el-select v-model="formData.projectStatus"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in projectStatusOptions" :key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')" clearable>
|
||||
<el-option v-for="item in projectStatusOptions" :key="item.value" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.constructionStage')">
|
||||
<el-select v-model="formData.constructionStage"
|
||||
:placeholder="t('progressReport.form.selectPlaceholder')" clearable>
|
||||
<el-option v-for="item in constructionStageOptions" :key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
/>
|
||||
<el-option v-for="item in constructionStageOptions" :key="item.value" :value="item.value"
|
||||
:label="item.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -70,7 +53,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required prop="projectTotalAmount">
|
||||
<el-form-item :label="t('progressReport.form.totalInvestmentAmount')" required
|
||||
prop="projectTotalAmount">
|
||||
<el-input v-model="formData.projectTotalAmount"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
<template #append>{{ t('progressReport.form.unitSuffix') }}</template>
|
||||
@@ -80,7 +64,8 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="form-row">
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required prop="cumulativeInvestmentToDate">
|
||||
<el-form-item :label="t('progressReport.form.cumulativeInvestmentToMonthEnd')" required
|
||||
prop="cumulativeInvestmentToDate">
|
||||
<el-input v-model="formData.cumulativeInvestmentToDate"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
<template #append>{{ t('progressReport.form.unitSuffix') }}</template>
|
||||
@@ -90,7 +75,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item :label="t('progressReport.form.completionRate')" required prop="completionRate">
|
||||
<el-input v-model="formData.completionRate"
|
||||
:placeholder="t('progressReport.form.completionRatePlaceholder')">
|
||||
:placeholder="t('progressReport.form.completionRatePlaceholder')" disabled>
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -122,17 +107,20 @@
|
||||
<div style="flex: 1;">
|
||||
<el-form-item style="height: 82px;" :label="t('progressReport.form.reportYear')">
|
||||
<el-date-picker v-model="formData.annualReport" type="year" value-format="YYYY"
|
||||
:placeholder="t('progressReport.form.selectYearPlaceholder')" style="width: 100%" />
|
||||
:placeholder="t('progressReport.form.selectYearPlaceholder')" style="width: 100%"
|
||||
@change="handleYearChange" />
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.currentYearPlannedInvestment')" required prop="annualPlannedInvestment">
|
||||
:label="t('progressReport.form.currentYearPlannedInvestment')" required
|
||||
prop="annualPlannedInvestment">
|
||||
<el-input v-model="formData.annualPlannedInvestment"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')" disabled>
|
||||
<template #append>{{ t('progressReport.form.unitSuffix') }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required prop="ytdRemainingInvestment">
|
||||
:label="t('progressReport.form.enterpriseCumulativeInvestmentToMonthEnd')" required
|
||||
prop="ytdRemainingInvestment">
|
||||
<el-input v-model="formData.ytdRemainingInvestment"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
<template #append>{{ t('progressReport.form.unitSuffix') }}</template>
|
||||
@@ -141,7 +129,7 @@
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.investmentCompletionRate')">
|
||||
<el-input v-model="formData.investmentCompletionRate"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')" disabled>
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -154,7 +142,7 @@
|
||||
<div style="flex: 1;">
|
||||
<el-form-item style="height: 82px;" :label="t('progressReport.form.plannedPaymentAmount')">
|
||||
<el-input v-model="formData.plannedPayment"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')" disabled>
|
||||
<template #append>{{ t('progressReport.form.unitSuffix') }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -168,7 +156,7 @@
|
||||
<el-form-item style="height: 82px;"
|
||||
:label="t('progressReport.form.plannedAmountPaymentCompletionRate')">
|
||||
<el-input v-model="formData.investmentPlanCompletionRate"
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')">
|
||||
:placeholder="t('progressReport.form.inputPlaceholder')" disabled>
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -207,13 +195,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 :data="formData.supportingDocuments" @change="uploadChange" :fileSize="20"
|
||||
type="simple" :limit="10" :isShowTip="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -284,47 +267,58 @@ export interface ProjectProgressReportFormData {
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue?: InvestmentProjectProgress;
|
||||
rules?:FormRules;
|
||||
rules?: FormRules;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: InvestmentProjectProgress): void;
|
||||
}>();
|
||||
const useForm = ref<FormInstance | undefined>()
|
||||
|
||||
// 获取当前年份
|
||||
const currentYear = String(new Date().getFullYear());
|
||||
|
||||
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: currentYear, // 默认当前年度
|
||||
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: '',
|
||||
deptId: ''
|
||||
})
|
||||
const formData = reactive<InvestmentProjectProgress>({ ...defaultForm, ...props.modelValue });
|
||||
|
||||
// 确保汇报年度有默认值
|
||||
if (!formData.annualReport) {
|
||||
formData.annualReport = currentYear;
|
||||
}
|
||||
|
||||
const projectNameData = ref<ProjectPlanApplyFormItem[]>([]);
|
||||
// 获取当前日期作为汇报时间
|
||||
const reportTime = computed(() => {
|
||||
@@ -340,54 +334,244 @@ 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 totalPlannedPayment = ref<number>(0);
|
||||
|
||||
/**
|
||||
* 项目选择改变
|
||||
* @param {string | number} value - 选中的项目ID
|
||||
*/
|
||||
// 当前选中的项目
|
||||
const currentSelectedProject = ref<ProjectPlanApplyFormItem | null>(null);
|
||||
|
||||
/**
|
||||
* 项目选择改变
|
||||
* @param {string | number} value - 选中的项目ID
|
||||
*/
|
||||
const handelSelectChange = (value: string | number) => {
|
||||
// 根据选中的项目ID查找对应的项目信息
|
||||
const selectedProject = projectNameData.value.find(item =>
|
||||
item.id == value
|
||||
);
|
||||
// 如果找到了对应的项目,则更新实施单位字段
|
||||
if (selectedProject) {
|
||||
formData.implementingBody = selectedProject.projectMainEntity || selectedProject.projectOwnerUnit || '';
|
||||
formData.projectName = selectedProject.projectName || '';
|
||||
formData.deptId = selectedProject.deptId;
|
||||
}
|
||||
// 根据选中的项目ID查找对应的项目信息
|
||||
const selectedProject = projectNameData.value.find(item =>
|
||||
item.id == value
|
||||
);
|
||||
// 如果找到了对应的项目,则更新实施单位字段
|
||||
if (selectedProject) {
|
||||
currentSelectedProject.value = selectedProject;
|
||||
formData.implementingBody = selectedProject.projectMainEntity || selectedProject.projectOwnerUnit || '';
|
||||
formData.projectName = selectedProject.projectName || '';
|
||||
formData.deptId = String(selectedProject.deptId);
|
||||
|
||||
// 从项目中获取项目总投资金额
|
||||
const projectTotalAmount = selectedProject.projectTotalAmount || selectedProject.totalInvestment;
|
||||
if (projectTotalAmount) {
|
||||
formData.projectTotalAmount = Number(projectTotalAmount);
|
||||
}
|
||||
|
||||
// 计算项目总计划支付额(所有年度计划支付额度的和)
|
||||
const investmentEntities = selectedProject.projectInvestmentEntities || [];
|
||||
let totalPayment = 0;
|
||||
investmentEntities.forEach((entity: any) => {
|
||||
const paymentAmount = Number(entity.plannedPaymentAmount) || 0;
|
||||
totalPayment += paymentAmount;
|
||||
});
|
||||
totalPlannedPayment.value = totalPayment;
|
||||
|
||||
// 根据当前选中的年份更新本年度计划投资额和计划支付额
|
||||
updateAnnualPlanData(formData.annualReport as string, investmentEntities);
|
||||
|
||||
// 触发完成率计算
|
||||
calculateCompletionRates();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 年份变化处理
|
||||
* @param {string} year - 选中的年份
|
||||
*/
|
||||
const handleYearChange = (year: string) => {
|
||||
if (currentSelectedProject.value) {
|
||||
const investmentEntities = currentSelectedProject.value.projectInvestmentEntities || [];
|
||||
updateAnnualPlanData(year, investmentEntities);
|
||||
// 重新计算本年度完成率
|
||||
calculateAnnualCompletionRates();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新本年度计划投资额和计划支付额
|
||||
* @param {string} year - 年份
|
||||
* @param {any[]} investmentEntities - 投资计划实体列表
|
||||
*/
|
||||
const updateAnnualPlanData = (year: string, investmentEntities: any[]) => {
|
||||
// 查找当前年份对应的投资计划
|
||||
const currentYearPlan = investmentEntities.find((entity: any) =>
|
||||
entity.plannedInvestmentYear === year ||
|
||||
String(entity.plannedInvestmentYear) === year
|
||||
);
|
||||
|
||||
if (currentYearPlan) {
|
||||
// 设置本年度计划投资额
|
||||
formData.annualPlannedInvestment = Number(currentYearPlan.plannedImageAmount) || 0;
|
||||
// 设置本年度计划支付额
|
||||
formData.plannedPayment = Number(currentYearPlan.plannedPaymentAmount) || 0;
|
||||
} else {
|
||||
// 如果没有找到当前年份的计划,清空数据
|
||||
formData.annualPlannedInvestment = 0;
|
||||
formData.plannedPayment = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算总投资完成率和总支付完成率
|
||||
*/
|
||||
const calculateCompletionRates = () => {
|
||||
// 总投资完成率 = 项目开始截至本月末累计完成投资 / 项目总投资金额 * 100
|
||||
const cumulativeInvestment = Number(formData.cumulativeInvestmentToDate) || 0;
|
||||
const projectTotal = Number(formData.projectTotalAmount) || 0;
|
||||
|
||||
if (projectTotal > 0) {
|
||||
const rate = (cumulativeInvestment / projectTotal) * 100;
|
||||
formData.completionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.completionRate = 0;
|
||||
}
|
||||
|
||||
// 总支付完成率 = 项目开始截至本月末累计完成支付额 / 项目总计划支付额 * 100
|
||||
const cumulativePayment = Number(formData.cumulativePaymentToDate) || 0;
|
||||
const totalPayment = totalPlannedPayment.value || 0;
|
||||
|
||||
if (totalPayment > 0) {
|
||||
const rate = (cumulativePayment / totalPayment) * 100;
|
||||
formData.paymentCompletionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.paymentCompletionRate = 0;
|
||||
}
|
||||
|
||||
// 同时计算本年度完成率
|
||||
calculateAnnualCompletionRates();
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算本年度投资完成率和支付完成率
|
||||
*/
|
||||
const calculateAnnualCompletionRates = () => {
|
||||
// 本年度投资完成率 = 本企业本年度截至本月末完成投资 / 本年度计划投资额 * 100
|
||||
const ytdInvestment = Number(formData.ytdRemainingInvestment) || 0;
|
||||
const annualPlannedInvestment = Number(formData.annualPlannedInvestment) || 0;
|
||||
|
||||
if (annualPlannedInvestment > 0) {
|
||||
const rate = (ytdInvestment / annualPlannedInvestment) * 100;
|
||||
formData.investmentCompletionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.investmentCompletionRate = 0;
|
||||
}
|
||||
|
||||
// 本年度支付完成率 = 本企业本年度支付完成额 / 本年度计划支付额 * 100
|
||||
const actualPayment = Number(formData.actualPayment) || 0;
|
||||
const plannedPayment = Number(formData.plannedPayment) || 0;
|
||||
|
||||
if (plannedPayment > 0) {
|
||||
const rate = (actualPayment / plannedPayment) * 100;
|
||||
formData.investmentPlanCompletionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.investmentPlanCompletionRate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 监听累计完成投资和项目总投资金额变化,自动计算总投资完成率
|
||||
watch(
|
||||
[() => formData.cumulativeInvestmentToDate, () => formData.projectTotalAmount],
|
||||
() => {
|
||||
const cumulativeInvestment = Number(formData.cumulativeInvestmentToDate) || 0;
|
||||
const projectTotal = Number(formData.projectTotalAmount) || 0;
|
||||
|
||||
if (projectTotal > 0) {
|
||||
const rate = (cumulativeInvestment / projectTotal) * 100;
|
||||
formData.completionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.completionRate = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 监听累计完成支付额变化,自动计算总支付完成率(可编辑,仅作为默认值)
|
||||
watch(
|
||||
() => formData.cumulativePaymentToDate,
|
||||
() => {
|
||||
const cumulativePayment = Number(formData.cumulativePaymentToDate) || 0;
|
||||
const totalPayment = totalPlannedPayment.value || 0;
|
||||
|
||||
if (totalPayment > 0) {
|
||||
const rate = (cumulativePayment / totalPayment) * 100;
|
||||
formData.paymentCompletionRate = Number(rate.toFixed(2));
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 监听本年度完成投资额变化,自动计算本年度投资完成率
|
||||
watch(
|
||||
() => formData.ytdRemainingInvestment,
|
||||
() => {
|
||||
const ytdInvestment = Number(formData.ytdRemainingInvestment) || 0;
|
||||
const annualPlannedInvestment = Number(formData.annualPlannedInvestment) || 0;
|
||||
|
||||
if (annualPlannedInvestment > 0) {
|
||||
const rate = (ytdInvestment / annualPlannedInvestment) * 100;
|
||||
formData.investmentCompletionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.investmentCompletionRate = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// 监听本年度完成支付额变化,自动计算本年度支付完成率
|
||||
watch(
|
||||
() => formData.actualPayment,
|
||||
() => {
|
||||
const actualPayment = Number(formData.actualPayment) || 0;
|
||||
const plannedPayment = Number(formData.plannedPayment) || 0;
|
||||
|
||||
if (plannedPayment > 0) {
|
||||
const rate = (actualPayment / plannedPayment) * 100;
|
||||
formData.investmentPlanCompletionRate = Number(rate.toFixed(2));
|
||||
} else {
|
||||
formData.investmentPlanCompletionRate = 0;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 页码大小改变
|
||||
* @param {number} pageSize - 新的页码大小
|
||||
* */
|
||||
const handlePageSizeChange = (pageSize: number) => {
|
||||
queryForm.size = pageSize;
|
||||
getProjectNameList();
|
||||
queryForm.size = pageSize;
|
||||
getProjectNameList();
|
||||
}
|
||||
/**
|
||||
* 页码改变
|
||||
* @param {number} page - 新的页码
|
||||
* */
|
||||
const handlePageChange = (page: number) => {
|
||||
queryForm.page = page;
|
||||
getProjectNameList();
|
||||
queryForm.page = page;
|
||||
getProjectNameList();
|
||||
}
|
||||
|
||||
// 监听 formData 变化,同步到父组件
|
||||
watch(
|
||||
formData,
|
||||
(newVal) => {
|
||||
console.log(newVal);
|
||||
console.log(newVal);
|
||||
emit('update:modelValue', { ...newVal });
|
||||
},
|
||||
{ deep: true }
|
||||
@@ -398,30 +582,34 @@ watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString()
|
||||
if (typeof newVal.annualReport === 'number') newVal.annualReport = newVal.annualReport.toString()
|
||||
Object.assign(formData, defaultForm, newVal);
|
||||
}
|
||||
// 确保汇报年度有默认值
|
||||
if (!formData.annualReport) {
|
||||
formData.annualReport = currentYear;
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
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
|
||||
}
|
||||
})
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -435,9 +623,12 @@ defineExpose({
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
bottom: 20px;
|
||||
|
||||
}
|
||||
|
||||
.page-report-time {
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
<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 || '[]') || []"
|
||||
<uploadFile :modelValue="parseSupportingDocuments(formData.supportingDocuments)"
|
||||
@change="uploadChange" :fileSize="20" type="simple" :limit="10" :isShowTip="false" disabled>
|
||||
</uploadFile>
|
||||
</el-form-item>
|
||||
@@ -161,7 +161,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') :
|
||||
<span>{{ formData.isFinalApplication === 1 ? t('progressReport.form.yes') :
|
||||
t('progressReport.form.no') }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -252,6 +252,7 @@ const defaultForm = reactive<InvestmentProjectProgress>({
|
||||
delFlag: '',
|
||||
processInstanceId: '',
|
||||
status: '',
|
||||
deptId: '',
|
||||
})
|
||||
const formData = reactive<InvestmentProjectProgress>({ ...defaultForm, ...props.modelValue });
|
||||
const projectNameData = ref<ProjectPlanApplyFormItem[]>([]);
|
||||
@@ -279,20 +280,33 @@ const getProjectNameList = async () => {
|
||||
}
|
||||
}
|
||||
getProjectNameList();
|
||||
|
||||
/**
|
||||
* 解析 supportingDocuments,处理可能是字符串或数组的情况
|
||||
*/
|
||||
const parseSupportingDocuments = (value: string | { name: string; url: string }[] | undefined): { name: string; url: string }[] => {
|
||||
if (!value) return [];
|
||||
if (Array.isArray(value)) return value;
|
||||
try {
|
||||
return JSON.parse(value) || [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 初始化图片
|
||||
* */
|
||||
const uploadChange = (_: any, data: any[]) => {
|
||||
if (!data || Object.prototype.toString.call(data) !== '[object Array]' || data.length === 0) {
|
||||
formData.supportingDocuments = [];
|
||||
formData.supportingDocuments = '[]';
|
||||
return;
|
||||
}
|
||||
formData.supportingDocuments = data.map((item: any) => {
|
||||
formData.supportingDocuments = JSON.stringify(data.map((item: any) => {
|
||||
return {
|
||||
name: item.name,
|
||||
url: item.url
|
||||
}
|
||||
})
|
||||
}));
|
||||
}
|
||||
// 监听 formData 变化,同步到父组件
|
||||
watch(
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<el-row :gutter="20" class="instruction-grid">
|
||||
<el-col v-for="field in instructionFields" :key="field.key" :span="field.span || 8">
|
||||
<el-form-item :label="field.label" label-width="80px">
|
||||
<el-input maxlength="255" v-model="instructionForm[field.key]" :placeholder="t('mixedRegister.placeholder.input')" />
|
||||
<el-input maxlength="255" v-model="instructionForm[field.key]"
|
||||
:placeholder="t('mixedRegister.placeholder.input')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -24,26 +25,14 @@
|
||||
<el-col v-for="field in basicInfoFields" :key="field.key" :span="field.span || 12" class="mb-4">
|
||||
<el-form-item :label="field.label">
|
||||
<!-- 日期时间选择器 -->
|
||||
<el-date-picker
|
||||
v-if="field.type && ['date', 'datetime'].includes(field.type)"
|
||||
v-model="basicInfoForm[field.key]"
|
||||
:type="field.type"
|
||||
:placeholder="t('mixedRegister.placeholder.select')"
|
||||
v-bind="field.fieldProps"
|
||||
/>
|
||||
<el-date-picker v-if="field.type && ['date', 'datetime', 'year'].includes(field.type)"
|
||||
v-model="basicInfoForm[field.key]" :type="field.type"
|
||||
:placeholder="t('mixedRegister.placeholder.select')" v-bind="field.fieldProps" />
|
||||
<!-- 选择器 -->
|
||||
<el-select
|
||||
v-else-if="field.type === 'select'"
|
||||
v-model="basicInfoForm[field.key]"
|
||||
:placeholder="t('mixedRegister.placeholder.select')"
|
||||
v-bind="field.fieldProps"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of field.fieldProps?.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
<el-select v-else-if="field.type === 'select'" v-model="basicInfoForm[field.key]"
|
||||
:placeholder="t('mixedRegister.placeholder.select')" v-bind="field.fieldProps">
|
||||
<el-option v-for="item of field.fieldProps?.options" :key="item.value"
|
||||
:label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<div class="partner-name-cell w-full" v-else-if="isUpdate && field.key === 'projectName'">
|
||||
<el-input v-model="basicInfoForm.projectName" maxlength="255"
|
||||
@@ -53,7 +42,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 +58,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 +66,7 @@ type FieldConfig = {
|
||||
label: string;
|
||||
span?: number;
|
||||
type?: string;
|
||||
fieldProps?: any;
|
||||
fieldProps?: any; length?: number;
|
||||
};
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -101,7 +91,7 @@ const handleLibrarySelect = (row: any) => {
|
||||
librarySelectVisible.value = false
|
||||
}
|
||||
|
||||
const formRef = ref<FormInstance|null>(null)
|
||||
const formRef = ref<FormInstance | null>(null)
|
||||
const validate = async () => {
|
||||
const isValid = await formRef.value?.validate()
|
||||
if (isValid) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="task-management">
|
||||
<div class="task-header">
|
||||
<el-tabs v-model="activeTab" @tab-change="handleTabChange">
|
||||
<el-tab-pane :label="t('workbench.task.pendingReview') + ` (${pendingCount})`" name="pending"
|
||||
<el-tab-pane :label="t('workbench.task.pendingReview') + ` (${pendingTotal})`" name="pending"
|
||||
class="task-tab-pane">
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="t('workbench.task.saved')" name="saved"></el-tab-pane>
|
||||
@@ -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,6 +48,8 @@ const emit = defineEmits<{
|
||||
const activeTab = ref('pending');
|
||||
const tableData = ref<any[]>([]);
|
||||
const loading = ref(false);
|
||||
|
||||
const pendingTotal = ref(0);
|
||||
/**
|
||||
* 根据任务名称判断类型
|
||||
* @param name 任务名称
|
||||
@@ -77,7 +81,7 @@ const getTaskType = (name: string): string => {
|
||||
const getApprovalRoute = (type: string, taskId: string): string => {
|
||||
const routeMap: Record<string, string> = {
|
||||
investment: '/invMid/planApplyExamine/index', // 投资申报审批
|
||||
expert: '/workbench/expertApproval/index', // 专家登记审批
|
||||
expert: '/investment/expertApplyExamine/index', // 专家信息登记审批
|
||||
reserve: '/workbench/reserveApproval/index', // 投资储备审批
|
||||
cooperation: '/workbench/cooperationApproval/index', // 合作单位审批
|
||||
default: '/workbench/approvalDetail', // 默认审批详情页
|
||||
@@ -105,18 +109,18 @@ const handleRowClick = (row: any) => {
|
||||
},
|
||||
});
|
||||
};
|
||||
const getQueryMineTask = () =>{
|
||||
return new Promise((resolve, reject) =>{
|
||||
const getQueryMineTask = (): Promise<any> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
queryMineTask({
|
||||
title: '',
|
||||
processName: '',
|
||||
taskTime: undefined,
|
||||
flowType: '',
|
||||
size:5,
|
||||
size: 5,
|
||||
current: 1
|
||||
}).then(res=>{
|
||||
}).then(res => {
|
||||
resolve(res)
|
||||
}).catch(err=>{
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
@@ -142,8 +146,9 @@ const loadData = async (tab: string) => {
|
||||
let res;
|
||||
loading.value = true;
|
||||
if (tab === 'pending') {
|
||||
const response = await getQueryMineTask()
|
||||
const response = await getQueryMineTask()
|
||||
res = response?.data?.records
|
||||
pendingTotal.value = response?.data?.total || 0
|
||||
}
|
||||
if (tab === 'myInitiated') {
|
||||
const response = await getQueryMineStarted()
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
{{ 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>
|
||||
发起审批
|
||||
<!-- 发起审批-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -508,7 +508,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 +532,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;
|
||||
|
||||
@@ -415,6 +415,6 @@ export const yesOrNo:Enums[] = [
|
||||
* 级别
|
||||
* */
|
||||
export const level:Enums[] = [
|
||||
{label:'一级',value:'1'},
|
||||
{label:'二级',value:'2'},
|
||||
{label:'一级',value:'national'},
|
||||
{label:'二级',value:'provincial'},
|
||||
]
|
||||
@@ -31,6 +31,20 @@ export default {
|
||||
confirmB: 'Confirm',
|
||||
cancelB: 'Cancel',
|
||||
selectText: 'Select',
|
||||
// Added missing translations
|
||||
operateFail: 'Operation failed',
|
||||
operateSuccess: 'Operation successful',
|
||||
success: 'Success',
|
||||
noDataText: 'No data',
|
||||
exportOkText: 'Export task submitted',
|
||||
backBtn: 'Back',
|
||||
saveBtn: 'Save',
|
||||
closeBtn: 'Close',
|
||||
submitBtn: 'Submit',
|
||||
deleteMessage: {
|
||||
confirm: 'Are you sure you want to delete the selected data?',
|
||||
success: 'Delete successful',
|
||||
},
|
||||
},
|
||||
message: {
|
||||
box: {
|
||||
|
||||
@@ -29,7 +29,21 @@ export default {
|
||||
isRequired: '必填项',
|
||||
confirmB: '确认',
|
||||
cancelB: '取消',
|
||||
selectText: '选择'
|
||||
selectText: '选择',
|
||||
// 新增缺失的翻译
|
||||
operateFail: '操作失败',
|
||||
operateSuccess: '操作成功',
|
||||
success: '成功',
|
||||
noDataText: '暂无数据',
|
||||
exportOkText: '导出任务已提交',
|
||||
backBtn: '返回',
|
||||
saveBtn: '保存',
|
||||
closeBtn: '关闭',
|
||||
submitBtn: '提交',
|
||||
deleteMessage: {
|
||||
confirm: '确定删除选中数据吗?',
|
||||
success: '删除成功',
|
||||
},
|
||||
},
|
||||
message: {
|
||||
box: {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="layout-navbars-breadcrumb-user pr15" :style="{ flex: layoutUserFlexNum }">
|
||||
<el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
|
||||
<!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
|
||||
<div class="layout-navbars-breadcrumb-user-icon">
|
||||
<i class="iconfont" :class="state.disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('user.title1')"></i>
|
||||
</div>
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-dropdown-item command="en" :disabled="state.disabledI18n === 'en'">English</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown> -->
|
||||
<div class="layout-navbars-breadcrumb-user-icon" @click="onLockClick">
|
||||
<el-icon :title="$t('layout.threeLockScreenTime')">
|
||||
<ele-Lock />
|
||||
@@ -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>
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'element-plus/dist/index.css';
|
||||
* @param flowId
|
||||
* @returns 流程实例ID或错误
|
||||
*/
|
||||
const handleUserSelection = (process: any, params: any,flowId:string): Promise<{ processInstanceId: string }> => {
|
||||
const handleUserSelection = (process: any, params: any, flowId: string): Promise<{ processInstanceId: string }> => {
|
||||
if (!params.paramMap) params.paramMap = {};
|
||||
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
@@ -25,10 +25,10 @@ const handleUserSelection = (process: any, params: any,flowId:string): Promise<{
|
||||
let isResolved = false;
|
||||
|
||||
// 将 timeout 声明移到函数开头
|
||||
let timeout:any;
|
||||
let timeout: any;
|
||||
|
||||
// 动态导入组件
|
||||
const {default: EmployeesDialog} = await import("/@/components/OrgSelector/employeesDialog.vue");
|
||||
const { default: EmployeesDialog } = await import("/@/components/OrgSelector/employeesDialog.vue");
|
||||
|
||||
// 创建应用实例
|
||||
const app = createApp({
|
||||
@@ -40,8 +40,8 @@ const handleUserSelection = (process: any, params: any,flowId:string): Promise<{
|
||||
setTimeout(async () => {
|
||||
destroy();
|
||||
try {
|
||||
const res = await startProcessDirectly(flowId, params);
|
||||
resolve(res);
|
||||
const res = await startProcessDirectly(flowId, params);
|
||||
resolve(res);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ const handleUserSelection = (process: any, params: any,flowId:string): Promise<{
|
||||
* @param params 流程参数
|
||||
* @returns 流程实例ID或错误
|
||||
*/
|
||||
export const flowFn = async (flowIdKey: string, params: { paramMap?: Record<string, any>, startUserId?: string, processInstanceId?: string }): Promise<{ processInstanceId: string } | Error> => {
|
||||
export const flowFn = async (flowIdKey: string, params: { paramMap?: Record<string, any>, startUserId?: string, processInstanceId?: string }): Promise<{ processInstanceId: string }> => {
|
||||
const flowStore = useGlobalFlowStore();
|
||||
|
||||
try {
|
||||
@@ -117,7 +117,7 @@ export const flowFn = async (flowIdKey: string, params: { paramMap?: Record<stri
|
||||
|
||||
// 3. 检查是否是"发起人自选"节点
|
||||
if (process.childNode.placeHolder === '发起人自选') {
|
||||
return await handleUserSelection(process, params,flowId);
|
||||
return await handleUserSelection(process, params, flowId);
|
||||
}
|
||||
|
||||
// 4. 直接启动流程
|
||||
@@ -163,7 +163,7 @@ const startProcessDirectly = async (
|
||||
flowId: string,
|
||||
params: { paramMap?: Record<string, any>, startUserId?: string, processInstanceId?: string }
|
||||
): Promise<{ processInstanceId: string }> => {
|
||||
if (!params.paramMap){
|
||||
if (!params.paramMap) {
|
||||
params.paramMap = {};
|
||||
}
|
||||
const res = await startFlow({ flowId, ...params });
|
||||
|
||||
@@ -255,11 +255,11 @@ export function verifyPasswordPowerful(val: string) {
|
||||
export function verifyPasswordStrength(val: string) {
|
||||
let v = '0';
|
||||
// 弱:纯数字,纯字母,纯特殊字符
|
||||
if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.*]+){6,100}$/.test(val)) v = '1';
|
||||
if (/^(?:\d+|[a-zA-Z]+|[!@#$%^&\.\*_]+){6,100}$/.test(val)) v = '1';
|
||||
// 中:字母+数字,字母+特殊字符,数字+特殊字符
|
||||
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,100}$/.test(val)) v = '2';
|
||||
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.\*_]+$)[a-zA-Z\d!@#$%^&\.\*_]{6,100}$/.test(val)) v = '2';
|
||||
// 强:字母+数字+特殊字符
|
||||
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.*]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.*]+$)(?![\d!@#$%^&\.*]+$)[a-zA-Z\d!@#$%^&\.*]{6,100}$/.test(val))
|
||||
if (/^(?![a-zA-z]+$)(?!\d+$)(?![!@#$%^&\.\*_]+$)(?![a-zA-z\d]+$)(?![a-zA-z!@#$%^&\.\*_]+$)(?![\d!@#$%^&\.\*_]+$)[a-zA-Z\d!@#$%^&\.\*_]{6,100}$/.test(val))
|
||||
v = '3';
|
||||
// 返回结果
|
||||
return v;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item :label="$t('sysuser.role')" prop="role">
|
||||
<el-select clearable placeholder="请选择角色" v-model="dataForm.roleId">
|
||||
<el-select clearable placeholder="请选择角色" v-model="dataForm.role" :multiple="true">
|
||||
<el-option :key="item.roleId" :label="item.roleName" :value="item.roleId" v-for="item in roleData" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button v-auth="'sys_user_add'" icon="folder-add" type="primary" @click="userDialogRef.openDialog()">
|
||||
{{ $t('common.addBtn') }}
|
||||
@@ -68,7 +68,7 @@
|
||||
style="float: right"
|
||||
/>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
:data="state.dataList"
|
||||
@@ -111,7 +111,7 @@
|
||||
{{ $t('common.editBtn') }}
|
||||
</el-button>
|
||||
<!-- 删除用户 -->
|
||||
<el-tooltip :content="$t('sysuser.deleteDisabledTip')" :disabled="scope.row.userId !== '1'" placement="top">
|
||||
<!-- <el-tooltip :content="$t('sysuser.deleteDisabledTip')" :disabled="scope.row.userId !== '1'" placement="top">
|
||||
<span style="margin-left: 12px">
|
||||
<el-button
|
||||
icon="delete"
|
||||
@@ -123,7 +123,7 @@
|
||||
>{{ $t('common.delBtn') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
</el-tooltip> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -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>
|
||||
@@ -65,7 +65,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="原密码" prop="password">
|
||||
<el-input v-model="passwordFormData.password" :type="showPassword ? 'text' : 'password'" placeholder="请输入密码" clearable type="password">
|
||||
<el-input v-model="passwordFormData.password" :type="showPassword ? 'text' : 'password'" placeholder="请输入密码" clearable>
|
||||
<template #suffix>
|
||||
<i
|
||||
class="iconfont el-input__icon login-content-password"
|
||||
@@ -102,7 +102,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="第三方账号">
|
||||
<!-- <el-tab-pane label="第三方账号">
|
||||
<template #label>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M7.864 4.243A7.5 7.5 0 0 1 19.5 10.5c0 2.92-.556 5.709-1.568 8.268M5.742 6.364A7.465 7.465 0 0 0 4.5 10.5a7.464 7.464 0 0 1-1.15 3.993m1.989 3.559A11.209 11.209 0 0 0 8.25 10.5a3.75 3.75 0 1 1 7.5 0c0 .527-.021 1.049-.064 1.565M12 10.5a14.94 14.94 0 0 1-3.6 9.75m6.633-4.596a18.666 18.666 0 0 1-2.485 5.33" />
|
||||
@@ -126,7 +126,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
</template>
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -7,17 +7,12 @@
|
||||
|
||||
<!-- Steps Navigation -->
|
||||
<div class="flex-2 text-center max-w-[600px]">
|
||||
<span
|
||||
v-for="(step, index) in steps"
|
||||
:key="index"
|
||||
class="inline-block px-5 py-2.5 cursor-pointer"
|
||||
<span v-for="(step, index) in steps" :key="index" class="inline-block px-5 py-2.5 cursor-pointer"
|
||||
:class="{ 'border-b-2 border-primary text-primary': activeStep === index }"
|
||||
@click="activeStep = index"
|
||||
>
|
||||
@click="activeStep = index">
|
||||
<span
|
||||
class="mr-1.5 inline-block w-6 h-6 text-base font-normal text-center leading-[22px] border rounded-full"
|
||||
:class="[activeStep === index ? 'bg-primary text-white' : 'border-current']"
|
||||
>
|
||||
:class="[activeStep === index ? 'bg-primary text-white' : 'border-current']">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<span class="text-lg font-medium">{{ $t(step.title) }}</span>
|
||||
@@ -33,32 +28,32 @@
|
||||
<!-- 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>
|
||||
|
||||
<div class="text-center">
|
||||
<!-- Success Result -->
|
||||
<el-result v-if="validateFlowStep === 3" icon="success" :title="$t('flow.checkSuccess')" :sub-title="$t('flow.checkSubSuccess')">
|
||||
<el-result v-if="validateFlowStep === 3" icon="success" :title="$t('flow.checkSuccess')"
|
||||
:sub-title="$t('flow.checkSubSuccess')">
|
||||
<template #extra>
|
||||
<el-button type="primary" :loading="isSubmitting" @click="submitFlow">{{ $t('flow.submit') }}</el-button>
|
||||
<el-button type="primary" :loading="isSubmitting" @click="submitFlow">{{ $t('flow.submit')
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-result>
|
||||
|
||||
<!-- Loading Result -->
|
||||
<el-result
|
||||
v-if="validateErrMsg.length === 0 && validateDialogShow && validatingShow && validateFlowStep < 3"
|
||||
:title="$t('flow.checkIng')"
|
||||
:sub-title="$t('flow.checkSubIng')"
|
||||
>
|
||||
:title="$t('flow.checkIng')" :sub-title="$t('flow.checkSubIng')">
|
||||
<template #icon>
|
||||
<span class="inline-block w-25 h-25" v-loading="true"></span>
|
||||
</template>
|
||||
@@ -68,7 +63,9 @@
|
||||
<el-result v-if="validateErrMsg.length > 0" icon="error" title="检查失败">
|
||||
<template #sub-title>
|
||||
<div v-for="item in validateErrMsg" :key="item" class="text-red-500">
|
||||
<el-icon><WarnTriangleFilled /></el-icon>
|
||||
<el-icon>
|
||||
<WarnTriangleFilled />
|
||||
</el-icon>
|
||||
{{ item }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -97,7 +94,7 @@ const step1Ref = ref();
|
||||
const step2Ref = ref();
|
||||
const step3Ref = ref();
|
||||
|
||||
const validateErrMsg = ref([]);
|
||||
const validateErrMsg = ref<string[]>([]);
|
||||
|
||||
const activeStep = ref(0);
|
||||
const validateFlowStep = ref(0);
|
||||
@@ -109,7 +106,7 @@ const gotoEdit = () => {
|
||||
activeStep.value = validateFlowStep.value;
|
||||
validateDialogShow.value = false;
|
||||
};
|
||||
const publish = (t) => {
|
||||
const publish = (_t?: Event) => {
|
||||
validateErrMsg.value = [];
|
||||
|
||||
validateFlowStep.value = 0;
|
||||
@@ -176,12 +173,12 @@ let step3NodeConfig = reactive({});
|
||||
var paramGroupId = ref();
|
||||
|
||||
const checkStep1 = () => {
|
||||
step1Ref.value.validate(function (valid, arr) {
|
||||
step1Ref.value.validate(function (valid: boolean, arr: string[]) {
|
||||
if (valid) {
|
||||
validateFlowStep.value = 1;
|
||||
|
||||
setTimeout(function () {
|
||||
checkStep2();
|
||||
checkStep3();
|
||||
}, 500);
|
||||
} else {
|
||||
validatingShow.value = false;
|
||||
@@ -191,7 +188,7 @@ const checkStep1 = () => {
|
||||
});
|
||||
};
|
||||
const checkStep2 = () => {
|
||||
step2Ref.value.validate(function (valid, arr) {
|
||||
step2Ref.value.validate(function (valid: boolean, arr: string[]) {
|
||||
if (valid) {
|
||||
setTimeout(function () {
|
||||
validateFlowStep.value = 2;
|
||||
@@ -207,7 +204,7 @@ const checkStep2 = () => {
|
||||
|
||||
const checkStep3 = () => {
|
||||
setTimeout(function () {
|
||||
step3Ref.value.validate(function (valid, arr) {
|
||||
step3Ref.value.validate(function (valid: boolean, arr: string[]) {
|
||||
if (valid) {
|
||||
validateFlowStep.value = 3;
|
||||
} else {
|
||||
@@ -251,5 +248,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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
v-model="visible"
|
||||
:append-to-body="true"
|
||||
title="审批人设置"
|
||||
:show-close="false"
|
||||
:size="550"
|
||||
:before-close="saveApprover"
|
||||
@open="openEvent"
|
||||
>
|
||||
<el-drawer v-model="visible" :append-to-body="true" title="审批人设置" :show-close="false" :size="550"
|
||||
:before-close="saveApprover" @open="openEvent">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="设置审批人">
|
||||
<el-radio-group v-model="approverConfig.assignedType" class="ml-4" @change="assignedTypeChangeEvent">
|
||||
@@ -26,23 +19,28 @@
|
||||
<template v-if="approverConfig.assignedType === 3">
|
||||
<h4>选择角色</h4>
|
||||
|
||||
<select-show v-model:orgList="approverConfig.nodeUserList" type="role" :multiple="true"></select-show>
|
||||
<select-show v-model:orgList="approverConfig.nodeUserList" type="role"
|
||||
:multiple="true"></select-show>
|
||||
</template>
|
||||
<template v-if="approverConfig.assignedType === 1">
|
||||
<h4>选择成员</h4>
|
||||
|
||||
<select-show v-model:orgList="approverConfig.nodeUserList" type="user" :multiple="true"></select-show>
|
||||
<select-show v-model:orgList="approverConfig.nodeUserList" type="user"
|
||||
:multiple="true"></select-show>
|
||||
</template>
|
||||
<template v-if="approverConfig.assignedType === 8">
|
||||
<h4>人员控件</h4>
|
||||
<el-select v-model="approverConfig.formUserId" clearable class="m-2" placeholder="请选择审批表单" size="large">
|
||||
<el-option v-for="item in step2FormUserList" :key="item.field" :label="item.title" :value="item.field" />
|
||||
<el-select v-model="approverConfig.formUserId" clearable class="m-2" placeholder="请选择审批表单"
|
||||
size="large">
|
||||
<el-option v-for="item in step2FormUserList" :key="item.field" :label="item.title"
|
||||
:value="item.field" />
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-if="approverConfig.assignedType === 7">
|
||||
<h4>审批终点</h4>
|
||||
<span style="margin-right: 5px; font-size: 14px">到第</span>
|
||||
<el-input-number v-model="approverConfig.deptLeaderLevel" :step="1" :min="1" :max="20" step-strictly size="small" />
|
||||
<el-input-number v-model="approverConfig.deptLeaderLevel" :step="1" :min="1" :max="20" step-strictly
|
||||
size="small" />
|
||||
<span style="margin-left: 5px; font-size: 14px">级部门主管终止</span>
|
||||
</template>
|
||||
<template v-if="approverConfig.assignedType === 4">
|
||||
@@ -52,17 +50,15 @@
|
||||
<el-radio :label="true" size="large">多选</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<template
|
||||
v-if="
|
||||
((approverConfig.multiple === true && approverConfig.assignedType === 4) ||
|
||||
(approverConfig.assignedType === 1 && approverConfig.nodeUserList.length > 1) ||
|
||||
approverConfig.assignedType === 2 ||
|
||||
approverConfig.assignedType === 3 ||
|
||||
(approverConfig.assignedType === 7 && approverConfig.deptLeaderLevel > 1) ||
|
||||
(approverConfig.assignedType === 8 && isMultiUserForm(approverConfig.formUserId))) &&
|
||||
approverConfig.assignedType !== 5
|
||||
"
|
||||
>
|
||||
<template v-if="
|
||||
((approverConfig.multiple === true && approverConfig.assignedType === 4) ||
|
||||
(approverConfig.assignedType === 1 && approverConfig.nodeUserList.length > 1) ||
|
||||
approverConfig.assignedType === 2 ||
|
||||
approverConfig.assignedType === 3 ||
|
||||
(approverConfig.assignedType === 7 && (approverConfig.deptLeaderLevel ?? 0) > 1) ||
|
||||
(approverConfig.assignedType === 8 && isMultiUserForm(approverConfig.formUserId))) &&
|
||||
![5, 6].includes(approverConfig.assignedType ?? 0)
|
||||
">
|
||||
<h4>多人审批时采用的审批方式</h4>
|
||||
<el-radio-group v-model="approverConfig.multipleMode" class="ml-4">
|
||||
<p style="display: block; width: 100%">
|
||||
@@ -79,19 +75,16 @@
|
||||
<el-divider />
|
||||
|
||||
<h4>审批人为空时</h4>
|
||||
<el-radio-group v-model="approverConfig.nobody.handler" class="ml-4">
|
||||
<el-radio-group v-model="approverConfig.nobody!.handler" class="ml-4">
|
||||
<el-radio label="TO_PASS" size="large">自动通过</el-radio>
|
||||
<el-radio label="TO_REFUSE" size="large">自动拒绝</el-radio>
|
||||
<el-radio label="TO_END" size="large">自动结束</el-radio>
|
||||
<el-radio label="TO_ADMIN" size="large">转交给管理员</el-radio>
|
||||
<el-radio label="TO_USER" size="large">指定人员</el-radio>
|
||||
</el-radio-group>
|
||||
<select-show
|
||||
v-if="approverConfig?.nobody.handler === 'TO_USER'"
|
||||
v-model:orgList="approverConfig.nobody.assignedUser"
|
||||
type="user"
|
||||
:multiple="false"
|
||||
></select-show>
|
||||
<select-show v-if="approverConfig.nobody?.handler === 'TO_USER'"
|
||||
v-model:orgList="approverConfig.nobody!.assignedUser" type="user"
|
||||
:multiple="approverConfig.assignedType === 4 ? (approverConfig.multiple ?? false) : false"></select-show>
|
||||
|
||||
<el-divider />
|
||||
|
||||
@@ -101,12 +94,8 @@
|
||||
<el-radio label="TO_END" size="large">直接结束流程</el-radio>
|
||||
<el-radio label="TO_NODE" size="large" v-if="rejectNodeList.length > 0">驳回到指定节点</el-radio>
|
||||
</el-radio-group>
|
||||
<el-select
|
||||
v-if="approverConfig.refuse.handler === 'TO_NODE' && rejectNodeList.length > 0"
|
||||
v-model="approverConfig.refuse.nodeId"
|
||||
placeholder="驳回节点"
|
||||
class="mb-2 w-1/2"
|
||||
>
|
||||
<el-select v-if="approverConfig.refuse.handler === 'TO_NODE' && rejectNodeList.length > 0"
|
||||
v-model="approverConfig.refuse.nodeId" placeholder="驳回节点" class="mb-2 w-1/2">
|
||||
<el-option v-for="item in rejectNodeList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
@@ -121,7 +110,9 @@
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
// @ts-ignore
|
||||
import { setTypes } from '../../utils/const';
|
||||
// @ts-ignore
|
||||
import { useStore } from '../../stores/index';
|
||||
import { useFlowStore } from '../../stores/flow';
|
||||
import FormPerm from './components/formPerm.vue';
|
||||
@@ -130,6 +121,37 @@ import selectShow from '/@/components/OrgSelector/index.vue';
|
||||
import { validateNull } from '/@/utils/validate';
|
||||
import other from '/@/utils/other';
|
||||
import { processFormItemsWithPerms } from '/@/views/flow/workflow/utils/formPermissions';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
|
||||
// 定义 ApproverConfig 接口
|
||||
interface NodeUser {
|
||||
id: string | number;
|
||||
name: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
interface ApproverConfig {
|
||||
id?: string;
|
||||
assignedType?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
||||
nodeUserList: NodeUser[];
|
||||
formUserId?: string;
|
||||
formUserName?: string;
|
||||
deptLeaderLevel?: number;
|
||||
multiple?: boolean;
|
||||
multipleMode?: number;
|
||||
nobody?: {
|
||||
handler: string;
|
||||
assignedUser: NodeUser[];
|
||||
};
|
||||
refuse?: {
|
||||
handler: string;
|
||||
nodeId?: string;
|
||||
};
|
||||
formPerms?: Record<string, string>;
|
||||
eventConfig?: any;
|
||||
operList?: { checked: boolean }[];
|
||||
error?: boolean;
|
||||
}
|
||||
|
||||
let flowStore = useFlowStore();
|
||||
|
||||
@@ -141,14 +163,14 @@ const processFormPermissions = () => {
|
||||
|
||||
// 驳回节点列表
|
||||
const rejectNodeList = computed(() => {
|
||||
let values = [];
|
||||
let values: { id: string; name: string }[] = [];
|
||||
const excType = [1];
|
||||
const arr = {};
|
||||
const obj = {};
|
||||
const arr: Record<string, any[]> = {};
|
||||
const obj: Record<string, any> = {};
|
||||
|
||||
produceSerialNodeList(undefined, flowStore.step3, arr, obj, true);
|
||||
|
||||
const k = arr[approverConfig.value.id];
|
||||
const k = approverConfig.value.id ? arr[approverConfig.value.id] : undefined;
|
||||
|
||||
if (k == undefined) {
|
||||
return [];
|
||||
@@ -163,7 +185,7 @@ const rejectNodeList = computed(() => {
|
||||
return values;
|
||||
});
|
||||
|
||||
function produceSerialNodeList(parentId, process, nodeArr, nodeObj, noBranch) {
|
||||
function produceSerialNodeList(parentId: any, process: any, nodeArr: Record<string, any[]>, nodeObj: Record<string, any>, noBranch: boolean) {
|
||||
if (validateNull(process?.id)) {
|
||||
return;
|
||||
}
|
||||
@@ -181,7 +203,7 @@ function produceSerialNodeList(parentId, process, nodeArr, nodeObj, noBranch) {
|
||||
if ((parentType == 5 || parentType == 8) && !noBranch) {
|
||||
nodeArr[nodeId] = [];
|
||||
} else {
|
||||
const arr1 = other.deepClone(p);
|
||||
const arr1 = other.deepClone(p) as any[];
|
||||
arr1.push(nodeId);
|
||||
nodeArr[nodeId] = arr1;
|
||||
}
|
||||
@@ -211,7 +233,7 @@ const step2FormList = computed(() => {
|
||||
});
|
||||
|
||||
const step2FormUserList = computed(() => {
|
||||
return step2FormList.value.filter((res) => res.type === 'OrgSelector' && res.props?.type === 'user');
|
||||
return step2FormList.value.filter((res: any) => res.type === 'OrgSelector' && res.props?.type === 'user');
|
||||
});
|
||||
|
||||
const openEvent = () => {
|
||||
@@ -232,7 +254,7 @@ const openEvent = () => {
|
||||
// 这里可以进一步使用处理后的表单项
|
||||
};
|
||||
|
||||
let approverConfig = ref({});
|
||||
let approverConfig = ref<ApproverConfig>({ nodeUserList: [] });
|
||||
|
||||
let store = useStore();
|
||||
let { setApproverConfig, setApprover } = store;
|
||||
@@ -250,18 +272,18 @@ watch(approverConfigData, (val) => {
|
||||
approverConfig.value = val.value;
|
||||
});
|
||||
//用户表单是否是多选
|
||||
const isMultiUserForm = (id) => {
|
||||
const isMultiUserForm = (id: any) => {
|
||||
if (!id) {
|
||||
return false;
|
||||
}
|
||||
return step2FormUserList.value.filter((res) => res.id === id)[0]?.props.multiple;
|
||||
return step2FormUserList.value.filter((res: any) => res.id === id)[0]?.props.multiple;
|
||||
};
|
||||
//监听用户选择表单值变化
|
||||
watch(
|
||||
() => approverConfig.value.formUserId,
|
||||
(val) => {
|
||||
if (val) {
|
||||
approverConfig.value.formUserName = step2FormUserList.value.filter((res) => res.field === val)[0].field;
|
||||
approverConfig.value.formUserName = step2FormUserList.value.filter((res: any) => res.field === val)[0].field;
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -284,13 +306,13 @@ const closeDrawer = () => {
|
||||
setApprover(false);
|
||||
};
|
||||
|
||||
const checkApproval = (nodeConfig) => {
|
||||
const checkApproval = (nodeConfig: ApproverConfig) => {
|
||||
if (nodeConfig.assignedType == 1 || nodeConfig.assignedType == 3) {
|
||||
//指定成员
|
||||
if (nodeConfig.nodeUserList.length == 0) {
|
||||
return false;
|
||||
}
|
||||
} else if (nodeConfig.assignedType == 8 && nodeConfig.formUserId.length == 0) {
|
||||
} else if (nodeConfig.assignedType == 8 && (nodeConfig.formUserId?.length ?? 0) == 0) {
|
||||
//表单
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,27 +8,34 @@
|
||||
<main class="h5-body">
|
||||
<div class="card">
|
||||
<p class="lead">这是一个简单的移动端页面示例。</p>
|
||||
<p>{{code}}</p>
|
||||
<ul>
|
||||
<li>独立路由:/h5</li>
|
||||
<li>演示子页面:/h5/demo</li>
|
||||
{{ logStr }}
|
||||
<li>请求数据:{{JSON.stringify(resDat)}}</li>
|
||||
<li>登录数据:{{res}}</li>
|
||||
</ul>
|
||||
<div id="ww_login" class="w-[200px] h-[200px] border"></div>
|
||||
<el-button type="primary" size="large"><router-link to="/h5/demo">前往 H5 Demo</router-link></el-button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 桌面提示,仅在较宽屏幕下显示 -->
|
||||
<div class="desktop-warning">请用手机或缩小浏览器窗口预览移动端效果</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import {loginWx} from "/@/api/h5/expert";
|
||||
// import * as ww from '@wecom/jssdk'
|
||||
|
||||
const route = useRoute()
|
||||
const logStr = ref('')
|
||||
|
||||
const code = ref('')
|
||||
const res = ref('')
|
||||
const resDat = ref<any>({})
|
||||
onMounted(() => {
|
||||
// alert(ww.SDK_VERSION)
|
||||
// 初始化登录组件
|
||||
@@ -62,6 +69,19 @@ onMounted(() => {
|
||||
// } catch (e) {
|
||||
// logStr.value = JSON.stringify(e)
|
||||
// }
|
||||
console.log('code',window.location)
|
||||
code.value = <string>route.query.code
|
||||
if (code.value){
|
||||
resDat.value = {
|
||||
code:code.value,
|
||||
grant_type: 'wechat_work',
|
||||
}
|
||||
loginWx(code.value).then(res => {
|
||||
res.value = res
|
||||
}).catch(err => {
|
||||
res.value = err
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -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 || '失败');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -513,6 +513,9 @@ const createEmptyDetail = (): ProjectPlanApplyFormData => ({
|
||||
submitUnitLeadershipOpinion: '',
|
||||
submitUnitMainLeadershipOpinion: '',
|
||||
planImageQuota:'',
|
||||
deptId:0,
|
||||
status:0,
|
||||
processInstanceId:'',
|
||||
},
|
||||
investmentProjects: [
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
@@ -356,6 +356,8 @@ watch(()=>tmpId.value,async ()=>{
|
||||
const saveTemplateLoading = ref<boolean>(false);
|
||||
// 处理保存模板事件
|
||||
const handleSaveTemplate = async () => {
|
||||
const valid = await headerFormRef.value?.validate();
|
||||
if (!valid) return;
|
||||
if (saveTemplateLoading.value) return;
|
||||
try {
|
||||
const isUpdate = props.isUpdate;
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<el-button icon="Document" @click="handleSaveDraft" :loading="saveLoading">
|
||||
{{ t('planApply.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate" :loading="folderLoading">
|
||||
{{ t('planApply.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate" :loading="saveTemplateLoading">
|
||||
{{ t('planApply.actions.saveTemplate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -46,15 +46,17 @@
|
||||
|
||||
<ProjectPlanApplyForm v-model="formData" :rules="formDataRules" ref="formDataRef"
|
||||
:is-update="props.isUpdate" />
|
||||
<templateTable/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import {computed, reactive, ref, watch} from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import {
|
||||
getInvestmentProjectsPlanByTemplateId,
|
||||
investmentProjectsPlanAdd, investmentProjectsPlanGetById,
|
||||
investmentProjectsPlanUserDeptBelong
|
||||
} from '/@/api/investment/investmentManagement';
|
||||
@@ -62,11 +64,16 @@ import ProjectPlanApplyForm from '/@/components/investment/common/ProjectPlanApp
|
||||
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 { useRoute,useRouter } from 'vue-router';
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
|
||||
import templateTable from "/@/components/templetTableComom/index.vue";
|
||||
import {templateStore} from "/@/stores/template"
|
||||
import {getPropertyRightsByIdAPI} from "/@/api/workbench/miOwLibr/ownershipCreate";
|
||||
import {addTemplate} from "/@/api/common";
|
||||
const temp = templateStore();
|
||||
const tempId = computed(()=>temp.temp_id)
|
||||
const props = defineProps({
|
||||
isUpdate: {
|
||||
type: Boolean,
|
||||
@@ -76,6 +83,7 @@ const props = defineProps({
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const submitLoading = ref(false);
|
||||
const headerForm = reactive<{ title: string, description: string, attachments: any[] | string }>({
|
||||
title: '',
|
||||
@@ -292,13 +300,14 @@ const handleInitiateApproval = async () => {
|
||||
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) : ''
|
||||
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment
|
||||
}
|
||||
}
|
||||
investmentProjectsPlanAdd(params)
|
||||
.then(() => {
|
||||
submitLoading.value = false;
|
||||
message.success(t('planApply.messages.initiateApproval'));
|
||||
router.push('/flow/task/started')
|
||||
})
|
||||
.catch((err: any) => {
|
||||
submitLoading.value = false;
|
||||
@@ -322,14 +331,14 @@ const handleSaveDraft = async () => {
|
||||
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
|
||||
formData.value.entity.status = 0
|
||||
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) : ''
|
||||
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment
|
||||
},
|
||||
temporaryStorage: {
|
||||
title: headerForm.title,
|
||||
@@ -349,13 +358,56 @@ const handleSaveDraft = async () => {
|
||||
console.log(error, 'error');
|
||||
}
|
||||
};
|
||||
|
||||
const folderLoading = ref(false);
|
||||
watch(()=>tempId.value,()=>{
|
||||
getInvestmentProjectsPlanByTemplateId(tempId.value).then(data => {
|
||||
Object.assign(formData, data.data);
|
||||
})
|
||||
})
|
||||
const handleLoadTemplate = () => {
|
||||
message.info(t('planApply.messages.loadTemplate'));
|
||||
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
};
|
||||
const saveTemplateLoading = ref(false);
|
||||
const handleSaveTemplate = async () => {
|
||||
// addTemplate()
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) return;
|
||||
|
||||
const handleSaveTemplate = () => {
|
||||
message.info(t('planApply.messages.saveTemplate'));
|
||||
const valid = await formDataRef.value?.validateForm().catch(() => false);
|
||||
if (!valid) return;
|
||||
saveTemplateLoading.value = true;
|
||||
try {
|
||||
const flowName = props.isUpdate ? 'investmentPlanUpdates' : 'investmentPlanRegistration';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
const templateId = await addTemplate({templateName:headerForm.title,
|
||||
templateType:flowNameObj.value,})
|
||||
formData.value.entity.projectPreliminaryPlanAttachment = JSON.stringify(formData.value.entity.projectPreliminaryPlanAttachment);
|
||||
formData.value.entity.status = 0
|
||||
Object.assign(formData.value.entity, { flowType: flowNameObj.value,templateId })
|
||||
const params = {
|
||||
...formData.value,
|
||||
entity: {
|
||||
...formData.value.entity,
|
||||
attachments: formData.value.entity.attachments ? JSON.stringify(formData.value.entity.attachments) : '',
|
||||
projectPreliminaryPlanAttachment: formData.value.entity.projectPreliminaryPlanAttachment
|
||||
},
|
||||
}
|
||||
investmentProjectsPlanAdd(params)
|
||||
.then(() => {
|
||||
saveLoading.value = false;
|
||||
message.success('保存代发成功');
|
||||
})
|
||||
.catch((err: any) => {
|
||||
saveLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
}catch (error) {
|
||||
console.log(error, 'error');
|
||||
}finally {
|
||||
saveTemplateLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleViewWorkflow = () => {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval">
|
||||
{{ t('progressReport.actions.initiateApproval') }}
|
||||
</el-button>
|
||||
<el-button icon="Document" @click="handleSaveDraft">
|
||||
<el-button icon="Document" @click="handleSaveDraft" :loading="saveLoading">
|
||||
{{ t('progressReport.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate" :loading="templateLoading">
|
||||
{{ t('progressReport.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
@@ -45,26 +45,34 @@
|
||||
</el-row>
|
||||
|
||||
<ProjectProgressReportForm v-model="formData" :rules="formDataRef" ref="formRef" />
|
||||
<templateTable/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import templateTable from "/@/components/templetTableComom/index.vue"
|
||||
import {computed, reactive, ref, watch} from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import ProjectProgressReportForm from '/@/components/investment/common/ProjectProgressReportForm.vue';
|
||||
import { InvestmentProjectProgress } from '/@/views/invMid/progressReport/interface/type';
|
||||
import { FormRules } from 'element-plus';
|
||||
import {
|
||||
addInvestmentProjectsProgressAPI,
|
||||
addInvestmentProjectsProgressAPI, getInvestmentProjectsProgressByTemplateIdAPI,
|
||||
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 {templateStore} from "/@/stores/template"
|
||||
import {useRouter} from "vue-router";
|
||||
import {addTemplate} from "/@/api/common";
|
||||
import {getPropertyRightsByIdAPI} from "/@/api/workbench/miOwLibr/ownershipCreate";
|
||||
|
||||
const router = useRouter();
|
||||
const temp = templateStore();
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
@@ -171,6 +179,7 @@ const handleInitiateApproval = async () => {
|
||||
valid.processInstanceId = processInstanceId;
|
||||
valid.supportingDocuments = JSON.stringify(valid.supportingDocuments);
|
||||
valid.status = 1;
|
||||
valid.flowType = flowNameObj.value
|
||||
await addInvestmentProjectsProgressAPI(valid).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).finally(() => {
|
||||
@@ -183,17 +192,94 @@ const handleInitiateApproval = async () => {
|
||||
submitLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSaveDraft = () => {
|
||||
message.info(t('progressReport.messages.saveDraft'));
|
||||
const saveLoading = ref(false)
|
||||
const handleSaveDraft = async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
const valid = await formRef.value?.validate();
|
||||
submitLoading.value = true;
|
||||
headerForm.attachments = JSON.stringify(headerForm.attachments);
|
||||
const processInstanceId = '';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments: headerForm.attachments,
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
valid.processInstanceId = processInstanceId;
|
||||
valid.supportingDocuments = JSON.stringify(valid.supportingDocuments);
|
||||
valid.status = 0;
|
||||
valid.flowType = flowNameObj.value
|
||||
valid.temporaryStorage={
|
||||
businessType:flowNameObj.value,
|
||||
title: headerForm.title,
|
||||
}
|
||||
await addInvestmentProjectsProgressAPI(valid).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).finally(() => {
|
||||
saveLoading.value = false;
|
||||
}).catch((err: any) => {
|
||||
saveLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
} catch (error) {
|
||||
saveLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleLoadTemplate = () => {
|
||||
message.info(t('progressReport.messages.loadTemplate'));
|
||||
const templateLoading = ref(false)
|
||||
const tempId = computed(()=>temp.temp_id)
|
||||
const handleLoadTemplate = async () => {
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0]
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
};
|
||||
|
||||
const handleSaveTemplate = () => {
|
||||
message.info(t('progressReport.messages.saveTemplate'));
|
||||
watch(()=>tempId.value,()=>{
|
||||
getInvestmentProjectsProgressByTemplateIdAPI(tempId.value).then(data => {
|
||||
Object.assign(formData, data.data);
|
||||
})
|
||||
})
|
||||
const handleSaveTemplate = () => async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
const valid = await formRef.value?.validate();
|
||||
templateLoading.value = true;
|
||||
headerForm.attachments = JSON.stringify(headerForm.attachments);
|
||||
const processInstanceId = '';
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'projectProgressDeclaration')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments: headerForm.attachments,
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
const {data: templateId} = await addTemplate({
|
||||
templateName:headerForm.title,
|
||||
templateType:flowNameObj.value,
|
||||
})
|
||||
valid.processInstanceId = processInstanceId;
|
||||
valid.supportingDocuments = JSON.stringify(valid.supportingDocuments);
|
||||
valid.status = 0;
|
||||
valid.flowType = flowNameObj.value
|
||||
valid.templateId = templateId
|
||||
await addInvestmentProjectsProgressAPI(valid).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).finally(() => {
|
||||
templateLoading.value = false;
|
||||
}).catch((err: any) => {
|
||||
templateLoading.value = false;
|
||||
message.error(err.msg);
|
||||
});
|
||||
} catch (error) {
|
||||
templateLoading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleViewWorkflow = () => {
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<el-button type="primary" icon="Check" @click="handleInitiateApproval" :loading="submitLoading">
|
||||
{{ t('projectExitFeedback.actions.initiateApproval') }}
|
||||
</el-button>
|
||||
<el-button icon="Document" @click="handleSaveDraft">
|
||||
<el-button icon="Document" @click="handleSaveDraft" :loading="saveLoading">
|
||||
{{ t('projectExitFeedback.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
{{ t('projectExitFeedback.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate" :loading="saveTemplateLoading">
|
||||
{{ t('projectExitFeedback.actions.saveTemplate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -44,25 +44,33 @@
|
||||
</el-row>
|
||||
|
||||
<ProjectExitFeedbackForm v-model="formData" />
|
||||
<templateTable/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import {computed, reactive, ref, watch} 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 {addProjectExitPlanFeedback, getProjectExitPlanFeedbackByTemplateId} from "/@/api/investment/projectExitPlan";
|
||||
import { ProjectTask } from "/@/views/invMid/projectExitPlan/interface/type";
|
||||
import UploadFile from "/@/components/Upload/index.vue";
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from "/@/api/flow/flow";
|
||||
import { flowNameOptions } from "/@/hooks/enums";
|
||||
import templateTable from "/@/components/templetTableComom/index.vue"
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
import {templateStore} from "/@/stores/template"
|
||||
import {useRouter} from "vue-router";
|
||||
import {getPropertyRightsByIdAPI} from "/@/api/workbench/miOwLibr/ownershipCreate";
|
||||
import {addTemplate} from "/@/api/common";
|
||||
|
||||
const temp = templateStore()
|
||||
const router = useRouter()
|
||||
const headerFormRef = ref<any>();
|
||||
const headerFormRules = {
|
||||
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
|
||||
@@ -127,17 +135,84 @@ const handleInitiateApproval = async () => {
|
||||
submitLoading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const handleSaveDraft = () => {
|
||||
message.info(t('projectExitFeedback.messages.saveDraft'));
|
||||
const saveLoading = ref(false);
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitFeedback')[0]
|
||||
const handleSaveDraft = async () => {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
if (!formData.value.projectId) {
|
||||
message.error('项目名称必填');
|
||||
return
|
||||
}
|
||||
saveLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const { processInstanceId } = { processInstanceId: ''};
|
||||
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,temporaryStorage:{
|
||||
businessType:flowNameObj.value,
|
||||
title: headerForm.title,
|
||||
} } as ProjectTask;
|
||||
addProjectExitPlanFeedback(params).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
message.error(err.msg);
|
||||
}).finally(() => {
|
||||
saveLoading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const tempId = computed(()=>temp.temp_id)
|
||||
const handleLoadTemplate = () => {
|
||||
message.info(t('projectExitFeedback.messages.loadTemplate'));
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
};
|
||||
|
||||
const handleSaveTemplate = () => {
|
||||
message.info(t('projectExitFeedback.messages.saveTemplate'));
|
||||
watch(()=>tempId.value,()=>{
|
||||
getProjectExitPlanFeedbackByTemplateId(tempId.value).then(data => {
|
||||
Object.assign(formData, data.data);
|
||||
})
|
||||
})
|
||||
const saveTemplateLoading = ref(false);
|
||||
const handleSaveTemplate = async() => {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
if (!formData.value.projectId) {
|
||||
message.error('项目名称必填');
|
||||
return
|
||||
}
|
||||
saveTemplateLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const { processInstanceId } = { processInstanceId: ''};
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments,
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
const {data: templateId} = await addTemplate({
|
||||
templateName:headerForm.title,
|
||||
templateType:flowNameObj.value,
|
||||
})
|
||||
formData.value.processInstanceId = processInstanceId;
|
||||
const exitAttachment = JSON.stringify(formData.value.exitAttachment);
|
||||
const params = { ...formData.value, exitAttachment,templateId} as ProjectTask;
|
||||
addProjectExitPlanFeedback(params).then(() => {
|
||||
message.success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
message.error(err.msg);
|
||||
}).finally(() => {
|
||||
saveTemplateLoading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
const handleViewWorkflow = () => {
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<el-button type="primary" icon="Check" :loading="submitLoading" @click="handleInitiateApproval">
|
||||
{{ t('projectExitPlan.actions.initiateApproval') }}
|
||||
</el-button>
|
||||
<el-button icon="Document" @click="handleSaveDraft">
|
||||
<el-button icon="Document" @click="handleSaveDraft" :loading="saveLoading">
|
||||
{{ t('projectExitPlan.actions.saveDraft') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderOpened" @click="handleLoadTemplate">
|
||||
{{ t('projectExitPlan.actions.loadTemplate') }}
|
||||
</el-button>
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate">
|
||||
<el-button icon="FolderAdd" @click="handleSaveTemplate" :loading="saveTemplateLoading">
|
||||
{{ t('projectExitPlan.actions.saveTemplate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -45,26 +45,35 @@
|
||||
|
||||
<ProjectExitPlanForm v-model="formData" :rules="rules" ref="formDataRef" />
|
||||
</div>
|
||||
<templateTable/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import {computed, reactive, ref, watch} from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
|
||||
import type { ProjectTask } from '/@/views/invMid/projectExitPlan/interface/type';
|
||||
import ProjectExitPlanForm from '/@/components/investment/common/ProjectExitPlanForm.vue';
|
||||
import { FormRules } from 'element-plus';
|
||||
import { addProjectExitPlan } from '/@/api/investment/projectExitPlan';
|
||||
import {addProjectExitPlan, getProjectExitPlanByTemplateId} 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 {addTemplate} from "/@/api/common";
|
||||
import {getPropertyRightsByIdAPI} from "/@/api/workbench/miOwLibr/ownershipCreate";
|
||||
const formDataRef = ref<HTMLFormElement | null>()
|
||||
import templateTable from "/@/components/templetTableComom/index.vue"
|
||||
import {templateStore} from "/@/stores/template"
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
|
||||
const temp = templateStore()
|
||||
const router = useRouter()
|
||||
const headerFormRef = ref<any>();
|
||||
const headerFormRules = {
|
||||
title: [{ required: true, message: '标题必填', trigger: ['blur', 'change'] }]
|
||||
@@ -131,6 +140,7 @@ const handleInitiateApproval = async () => {
|
||||
formData.value.processInstanceId = processInstanceId;
|
||||
addProjectExitPlan(formData.value).then((res: any) => {
|
||||
useMessage().success(t('common.success'));
|
||||
router.push('/flow/task/started')
|
||||
}).catch((err: any) => {
|
||||
useMessage().error(err.msg);
|
||||
}).finally(() => {
|
||||
@@ -142,17 +152,90 @@ 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?.validateRef();
|
||||
if (!valid) return;
|
||||
saveLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments,
|
||||
processInstanceId:'',
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
formData.value.processInstanceId = '';
|
||||
Object.assign(formData.value,{status:0,temporaryStorage:{
|
||||
businessType:flowNameObj.value,
|
||||
title: headerForm.title,
|
||||
}})
|
||||
addProjectExitPlan(formData.value).then(() => {
|
||||
useMessage().success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
useMessage().error(err.msg);
|
||||
}).finally(() => {
|
||||
saveLoading.value = false;
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
saveLoading.value = false;
|
||||
}
|
||||
|
||||
const handleSaveDraft = () => {
|
||||
message.info(t('projectExitPlan.messages.saveDraft'));
|
||||
};
|
||||
|
||||
const tempId = computed(()=>temp.temp_id)
|
||||
watch(()=>tempId.value,()=>{
|
||||
getProjectExitPlanByTemplateId(tempId.value).then(data => {
|
||||
Object.assign(formData, data.data);
|
||||
})
|
||||
})
|
||||
const handleLoadTemplate = () => {
|
||||
message.info(t('projectExitPlan.messages.loadTemplate'));
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0]
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
};
|
||||
const saveTemplateLoading = ref<boolean>(false);
|
||||
const handleSaveTemplate = async () => {
|
||||
try {
|
||||
const headerValid = await headerFormRef.value?.validate().catch(() => false);
|
||||
if (!headerValid) {
|
||||
return;
|
||||
}
|
||||
const valid = await formDataRef?.value?.validateRef();
|
||||
if (!valid) return;
|
||||
saveTemplateLoading.value = true;
|
||||
const attachments = JSON.stringify(headerForm.attachments);
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === 'exitPlan')[0]
|
||||
await addFlowForm({
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments,
|
||||
processInstanceId:'',
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
const {data: templateId} = await addTemplate({
|
||||
templateName:headerForm.title,
|
||||
templateType:flowNameObj.value,
|
||||
})
|
||||
formData.value.processInstanceId = '';
|
||||
Object.assign(formData.value,{status:0,templateId})
|
||||
addProjectExitPlan(formData.value).then(() => {
|
||||
useMessage().success(t('common.success'));
|
||||
}).catch((err: any) => {
|
||||
useMessage().error(err.msg);
|
||||
}).finally(() => {
|
||||
saveTemplateLoading.value = false;
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
saveTemplateLoading.value = false;
|
||||
}
|
||||
|
||||
const handleSaveTemplate = () => {
|
||||
message.info(t('projectExitPlan.messages.saveTemplate'));
|
||||
};
|
||||
|
||||
const handleViewWorkflow = () => {
|
||||
|
||||
@@ -293,7 +293,7 @@ import {
|
||||
} from '/@/api/investment/cooperationUnit';
|
||||
import UnitNameSelectDialog from '/@/components/investment/UnitNameSelectDialog.vue';
|
||||
import SelectCompanyDialog from '/@/components/investment/SelectCompanyDialog.vue';
|
||||
import {useMessage,} from '/@/hooks/message';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {useUserInfo} from '/@/stores/userInfo';
|
||||
import {formatDate} from '/@/utils/formatTime';
|
||||
@@ -305,6 +305,9 @@ import {getExternalCooperationUnitsUserDeptBelong,addTemplate} from "/@/api/comm
|
||||
import {templateStore} from "/@/stores/template";
|
||||
import type {FormInstance, FormRules} from "element-plus";
|
||||
import { selectTreeCompanyTree} from "/@/api/admin/dept";
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
const temp = templateStore();
|
||||
const props = defineProps({
|
||||
isUpdate: {
|
||||
@@ -442,6 +445,7 @@ const handleInitiateApproval = async () => {
|
||||
};
|
||||
await addExternalCooperationUnitAPI(payload);
|
||||
useMessage().success('成功');
|
||||
await router.push('/flow/task/started')
|
||||
} catch (error: any) {
|
||||
useMessage().error(error?.msg || error?.message || '操作失败');
|
||||
} finally {
|
||||
@@ -774,7 +778,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) => {
|
||||
|
||||
@@ -149,12 +149,22 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="isUpdate" prop="externalStatus" min-width="120" :label="t('expertApply.table.externalStatus')">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.externalStatus" :placeholder="t('expertApply.table.selectPlaceholder')"
|
||||
style="width: 100%;">
|
||||
<el-option :label="t('expertApply.externalStatusOptions.normal')" value="normal" />
|
||||
<el-option :label="t('expertApply.externalStatusOptions.invalid')" value="invalid" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 选择专家弹窗 -->
|
||||
<SelectExpertDialog v-model:visible="expertDialogVisible" @confirm="onExpertSelected" />
|
||||
<!-- <UserSelect v-model:visible="userSelectVisible" @ok="handleUserSelectOk" /> -->
|
||||
<template-table-common />
|
||||
|
||||
<templateTable/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -165,6 +175,7 @@ import { useI18n } from 'vue-i18n';
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import templateTable from "/@/components/templetTableComom/index.vue";
|
||||
import SelectExpertDialog from '/@/components/investment/SelectExpertDialog.vue';
|
||||
import {addExpertInformationAPI, getExpertInformationByTemplateIdAPI} from '/@/api/investment/cooperationUnit';
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
@@ -172,6 +183,7 @@ import { addFlowForm } from '/@/api/flow/flow';
|
||||
import {flowNameOptions, level} from '/@/hooks/enums';
|
||||
import {FormInstance} from "element-plus";
|
||||
import {addTemplate} from "/@/api/common";
|
||||
import {useRouter} from "vue-router";
|
||||
// import UserSelect from '/@/components/UserSelect/index.vue'
|
||||
import templateTableCommon from "/@/components/templetTableComom/index.vue"
|
||||
import {templateStore} from "/@/stores/template"
|
||||
@@ -220,7 +232,7 @@ const createEmptyExpert = () => ({
|
||||
attachments: '',
|
||||
evidences: '',
|
||||
level: '',
|
||||
externalStatus: '',
|
||||
externalStatus: 'normal',
|
||||
attachmentUrl: '',
|
||||
testimonyMaterials: '',
|
||||
createBy: '',
|
||||
@@ -230,8 +242,8 @@ const createEmptyExpert = () => ({
|
||||
delFlag: '',
|
||||
processInstanceId: '',
|
||||
status: 1,
|
||||
flowType:0,
|
||||
templateId:0,
|
||||
flowType:0,
|
||||
templateId:0,
|
||||
});
|
||||
|
||||
const expertForm = reactive({
|
||||
@@ -256,6 +268,7 @@ const onExpertSelected = (row: any) => {
|
||||
target.professionalTitle = row?.professionalTitle ?? target.professionalTitle;
|
||||
target.workUnit = row?.workUnit ?? target.workUnit;
|
||||
target.level = row?.level ?? target.level;
|
||||
target.externalStatus = row?.externalStatus ?? target.externalStatus;
|
||||
target.attachments = row?.attachmentUrl ? JSON.parse(row.attachmentUrl) : []
|
||||
target.evidences = row?.testimonyMaterials ? JSON.parse(row.testimonyMaterials) : []
|
||||
};
|
||||
@@ -300,7 +313,7 @@ const toSubmitExpert = (expert: ReturnType<typeof createEmptyExpert>) => ({
|
||||
attachmentUrl: JSON.stringify(expert.attachments),
|
||||
testimonyMaterials: JSON.stringify(expert.evidences),
|
||||
level: expert.level || '',
|
||||
externalStatus: expert.externalStatus || '',
|
||||
externalStatus: expert.externalStatus || 'normal',
|
||||
createBy: expert.createBy || '',
|
||||
createTime: expert.createTime || '',
|
||||
updateBy: expert.updateBy || '',
|
||||
@@ -340,7 +353,7 @@ const verifyTableFields = () => {
|
||||
// const handleUserSelectOk = (user: any) => {
|
||||
// console.log(user)
|
||||
// }
|
||||
|
||||
const router = useRouter();
|
||||
const handleInitiateApproval = async () => {
|
||||
if (submitLoading.value) return;
|
||||
const r = await headerFormRef.value?.validate();
|
||||
@@ -371,6 +384,7 @@ const handleInitiateApproval = async () => {
|
||||
};
|
||||
await addExpertInformationAPI(payload);
|
||||
useMessage().success('成功');
|
||||
await router.push('/flow/task/started')
|
||||
} catch (error: any) {
|
||||
useMessage().error(error?.msg || error?.message || '操作失败');
|
||||
} finally {
|
||||
@@ -418,7 +432,7 @@ const handleLoadTemplate = () => {
|
||||
const handleSaveTemplate = async () => {
|
||||
if (submitLoading.value) return;
|
||||
const r = await headerFormRef.value?.validate();
|
||||
if (!verifyTableFields()) {
|
||||
if (!verifyTableFields()&& !r) {
|
||||
useMessage().warning('请完成表格必填项');
|
||||
return
|
||||
}
|
||||
@@ -447,6 +461,7 @@ watch(()=>tempId.value,()=>{
|
||||
professionalTitle: item.professionalTitle,
|
||||
workUnit: item.workUnit,
|
||||
level: item.level,
|
||||
externalStatus: item.externalStatus || 'normal',
|
||||
attachments: item.attachmentUrl ? JSON.parse(item.attachmentUrl) : [],
|
||||
evidences: item.testimonyMaterials ? JSON.parse(item.testimonyMaterials) : []
|
||||
}
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
<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"
|
||||
<el-table-column :label="t('expertApply.table.externalStatus')" prop="externalStatus" min-width="120"
|
||||
show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="['info', 'primary', 'success', 'danger'][row.status]">{{ externalStatusLabel(row.status) }}</el-tag>
|
||||
<el-tag :type="row.externalStatus === 'normal' ? 'success' : 'danger'">{{ externalStatusLabel(row.externalStatus) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="t('expertLibrary.table.action')" width="100" fixed="right">
|
||||
@@ -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()
|
||||
@@ -107,19 +108,15 @@ const handleView = (row: any) => {
|
||||
};
|
||||
|
||||
const levelLabel = (val: string) => {
|
||||
if (val === 'national') return t('expertApply.level.national');
|
||||
if (val === 'provincial') return t('expertApply.level.provincial');
|
||||
if (val === 'city') return t('expertApply.level.city');
|
||||
if (val === 'national') return '一级';
|
||||
if (val === 'provincial') return '二级';
|
||||
return val || '-';
|
||||
};
|
||||
|
||||
const externalStatusLabel = (val: string) => {
|
||||
return {
|
||||
'0': t('expertLibrary.status.pending'),
|
||||
'1': t('expertLibrary.status.reviewing'),
|
||||
'2': t('expertLibrary.status.approved'),
|
||||
'3': t('expertLibrary.status.rejected'),
|
||||
}[val] || 1
|
||||
if (val === 'normal') return t('expertApply.externalStatusOptions.normal');
|
||||
if (val === 'invalid') return t('expertApply.externalStatusOptions.invalid');
|
||||
return val || '-';
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -179,16 +179,46 @@ const detailMeta = reactive({
|
||||
date: new Date().toISOString().slice(0, 10),
|
||||
});
|
||||
const handleView = (row: any) => {
|
||||
// 转换为详情组件需要的格式
|
||||
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] }
|
||||
})
|
||||
// 解析附件,支持对象数组和字符串数组两种格式
|
||||
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: '' };
|
||||
});
|
||||
|
||||
currentDetail.value = { ...row,
|
||||
attachments,
|
||||
evidences,
|
||||
|
||||
@@ -109,9 +109,14 @@ export default {
|
||||
attachments: 'Attachments',
|
||||
evidences: 'Supporting Materials',
|
||||
level: 'Level',
|
||||
externalStatus: 'Expert Status',
|
||||
inputPlaceholder: 'Please enter',
|
||||
selectPlaceholder: 'Please select',
|
||||
},
|
||||
externalStatusOptions: {
|
||||
normal: 'Normal',
|
||||
invalid: 'Invalid',
|
||||
},
|
||||
},
|
||||
expertLibrary: {
|
||||
title: 'Expert Repository',
|
||||
|
||||
@@ -109,9 +109,14 @@ export default {
|
||||
attachments: '附件',
|
||||
evidences: '佐证材料',
|
||||
level: '级别',
|
||||
externalStatus: '专家状态',
|
||||
inputPlaceholder: '请输入',
|
||||
selectPlaceholder: '请选择',
|
||||
},
|
||||
externalStatusOptions: {
|
||||
normal: '正常',
|
||||
invalid: '作废',
|
||||
},
|
||||
},
|
||||
expertLibrary: {
|
||||
title: '专家智库',
|
||||
|
||||
@@ -24,18 +24,19 @@
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="header-card">
|
||||
<el-form :model="headerForm" label-width="90px" class="header-form" :rules="headerRequiredRule" ref="headerFormRef">
|
||||
<el-form :model="headerForm" label-width="90px" class="header-form" :rules="headerRequiredRule"
|
||||
ref="headerFormRef">
|
||||
<el-form-item :label="t('mixedRegister.header.title')" prop="title">
|
||||
<el-input maxlength="255" v-model="headerForm.title"
|
||||
:placeholder="t('mixedRegister.header.titlePlaceholder')"/>
|
||||
:placeholder="t('mixedRegister.header.titlePlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('mixedRegister.header.description')">
|
||||
<el-input maxlength="255" v-model="headerForm.description"
|
||||
:placeholder="t('mixedRegister.header.descriptionPlaceholder')"/>
|
||||
:placeholder="t('mixedRegister.header.descriptionPlaceholder')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('mixedRegister.header.attachments')" class="upload-item">
|
||||
<UploadFile :modelValue="headerForm.attachments" :fileSize="20" type="simple" :limit="10"
|
||||
@change="(url: string, files: any[]) => (headerForm.attachments = files?.map((item: any) => ({ name: item.name, url: item.url })) || [])"/>
|
||||
@change="(url: string, files: any[]) => (headerForm.attachments = files?.map((item: any) => ({ name: item.name, url: item.url })) || [])" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -43,20 +44,19 @@
|
||||
<div class="page-title">{{ isUpdate ? t('mixedRegister.updateTitle') : t('mixedRegister.title') }}</div>
|
||||
|
||||
<MixedRegisterSections ref="formRef" :instruction-title="t('mixedRegister.sections.instruction')"
|
||||
:basic-info-title="t('mixedRegister.sections.basic')"
|
||||
:instruction-fields="instructionFields"
|
||||
:instruction-form="instructionForm" :basic-info-fields="basicInfoFields"
|
||||
:basic-info-form="basicInfoForm" :is-update="isUpdate"/>
|
||||
:basic-info-title="t('mixedRegister.sections.basic')" :instruction-fields="instructionFields"
|
||||
:instruction-form="instructionForm" :basic-info-fields="basicInfoFields"
|
||||
:basic-info-form="basicInfoForm" :is-update="isUpdate" />
|
||||
</div>
|
||||
<templateTable/>
|
||||
<templateTable />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {computed, reactive, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {useMessage} from '/@/hooks/message';
|
||||
import {addMixedReformAPI,getMixedReformByTemplateIdAPI, type MixedReformPayload} from '/@/api/investment/mixedReform';
|
||||
import { computed, reactive, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import { addMixedReformAPI, getMixedReformByTemplateIdAPI, type MixedReformPayload } from '/@/api/investment/mixedReform';
|
||||
import MixedRegisterSections from '/@/components/investment/mixedReform/MixedRegisterSections.vue';
|
||||
import templateTable from "/@/components/templetTableComom/index.vue"
|
||||
import {
|
||||
@@ -69,11 +69,11 @@ import {
|
||||
mixedReformMethodOptions,
|
||||
mixedReformTypeOptions, recommended, yesOrNo
|
||||
} from '/@/hooks/enums'
|
||||
import {flowFn} from "/@/utils/flowFn";
|
||||
import {addFlowForm} from '/@/api/flow/flow';
|
||||
import {addTemplate, getMixedReformUserBelong} from "/@/api/common";
|
||||
import type {FormInstance, FormRules} from "element-plus";
|
||||
import {templateStore} from "/@/stores/template";
|
||||
import { flowFn } from "/@/utils/flowFn";
|
||||
import { addFlowForm } from '/@/api/flow/flow';
|
||||
import { addTemplate, getMixedReformUserBelong } from "/@/api/common";
|
||||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import { templateStore } from "/@/stores/template";
|
||||
const temp = templateStore();
|
||||
|
||||
const props = defineProps({
|
||||
@@ -83,7 +83,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const {t} = useI18n();
|
||||
const { t } = useI18n();
|
||||
const message = useMessage();
|
||||
const submitLoading = ref(false);
|
||||
const formRef = ref<any>(null)
|
||||
@@ -102,7 +102,7 @@ const initInstructionForm = {
|
||||
contactPerson: '',
|
||||
contactPhone: '',
|
||||
}
|
||||
const instructionForm = reactive({...initInstructionForm});
|
||||
const instructionForm = reactive({ ...initInstructionForm });
|
||||
|
||||
const initBasicInfoForm = {
|
||||
groupBelonging: '',
|
||||
@@ -125,20 +125,20 @@ const initBasicInfoForm = {
|
||||
mixedCompanyField: '',
|
||||
industryChainCategory: ''
|
||||
}
|
||||
const basicInfoForm = reactive({...initBasicInfoForm});
|
||||
const basicInfoForm = reactive({ ...initBasicInfoForm });
|
||||
|
||||
type InstructionFieldKey = keyof typeof instructionForm;
|
||||
type BasicFieldKey = keyof typeof basicInfoForm;
|
||||
|
||||
const instructionFields = computed<Array<{ key: InstructionFieldKey; label: string }>>(() => [
|
||||
{key: 'reportingUnit', label: t('mixedRegister.instructionFields.reportUnit')},
|
||||
{key: 'contactPerson', label: t('mixedRegister.instructionFields.contact')},
|
||||
{key: 'contactPhone', label: t('mixedRegister.instructionFields.contactMethod')},
|
||||
{ key: 'reportingUnit', label: t('mixedRegister.instructionFields.reportUnit') },
|
||||
{ key: 'contactPerson', label: t('mixedRegister.instructionFields.contact') },
|
||||
{ key: 'contactPhone', label: t('mixedRegister.instructionFields.contactMethod') },
|
||||
]);
|
||||
|
||||
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')},
|
||||
@@ -146,65 +146,65 @@ const basicInfoFields = computed<Array<{ key: BasicFieldKey; label: string }>>((
|
||||
key: 'partnerNature',
|
||||
label: t('mixedRegister.basicFields.partnerNature'),
|
||||
type: 'select',
|
||||
fieldProps: {options: cooperationPartnerNatureOptions}
|
||||
fieldProps: { options: cooperationPartnerNatureOptions }
|
||||
},
|
||||
{key: 'partnerName', label: t('mixedRegister.basicFields.partnerName')},
|
||||
{key: 'progressStatus', label: t('mixedRegister.basicFields.progressStatus'),type: 'select',fieldProps: {options: recommended}},
|
||||
{ key: 'partnerName', label: t('mixedRegister.basicFields.partnerName') },
|
||||
{ key: 'progressStatus', label: t('mixedRegister.basicFields.progressStatus'), type: 'select', fieldProps: { options: recommended } },
|
||||
{
|
||||
key: 'estimatedCompletionTime',
|
||||
label: t('mixedRegister.basicFields.expectedFinishTime'),
|
||||
type: 'date',
|
||||
fieldProps: {valueFormat: 'YYYY-MM-DD'}
|
||||
fieldProps: { valueFormat: 'YYYY-MM-DD' }
|
||||
},
|
||||
{
|
||||
key: 'mixedReformMethod',
|
||||
label: t('mixedRegister.basicFields.mixedMode'),
|
||||
type: 'select',
|
||||
fieldProps: {options: mixedReformMethodOptions}
|
||||
fieldProps: { options: mixedReformMethodOptions }
|
||||
},
|
||||
{key: 'isIndustryLeader', label: t('mixedRegister.basicFields.isIndustryBenchmark'),type: 'select',fieldProps: {options: yesOrNo}},
|
||||
{ key: 'isIndustryLeader', label: t('mixedRegister.basicFields.isIndustryBenchmark'), type: 'select', fieldProps: { options: yesOrNo } },
|
||||
{
|
||||
key: 'mixedReformType',
|
||||
label: t('mixedRegister.basicFields.mixedType'),
|
||||
type: 'select',
|
||||
fieldProps: {options: mixedReformTypeOptions}
|
||||
fieldProps: { options: mixedReformTypeOptions }
|
||||
},
|
||||
{
|
||||
key: 'projectStartTime',
|
||||
label: t('mixedRegister.basicFields.projectStartTime'),
|
||||
type: 'date',
|
||||
fieldProps: {valueFormat: 'YYYY-MM-DD'}
|
||||
fieldProps: { valueFormat: 'YYYY-MM-DD' }
|
||||
},
|
||||
{
|
||||
key: 'actualCompletionTime',
|
||||
label: t('mixedRegister.basicFields.completionTime'),
|
||||
type: 'date',
|
||||
fieldProps: {valueFormat: 'YYYY-MM-DD'}
|
||||
fieldProps: { valueFormat: 'YYYY-MM-DD' }
|
||||
},
|
||||
{key: 'reformProgress', label: t('mixedRegister.basicFields.reformProgress'), span: 24,type: 'number',length: 20},
|
||||
{ key: 'reformProgress', label: t('mixedRegister.basicFields.reformProgress'), span: 24, type: 'number', length: 20 },
|
||||
{
|
||||
key: 'mixedCompanyCategory',
|
||||
label: t('mixedRegister.basicFields.mixedCompanyCategory'),
|
||||
type: 'select',
|
||||
fieldProps: {options: mixedCompanyCategoryOptions}
|
||||
fieldProps: { options: mixedCompanyCategoryOptions }
|
||||
},
|
||||
{
|
||||
key: 'mixedCompanyIndustry',
|
||||
label: t('mixedRegister.basicFields.mixedCompanyIndustry'),
|
||||
type: 'select',
|
||||
fieldProps: {options: mixedCompanyIndustryOptions, filterable: true}
|
||||
fieldProps: { options: mixedCompanyIndustryOptions, filterable: true }
|
||||
},
|
||||
{
|
||||
key: 'mixedCompanyField',
|
||||
label: t('mixedRegister.basicFields.mixedCompanyField'),
|
||||
type: 'select',
|
||||
fieldProps: {options: mixedCompanyFieldOptions}
|
||||
fieldProps: { options: mixedCompanyFieldOptions }
|
||||
},
|
||||
{
|
||||
key: 'industryChainCategory',
|
||||
label: t('mixedRegister.basicFields.industryChainCategory'),
|
||||
type: 'select',
|
||||
fieldProps: {options: industryChainCategoryOptions, filterable: true}
|
||||
fieldProps: { options: industryChainCategoryOptions, filterable: true }
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -233,7 +233,7 @@ const handleSubmit = async () => {
|
||||
flowIdKey = 'VITE_FLOWID_16'
|
||||
}
|
||||
}
|
||||
const {processInstanceId} = await flowFn(flowIdKey, {
|
||||
const { processInstanceId } = await flowFn(flowIdKey, {
|
||||
paramMap: {},
|
||||
})
|
||||
const flowName = isUpdate ? 'mixedReformUpdate' : 'mixedReformRegistration'
|
||||
@@ -245,7 +245,7 @@ const handleSubmit = async () => {
|
||||
processInstanceId,
|
||||
flowType: flowNameObj.value,
|
||||
})
|
||||
Object.assign(formData, {processInstanceId,status:1})
|
||||
Object.assign(formData, { processInstanceId, status: 1 })
|
||||
await addMixedReformAPI(formData);
|
||||
message.success(t('mixedRegister.messages.submitSuccess'));
|
||||
// 重置表单
|
||||
@@ -274,18 +274,20 @@ const handleSaveDraft = async () => {
|
||||
title: headerForm.title,
|
||||
description: headerForm.description,
|
||||
attachments: JSON.stringify(headerForm.attachments),
|
||||
processInstanceId:'',
|
||||
processInstanceId: '',
|
||||
flowType: flowNameObj.value
|
||||
})
|
||||
Object.assign(formData, {status:0,temporaryStorage:{
|
||||
businessType:flowNameObj.value,
|
||||
title:headerForm.title,
|
||||
}})
|
||||
Object.assign(formData, {
|
||||
status: 0, temporaryStorage: {
|
||||
businessType: flowNameObj.value,
|
||||
title: headerForm.title,
|
||||
}
|
||||
})
|
||||
await addMixedReformAPI(formData);
|
||||
message.success(t('mixedRegister.messages.submitSuccess') || '提交成功');
|
||||
}catch (error: any){
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || error?.message || t('common.fail') || '提交失败');
|
||||
}finally {
|
||||
} finally {
|
||||
saveLoading.value = false;
|
||||
}
|
||||
};
|
||||
@@ -295,7 +297,7 @@ const handleLoadTemplate = () => {
|
||||
const isUpdate = props.isUpdate;
|
||||
const flowName = isUpdate ? 'mixedReformUpdate' : 'mixedReformRegistration'
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
temp.changeTempShow(true, flowNameObj.value)
|
||||
};
|
||||
const saveTemplateLoading = ref(false);
|
||||
const handleSaveTemplate = async () => {
|
||||
@@ -310,13 +312,13 @@ const handleSaveTemplate = async () => {
|
||||
const isUpdate = props.isUpdate;
|
||||
const flowName = isUpdate ? 'mixedReformUpdate' : 'mixedReformRegistration'
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0]
|
||||
const {data: templateId}= await addTemplate({templateName:headerForm.title,templateType:flowNameObj.value})
|
||||
Object.assign(formData, {status:0,templateId})
|
||||
const { data: templateId } = await addTemplate({ templateName: headerForm.title, templateType: flowNameObj.value })
|
||||
Object.assign(formData, { status: 0, templateId })
|
||||
await addMixedReformAPI(formData);
|
||||
message.success(t('mixedRegister.messages.submitSuccess'));
|
||||
}catch (error: any) {
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || error?.message || t('common.fail'));
|
||||
}finally {
|
||||
} finally {
|
||||
saveTemplateLoading.value = false;
|
||||
}
|
||||
};
|
||||
@@ -324,7 +326,7 @@ const handleSaveTemplate = async () => {
|
||||
const handleViewWorkflow = () => {
|
||||
message.info(t('mixedRegister.messages.viewWorkflow'));
|
||||
};
|
||||
watch(() => tempId.value,()=>{
|
||||
watch(() => tempId.value, () => {
|
||||
getMixedReformByTemplateIdAPI(tempId.value).then(data => {
|
||||
Object.assign(basicInfoForm, data.data);
|
||||
Object.assign(instructionForm, {
|
||||
|
||||
@@ -124,7 +124,19 @@
|
||||
<span class="detail-title">{{ t('reserveLibrary.detail.title') }}</span>
|
||||
<el-button class="close-btn" link icon="Close" @click="detailDrawerVisible = false" />
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
<!-- Tab 锚点导航 -->
|
||||
<div class="detail-tabs">
|
||||
<div
|
||||
v-for="tab in detailTabs"
|
||||
:key="tab.id"
|
||||
class="detail-tab-item"
|
||||
:class="{ active: activeTab === tab.id }"
|
||||
@click="scrollToSection(tab.id)"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content" ref="detailContentRef" @scroll="handleDetailScroll">
|
||||
<ProjectBasicInfoView :model-value="detailFormData" :main-title="t('reserveLibrary.detail.formTitle')" />
|
||||
</div>
|
||||
</el-drawer>
|
||||
@@ -235,6 +247,59 @@ const detailFormData = reactive<ProjectBasicInfoFormData>(createEmptyDetail());
|
||||
const tableLoading = ref(false);
|
||||
const detailLoading = ref(false);
|
||||
|
||||
// Tab 锚点导航相关
|
||||
const detailContentRef = ref<HTMLElement | null>(null);
|
||||
const activeTab = ref('basicInfo');
|
||||
const detailTabs = [
|
||||
{ id: 'basicInfo', label: t('reserveRegistration.basicInfo.title') || '项目基本信息' },
|
||||
{ id: 'investmentEstimate', label: t('reserveRegistration.investmentEstimate.title') || '投资估算' },
|
||||
{ id: 'partnerInfo', label: t('reserveRegistration.partnerInfo.title') || '合作方信息' },
|
||||
{ id: 'decisionInfo', label: t('reserveRegistration.decisionInfo.title') || '决策信息' },
|
||||
];
|
||||
|
||||
const scrollToSection = (sectionId: string) => {
|
||||
activeTab.value = sectionId;
|
||||
const contentEl = detailContentRef.value;
|
||||
if (!contentEl) return;
|
||||
|
||||
// 根据 sectionId 查找对应的标题元素
|
||||
const sectionMap: Record<string, number> = {
|
||||
'basicInfo': 0,
|
||||
'investmentEstimate': 1,
|
||||
'partnerInfo': 2,
|
||||
'decisionInfo': 3,
|
||||
};
|
||||
|
||||
const sectionTitles = contentEl.querySelectorAll('.form-section-title, .sub-section-title');
|
||||
const targetIndex = sectionMap[sectionId];
|
||||
|
||||
if (sectionTitles[targetIndex]) {
|
||||
sectionTitles[targetIndex].scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
};
|
||||
|
||||
const handleDetailScroll = () => {
|
||||
const contentEl = detailContentRef.value;
|
||||
if (!contentEl) return;
|
||||
|
||||
const sectionTitles = contentEl.querySelectorAll('.form-section-title, .sub-section-title');
|
||||
const scrollTop = contentEl.scrollTop;
|
||||
const offsetTop = 100; // 偏移量
|
||||
|
||||
let currentSection = 'basicInfo';
|
||||
const sectionIds = ['basicInfo', 'investmentEstimate', 'partnerInfo', 'decisionInfo'];
|
||||
|
||||
sectionTitles.forEach((el, index) => {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const containerRect = contentEl.getBoundingClientRect();
|
||||
if (rect.top - containerRect.top <= offsetTop) {
|
||||
currentSection = sectionIds[index] || currentSection;
|
||||
}
|
||||
});
|
||||
|
||||
activeTab.value = currentSection;
|
||||
};
|
||||
|
||||
const resetDetailForm = () => {
|
||||
const empty = createEmptyDetail();
|
||||
Object.assign(detailFormData, empty);
|
||||
@@ -453,10 +518,39 @@ onMounted(() => {
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
.detail-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0;
|
||||
padding: 0 20px;
|
||||
border-bottom: 1px solid var(--el-border-color);
|
||||
background: var(--el-bg-color);
|
||||
}
|
||||
|
||||
.detail-tab-item {
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
color: var(--el-text-color-regular);
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.detail-tab-item:hover {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.detail-tab-item.active {
|
||||
color: var(--el-color-primary);
|
||||
border-bottom-color: var(--el-color-primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
padding: 0 20px 20px;
|
||||
overflow: auto;
|
||||
height: calc(100% - 52px);
|
||||
height: calc(100% - 96px);
|
||||
}
|
||||
|
||||
.el-form-item--default {
|
||||
|
||||
@@ -74,7 +74,9 @@ import {flowNameOptions} from '/@/hooks/enums';
|
||||
import {addTemplate, getUserDeptBelong} from "/@/api/common";
|
||||
import {templateStore} from "/@/stores/template";
|
||||
import type {FormInstance, FormRules} from "element-plus";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
const temp = templateStore();
|
||||
const props = defineProps({
|
||||
isUpdate: {
|
||||
@@ -308,6 +310,7 @@ const handleInitiateApproval = async () => {
|
||||
message.success(t('common.success'));
|
||||
resetHeaderForm();
|
||||
resetProjectForm();
|
||||
await router.push('/flow/task/started')
|
||||
}
|
||||
} catch (error: any) {
|
||||
message.error(error?.msg || error?.message || t('common.fail'));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="fixed top-0 right-0 z-10 flex items-center p-5 space-x-2">
|
||||
<!-- 语言切换 -->
|
||||
<el-dropdown v-if="isI18nEnabled" trigger="click" @command="onLanguageChange">
|
||||
<!-- <el-dropdown v-if="isI18nEnabled" trigger="click" @command="onLanguageChange">
|
||||
<div
|
||||
class="flex items-center justify-center transition-colors rounded-lg cursor-pointer w-9 h-9 bg-white/80 dark:bg-slate-800/80 hover:bg-gray-100 dark:hover:bg-slate-700 backdrop-blur-sm"
|
||||
>
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-dropdown-item command="en" :disabled="state.disabledI18n === 'en'">English</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</el-dropdown> -->
|
||||
|
||||
<!-- 主题切换 -->
|
||||
<el-tooltip v-if="isDarkModeEnabled" :content="getThemeConfig.isDark ? '切换亮色模式' : '切换暗色模式'" placement="bottom">
|
||||
|
||||
@@ -208,6 +208,7 @@ export default {
|
||||
startTime: 'Initiation Time',
|
||||
receivedTime: 'Received Time',
|
||||
processTime: 'Process Time',
|
||||
currentNode: 'Current Node',
|
||||
status: 'Approval Status',
|
||||
actions: 'Actions',
|
||||
},
|
||||
|
||||
@@ -208,6 +208,7 @@ export default {
|
||||
startTime: '发起时间',
|
||||
receivedTime: '接收时间',
|
||||
processTime: '处理时间',
|
||||
currentNode: '当前节点',
|
||||
status: '审批状态',
|
||||
actions: '操作',
|
||||
},
|
||||
|
||||
@@ -667,6 +667,7 @@ import {addTemplate, getPropertyRightsUserDeptBelong} from "/@/api/common";
|
||||
import {FormInstance} from "element-plus";
|
||||
import templateTable from "/@/components/templetTableComom/index.vue"
|
||||
import {templateStore} from "/@/stores/template"
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
const temp = templateStore()
|
||||
const props = defineProps({
|
||||
@@ -1079,6 +1080,7 @@ const scrollToSection = (id: TabId) => {
|
||||
};
|
||||
|
||||
const submitting = ref(false)
|
||||
const router = useRouter()
|
||||
const handleSubmit = async () => {
|
||||
const re = await headerFormRef.value?.validate()
|
||||
if (!re) return
|
||||
@@ -1116,6 +1118,7 @@ const handleSubmit = async () => {
|
||||
const res = await addPropertyRightsAPI(params)
|
||||
if (res.ok) {
|
||||
message.success(t('common.success'));
|
||||
await router.push('/flow/task/started')
|
||||
} else {
|
||||
message.error(res.msg)
|
||||
}
|
||||
@@ -1168,7 +1171,6 @@ const handleLoadTemplate = () => {
|
||||
const flowName = props.isUpdate ? 'propertyRightsUpdate' : 'propertyRightsRegistration'
|
||||
const flowNameObj = flowNameOptions.filter(item => item.label === flowName)[0];
|
||||
temp.changeTempShow(true,flowNameObj.value)
|
||||
message.info(t('ownershipCreate.messages.loadTemplate'));
|
||||
};
|
||||
|
||||
watch(()=>tempId.value,()=>{
|
||||
|
||||
@@ -55,13 +55,18 @@
|
||||
min-width="180" />
|
||||
<el-table-column prop="updateTime" :label="t('workbenchPage.pending.table.processTime')"
|
||||
min-width="180" />
|
||||
<el-table-column prop="taskName" :label="t('workbenchPage.pending.table.currentNode')" min-width="140">
|
||||
<template #default="scope">
|
||||
{{ scope.row.taskName || scope.row.nodeName || scope.row.currentNode || '--' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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 +80,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 +112,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 +145,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) => {
|
||||
|
||||
Reference in New Issue
Block a user