Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
ac54cbdd
提交
ac54cbdd
authored
4月 01, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(supply/index.vue): 修复表格宽度问题_新增编辑删除自定义分组对接接口
同上
上级
abed4ffc
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
18 行删除
+32
-18
supply.js
src/api/bi/supply.js
+11
-2
index.vue
src/views/bi/supply/index.vue
+21
-16
没有找到文件。
src/api/bi/supply.js
浏览文件 @
ac54cbdd
...
...
@@ -27,7 +27,7 @@ export function addReportGroupAPI(data) {
url
:
'/report/customer/core/group/save'
,
method
:
'post'
,
data
})
})
}
// 新增/编辑自定义分组
...
...
@@ -36,5 +36,13 @@ export function editReportGroupAPI(data) {
url
:
'/report/customer/core/group/insertOrUpdate'
,
method
:
'post'
,
data
})
})
}
// 删除自定义分组
export
function
deleteReportGroupAPI
(
groupId
)
{
return
request
({
url
:
`/report/customer/core/group/delete?groupId=
${
groupId
}
`
,
method
:
'DELETE'
})
}
\ No newline at end of file
src/views/bi/supply/index.vue
浏览文件 @
ac54cbdd
...
...
@@ -75,7 +75,7 @@
<el-input
v-else
v-model=
"group.groupName"
ref=
"groupNameRef"
@
blur=
"
blue
"
></el-input>
@
blur=
"
groupNameBlur(group)
"
></el-input>
</div>
<div
class=
"card-header-right"
>
<el-button
type=
"primary"
...
...
@@ -125,7 +125,7 @@
</template>
<
script
setup
>
import
{
getReportListAPI
,
getReportListBySelfAPI
,
getReportListByGroupAPI
,
addReportGroupAPI
,
editReportGroupAPI
}
from
'@/api'
import
{
getReportListAPI
,
getReportListBySelfAPI
,
getReportListByGroupAPI
,
addReportGroupAPI
,
editReportGroupAPI
,
deleteReportGroupAPI
}
from
'@/api'
import
draggable
from
'vuedraggable'
const
{
proxy
}
=
getCurrentInstance
()
const
visible
=
ref
(
false
)
...
...
@@ -162,13 +162,23 @@ const groupChange = async (e) => {
}
getReportList
()
// 修改分组名
// 修改分组名
-触发
const
changeGroupName
=
(
group
)
=>
{
group
.
showEdit
=
true
nextTick
(()
=>
{
proxy
.
$refs
[
'groupNameRef'
][
0
].
focus
()
})
}
// 修改分组名-确认
const
groupNameBlur
=
async
(
group
)
=>
{
group
.
showEdit
=
false
await
editReportGroupAPI
({
groupId
:
group
.
groupId
,
groupName
:
group
.
groupName
,
categoryName
:
'供应链报表'
})
}
// 删除分组
const
removeGroupName
=
(
group
)
=>
{
// 判断组内还有下属表,给提示不让删除
...
...
@@ -177,8 +187,9 @@ const removeGroupName = (group) => {
return
}
// 确认删除吗?
proxy
.
$modal
.
confirm
(
'确认删除分组"'
+
group
.
groupName
+
'"?
删除后下属报表自动回到左侧列表中
'
).
then
(
async
()
=>
{
proxy
.
$modal
.
confirm
(
'确认删除分组"'
+
group
.
groupName
+
'"?'
).
then
(
async
()
=>
{
// 把当前分组的报表放到左侧
await
deleteReportGroupAPI
(
group
.
groupId
)
reportList
.
value
=
reportList
.
value
.
concat
(
group
.
items
)
const
index
=
groups
.
value
.
indexOf
(
group
)
groups
.
value
.
splice
(
index
,
1
)
...
...
@@ -186,12 +197,11 @@ const removeGroupName = (group) => {
}
// 新增分组
const
addGroups
=
async
()
=>
{
// await editReportGroupAPI({
// groupName: '新分组',
// categoryName: '供应链报表',
// items: []
// })
await
editReportGroupAPI
({
groupName
:
'新分组'
,
categoryName
:
'供应链报表'
,
items
:
[]
})
groups
.
value
.
push
({
groupName
:
'新分组'
,
...
...
@@ -217,12 +227,7 @@ const addGroups = async () => {
padding
:
0
0
0
20px
;
.link_item
{
padding
:
10px
0
;
width
:
25%
;
/* 超出宽度文字省略号 */
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
padding
:
10px
;
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论