zuozhengqing
2023-11-06 2fb4239e828bcfa9711ce4cecc4b942767621d62
src/components/makepager/TableCommonView.vue
@@ -15,6 +15,8 @@
      @selection-change="handleSelectionChange"
      :header-cell-style="{ background: '#f1f3f8', color: '#000009', 'font-size': '12px', 'font-family': 'PingFangSC' }"
      size="mini"
      @row-click="tableRowClick"
      :row-class-name="tableRowClassName"
    >
      <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column>
      <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column>
@@ -117,6 +119,12 @@
            </ul>
            <div v-else class="no-product">{{ "--" }}</div>
          </div>
          <!-- 调用方法显示文字 -->
          <div v-else-if="item.isCallMethod">
            <span :class="item.isClass ? item.getClassName(scope.row[item.prop], scope.row) : ''">{{
              item.getCallMethod(scope.row[item.prop], scope.row)
            }}</span>
          </div>
          <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span>
        </template>
      </el-table-column>
@@ -167,6 +175,13 @@
          sumProp: [],
          mergeNumber: 1
        }
      }
    },
    // 选中的样式
    selectClassRow: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
@@ -358,6 +373,19 @@
    // 公共(销售机会、报价单、销售总单、销售子单。。。)
    selCommonClick(row) {
      this.$emit("selCommonClick", row)
    },
    // 行点击
    tableRowClick(row, column, event) {
      this.$emit("tableRowClick", row, column, event)
    },
    // 单选行相关
    tableRowClassName({ row }) {
      if (Object.keys(this.selectClassRow).length > 0) {
        if (row.id == this.selectClassRow.id) {
          return "onSelect"
        }
      }
      this.$emit("tableRowClassName", row)
    }
  }
}
@@ -394,12 +422,12 @@
        border-bottom: 0;
      }
    }
    li:last-child .name-view{
    li:last-child .name-view {
      border-bottom: none;
    }
    .no-product {
      height: 57px;
      line-height: 57px;
      height: 22px;
      line-height: 22px;
    }
  }
}