| | |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码 |
| | | |
| | | var contentUrl = ""; |
| | | var contentUrl = ""; |
| | | var urlStr = window.document.location.pathname;//获取文件路径 |
| | | var urlLen = urlStr.split('/'); |
| | | for (var i = 0; i < urlLen.length - 4; i++) { |
| | | contentUrl += "../"; |
| | | } |
| | | contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | | contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //加上边框 |
| | |
| | | contentUrl += "../"; |
| | | } |
| | | contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName; |
| | | |
| | | |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //加上边框 |
| | |
| | | //#endregion |
| | | |
| | | //#region 设置表格页大小初始 |
| | | function DisPlay_HideColumn_GetPageSize(HModName, user,optionPage) { |
| | | function DisPlay_HideColumn_GetPageSize(HModName, user, optionPage) { |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', |
| | | type: "GET", |
| | |
| | | optionPage.limit = data1.data[0].HPageSize; |
| | | optionPage.limits.push(data1.data[0].HPageSize); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | } |
| | | }, error: function () { |
| | |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | var dataCol = [];//数据库查询出的列数据 |
| | | /* var titleData = [];*/ |
| | | /* var titleData = [];*/ |
| | | var newCols = [[]];//对应数据库列顺序col |
| | | newCols[0].push(option.cols[0][0]);//放入第一个checkbox |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | |
| | | |
| | | |
| | | //#region 隐藏列设置编辑页面 |
| | | function get_HideColumnEdit(HModName,user,option,table) { |
| | | function get_HideColumnEdit(HModName, user, option, table) { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["field"] + ","; |
| | |
| | | , btn: ["确定", "取消"] |
| | | , btn1: function (index, laero) { |
| | | //刷新表格数据 |
| | | DisPlay_HideColumnEdit(HModName, user, option,table); |
| | | DisPlay_HideColumnEdit(HModName, user, option, table); |
| | | //更新表格缓存的数据 |
| | | layer.close(index);//关闭弹窗 |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 隐藏列设置编辑页面 |
| | | function get_HideColumnEditAfterReload(HModName, user, option, table, callback) { |
| | | var colName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colName += option.cols[0][i]["field"] + ","; |
| | | } |
| | | var colTitleName = ""; |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | colTitleName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码 |
| | | colTitleName = encodeURI(colTitleName.substring(0, colTitleName.length - 1)); |
| | | /*urlStr.replace(/%/g, '%25');*/ |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //加上边框 |
| | | , title: "隐藏列设置" //标题 |
| | | , closeBtn: 1 //窗体右上角关闭 的 样式 |
| | | , shift: 2 //弹出动画 |
| | | , area: ["50%", "90%"] //窗体大小 |
| | | , maxmin: true //设置最大最小按钮是否显示 |
| | | , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName + '&colTitleName = ' + colTitleName, "yes"] |
| | | , btn: ["确定", "取消"] |
| | | , btn1: function (index, laero) { |
| | | //刷新表格数据 |
| | | DisPlay_HideColumnEdit(HModName, user, option, table); |
| | | //更新表格缓存的数据 |
| | | layer.close(index);//关闭弹窗 |
| | | callback.call() |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | //遍历循环后判断对应列数是否一致 |
| | | if (dataCol.length == newCols[0].length - 1) { |
| | | newCols[0].push(option.cols[0][dataCol.length+1])//放入最后的操作列 |
| | | newCols[0].push(option.cols[0][dataCol.length + 1])//放入最后的操作列 |
| | | option.cols = newCols; |
| | | //取消冻结列 |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | |
| | | } |
| | | } |
| | | //设置列排序 |
| | | for (var i = 1; i < option.cols[0].length-1; i++) { |
| | | for (var i = 1; i < option.cols[0].length - 1; i++) { |
| | | if (data1.data[0].HSortFlag == "是") { |
| | | option.cols[0][i]["sort"] = true; |
| | | } |
| | |
| | | colName += option.cols[0][i]["field"] + ","; |
| | | colTitleName += option.cols[0][i]["title"] + ","; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI 进行编码 |