Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
8421103d
提交
8421103d
authored
3月 20, 2026
作者:
coderBryanFu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:数据资源库模块更新
上级
a5af246f
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
76 行增加
和
42 行删除
+76
-42
index.html
index.html
+2
-1
index.vue
src/views/dataLibrary/bill/countryBill/index.vue
+33
-18
index.vue
src/views/dataLibrary/components/ChartContainer/index.vue
+36
-4
index.vue
src/views/dataLibrary/components/ChartHeader/index.vue
+2
-19
vite.config.js
vite.config.js
+3
-0
没有找到文件。
index.html
浏览文件 @
8421103d
...
@@ -9,6 +9,6 @@
...
@@ -9,6 +9,6 @@
<body>
<body>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
<script
type=
"module"
src=
"/src/main.js"
></script>
<script
src=
"
.
/config.js"
></script>
<script
src=
"
/js
/config.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
src/views/dataLibrary/bill/countryBill/index.vue
浏览文件 @
8421103d
...
@@ -41,7 +41,8 @@
...
@@ -41,7 +41,8 @@
<
div
class
=
"content-header"
>
<
div
class
=
"content-header"
>
<
ChartHeader
:
list
=
"staticsDemensionList"
@
clickItem
=
"handleClickDemensionItem"
>
<
ChartHeader
:
list
=
"staticsDemensionList"
@
clickItem
=
"handleClickDemensionItem"
>
<
template
#
chart
-
header
-
right
>
<
template
#
chart
-
header
-
right
>
<
el
-
select
v
-
model
=
"selectedTime"
placeholder
=
"选择时间"
style
=
"width: 150px"
v
-
show
=
"curDemension === '时间'"
>
<
el
-
select
v
-
model
=
"selectedTime"
placeholder
=
"选择时间"
style
=
"width: 150px"
v
-
show
=
"curDemension === '提案时间'"
>
<
el
-
option
v
-
for
=
"item in timeList"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
/>
<
el
-
option
v
-
for
=
"item in timeList"
:
key
=
"item.value"
:
label
=
"item.label"
:
value
=
"item.value"
/>
<
/el-select
>
<
/el-select
>
...
@@ -49,7 +50,10 @@
...
@@ -49,7 +50,10 @@
<
/ChartHeader
>
<
/ChartHeader
>
<
/div
>
<
/div
>
<
div
class
=
"content-main"
>
<
div
class
=
"content-main"
>
<
ChartContainer
chartTitle
=
"美国会法案提出数量随时间变化趋势"
@
clickChartItem
=
"handleSwitchActiveChart"
>
<
ChartContainer
chartTitle
=
"美国会法案提出数量随时间变化趋势"
:
chartTypeList
=
"curChartTypeList"
@
clickChartItem
=
"handleSwitchActiveChart"
>
<
template
#
chart
-
box
>
<
template
#
chart
-
box
>
<
LineChart
v
-
if
=
"activeChart === '折线图'"
:
lineChartData
=
"lineChartData"
/>
<
LineChart
v
-
if
=
"activeChart === '折线图'"
:
lineChartData
=
"lineChartData"
/>
<
PieChart
v
-
if
=
"activeChart === '饼状图'"
:
pieChartData
=
"pieChartData"
/>
<
PieChart
v
-
if
=
"activeChart === '饼状图'"
:
pieChartData
=
"pieChartData"
/>
...
@@ -124,7 +128,7 @@
...
@@ -124,7 +128,7 @@
<
/template
>
<
/template
>
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
ref
,
computed
}
from
'vue'
import
ChartContainer
from
'../../components/ChartContainer/index.vue'
import
ChartContainer
from
'../../components/ChartContainer/index.vue'
import
ChartHeader
from
'../../components/ChartHeader/index.vue'
import
ChartHeader
from
'../../components/ChartHeader/index.vue'
import
ActiveTag
from
'../../components/ActiveTag/index.vue'
import
ActiveTag
from
'../../components/ActiveTag/index.vue'
...
@@ -148,33 +152,44 @@ const totalNum = ref(12)
...
@@ -148,33 +152,44 @@ const totalNum = ref(12)
// 统计维度列表
// 统计维度列表
const
staticsDemensionList
=
ref
([
const
staticsDemensionList
=
ref
([
{
{
name
:
'时间'
,
name
:
'提案时间'
,
active
:
true
active
:
true
,
chartTypeList
:
[
'折线图'
,
'柱状图'
]
}
,
}
,
{
{
name
:
'领域'
,
name
:
'科技领域'
,
active
:
false
active
:
false
,
chartTypeList
:
[
'饼状图'
]
}
,
}
,
{
{
name
:
'党派'
,
name
:
'提出议院'
,
active
:
false
active
:
false
,
chartTypeList
:
[
'饼状图'
]
}
,
}
,
{
{
name
:
'议院'
,
name
:
'提出委员会'
,
active
:
false
active
:
false
,
chartTypeList
:
[
'饼状图'
]
}
,
}
,
{
{
name
:
'委员会'
,
name
:
'提出议员党派'
,
active
:
false
active
:
false
,
chartTypeList
:
[
'饼状图'
]
}
,
}
,
{
{
name
:
'所处阶段'
,
name
:
'立法阶段'
,
active
:
false
active
:
false
,
chartTypeList
:
[
'饼状图'
]
}
,
}
,
])
])
const
curChartTypeList
=
computed
(()
=>
{
let
arr
=
staticsDemensionList
.
value
.
filter
(
item
=>
item
.
active
)
return
arr
[
0
].
chartTypeList
}
)
// 当前维度
// 当前维度
const
curDemension
=
ref
(
'时间'
)
const
curDemension
=
ref
(
'
提案
时间'
)
const
handleClickDemensionItem
=
(
val
)
=>
{
const
handleClickDemensionItem
=
(
val
)
=>
{
staticsDemensionList
.
value
.
forEach
(
item
=>
{
staticsDemensionList
.
value
.
forEach
(
item
=>
{
...
@@ -182,6 +197,7 @@ const handleClickDemensionItem = (val) => {
...
@@ -182,6 +197,7 @@ const handleClickDemensionItem = (val) => {
}
)
}
)
val
.
active
=
true
val
.
active
=
true
curDemension
.
value
=
val
.
name
curDemension
.
value
=
val
.
name
activeChart
.
value
=
val
.
chartTypeList
[
0
]
}
}
const
selectedTime
=
ref
(
'按月统计'
)
const
selectedTime
=
ref
(
'按月统计'
)
...
@@ -698,9 +714,8 @@ const tableData = [
...
@@ -698,9 +714,8 @@ const tableData = [
.
item3
{
}
.
item3
{
}
}
}
}
}
.
data
-
main
-
box
-
main
-
content
{
}
.
data
-
main
-
box
-
main
-
content
{
}
}
}
.
data
-
main
-
box
-
footer
{
.
data
-
main
-
box
-
footer
{
...
...
src/views/dataLibrary/components/ChartContainer/index.vue
浏览文件 @
8421103d
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
ref
}
from
'vue'
import
{
ref
,
computed
,
onMounted
,
nextTick
}
from
'vue'
import
Line
from
'./assets/icons/line.svg'
import
Line
from
'./assets/icons/line.svg'
import
LineActive
from
'./assets/icons/line-active.svg'
import
LineActive
from
'./assets/icons/line-active.svg'
import
Bar
from
'./assets/icons/bar.svg'
import
Bar
from
'./assets/icons/bar.svg'
...
@@ -34,10 +34,11 @@ import PieActive from './assets/icons/pie-active.svg'
...
@@ -34,10 +34,11 @@ import PieActive from './assets/icons/pie-active.svg'
import
Radar
from
'./assets/icons/radar.svg'
import
Radar
from
'./assets/icons/radar.svg'
import
RadarActive
from
'./assets/icons/radar-active.svg'
import
RadarActive
from
'./assets/icons/radar-active.svg'
import
TipTab
from
'@/components/base/TipTab/index.vue'
import
TipTab
from
'@/components/base/TipTab/index.vue'
const
chartItemList
=
ref
([
const
defaultChartTypeList
=
[
{
{
name
:
'折线图'
,
name
:
'折线图'
,
active
:
tru
e
,
active
:
fals
e
,
icon
:
Line
,
icon
:
Line
,
activeIcon
:
LineActive
activeIcon
:
LineActive
},
},
...
@@ -59,7 +60,8 @@ const chartItemList = ref([
...
@@ -59,7 +60,8 @@ const chartItemList = ref([
icon
:
Radar
,
icon
:
Radar
,
activeIcon
:
RadarActive
activeIcon
:
RadarActive
},
},
])
]
const
emit
=
defineEmits
(
'clickChartItem'
)
const
emit
=
defineEmits
(
'clickChartItem'
)
...
@@ -75,9 +77,39 @@ const props = defineProps({
...
@@ -75,9 +77,39 @@ const props = defineProps({
chartTitle
:
{
chartTitle
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
chartTypeList
:
{
type
:
Array
,
default
:
[]
}
}
})
})
const
chartItemList
=
computed
(()
=>
{
let
arr
=
[]
props
.
chartTypeList
.
forEach
(
item
=>
{
defaultChartTypeList
.
forEach
(
val
=>
{
if
(
val
.
name
===
item
)
{
arr
.
push
(
val
)
}
})
})
arr
.
forEach
(
item
=>
{
item
.
active
=
false
})
arr
[
0
].
active
=
true
return
arr
})
// nextTick(() => {
// let arr = chartItemList.value.filter(item => item.active)
// if(!arr.length) {
// alert(1)
// chartItemList.value[0].active = true
// }
// })
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/dataLibrary/components/ChartHeader/index.vue
浏览文件 @
8421103d
...
@@ -3,13 +3,8 @@
...
@@ -3,13 +3,8 @@
<div
class=
"left"
>
<div
class=
"left"
>
<div
class=
"left-text text-tip-1"
>
{{
'统计维度:'
}}
</div>
<div
class=
"left-text text-tip-1"
>
{{
'统计维度:'
}}
</div>
<div
class=
"left-list"
>
<div
class=
"left-list"
>
<ActionButton
<ActionButton
v-for=
"item, index in list"
:key=
"index"
:name=
"item.name"
v-for=
"item, index in list"
:type=
"item.active ? 'active' : 'normal'"
@
click=
"handleClickItem(item)"
/>
:key=
"index"
:name=
"item.name"
:type=
"item.active ? 'active' : 'normal'"
@
click=
"handleClickItem(item)"
/>
</div>
</div>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
...
@@ -25,18 +20,6 @@ const props = defineProps({
...
@@ -25,18 +20,6 @@ const props = defineProps({
list
:
{
list
:
{
type
:
Array
,
type
:
Array
,
default
:
[
default
:
[
{
name
:
'时间'
,
active
:
true
},
{
name
:
'领域'
,
active
:
false
},
{
name
:
'党派'
,
active
:
false
},
]
]
}
}
})
})
...
...
vite.config.js
浏览文件 @
8421103d
...
@@ -39,6 +39,9 @@ export default defineConfig({
...
@@ -39,6 +39,9 @@ export default defineConfig({
}
}
}
}
},
},
publicDir
:
'public'
,
// 指定 public 目录的位置
// 服务器的根路径
base
:
'/'
,
server
:
{
server
:
{
host
:
'0.0.0.0'
,
// 监听所有网络接口
host
:
'0.0.0.0'
,
// 监听所有网络接口
port
:
3000
,
port
:
3000
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论