diff --git a/src/views/project/form/ProjectCourseSelect.vue b/src/views/project/form/ProjectCourseSelect.vue
index 655de97..57c0bda 100644
--- a/src/views/project/form/ProjectCourseSelect.vue
+++ b/src/views/project/form/ProjectCourseSelect.vue
@@ -8,8 +8,8 @@
自主课程
-
-
+
+
@@ -62,6 +62,7 @@
import { coursewareClassList } from '@/api/course/courseware'
import { listByClass } from '@/api/course/course'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
+import { dictToTree } from '@/utils/util'
import { STable } from '@/components'
const rootParentId = 0
@@ -87,7 +88,7 @@ export default {
menuKey: ['sys'], //默认系统课程
// 查询参数
queryParam: { name: '', classType: 1, type: 1, tags: [] },
- replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' },
+ // replaceFields: { children: 'children', title: 'name', key: 'value', value: 'id' },
expandedKeys: [],
autoExpandParent: true,
dictCourseTag: [], //课程标签
@@ -256,21 +257,28 @@ export default {
},
//获取课程分类数据,转换成树结构
- getCourseTreeData(type) {
- coursewareClassList({ type: type }).then((res) => {
- //list转🌲
- const list2tree1 = (list, parentId) => {
- return list.filter((item) => {
- // 默认选中第一个节点
- if (!this.treeDataOne) this.treeDataOne.push(item.value)
- if (item.parentId === parentId) {
- item.children = list2tree1(list, item.id)
- return true
- }
- return false
- })
- }
- this.treeData = list2tree1(res.data, 0)
+ // getCourseTreeData(type) {
+ // coursewareClassList({ type: type }).then((res) => {
+ // //list转🌲
+ // const list2tree1 = (list, parentId) => {
+ // return list.filter((item) => {
+ // // 默认选中第一个节点
+ // if (!this.treeDataOne) this.treeDataOne.push(item.value)
+ // if (item.parentId === parentId) {
+ // item.children = list2tree1(list, item.id)
+ // return true
+ // }
+ // return false
+ // })
+ // }
+ // this.treeData = list2tree1(res.data, 0)
+ // })
+ // },
+ getCourseTreeData () {
+ dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
+ const result = dictToTree(res.data, [], 0)
+ console.log('result',result)
+ this.treeData = result
})
},
},
diff --git a/src/views/sys/dictionaryItem/DictionaryItemForm.vue b/src/views/sys/dictionaryItem/DictionaryItemForm.vue
index d9ea871..55c747c 100644
--- a/src/views/sys/dictionaryItem/DictionaryItemForm.vue
+++ b/src/views/sys/dictionaryItem/DictionaryItemForm.vue
@@ -17,7 +17,7 @@
-
+
{{ form.parentid }}
diff --git a/src/views/sys/dictionaryItem/DictionaryItemList.vue b/src/views/sys/dictionaryItem/DictionaryItemList.vue
index e1e1c8b..0d14faa 100644
--- a/src/views/sys/dictionaryItem/DictionaryItemList.vue
+++ b/src/views/sys/dictionaryItem/DictionaryItemList.vue
@@ -66,11 +66,11 @@ export default {
selectedRowKeys: [], // 选中行的key 出选择框时需要配置
selectedRows: [], // 选中行的数据
columns: [
- { title: '编号', width: 30, dataIndex: 'id', key: 'id' },
+ // { title: '编号', width: 30, dataIndex: 'id', key: 'id' },
{ title: '词典项名称', width: 30, dataIndex: 'name', key: 'name' },
{ title: '词典项值', width: 30, dataIndex: 'value', key: 'value' },
{ title: '词典标识', width: 30, dataIndex: 'dictionaryCode', key: 'dictionaryCode' },
- { title: '上级编号', width: 30, dataIndex: 'parentid', key: 'parentid' },
+ { title: '上级', width: 30, dataIndex: 'parentid', key: 'parentid' },
{ title: '排序', width: 30, dataIndex: 'sortid', key: 'sortid' }
],
loadData: parameter => {