|
|
@@ -166,10 +166,12 @@ const getData = async (reset?: string) => {
|
|
|
}
|
|
|
|
|
|
const params = ref()
|
|
|
+const tipsString = ref('')
|
|
|
// rightDistance是右侧箭头消失所需要translateX的值
|
|
|
-const openDialog = async (paramsData: Object, rightDistance: number) => {
|
|
|
+const openDialog = async (paramsData: Object, rightDistance: number, tips: string) => {
|
|
|
firstLoad.value = localStorage.getItem('firstLoadCustomizeColumns')
|
|
|
params.value = paramsData
|
|
|
+ tipsString.value = tips
|
|
|
dialogVisible.value = true
|
|
|
await getData()
|
|
|
rightArrowHideDistance.value = rightDistance
|
|
|
@@ -233,23 +235,23 @@ const handleRightRemove = (e: any) => {
|
|
|
return index !== -1
|
|
|
})
|
|
|
|
|
|
- if (curGroup.name !== originalGroup.name && curGroup.name !== 'All') {
|
|
|
+ if (curGroup.name !== originalGroup?.name && curGroup.name !== 'All') {
|
|
|
// 从当前分组中删除移入的数据
|
|
|
curGroup.children.forEach((item: any, index: number) => {
|
|
|
item.field === curItem.field && curGroup.children.splice(index, 1)
|
|
|
})
|
|
|
// 在对应分组中添加移入的数据
|
|
|
groupColumns.value.forEach((item: any) => {
|
|
|
- item.name === originalGroup.name && item.children.push(curItem)
|
|
|
+ item.name === originalGroup?.name && item.children.push(curItem)
|
|
|
})
|
|
|
// 添加到All分组里
|
|
|
groupColumns.value[0].children.push(curItem)
|
|
|
} else if (curGroup.name === 'All') {
|
|
|
// 在对应分组中添加移入的数据
|
|
|
groupColumns.value.forEach((item: any) => {
|
|
|
- item.name === originalGroup.name && item.children.push(curItem)
|
|
|
+ item.name === originalGroup?.name && item.children.push(curItem)
|
|
|
})
|
|
|
- } else if (curGroup.name === originalGroup.name) {
|
|
|
+ } else if (curGroup.name === originalGroup?.name) {
|
|
|
groupColumns.value[0].children.push(curItem)
|
|
|
}
|
|
|
}
|
|
|
@@ -272,7 +274,7 @@ const handleDeleteSelect = (curItem: any) => {
|
|
|
})
|
|
|
// 在对应分组中添加移入的数据
|
|
|
groupColumns.value.forEach((item: any) => {
|
|
|
- item.name === originalGroup.name && item.children.push(curItem)
|
|
|
+ item.name === originalGroup?.name && item.children.push(curItem)
|
|
|
})
|
|
|
// 添加到All分组里
|
|
|
groupColumns.value[0].children.push(curItem)
|
|
|
@@ -361,10 +363,7 @@ defineExpose({
|
|
|
</div>
|
|
|
<div class="tips">
|
|
|
<span style="font-size: 16px">* </span>
|
|
|
- <span
|
|
|
- >Drag item over to this selection or click "add" icon to show the column on your
|
|
|
- {{ route.path.includes('booking') ? 'booking' : 'shipment' }} list</span
|
|
|
- >
|
|
|
+ <span>{{ tipsString }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="draggable-list">
|