Prechádzať zdrojové kódy

🎨 增加退回显示

快乐的梦鱼 2 týždňov pred
rodič
commit
710d67b8fc

+ 5 - 1
src/api/collect/AssessmentContent.ts

@@ -457,7 +457,11 @@ export class SelfAssessmentDetail extends DataModel<SelfAssessmentDetail> {
   updatetime = '' as string;
   deletetime = '' as string|null;
   selfText = '' as string;
-  checkItems :  SelfAssessmentCheckItemAnswer[] = [];
+  checkItems :  SelfAssessmentCheckItemAnswer[] = [];  
+  /** 退回状态: 0=无,1=自评阶段退回,2=项目保护单位退回,3=县(区)文旅部门退回,4=设区市文旅部门/省非遗中心退回,5=省文化和旅游厅退回 */
+  rejectType?: number;
+  /** 退回原因 */
+  rejectReason?: string;
 }
 
 /** 传承协议详情 */

+ 26 - 7
src/pages/collect/assessment/components/SelfAssessmentResultBlock.vue

@@ -1,7 +1,10 @@
 <template>
   <FlexCol gap="gap.lg">
     <FlexCol v-for="sec in reviewSections" :key="sec.key" gap="gap.lg">
-      <Text bold :text="sec.title" />
+      <FlexRow align="center" gap="gap.sm">
+        <Text bold :text="sec.title" />
+        <Tag v-if="currentForm.rejectType === sec.rejectTypeValue" type="danger" text="已退回" />
+      </FlexRow>
       <FlexRow wrap align="center" gap="gap.md">
         <CheckBox
           v-for="opt in opinionOptions"
@@ -17,6 +20,12 @@
         <Text v-if="currentForm[sec.pointsField]" :text="String(currentForm[sec.pointsField])" />
         <Text v-else color="text.second" text="(待审核填写)" />
       </FlexRow>
+      <Alert 
+        v-if="currentForm.rejectType === sec.rejectTypeValue && currentForm.rejectReason"  
+        type="danger" 
+        message="您的信息被退回,请检查修改后重新提交"
+        :description="`退回原因:${currentForm.rejectReason}`" 
+      />
     </FlexCol>
   </FlexCol>
 </template>
@@ -27,14 +36,24 @@ import FlexCol from '@/components/layout/FlexCol.vue';
 import FlexRow from '@/components/layout/FlexRow.vue';
 import Text from '@/components/basic/Text.vue';
 import CheckBox from '@/components/form/CheckBox.vue';
+import Tag from '@/components/display/Tag.vue';
+import Alert from '@/components/feedback/Alert.vue';
+import { onMounted } from 'vue';
 
 type OpinionField = 'ichUnit' | 'county' | 'district' | 'province';
 type PointsField = 'unitPoints' | 'countyPoints' | 'districtPoints' | 'provincePoints';
 
-defineProps<{
+const props = defineProps<{
   currentForm: SelfAssessmentDetail;
 }>();
 
+onMounted(() => {
+  setTimeout(() => {
+      props.currentForm.rejectType = 2;
+      props.currentForm.rejectReason = '测试退回';
+  }, 200);
+});
+
 const opinionOptions = [
   { label: '优秀', value: 1 },
   { label: '合格', value: 2 },
@@ -42,10 +61,10 @@ const opinionOptions = [
   { label: '丧失传承能力', value: 4 },
   { label: '取消资格', value: 5 },
 ];
-const reviewSections: { key: string; title: string; opinionField: OpinionField; pointsField: PointsField }[] = [
-  { key: 'ichUnit', title: '1. 项目保护单位意见', opinionField: 'ichUnit', pointsField: 'unitPoints' },
-  { key: 'county', title: '2. 县(区)文旅部门审核意见', opinionField: 'county', pointsField: 'countyPoints' },
-  { key: 'district', title: '3. 设区市文旅部门、省非遗中心审核意见', opinionField: 'district', pointsField: 'districtPoints' },
-  { key: 'province', title: '4. 省文化和旅游厅意见', opinionField: 'province', pointsField: 'provincePoints' },
+const reviewSections: { 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: 'province', title: '4. 省文化和旅游厅意见', opinionField: 'province', pointsField: 'provincePoints', rejectTypeValue: 5 },
 ];
 </script>