layui 隱藏某列


 
  $("[data-field='deviceTypeID']").css('display','none'); //關鍵代碼
 
 
layui.table.render({
        elem: "#DeviceManageTable",
        cellMinWidth: 80,
        url: BASE_URL + "/Software/GetAllSoftware",
        cols: [
          [
            { type: "checkbox" },
            { field: "clientName", title: "客戶名稱", width: 200 },
            { field: "clientOfficeName", title: "科室名稱", width: 201 },
            { field: "computerNo", title: "電腦號", width: 110 },
            { field: "softwareName", title: "軟件名稱", width: 216 },
            { field: "softwareExeName", title: "文件名", width: 213 },
            { field: "deviceName", title: "設備名稱", width: 206 },
            {
              field: "deviceTypeID",
              title: "設備類型ID",
              width: 207,
              filter:true
            },
            { field: "deviceTypeName", title: "設備型號", width: 208 },
            { field: "softwareInfo", title: "軟件信息", width: 214 },
            { field: "softwareDeveloper", title: "開發商", width: 212 },
            { field: "softwareLastVersion", title: "最新版本", width: 215 },

            {
              field: "lastUpdateTime",
              title: "最后一次更新維護時間",
              width: 209
            },
      
            { fixed: "right", width: 200, align: "center", toolbar: "#barDemo" }
          ]
        ],
        page: true,
        where: {
          selecteClientID: vvv.selectClient.clientId,
          selectState: vvv.selectState,
          selectDeviceTypeId: vvv.selectDeviceTypeId,
          selectSoftwareName: vvv.selectSoftwareName,
          selectDeviceName: vvv.selectDeviceName
        },
        done: function(res, curr, count) {
          vvv.statisticsStr = res.statisticsStr;
          $("[data-field='deviceTypeID']").css('display','none'); //關鍵代碼
        }
      });


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM