mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:修改活动直播任务签到时间
This commit is contained in:
@@ -31,14 +31,13 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV1"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入活动名称"
|
||||
maxlength="20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="main_item">
|
||||
<div class="signbox">
|
||||
<div class="sign">
|
||||
@@ -51,10 +50,11 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
:disabled-date="disabledDate" :disabled-time="disabledRangeTime"
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
:disabled-date="disabledDate"
|
||||
:disabled-time="disabledRangeTime"
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="time"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
@@ -74,7 +74,7 @@
|
||||
<a-input-number
|
||||
:min="0"
|
||||
:precision="0"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
v-model:value="inputV2"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||
@@ -93,7 +93,7 @@
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="inputV3"
|
||||
style="width: 400px; height: 40px; border-radius: 8px;"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入活动地点"
|
||||
maxlength="100"
|
||||
/>
|
||||
@@ -109,13 +109,14 @@
|
||||
</div>
|
||||
<span style="margin-right: 3px">活动公告:</span>
|
||||
</div>
|
||||
<div class="textarea" >
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
v-model:value="textV1"
|
||||
placeholder="请输入活动公告"
|
||||
allow-clear
|
||||
:rows="6"
|
||||
show-count :maxlength="200"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,7 +130,8 @@
|
||||
placeholder="请输入活动说明"
|
||||
allow-clear
|
||||
:rows="6"
|
||||
show-count :maxlength="200"
|
||||
show-count
|
||||
:maxlength="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -158,7 +160,9 @@
|
||||
"
|
||||
v-model:value="inputV4"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px">分钟允许签到</span>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
>
|
||||
</div>
|
||||
<div class="timerbox">
|
||||
<span>活动开始后:</span>
|
||||
@@ -174,7 +178,9 @@
|
||||
"
|
||||
v-model:value="inputV5"
|
||||
/>
|
||||
<span style="color: #999999; margin-left: 8px">分钟允许签到</span>
|
||||
<span style="color: #999999; margin-left: 8px"
|
||||
>分钟允许签到</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="qdqtbox">
|
||||
@@ -214,7 +220,7 @@
|
||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
|
||||
>仅签到
|
||||
</a-radio>-->
|
||||
<!-- <a-radio v-model:checked="checked" :value="2" @click="cloradio1"
|
||||
<!-- <a-radio v-model:checked="checked" :value="2" @click="cloradio1"
|
||||
>签到、签退全部完成
|
||||
</a-radio
|
||||
>
|
||||
@@ -222,15 +228,12 @@
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="main_item" style="height:40px;">
|
||||
<div class="main_item" style="height: 40px">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px"></span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
|
||||
</div>
|
||||
<div class="btnbox"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
@@ -318,7 +321,7 @@ export default {
|
||||
textV2: "",
|
||||
radioV1: "",
|
||||
time: "",
|
||||
isClick: false
|
||||
isClick: false,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
@@ -357,7 +360,8 @@ export default {
|
||||
api
|
||||
.getActivity(props.EditActiveId)
|
||||
.then((res) => {
|
||||
//更新讨论信息
|
||||
console.log("获取活动信息", res);
|
||||
//获取活动信息
|
||||
state.inputV1 = res.data.data.activityName;
|
||||
state.textV1 = res.data.data.activityNotice;
|
||||
state.textV2 = res.data.data.activityExplain;
|
||||
@@ -387,7 +391,7 @@ export default {
|
||||
};
|
||||
const updateTask = async (res) => {
|
||||
if (props.isLevel == 1) {
|
||||
if(!props.isactive){
|
||||
if (!props.isactive) {
|
||||
message.destroy();
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
@@ -466,11 +470,11 @@ export default {
|
||||
return message.warning("请输入活动地址");
|
||||
}
|
||||
|
||||
if(state.isClick){
|
||||
message.destroy();
|
||||
message.error('请勿频繁点击')
|
||||
return
|
||||
}
|
||||
if (state.isClick) {
|
||||
message.destroy();
|
||||
message.error("请勿频繁点击");
|
||||
return;
|
||||
}
|
||||
state.isClick = true;
|
||||
|
||||
let obj = {
|
||||
@@ -483,11 +487,12 @@ export default {
|
||||
activityNotice: state.textV1, //活动公告
|
||||
activityStartTime: dayjs(state.time[0]).format("YYYY-MM-DD HH:mm"), //活动开始时间
|
||||
activityTag: "", //活动逻辑删除标识
|
||||
afterSignIn: state.inputV5, //活动开始后多少分钟签到
|
||||
beforeSignIn: state.inputV4, //活动开始前多少分钟签到
|
||||
afterSignIn: state.inputV5 ? state.inputV5 : 0, //活动开始后多少分钟签到
|
||||
beforeSignIn: state.inputV4 ? state.inputV4 : 0, //活动开始前多少分钟签到
|
||||
signOutTime: state.inputV6, //签退开始时间
|
||||
standardSettings: state.radioV1, //标准设置
|
||||
};
|
||||
console.log("obj", obj);
|
||||
if (props.edit) {
|
||||
//更新编辑活动信息
|
||||
api
|
||||
@@ -526,28 +531,28 @@ export default {
|
||||
};
|
||||
|
||||
const range = (start, end) => {
|
||||
const result = [];
|
||||
const result = [];
|
||||
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
for (let i = start; i < end; i++) {
|
||||
result.push(i);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
const disabledDate = (current) => {
|
||||
// Can not select days before today and today
|
||||
console.log('1111', dayjs().endOf('day'))
|
||||
return current && current < dayjs().startOf('day');
|
||||
};
|
||||
return result;
|
||||
};
|
||||
const disabledDate = (current) => {
|
||||
// Can not select days before today and today
|
||||
console.log("1111", dayjs().endOf("day"));
|
||||
return current && current < dayjs().startOf("day");
|
||||
};
|
||||
|
||||
const disabledDateTime = () => {
|
||||
return {
|
||||
disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(30, 60),
|
||||
disabledSeconds: () => [55, 56],
|
||||
};
|
||||
};
|
||||
|
||||
const disabledDateTime = () => {
|
||||
return {
|
||||
disabledHours: () => range(0, 24).splice(4, 20),
|
||||
disabledMinutes: () => range(30, 60),
|
||||
disabledSeconds: () => [55, 56],
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
@@ -556,9 +561,7 @@ export default {
|
||||
cloradio1,
|
||||
updateActivityInfo,
|
||||
disabledDateTime,
|
||||
disabledDate
|
||||
|
||||
|
||||
disabledDate,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -701,7 +704,6 @@ export default {
|
||||
}
|
||||
|
||||
.setbox {
|
||||
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
Reference in New Issue
Block a user