From 4af0bfb0661ee115c3e4a3a2f5f5cf68b916f9b1 Mon Sep 17 00:00:00 2001 From: 18571350067 Date: Fri, 26 Nov 2021 18:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8C=BA=E5=B0=81=E8=A3=85?= =?UTF-8?q?=20select=20select-dictionary=20select-dictionary-tree=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8D=95=E9=80=89=E5=A4=9A=E9=80=89=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E=E8=AF=BE=E7=A8=8B=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchCom/index.vue | 7 +++++-- src/views/course/CourseList.vue | 15 +++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/SearchCom/index.vue b/src/components/SearchCom/index.vue index 39d5e84..e168b82 100644 --- a/src/components/SearchCom/index.vue +++ b/src/components/SearchCom/index.vue @@ -7,15 +7,18 @@ - + {{ j.name }} - + {{ j.name }} + + + diff --git a/src/views/course/CourseList.vue b/src/views/course/CourseList.vue index fdd5323..ce41fdb 100644 --- a/src/views/course/CourseList.vue +++ b/src/views/course/CourseList.vue @@ -32,6 +32,7 @@ import { STable, SearchCom } from '@/components' import { getCourseList, deleteCourse } from '@/api/course/course' import { dictionaryDropDown } from '@/api/sys/dictionaryItem' +import { dictToTree } from '@/utils/util' export default { components: { @@ -44,7 +45,8 @@ export default { queryParam: { courseName: this.$route.query.courseName || '' }, queryOptions: [ { type: 'input', placeholder: '课程名称', key: 'courseName' }, - { type: 'select', placeholder: '请选择标签', key: 'tag', options: [] }, + { type: 'select-dic-tree', placeholder: '请选择课程类别', key: 'courseType' , options: [] }, + { type: 'select-dic', placeholder: '请选择标签', key: 'tag', mode: 'multiple', options: [] }, ], loadData: (parameter) => { return getCourseList(Object.assign(parameter, this.queryParam)).then((res) => { @@ -68,13 +70,14 @@ export default { dictionaryDropDown() { this.formLoading = false + //课程类别 + dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => { + this.queryOptions[1].options = dictToTree(res.data, [], 0); + }) + //课程标签字典 dictionaryDropDown({ dictionaryCode: '0008' }).then((res) => { - const tagList = res.data - for (let i = 0; i < tagList.length; i++) { - tagList[i].id = tagList[i].value.toString() - } - this.queryOptions[1].options = tagList + this.queryOptions[2].options = res.data }) }, handleRefresh() {