+
@@ -13,7 +13,7 @@
rowKey="id"
:row-selection="null"
:pagination="false"
- :scroll="{x: '100%'}"
+ :scroll="{x: '100%',y: '50vh'}"
@change="tableOnChange">
@@ -44,45 +44,53 @@ import { StandardSource } from '@/enums/commonEnums'
export default {
name: 'BaseInfoTable',
components: { StandardSelection, JTable },
+ props: {
+ disabled: {
+ type: Boolean,
+ default: false
+ }
+ },
data () {
+ const column = [
+ {
+ title: this.$t('serialNumber'),
+ dataIndex: '',
+ key: 'rowIndex',
+ align: 'center',
+ width: 80,
+ customRender: function (t, r, index) {
+ return parseInt(index) + 1
+ }
+ },
+ { // 企标编号
+ title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
+ align: 'center',
+ width: 180,
+ dataIndex: 'standardNumber',
+ scopedSlots: { customRender: 'standard' }
+ },
+ { // 企标名称
+ title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
+ align: 'center',
+ width: 180,
+ dataIndex: 'standardName',
+ scopedSlots: { customRender: 'standard' }
+ },
+ {
+ // 操作
+ title: this.$t('operation'),
+ dataIndex: 'action',
+ align: 'center',
+ width: 100,
+ scopedSlots: { customRender: 'action' }
+ }
+ ]
return {
StandardSource,
model: {},
dataSource: [],
- columns: [
- {
- title: this.$t('serialNumber'),
- dataIndex: '',
- key: 'rowIndex',
- align: 'center',
- width: 80,
- customRender: function (t, r, index) {
- return parseInt(index) + 1
- }
- },
- { // 企标编号
- title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
- align: 'center',
- width: 180,
- dataIndex: 'standardNumber',
- scopedSlots: { customRender: 'standard' }
- },
- { // 企标名称
- title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
- align: 'center',
- width: 180,
- dataIndex: 'standardName',
- scopedSlots: { customRender: 'standard' }
- },
- {
- // 操作
- title: this.$t('operation'),
- dataIndex: 'action',
- align: 'center',
- width: 100,
- scopedSlots: { customRender: 'action' }
- }
- ]
+ // 根据是否禁用显示操作列
+ columns: column.slice(0, this.disabled ? 3 : 4)
}
},
computed: {