[update] 联调企标的部分导出,解决table中每个columns都设置dataIndex会有横向滚动条的问题
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
<!-- 不需要更多按钮 -->
|
||||
<template v-for="(operation, index) in operSpecialJudge(record)">
|
||||
<a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
|
||||
<a-divider :key="index" type="vertical" v-if="index !== operSpecialJudge(record).length - 1"/>
|
||||
<a-divider type="vertical" v-if="index !== operSpecialJudge(record).length - 1"/>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
@@ -80,7 +80,7 @@
|
||||
<template v-else-if="getLineOperationList(record).length > 0">
|
||||
<template v-for="(operation, index) in getLineOperationList(record)">
|
||||
<a :key="index" @click="operationClick(operation,record)">{{ operation.text }}</a>
|
||||
<a-divider :key="index" type="vertical" v-if="index !== getLineOperationList(record).length - 1"/>
|
||||
<a-divider type="vertical" v-if="index !== getLineOperationList(record).length - 1"/>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
@@ -446,8 +446,7 @@ export default {
|
||||
col = columns.find(col => getKey(col) === key) || {}
|
||||
}
|
||||
// 没有开启拖拽 或 没有宽度 或 有定位,都不能拖拽(防止布局异常,至少有一列不设width并且不能有fixed)
|
||||
// 或者是最后一列也不能拖拽
|
||||
if (!col.width || !!col.fixed || col.title === columns[columns.length - 1].title) {
|
||||
if (!col.width || !!col.fixed) {
|
||||
return <th {...restProps}>{children}</th>
|
||||
}
|
||||
// 开始拖拽监听
|
||||
@@ -484,6 +483,7 @@ export default {
|
||||
const onDrag = (x) => {
|
||||
return x >= (col.minWidth || this.columnMinWidth)
|
||||
}
|
||||
// 解决都有dataIndex时会有横向滚动条的问题,让最后一列的拖拽容器宽度为0
|
||||
return (
|
||||
<th
|
||||
{...restProps}
|
||||
@@ -649,5 +649,13 @@ export default {
|
||||
touch-action: none;
|
||||
}
|
||||
}
|
||||
// 解决每行都有dataIndex时会有横向滚动条的问题
|
||||
.resize-table-th:last-child {
|
||||
border-right: none;
|
||||
.table-draggable-handle {
|
||||
width: 0px !important;
|
||||
min-width: 0px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -300,7 +300,8 @@ export default {
|
||||
],
|
||||
url: {
|
||||
list: '/enterprise/inspect/page',
|
||||
exportPostponeDataUrl: '', // 导出延期数据
|
||||
exportXlsUrl: '/enterprise/inspect/exportData',
|
||||
exportPostponeDataUrl: '/enterprise/inspect/exportDataWithDelay', // 导出延期数据
|
||||
exportRectificationPlanUrl: '' // 导出整改计划
|
||||
},
|
||||
operationList: [
|
||||
|
||||
@@ -396,7 +396,8 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/enterprise/plan/page'
|
||||
list: '/enterprise/plan/page',
|
||||
exportXlsUrl: '/enterprise/plan/exportData'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -178,7 +178,8 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '/enterprise/declare/page'
|
||||
list: '/enterprise/declare/page',
|
||||
exportXlsUrl: '/enterprise/declare/exportData'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
<!-- 标题字段 -->
|
||||
<template v-slot:titleSlot="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</template>
|
||||
<a v-if="record.title && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ record.title }}</a>
|
||||
<div v-else class="table-text">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</div>
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a v-if="text && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
|
||||
<div v-else class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -93,6 +93,7 @@ export default {
|
||||
title: this.$t('personalCenter.receivedShare.title'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'rubric',
|
||||
scopedSlots: { customRender: 'titleSlot' }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
<!-- 标题字段 -->
|
||||
<template v-slot:titleSlot="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</template>
|
||||
<a v-if="record.title && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ record.title }}</a>
|
||||
<div v-else class="table-text">{{ record.title || record.title === 0 ? record.title : global.emptyLine }}</div>
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a v-if="text && record.source !== '4'" class="link-a" @click="handleGoDetail(record)">{{ text }}</a>
|
||||
<div v-else class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -93,6 +93,7 @@ export default {
|
||||
title: this.$t('personalCenter.sentShare.title'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'rubric',
|
||||
scopedSlots: { customRender: 'titleSlot' }
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user