Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
795a92cc
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
795a92cc
编写于
5月 29, 2023
作者:
2
222000134
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改小队发布活动的时间限制
上级
85787898
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
83 addition
and
58 deletion
+83
-58
teamwork/pages/team/add-team-activity.vue
teamwork/pages/team/add-team-activity.vue
+83
-58
未找到文件。
teamwork/pages/team/add-team-activity.vue
浏览文件 @
795a92cc
...
...
@@ -22,26 +22,8 @@
<view
class=
"input-wrapper"
>
<view
class=
"form-input2-wrapper"
>
<view
class=
"form-input2"
>
<picker
mode=
"date"
start=
"1970-01-01"
end=
"2100-12-31"
@
change=
"handleDateChange1"
>
<view
class=
"picker"
>
{{
start_date
}}
</view>
</picker>
</view>
<view
class=
"form-input2"
>
<picker
mode=
"time"
start=
"00:00"
end=
"23:59"
@
change=
"handleTimeChange1"
>
<view
class=
"picker"
>
{{
start_time
}}
</view>
</picker>
</view>
</view>
<view
class=
"form-input2-wrapper"
>
<view
class=
"form-input2"
>
<picker
mode=
"date"
start=
"1970-01-01"
end=
"2100-12-31"
@
change=
"handleDateChange2"
>
<view
class=
"picker"
>
{{
end_date
}}
</view>
</picker>
</view>
<view
class=
"form-input2"
>
<picker
mode=
"time"
start=
"00:00"
end=
"23:59"
@
change=
"handleTimeChange2"
>
<view
class=
"picker"
>
{{
end_time
}}
</view>
</picker>
<uni-datetime-picker
v-model=
"datetimerange"
type=
"datetimerange"
start=
"2020-05-29 20:10:10"
end=
"2999-05-29 20:10:10"
rangeSeparator=
"至"
/>
</view>
</view>
</view>
...
...
@@ -63,22 +45,61 @@
</
template
>
<
script
>
import
DateSelector
from
'
@/components/dengrq-datetime-picker/dateSelector/index.vue
'
;
export
default
{
components
:
{
DateSelector
},
data
()
{
return
{
single
:
'
2021-04-3
'
,
datetimesingle
:
'
2021-04-3
'
,
range
:
[
'
2021-03-8
'
,
'
2021-4-20
'
],
datetimerange
:
[
'
2023-05-29 20:10:10
'
,
'
2023-06-10 10:10:10
'
],
userId
:
''
,
name
:
''
,
content
:
''
,
object
:
''
,
place
:
''
,
contact
:
''
,
start_date
:
'
2023-05-10
'
,
end_date
:
'
2023-05-10
'
,
start_time
:
'
18:00
'
,
end_time
:
'
18:00
'
,
start_date
:
''
,
end_date
:
''
,
}
},
watch
:
{
datetimesingle
(
newval
)
{
console
.
log
(
'
单选:
'
,
this
.
datetimesingle
);
},
range
(
newval
)
{
console
.
log
(
'
范围选:
'
,
this
.
range
);
},
datetimerange
(
newval
)
{
console
.
log
(
'
范围选:
'
,
this
.
datetimerange
);
}
},
mounted
()
{
setTimeout
(()
=>
{
this
.
datetimesingle
=
'
2021-5-1
'
this
.
single
=
'
2021-5-1
'
},
1000
)
},
methods
:
{
change
(
e
)
{
this
.
single
=
e
console
.
log
(
'
-change事件:
'
,
e
);
},
onDateSelectorChange
({
startDate
,
endDate
})
{
console
.
log
(
'
onDateSelectorChange
'
,
startDate
,
endDate
);
},
onDateSelectorSubmit
({
startDate
,
endDate
})
{
console
.
log
(
'
onDateSelectorSubmit
'
,
startDate
,
endDate
);
},
goBack
()
{
uni
.
navigateBack
({
url
:
'
/pages/team/main
'
...
...
@@ -88,6 +109,11 @@
this
.
userId
=
getApp
().
globalData
.
userId
},
async
submit
()
{
this
.
start_date
=
this
.
datetimerange
[
0
]
this
.
end_date
=
this
.
datetimerange
[
1
]
console
.
log
(
this
.
userId
,
'
this.userId
'
)
console
.
log
(
this
.
start_date
)
console
.
log
(
this
.
end_date
)
if
(
this
.
name
==
''
||
this
.
content
==
''
||
this
.
start_date
==
''
||
this
.
end_date
==
''
||
this
.
place
==
''
||
this
.
object
==
''
||
this
.
contact
==
''
)
{
uni
.
showToast
({
...
...
@@ -96,38 +122,36 @@
});
return
;
}
this
.
start_date
=
this
.
start_date
+
'
'
+
this
.
start_time
this
.
end_date
=
this
.
end_date
+
'
'
+
this
.
end_time
console
.
log
(
this
.
userId
,
'
this.userId
'
)
uniCloud
.
callFunction
({
name
:
'
fe-team-createActivity
'
,
data
:
{
title
:
this
.
name
,
content
:
this
.
content
,
startDate
:
this
.
start_date
,
endDate
:
this
.
end_date
,
userId
:
this
.
userId
,
place
:
this
.
place
,
participants
:
this
.
object
,
contact
:
this
.
contact
,
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
result
.
code
==
200
)
{
uni
.
showToast
({
title
:
'
提交成功
'
,
icon
:
'
success
'
});
this
.
goBack
()
}
else
{
uni
.
showToast
({
title
:
'
提交失败
'
,
icon
:
'
error
'
});
}
// uniCloud.callFunction({
// name: 'fe-team-createActivity',
// data: {
// title: this.name,
// content: this.content,
// startDate: this.start_date,
// endDate: this.end_date,
// userId: this.userId,
// place: this.place,
// participants: this.object,
// contact: this.contact,
// }
// })
// .then(res => {
// console.log(res)
// if (res.result.code == 200) {
// uni.showToast({
// title: '提交成功',
// icon: 'success'
// });
// this.goBack()
// } else {
// uni.showToast({
// title: '提交失败',
// icon: 'error'
// });
// }
})
//
})
},
handleDateChange1
(
event
)
{
this
.
start_date
=
event
.
detail
.
value
...
...
@@ -256,14 +280,15 @@
.form-input2
{
border-radius
:
5px
;
margin-top
:
5px
;
margin-left
:
10px
;
width
:
30%
;
margin-left
:
2px
;
margin-right
:
15px
;
width
:
100%
;
height
:
35px
;
border
:
none
;
outline
:
none
;
font-size
:
14px
;
color
:
#333
;
background-color
:
#edeef0
;
/* background-color: #edeef0; */
padding
:
0
10px
;
}
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录