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

  • 相关阅读:
    【计算机操作系统慕课版】第二章课后习题笔记(创作周年纪念版)
    大型语言模型:通过代码生成、调试和 CI/CD 集成改变软件开发的游戏规则
    goweb入门
    Multisim14.0仿真(九)反相放大器
    SSE 服务端消息推送
    03.Pandas数据结构
    React中的“状态”(state)和“属性”(props)的区别
    NorFlash的存储原理
    rapidjson之内存分配器
    [apue] 一图读懂 Unix 时间日期例程相互关系
  • 原文地址:https://blog.csdn.net/zhangjiaqianghh/article/details/82383141