提交 c60735d9 authored 作者: lidongxu's avatar lidongxu

refactor(display_schedule/*): 修改:AP 计划上报,部分列超出宽度不显示省略号问题修复

上级 65b07095
......@@ -3,8 +3,8 @@
<el-form-item>
<el-radio-group v-model="operation"
@change="checkTableColumns">
<el-radio-button label="平铺模式"
value="平铺模式" />
<el-radio-button label="展示模式"
value="展示模式" />
<el-radio-button label="填报模式"
value="填报模式" />
</el-radio-group>
......@@ -12,7 +12,7 @@
<right-toolbar v-model:showSearch="showSearch"
@queryTable="getTableList()"
:columns="chooseColumns"
:showColumnsType="operation === '平铺模式' ? 'tree' : 'checkbox'"
:showColumnsType="operation === '展示模式' ? 'tree' : 'checkbox'"
:defaultCheckedKeys="visibleProps">
</right-toolbar>
</el-row>
......@@ -56,11 +56,15 @@
<div v-else-if="col.type === 'formula'">
{{ col.func(row) }}
</div>
<div v-else>
{{ row[col.prop] || '-' }}
<div v-else
class="overflow_wrap">
<!-- 超出部分显示省略号 -->
<span>
{{ row[col.prop] || '-' }}
</span>
</div>
</div>
<!-- 平铺模式 -->
<!-- 展示模式 -->
<div v-else>{{ row[col.prop] || '-' }}</div>
</template>
</el-table-column>
......@@ -76,7 +80,7 @@
<script setup>
import { h } from 'vue'
/*************** 操作类型 ***************/
const operation = ref('平铺模式');
const operation = ref('展示模式');
// const operation = ref('填报模式');
const tableRef = ref(null)
......@@ -288,4 +292,17 @@ const getTableList = () => {
padding: 15px 0;
}
}
/* 超出部分显示省略号 */
.overflow_wrap {
width: 100%;
/* 固定宽度 */
white-space: nowrap;
/* 不换行 */
overflow: hidden;
/* 隐藏超出部分 */
text-overflow: ellipsis;
/* 显示省略号 */
display: inline-block;
}
</style>
\ No newline at end of file
......@@ -240,6 +240,7 @@
{
label: "渠道大类",
prop: "channelDl",
showOverflowTooltip: true,
visible: true,
type: 'string',
fill: false,
......@@ -248,6 +249,7 @@
{
label: "渠道小类",
prop: "channelXl",
showOverflowTooltip: true,
visible: true,
type: 'string',
fill: false,
......@@ -258,12 +260,14 @@
prop: "storeType",
visible: true,
type: 'string',
showOverflowTooltip: true,
fill: false,
width: 90
},
{
label: "系统业态",
prop: "systemFormat",
showOverflowTooltip: true,
visible: true,
type: 'string',
fill: false,
......@@ -873,7 +877,7 @@
// 计算列具体数据
const updateColumns = (operation) => {
return new Promise((resolve, reject) => {
if (operation === '平铺模式') {
if (operation === '展示模式') {
chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) {
......
......@@ -104,7 +104,7 @@
type: "string",
fill: true,
fixed: 'left',
width: 225
width: 200
},
{
label: "经销商类型",
......@@ -162,11 +162,13 @@
type: "string",
fill: true,
fixed: 'left',
width: 180
showOverflowTooltip: true,
width: 100
},
{
label: "系统类型",
prop: "lineType",
showOverflowTooltip: true,
visible: true,
type: "string",
fill: false,
......@@ -174,6 +176,7 @@
},
{
label: "渠道大类",
showOverflowTooltip: true,
prop: "channelDl",
visible: true,
type: "string",
......@@ -183,6 +186,7 @@
{
label: "渠道小类",
prop: "channelXl",
showOverflowTooltip: true,
visible: true,
type: "string",
fill: false,
......@@ -190,6 +194,7 @@
},
{
label: "系统业态",
showOverflowTooltip: true,
prop: "lineLf",
visible: true,
type: "string",
......@@ -222,6 +227,7 @@
{
label: "档期计划-促销规格",
prop: "plannedPromotionSpec",
showOverflowTooltip: true,
visible: true,
type: "string",
fill: false,
......@@ -1001,7 +1007,7 @@
// 计算列具体数据
const updateColumns = (operation) => {
// 保存用户选择的列配置
if (operation === '平铺模式') {
if (operation === '展示模式') {
chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) {
......
......@@ -712,7 +712,7 @@
// 计算列具体数据
const updateColumns = (operation) => {
return new Promise((resolve, reject) => {
if (operation === '平铺模式') {
if (operation === '展示模式') {
chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) {
......
......@@ -448,7 +448,7 @@
// 计算列具体数据
const updateColumns = (operation) => {
return new Promise((resolve, reject) => {
if (operation === '平铺模式') {
if (operation === '展示模式') {
chooseColumns.value = baseColumns.value
tableColumns.value = baseColumns.value.flatMap(item => {
if (item.children) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论