mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
feat:添加讨论,添加活动,新建关卡接口对接
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
v-model:value="textV2"
|
||||
placeholder="请输入活动说明"
|
||||
allow-clear
|
||||
maxlength="150"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,6 +76,7 @@
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -208,13 +210,15 @@
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn2" @click="createActivity">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/activity";
|
||||
import { message } from "ant-design-vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -252,6 +256,7 @@ export default {
|
||||
textV1: "",
|
||||
textV2: "",
|
||||
radioV1: "",
|
||||
time: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
@@ -265,12 +270,50 @@ export default {
|
||||
state.radioV1 = "";
|
||||
}
|
||||
};
|
||||
|
||||
//创建活动
|
||||
const createActivity = () => {
|
||||
if(!state.inputV1) return message.info("请输入活动名称");
|
||||
if(!state.inputV2) return message.info("请输入活动时长");
|
||||
if(!state.textV1) return message.info("请输入活动公告");
|
||||
if(!state.inputV3) return message.info("请输入活动地址");
|
||||
let obj = {
|
||||
activityAddress: state.inputV3, //活动地址
|
||||
activityDuration: state.inputV2, //活动时长
|
||||
activityEndTime: "", //活动结束时间
|
||||
activityId: 0, //活动ID
|
||||
activityName: state.inputV1, //活动名称
|
||||
activityNotice: state.textV1, //活动公告
|
||||
activityStartTime: "", //活动开始时间
|
||||
activityTag: "", //活动逻辑删除标识
|
||||
afterSignIn: state.inputV5, //活动开始后多少分钟签到
|
||||
beforeSignIn: state.inputV4, //活动开始前多少分钟签到
|
||||
createTime: "", //创建时间
|
||||
createUser: 0, //创建人
|
||||
signOutTime: state.inputV6, //签退开始时间
|
||||
standardSettings: state.radioV1, //标准设置
|
||||
updateTime: "", //更新时间
|
||||
updateUser: 0, //更新人
|
||||
};
|
||||
api
|
||||
.createActivity(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
}, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败",err);
|
||||
})
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
rowSelection,
|
||||
cloradio1,
|
||||
createActivity,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user