Bladeren bron

💊 修复标题显示年份问题

快乐的梦鱼 1 maand geleden
bovenliggende
commit
713886124b

+ 1 - 3
src/pages/collect/assessment/evaluation-form-review.vue

@@ -196,8 +196,6 @@ const progressHint = computed(() => {
   return `${lpText}。${roleText}。`;
 });
 
-const currentYear = new Date().getFullYear();
-
 function levelTitleFromForm(f: SelfAssessmentDetail) {
   if (f.level === 23) return '国家级';
   if (f.level === 24) return '省级';
@@ -208,7 +206,7 @@ function levelTitleFromForm(f: SelfAssessmentDetail) {
 function loadEditorContent(f: SelfAssessmentDetail) {
   if (typeof f.content !== 'object' || f.content === null)
     f.content = {};
-  f.content.title = `传承人填写${currentYear}年1月1日至${currentYear}年12月31日${levelTitleFromForm(f)}非遗传承人义务履行和传承补助经费使用情况等,不超过1000字,如未履行职责请进行说明。参考提纲如下:`;
+  f.content.title = `传承人填写${f.year}年1月1日至${f.year}年12月31日${levelTitleFromForm(f)}非遗传承人义务履行和传承补助经费使用情况等,不超过1000字,如未履行职责请进行说明。参考提纲如下:`;
   for (let i = 0; i < 8; i++) {
     if (typeof f.content[`item${i}`] !== 'string')
       f.content[`item${i}`] = '';

+ 1 - 3
src/pages/collect/assessment/evaluation-form.vue

@@ -99,8 +99,6 @@ const externalReviewSectionTitles = ref([
 const externalReviewScoreRow1 = ['优秀', '合格', '不合格'] as const;
 const externalReviewScoreRow2 = ['丧失传承能力', '取消资格'] as const;
 
-const currentYear = new Date().getFullYear();
-
 const levelTitle = computed(() => {
   if (currentForm.value?.level === 23) return '国家级';
   if (currentForm.value?.level === 24) return '省级';
@@ -113,7 +111,7 @@ function loadEditorContent() {
     return;
   if (typeof currentForm.value.content !== 'object' || currentForm.value.content === null)
     currentForm.value.content = {};
-  currentForm.value.content.title = `传承人填写${currentYear}年1月1日至${currentYear}年12月31日${levelTitle.value}非遗传承人义务履行和传承补助经费使用情况等,不超过1000字,如未履行职责请进行说明。参考提纲如下:`;
+  currentForm.value.content.title = `传承人填写${currentForm.value.year}年1月1日至${currentForm.value.year}年12月31日${levelTitle.value}非遗传承人义务履行和传承补助经费使用情况等,不超过1000字,如未履行职责请进行说明。参考提纲如下:`;
   for (let i = 0; i < 8; i++) {
     if (typeof currentForm.value.content[`item${i}`] !== 'string')
       currentForm.value.content[`item${i}`] = '';