|
@@ -37,6 +37,14 @@
|
|
|
<a-button
|
|
<a-button
|
|
|
size="small"
|
|
size="small"
|
|
|
type="text"
|
|
type="text"
|
|
|
|
|
+ :icon="h(FileTextOutlined)"
|
|
|
|
|
+ @click="goToAssessmentProtocol"
|
|
|
|
|
+ >
|
|
|
|
|
+ 传承协议审核
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="text"
|
|
|
:icon="h(reviewCardCollapsed ? UpOutlined : DownOutlined)"
|
|
:icon="h(reviewCardCollapsed ? UpOutlined : DownOutlined)"
|
|
|
@click="reviewCardCollapsed = !reviewCardCollapsed"
|
|
@click="reviewCardCollapsed = !reviewCardCollapsed"
|
|
|
>
|
|
>
|
|
@@ -51,13 +59,6 @@
|
|
|
message="当前账号用户组无权在此环节审核"
|
|
message="当前账号用户组无权在此环节审核"
|
|
|
/>
|
|
/>
|
|
|
<a-alert
|
|
<a-alert
|
|
|
- v-else-if="alreadySubmitted"
|
|
|
|
|
- type="success"
|
|
|
|
|
- show-icon
|
|
|
|
|
- class="mb-4"
|
|
|
|
|
- message="当前角色已提交意见,无需重复提交"
|
|
|
|
|
- />
|
|
|
|
|
- <a-alert
|
|
|
|
|
v-else-if="currentForm.rejectType > 0"
|
|
v-else-if="currentForm.rejectType > 0"
|
|
|
type="warning"
|
|
type="warning"
|
|
|
show-icon
|
|
show-icon
|
|
@@ -65,62 +66,110 @@
|
|
|
:message="`${getRejectTypeText(currentForm.rejectType)}已退回: ${currentForm.rejectReason}`"
|
|
:message="`${getRejectTypeText(currentForm.rejectType)}已退回: ${currentForm.rejectReason}`"
|
|
|
/>
|
|
/>
|
|
|
<a-form v-else layout="vertical" size="middle">
|
|
<a-form v-else layout="vertical" size="middle">
|
|
|
- <div class="flex flex-col md:flex-row lg:flex-row w-full gap-3">
|
|
|
|
|
- <div class="flex flex-col flex-1">
|
|
|
|
|
- <a-form-item required :label="isNoProgressChange ? `提交意见:${reviewLevelLabel}` : `审核通过:${reviewLevelLabel}`">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <a-alert
|
|
|
|
|
+ v-if="alreadySubmitted"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ show-icon
|
|
|
|
|
+ class="mb-4"
|
|
|
|
|
+ message="当前角色已提交意见,无需重复提交"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="flex flex-col md:flex-row lg:flex-row w-full gap-3 py-3">
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="{ gid, def } in displayFieldDefs"
|
|
|
|
|
+ :key="gid"
|
|
|
|
|
+ class="flex flex-col flex-1"
|
|
|
|
|
+ >
|
|
|
|
|
+ <a-form-item :required="gid === currentUserGroupId" :label="`${def.label} — 审核意见`">
|
|
|
<a-select
|
|
<a-select
|
|
|
- v-model:value="reviewOpinion"
|
|
|
|
|
|
|
+ :value="reviewFields[gid]?.opinion"
|
|
|
allow-clear
|
|
allow-clear
|
|
|
placeholder="请选择审核意见"
|
|
placeholder="请选择审核意见"
|
|
|
:options="opinionSelectOptions"
|
|
:options="opinionSelectOptions"
|
|
|
|
|
+ :disabled="alreadySubmitted || gid !== currentUserGroupId"
|
|
|
|
|
+ @update:value="(v: number | null) => { if (!reviewFields[gid]) reviewFields[gid] = { opinion: null, points: null }; reviewFields[gid].opinion = v; }"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
- <a-form-item label="评分">
|
|
|
|
|
|
|
+ <a-form-item :label="`${def.label} — 评分`">
|
|
|
<a-input-number
|
|
<a-input-number
|
|
|
- v-model:value="reviewPoints"
|
|
|
|
|
|
|
+ :value="reviewFields[gid]?.points"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
:max="100"
|
|
:max="100"
|
|
|
class="w-full"
|
|
class="w-full"
|
|
|
placeholder="请填写分数"
|
|
placeholder="请填写分数"
|
|
|
|
|
+ :disabled="alreadySubmitted || gid !== currentUserGroupId"
|
|
|
|
|
+ @update:value="(v: number | null) => { if (!reviewFields[gid]) reviewFields[gid] = { opinion: null, points: null }; reviewFields[gid].points = v; }"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="!isNoProgressChange || reviewProgressInfo?.canReject" class="flex flex-col flex-1">
|
|
|
|
|
- <a-form-item required label="不通过回退:回退原因">
|
|
|
|
|
- <a-textarea
|
|
|
|
|
- v-model:value="rejectReason"
|
|
|
|
|
|
|
+ <div v-if="displayFieldDefs.length === 0" class="flex flex-col flex-1">
|
|
|
|
|
+ <a-form-item required :label="isNoProgressChange ? `提交意见:${reviewLevelLabel}` : `审核通过:${reviewLevelLabel}`">
|
|
|
|
|
+ <a-select
|
|
|
|
|
+ :value="reviewFields[currentUserGroupId]?.opinion"
|
|
|
allow-clear
|
|
allow-clear
|
|
|
- placeholder="请输入回退原因"
|
|
|
|
|
- rows="5"
|
|
|
|
|
- maxlength="500"
|
|
|
|
|
- show-count
|
|
|
|
|
|
|
+ placeholder="请选择审核意见"
|
|
|
|
|
+ :options="opinionSelectOptions"
|
|
|
|
|
+ :disabled="alreadySubmitted"
|
|
|
|
|
+ @update:value="(v: number | null) => { if (!reviewFields[currentUserGroupId]) reviewFields[currentUserGroupId] = { opinion: null, points: null }; reviewFields[currentUserGroupId].opinion = v; }"
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="评分">
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ :value="reviewFields[currentUserGroupId]?.points"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ :max="100"
|
|
|
|
|
+ class="w-full"
|
|
|
|
|
+ placeholder="请填写分数"
|
|
|
|
|
+ :disabled="alreadySubmitted"
|
|
|
|
|
+ @update:value="(v: number | null) => { if (!reviewFields[currentUserGroupId]) reviewFields[currentUserGroupId] = { opinion: null, points: null }; reviewFields[currentUserGroupId].points = v; }"
|
|
|
/>
|
|
/>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div v-if="!isNoProgressChange || reviewProgressInfo?.canReject" class="flex flex-col flex-1">
|
|
|
|
|
+ <a-alert
|
|
|
|
|
+ v-if="currentForm.rejectReason"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ show-icon
|
|
|
|
|
+ class="mb-4"
|
|
|
|
|
+ :message="`历史修改意见: ${currentForm.rejectReason}`"
|
|
|
|
|
+ />
|
|
|
|
|
+ <a-form-item required label="不通过回退:回退原因">
|
|
|
|
|
+ <a-textarea
|
|
|
|
|
+ v-model:value="rejectReason"
|
|
|
|
|
+ allow-clear
|
|
|
|
|
+ placeholder="请输入回退原因"
|
|
|
|
|
+ rows="5"
|
|
|
|
|
+ maxlength="500"
|
|
|
|
|
+ show-count
|
|
|
|
|
+ />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex row w-full gap-3">
|
|
<div class="flex row w-full gap-3">
|
|
|
- <div class="flex flex-col flex-1">
|
|
|
|
|
- <a-button
|
|
|
|
|
- block
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :loading="submitLoading"
|
|
|
|
|
- :disabled="!canSubmitReview"
|
|
|
|
|
- @click="submitReview"
|
|
|
|
|
- >
|
|
|
|
|
- {{ isNoProgressChange ? '提交意见' : '通过审核' }}
|
|
|
|
|
- </a-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="isNoProgressChange || reviewProgressInfo?.canReject" class="flex flex-col flex-1">
|
|
|
|
|
- <a-button
|
|
|
|
|
- block
|
|
|
|
|
- danger
|
|
|
|
|
- :loading="rejectLoading"
|
|
|
|
|
- :disabled="!canSubmitReview"
|
|
|
|
|
- @click="submitReject"
|
|
|
|
|
- >
|
|
|
|
|
- {{ isNoProgressChange ? '预回退' : '回退'}}
|
|
|
|
|
- </a-button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <template v-if="!alreadySubmitted">
|
|
|
|
|
+ <div class="flex flex-col flex-1">
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ block
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="submitLoading"
|
|
|
|
|
+ :disabled="!canSubmitReview"
|
|
|
|
|
+ @click="submitReview"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ isNoProgressChange ? '提交意见' : '通过审核' }}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="isNoProgressChange || reviewProgressInfo?.canReject" class="flex flex-col flex-1">
|
|
|
|
|
+ <a-button
|
|
|
|
|
+ block
|
|
|
|
|
+ danger
|
|
|
|
|
+ :loading="rejectLoading"
|
|
|
|
|
+ :disabled="!canSubmitReview"
|
|
|
|
|
+ @click="submitReject"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ isNoProgressChange ? '预回退' : '回退'}}
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
</a-form>
|
|
</a-form>
|
|
|
</a-card>
|
|
</a-card>
|
|
@@ -136,7 +185,7 @@ import { computed, h, onMounted, ref, watch } from 'vue';
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
import { message, Modal } from 'ant-design-vue';
|
|
import { message, Modal } from 'ant-design-vue';
|
|
|
import { RequestApiError } from '@imengyu/imengyu-utils';
|
|
import { RequestApiError } from '@imengyu/imengyu-utils';
|
|
|
-import { ArrowLeftOutlined, UpOutlined, DownOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
|
+import { ArrowLeftOutlined, UpOutlined, DownOutlined, FileTextOutlined } from '@ant-design/icons-vue';
|
|
|
import AssessmentContentApi, {
|
|
import AssessmentContentApi, {
|
|
|
type CheckItemInfo,
|
|
type CheckItemInfo,
|
|
|
getRejectTypeText,
|
|
getRejectTypeText,
|
|
@@ -147,7 +196,7 @@ import SelfAssessmentFormDisplay from './components/SelfAssessmentFormDisplay.vu
|
|
|
import { useSimpleDataLoader } from '@/composeables/useSimpleDataLoader';
|
|
import { useSimpleDataLoader } from '@/composeables/useSimpleDataLoader';
|
|
|
import { useAuthStore } from '@/stores/auth';
|
|
import { useAuthStore } from '@/stores/auth';
|
|
|
import { useMemorizeVar } from '@/composeables/useMemorizeVar';
|
|
import { useMemorizeVar } from '@/composeables/useMemorizeVar';
|
|
|
-import { GROUP_TO_REVIEW_PROGRESS, GROUP_DISTRICT_ST, GROUP_DISTRICT_ND, GROUP_DISTRICT_RD, GROUP_DISTRICT_TH, PROGRESS_SUBMIT_LABELS } from './composeables/GroupData.ts';
|
|
|
|
|
|
|
+import { GROUP_TO_REVIEW_PROGRESS, GROUP_DISTRICT_ST, GROUP_DISTRICT_ND, GROUP_DISTRICT_RD, GROUP_DISTRICT_TH, GROUP_DISTRICT_FI, PROGRESS_SUBMIT_LABELS, GROUP_FIELD_MAP, type GroupFieldDef } from './composeables/GroupData.ts';
|
|
|
import { isInMiniProgram } from '@/composeables/MiniProgramIng.ts';
|
|
import { isInMiniProgram } from '@/composeables/MiniProgramIng.ts';
|
|
|
import { useReview } from './composeables/Review.ts';
|
|
import { useReview } from './composeables/Review.ts';
|
|
|
|
|
|
|
@@ -181,10 +230,26 @@ const { variable: reviewCardCollapsed } = useMemorizeVar<boolean>('evaluation-fo
|
|
|
|
|
|
|
|
const submitLoading = ref(false);
|
|
const submitLoading = ref(false);
|
|
|
const rejectLoading = ref(false);
|
|
const rejectLoading = ref(false);
|
|
|
-const reviewOpinion = ref<number | null>(null);
|
|
|
|
|
-const reviewPoints = ref<number | null>(null);
|
|
|
|
|
const rejectReason = ref<string | null>(null);
|
|
const rejectReason = ref<string | null>(null);
|
|
|
|
|
|
|
|
|
|
+interface ReviewFieldState {
|
|
|
|
|
+ opinion: number | null;
|
|
|
|
|
+ points: number | null;
|
|
|
|
|
+}
|
|
|
|
|
+const reviewFields = ref<Record<number, ReviewFieldState>>({});
|
|
|
|
|
+
|
|
|
|
|
+const displayGroupIds = computed(() => {
|
|
|
|
|
+ const info = reviewProgressInfo.value;
|
|
|
|
|
+ if (!info) return [currentUserGroupId.value];
|
|
|
|
|
+ return info.displayGroup ?? [currentUserGroupId.value];
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
|
|
+const displayFieldDefs = computed(() => {
|
|
|
|
|
+ return displayGroupIds.value
|
|
|
|
|
+ .map((gid) => ({ gid, def: GROUP_FIELD_MAP[gid] }))
|
|
|
|
|
+ .filter((item): item is { gid: number; def: GroupFieldDef } => !!item.def);
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
const opinionSelectOptions = [
|
|
const opinionSelectOptions = [
|
|
|
{ label: '请选择', value: 0 },
|
|
{ label: '请选择', value: 0 },
|
|
|
{ label: '优秀', value: 1 },
|
|
{ label: '优秀', value: 1 },
|
|
@@ -209,6 +274,7 @@ const alreadySubmitted = computed(() => {
|
|
|
const gid = currentUserGroupId.value;
|
|
const gid = currentUserGroupId.value;
|
|
|
if (gid === GROUP_DISTRICT_ST) return (f.districtSt ?? 0) > 0;
|
|
if (gid === GROUP_DISTRICT_ST) return (f.districtSt ?? 0) > 0;
|
|
|
if (gid === GROUP_DISTRICT_ND) return (f.districtNd ?? 0) > 0;
|
|
if (gid === GROUP_DISTRICT_ND) return (f.districtNd ?? 0) > 0;
|
|
|
|
|
+ if (gid === GROUP_DISTRICT_FI) return (f.districtFi ?? 0) > 0;
|
|
|
return false;
|
|
return false;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -236,36 +302,24 @@ async function loadCheckItems(f: SelfAssessmentDetail) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function applyPrefillFromDetail(f: SelfAssessmentDetail) {
|
|
function applyPrefillFromDetail(f: SelfAssessmentDetail) {
|
|
|
- const gid = currentUserGroupId.value;
|
|
|
|
|
rejectReason.value = f.rejectReason;
|
|
rejectReason.value = f.rejectReason;
|
|
|
- if (gid === GROUP_DISTRICT_ST) {
|
|
|
|
|
- reviewOpinion.value = f.districtSt ?? null;
|
|
|
|
|
- reviewPoints.value = f.districtStPoints || null;
|
|
|
|
|
- } else if (gid === GROUP_DISTRICT_ND) {
|
|
|
|
|
- reviewOpinion.value = f.districtNd ?? null;
|
|
|
|
|
- reviewPoints.value = f.districtNdPoints || null;
|
|
|
|
|
- } else if (gid === GROUP_DISTRICT_RD) {
|
|
|
|
|
- reviewOpinion.value = f.districtRd ?? null;
|
|
|
|
|
- reviewPoints.value = f.districtRdPoints || null;
|
|
|
|
|
- } else if (gid === GROUP_DISTRICT_TH) {
|
|
|
|
|
- reviewOpinion.value = f.districtTh ?? null;
|
|
|
|
|
- reviewPoints.value = f.districtThPoints || null;
|
|
|
|
|
- } else {
|
|
|
|
|
- const t = reviewProgressInfo.value.target;
|
|
|
|
|
- if (t === 2) {
|
|
|
|
|
- reviewOpinion.value = f.ichUnit ?? null;
|
|
|
|
|
- reviewPoints.value = f.unitPoints || null;
|
|
|
|
|
- } else if (t === 3) {
|
|
|
|
|
- reviewOpinion.value = f.county ?? null;
|
|
|
|
|
- reviewPoints.value = f.countyPoints || null;
|
|
|
|
|
- } else if (t === 4) {
|
|
|
|
|
- reviewOpinion.value = f.district ?? null;
|
|
|
|
|
- reviewPoints.value = f.districtPoints || null;
|
|
|
|
|
- } else if (t === 5) {
|
|
|
|
|
- reviewOpinion.value = f.province ?? null;
|
|
|
|
|
- reviewPoints.value = f.provincePoints || null;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const fields: Record<number, ReviewFieldState> = {};
|
|
|
|
|
+ for (const { gid, def } of displayFieldDefs.value) {
|
|
|
|
|
+ fields[gid] = {
|
|
|
|
|
+ opinion: (f as any)[def.opinionField] ?? null,
|
|
|
|
|
+ points: (f as any)[def.pointsField] || null,
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ // fallback for non-displayGroup roles (progress-based)
|
|
|
|
|
+ if (displayFieldDefs.value.length === 0) {
|
|
|
|
|
+ const gid = currentUserGroupId.value;
|
|
|
|
|
+ const t = reviewProgressInfo.value?.target;
|
|
|
|
|
+ if (t === 2) fields[gid] = { opinion: f.ichUnit ?? null, points: f.unitPoints || null };
|
|
|
|
|
+ else if (t === 3) fields[gid] = { opinion: f.county ?? null, points: f.countyPoints || null };
|
|
|
|
|
+ else if (t === 4) fields[gid] = { opinion: f.district ?? null, points: f.districtPoints || null };
|
|
|
|
|
+ else if (t === 5) fields[gid] = { opinion: f.province ?? null, points: f.provincePoints || null };
|
|
|
}
|
|
}
|
|
|
|
|
+ reviewFields.value = fields;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const loader = useSimpleDataLoader(async () => {
|
|
const loader = useSimpleDataLoader(async () => {
|
|
@@ -300,6 +354,29 @@ onMounted(() => {
|
|
|
loader.load();
|
|
loader.load();
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+async function goToAssessmentProtocol() {
|
|
|
|
|
+ const list = await AssessmentContentApi.getUserAgreementList({
|
|
|
|
|
+ year: new Date().getFullYear(),
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
|
+ keywords: currentForm.value?.inheritor || undefined
|
|
|
|
|
+ });
|
|
|
|
|
+ if (list.data.length === 0) {
|
|
|
|
|
+ message.warning('无可审核的传承协议');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ const item = list.data[0];
|
|
|
|
|
+ const path = router.resolve({
|
|
|
|
|
+ name: 'CollectAgreementSignReview',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: String(item.agreementId),
|
|
|
|
|
+ userId: String(item.userId),
|
|
|
|
|
+ ...(item.progress != null ? { progress: String(item.progress) } : {}),
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ window.open(path.href, '_blank');
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
async function submitReject() {
|
|
async function submitReject() {
|
|
|
const f = currentForm.value;
|
|
const f = currentForm.value;
|
|
|
if (!f?.id) {
|
|
if (!f?.id) {
|
|
@@ -342,37 +419,42 @@ async function submitReview() {
|
|
|
message.warning('当前账号用户组无权提交审核');
|
|
message.warning('当前账号用户组无权提交审核');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (reviewOpinion.value == null || reviewOpinion.value === 0) {
|
|
|
|
|
|
|
+ const gid = currentUserGroupId.value;
|
|
|
|
|
+ const myField = reviewFields.value[gid];
|
|
|
|
|
+ if (myField?.opinion == null || myField.opinion === 0) {
|
|
|
message.warning('请选择审核意见');
|
|
message.warning('请选择审核意见');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (reviewPoints.value == null) {
|
|
|
|
|
|
|
+ if (myField?.points == null) {
|
|
|
message.warning('请输入审核评分');
|
|
message.warning('请输入审核评分');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- const gid = currentUserGroupId.value;
|
|
|
|
|
- const points = reviewPoints.value;
|
|
|
|
|
- const op = reviewOpinion.value;
|
|
|
|
|
const noProgressChange = isNoProgressChange.value;
|
|
const noProgressChange = isNoProgressChange.value;
|
|
|
- const base = { id: f.id, progress: noProgressChange ? f.progress : reviewProgressInfo.value.target };
|
|
|
|
|
|
|
+ const base: Record<string, any> = { id: f.id, progress: noProgressChange ? f.progress : reviewProgressInfo.value.target };
|
|
|
|
|
+
|
|
|
|
|
+ // Collect all fields from the display group
|
|
|
|
|
+ for (const { gid: fieldGid, def } of displayFieldDefs.value) {
|
|
|
|
|
+ const state = reviewFields.value[fieldGid];
|
|
|
|
|
+ if (state?.opinion != null && state.opinion > 0) {
|
|
|
|
|
+ base[def.opinionField] = state.opinion;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (state?.points != null) {
|
|
|
|
|
+ base[def.pointsField] = state.points;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // Fallback for non-displayGroup (progress-based) roles
|
|
|
|
|
+ if (displayFieldDefs.value.length === 0) {
|
|
|
|
|
+ const op = myField.opinion;
|
|
|
|
|
+ const points = myField.points;
|
|
|
|
|
+ if (base.progress === 2) { base.ichUnit = op; base.unitPoints = points; }
|
|
|
|
|
+ else if (base.progress === 3) { base.county = op; base.countyPoints = points; }
|
|
|
|
|
+ else if (base.progress === 4) { base.district = op; base.districtPoints = points; }
|
|
|
|
|
+ else { base.province = op; base.provincePoints = points; }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
submitLoading.value = true;
|
|
submitLoading.value = true;
|
|
|
- if (gid === GROUP_DISTRICT_ST)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, districtSt: op, districtStPoints: points });
|
|
|
|
|
- else if (gid === GROUP_DISTRICT_ND)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, districtNd: op, districtNdPoints: points });
|
|
|
|
|
- else if (gid === GROUP_DISTRICT_RD)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, districtRd: op, districtRdPoints: points });
|
|
|
|
|
- else if (gid === GROUP_DISTRICT_TH)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, districtTh: op, districtThPoints: points });
|
|
|
|
|
- else if (base.progress === 2)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, ichUnit: op, unitPoints: points });
|
|
|
|
|
- else if (base.progress === 3)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, county: op, countyPoints: points });
|
|
|
|
|
- else if (base.progress === 4)
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, district: op, districtPoints: points });
|
|
|
|
|
- else
|
|
|
|
|
- await AssessmentContentApi.reviewSelfAssessment({ ...base, province: op, provincePoints: points });
|
|
|
|
|
|
|
+ await AssessmentContentApi.reviewSelfAssessment(base as any);
|
|
|
message.success(noProgressChange ? '意见提交成功' : '审核提交成功');
|
|
message.success(noProgressChange ? '意见提交成功' : '审核提交成功');
|
|
|
loader.load();
|
|
loader.load();
|
|
|
} catch (e) {
|
|
} catch (e) {
|