|
@@ -1,53 +1,59 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<a-typography-title :level="4">各级审核意见</a-typography-title>
|
|
<a-typography-title :level="4">各级审核意见</a-typography-title>
|
|
|
- <div v-for="sec in sections" :key="sec.key" class="mb-6">
|
|
|
|
|
- <a-typography-text strong>{{ sec.title }}</a-typography-text>
|
|
|
|
|
- <a-tag
|
|
|
|
|
- v-if="currentForm.rejectType === sec.rejectTypeValue"
|
|
|
|
|
- :title="currentForm.rejectReason"
|
|
|
|
|
- color="red"
|
|
|
|
|
- class="ml-2!"
|
|
|
|
|
- >
|
|
|
|
|
- 被退回
|
|
|
|
|
- <span v-if="currentForm.rejectReason" class="ml-2 max-w-100 truncate">原因:{{ currentForm.rejectReason }}</span>
|
|
|
|
|
- </a-tag>
|
|
|
|
|
- <a-space class="mt-2 ml-2" wrap>
|
|
|
|
|
- <a-radio-group
|
|
|
|
|
- :value="currentForm[sec.opinionField]"
|
|
|
|
|
- :disabled="readonly"
|
|
|
|
|
- @update:value="(v: number) => updateField(sec.opinionField, v)"
|
|
|
|
|
- >
|
|
|
|
|
- <a-radio v-for="opt in opinionOptions" :key="opt.value" :value="opt.value">{{ opt.label }}</a-radio>
|
|
|
|
|
- </a-radio-group>
|
|
|
|
|
- </a-space>
|
|
|
|
|
- <div class="mt-2 flex items-center gap-2">
|
|
|
|
|
- <a-typography-text>评分:</a-typography-text>
|
|
|
|
|
- <a-input-number
|
|
|
|
|
- v-if="currentForm[sec.pointsField]"
|
|
|
|
|
- :value="currentForm[sec.pointsField]"
|
|
|
|
|
- :disabled="readonly"
|
|
|
|
|
- :min="0"
|
|
|
|
|
- :max="200"
|
|
|
|
|
- placeholder="请输入评分"
|
|
|
|
|
- @update:value="(v: number | null) => updateField(sec.pointsField, v ?? 0)"
|
|
|
|
|
- />
|
|
|
|
|
- <span v-else>(待审核填写)</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="currentForm.rejectType === sec.rejectTypeValue && currentForm.rejectReason" class="mt-2 ml-2">
|
|
|
|
|
- <a-alert type="warning" show-icon>
|
|
|
|
|
- <template #message>退回原因:{{ currentForm.rejectReason }}</template>
|
|
|
|
|
- </a-alert>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :data-source="tableData"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ bordered
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
|
|
+ <template v-if="column.dataIndex === 'opinion'">
|
|
|
|
|
+ <span v-if="record.opinionValue">{{ getOpinionLabel(record.opinionValue) }}</span>
|
|
|
|
|
+ <span v-else class="text-gray-400">(待审核)</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="column.dataIndex === 'points'">
|
|
|
|
|
+ <template v-if="!readonly && record.editable">
|
|
|
|
|
+ <a-input-number
|
|
|
|
|
+ :value="currentForm[record.pointsField as PointsField]"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ :max="200"
|
|
|
|
|
+ placeholder="请输入评分"
|
|
|
|
|
+ @update:value="(v: number | null) => updateField(record.pointsField, v ?? 0)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <span v-if="record.pointsValue">{{ record.pointsValue }}</span>
|
|
|
|
|
+ <span v-else class="text-gray-400">(待审核填写)</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="column.dataIndex === 'reason'">
|
|
|
|
|
+ <span v-if="record.reason" class="text-orange-600">{{ record.reason }}</span>
|
|
|
|
|
+ <span v-else class="text-gray-400">暂无</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="column.dataIndex === 'reject'">
|
|
|
|
|
+ <a-tag v-if="currentForm.rejectType === record.rejectTypeValue" color="red">
|
|
|
|
|
+ 被退回
|
|
|
|
|
+ </a-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ <div v-if="currentForm.rejectType && currentForm.rejectReason" class="mt-4">
|
|
|
|
|
+ <a-alert type="warning" show-icon>
|
|
|
|
|
+ <template #message>退回原因:{{ currentForm.rejectReason }}</template>
|
|
|
|
|
+ </a-alert>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+import { computed } from 'vue';
|
|
|
import type { SelfAssessmentDetail } from '@/api/collect/AssessmentContent';
|
|
import type { SelfAssessmentDetail } from '@/api/collect/AssessmentContent';
|
|
|
|
|
+import { GROUP_PROTECT_UNIT, GROUP_DISTRICT, GROUP_DISTRICT_CENTER, GROUP_DISTRICT_ST, GROUP_DISTRICT_ND, GROUP_DISTRICT_RD, GROUP_DISTRICT_TH, GROUP_DISTRICT_FI, GROUP_PROVINCE } from '../composeables/GroupData';
|
|
|
|
|
|
|
|
-type OpinionField = 'ichUnit' | 'county' | 'district' | 'province' | 'districtSt' | 'districtNd' | 'districtRd' | 'districtTh';
|
|
|
|
|
-type PointsField = 'unitPoints' | 'countyPoints' | 'districtPoints' | 'provincePoints' | 'districtStPoints' | 'districtNdPoints' | 'districtRdPoints' | 'districtThPoints';
|
|
|
|
|
|
|
+type OpinionField = 'ichUnit' | 'county' | 'district' | 'province' | 'districtSt' | 'districtNd' | 'districtRd' | 'districtTh' | 'districtFi';
|
|
|
|
|
+type PointsField = 'unitPoints' | 'countyPoints' | 'districtPoints' | 'provincePoints' | 'districtStPoints' | 'districtNdPoints' | 'districtRdPoints' | 'districtThPoints' | 'districtFiPoints';
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{
|
|
const props = withDefaults(defineProps<{
|
|
|
currentForm: SelfAssessmentDetail;
|
|
currentForm: SelfAssessmentDetail;
|
|
@@ -64,17 +70,46 @@ const opinionOptions = [
|
|
|
{ label: '取消资格', value: 5 },
|
|
{ label: '取消资格', value: 5 },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
-const sections: { key: string; title: string; opinionField: OpinionField; pointsField: PointsField; rejectTypeValue: number }[] = [
|
|
|
|
|
- { key: 'ichUnit', title: '1. 项目保护单位意见', opinionField: 'ichUnit', pointsField: 'unitPoints', rejectTypeValue: 2 },
|
|
|
|
|
- { key: 'county', title: '2. 县(区)文旅部门审核意见', opinionField: 'county', pointsField: 'countyPoints', rejectTypeValue: 3 },
|
|
|
|
|
- { key: 'district', title: '3. 设区市文旅部门、省非遗中心审核意见', opinionField: 'district', pointsField: 'districtPoints', rejectTypeValue: 4 },
|
|
|
|
|
- { key: 'districtSt', title: '3-1. 项目负责人意见', opinionField: 'districtSt', pointsField: 'districtStPoints', rejectTypeValue: -1 },
|
|
|
|
|
- { key: 'districtNd', title: '3-2. 部门主任意见', opinionField: 'districtNd', pointsField: 'districtNdPoints', rejectTypeValue: -1 },
|
|
|
|
|
- { key: 'districtRd', title: '3-3. 分管领导意见', opinionField: 'districtRd', pointsField: 'districtRdPoints', rejectTypeValue: -1 },
|
|
|
|
|
- { key: 'districtTh', title: '3-4. 工服处意见', opinionField: 'districtTh', pointsField: 'districtThPoints', rejectTypeValue: 4 },
|
|
|
|
|
- { key: 'province', title: '4. 省文化和旅游厅意见', opinionField: 'province', pointsField: 'provincePoints', rejectTypeValue: 5 },
|
|
|
|
|
|
|
+function getOpinionLabel(value: number | null | undefined) {
|
|
|
|
|
+ if (!value) return '';
|
|
|
|
|
+ return opinionOptions.find(o => o.value === value)?.label ?? '';
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const sections: { key: string; title: string; opinionField: OpinionField; pointsField: PointsField; rejectTypeValue: number; groupId: number }[] = [
|
|
|
|
|
+ { key: 'ichUnit', title: '1. 项目保护单位意见', opinionField: 'ichUnit', pointsField: 'unitPoints', rejectTypeValue: 2, groupId: GROUP_PROTECT_UNIT },
|
|
|
|
|
+ { key: 'county', title: '2. 县(区)文旅部门审核意见', opinionField: 'county', pointsField: 'countyPoints', rejectTypeValue: 3, groupId: GROUP_DISTRICT },
|
|
|
|
|
+ { key: 'district', title: '3. 设区市文旅部门、省非遗中心审核意见', opinionField: 'district', pointsField: 'districtPoints', rejectTypeValue: 4, groupId: GROUP_DISTRICT_CENTER },
|
|
|
|
|
+ { key: 'districtSt', title: '3.1 项目负责人意见', opinionField: 'districtSt', pointsField: 'districtStPoints', rejectTypeValue: -1, groupId: GROUP_DISTRICT_ST },
|
|
|
|
|
+ { key: 'districtNd', title: '3.2 部门主任意见', opinionField: 'districtNd', pointsField: 'districtNdPoints', rejectTypeValue: -1, groupId: GROUP_DISTRICT_ND },
|
|
|
|
|
+ { key: 'districtRd', title: '3.3 分管领导意见', opinionField: 'districtRd', pointsField: 'districtRdPoints', rejectTypeValue: -1, groupId: GROUP_DISTRICT_RD },
|
|
|
|
|
+ { key: 'districtTh', title: '4.1 工服处意见', opinionField: 'districtTh', pointsField: 'districtThPoints', rejectTypeValue: 4, groupId: GROUP_DISTRICT_TH },
|
|
|
|
|
+ { key: 'districtFi', title: '4.2 工服处-分管领导意见', opinionField: 'districtFi', pointsField: 'districtFiPoints', rejectTypeValue: -1, groupId: GROUP_DISTRICT_FI },
|
|
|
|
|
+ { key: 'province', title: '5. 省文化和旅游厅意见', opinionField: 'province', pointsField: 'provincePoints', rejectTypeValue: 5, groupId: GROUP_PROVINCE },
|
|
|
|
|
+];
|
|
|
|
|
+
|
|
|
|
|
+const columns = [
|
|
|
|
|
+ { title: '审核环节', dataIndex: 'title', width: 220 },
|
|
|
|
|
+ { title: '审核意见', dataIndex: 'opinion', width: 120 },
|
|
|
|
|
+ { title: '评分', dataIndex: 'points', width: 120 },
|
|
|
|
|
+ { title: '退回/修改意见', dataIndex: 'reason', width: 200 },
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
+const tableData = computed(() => {
|
|
|
|
|
+ const reasons = props.currentForm.reasons || {};
|
|
|
|
|
+ return sections.map(sec => ({
|
|
|
|
|
+ key: sec.key,
|
|
|
|
|
+ title: sec.title,
|
|
|
|
|
+ opinionField: sec.opinionField,
|
|
|
|
|
+ pointsField: sec.pointsField,
|
|
|
|
|
+ opinionValue: props.currentForm[sec.opinionField] as number | null,
|
|
|
|
|
+ pointsValue: props.currentForm[sec.pointsField] as number | null,
|
|
|
|
|
+ rejectTypeValue: sec.rejectTypeValue,
|
|
|
|
|
+ groupId: sec.groupId,
|
|
|
|
|
+ reason: reasons[sec.groupId] || '',
|
|
|
|
|
+ editable: !props.readonly,
|
|
|
|
|
+ }));
|
|
|
|
|
+});
|
|
|
|
|
+
|
|
|
function updateField(field: OpinionField | PointsField, value: number) {
|
|
function updateField(field: OpinionField | PointsField, value: number) {
|
|
|
(props.currentForm as any)[field] = value;
|
|
(props.currentForm as any)[field] = value;
|
|
|
}
|
|
}
|