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

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

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