1
yangle
2025-02-28 50e8da1b9afd39f32f5c73a1cbcdb7f6c6de8adb
WebTM/views/ϵͳ¹ÜÀí/Óû§¹ÜÀí/Xt_UserList.html
@@ -275,6 +275,7 @@
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    , totalRow: true
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
@@ -620,19 +621,26 @@
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            titleData = [];
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = ["hmainid"];//不需要显示的字段 å¯æ‰©å±•
                            var newCols = [[]];//对应数据库列顺序col
                            newCols[0].push(option.cols[0][0]);//放入第一个checkbox
                            dataCol = data1.data[0].HGridString.split(',');
                            //列设置列数与页面列数是否一致
                            if (dataCol.length == option.cols[0].length - 1) {
                                //遍历寻找列设置对应列按顺序插入
                                for (var j = 0; j < option.cols[0].length - 1; j++) {
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                        var dataCols = dataCol[j].split('|');
                                        //选择与datacols相应列进行修改
                                        if (option.cols[0][i + 1]["field"] == dataCols[5]) {
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                            }
                                            //设置列宽
                                            if (dataCols[3] > 0) {
                                                option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
@@ -640,13 +648,13 @@
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["field"], titleData) == -1) {
                                            if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                            }
                                            //统计列
                                            if (dataCols[6] == 1) {
                                                option.cols[0][i + 1]["totalRow"] = true;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
@@ -660,8 +668,17 @@
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                                            //设置表格title属性显示别名
                                            if (dataCols[4] != null && dataCols[4] != "") {
                                                option.cols[0][i + 1]["title"] = dataCols[4];
                            }
                                            newCols[0].push(option.cols[0][i + 1]);
                                        }
                                    }
                                }
                                //遍历循环后判断对应列数是否一致
                                if (dataCol.length == newCols[0].length - 1) {
                                    option.cols = newCols;
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
@@ -680,6 +697,8 @@
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);