zs 1 gadu atpakaļ
vecāks
revīzija
c0fd000c18

+ 5 - 0
src/views/user/teacher/index.vue

@@ -141,6 +141,7 @@ const educationList = ref([])
 const learnStatusList = ref([])
 const gradeList = ref([])
 const cardTypeList = ref([])
+const subjectList = ref([])
 const showList = ref([])
 const searchOther = async () => {
   let result
@@ -162,6 +163,9 @@ const searchOther = async () => {
   // 身份证类型
   result = await dictDataStore.query({ code: 'cardType', is_use: '0' })
   if ($checkRes(result)) cardTypeList.value = result.data
+  // 学科
+  result = await dictDataStore.query({ code: 'subject', is_use: '0' })
+  if ($checkRes(result)) subjectList.value = result.data
   // 是否公开
   result = await dictDataStore.query({ code: 'isUse', is_use: '0' })
   if ($checkRes(result)) showList.value = result.data
@@ -218,6 +222,7 @@ provide('form', form)
 provide('statusList', statusList)
 provide('genderList', genderList)
 provide('gradeList', gradeList)
+provide('subjectList', subjectList)
 provide('learnStatusList', learnStatusList)
 provide('cardTypeList', cardTypeList)
 provide('educationList', educationList)

+ 10 - 0
src/views/user/teacher/parts/user.vue

@@ -40,6 +40,15 @@
           :value="i.value"
         ></el-option>
       </template>
+      <template #subject>
+        <el-option
+          disabled
+          v-for="i in subjectList"
+          :key="i._id"
+          :label="i.label"
+          :value="i.value"
+        ></el-option>
+      </template>
       <template #learnStatus>
         <el-option
           disabled
@@ -79,6 +88,7 @@ const gradeList = inject('gradeList')
 const cardTypeList = inject('cardTypeList')
 const educationList = inject('educationList')
 const learnStatusList = inject('learnStatusList')
+const subjectList = inject('subjectList')
 </script>
 <style scoped lang="scss">
 .tags {