|
@@ -26,7 +26,7 @@ export default defineComponent({
|
|
realName: '',
|
|
realName: '',
|
|
phone: '',
|
|
phone: '',
|
|
subjectId: '',
|
|
subjectId: '',
|
|
- tenantId: '',
|
|
|
|
|
|
+ tenantId: route.query.tenantId,
|
|
birthdate: '',
|
|
birthdate: '',
|
|
code: ''
|
|
code: ''
|
|
});
|
|
});
|
|
@@ -45,10 +45,11 @@ export default defineComponent({
|
|
openStatus: false,
|
|
openStatus: false,
|
|
dateState: false,
|
|
dateState: false,
|
|
showSuccess: false,
|
|
showSuccess: false,
|
|
- selectedSubjectList: [] as any,
|
|
|
|
- choiceSubjectIds: [] as any
|
|
|
|
|
|
+ // selectedSubjectList: [] as any,
|
|
|
|
+ choiceSubjectIds: [] as any,
|
|
|
|
+ choiceSubjectNames: [] as any
|
|
});
|
|
});
|
|
- const handleSubmit = () => {
|
|
|
|
|
|
+ const handleSubmit = async () => {
|
|
console.log(forms, 'forms')
|
|
console.log(forms, 'forms')
|
|
if (!forms.username) {
|
|
if (!forms.username) {
|
|
Toast('请输入老师昵称')
|
|
Toast('请输入老师昵称')
|
|
@@ -65,9 +66,15 @@ export default defineComponent({
|
|
if (!forms.idCardNo) {
|
|
if (!forms.idCardNo) {
|
|
Toast('请输入身份证号')
|
|
Toast('请输入身份证号')
|
|
}
|
|
}
|
|
- if (!forms.subjectId) {
|
|
|
|
|
|
+ if (data.choiceSubjectIds.length < 1) {
|
|
Toast('请选择声部')
|
|
Toast('请选择声部')
|
|
}
|
|
}
|
|
|
|
+ try {
|
|
|
|
+ const res = await request.post('/api-tenant/open/teacher/submit', { data: { ...forms, subjectId: data.choiceSubjectIds.join(',') } })
|
|
|
|
+ data.showSuccess = true
|
|
|
|
+ } catch (e) {
|
|
|
|
+ console.log(e)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
const getSubjectList = async () => {
|
|
const getSubjectList = async () => {
|
|
try {
|
|
try {
|
|
@@ -144,12 +151,22 @@ export default defineComponent({
|
|
}
|
|
}
|
|
|
|
|
|
const downApp = () => {
|
|
const downApp = () => {
|
|
|
|
+ window.open(location.origin + '/student/#/download?type=teacher')
|
|
data.showSuccess = false
|
|
data.showSuccess = false
|
|
}
|
|
}
|
|
|
|
|
|
const onChoice = (val: any) => {
|
|
const onChoice = (val: any) => {
|
|
|
|
+
|
|
data.searchStatus = false
|
|
data.searchStatus = false
|
|
- data.selectedSubjectList = [val]
|
|
|
|
|
|
+ data.choiceSubjectIds = [...val]
|
|
|
|
+ const chioseSound = [] as any
|
|
|
|
+ data.subjectList.forEach((item: any) => {
|
|
|
|
+ if (data.choiceSubjectIds.indexOf(item.id) != -1) {
|
|
|
|
+ chioseSound.push(item.name)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ data.choiceSubjectNames = [...chioseSound]
|
|
|
|
+ // data.choiceSubjectNames =
|
|
}
|
|
}
|
|
|
|
|
|
return () =>
|
|
return () =>
|
|
@@ -252,7 +269,7 @@ export default defineComponent({
|
|
label="声部"
|
|
label="声部"
|
|
placeholder="请选择声部"
|
|
placeholder="请选择声部"
|
|
readonly
|
|
readonly
|
|
- v-model={data.cityName}
|
|
|
|
|
|
+ v-model={data.choiceSubjectNames}
|
|
onClick={() => (data.searchStatus = true)}>
|
|
onClick={() => (data.searchStatus = true)}>
|
|
{{
|
|
{{
|
|
button: () => (
|
|
button: () => (
|