Explorar o código

🎨 协议迁移至网页端1

快乐的梦鱼 hai 2 semanas
pai
achega
b08ade3d30

+ 5 - 261
src/pages/collect/assessment/argeement-sign.vue

@@ -1,270 +1,14 @@
 <template>
-  <CommonRoot>
-    <FlexCol padding="space.lg">
-      <SimplePageContentLoader :loader="loader">
-        <template v-if="loader.isLoaded.value">
-          <Result
-            v-if="!currentAgreement"
-            status="info"
-            title="您还未签署传承协议"
-            description="请先签署传承协议"
-          >
-            <Height :height="30" />
-            <Button type="primary" @click="createAgreement">去签署传承协议</Button>
-          </Result>
-          <FlexCol v-else gap="gap.md">
-            <Alert type="info" message="请仔细阅读传承协议,确保您已理解内容,并签署传承协议。" />
-
-            <FlexCol gap="gap.md">
-              <Form ref="formRef" :model="currentAgreement" :rules="formRules">
-                <H3>{{ agreementTitle }}</H3>
-
-                <AgreementBodyNational
-                  v-if="currentAgreement?.level === 23"
-                  :detail="(currentAgreement as AgreementDetail)"
-                  :agreement-year="agreementYear"
-                  :party-a-stamp-date="partyAStampDate"
-                  :party-b-sign-date="partyBSignDate"
-                  :upload-agreement-sign="uploadAgreementSign"
-                  @update:party-a-stamp-date="partyAStampDate = $event"
-                  @update:party-b-sign-date="partyBSignDate = $event"
-                />
-                <AgreementBodyProvincial
-                  v-else-if="currentAgreement?.level === 24"
-                  :detail="(currentAgreement as AgreementDetail)"
-                  :agreement-year="agreementYear"
-                  :party-a-stamp-date="partyAStampDate"
-                  :party-b-sign-date="partyBSignDate"
-                  :upload-agreement-sign="uploadAgreementSign"
-                  @update:party-a-stamp-date="partyAStampDate = $event"
-                  @update:party-b-sign-date="partyBSignDate = $event"
-                />
-                <AgreementBodyMunicipal
-                  v-else-if="currentAgreement?.level === 25"
-                  :detail="(currentAgreement as AgreementDetail)"
-                  :agreement-year="agreementYear"
-                  :party-a-stamp-date="partyAStampDate"
-                  :party-b-sign-date="partyBSignDate"
-                  :upload-agreement-sign="uploadAgreementSign"
-                  @update:party-a-stamp-date="partyAStampDate = $event"
-                  @update:party-b-sign-date="partyBSignDate = $event"
-                />
-              </Form>
-            </FlexCol>
-
-            <Button type="primary" block :loading="submitLoading" @click="saveAgreement">保存传承协议</Button>
-            <Button :loading="submitLoading" @click="downloadAgreement">下载协议PDF</Button>
-          </FlexCol>
-        </template>
-      </SimplePageContentLoader>
-    </FlexCol>
-  </CommonRoot>
+  <web-view :src="src" />
 </template>
 
 <script setup lang="ts">
-import { computed, ref } from 'vue';
-import { useAuthStore } from '@/store/auth';
-import { useSimpleDataLoader } from '@/components/composeabe/loader/SimpleDataLoader';
-import { assertNotNull, formatError } from '@imengyu/imengyu-utils';
-import { toast, alert } from '@/components/dialog/CommonRoot';
-import AssessmentContentApi, { AgreementDetail } from '@/api/collect/AssessmentContent';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import Result from '@/components/feedback/Result.vue';
-import SimplePageContentLoader from '@/components/loader/SimplePageContentLoader.vue';
-import Button from '@/components/basic/Button.vue';
-import Height from '@/components/layout/space/Height.vue';
-import H3 from '@/components/typography/H3.vue';
-import Alert from '@/components/feedback/Alert.vue';
-import Form, { type FormInstance } from '@/components/form/Form.vue';
-import AgreementBodyNational from './components/AgreementBodyNational.vue';
-import AgreementBodyProvincial from './components/AgreementBodyProvincial.vue';
-import AgreementBodyMunicipal from './components/AgreementBodyMunicipal.vue';
-import type { AgreementYmdParts } from './components/AgreementDateWriteBlock.vue';
-import type { Rules } from 'async-validator';
 import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
-import CommonRoot from '@/components/dialog/CommonRoot.vue';
-import { useImageSimpleUploadCo } from '@/common/components/upload/ImageUploadCo';
-import { injectAppConfiguration } from '@/api/system/useAppConfiguration';
+import { useWebPageUrl } from './composeabe/WebPageUrl';
 
 const { querys } = useLoadQuerys({
-  id: 0,
-  userId: 0,
-}, () => {
-  loader.load();
-});
-
-const authStore = useAuthStore();
-const appConfig = injectAppConfiguration();
-const currentAgreement = ref<AgreementDetail | null>(null);
-/** 甲方盖章日期(页面填写,保存时可拼为字符串提交) */
-const partyAStampDate = ref<AgreementYmdParts>({ year: '', month: '', day: '' });
-/** 乙方签署日期 */
-const partyBSignDate = ref<AgreementYmdParts>({ year: '', month: '', day: '' });
-
-const formRef = ref<FormInstance | null>(null);
-
-const CN_MOBILE_RE = /^1\d{10}$/;
-const CN_ID_RE = /^(?:\d{15}|\d{17}[\dXx])$/;
-
-const formRules = computed<Rules>(() => {
-  const rules: Rules = {
-    partyB: [{ required: true, message: '请填写乙方(传承人)姓名' }],
-    apprentice: [
-      { required: true, type: 'number', message: '请填写本年度带徒人数' },
-      { type: 'number', min: 0, max: 100, message: '须为不小于 0 的整数' },
-    ],
-    activity: [
-      { required: true, type: 'number', message: '请填写本年度宣传活动场次' },
-      { type: 'number', min: 0, max: 100, message: '须为不小于 0 的整数' },
-    ],
-    partyBSign: [
-      {
-        validator(_rule, value, callback) {
-          const s = typeof value === 'string' ? value.trim() : '';
-          if (!s)
-            callback(new Error('请完成乙方签名'));
-          else
-            callback();
-        },
-      },
-    ],
-    idCard: [
-      { required: true, message: '请填写身份证号' },
-    ],
-    ich: [{ required: true, message: '请填写非遗项目名称' }],
-    health: [{ required: true, message: '请填写身体状况' }],
-    mobile: [
-      { required: true, message: '请填写乙方联系电话' },
-      {
-        validator(_rule, value, callback) {
-          const s = value != null ? String(value).trim() : '';
-          if (!CN_MOBILE_RE.test(s))
-            callback(new Error('请输入正确的手机号'));
-          else
-            callback();
-        },
-      },
-    ],
-  };
-  if (currentAgreement.value?.level !== 25)
-    rules.course = [
-      { required: true, type: 'number', message: '请填写本年度研修班场次' },
-      { type: 'number', min: 0, max: 100, message: '须为不小于 0 的整数' },
-    ];
-  return rules;
-});
-
-async function loadBasicInfo() {
-  const basicInfo = await AssessmentContentApi.getInheritorBasic(authStore.userInfo?.id);
-  assertNotNull(currentAgreement.value, 'currentAgreement is null');
-  currentAgreement.value.partyB = basicInfo.name;
-  currentAgreement.value.mobile = basicInfo.mobile;
-  currentAgreement.value.idCard = basicInfo.idCard;
-  currentAgreement.value.ich = basicInfo.ichName;
-  currentAgreement.value.level = basicInfo.level;
-}
-
-const uploadAgreementSign = useImageSimpleUploadCo();
-
-const agreementYear = computed(() => currentAgreement.value?.year ?? 2027);
-const agreementTitle = computed(
-  () => `${agreementYear.value} 年度${levelTitle.value}非物质文化遗产代表性传承人传承协议`,
-);
-const levelTitle = computed(() => {
-  if (currentAgreement.value?.level === 23) return '国家级';
-  if (currentAgreement.value?.level === 24) return '省级';
-  return '市级';
-});
-const loader = useSimpleDataLoader(async () => {
-  if (querys.value.id > 0) {
-    const detail = await AssessmentContentApi.getAgreementDetail(querys.value.id, querys.value.userId);
-    currentAgreement.value = detail;
-    partyAStampDate.value = { year: '', month: '', day: '' };
-    partyBSignDate.value = { year: '', month: '', day: '' };
-    return currentAgreement.value;
-  }
-  const basicInfo = await AssessmentContentApi.getInheritorBasic(authStore.userInfo?.id);
-  if (basicInfo.agreementId > 0) {
-    const detail = await AssessmentContentApi.getAgreementDetail(
-      basicInfo.agreementId, 
-      authStore.userInfo?.id
-    );
-    currentAgreement.value = detail;
-    partyAStampDate.value = { year: '', month: '', day: '' };
-    partyBSignDate.value = { year: detail.updatetime.getFullYear().toString(), month: (detail.updatetime.getMonth() + 1).toString(), day: detail.updatetime.getDate().toString() };
-  } else {
-    currentAgreement.value = null;
-  }
-  return currentAgreement.value;
-});
-
-const submitLoading = ref(false);
-
-async function createAgreement() {
-  const now = new Date();
-  const u = authStore.userInfo;
-  const nick = u?.nickname || u?.diyname;
-  const uid = authStore.userInfo?.id ?? authStore.userId;
-  const basicInfo = await AssessmentContentApi.getInheritorBasic(uid);
-  const detail = new AgreementDetail();
-  detail.userId = authStore.userInfo!.id;
-  detail.year = appConfig.value?.collectSignYear || now.getFullYear() + 1;; 
-  if (basicInfo.level === 24) {
-    detail.partyA = '厦门市文化和旅游局';
-  } else if (basicInfo.level === 25) {
-    detail.partyA = basicInfo.regionText + '文化和旅游局';
-  } else {
-    detail.partyA = '福建省文化和旅游厅';
-  }
-  detail.partyB = nick ?? '';
-  console.log(authStore.userInfo, u, nick);
-  partyAStampDate.value = { year: now.getFullYear().toString(), month: (now.getMonth() + 1).toString(), day: now.getDate().toString() };
-  partyBSignDate.value = { year: now.getFullYear().toString(), month: (now.getMonth() + 1).toString(), day: now.getDate().toString() };
-  currentAgreement.value = detail;
-  loadBasicInfo();
+  id: number
+})
 
-}
-async function saveAgreement() {
-  const detail = currentAgreement.value;
-  console.log(detail);
-  
-  try {
-    await formRef.value?.validate();
-  } catch (error) {
-    toast('请填写完整信息');
-    return;
-  }
-  submitLoading.value = true;
-  try {
-    assertNotNull(detail, 'currentAgreement is null');
-    await AssessmentContentApi.saveAgreement(detail as AgreementDetail);
-    toast('保存传承协议成功');
-  } catch (error) {
-    alert({
-      title: '保存传承协议失败',
-      content: formatError(error),
-    });
-  }
-  submitLoading.value = false;
-}
-async function downloadAgreement() {
-  if (!currentAgreement.value?.id) {
-    toast('请先保存评估表后再下载PDF');
-    return;
-  }
-  try {
-    assertNotNull(currentAgreement.value, 'currentForm is null');
-    const pdfPath = await AssessmentContentApi.downloadAgreementPdf(currentAgreement.value.id);
-    uni.openDocument({
-      filePath: pdfPath,
-      fileType: 'pdf',
-      showMenu: true,
-    });
-  } catch (error) {
-    alert({
-      title: '下载评估表失败',
-      content: formatError(error),
-    });
-  }
-}
+const { src } = useWebPageUrl('/collect/assessment/argeement-sign?id=38&userId=134')
 </script>

+ 0 - 18
src/pages/collect/assessment/components/AgreementBody.vue

@@ -1,18 +0,0 @@
-<template>
-  <FlexCol :inner-style="articleWrapStyle">
-    <slot />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import FlexCol from '@/components/layout/FlexCol.vue';
-
-const articleWrapStyle = {
-  padding: '24rpx 28rpx',
-  borderRadius: '16rpx',
-  backgroundColor: '#fafafa',
-  borderWidth: '1rpx',
-  borderStyle: 'solid',
-  borderColor: '#eeeeee',
-};
-</script>

+ 0 - 202
src/pages/collect/assessment/components/AgreementBodyMunicipal.vue

@@ -1,202 +0,0 @@
-<template>
-  <AgreementBody>
-    <FlexCol gap="gap.sm">
-      <P>甲方:{{ detail.partyA }}</P>
-      <FlexRow align="center" wrap gap="gap.sm">
-        <Text font-config="p" color="text.content">乙方:</Text>
-        <AgreementPrefillInline
-          v-model="detail.partyB"
-          name="partyB"
-          placeholder="请填写乙方(传承人)姓名"
-        />
-      </FlexRow>
-    </FlexCol>
-
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      为传承弘扬中华优秀传统文化,有效保护和传承非物质文化遗产,鼓励和支持市级非物质文化遗产代表性传承人开展传承活动,根据《福建省非物质文化遗产条例》《厦门市市级非物质文化遗产代表性传承人认定与管理办法》等有关法律法规,制定协议,并按照下列各项条款签署,甲、乙双方共同遵守。
-    </Text>
-
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      九、甲乙双方应当以习近平新时代中国特色社会主义思想为指导,坚持以人民为中心,弘扬社会主义核心价值观,共同保护传承非物质文化遗产,推动中华优秀传统文化创造性转化、创新性发展。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十、甲方按照《厦门市市级非物质文化遗产代表性传承人认定与管理办法》的要求,支持市级非物质文化遗产代表性传承人开展传承、传播活动。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十一、甲方按照《福建省非物质文化遗产保护与传承专项资金管理办法》的要求,落实市文化和旅游局给予的代表性传承人的传承补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      十二、乙方应积极开展传承活动,培养后继人才,制定传承计划,{{ agreementYear }} 年度带徒
-      <AgreementPrefillInline
-        v-model="detail.apprentice"
-        name="apprentice"
-        number-mode
-        placeholder="人数"
-        suffix="人。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十三、乙方应妥善保存相关实物、资料情况。主动保存、提供与该项非遗项目有关的原始资料、实物,配合记录工作。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十四、乙方应主动、及时配合非遗调查,主动向文化和旅游主管部门、非遗保护中心反映非遗项目保护、传承情况和总结材料,并完成文化和旅游主管部门临时交办的非遗工作任务,提出保护的意见、建议。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      十五、乙方应积极、主动参加各级政府组织的非物质文化遗产公益性宣传活动,{{ agreementYear }} 年度完成
-      <AgreementPrefillInline
-        v-model="detail.activity"
-        name="activity"
-        number-mode
-        placeholder="场次"
-        suffix="场。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十六、乙方应合理使用市级非物质文化遗产代表性传承人补助经费,用于开展非遗项目的传习活动,做好传承补助经费使用记录、支出范围和绩效评价等,不得用于生活补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十七、乙方应积极参与非物质文化遗产相关理论和实践研究、发表(出版)论文、专著等研究。
-    </Text>
-
-  </AgreementBody>
-
-  <Height :height="16" />
-
-  <FlexCol :gap="'md'" :inner-style="signBlockStyle">
-    <Field
-      label="甲方"
-      label-position="top"
-      name="partyA"
-      disabled
-      v-model="detail.partyA"
-      placeholder="设区市文化和旅游局全称"
-      :show-bottom-border="true"
-    />
-    <Field
-      label="负责人(代表人)"
-      label-position="top"
-      v-model="detail.partyASign"
-      placeholder=""
-      :show-bottom-border="true"
-    />
-    <Field
-      label="甲方电话"
-      label-position="top"
-      name="partyAMobile"
-      type="tel"
-      v-model="detail.partyAMobile"
-      placeholder=""
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyAStampDate"
-      hint="(以实际盖章日期为准)"
-      @update:model-value="emit('update:partyAStampDate', $event)"
-    />
-
-    <Height :height="24" />
-
-    <FlexRow padding="space.sm">
-      <Text font-config="p" color="text.content" bold>乙方:{{ detail.partyB }}(签名)</Text>
-    </FlexRow>
-    <Field
-      label="乙方签名 / 说明"
-      label-position="top"
-      name="partyBSign"
-      showRightArrow
-    >
-      <SignatureField
-        v-model="detail.partyBSign"
-        placeholder=""
-        :upload="uploadAgreementSign"
-      />
-    </Field>
-    <Field
-      label="身份证号"
-      label-position="top"
-      name="idCard"
-      v-model="detail.idCard"
-      placeholder="请填写身份证号"
-    />
-    <Field
-      label="项目名称"
-      label-position="top"
-      name="ich"
-      v-model="detail.ich"
-      placeholder="非遗项目名称"
-    />
-    <Field
-      label="身体状况"
-      label-position="top"
-      name="health"
-      v-model="detail.health"
-      placeholder="请简要填写"
-    />
-    <Field
-      label="乙方电话"
-      label-position="top"
-      name="mobile"
-      type="tel"
-      v-model="detail.mobile"
-      placeholder="请填写联系电话"
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyBSignDate"
-      hint="(以实际签署日期为准)"
-      @update:model-value="emit('update:partyBSignDate', $event)"
-    />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import type { AgreementDetail } from '@/api/collect/AssessmentContent';
-import type { UploaderAction } from '@/components/form/Uploader';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import FlexRow from '@/components/layout/FlexRow.vue';
-import Height from '@/components/layout/space/Height.vue';
-import Text from '@/components/basic/Text.vue';
-import P from '@/components/typography/P.vue';
-import Field from '@/components/form/Field.vue';
-import SignatureField from '@/components/form/SignatureField.vue';
-import AgreementPrefillInline from './AgreementPrefillInline.vue';
-import AgreementDateWriteBlock, { type AgreementYmdParts } from './AgreementDateWriteBlock.vue';
-import AgreementBody from './AgreementBody.vue';
-
-defineProps<{
-  detail: AgreementDetail;
-  agreementYear: number;
-  partyAStampDate: AgreementYmdParts;
-  partyBSignDate: AgreementYmdParts;
-  uploadAgreementSign: (item: UploaderAction) => () => void;
-}>();
-
-const emit = defineEmits<{
-  (e: 'update:partyAStampDate', v: AgreementYmdParts): void;
-  (e: 'update:partyBSignDate', v: AgreementYmdParts): void;
-}>();
-
-const paragraphStyle = {
-  lineHeight: '1.75',
-  marginBottom: '12rpx',
-};
-const signBlockStyle = {
-  paddingTop: '8rpx',
-  backgroundColor: '#fafafa',
-  borderRadius: '16rpx',
-  borderWidth: '1rpx',
-  borderStyle: 'solid',
-  borderColor: '#eeeeee',
-  overflow: 'hidden',
-};
-</script>

+ 0 - 206
src/pages/collect/assessment/components/AgreementBodyNational.vue

@@ -1,206 +0,0 @@
-<template>
-  <AgreementBody>
-    <FlexCol gap="gap.sm">
-      <P>甲方:{{ detail.partyA }}</P>
-      <FlexRow align="center" wrap gap="gap.sm">
-        <Text font-config="p" color="text.content">乙方:</Text>
-        <AgreementPrefillInline
-          v-model="detail.partyB"
-          name="partyB"
-          placeholder="请填写乙方(传承人)姓名"
-        />
-      </FlexRow>
-    </FlexCol>
-
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      为传承弘扬中华优秀传统文化,有效保护和传承非物质文化遗产,鼓励和支持国家级非物质文化遗产代表性传承人开展传承活动,根据《中华人民共和国非物质文化遗产法》《国家级非物质文化遗产代表性传承人认定与管理办法》等有关法律法规,制定协议,并按照下列各项条款签署,甲、乙双方共同遵守。
-    </Text>
-    
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      一、甲乙双方应当以习近平新时代中国特色社会主义思想为指导,坚持以人民为中心,弘扬社会主义核心价值观,共同保护传承非物质文化遗产,推动中华优秀传统文化创造性转化、创新性发展。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      二、甲方按照《国家级非物质文化遗产代表性传承人认定与管理办法》的要求,支持国家级非物质文化遗产代表性传承人开展传承、传播活动。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      三、甲方按照《国家级非物质文化遗产保护专项资金管理办法》的要求,落实国家给予的代表性传承人的传承补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      四、乙方应积极开展传承活动,培养后继人才,制定传承计划,{{ agreementYear }} 年度带徒
-      <AgreementPrefillInline
-        v-model="detail.apprentice"
-        name="apprentice"
-        number-mode
-        placeholder="人数"
-        suffix="人。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      五、乙方应妥善保存相关实物、资料情况。主动保存、提供与该项非遗项目有关的原始资料、实物,配合记录工作。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      六、乙方应主动、及时配合非遗调查,主动向文化和旅游主管部门、非遗保护中心反映非遗项目保护、传承情况和总结材料,并完成文化和旅游主管部门临时交办的非遗工作任务,提出保护的意见、建议。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      七、乙方应积极、主动参加各级政府组织的非物质文化遗产公益性宣传活动,{{ agreementYear }} 年度完成
-      <AgreementPrefillInline
-        v-model="detail.activity"
-        name="activity"
-        number-mode
-        placeholder="场次"
-        suffix="场。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      八、乙方应合理使用国家级非物质文化遗产代表性传承人补助经费,用于开展非遗项目的传习活动,做好传承补助经费使用记录、支出范围和绩效评价等,不得用于生活补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      九、乙方应积极、主动参加文化和旅游部组织的非物质文化遗产代表性传承人研修班,{{ agreementYear }} 年度完成
-      <AgreementPrefillInline
-        v-model="detail.course"
-        name="course"
-        number-mode
-        placeholder="场次"
-        suffix="场。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十、乙方应积极参与非物质文化遗产相关理论和实践研究、发表(出版)论文、专著等研究。
-    </Text>
-
-  </AgreementBody>
-
-  <Height :height="16" />
-
-  <FlexCol :gap="'md'" :inner-style="signBlockStyle">
-    <FlexRow padding="space.sm">
-      <Text font-config="p" color="text.content" bold>甲方:福建省文化和旅游厅</Text>
-    </FlexRow>
-    <Field
-      label="负责人(代表人)"
-      label-position="top"
-      v-model="detail.partyASign"
-      placeholder=""
-      :show-bottom-border="true"
-    />
-    <Field
-      label="甲方电话"
-      label-position="top"
-      name="partyAMobile"
-      type="tel"
-      v-model="detail.partyAMobile"
-      placeholder=""
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyAStampDate"
-      hint="(以实际盖章日期为准)"
-      @update:model-value="emit('update:partyAStampDate', $event)"
-    />
-
-    <Height :height="24" />
-
-    <FlexRow padding="space.sm">
-      <Text font-config="p" color="text.content" bold>乙方:{{ detail.partyB }}(签名)</Text>
-    </FlexRow>
-    <Field
-      label="乙方签名 / 说明"
-      label-position="top"
-      name="partyBSign"
-      showRightArrow
-    >
-      <SignatureField
-        v-model="detail.partyBSign"
-        :upload="uploadAgreementSign"
-      />
-    </Field>
-    <Field
-      label="身份证号"
-      label-position="top"
-      name="idCard"
-      v-model="detail.idCard"
-      placeholder="请填写身份证号"
-    />
-    <Field
-      label="项目名称"
-      label-position="top"
-      name="ich"
-      v-model="detail.ich"
-      placeholder="非遗项目名称"
-    />
-    <Field
-      label="身体状况"
-      label-position="top"
-      name="health"
-      v-model="detail.health"
-      placeholder="请简要填写"
-    />
-    <Field
-      label="乙方电话"
-      label-position="top"
-      name="mobile"
-      type="tel"
-      v-model="detail.mobile"
-      placeholder="请填写联系电话"
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyBSignDate"
-      hint="(以实际签署日期为准)"
-      @update:model-value="emit('update:partyBSignDate', $event)"
-    />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import type { AgreementDetail } from '@/api/collect/AssessmentContent';
-import type { UploaderAction } from '@/components/form/Uploader';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import FlexRow from '@/components/layout/FlexRow.vue';
-import Height from '@/components/layout/space/Height.vue';
-import Text from '@/components/basic/Text.vue';
-import P from '@/components/typography/P.vue';
-import Field from '@/components/form/Field.vue';
-import SignatureField from '@/components/form/SignatureField.vue';
-import AgreementPrefillInline from './AgreementPrefillInline.vue';
-import AgreementDateWriteBlock, { type AgreementYmdParts } from './AgreementDateWriteBlock.vue';
-import AgreementBody from './AgreementBody.vue';
-
-defineProps<{
-  detail: AgreementDetail;
-  agreementYear: number;
-  partyAStampDate: AgreementYmdParts;
-  partyBSignDate: AgreementYmdParts;
-  uploadAgreementSign: (item: UploaderAction) => () => void;
-}>();
-
-const emit = defineEmits<{
-  (e: 'update:partyAStampDate', v: AgreementYmdParts): void;
-  (e: 'update:partyBSignDate', v: AgreementYmdParts): void;
-}>();
-
-const paragraphStyle = {
-  lineHeight: '1.75',
-  marginBottom: '12rpx',
-};
-const signBlockStyle = {
-  paddingTop: '8rpx',
-  backgroundColor: '#fafafa',
-  borderRadius: '16rpx',
-  borderWidth: '1rpx',
-  borderStyle: 'solid',
-  borderColor: '#eeeeee',
-  overflow: 'hidden',
-};
-</script>

+ 0 - 205
src/pages/collect/assessment/components/AgreementBodyProvincial.vue

@@ -1,205 +0,0 @@
-<template>
-  <AgreementBody>
-    <FlexCol gap="gap.sm">
-      <P>甲方:{{ detail.partyA }}</P>
-      <FlexRow align="center" wrap gap="gap.sm">
-        <Text font-config="p" color="text.content">乙方:</Text>
-        <AgreementPrefillInline
-          v-model="detail.partyB"
-          name="partyB"
-          placeholder="请填写乙方(传承人)姓名"
-        />
-      </FlexRow>
-    </FlexCol>
-
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      为传承弘扬中华优秀传统文化,有效保护和传承非物质文化遗产,鼓励和支持省级非物质文化遗产代表性传承人开展传承活动,根据《福建省非物质文化遗产条例》《福建省非物质文化遗产代表性传承人认定与管理办法》等有关法律法规,制定协议,并按照下列各项条款签署,甲、乙双方共同遵守。
-    </Text>
-    
-    <Height :height="8" />
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      一、甲乙双方应当以习近平新时代中国特色社会主义思想为指导,坚持以人民为中心,弘扬社会主义核心价值观,共同保护传承非物质文化遗产,推动中华优秀传统文化创造性转化、创新性发展。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      二、甲方按照《福建省非物质文化遗产代表性传承人认定与管理办法》的要求,支持省级非物质文化遗产代表性传承人开展传承、传播活动。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      三、甲方按照《福建省非物质文化遗产保护与传承专项资金管理办法》的要求,落实省文化和旅游厅给予的代表性传承人的传承补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      四、乙方应积极开展传承活动,培养后继人才,制定传承计划,{{ agreementYear }} 年度带徒
-      <AgreementPrefillInline
-        v-model="detail.apprentice"
-        name="apprentice"
-        number-mode
-        placeholder="人数"
-        suffix="人。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      五、乙方应妥善保存相关实物、资料情况。主动保存、提供与该项非遗项目有关的原始资料、实物,配合记录工作。
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      六、乙方应主动、及时配合非遗调查,主动向文化和旅游主管部门、非遗保护中心反映非遗项目保护、传承情况和总结材料,并完成文化和旅游主管部门临时交办的非遗工作任务,提出保护的意见、建议。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      七、乙方应积极、主动参加各级政府组织的非物质文化遗产公益性宣传活动,{{ agreementYear }} 年度完成
-      <AgreementPrefillInline
-        v-model="detail.activity"
-        name="activity"
-        number-mode
-        placeholder="场次"
-        suffix="场。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      八、乙方应合理使用省级非物质文化遗产代表性传承人补助经费,用于开展非遗项目的传习活动,做好传承补助经费使用记录、支出范围和绩效评价等,不得用于生活补助。
-    </Text>
-
-    <Text font-config="p" color="text.content" allow-child-node :inner-style="paragraphStyle">
-      九、乙方应积极、主动参加文化和旅游部组织的非物质文化遗产代表性传承人研修班,{{ agreementYear }} 年度完成
-      <AgreementPrefillInline
-        v-model="detail.course"
-        name="course"
-        number-mode
-        placeholder="场次"
-        suffix="场。"
-      />
-    </Text>
-
-    <Text font-config="p" color="text.content" :inner-style="paragraphStyle">
-      十、乙方应积极参与非物质文化遗产相关理论和实践研究、发表(出版)论文、专著等研究。
-    </Text>
-  </AgreementBody>
-
-  <Height :height="16" />
-
-  <FlexCol :gap="'md'" :inner-style="signBlockStyle">
-    <FlexRow padding="space.sm">
-      <Text font-config="p" color="text.content" bold>甲方:厦门市文化和旅游局</Text>
-    </FlexRow>
-    <Field
-      label="负责人(代表人)"
-      label-position="top"
-      v-model="detail.partyASign"
-      placeholder=""
-      :show-bottom-border="true"
-    />
-    <Field
-      label="甲方电话"
-      label-position="top"
-      name="partyAMobile"
-      type="tel"
-      v-model="detail.partyAMobile"
-      placeholder=""
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyAStampDate"
-      hint="(以实际盖章日期为准)"
-      @update:model-value="emit('update:partyAStampDate', $event)"
-    />
-
-    <Height :height="24" />
-
-    <FlexRow padding="space.sm">
-      <Text font-config="p" color="text.content" bold>乙方:{{ detail.partyB }}(签名)</Text>
-    </FlexRow>
-    <Field
-      label="乙方签名 / 说明"
-      label-position="top"
-      name="partyBSign"
-      showRightArrow
-    >
-      <SignatureField
-        v-model="detail.partyBSign"
-        :upload="uploadAgreementSign"
-      />
-    </Field>
-    <Field
-      label="身份证号"
-      label-position="top"
-      name="idCard"
-      v-model="detail.idCard"
-      placeholder="请填写身份证号"
-    />
-    <Field
-      label="项目名称"
-      label-position="top"
-      name="ich"
-      v-model="detail.ich"
-      placeholder="非遗项目名称"
-    />
-    <Field
-      label="身体状况"
-      label-position="top"
-      name="health"
-      v-model="detail.health"
-      placeholder="请简要填写"
-    />
-    <Field
-      label="乙方电话"
-      label-position="top"
-      name="mobile"
-      type="tel"
-      v-model="detail.mobile"
-      placeholder="请填写联系电话"
-    />
-    <AgreementDateWriteBlock
-      :model-value="partyBSignDate"
-      hint="(以实际签署日期为准)"
-      @update:model-value="emit('update:partyBSignDate', $event)"
-    />
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import type { AgreementDetail } from '@/api/collect/AssessmentContent';
-import type { UploaderAction } from '@/components/form/Uploader';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import FlexRow from '@/components/layout/FlexRow.vue';
-import Height from '@/components/layout/space/Height.vue';
-import Text from '@/components/basic/Text.vue';
-import P from '@/components/typography/P.vue';
-import Field from '@/components/form/Field.vue';
-import SignatureField from '@/components/form/SignatureField.vue';
-import AgreementPrefillInline from './AgreementPrefillInline.vue';
-import AgreementDateWriteBlock, { type AgreementYmdParts } from './AgreementDateWriteBlock.vue';
-import AgreementBody from './AgreementBody.vue';
-
-defineProps<{
-  detail: AgreementDetail;
-  agreementYear: number;
-  partyAStampDate: AgreementYmdParts;
-  partyBSignDate: AgreementYmdParts;
-  uploadAgreementSign: (item: UploaderAction) => () => void;
-}>();
-
-const emit = defineEmits<{
-  (e: 'update:partyAStampDate', v: AgreementYmdParts): void;
-  (e: 'update:partyBSignDate', v: AgreementYmdParts): void;
-}>();
-
-const paragraphStyle = {
-  lineHeight: '1.75',
-  marginBottom: '12rpx',
-};
-const signBlockStyle = {
-  paddingTop: '8rpx',
-  backgroundColor: '#fafafa',
-  borderRadius: '16rpx',
-  borderWidth: '1rpx',
-  borderStyle: 'solid',
-  borderColor: '#eeeeee',
-  overflow: 'hidden',
-};
-</script>

+ 0 - 105
src/pages/collect/assessment/components/AgreementDateWriteBlock.vue

@@ -1,105 +0,0 @@
-<template>
-  <FlexCol gap="gap.xs" padding="space.md">
-    <FlexRow align="center" wrap gap="gap.sm" :inner-style="rowOuterStyle">
-      <Text v-if="prefix" font-config="p" color="text.second" :inner-style="prefixStyle">
-        {{ prefix }}
-      </Text>
-      <AgreementPrefillInline
-        :model-value="modelValue.year"
-        placeholder="YYYY"
-        suffix="年"
-        :max-length="4"
-        :field-style="yearFieldStyle"
-        @update:model-value="(v) => patch('year', v)"
-      />
-      <AgreementPrefillInline
-        :model-value="modelValue.month"
-        placeholder="MM"
-        suffix="月"
-        :max-length="2"
-        :field-style="mdFieldStyle"
-        @update:model-value="(v) => patch('month', v)"
-      />
-      <AgreementPrefillInline
-        :model-value="modelValue.day"
-        placeholder="DD"
-        suffix="日"
-        :max-length="2"
-        :field-style="mdFieldStyle"
-        @update:model-value="(v) => patch('day', v)"
-      />
-    </FlexRow>
-    <Text v-if="hint" font-config="p" color="text.second" :inner-style="hintStyle">
-      {{ hint }}
-    </Text>
-  </FlexCol>
-</template>
-
-<script setup lang="ts">
-import type { ViewStyle, TextStyle } from '@/components/theme/ThemeDefine';
-import FlexCol from '@/components/layout/FlexCol.vue';
-import FlexRow from '@/components/layout/FlexRow.vue';
-import Text from '@/components/basic/Text.vue';
-import AgreementPrefillInline from './AgreementPrefillInline.vue';
-
-/** 年月日拆分填写(均为数字字符串) */
-export type AgreementYmdParts = {
-  year: string;
-  month: string;
-  day: string;
-};
-
-const props = withDefaults(
-  defineProps<{
-    modelValue: AgreementYmdParts;
-    /** 行前前缀,默认「时间:」 */
-    prefix?: string;
-    /** 第二行灰色说明 */
-    hint?: string;
-  }>(),
-  {
-    prefix: '时间:',
-    hint: '',
-  },
-);
-
-const emit = defineEmits<{
-  'update:modelValue': [value: AgreementYmdParts];
-}>();
-
-const rowOuterStyle: ViewStyle = {
-  marginTop: '8rpx',
-};
-
-const prefixStyle: TextStyle = {
-  flexShrink: 0,
-};
-
-const hintStyle: TextStyle = {
-  marginTop: '4rpx',
-};
-
-const yearFieldStyle: ViewStyle = {
-  minWidth: '110rpx',
-  maxWidth: '110rpx',
-};
-
-const mdFieldStyle: ViewStyle = {
-  minWidth: '78rpx',
-  maxWidth: '90rpx',
-};
-
-function digitsOnly(v: string | number, maxLen: number) {
-  const str = String(v ?? '').replace(/\D/g, '');
-  return str.slice(0, maxLen);
-}
-
-function patch(key: keyof AgreementYmdParts, v: string | number) {
-  const max = key === 'year' ? 4 : 2;
-  const next = digitsOnly(v, max);
-  emit('update:modelValue', {
-    ...props.modelValue,
-    [key]: next,
-  });
-}
-</script>

+ 0 - 98
src/pages/collect/assessment/components/AgreementPrefillInline.vue

@@ -1,98 +0,0 @@
-<template>
-  {{ label }}
-  <Field
-    :name="name"
-    :model-value="textValue"
-    :type="numberMode ? 'number' : 'text'"
-    :show-label="false"
-    :show-bottom-border="false"
-    :placeholder="placeholder"
-    :max-length="maxLength"
-    :field-style="mergedFieldStyle"
-    :input-style="mergedInputStyle"
-    :input-flex="1"
-    :auto-update-form-value="false"
-    @update:model-value="onUpdate"
-  />
-  {{ suffix }}
-</template>
-
-<script setup lang="ts">
-import { computed } from 'vue';
-import { useTheme, type ViewStyle, type TextStyle } from '@/components/theme/ThemeDefine';
-import Field from '@/components/form/Field.vue';
-
-const props = withDefaults(
-  defineProps<{
-    /** 绑定值:字符串或与 `number-mode` 搭配的数字 */
-    modelValue?: string | number | null;
-    /** 为 true 时对外 `update:modelValue` 发出数字(解析失败为 0) */
-    numberMode?: boolean;
-    placeholder?: string;
-    /** 输入框左侧短说明,如「带徒」 */
-    label?: string;
-    /** 输入框右侧固定文案,如「人」「场」 */
-    suffix?: string;
-    maxLength?: number;
-    /** 与 Form 的 `rules` 键一致,用于联表校验 */
-    name?: string;
-    /** 主题间距键,默认 sm */
-    gap?: string;
-    fieldStyle?: ViewStyle;
-    inputStyle?: TextStyle;
-  }>(),
-  {
-    modelValue: '',
-    numberMode: false,
-    placeholder: '请填写',
-    label: '',
-    suffix: '',
-    maxLength: 20,
-    gap: 'sm',
-    fieldStyle: () => ({}),
-    inputStyle: () => ({}),
-    name: undefined,
-  },
-);
-
-const emit = defineEmits<{
-  'update:modelValue': [value: string | number];
-}>();
-
-const themeContext = useTheme();
-
-const mergedFieldStyle = computed<ViewStyle>(() => ({
-  display: 'inline-block',
-  paddingVertical: themeContext.resolveThemeSize('AgreementPrefillFieldPaddingV', 6),
-  paddingHorizontal: themeContext.resolveThemeSize('AgreementPrefillFieldPaddingH', 12),
-  borderRadius: themeContext.resolveThemeSize('AgreementPrefillFieldRadius', '10rpx'),
-  backgroundColor: themeContext.resolveThemeColor('AgreementPrefillFieldBg', 'light'),
-  borderWidth: '1rpx',
-  borderStyle: 'solid',
-  borderColor: themeContext.resolveThemeColor('AgreementPrefillFieldBorder', 'border.cell'),
-  minWidth: themeContext.resolveThemeSize('AgreementPrefillFieldMinWidth', '80rpx'),
-  maxWidth: themeContext.resolveThemeSize('AgreementPrefillFieldMaxWidth', '100rpx'),
-  ...props.fieldStyle,
-}));
-
-const mergedInputStyle = computed<TextStyle>(() => ({
-  textAlign: 'center',
-  fontSize: themeContext.resolveThemeSize('AgreementPrefillInputFontSize', 28),
-  ...props.inputStyle,
-}));
-
-const textValue = computed(() =>
-  props.modelValue === null || props.modelValue === undefined ? '' : String(props.modelValue),
-);
-
-function onUpdate(raw: string) {
-  if (props.numberMode) {
-    const n = parseInt(raw.replace(/\D/g, ''), 10);
-    emit('update:modelValue', Number.isFinite(n) ? n : 0);
-    console.log( Number.isFinite(n) ? n : 0);
-    
-  } else {
-    emit('update:modelValue', raw);
-  }
-}
-</script>