Merge branch 'refs/heads/master' into wsq-20260727
This commit is contained in:
@@ -62,7 +62,7 @@
|
|||||||
<a-form-item v-if="proposal.needDeptScore === '1'" label="部门评议小组打分结果">
|
<a-form-item v-if="proposal.needDeptScore === '1'" label="部门评议小组打分结果">
|
||||||
平均分:{{ proposal.deptAvgScore ?? '-' }};建议奖项:{{ awardLabel(proposal.suggestedAward) }}
|
平均分:{{ proposal.deptAvgScore ?? '-' }};建议奖项:{{ awardLabel(proposal.suggestedAward) }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="负责人确认奖项" required>
|
<a-form-item label="部门负责人确认奖项" required>
|
||||||
<a-radio-group v-if="leaderAwardBase" v-model:value="leaderFinalAward">
|
<a-radio-group v-if="leaderAwardBase" v-model:value="leaderFinalAward">
|
||||||
<a-radio v-for="item in leaderAwardOptions" :key="item.value" :value="item.value">{{ item.label }}</a-radio>
|
<a-radio v-for="item in leaderAwardOptions" :key="item.value" :value="item.value">{{ item.label }}</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="isTask('Task_improve004')">
|
<template v-if="isTask('Task_improve004')">
|
||||||
<a-form-item label="负责人确认奖项">{{ awardLabel(proposal.leaderFinalAward) }}</a-form-item>
|
<a-form-item label="申请部门负责人确认奖项">{{ awardLabel(proposal.leaderFinalAward) }}</a-form-item>
|
||||||
<a-form-item label="所级评议人员" required>
|
<a-form-item label="所级评议人员" required>
|
||||||
<a-checkbox-group v-model:value="selectedInstituteVoterIds" class="vote-member-grid">
|
<a-checkbox-group v-model:value="selectedInstituteVoterIds" class="vote-member-grid">
|
||||||
<a-checkbox v-for="member in instituteVoteCandidates" :key="member.id" :value="member.id" class="vote-member-option">
|
<a-checkbox v-for="member in instituteVoteCandidates" :key="member.id" :value="member.id" class="vote-member-option">
|
||||||
@@ -86,20 +86,46 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="isTask('Task_improve005')">
|
<template v-if="isTask('Task_improve005')">
|
||||||
<a-form-item label="我的投票">
|
<!-- 投票操作独占整行,避免受通用标签列宽影响而视觉偏右。 -->
|
||||||
<a-space v-if="currentVote">
|
<a-form-item label="我的投票" class="vote-action-form-item" :label-col="{ span: 24 }" :wrapper-col="{ span: 24 }">
|
||||||
<a-button :type="currentVote.voteResult === 'agree' ? 'primary' : 'default'" :loading="savingVote" @click="confirmInstituteVote('agree')">投票通过</a-button>
|
<div v-if="currentVote" class="vote-action-panel">
|
||||||
<a-button danger :type="currentVote.voteResult === 'disagree' ? 'primary' : 'default'" :loading="savingVote" @click="confirmInstituteVote('disagree')">投票反对</a-button>
|
<div class="vote-action-buttons">
|
||||||
<span>{{ voteResultLabel(currentVote) }}</span>
|
<a-button size="large" type="primary" class="vote-action-button" :loading="savingVote" @click="confirmInstituteVote('agree')">投票通过</a-button>
|
||||||
</a-space>
|
<a-button size="large" danger class="vote-action-button" :type="currentVote.voteResult === 'disagree' ? 'primary' : 'default'" :loading="savingVote" @click="confirmInstituteVote('disagree')">投票反对</a-button>
|
||||||
|
</div>
|
||||||
|
<span class="vote-action-status">{{ voteResultLabel(currentVote) }}</span>
|
||||||
|
</div>
|
||||||
<span v-else class="form-help">当前用户不在所级评议投票名单中。</span>
|
<span v-else class="form-help">当前用户不在所级评议投票名单中。</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="isTask('Task_improve006')">
|
<template v-if="isTask('Task_improve006')">
|
||||||
<a-form-item label="负责人确认奖项">{{ awardLabel(proposal.leaderFinalAward) }}</a-form-item>
|
<a-form-item label="申请部门负责人确认奖项">{{ awardLabel(proposal.leaderFinalAward) }}</a-form-item>
|
||||||
<a-form-item v-if="proposal.isneedvote === '1'" label="所级评议结果">
|
<a-form-item v-if="proposal.isneedvote === '1'" label="所级评议结果">
|
||||||
同意票:{{ proposal.instituteAgreeCount ?? '-' }};不同意票:{{ proposal.instituteDisagreeCount ?? '-' }};结果:{{ proposal.instituteVoteResult || '-' }}
|
<div class="institute-vote-summary">
|
||||||
|
<span class="institute-vote-summary-item institute-vote-total">
|
||||||
|
<span class="institute-vote-summary-label">总票数</span>
|
||||||
|
<strong>{{ proposal.instituteTotalVoters ?? '-' }}</strong>
|
||||||
|
</span>
|
||||||
|
<span class="institute-vote-summary-item institute-vote-agree">
|
||||||
|
<span class="institute-vote-summary-label">同意票</span>
|
||||||
|
<strong>{{ proposal.instituteAgreeCount ?? '-' }}</strong>
|
||||||
|
</span>
|
||||||
|
<span class="institute-vote-summary-item institute-vote-disagree">
|
||||||
|
<span class="institute-vote-summary-label">不同意票</span>
|
||||||
|
<strong>{{ proposal.instituteDisagreeCount ?? '-' }}</strong>
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
class="institute-vote-summary-item institute-vote-result"
|
||||||
|
:class="{
|
||||||
|
'is-passed': proposal.instituteVoteResult === '通过',
|
||||||
|
'is-failed': proposal.instituteVoteResult === '不通过',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<span class="institute-vote-summary-label">结果</span>
|
||||||
|
<strong>{{ proposal.instituteVoteResult || '-' }}</strong>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="最终奖项" required>
|
<a-form-item label="最终奖项" required>
|
||||||
<a-radio-group v-model:value="finalAward">
|
<a-radio-group v-model:value="finalAward">
|
||||||
@@ -289,7 +315,7 @@
|
|||||||
voteRows.value = votes || [];
|
voteRows.value = votes || [];
|
||||||
initialAward.value = proposal.value.initialAward || '';
|
initialAward.value = proposal.value.initialAward || '';
|
||||||
leaderFinalAward.value = proposal.value.leaderFinalAward || '';
|
leaderFinalAward.value = proposal.value.leaderFinalAward || '';
|
||||||
finalAward.value = proposal.value.finalAward || '';
|
finalAward.value = resolveInitialFinalAward(proposal.value);
|
||||||
if (isTask('Task_improve004') && processInfo.value.processInstanceId && processInfo.value.taskId) {
|
if (isTask('Task_improve004') && processInfo.value.processInstanceId && processInfo.value.taskId) {
|
||||||
instituteVoteCandidates.value = await queryInstituteVoteCandidates(processInfo.value);
|
instituteVoteCandidates.value = await queryInstituteVoteCandidates(processInfo.value);
|
||||||
const candidateIds = new Set(instituteVoteCandidates.value.map((item) => String(item.id)));
|
const candidateIds = new Set(instituteVoteCandidates.value.map((item) => String(item.id)));
|
||||||
@@ -316,6 +342,17 @@
|
|||||||
return { ...processInfo.value, ...extra };
|
return { ...processInfo.value, ...extra };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归档节点优先回显已保存的最终奖项;仅首次办理时按所级评议或部门负责人结论预选,
|
||||||
|
* 金奖所级评议不通过必须由经办人手动确认,不能自动带入任何奖项。
|
||||||
|
*/
|
||||||
|
function resolveInitialFinalAward(data: Recordable) {
|
||||||
|
if (data.finalAward) return String(data.finalAward);
|
||||||
|
if (!isTask('Task_improve006')) return '';
|
||||||
|
if (data.isneedvote === '1') return data.instituteVoteResult === '通过' ? '0' : '';
|
||||||
|
return data.isneedvote === '0' ? String(data.leaderFinalAward || '') : '';
|
||||||
|
}
|
||||||
|
|
||||||
async function saveNodeAction() {
|
async function saveNodeAction() {
|
||||||
try {
|
try {
|
||||||
if (isTask('Task_improve001')) {
|
if (isTask('Task_improve001')) {
|
||||||
@@ -335,11 +372,11 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!leaderFinalAward.value) {
|
if (!leaderFinalAward.value) {
|
||||||
createMessage.warning('请选择负责人确认奖项');
|
createMessage.warning('请选择部门负责人确认奖项');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!leaderAwardOptions.value.some((item) => item.value === leaderFinalAward.value)) {
|
if (!leaderAwardOptions.value.some((item) => item.value === leaderFinalAward.value)) {
|
||||||
createMessage.warning('负责人确认奖项只能选择当前档位或降档奖项');
|
createMessage.warning('部门负责人确认奖项只能选择当前档位或降档奖项');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
await saveLeaderAward(actionPayload({ leaderFinalAward: leaderFinalAward.value }));
|
await saveLeaderAward(actionPayload({ leaderFinalAward: leaderFinalAward.value }));
|
||||||
@@ -516,6 +553,81 @@
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.institute-vote-summary {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px 20px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.institute-vote-summary-item {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 96px;
|
||||||
|
color: #64748b;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
color: #334155;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.institute-vote-summary-label {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.institute-vote-agree strong {
|
||||||
|
color: #1677ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.institute-vote-disagree strong,
|
||||||
|
.institute-vote-result.is-failed strong {
|
||||||
|
color: #cf1322;
|
||||||
|
}
|
||||||
|
|
||||||
|
.institute-vote-result.is-passed strong {
|
||||||
|
color: #389e0d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-panel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-form-item {
|
||||||
|
:deep(.ant-form-item-label) {
|
||||||
|
padding-bottom: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.ant-form-item-control-input-content) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-buttons {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(160px, 1fr));
|
||||||
|
gap: 16px;
|
||||||
|
width: min(100%, 352px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-button {
|
||||||
|
min-width: 160px;
|
||||||
|
height: 52px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-status {
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.vote-member-grid {
|
.vote-member-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||||
@@ -551,4 +663,19 @@
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.institute-vote-summary-item {
|
||||||
|
flex: 1 1 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-buttons {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
width: min(100%, 280px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-action-button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<a-space direction="vertical" style="width: 100%">
|
<a-space direction="vertical" style="width: 100%">
|
||||||
<div v-if="responseInfo.success === true" style="margin-bottom: 8px">
|
<div v-if="responseInfo.success === true" style="margin-bottom: 8px">
|
||||||
<a-tag color="green">发送成功</a-tag>
|
<a-tag color="green">发送成功</a-tag>
|
||||||
<span v-if="responseInfo.messageId"> messageId: {{ responseInfo.messageId }}</span>
|
<span v-if="responseInfo.requestId"> requestId: {{ responseInfo.requestId }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="responseInfo.success === false" style="margin-bottom: 8px">
|
<div v-else-if="responseInfo.success === false" style="margin-bottom: 8px">
|
||||||
<a-tag color="red">发送失败</a-tag>
|
<a-tag color="red">发送失败</a-tag>
|
||||||
@@ -212,12 +212,12 @@ async function handleSend() {
|
|||||||
responseInfo.msgResponse = res.msgResponse;
|
responseInfo.msgResponse = res.msgResponse;
|
||||||
}
|
}
|
||||||
responseInfo.success = res?.success;
|
responseInfo.success = res?.success;
|
||||||
responseInfo.messageId = res?.messageId;
|
responseInfo.requestId = res?.requestId;
|
||||||
responseInfo.errorMessage = res?.errorMessage;
|
responseInfo.errorMessage = res?.errorMessage;
|
||||||
responseInfo.responseCode = res?.responseCode;
|
responseInfo.responseCode = res?.responseCode;
|
||||||
|
|
||||||
if (res?.success) {
|
if (res?.success) {
|
||||||
addLog('success', `发送成功!messageId: ${res?.messageId || '-'}`);
|
addLog('success', `发送成功!requestId: ${res?.requestId || '-'}`);
|
||||||
} else {
|
} else {
|
||||||
addLog('error', `发送失败: ${res?.errorMessage || '未知错误'}`);
|
addLog('error', `发送失败: ${res?.errorMessage || '未知错误'}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user