|
@@ -24,7 +24,7 @@
|
|
placeholder='搜索'
|
|
placeholder='搜索'
|
|
:linkage='false'
|
|
:linkage='false'
|
|
:lastStage='true'
|
|
:lastStage='true'
|
|
- :data='treeData4'
|
|
|
|
|
|
+ :data='treeData'
|
|
@cancel='treeCancel'
|
|
@cancel='treeCancel'
|
|
@confirm='treeConfirm'
|
|
@confirm='treeConfirm'
|
|
/>
|
|
/>
|
|
@@ -34,60 +34,18 @@
|
|
<script>
|
|
<script>
|
|
import addForm from './addForm'
|
|
import addForm from './addForm'
|
|
import addList from '../legendRules/addList'
|
|
import addList from '../legendRules/addList'
|
|
-const dataArr = [
|
|
|
|
- {
|
|
|
|
- id: '0',
|
|
|
|
- name: '顶级',
|
|
|
|
- open: true,
|
|
|
|
- checked: 'uncheck',
|
|
|
|
- children: [
|
|
|
|
- {
|
|
|
|
- id: '1',
|
|
|
|
- name: '一级1',
|
|
|
|
- open: true,
|
|
|
|
- checked: 'uncheck',
|
|
|
|
- children: [
|
|
|
|
- { id: '12', name: '一二级2', checked: 'uncheck' },
|
|
|
|
- { id: '121', name: '一二级3', checked: 'uncheck' },
|
|
|
|
- { id: '122', name: '一二级4', checked: 'uncheck' },
|
|
|
|
- {
|
|
|
|
- id: '1321',
|
|
|
|
- name: '二级1',
|
|
|
|
- open: true,
|
|
|
|
- checked: 'uncheck',
|
|
|
|
- children: [
|
|
|
|
- { id: '13', name: '二三级2', checked: 'uncheck' },
|
|
|
|
- { id: '131', name: '二三级3', checked: 'uncheck' },
|
|
|
|
- { id: '132', name: '二三级4', checked: 'uncheck' }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '2',
|
|
|
|
- name: '一级2',
|
|
|
|
- open: true,
|
|
|
|
- checked: 'uncheck',
|
|
|
|
- children: [
|
|
|
|
- { id: '222', name: '二二级2', checked: 'uncheck' },
|
|
|
|
- { id: '2221', name: '二二级1', checked: 'uncheck' },
|
|
|
|
- { id: '2222', name: '二二级3', checked: 'uncheck' }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: '3',
|
|
|
|
- name: '一级3',
|
|
|
|
- open: true,
|
|
|
|
- checked: 'uncheck',
|
|
|
|
- children: [
|
|
|
|
- { id: '3220', name: '三二级0', checked: 'uncheck' },
|
|
|
|
- { id: '3221', name: '三二级1', checked: 'uncheck' },
|
|
|
|
- { id: '322', name: '三二级2', checked: 'uncheck' }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
-]
|
|
|
|
|
|
+import { groupByCategory } from '@/api/legendLibrary.js'
|
|
|
|
+import func from '../../../vue-temp/vue-editor-bridge'
|
|
|
|
+
|
|
|
|
+// function getTree(data) {
|
|
|
|
+// data.id = data.Id
|
|
|
|
+// data.name = data.Name
|
|
|
|
+// for (var i = 0; i < data.Children.length; i++) {
|
|
|
|
+// if (data.Children[i] && data.Children[i].length > 0) {
|
|
|
|
+// getTree(data.Children[i])
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -104,7 +62,7 @@ export default {
|
|
title: '',
|
|
title: '',
|
|
GraphCategoryId: 'DTXT',
|
|
GraphCategoryId: 'DTXT',
|
|
modalShow4: false,
|
|
modalShow4: false,
|
|
- treeData4: dataArr
|
|
|
|
|
|
+ treeData: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: { addForm, addList },
|
|
components: { addForm, addList },
|
|
@@ -114,6 +72,11 @@ export default {
|
|
this.GraphCategoryId = GraphCategoryId
|
|
this.GraphCategoryId = GraphCategoryId
|
|
console.log(title)
|
|
console.log(title)
|
|
if (GraphCategoryId) {
|
|
if (GraphCategoryId) {
|
|
|
|
+ groupByCategory({}).then(res => {
|
|
|
|
+ this.treeData = []
|
|
|
|
+ res.Data.forEach(i => {})
|
|
|
|
+ // console.log(getTree(this.treeData))
|
|
|
|
+ })
|
|
//treeSelect
|
|
//treeSelect
|
|
this.modalShow4 = true
|
|
this.modalShow4 = true
|
|
|
|
|