• miniUI datagrid 修改列表信息


    今天得到个需求,想要在列表页上直接修改数据。修改完的数据直接入库。

    后端:java  前端:miniUI

    前端开发:

    在class="mini-datagrid" 的div内加入 

    allowCellEdit="true" allowCellSelect="true" multiSelect="true" editNextOnEnterKey="true"  editNextRowCell="true"  cellEditAction="celldblclick" 

    property="editor" headerAlign="center">数值
                                                

                                            

    js开发:

    注:updateUrl地址为java后端修改方法

    saveToUp: function (thist,id) {
                        var row=proPlanGrid.getSelected();
                        console.log(row.id);
                        console.log(thist._oldValue);
                        var data = {
                                "id": row.id,
                                "numeric": thist._oldValue
                        }
                        $.ajax({
                            url: updateUrl,
                            data: data,
                            type: 'POST',
                            success: function (result) {
                                layer.closeAll('loading');
                                if (result.isSuccess) {
                                    layer.msg('保存成功');
                                } else {
                                    layer.msg(result.message)
                                }
                            }, error: function (result) {
                                layer.closeAll('loading');
                                var errorResult = $.parseJSON(result.responseText);
                                layer.msg(errorResult.collection.error.message);
                            }
                        })
                    }

  • 相关阅读:
    微服务中4种应对跨库Join的思路
    大厂外包干了一个月,技术明显进步。。。。。
    Android开发APP显示头部Bar
    Unity之ShaderGraph如何实现无贴图水球效果
    Moonbirds 是什么,为何公售后能迅速出圈 ?
    17、Redis、Zk分布式锁实现原理
    CMU15445 (Fall 2019) 之 Project#4 - Logging & Recovery 详解
    ReentrantLock 源码
    Hystrix 请求合并、请求隔离、优化
    关于Http和Https
  • 原文地址:https://blog.csdn.net/zhangjiaqianghh/article/details/82383141