zhanghonglin
5 天以前 96a94a59c08f55712ba04eb413e7f61739f11f66
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/extension/taskinfo/thickness_hty.js
@@ -17,7 +17,73 @@
    methods: {
       //下面这些方法可以保留也可以删除
      onInit() {  
      //设置某个单元格背景颜色
      this.columns.forEach((x) => {
        if (x.field == "topleft") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[0].split("-");
            if (row.topleft < zhi[0] || row.topleft > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "topmiddle") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[1].split("-");
            if (row.topmiddle < zhi[0] || row.topmiddle > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "topright") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[2].split("-");
            if (row.topright < zhi[0] || row.topright > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "centreleft") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[3].split("-");
            if (row.centreleft < zhi[0] || row.centreleft > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "centremiddle") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[4].split("-");
            if (row.centremiddle < zhi[0] || row.centremiddle > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "centreright") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[5].split("-");
            if (row.centreright < zhi[0] || row.centreright > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "bottomleft") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[6].split("-");
            if (row.bottomleft < zhi[0] || row.bottomleft > zhi[1])
              return { background: 'red' };
          };
        }
        if (x.field == "bottomright") {
          x.cellStyle = (row, rowIndex, columnIndex) => {
            let qu = row.interval.split(",");
            let zhi = qu[7].split("-");
            if (row.bottomright < zhi[0] || row.bottomright > zhi[1])
              return { background: 'red' };
          };
        }
      });
      },
      onInited() {
        //框架初始化配置后
@@ -56,4 +122,3 @@
    }
  };
  export default extension;