当前位置:网站首页>Modify the list page on the basis of jeecg boot code generation (combined with customized components)
Modify the list page on the basis of jeecg boot code generation (combined with customized components)
2022-07-06 06:25:00 【Hanyue Zhuge crossbow】
First on the renderings :

1、 Create an interface on the back end , Get tree nodes . After passing the test .

2、 Create front-end components


Two method All codes of are :
methods: {
onLoadData(selectedNode) {
let that = this
let pid = 0
if (selectedNode != null) {
pid = selectedNode.dataRef.id
}
let params = new Object()
params.pid = pid
return new Promise(resolve => {
getAction("/jeecg-product/dict.device_catalog/dictDeviceCatalog/queryByPid", params).then(function(res) {
res.forEach(function(catalog){
let node = new Object()
node.key = catalog.id
node.title = catalog.deviceCatalog
node.isLeaf = (catalog.hasChild == 1?false:true);
node.id = catalog.id
node.pid = params.pid
node.icon = "gold"
node.children=[]
debugger
if(selectedNode != null){
node.path = selectedNode.dataRef.title + "-" + node.title
}
else{
node.path = node.title
}
if(selectedNode == null){
that.treeData.push(node)
}
else{
selectedNode.dataRef.children.push(node)
}
// that.allTreeNodes.push(node)
})
})
resolve();
})
},
onSelectNode(nodeId, e){
let param = new Object();
param.node = e.node.dataRef
param.id = e.node.dataRef.key
param.path = e.node.dataRef.path
param.title = e.node.dataRef.title
this.$emit("SelectNode",param)
}
},It should be noted that ant-design-vue in , The nodes of the tree control are only key,title,children,isleaf Mandatory ( namely : Based on these attributes, a tree is generated ), It can be used through dataRef Get the corresponding self built node object .

Custom component events :

3、 front end vue call


边栏推荐
- 还在为如何编写Web自动化测试用例而烦恼嘛?资深测试工程师手把手教你Selenium 测试用例编写
- Remember the implementation of a relatively complex addition, deletion and modification function based on jeecg-boot
- keil MDK中删除添加到watch1中的变量
- MFC dynamically creates dialog boxes and changes the size and position of controls
- Esp32 esp-idf watchdog twdt
- JDBC requset corresponding content and function introduction
- E - 食物链
- [postman] dynamic variable (also known as mock function)
- [postman] collections configuration running process
- [postman] test script writing and assertion details
猜你喜欢

Digital triangle model acwing 1015 Picking flowers

MFC关于长字符串unsigned char与CString转换及显示问题

Past and present lives of QR code and sorting out six test points

【Tera Term】黑猫带你学TTL脚本——嵌入式开发中串口自动化神技能

在uni-app中使用腾讯视频插件播放视频

Apple has open source, but what about it?

Database - current read and snapshot read

mysql按照首字母排序

Luogu p2089 roast chicken

org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: 发现了以元素 ‘outgoing‘ 开头的无效内容
随机推荐
Simulation volume leetcode [general] 1405 Longest happy string
模拟卷Leetcode【普通】1405. 最长快乐字符串
[Tera term] black cat takes you to learn TTL script -- serial port automation skill in embedded development
Simulation volume leetcode [general] 1061 Arrange the smallest equivalent strings in dictionary order
黑猫带你学UFS协议第4篇:UFS协议栈详解
专业论文翻译,英文摘要如何写比较好
Simulation volume leetcode [general] 1091 The shortest path in binary matrix
Resttemplate and feign realize token transmission
Py06 字典 映射 字典嵌套 键不存在测试 键排序
[mqtt from getting started to improving series | 01] quickly build an mqtt test environment from 0 to 1
How to extract login cookies when JMeter performs interface testing
Esp32 esp-idf watchdog twdt
MySQL之数据类型
[C language] string left rotation
B - The Suspects
[postman] test script writing and assertion details
LeetCode 732. My schedule III
Database - current read and snapshot read
On weak network test of special test
MFC关于长字符串unsigned char与CString转换及显示问题