|
@@ -133,21 +133,21 @@ export default defineComponent({
|
|
|
currentClassText: '',
|
|
|
supportList: [
|
|
|
{
|
|
|
- title: '支持',
|
|
|
+ title: '支持学校开展',
|
|
|
val: true
|
|
|
},
|
|
|
{
|
|
|
- title: '不支持',
|
|
|
+ title: '不支持开展',
|
|
|
val: false
|
|
|
}
|
|
|
],
|
|
|
willingList: [
|
|
|
{
|
|
|
- title: '愿意',
|
|
|
+ title: '愿意参加并意向报名',
|
|
|
val: true
|
|
|
},
|
|
|
{
|
|
|
- title: '不愿意',
|
|
|
+ title: '不愿意参加',
|
|
|
val: false
|
|
|
}
|
|
|
],
|
|
@@ -182,7 +182,8 @@ export default defineComponent({
|
|
|
schoolName: '',
|
|
|
gradeNumText: '',
|
|
|
areaName: '',
|
|
|
- gradeStatus: false,
|
|
|
+ gradeStatus: false, // 年级状态
|
|
|
+ classStatus: false, // 班级状态
|
|
|
gradePopupShow: false,
|
|
|
gradePopupIndex: [] as any, // 年级下拉索引
|
|
|
classPopupShow: false,
|
|
@@ -191,6 +192,10 @@ export default defineComponent({
|
|
|
showPicker: false,
|
|
|
gradeAndClass: [gradeList, classList],
|
|
|
gradeAndClassIndex: [] as any,
|
|
|
+ gradeOptions: gradeList,
|
|
|
+ classOptions: classList,
|
|
|
+ gradeOptionIndex: [] as any,
|
|
|
+ classOptionIndex: [] as any,
|
|
|
submitLoading: false,
|
|
|
id: null as any,
|
|
|
code: null as any,
|
|
@@ -217,6 +222,15 @@ export default defineComponent({
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 如果没有openId,跳转到第一个页面
|
|
|
+ if (!sessionStorage.getItem('active-open-id')) {
|
|
|
+ router.push({
|
|
|
+ path: '/intention-questionnaire',
|
|
|
+ query: {
|
|
|
+ meetingType: route.query.meetingType
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
if (browser().weixin) {
|
|
|
//授权
|
|
|
const openId = sessionStorage.getItem('active-open-id');
|
|
@@ -286,7 +300,9 @@ export default defineComponent({
|
|
|
const gradeIdx = gradeList.find(item => item.text === data.currentGrade)?.value || 1
|
|
|
// @ts-ignore
|
|
|
const classIdx = classList.find(item => item.text === data.currentClass)?.value || 1
|
|
|
- forms.gradeAndClassIndex = [gradeIdx, classIdx]
|
|
|
+ // forms.gradeAndClassIndex = [gradeIdx, classIdx]
|
|
|
+ forms.gradeOptionIndex = [gradeIdx]
|
|
|
+ forms.classOptionIndex = [classIdx]
|
|
|
getSchoolAreaList()
|
|
|
} catch {
|
|
|
//
|
|
@@ -323,6 +339,7 @@ export default defineComponent({
|
|
|
};
|
|
|
|
|
|
const checkForm = (status = true) => {
|
|
|
+ const regex = /^[\u4e00-\u9fa5]{2,14}$/;
|
|
|
if (!forms.schoolAreaId) {
|
|
|
showToast('请选择学校');
|
|
|
return false;
|
|
@@ -331,8 +348,16 @@ export default defineComponent({
|
|
|
showToast('请输入姓名');
|
|
|
return false;
|
|
|
}
|
|
|
+ if (!regex.test(forms.username)) {
|
|
|
+ showToast('请输入正确的中文姓名');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (!forms.currentGrade) {
|
|
|
+ showToast('请选择年级');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if (!forms.currentClass) {
|
|
|
- showToast('请选择年级班级');
|
|
|
+ showToast('请选择班级');
|
|
|
return false;
|
|
|
}
|
|
|
if (forms.supportFlag === null) {
|
|
@@ -424,6 +449,8 @@ export default defineComponent({
|
|
|
// 如果没有选省市区,默认打开省市区弹窗
|
|
|
if (!forms.areaName) {
|
|
|
forms.showPicker = true
|
|
|
+ } else {
|
|
|
+ forms.schoolStatus = true
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -574,12 +601,17 @@ export default defineComponent({
|
|
|
</Field>
|
|
|
</div>
|
|
|
<div class={styles.formItem}>
|
|
|
- <p>3. 年级班级</p>
|
|
|
- <div class={[styles.valDot, !forms.currentClass && styles.grayText, forms.gradeStatus && styles.openVal]}
|
|
|
- onClick={()=> forms.gradeStatus = true}>{forms.currentClass ? forms.currentGrade+forms.currentClass : '请选择年级班级'}<i></i></div>
|
|
|
+ <p>3. 年级</p>
|
|
|
+ <div class={[styles.valDot, !forms.currentGrade && styles.grayText, forms.gradeStatus && styles.openVal]}
|
|
|
+ onClick={()=> forms.gradeStatus = true}>{forms.currentGrade ? forms.currentGrade : '请选择年级'}<i></i></div>
|
|
|
</div>
|
|
|
<div class={styles.formItem}>
|
|
|
- <p>4. 在您了解以上数字化转型事项后,您是否支持学校开展音乐(器乐)课堂数字化转型</p>
|
|
|
+ <p>4. 班级</p>
|
|
|
+ <div class={[styles.valDot, !forms.currentClass && styles.grayText, forms.classStatus && styles.openVal]}
|
|
|
+ onClick={()=> forms.classStatus = true}>{forms.currentClass ? forms.currentClass : '请选择班级'}<i></i></div>
|
|
|
+ </div>
|
|
|
+ <div class={styles.formItem}>
|
|
|
+ <p>5. 在您了解以上数字化转型事项后,您是否支持学校开展音乐(器乐)课堂数字化转型</p>
|
|
|
<div class={styles.selectItem}>
|
|
|
{
|
|
|
forms.supportList.map(item =>
|
|
@@ -592,7 +624,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class={styles.formItem}>
|
|
|
- <p>5. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好“器乐数字Ai”应用软件,市面上均有提供,大约300多元一年,学校不涉及任何收费行为。如不参加,学生按原有方式进行器乐课程学习)</span></p>
|
|
|
+ <p>6. 您是否愿意学生参加数字化转型<span>(注:以学生及家长自愿参加为原则。如愿意参加,家长需自行为学生准备好“器乐数字Ai”应用软件,市面上均有提供,大约300多元一年,学校不涉及任何收费行为。如不参加,学生按原有方式进行器乐课程学习)</span></p>
|
|
|
<div class={styles.selectItem}>
|
|
|
{
|
|
|
forms.willingList.map(item =>
|
|
@@ -738,6 +770,7 @@ export default defineComponent({
|
|
|
|
|
|
{/* 互通学校 */}
|
|
|
<Popup
|
|
|
+ zIndex={2001}
|
|
|
v-model:show={forms.schoolStatus}
|
|
|
position="bottom"
|
|
|
round
|
|
@@ -792,7 +825,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
)}
|
|
|
</Popup>
|
|
|
- {/* 年级班级 */}
|
|
|
+ {/* 年级 */}
|
|
|
<Popup
|
|
|
v-model:show={forms.gradeStatus}
|
|
|
position="bottom"
|
|
@@ -809,20 +842,52 @@ export default defineComponent({
|
|
|
{forms.gradePopupShow && (
|
|
|
<Picker
|
|
|
showToolbar
|
|
|
- v-model={forms.gradeAndClassIndex}
|
|
|
- columns={forms.gradeAndClass}
|
|
|
+ v-model={forms.gradeOptionIndex}
|
|
|
+ columns={forms.gradeOptions}
|
|
|
onCancel={() => (forms.gradeStatus = false)}
|
|
|
onConfirm={(val: any) => {
|
|
|
- // console.log('选择1111',val)
|
|
|
- forms.gradeAndClassIndex = [val.selectedOptions[0].value, val.selectedOptions[1].value]
|
|
|
- forms.currentGrade = val.selectedOptions[0].text;
|
|
|
- forms.currentClass = val.selectedOptions[1].text;
|
|
|
- forms.gradeStatus = false;
|
|
|
+ console.log('选择1111',val)
|
|
|
+ // forms.gradeAndClassIndex = [val.selectedOptions[0].value, val.selectedOptions[1].value]
|
|
|
+ // forms.currentGrade = val.selectedOptions[0].text;
|
|
|
+ // forms.currentClass = val.selectedOptions[1].text;
|
|
|
|
|
|
+ forms.currentGrade = val.selectedOptions[0].text
|
|
|
+ forms.gradeOptionIndex = [val.selectedOptions[0].value]
|
|
|
+ forms.gradeStatus = false;
|
|
|
}}
|
|
|
/>
|
|
|
)}
|
|
|
</Popup>
|
|
|
+ {/* 班级 */}
|
|
|
+ <Popup
|
|
|
+ v-model:show={forms.classStatus}
|
|
|
+ position="bottom"
|
|
|
+ round
|
|
|
+ safeAreaInsetBottom
|
|
|
+ lazyRender={false}
|
|
|
+ class={'popupBottomSearch'}
|
|
|
+ onOpen={() => {
|
|
|
+ forms.gradePopupShow = true;
|
|
|
+ }}
|
|
|
+ onClosed={() => {
|
|
|
+ forms.gradePopupShow = false;
|
|
|
+ }}>
|
|
|
+ {forms.gradePopupShow && (
|
|
|
+ <Picker
|
|
|
+ showToolbar
|
|
|
+ v-model={forms.classOptionIndex}
|
|
|
+ columns={forms.classOptions}
|
|
|
+ onCancel={() => (forms.classStatus = false)}
|
|
|
+ onConfirm={(val: any) => {
|
|
|
+ console.log('选择1111',val)
|
|
|
+ forms.currentClass = val.selectedOptions[0].text
|
|
|
+ forms.classOptionIndex = [val.selectedOptions[0].value]
|
|
|
+ forms.classStatus = false;
|
|
|
+
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ )}
|
|
|
+ </Popup>
|
|
|
</div>
|
|
|
);
|
|
|
}
|