|  | @@ -15,14 +15,11 @@ import {
 | 
	
		
			
				|  |  |    Area,
 | 
	
		
			
				|  |  |  } from 'vant';
 | 
	
		
			
				|  |  |  import { useRoute, useRouter } from 'vue-router';
 | 
	
		
			
				|  |  | -import threeMan from './images/update/three-man.png'
 | 
	
		
			
				|  |  | +// import threeMan from './images/update/three-man.png'
 | 
	
		
			
				|  |  |  import OWxTip from '@/components/m-wx-tip';
 | 
	
		
			
				|  |  | -import { browser, getHttpOrigin, getUrlCode, checkPhone } from '@/helpers/utils';
 | 
	
		
			
				|  |  | +import { checkPhone } from '@/helpers/utils';
 | 
	
		
			
				|  |  |  import qs from 'query-string';
 | 
	
		
			
				|  |  |  import request from '@/helpers/request';
 | 
	
		
			
				|  |  | -import { goWechatAuth } from '@/state';
 | 
	
		
			
				|  |  | -import { useInterval, useIntervalFn } from '@vueuse/core';
 | 
	
		
			
				|  |  | -import MMessageTip from '@/components/m-message-tip';
 | 
	
		
			
				|  |  |  import MImgCode from '@/components/m-img-code';
 | 
	
		
			
				|  |  |  import MSearch from '@/components/m-search';
 | 
	
		
			
				|  |  |  import submitBtn from './images/submit_icon.png'
 | 
	
	
		
			
				|  | @@ -30,14 +27,15 @@ import signupBtn from './images/signup_icon.png'
 | 
	
		
			
				|  |  |  import signSusIcon from './images/sign_icon.png'
 | 
	
		
			
				|  |  |  import subSusIcon from './images/subsus_icon.png'
 | 
	
		
			
				|  |  |  import doneIcon from './images/done_icon.png'
 | 
	
		
			
				|  |  | -import { subscribe } from 'diagnostics_channel';
 | 
	
		
			
				|  |  | -import { api_sysAreaQueryAllProvince } from '@/views/school-register/api';
 | 
	
		
			
				|  |  | +import { api_sysAreaQueryAllProvince, api_queryTennatArea } from '@/views/school-register/api';
 | 
	
		
			
				|  |  | +import useAuthCode from '@/hooks/useAuthCode';
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default defineComponent({
 | 
	
		
			
				|  |  |    name: 'fill-questionnaire',
 | 
	
		
			
				|  |  |    setup() {
 | 
	
		
			
				|  |  |      const router = useRouter();
 | 
	
		
			
				|  |  |      const route = useRoute();
 | 
	
		
			
				|  |  | +    const authCode = useAuthCode();
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const classList: any = [];
 | 
	
		
			
				|  |  |      for (let i = 1; i <= 40; i++) {
 | 
	
	
		
			
				|  | @@ -201,31 +199,35 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        code: null as any,
 | 
	
		
			
				|  |  |        areaPopupIndex: null as any,
 | 
	
		
			
				|  |  |        customSearchText: '' as any,
 | 
	
		
			
				|  |  | +      tenantId: null as any, // 机构id
 | 
	
		
			
				|  |  | +      customQuestionE: null as any, // 自定义的题目标题
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      onMounted(async () => {
 | 
	
		
			
				|  |  | +      // 根据机构id获取省市区id
 | 
	
		
			
				|  |  | +      forms.tenantId = route.query.tenantId
 | 
	
		
			
				|  |  | +      if (sessionStorage.getItem('customQuestionE')) {
 | 
	
		
			
				|  |  | +        forms.customQuestionE = sessionStorage.getItem('customQuestionE')
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      const { data } = await api_queryTennatArea(forms.tenantId)
 | 
	
		
			
				|  |  | +      if (data && data.length) {
 | 
	
		
			
				|  |  | +        forms.provinceCode = data[0].provinceCode
 | 
	
		
			
				|  |  | +        forms.cityCode = data[0].cityCode
 | 
	
		
			
				|  |  | +        forms.districtCode = data[0].regionCode
 | 
	
		
			
				|  |  | +        /**
 | 
	
		
			
				|  |  | +         * 2025.02.28,修改为不需要选区域,直接选学校,之前的逻辑如果areaName存在,则不需要选区域,后续可能会放开,又需要选区域,所以先随便给areaName赋值
 | 
	
		
			
				|  |  | +         */
 | 
	
		
			
				|  |  | +        forms.areaName = '学校名称'
 | 
	
		
			
				|  |  | +        //getSchoolAreaList()
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      console.log(333,forms.provinceCode)
 | 
	
		
			
				|  |  |        queryDetail();
 | 
	
		
			
				|  |  | -      getAreaList();
 | 
	
		
			
				|  |  | +      // getAreaList();
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    const getAppIdAndCode = async (url?: string) => {
 | 
	
		
			
				|  |  | -      try {
 | 
	
		
			
				|  |  | -        const { data } = await request.get(
 | 
	
		
			
				|  |  | -          '/edu-app/open/paramConfig/wechatAppId'
 | 
	
		
			
				|  |  | -        );
 | 
	
		
			
				|  |  | -        // 判断是否有微信appId
 | 
	
		
			
				|  |  | -        if (data) {
 | 
	
		
			
				|  |  | -          closeToast();
 | 
	
		
			
				|  |  | -          goWechatAuth(data, url);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } catch(e) {
 | 
	
		
			
				|  |  | -        //
 | 
	
		
			
				|  |  | -        console.log(e)
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    };
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      // 如果没有openId,跳转到第一个页面
 | 
	
		
			
				|  |  | -    if (!sessionStorage.getItem('active-open-id')) {
 | 
	
		
			
				|  |  | +    forms.openId = authCode.onWeChatCatchOpenId("GET");
 | 
	
		
			
				|  |  | +    if (!forms.openId) {
 | 
	
		
			
				|  |  |        router.push({
 | 
	
		
			
				|  |  |          path: '/intention-questionnaire',
 | 
	
		
			
				|  |  |          query: {
 | 
	
	
		
			
				|  | @@ -233,28 +235,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    if (browser().weixin) {
 | 
	
		
			
				|  |  | -      //授权
 | 
	
		
			
				|  |  | -      const openId = sessionStorage.getItem('active-open-id');
 | 
	
		
			
				|  |  | -      forms.openId = openId;
 | 
	
		
			
				|  |  | -      const code = getUrlCode();
 | 
	
		
			
				|  |  | -      console.log(code, 'code')
 | 
	
		
			
				|  |  | -      if (!code) {
 | 
	
		
			
				|  |  | -        const newUrl =
 | 
	
		
			
				|  |  | -          getHttpOrigin() +
 | 
	
		
			
				|  |  | -          window.location.pathname +
 | 
	
		
			
				|  |  | -          '#' +
 | 
	
		
			
				|  |  | -          route.path +
 | 
	
		
			
				|  |  | -          '?' +
 | 
	
		
			
				|  |  | -          qs.stringify({
 | 
	
		
			
				|  |  | -            ...route.query
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        getAppIdAndCode(newUrl);
 | 
	
		
			
				|  |  | -        return '';
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        forms.code = code;
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const onPageShow = () => {
 | 
	
		
			
				|  |  |        console.log(forms.isPageHide, 'showInfo');
 | 
	
	
		
			
				|  | @@ -278,10 +258,11 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          const { data } = await request.get(
 | 
	
		
			
				|  |  |            '/edu-app/open/schoolMeetingQuestion/detail?openId=' + forms.openId
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  | -        console.log(12222,data)
 | 
	
		
			
				|  |  | -        forms.provinceCode = data.provinceCode
 | 
	
		
			
				|  |  | -        forms.cityCode = data.cityCode
 | 
	
		
			
				|  |  | -        forms.districtCode = data.districtCode
 | 
	
		
			
				|  |  | +        if (!data) return;
 | 
	
		
			
				|  |  | +        // forms.provinceCode = data.provinceCode
 | 
	
		
			
				|  |  | +        // forms.cityCode = data.cityCode
 | 
	
		
			
				|  |  | +        // forms.districtCode = data.districtCode
 | 
	
		
			
				|  |  | +        // console.log(12222,data,forms.provinceCode)
 | 
	
		
			
				|  |  |          // 回显省市区
 | 
	
		
			
				|  |  |          forms.areaPopupIndex = data.districtCode || data.cityCode || data.provinceCode
 | 
	
		
			
				|  |  |          forms.areaPopupIndex = forms.areaPopupIndex ? String(forms.areaPopupIndex) : null
 | 
	
	
		
			
				|  | @@ -390,9 +371,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        if (checkForm()) {
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |            forms.submitLoading = true;
 | 
	
		
			
				|  |  | -          const { currentClass, districtCode, currentGrade, participationFlag,cityCode, openId,provinceCode,smsCode,phone,schoolAreaId,supportFlag,username,id} = forms
 | 
	
		
			
				|  |  | +          const { currentClass, districtCode, currentGrade, participationFlag,cityCode, openId,provinceCode,smsCode,phone,schoolAreaId,supportFlag,username,id, tenantId} = forms
 | 
	
		
			
				|  |  |            let params: any = {
 | 
	
		
			
				|  |  | -            currentClass, districtCode, currentGrade, participationFlag,cityCode, openId,provinceCode,schoolAreaId,supportFlag,username
 | 
	
		
			
				|  |  | +            currentClass, districtCode, currentGrade, participationFlag,cityCode, openId,provinceCode,schoolAreaId,supportFlag,username, tenantId
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            if (id) {
 | 
	
		
			
				|  |  |              params.id = id
 | 
	
	
		
			
				|  | @@ -612,12 +593,12 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              <p>1. 学校</p>
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  |                forms.schoolName ?
 | 
	
		
			
				|  |  | -              <div class={[styles.valDone, forms.schoolName && styles.valDone2, (forms.schoolStatus||forms.showPicker) && styles.openVal]} onClick={() => {
 | 
	
		
			
				|  |  | +              <div class={[styles.valDone, (forms.schoolStatus||forms.showPicker) && styles.openVal]} onClick={() => {
 | 
	
		
			
				|  |  |                  forms.schoolStatus = true
 | 
	
		
			
				|  |  |                  getSchoolAreaList()
 | 
	
		
			
				|  |  |                }}>
 | 
	
		
			
				|  |  |                  {forms.schoolName && <span class={styles.vdSchool}>{forms.schoolName}</span>}
 | 
	
		
			
				|  |  | -                <span class={styles.vdArea}>{forms.areaName}</span>
 | 
	
		
			
				|  |  | +                {/* <span class={styles.vdArea}>{forms.areaName}</span> */}
 | 
	
		
			
				|  |  |                  <i></i>
 | 
	
		
			
				|  |  |                </div> :
 | 
	
		
			
				|  |  |                <div class={[styles.valDot, styles.grayText, (forms.schoolStatus||forms.showPicker) && styles.openVal]} onClick={openAreaPop}>请选择学校<i></i></div>
 | 
	
	
		
			
				|  | @@ -669,10 +650,19 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            </div>
 | 
	
		
			
				|  |  |            <div class={styles.formItem}>
 | 
	
		
			
				|  |  |              {
 | 
	
		
			
				|  |  | -              route.query.meetingType === 'primarySchoolNo' || route.query.meetingType === 'juniorSchoolNo' ?
 | 
	
		
			
				|  |  | -              <p>6. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好乐器和“器乐数字Ai”应用软件两项学习工具,市面上均有提供,大约300多元一年。学校不涉及任何收费行为。如不参加,学生按原有方式进行音乐课学习。)</span></p> :
 | 
	
		
			
				|  |  | -              <p>6. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好“器乐数字Ai”应用软件,市面上均有提供,大约300多元一年,学校不涉及任何收费行为。如不参加,学生按原有方式进行器乐课程学习。)</span></p>
 | 
	
		
			
				|  |  | +              forms.customQuestionE ? 
 | 
	
		
			
				|  |  | +              <>
 | 
	
		
			
				|  |  | +                <div v-html={forms.customQuestionE}></div>
 | 
	
		
			
				|  |  | +              </> : 
 | 
	
		
			
				|  |  | +              <>
 | 
	
		
			
				|  |  | +                {
 | 
	
		
			
				|  |  | +                  route.query.meetingType === 'primarySchoolNo' || route.query.meetingType === 'juniorSchoolNo' ?
 | 
	
		
			
				|  |  | +                  <p>6. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好乐器和“器乐数字Ai”应用软件两项学习工具,市面上均有提供,大约300多元一年。学校不涉及任何收费行为。如不参加,学生按原有方式进行音乐课学习。)</span></p> :
 | 
	
		
			
				|  |  | +                  <p>6. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好“器乐数字Ai”应用软件,市面上均有提供,大约300多元一年,学校不涉及任何收费行为。如不参加,学生按原有方式进行器乐课程学习。)</span></p>
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +              </>
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              <div class={styles.selectItem}>
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  forms.willingList.map(item =>
 | 
	
	
		
			
				|  | @@ -860,9 +850,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                  {{
 | 
	
		
			
				|  |  |                    'columns-top': (
 | 
	
		
			
				|  |  |                      <div class={styles.columnsTop}>
 | 
	
		
			
				|  |  | -                      <Cell border={false} clickable={false} title={forms.areaName || '请选择省市区'} isLink onClick={() => {
 | 
	
		
			
				|  |  | +                      {/* <Cell border={false} clickable={false} title={forms.areaName || '请选择省市区'} isLink onClick={() => {
 | 
	
		
			
				|  |  |                          forms.showPicker = true;
 | 
	
		
			
				|  |  | -                      }} />
 | 
	
		
			
				|  |  | +                      }} /> */}
 | 
	
		
			
				|  |  |                        <MSearch
 | 
	
		
			
				|  |  |                          placeholder="请输入学校名称"
 | 
	
		
			
				|  |  |                          onSearch={(val: any) => {
 |