/**
 * zzx
 * 2020.07.27
 * 用于储存预约登记、预约调整的工共页面
 */
// 预约资源查看grid
import { UPCLOUD_RDC_TMS_MAINDATA_SERVICE,UPCLOUD_RDC_TMS_BUSINESS_SERVICE,UPCLOUD_RDC_TMS_INTERFACE_SERVICE} from '@/config/serviceSettings.js';
import { getSelectGJ, querySysPicture } from '@/utils/prolog.ajax.js';
var view_grid_opts = {
  skin: "card",
  columns: [
    { id: "id", name: "id", type: "ro", width: "130", hidden: true },
    { id: "platformtype", name: "站台", type: "ro", width: 120 },
    {
      id: "loadingEfficiency01", name: "0:00-2:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency01 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency01 + "/" + rd.loadingEfficiency01;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency02", name: "2:00-4:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency02 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency02 + "/" + rd.loadingEfficiency02;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency03", name: "4:00-6:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency03 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency03 + "/" + rd.loadingEfficiency03;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency04", name: "6:00-8:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency04 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency04 + "/" + rd.loadingEfficiency04;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency05", name: "8:00-10:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency05 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency05 + "/" + rd.loadingEfficiency05;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency06", name: "10:00-12:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency06 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency06 + "/" + rd.loadingEfficiency06;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency07", name: "12:00-14:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency07 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency07 + "/" + rd.loadingEfficiency07;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency08", name: "14:00-16:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency08 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency08 + "/" + rd.loadingEfficiency08;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency09", name: "16:00-18:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency09 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency09 + "/" + rd.loadingEfficiency09;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency10", name: "18:00-20:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency10 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency10 + "/" + rd.loadingEfficiency10;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency11", name: "20:00-22:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency11 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency11 + "/" + rd.loadingEfficiency11;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    },
    {
      id: "loadingEfficiency12", name: "22:00-24:00", type: "ro", width: 120, render: function (v, rd) {
        if (rd.loadingEfficiency12 == 0) {
          return "<div style=\"width: 100%;height: 100%;background-color: gray;\"></div>";
        }
        let className = rd.platformtype === "装货预约" ? "layui-bg-blue" : "layui-bg-red";
        let result = rd.appointEfficiency12 + "/" + rd.loadingEfficiency12;
        return "<div class=\"layui-progress layui-progress-big\" lay-showPercent=\"yes\" ><div class=\"layui-progress-bar " + className + "\" lay-percent=\"" + result + "\"></div></div>";
      }
    }
  ],
  toolbar: [],
  url: UPCLOUD_RDC_TMS_BUSINESS_SERVICE+"/bookingManage/appointResourceQuery", // 数据接口
  type: "post", // 数据提交方式，默认为get
  params: "{}",
  page: false, // 是否启用分页
  contentType: "application/json",
  totalCount: "totalCount" // 总记录数字段，默认totalCount
};