• 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);
                            }
                        })
                    }

  • 相关阅读:
    力扣383. 赎金信
    支持对协议和会话分享动作进行授权,新增API Key白名单功能,JumpServer堡垒机v3.9.0发布
    哪本计算机书籍,让你有了醍醐灌顶突然开悟的感觉?
    Servlet 项目的创建和部署
    MySQL(12):MySQL数据类型
    【Matlab】常用函数汇总(一)
    【分类网络】VGG
    探索DrissionPage:结合浏览器自动化与数据包操控的先进工具
    JavaScript:实现stack堆栈算法(附完整源码)
    每日一记项目,拼图小游戏
  • 原文地址:https://blog.csdn.net/zhangjiaqianghh/article/details/82383141