Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
ca74db31
提交
ca74db31
authored
1月 07, 2026
作者:
付康
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'lzl-dev' 到 'master'
法案出口管制合作限制优化 查看合并请求
!82
上级
3c102401
468ff00e
全部展开
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
527 行增加
和
165 行删除
+527
-165
coopRestriction.js
src/api/coopRestriction/coopRestriction.js
+20
-0
index.vue
src/views/bill/billHome/index.vue
+16
-13
index.vue
src/views/bill/index.vue
+0
-56
default-icon-news.png
...views/coopRestriction/assets/images/default-icon-news.png
+0
-0
default-icon1.png
src/views/coopRestriction/assets/images/default-icon1.png
+0
-0
default-icon2.png
src/views/coopRestriction/assets/images/default-icon2.png
+0
-0
index.vue
src/views/coopRestriction/components/dataNew/index.vue
+18
-0
index.vue
src/views/coopRestriction/components/resLib/index.vue
+0
-0
index.vue
src/views/coopRestriction/index.vue
+212
-10
index.vue
src/views/exportControl/index.vue
+12
-2
index.vue
...v2.0SingleSanction/components/sanctionsOverview/index.vue
+28
-31
index.vue
src/views/ruleRestriction/index.vue
+221
-53
没有找到文件。
src/api/coopRestriction/coopRestriction.js
浏览文件 @
ca74db31
...
...
@@ -77,3 +77,22 @@ export function getCoopRestrictionDomain(params) {
params
})
}
// 合作限制-获取合作限制列表接口
/**
* @param {area} 涉及领域
* @param {currentPage} 当前页码
* @param {pageSize} 每页数量
* @param {sortOrder} 排序顺序
* @param {source} 合作来源
* @param {sortField} 排序字段
* @param {type} 合作限制类型
* @header token
*/
export
function
getCoopRestrictionList
(
params
)
{
return
request
({
method
:
'GET'
,
url
:
`/api/cooperationlimitinfo/statList`
,
params
})
}
\ No newline at end of file
src/views/bill/billHome/index.vue
浏览文件 @
ca74db31
...
...
@@ -1513,24 +1513,26 @@ watch(box8selectetedTime, () => {
}
);
const
handleToPosi
=
id
=>
{
let
top
=
0
;
switch
(
id
)
{
case
"position2"
:
top
=
isShow
.
value
?
634
:
980
;
break
;
case
"position3"
:
top
=
isShow
.
value
?
1204
:
1550
;
break
;
case
"position4"
:
top
=
isShow
.
value
?
2334
:
2680
;
break
;
default
:
top
=
0
;
const
element
=
document
.
getElementById
(
id
);
if
(
element
&&
containerRef
.
value
)
{
// 1. 如果是从完整搜索框跳转,先强制切换状态稳定布局
if
(
!
isShow
.
value
)
{
isShow
.
value
=
true
;
}
// 2. 使用 nextTick 等待 DOM 布局(如高度切换)完成后再进行坐标计算
nextTick
(()
=>
{
const
containerRect
=
containerRef
.
value
.
getBoundingClientRect
();
const
elementRect
=
element
.
getBoundingClientRect
();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离
const
top
=
elementRect
.
top
-
containerRect
.
top
+
containerRef
.
value
.
scrollTop
;
containerRef
.
value
.
scrollTo
({
top
:
top
,
behavior
:
"smooth"
}
);
}
);
}
}
;
const
tabList
=
ref
([
...
...
@@ -1827,6 +1829,7 @@ onUnmounted(() => {});
overflow
-
y
:
auto
;
}
.
home
-
box
{
position
:
relative
;
width
:
100
%
;
height
:
100
%
;
background
:
url
(
"./assets/images/background.png"
);
...
...
src/views/bill/index.vue
浏览文件 @
ca74db31
...
...
@@ -116,62 +116,6 @@ const handleClickLeftSiderBtn = (item) => {
}
})
}
const
progressList
=
ref
([
{
tip
:
true
,
date
:
"7月5日"
,
title
:
"特朗普于美国独立日签署法案,公法编号Pub. L. No. 119-21。白宫举行庆典,B-2轰炸机飞越上空,象征“美国新时代”开启。"
,
degree
:
"特别重大风险"
,
rank
:
4
,
},
{
tip
:
true
,
date
:
"7月4日"
,
title
:
"众议院最终表决218票赞成 vs 214票反对,修订版法案以4票优势通过,2名共和党议员倒戈,民主党全员反对。"
,
degree
:
"重大风险"
,
rank
:
3
,
},
{
tip
:
true
,
date
:
"7月3日"
,
title
:
"民主党领袖杰弗里斯发表 8小时45分钟 演讲(众议院现代史最长),抗议法案“劫贫济富”,但仍未阻止表决。"
,
degree
:
"较大风险"
,
rank
:
2
,
},
{
tip
:
true
,
date
:
"7月2日"
,
title
:
"众议院以 219:213 通过程序规则,为最终表决铺路。此前4名共和党议员反对程序规则,议长约翰逊紧急游说挽回1票。"
,
degree
:
"低风险"
,
rank
:
1
,
},
{
tip
:
false
,
date
:
"7月1日"
,
title
:
"参议院最终表决投票51:50,副总统万斯(JD Vance)投出关键票打破平局。3名共和党参议员倒戈(蒂利斯、保罗、柯林斯)。"
,
degree
:
""
,
},
]);
const
wordCloudData
=
[
{
name
:
"财政保守主义"
,
value
:
100
},
{
name
:
"移民与边境安全"
,
value
:
5
},
{
name
:
"削减市民福利"
,
value
:
77
},
{
name
:
"债务驱动型经济"
,
value
:
35
},
{
name
:
"传统能源"
,
value
:
96
},
{
name
:
"与马斯克公开冲突"
,
value
:
57
},
{
name
:
"共和党财政鹰派"
,
value
:
72
},
{
name
:
"财政问责法案"
,
value
:
18
},
{
name
:
"强硬边境政策"
,
value
:
34
},
{
name
:
"扩大军费"
,
value
:
16
},
{
name
:
"债务与赤字警告"
,
value
:
72
},
{
name
:
"批评美国债务膨胀"
,
value
:
58
},
];
onMounted
(()
=>
{});
</
script
>
...
...
src/views/coopRestriction/assets/images/default-icon-news.png
0 → 100644
浏览文件 @
ca74db31
57.8 KB
src/views/coopRestriction/assets/images/default-icon1.png
0 → 100644
浏览文件 @
ca74db31
6.5 KB
src/views/coopRestriction/assets/images/default-icon2.png
0 → 100644
浏览文件 @
ca74db31
8.2 KB
src/views/coopRestriction/components/dataNew/index.vue
浏览文件 @
ca74db31
...
...
@@ -335,6 +335,14 @@ onMounted(() => {
margin-bottom
:
12px
;
display
:
flex
;
align-items
:
flex-start
;
&
:
:
before
{
content
:
"·"
;
font-size
:
24px
;
line-height
:
20px
;
font-weight
:
bold
;
margin-right
:
16px
;
color
:
rgb
(
59
,
65
,
75
);
}
.ul-title
{
flex-shrink
:
0
;
width
:
120px
;
...
...
@@ -413,6 +421,16 @@ onMounted(() => {
line-height
:
24px
;
color
:
rgb
(
59
,
65
,
75
);
margin-bottom
:
10px
;
display
:
flex
;
align-items
:
center
;
&
:
:
before
{
content
:
"·"
;
font-size
:
24px
;
line-height
:
20px
;
font-weight
:
bold
;
margin-right
:
12px
;
color
:
rgb
(
59
,
65
,
75
);
}
}
}
.left-bottom-content
{
...
...
src/views/coopRestriction/components/resLib/index.vue
浏览文件 @
ca74db31
差异被折叠。
点击展开。
src/views/coopRestriction/index.vue
浏览文件 @
ca74db31
<
template
>
<div
class=
"coop-page"
>
<!-- 吸顶简易搜索框 -->
<div
class=
"search-header"
v-show=
"isShow"
>
<div
class=
"home-main-header-center"
>
<input
v-model=
"input"
class=
"search-input"
placeholder=
"搜索合作限制"
/>
<div
class=
"search-btn-small"
@
click=
"handleSearch"
>
<div
class=
"search-icon"
>
<img
src=
"./assets/icons/search-icon.png"
alt=
""
/>
</div>
<div
class=
"search-text"
>
搜索
</div>
</div>
</div>
<div
class=
"home-main-header-btn-box"
>
<div
class=
"btn"
@
click=
"handleToPosi('position1')"
>
<div
class=
"btn-text"
>
最新动态
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position2')"
>
<div
class=
"btn-text"
>
咨询要闻
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position3')"
>
<div
class=
"btn-text"
>
数据总览
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position4')"
>
<div
class=
"btn-text"
>
资源库
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
</div>
</div>
<!-- 面包屑 -->
<div
class=
"breadcrumb"
>
<div
class=
"breadcrumb"
v-show=
"!isShow"
>
<div
class=
"breadcrumb-box"
>
<div
class=
"breadcrumb-item"
>
国家科技安全
</div>
<div
class=
"breadcrumb-item"
>
>
</div>
...
...
@@ -11,9 +50,9 @@
</div>
</div>
<!-- 主页面 -->
<div
class=
"main-content"
>
<div
class=
"main-content"
ref=
"homeMainRef"
:class=
"
{ 'scroll-main': isShow }"
>
<!-- 搜索栏部分 -->
<div
class=
"search"
>
<div
class=
"search"
v-show=
"!isShow"
>
<div
class=
"search-main"
>
<input
v-model=
"input"
placeholder=
"搜索合作限制"
class=
"search-input"
/>
<div
class=
"search-btn"
>
...
...
@@ -36,25 +75,25 @@
</div>
</div>
-->
<div
class=
"search-bottom"
>
<div
class=
"btn"
@
click=
"
scrollToTop
('position1')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position1')"
>
<div
class=
"btn-text"
>
最新动态
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position2')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position2')"
>
<div
class=
"btn-text"
>
咨询要闻
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position3')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position3')"
>
<div
class=
"btn-text"
>
数据总览
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position4')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position4')"
>
<div
class=
"btn-text"
>
资源库
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
...
...
@@ -95,21 +134,52 @@
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
ref
,
onMounted
,
nextTick
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
comTitle
from
"./common/comTitle.vue"
;
import
newData
from
"./components/dataNew/index.vue"
;
import
askPage
from
"./components/askPage/index.vue"
;
import
dataSub
from
"./components/dataSub/index.vue"
;
import
resLib
from
"./components/resLib/index.vue"
;
import
scrollToTop
from
"@/utils/scrollToTop"
;
import
{
useContainerScroll
}
from
"@/hooks/useScrollShow"
;
// 搜索框
const
input
=
ref
(
""
);
const
homeMainRef
=
ref
(
null
);
const
{
isShow
}
=
useContainerScroll
(
homeMainRef
);
const
router
=
useRouter
();
// 搜索功能
const
handleSearch
=
()
=>
{
console
.
log
(
"搜索内容:"
,
input
.
value
);
};
// 锚点跳转
const
handleToPosi
=
id
=>
{
const
element
=
document
.
getElementById
(
id
);
if
(
element
&&
homeMainRef
.
value
)
{
// 如果当前还未显示吸顶搜索栏,先强制切换状态以稳定布局
if
(
!
isShow
.
value
)
{
isShow
.
value
=
true
;
}
// 使用 nextTick 确保 DOM 状态更新(高度变化生效)后再计算
nextTick
(()
=>
{
const
containerRect
=
homeMainRef
.
value
.
getBoundingClientRect
();
const
elementRect
=
element
.
getBoundingClientRect
();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离,不受嵌套布局影响
const
top
=
elementRect
.
top
-
containerRect
.
top
+
homeMainRef
.
value
.
scrollTop
;
homeMainRef
.
value
.
scrollTo
({
top
:
top
,
behavior
:
"smooth"
});
});
}
};
// 返回首页
const
handleBackHome
=
()
=>
{
router
.
push
({
...
...
@@ -152,6 +222,7 @@ const handleBackHome = () => {
}
}
.main-content
{
position
:
relative
;
overflow
:
auto
;
width
:
100%
;
height
:
calc
(
100%
-
64px
);
...
...
@@ -188,7 +259,11 @@ const handleBackHome = () => {
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
24px
;
color
:
rgb
(
132
,
136
,
142
);
color
:
rgba
(
59
,
65
,
75
,
1
);
&
:
:
placeholder
{
color
:
#a8abb2
;
}
}
.search-btn
{
margin-right
:
-3px
;
...
...
@@ -335,5 +410,132 @@ const handleBackHome = () => {
}
}
}
.search-header
{
width
:
100%
;
height
:
144px
;
background
:
#fff
;
box-shadow
:
0px
0px
15px
0px
rgba
(
22
,
119
,
255
,
0
.1
);
overflow
:
hidden
;
.home-main-header-center
{
margin-top
:
20px
;
margin-left
:
200px
;
width
:
800px
;
height
:
48px
;
border-radius
:
10px
;
box-shadow
:
0px
0px
15px
0px
rgba
(
22
,
119
,
255
,
0
.1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
box-sizing
:
border-box
;
padding
:
1px
;
position
:
relative
;
border
:
1px
solid
transparent
;
display
:
flex
;
align-items
:
center
;
&
:hover
{
border
:
1px
solid
var
(
--
color-main-active
);
}
.search-input
{
border
:
none
;
outline
:
none
;
width
:
800px
;
height
:
46px
;
background-color
:
transparent
;
font-size
:
16px
;
padding
:
12px
16px
;
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
24px
;
color
:
rgb
(
132
,
136
,
142
);
}
.search-btn-small
{
position
:
absolute
;
right
:
-1px
;
top
:
0px
;
width
:
120px
;
height
:
46px
;
border-radius
:
10px
;
background
:
var
(
--
color-main-active
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
pointer
;
.search-icon
{
width
:
18px
;
height
:
18px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.search-text
{
margin-left
:
8px
;
height
:
22px
;
color
:
#fff
;
font-family
:
Microsoft
YaHei
;
font-size
:
16px
;
font-weight
:
400
;
line-height
:
22px
;
}
}
}
.home-main-header-btn-box
{
margin-top
:
20px
;
margin-left
:
200px
;
display
:
flex
;
gap
:
16px
;
.btn
{
display
:
flex
;
align-items
:
center
;
gap
:
9px
;
width
:
160px
;
height
:
48px
;
border
:
1px
solid
#aed6ff
;
box-sizing
:
border-box
;
border-radius
:
24px
;
background
:
#e7f3ff
;
cursor
:
pointer
;
position
:
relative
;
&
:hover
{
background
:
#cae3fc
;
}
.btn-text
{
width
:
80px
;
color
:
var
(
--
color-main-active
);
font-family
:
Microsoft
YaHei
;
font-size
:
20px
;
font-weight
:
400
;
line-height
:
48px
;
margin-left
:
36px
;
text-align
:
center
;
}
.btn-icon
{
position
:
absolute
;
top
:
16px
;
right
:
19px
;
width
:
6px
;
height
:
12px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
}
}
.scroll-main
{
height
:
calc
(
100%
-
144px
)
!
important
;
}
}
</
style
>
src/views/exportControl/index.vue
浏览文件 @
ca74db31
...
...
@@ -627,8 +627,7 @@
</template>
<
script
setup
>
import
{
onMounted
,
ref
,
computed
,
reactive
,
shallowRef
,
watch
}
from
"vue"
;
import
scrollToTop
from
"@/utils/scrollToTop"
;
import
{
onMounted
,
ref
,
computed
,
reactive
,
shallowRef
,
watch
,
nextTick
}
from
"vue"
;
import
{
useContainerScroll
}
from
"@/hooks/useScrollShow"
;
const
homeMainRef
=
ref
(
null
);
const
{
isShow
}
=
useContainerScroll
(
homeMainRef
);
...
...
@@ -686,13 +685,23 @@ import {
const
handleToPosi
=
id
=>
{
const
element
=
document
.
getElementById
(
id
);
if
(
element
&&
homeMainRef
.
value
)
{
// 1. 如果是从完整搜索框跳转,先强制切换状态稳定布局
if
(
!
isShow
.
value
)
{
isShow
.
value
=
true
;
}
// 2. 使用 nextTick 等待 DOM 布局(如高度切换)完成后再进行坐标计算
nextTick
(()
=>
{
const
containerRect
=
homeMainRef
.
value
.
getBoundingClientRect
();
const
elementRect
=
element
.
getBoundingClientRect
();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离,不受嵌套布局影响
const
top
=
elementRect
.
top
-
containerRect
.
top
+
homeMainRef
.
value
.
scrollTop
;
homeMainRef
.
value
.
scrollTo
({
top
:
top
,
behavior
:
"smooth"
});
});
}
};
...
...
@@ -2159,6 +2168,7 @@ const handleMediaClick = item => {
overflow-y
:
hidden
;
.home-main
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
...
...
src/views/exportControl/v2.0SingleSanction/components/sanctionsOverview/index.vue
浏览文件 @
ca74db31
...
...
@@ -103,36 +103,37 @@
</div>
</div>
<div
class=
"right-title"
>
<div
class=
"filter-row"
>
<!--
<div
class=
"filter-left"
>
<el-select
v-model=
"filterEntity"
placeholder=
"受制裁实体"
style=
"width: 184px"
>
<el-option
label=
"受制裁实体"
value=
"1"
/>
</el-select>
</div>
-->
<div
class=
"filter-right"
>
<el-checkbox
v-model=
"onlyChina"
label=
"只看中国实体"
/>
<el-select
v-model=
"filterField"
placeholder=
"全部领域"
style=
"width: 150px; margin: 0 12px 0 16px"
>
<el-option
label=
"全部领域"
value=
""
/>
<el-option
v-for=
"item in domainOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-input
v-model=
"searchKeyword"
placeholder=
"搜索实体"
style=
"width: 150px"
:suffix-icon=
"Search"
/>
</div>
</div>
<div
class=
"stats-row"
>
<
!--
<
div
class=
"tabs"
>
<div
class=
"tabs"
>
<div
class=
"tab-btn"
:class=
"
{ active: activeTab === 'add' }" @click="activeTab = 'add'">新增实体
</div>
<div
class=
"tab-btn"
:class=
"
{ active: activeTab === 'remove' }" @click="activeTab = 'remove'">移除实体
</div>
</div>
-->
</div>
<div
class=
"stats-info"
>
<div
class=
"stat-item"
>
<span
class=
"dot red"
></span>
<span
class=
"text"
>
新增
<span
class=
"num red"
>
{{
addCount
}}
</span>
家 (50%规则涉及
<span
class=
"num red"
>
{{
addRuleCount
}}
</span>
家)
</span>
</div>
<
!--
<
div
class=
"stat-item"
>
<div
class=
"stat-item"
>
<span
class=
"dot green"
></span>
<span
class=
"text"
>
移除
<span
class=
"num green"
>
{{
removeCount
}}
</span>
家 (50%规则涉及
<span
class=
"num green"
>
{{
removeRuleCount
}}
</span>
家)
</span>
</div>
-->
</div>
</div>
</div>
<div
class=
"filter-row"
>
<div
class=
"filter-left"
>
<!--
<el-select
v-model=
"filterEntity"
placeholder=
"受制裁实体"
style=
"width: 184px"
>
<el-option
label=
"受制裁实体"
value=
"1"
/>
</el-select>
-->
</div>
<div
class=
"filter-right"
>
<el-checkbox
v-model=
"onlyChina"
label=
"只看中国实体"
/>
<el-select
v-model=
"filterField"
placeholder=
"全部领域"
style=
"width: 150px; margin: 0 12px 0 16px"
>
<el-option
label=
"全部领域"
value=
""
/>
<el-option
v-for=
"item in domainOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-input
v-model=
"searchKeyword"
placeholder=
"搜索实体"
style=
"width: 150px"
:suffix-icon=
"Search"
/>
</div>
</div>
</div>
...
...
@@ -185,6 +186,7 @@
<
script
setup
>
import
{
ref
,
defineProps
,
computed
,
onMounted
,
watch
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
DArrowRight
,
Search
}
from
"@element-plus/icons-vue"
;
import
{
debounce
}
from
"lodash"
;
import
title
from
"../../assets/title.png"
...
...
@@ -195,14 +197,10 @@ import RuleSubsidiaryDialog from "../../../v2.0EntityList/components/sanctionsOv
// 跳转公司详情页
const
handleCompClick
=
item
=>
{
// console.log("item", item);
// const route = router.resolve({
// path: "/companyPages",
// query: {
// id: item.entityId
// }
// });
// window.open(route.href, "_blank");
if
(
!
item
.
entityId
)
{
ElMessage
.
warning
(
"暂无数据"
);
return
;
}
const
curRoute
=
router
.
resolve
({
name
:
"companyPages"
,
params
:
{
id
:
item
.
entityId
}
});
window
.
open
(
curRoute
.
href
,
"_blank"
);
};
...
...
@@ -817,10 +815,9 @@ onMounted(() => {
.filter-row
{
display
:
flex
;
// 隐藏使用right,解除使用space-between
justify-content
:
right
;
align-items
:
center
;
margin-bottom
:
20px
;
//
margin-bottom: 20px;
:deep
(
.el-input__inner
)
{
font-size
:
16px
;
...
...
@@ -850,8 +847,8 @@ onMounted(() => {
.stats-row
{
display
:
flex
;
// 隐藏使用right,解除使用space-between
justify-content
:
right
;
margin-bottom
:
20px
;
justify-content
:
space-between
;
align-items
:
center
;
.tabs
{
...
...
src/views/ruleRestriction/index.vue
浏览文件 @
ca74db31
<
template
>
<div
class=
"coop-page"
>
<!-- 吸顶简易搜索框 -->
<div
class=
"search-header"
v-show=
"isShow"
>
<div
class=
"home-main-header-center"
>
<input
v-model=
"input"
class=
"search-input"
placeholder=
"搜索规则限制"
/>
<div
class=
"search-btn-small"
@
click=
"handleSearch"
>
<div
class=
"search-icon"
>
<img
src=
"./assets/icons/search-icon.png"
alt=
""
/>
</div>
<div
class=
"search-text"
>
搜索
</div>
</div>
</div>
<div
class=
"home-main-header-btn-box"
>
<div
class=
"btn"
@
click=
"handleToPosi('position1')"
>
<div
class=
"btn-text"
>
最新动态
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position2')"
>
<div
class=
"btn-text"
>
咨询要闻
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position3')"
>
<div
class=
"btn-text"
>
数据总览
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"handleToPosi('position4')"
>
<div
class=
"btn-text"
>
资源库
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
</div>
</div>
<!-- 面包屑 -->
<div
class=
"breadcrumb"
>
<div
class=
"breadcrumb"
v-show=
"!isShow"
>
<div
class=
"breadcrumb-box"
>
<div
class=
"breadcrumb-item"
>
国家科技安全
</div>
<div
class=
"breadcrumb-item"
>
>
</div>
...
...
@@ -11,9 +50,9 @@
</div>
</div>
<!-- 主页面 -->
<div
class=
"main-content"
>
<div
class=
"main-content"
ref=
"homeMainRef"
:class=
"
{ 'scroll-main': isShow }"
>
<!-- 搜索栏部分 -->
<div
class=
"search"
>
<div
class=
"search"
v-show=
"!isShow"
>
<div
class=
"search-main"
>
<input
v-model=
"input"
placeholder=
"搜索规则限制"
class=
"search-input"
/>
<div
class=
"search-btn"
>
...
...
@@ -40,25 +79,25 @@
</div>
</div>
-->
<div
class=
"search-bottom"
>
<div
class=
"btn"
@
click=
"
scrollToTop
('position1')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position1')"
>
<div
class=
"btn-text"
>
最新动态
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position2')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position2')"
>
<div
class=
"btn-text"
>
咨询要闻
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position3')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position3')"
>
<div
class=
"btn-text"
>
数据总览
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
</div>
</div>
<div
class=
"btn"
@
click=
"
scrollToTop
('position4')"
>
<div
class=
"btn"
@
click=
"
handleToPosi
('position4')"
>
<div
class=
"btn-text"
>
资源库
</div>
<div
class=
"btn-icon"
>
<img
src=
"@/assets/icons/arrow-right-icon.png"
alt=
""
/>
...
...
@@ -99,7 +138,7 @@
</
template
>
<
script
setup
>
import
{
ref
}
from
"vue"
;
import
{
ref
,
nextTick
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
comTitle
from
"./common/comTitle.vue"
;
import
newData
from
"./components/dataNew/index.vue"
;
...
...
@@ -107,14 +146,44 @@ import askPage from "./components/askPage/index.vue";
import
dataSub
from
"./components/dataSub/index.vue"
;
import
resLib
from
"./components/resLib/index.vue"
;
import
scrollToTop
from
"@/utils/scrollToTop"
;
import
{
useContainerScroll
}
from
"@/hooks/useScrollShow"
;
// 搜索框
const
input
=
ref
(
""
);
const
homeMainRef
=
ref
(
null
);
const
{
isShow
}
=
useContainerScroll
(
homeMainRef
);
const
router
=
useRouter
();
// 搜索功能
const
handleSearch
=
()
=>
{
console
.
log
(
"搜索内容:"
,
input
.
value
);
};
// 锚点跳转
const
handleToPosi
=
id
=>
{
const
element
=
document
.
getElementById
(
id
);
if
(
element
&&
homeMainRef
.
value
)
{
// 如果当前还未显示吸顶搜索栏,先强制切换状态以稳定布局
if
(
!
isShow
.
value
)
{
isShow
.
value
=
true
;
}
// 使用 nextTick 确保 DOM 状态更新(高度变化生效)后再计算
nextTick
(()
=>
{
const
containerRect
=
homeMainRef
.
value
.
getBoundingClientRect
();
const
elementRect
=
element
.
getBoundingClientRect
();
// 使用 getBoundingClientRect 计算元素相对于容器顶部的绝对距离,不受嵌套布局影响
const
top
=
elementRect
.
top
-
containerRect
.
top
+
homeMainRef
.
value
.
scrollTop
;
homeMainRef
.
value
.
scrollTo
({
top
:
top
,
behavior
:
"smooth"
});
});
}
};
// 返回首页
const
handleBackHome
=
()
=>
{
router
.
push
({
...
...
@@ -157,12 +226,18 @@ const handleBackHome = () => {
}
}
.main-content
{
position
:
relative
;
overflow
:
auto
;
width
:
100%
;
height
:
calc
(
100%
-
64px
);
background
:
url("./assets/images/background.png")
;
background-size
:
100%
100%
;
padding
:
44px
160px
30px
160px
;
&
.scroll-main
{
height
:
calc
(
100%
-
144px
);
}
.search
{
width
:
960px
;
height
:
168px
;
...
...
@@ -184,15 +259,19 @@ const handleBackHome = () => {
.search-input
{
border
:
none
;
outline
:
none
;
width
:
8
00
px
;
width
:
8
38
px
;
height
:
48px
;
background-color
:
transparent
;
font-size
:
1
6
px
;
font-size
:
1
4
px
;
padding
:
12px
16px
;
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
24px
;
color
:
rgb
(
132
,
136
,
142
);
line-height
:
22px
;
color
:
rgba
(
59
,
65
,
75
,
1
);
&
:
:
placeholder
{
color
:
#a8abb2
;
}
}
.search-btn
{
cursor
:
pointer
;
...
...
@@ -204,53 +283,18 @@ const handleBackHome = () => {
margin-right
:
-3px
;
border-radius
:
8px
;
background-color
:
rgb
(
5
,
95
,
194
);
font-size
:
1
8
px
;
font-size
:
1
6
px
;
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
2
4
px
;
line-height
:
2
2
px
;
color
:
#fff
;
img
{
width
:
22
px
;
height
:
22
px
;
width
:
18
px
;
height
:
18
px
;
margin-right
:
8px
;
}
}
}
.search-center
{
width
:
600px
;
height
:
57px
;
margin
:
36px
auto
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.search-item
{
box-sizing
:
border-box
;
width
:
120px
;
height
:
57px
;
.search-item-num
{
width
:
120px
;
height
:
22px
;
font-size
:
36px
;
font-weight
:
700
;
font-family
:
"Microsoft YaHei"
;
line-height
:
22px
;
color
:
rgb
(
5
,
95
,
194
);
text-align
:
center
;
cursor
:
pointer
;
}
.search-item-name
{
width
:
120px
;
height
:
24px
;
margin-top
:
11px
;
font-size
:
16px
;
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
24px
;
color
:
rgb
(
95
,
101
,
108
);
text-align
:
center
;
}
}
}
.search-bottom
{
width
:
688px
;
height
:
48px
;
...
...
@@ -339,5 +383,129 @@ const handleBackHome = () => {
}
}
}
.search-header
{
width
:
100%
;
height
:
144px
;
background
:
#fff
;
box-shadow
:
0px
0px
15px
0px
rgba
(
22
,
119
,
255
,
0
.1
);
overflow
:
hidden
;
.home-main-header-center
{
margin-top
:
20px
;
margin-left
:
200px
;
width
:
800px
;
height
:
48px
;
border-radius
:
10px
;
box-shadow
:
0px
0px
15px
0px
rgba
(
22
,
119
,
255
,
0
.1
);
background
:
rgba
(
255
,
255
,
255
,
1
);
box-sizing
:
border-box
;
padding
:
1px
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
border
:
1px
solid
transparent
;
&
:hover
{
border
:
1px
solid
var
(
--
color-main-active
);
}
.search-input
{
border
:
none
;
outline
:
none
;
width
:
800px
;
height
:
46px
;
background-color
:
transparent
;
font-size
:
14px
;
padding
:
12px
16px
;
font-weight
:
400
;
font-family
:
"Microsoft YaHei"
;
line-height
:
22px
;
color
:
rgba
(
59
,
65
,
75
,
1
);
&
:
:
placeholder
{
color
:
#a8abb2
;
}
}
.search-btn-small
{
position
:
absolute
;
right
:
-1px
;
top
:
0px
;
width
:
120px
;
height
:
46px
;
border-radius
:
10px
;
background
:
var
(
--
color-main-active
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
cursor
:
pointer
;
.search-icon
{
width
:
18px
;
height
:
18px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.search-text
{
margin-left
:
8px
;
height
:
22px
;
color
:
#fff
;
font-family
:
Microsoft
YaHei
;
font-size
:
16px
;
font-weight
:
400
;
line-height
:
22px
;
}
}
}
.home-main-header-btn-box
{
margin-top
:
20px
;
margin-left
:
200px
;
display
:
flex
;
gap
:
16px
;
.btn
{
display
:
flex
;
align-items
:
center
;
gap
:
9px
;
width
:
160px
;
height
:
48px
;
border
:
1px
solid
#aed6ff
;
box-sizing
:
border-box
;
border-radius
:
24px
;
background
:
#e7f3ff
;
cursor
:
pointer
;
position
:
relative
;
&
:hover
{
background
:
#cae3fc
;
}
.btn-text
{
width
:
80px
;
color
:
var
(
--
color-main-active
);
font-family
:
Microsoft
YaHei
;
font-size
:
20px
;
font-weight
:
400
;
line-height
:
48px
;
margin-left
:
36px
;
text-align
:
center
;
}
.btn-icon
{
position
:
absolute
;
top
:
16px
;
right
:
19px
;
width
:
6px
;
height
:
12px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
}
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论