当前位置:网站首页>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


边栏推荐
- [C language] qsort function
- Set the print page style by modifying style
- Summary of anomaly detection methods
- Simulation volume leetcode [general] 1405 Longest happy string
- Private cloud disk deployment
- RestTemplate、Feign实现Token传递
- Simulation volume leetcode [general] 1296 Divide an array into a set of consecutive numbers
- Simulation volume leetcode [general] 1219 Golden Miner
- MFC on the conversion and display of long string unsigned char and CString
- Esp32 esp-idf watchdog twdt
猜你喜欢

Play video with Tencent video plug-in in uni app

Mise en œuvre d’une fonction complexe d’ajout, de suppression et de modification basée sur jeecg - boot

Postman core function analysis - parameterization and test report

LeetCode 732. My schedule III

The whole process realizes the single sign on function and the solution of "canceltoken" of undefined when the request is canceled

Digital triangle model acwing 1015 Picking flowers
![[postman] collections - run the imported data file of the configuration](/img/85/7ac9976fb09c465c88f376b2446517.png)
[postman] collections - run the imported data file of the configuration

記一個基於JEECG-BOOT的比較複雜的增删改功能的實現

黑猫带你学UFS协议第4篇:UFS协议栈详解

Full link voltage measurement: building three models
随机推荐
模拟卷Leetcode【普通】1061. 按字典序排列最小的等效字符串
php使用redis实现分布式锁
全链路压测:构建三大模型
Simulation volume leetcode [general] 1061 Arrange the smallest equivalent strings in dictionary order
An article was uncovered to test the truth of outsourcing companies
The pit encountered by keil over the years
[eolink] PC client installation
The whole process realizes the single sign on function and the solution of "canceltoken" of undefined when the request is canceled
MFC关于长字符串unsigned char与CString转换及显示问题
自定义指定路由上的Gateway过滤器工厂
私人云盘部署
Py06 字典 映射 字典嵌套 键不存在测试 键排序
Database - current read and snapshot read
E - 食物链
Simulation volume leetcode [general] 1414 The minimum number of Fibonacci numbers with a sum of K
QT: the program input point xxxxx cannot be located in the dynamic link library.
在JEECG-boot代码生成的基础上修改list页面(结合自定义的组件)
基于JEECG-BOOT制作“左树右表”交互页面
Luogu p2141 abacus mental arithmetic test
Oscp raven2 target penetration process