Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
07e78f78
提交
07e78f78
authored
4月 13, 2026
作者:
张烨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:市场限制准入-概览页顶部增加新增调查数量显示
上级
33ae4eca
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
33 行增加
和
7 行删除
+33
-7
index.js
src/api/marketAccessRestrictions/index.js
+3
-2
index.vue
...views/marketAccessRestrictions/marketAccessHome/index.vue
+7
-3
index.ts
src/views/marketAccessRestrictions/utils/index.ts
+23
-2
没有找到文件。
src/api/marketAccessRestrictions/index.js
浏览文件 @
07e78f78
...
@@ -11,10 +11,11 @@ export function getStatCount(params) {
...
@@ -11,10 +11,11 @@ export function getStatCount(params) {
}
}
// 分类接口
// 分类接口
export
function
getStatSort
()
{
export
function
getStatSort
(
params
)
{
return
request
({
return
request
({
method
:
'GET'
,
method
:
'GET'
,
url
:
`/api/marketsearchHome/statSort`
url
:
`/api/marketsearchHome/statSort`
,
params
})
})
}
}
...
...
src/views/marketAccessRestrictions/marketAccessHome/index.vue
浏览文件 @
07e78f78
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
{{
item
.
sortDescription
}}
{{
item
.
sortDescription
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"item-dot"
>+
{{
"999"
}}
<
/div
>
<
div
class
=
"item-dot"
v
-
if
=
"item.addInvestCount"
>+
{{
item
.
addInvestCount
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -276,6 +276,7 @@ import CarouselItem301 from '@/views/marketAccessRestrictions/marketAccessHome/c
...
@@ -276,6 +276,7 @@ import CarouselItem301 from '@/views/marketAccessRestrictions/marketAccessHome/c
import
CarouselItem232
from
'@/views/marketAccessRestrictions/marketAccessHome/com/CarouselItem232.vue'
;
import
CarouselItem232
from
'@/views/marketAccessRestrictions/marketAccessHome/com/CarouselItem232.vue'
;
import
setChart
from
"@/utils/setChart"
;
import
setChart
from
"@/utils/setChart"
;
import
{
getDateBefore
}
from
"@/views/marketAccessRestrictions/utils/index.ts"
;
import
router
from
"@/router"
;
import
router
from
"@/router"
;
import
createLineChart
from
"@/views/marketAccessRestrictions/utils/baseLineChart"
;
import
createLineChart
from
"@/views/marketAccessRestrictions/utils/baseLineChart"
;
...
@@ -330,9 +331,12 @@ let containerRef = ref(null);
...
@@ -330,9 +331,12 @@ let containerRef = ref(null);
// 首页分类
// 首页分类
const
sortInfo
=
ref
([]);
const
sortInfo
=
ref
([]);
const
handleGetStatSort
=
async
(
event
)
=>
{
const
handleGetStatSort
=
async
(
event
)
=>
{
console
.
log
(
'周期筛选'
,
event
)
let
day
=
365
if
(
event
?.
time
===
'近一周'
)
day
=
7
if
(
event
?.
time
===
'近一月'
)
day
=
30
if
(
event
?.
time
===
'近一年'
)
day
=
365
try
{
try
{
const
res
=
await
getStatSort
();
const
res
=
await
getStatSort
(
{
startDate
:
getDateBefore
(
day
)
}
);
console
.
log
(
"首页分类"
,
res
);
console
.
log
(
"首页分类"
,
res
);
// sortInfo.value = res.data.sort((a, b) => a.sortCode - b.sortCode);
// sortInfo.value = res.data.sort((a, b) => a.sortCode - b.sortCode);
sortInfo
.
value
=
res
.
data
;
sortInfo
.
value
=
res
.
data
;
...
...
src/views/marketAccessRestrictions/utils/index.ts
浏览文件 @
07e78f78
// 数字转中文(支持 0-99 整数)
/**
export
const
onNumToChinese
=
(
num
:
any
)
=>
{
* 数字转中文(支持 0-99 整数)
* @param num 需要转化的数字
*/
export
const
onNumToChinese
=
(
num
:
number
)
=>
{
// 1. 基础校验:只处理 0-99 的整数
// 1. 基础校验:只处理 0-99 的整数
if
(
!
Number
.
isInteger
(
num
)
||
num
<
0
||
num
>
99
)
return
'100'
;
if
(
!
Number
.
isInteger
(
num
)
||
num
<
0
||
num
>
99
)
return
'100'
;
// 2. 定义基础字符
// 2. 定义基础字符
...
@@ -22,3 +25,20 @@ export const onNumToChinese = (num:any) => {
...
@@ -22,3 +25,20 @@ export const onNumToChinese = (num:any) => {
return
singleChars
[
ten
]
+
tenChar
+
(
unit
===
0
?
''
:
singleChars
[
unit
]);
return
singleChars
[
ten
]
+
tenChar
+
(
unit
===
0
?
''
:
singleChars
[
unit
]);
}
}
}
}
/**
* 获取 n 天前的日期,格式:YYYY-MM-DD
* @param num 往前推的天数
*/
export
const
getDateBefore
=
(
num
:
number
)
=>
{
const
now
=
new
Date
();
const
targetTime
=
now
.
getTime
()
-
num
*
24
*
60
*
60
*
1000
;
const
targetDate
=
new
Date
(
targetTime
);
const
year
=
targetDate
.
getFullYear
();
const
month
=
String
(
targetDate
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
);
const
day
=
String
(
targetDate
.
getDate
()).
padStart
(
2
,
'0'
);
return
`
${
year
}
-
${
month
}
-
${
day
}
`
;
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论