Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
7bc69c06
提交
7bc69c06
authored
3月 18, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(.env): 修改积木和飞书基地址
同上
上级
e397e1a1
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
114 行增加
和
20 行删除
+114
-20
.env.production
.env.production
+3
-3
index.vue
src/views/bi/supply/index.vue
+111
-17
没有找到文件。
.env.production
浏览文件 @
7bc69c06
...
...
@@ -10,6 +10,6 @@ VITE_APP_BASE_API = '/api' # 小卤
VITE_APP_PROMOTION = 'http://promotion.wxl66.cn:8010' # 促销
# 飞书服务回调地址
VITE_APP_REDIRECT_URL = 'http://1
11.198.15.68:86
/link/'
VITE_APP_REDIRECT_URL = 'http://1
.202.71.66:85
/link/'
# 积木报表服务地址
VITE_APP_REPORT_URL = 'http://111.198.15.68:86'
\ No newline at end of file
VITE_APP_REPORT_URL = 'http://1.202.71.66:85'
\ No newline at end of file
src/views/bi/supply/index.vue
浏览文件 @
7bc69c06
...
...
@@ -12,31 +12,59 @@
</el-button>
</div>
</
template
>
<div
v-for=
"item in reportList"
class=
"item"
>
<div
v-for=
"item in groups"
class=
"group_item"
>
<div>
<p
class=
"group_name"
>
<el-icon
color=
"blue"
size=
"18"
>
<Folder
/>
</el-icon>
<span>
{{ item.name }}
</span>
</p>
<div
class=
"link_wrap"
>
<div
class=
"link_item"
v-for=
"obj in item.items"
>
<el-icon
color=
"green"
size=
"16"
>
<Document></Document>
</el-icon>
<el-link
:href=
"baseURL + item.previewUrl"
target=
"_blank"
>
{{ item.name }}
</el-link>
<el-link
:href=
"baseURL + obj.previewUrl"
target=
"_blank"
>
{{ obj.name }}
</el-link>
</div>
</div>
</div>
</div>
</el-card>
<p>
尝试下面
</p>
<draggable
v-model=
"reportList"
group=
"reports"
item-key=
"id"
>
<el-dialog
title=
"编辑常用报表"
v-model=
"visible"
>
<div
class=
"wrap"
>
<div
class=
"left"
>
<draggable
v-model=
"reportList"
group=
"reports"
ghost-class=
"dragging-item-left"
item-key=
"id"
>
<
template
#
item=
"{ element }"
>
<div
class=
"item"
>
<el-icon
color=
"green"
size=
"16"
>
<div
class=
"link_item"
>
<el-icon
color=
"green"
size=
"16"
>
<Document></Document>
</el-icon>
<el-link
:href=
"baseURL + element.previewUrl"
target=
"_blank"
>
{{
element
.
name
}}
</el-link>
<el-link
:href=
"baseURL + element.previewUrl"
target=
"_blank"
>
{{
element
.
name
}}
</el-link>
</div>
</
template
>
</draggable>
</div>
<div
class=
"right"
>
<div
class=
"group-container"
>
<el-card
v-for=
"group in groups"
:key=
"group.id"
class=
"group"
>
class=
"group_card"
:style=
"{ width: '100%' }"
>
<
template
#
header
>
<div
class=
"card-header"
>
<span>
{{
group
.
name
}}
</span>
...
...
@@ -44,6 +72,7 @@
</
template
>
<draggable
v-model=
"group.items"
group=
"reports"
ghost-class=
"dragging-item"
item-key=
"id"
>
<
template
#
item=
"{ element }"
>
<div
class=
"item"
>
...
...
@@ -58,18 +87,22 @@
</draggable>
</el-card>
</div>
</el-card>
</div>
</div>
</el-dialog>
</div>
</template>
<
script
setup
>
import
{
getReportListAPI
}
from
'@/api'
import
draggable
from
'vuedraggable'
const
visible
=
ref
(
false
)
const
groups
=
ref
([
{
id
:
1
,
name
:
'分组1'
,
items
:
[]
},
{
id
:
2
,
name
:
'分组2'
,
items
:
[]
},
{
id
:
3
,
name
:
'分组3'
,
items
:
[]
},
{
id
:
4
,
name
:
'分组4'
,
items
:
[]
}
{
id
:
1
,
name
:
'品控部'
,
items
:
[]
},
{
id
:
2
,
name
:
'物流部'
,
items
:
[]
},
{
id
:
3
,
name
:
'计划部'
,
items
:
[]
},
{
id
:
4
,
name
:
'采购部'
,
items
:
[]
},
{
id
:
5
,
name
:
'滁州工厂'
,
items
:
[]
},
])
...
...
@@ -77,7 +110,7 @@ const baseURL = ref(import.meta.env.VITE_APP_REPORT_URL + '/report')
const
reportList
=
ref
([])
const
getReportList
=
async
()
=>
{
const
{
data
}
=
await
getReportListAPI
()
reportList
.
value
=
data
reportList
.
value
=
data
.
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
).
concat
(
data
)
}
getReportList
()
</
script
>
...
...
@@ -91,13 +124,73 @@ getReportList()
}
}
.item
{
.group_item
{
.group_name
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
font-size
:
16px
;
font-weight
:
800
;
}
.link_wrap
{
display
:
flex
;
flex-wrap
:
wrap
;
.link_item
{
padding
:
0
0
0
20px
;
width
:
25%
;
/* 超出宽度文字省略号 */
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
.link_item
{
margin
:
10px
0
;
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
}
.group_card
{
margin-top
:
20px
;
}
.wrap
{
display
:
flex
;
gap
:
20px
;
width
:
100%
;
height
:
100%
;
.left
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
.right
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
overflow-x
:
hidden
;
}
}
/* 添加拖拽时的样式 */
.dragging-item-left
{
background-color
:
transparent
;
}
.dragging-item
{
background-color
:
#409eff
;
opacity
:
0
.5
;
color
:
white
;
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论