diff --git a/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue b/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
index 2ff8be8..967da2e 100644
--- a/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
+++ b/src/views/gh/improvementProposal/components/ImprovementProposalBPMForm.vue
@@ -14,7 +14,7 @@
{{ proposal.proposalNo || '-' }}
{{ proposal.proposalName || '-' }}
{{ formatDate(proposal.proposalDate) }}
- {{ proposal.proposalCategory_dictText || proposal.proposalCategory || '-' }}
+ {{ proposalCategoryText }}
{{ proposal.proposalDeptName || '-' }}
{{ proposal.applicantName || '-' }}
{{ proposal.teamName || '-' }}
@@ -258,6 +258,7 @@
import Icon from '/@/components/Icon/index';
import { useMessage } from '/@/hooks/web/useMessage';
import { useUserStore } from '/@/store/modules/user';
+ import { initDictOptions } from '/@/utils/dict/index';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
@@ -290,6 +291,7 @@
const savingVote = ref(false);
const scoreModalVisible = ref(false);
const proposal = ref({});
+ const proposalCategoryText = ref('-');
const currentScore = ref(null);
const voteRows = ref([]);
const instituteVoteCandidates = ref([]);
@@ -363,6 +365,7 @@
const mainId = processInfo.value.mainId;
if (!mainId) {
proposal.value = {};
+ proposalCategoryText.value = '-';
currentScore.value = null;
voteRows.value = [];
instituteVoteCandidates.value = [];
@@ -379,6 +382,7 @@
: Promise.resolve(null),
]);
proposal.value = main || {};
+ proposalCategoryText.value = await resolveProposalCategoryText(proposal.value);
currentScore.value = myScore || null;
voteRows.value = votes || [];
initialAward.value = proposal.value.initialAward || '';
@@ -406,6 +410,28 @@
return processInfo.value.taskDefKey === taskDefKey;
}
+ /**
+ * BPM 详情接口未必携带 JEECG 自动追加的 _dictText 字段,因此此处以字典接口兜底,
+ * 保证基本信息中的提案类别始终展示 proposal_category 的文本。
+ */
+ async function resolveProposalCategoryText(data: Recordable) {
+ const dictText = data.proposalCategory_dictText || data.proposalCategoryDictText;
+ if (dictText) return String(dictText);
+
+ const categoryValue = data.proposalCategory;
+ if (categoryValue === undefined || categoryValue === null || categoryValue === '') return '-';
+
+ try {
+ const options = await initDictOptions('proposal_category');
+ const matched = Array.isArray(options)
+ ? options.find((item) => String(item.value) === String(categoryValue))
+ : undefined;
+ return matched?.text || matched?.label || String(categoryValue);
+ } catch (error) {
+ return String(categoryValue);
+ }
+ }
+
function actionPayload(extra: Recordable = {}) {
return { ...processInfo.value, ...extra };
}