From bcb19e8c93c3cabf0d8eb3ee34ed819b3c5a10ef Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 25 十一月 2024 13:14:11 +0800 Subject: [PATCH] #优化地图 --- src/main/webapp/static/js/orderTable.js | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/js/orderTable.js b/src/main/webapp/static/js/orderTable.js index 1665bd7..5bcda8d 100644 --- a/src/main/webapp/static/js/orderTable.js +++ b/src/main/webapp/static/js/orderTable.js @@ -1,16 +1,18 @@ +var insTb; layui.config({ base: baseUrl + "/static/layui/lay/modules/" // 閰嶇疆妯″潡鎵�鍦ㄧ殑鐩綍 -}).use(['table','laydate', 'form', 'admin'], function() { +}).use(['table','laydate', 'form', 'admin', 'tableX'], function() { var table = layui.table; var $ = layui.jquery; var layer = layui.layer; var layDate = layui.laydate; var form = layui.form; var admin = layui.admin; + var tableX = layui.tableX; /****************************************** 宸﹁竟琛� *************************************************/ - var insTb = table.render({ + insTb = table.render({ elem: '#originTable', url: baseUrl + '/order/nav/list/auth', height: 'full-120', @@ -37,13 +39,27 @@ // '</p>'].join(''), defaultToolbar: [], cols: [[ - // {type: 'numbers', title: '#'}, - {field: 'orderTime', title: '鏃ユ湡'}, + {type: 'checkbox'}, + {field: 'createTime$', title: '鏃ユ湡'}, {field: 'orderNo', title: '鍗曟嵁缂栧彿', align: 'center'} ]], done: function (res, curr, count) { - console.log(res) $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); + + // 缁戝畾榧犳爣鍙抽敭 + tableX.bindCtxMenu('originTable', function (d) { + return [ + { + icon: 'layui-icon layui-icon-ok', + name: '涓�閿嚭搴�', + click: function (d) { + autoOut(d.id); + } + } + ] + + }) + } }); @@ -56,7 +72,7 @@ /* 琛ㄦ牸閲嶇疆 */ form.on('submit(originTbReset)', function (data) { insTb.reload({where: null}); - insTb2.reload({where: {host_id: null}, page: {curr: 1}}); + insTb2.reload({where: null, page: {curr: 1}}); return false; }); -- Gitblit v1.9.1