Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DAYTOYKKK
PairProject
提交
23141044
P
PairProject
项目概览
DAYTOYKKK
/
PairProject
与 Fork 源项目一致
Fork自
Lyu- / PairProject
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PairProject
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
23141044
编写于
3月 20, 2022
作者:
DAYTOYKKK
👶🏻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:完成每日的选择
上级
20dba99b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
128 addition
and
46 deletion
+128
-46
221900217_221900336/OlympicSystem/src/api/index.ts
221900217_221900336/OlympicSystem/src/api/index.ts
+12
-2
221900217_221900336/OlympicSystem/src/components/Daily/index.ts
...217_221900336/OlympicSystem/src/components/Daily/index.ts
+29
-13
221900217_221900336/OlympicSystem/src/components/Daily/index.vue
...17_221900336/OlympicSystem/src/components/Daily/index.vue
+10
-10
221900217_221900336/OlympicSystem/src/config/dailyConfig.ts
221900217_221900336/OlympicSystem/src/config/dailyConfig.ts
+77
-21
未找到文件。
221900217_221900336/OlympicSystem/src/api/index.ts
浏览文件 @
23141044
import
{
get
,
post
}
from
'
./http
'
;
import
{
get
,
post
}
from
'
./http
'
;
// Total
// Total
部分
// 获取奖牌总榜数据
// 获取奖牌总榜数据
export
const
reqGetTotal
=
(
data
:
any
)
=>
get
(
"
/total
"
,
data
);
export
const
reqGetTotal
=
(
data
:
any
)
=>
get
(
"
/total
"
,
data
);
\ No newline at end of file
// Daily部分
// 获取比赛项目选项
export
const
reqGetItems
=
()
=>
get
(
"
/getItems
"
);
// 获取比赛场馆选项
export
const
reqGetSites
=
()
=>
get
(
"
/getSites
"
)
// 根据选择项搜索
export
const
reqSearch
=
(
data
:
any
)
=>
get
(
"
search
"
,
data
);
221900217_221900336/OlympicSystem/src/components/Daily/index.ts
浏览文件 @
23141044
import
{
stat
}
from
'
fs
'
;
import
{
onMounted
,
reactive
,
defineComponent
,
toRefs
}
from
'
vue
'
import
{
stringify
}
from
'
querystring
'
;
import
{
reqGetItems
,
reqGetSites
}
from
'
../../api
'
;
import
{
onMounted
,
ref
,
reactive
,
defineComponent
,
toRefs
}
from
'
vue
'
import
{
useRoute
,
useRouter
}
from
'
vue-router
'
import
DailyTitle
from
'
../../common/DailyTitle.vue
'
import
DailyTitle
from
'
../../common/DailyTitle.vue
'
import
{
dailyItem
,
da
ilySelec
tion
}
from
'
../../config/dailyConfig
'
;
import
{
dailyItem
,
da
teOp
tion
}
from
'
../../config/dailyConfig
'
;
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -13,14 +11,13 @@ export default defineComponent({
...
@@ -13,14 +11,13 @@ export default defineComponent({
setup
()
{
setup
()
{
const
route
=
useRoute
();
const
router
=
useRouter
();
let
state
=
reactive
({
let
state
=
reactive
({
optionIndex
:
1
,
// 1根据比赛日期,2根据比赛项目,3根据比赛场馆
optionIndex
:
1
,
// 1根据比赛日期,2根据比赛项目,3根据比赛场馆
searchContent
:
""
,
searchContent
:
""
,
total
:
1
,
total
:
1
,
current
:
1
,
current
:
1
,
itemOption
:
[],
siteOption
:
[],
list
:
[]
as
dailyItem
[],
list
:
[]
as
dailyItem
[],
form
:
{
form
:
{
date
:
"
选择比赛日期
"
,
date
:
"
选择比赛日期
"
,
...
@@ -42,27 +39,46 @@ export default defineComponent({
...
@@ -42,27 +39,46 @@ export default defineComponent({
})
})
}
}
getList
();
getList
();
getItemOption
();
getSiteOption
();
})
})
// 获取比赛数据
//
todo
获取比赛数据
const
getList
=
()
=>
{
const
getList
=
()
=>
{
}
}
// 选择
// 获取比赛项目选项
const
getItemOption
=
async
()
=>
{
let
res
:
any
=
await
reqGetItems
();
let
{
data
}
=
res
;
data
.
unshift
(
"
选择比赛项目
"
)
state
.
itemOption
=
data
;
}
// 获取比赛场馆选项
const
getSiteOption
=
async
()
=>
{
let
res
:
any
=
await
reqGetSites
();
let
{
data
}
=
res
;
data
.
unshift
(
"
选择比赛场馆
"
)
state
.
siteOption
=
data
;
}
//todo 选择
const
handleSelectChange
=
(
value
:
string
)
=>
{
const
handleSelectChange
=
(
value
:
string
)
=>
{
console
.
log
(
value
);
console
.
log
(
value
);
console
.
log
(
state
.
form
.
date
);
console
.
log
(
state
.
form
);
}
}
// 分页
//
todo
分页
const
handlePageChange
=
()
=>
{
const
handlePageChange
=
()
=>
{
}
}
return
{
return
{
...
toRefs
(
state
),
...
toRefs
(
state
),
da
ilySelec
tion
,
da
teOp
tion
,
handleSelectChange
,
handleSelectChange
,
handlePageChange
handlePageChange
}
}
...
...
221900217_221900336/OlympicSystem/src/components/Daily/index.vue
浏览文件 @
23141044
...
@@ -10,24 +10,24 @@
...
@@ -10,24 +10,24 @@
<div
class=
"selectBox"
>
<div
class=
"selectBox"
>
<a-select
v-model:value=
"form.date"
@
change=
"handleSelectChange"
>
<a-select
v-model:value=
"form.date"
@
change=
"handleSelectChange"
>
<a-select-option
<a-select-option
v-for=
"item of da
ilySelec
tion"
v-for=
"item of da
teOp
tion"
v-bind:key=
"item
.value
"
v-bind:key=
"item"
v-model:value=
"item.value"
v-model:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
>
{{
item
.
label
}}
</a-select-option>
</a-select>
</a-select>
<a-select
v-model:value=
"form.item"
>
<a-select
v-model:value=
"form.item"
@
change=
"handleSelectChange"
>
<a-select-option
<a-select-option
v-for=
"item of
dailySelec
tion"
v-for=
"item of
itemOp
tion"
v-bind:key=
"item
.value
"
v-bind:key=
"item"
v-model:value=
"item.value"
v-model:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
>
{{
item
}}
</a-select-option>
</a-select>
</a-select>
<a-select
v-model:value=
"form.site"
>
<a-select
v-model:value=
"form.site"
@
change=
"handleSelectChange"
>
<a-select-option
<a-select-option
v-for=
"item of
dailySelec
tion"
v-for=
"item of
siteOp
tion"
v-bind:key=
"item
.value
"
v-bind:key=
"item"
v-model:value=
"item.value"
v-model:value=
"item.value"
>
{{
item
.
label
}}
</a-select-option>
>
{{
item
}}
</a-select-option>
</a-select>
</a-select>
<a-input
v-model:value=
"searchContent"
placeholder=
"请输入关键字搜索"
width=
"200px"
>
<a-input
v-model:value=
"searchContent"
placeholder=
"请输入关键字搜索"
width=
"200px"
>
<template
#suffix
>
<template
#suffix
>
...
...
221900217_221900336/OlympicSystem/src/config/dailyConfig.ts
浏览文件 @
23141044
export
const
dailySelection
=
[
export
const
dateOption
=
[
{
{
value
:
"
选择比赛项目
"
,
value
:
"
2022/02/02
"
,
label
:
"
选择比赛项目
"
label
:
"
2月2日
"
},
},
{
{
value
:
"
高山滑雪
"
,
value
:
"
2022/02/03
"
,
label
:
"
高山滑雪
"
label
:
"
2月3日
"
},
},
{
{
value
:
"
雪车
"
,
value
:
"
2022/02/04
"
,
label
:
"
雪车
"
label
:
"
2月4日
"
},
},
{
{
value
:
"
冰壶
"
,
value
:
"
2022/02/05
"
,
label
:
"
冰壶
"
label
:
"
2月5日
"
},
},
{
{
value
:
"
雪橇
"
,
value
:
"
2022/02/06
"
,
label
:
"
雪橇
"
label
:
"
2月6日
"
},
},
{
value
:
"
2022/02/07
"
,
label
:
"
2月7日
"
},
{
value
:
"
2022/02/08
"
,
label
:
"
2月8日
"
},
{
value
:
"
2022/02/09
"
,
label
:
"
2月9日
"
},
{
value
:
"
2022/02/10
"
,
label
:
"
2月10日
"
},
{
value
:
"
2022/02/11
"
,
label
:
"
2月11日
"
},
{
value
:
"
2022/02/12
"
,
label
:
"
2月12日
"
},
{
value
:
"
2022/02/13
"
,
label
:
"
2月13日
"
},
{
value
:
"
2022/02/14
"
,
label
:
"
2月14日
"
},
{
value
:
"
2022/02/15
"
,
label
:
"
2月15日
"
},
{
value
:
"
2022/02/16
"
,
label
:
"
2月16日
"
},
{
value
:
"
2022/02/17
"
,
label
:
"
2月17日
"
},
{
value
:
"
2022/02/18
"
,
label
:
"
2月18日
"
},
{
value
:
"
2022/02/19
"
,
label
:
"
2月19日
"
},
{
value
:
"
2022/02/20
"
,
label
:
"
2月20日
"
},
]
]
export
interface
dailyItem
{
export
interface
dailyItem
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录