|
@@ -26,7 +26,7 @@ export default defineComponent({
|
|
|
realName: '',
|
|
|
phone: '',
|
|
|
subjectId: '',
|
|
|
- tenantId: '',
|
|
|
+ tenantId: route.query.tenantId,
|
|
|
birthdate: '',
|
|
|
code: ''
|
|
|
});
|
|
@@ -45,10 +45,11 @@ export default defineComponent({
|
|
|
openStatus: false,
|
|
|
dateState: 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')
|
|
|
if (!forms.username) {
|
|
|
Toast('请输入老师昵称')
|
|
@@ -65,9 +66,15 @@ export default defineComponent({
|
|
|
if (!forms.idCardNo) {
|
|
|
Toast('请输入身份证号')
|
|
|
}
|
|
|
- if (!forms.subjectId) {
|
|
|
+ if (data.choiceSubjectIds.length < 1) {
|
|
|
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 () => {
|
|
|
try {
|
|
@@ -144,12 +151,22 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const downApp = () => {
|
|
|
+ window.open(location.origin + '/student/#/download?type=teacher')
|
|
|
data.showSuccess = false
|
|
|
}
|
|
|
|
|
|
const onChoice = (val: any) => {
|
|
|
+
|
|
|
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 () =>
|
|
@@ -252,7 +269,7 @@ export default defineComponent({
|
|
|
label="声部"
|
|
|
placeholder="请选择声部"
|
|
|
readonly
|
|
|
- v-model={data.cityName}
|
|
|
+ v-model={data.choiceSubjectNames}
|
|
|
onClick={() => (data.searchStatus = true)}>
|
|
|
{{
|
|
|
button: () => (
|