diff --git a/package.json b/package.json index 9fe9a00..5e0eb38 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "vueui": "vue ui" }, "dependencies": { + "@johmun/vue-tags-input": "^2.1.0", "axios": "^0.24.0", "core-js": "^3.19.1", "echarts": "^5.2.2", diff --git a/src/views/Report/ReportList.vue b/src/views/Report/ReportList.vue index eaf98bc..00cc597 100644 --- a/src/views/Report/ReportList.vue +++ b/src/views/Report/ReportList.vue @@ -88,7 +88,23 @@
- + + + + + + + + + + + + + + + +
@@ -208,10 +231,77 @@ export default { } }, dialogPreview: false, // 预览 - content: '' + content: '', + filterText:'', + treeData: [ + { + id: 0, + label: '根节点', + children: [ + { + id: 1, + label: '一级 1', + children: [ + { + id: 4, + label: '二级 1-1', + children: [ + { + id: 9, + label: '三级 1-1-1' + }, + { + id: 10, + label: '三级 1-1-2' + } + ] + } + ] + }, + { + id: 2, + label: '一级 2', + children: [ + { + id: 5, + label: '二级 2-1' + }, + { + id: 6, + label: '二级 2-2' + } + ] + }, + { + id: 3, + label: '一级 3', + children: [ + { + id: 7, + label: '二级 3-1' + }, + { + id: 8, + label: '二级 3-2' + } + ] + }, + ] + + } + ], } }, + watch: { + filterText(val) { + this.$refs.tree.filter(val); + } + }, methods: { + filterNode(value, data) { + if (!value) return true; + return data.label.indexOf(value) !== -1; + }, init () { this.labelList() this.reportDateList() @@ -341,6 +431,15 @@ export default { \ No newline at end of file