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:
@@ -120,7 +120,7 @@
|
|||||||
<a-input
|
<a-input
|
||||||
v-model:value="inputV3"
|
v-model:value="inputV3"
|
||||||
style="width: 424px; height: 32px"
|
style="width: 424px; height: 32px"
|
||||||
placeholder="请输入授课老师"
|
placeholder="请输入活动地址"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
:v-model:value="inputV4"
|
v-model:value="inputV4"
|
||||||
/>
|
/>
|
||||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
:v-model:value="inputV5"
|
v-model:value="inputV5"
|
||||||
/>
|
/>
|
||||||
<span style="color: #999999; margin-left: 8px">分钟</span>
|
<span style="color: #999999; margin-left: 8px">分钟</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
:v-model:value="inputV6"
|
v-model:value="inputV6"
|
||||||
/>
|
/>
|
||||||
<span style="color: #999999; margin-left: 8px"
|
<span style="color: #999999; margin-left: 8px"
|
||||||
>分钟(提前签退则记为早退)</span
|
>分钟(提前签退则记为早退)</span
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<div class="main_btns">
|
||||||
<button class="btn1">取消</button>
|
<button class="btn1" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2" @click="createActivity">确定</button>
|
<button class="btn2" @click="createActivity">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,8 +217,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import * as api from "../../api/activity";
|
import * as api from "../../api/indexActivity";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
|
import { toDate } from "../../api/method.js";
|
||||||
const rowSelection = ref({
|
const rowSelection = ref({
|
||||||
checkStrictly: false,
|
checkStrictly: false,
|
||||||
onChange: (selectedRowKeys, selectedRows) => {
|
onChange: (selectedRowKeys, selectedRows) => {
|
||||||
@@ -261,6 +262,15 @@ export default {
|
|||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addactiveVisible", false);
|
ctx.emit("update:addactiveVisible", false);
|
||||||
state.radioV1 = "";
|
state.radioV1 = "";
|
||||||
|
state.inputV1 = "";
|
||||||
|
state.inputV2 = "";
|
||||||
|
state.inputV3 = "";
|
||||||
|
state.inputV4 = "";
|
||||||
|
state.inputV5 = "";
|
||||||
|
state.inputV6 = "";
|
||||||
|
state.textV1 = "";
|
||||||
|
state.textV2 = "";
|
||||||
|
state.time = "";
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state", bool);
|
console.log("state", bool);
|
||||||
@@ -273,18 +283,21 @@ export default {
|
|||||||
|
|
||||||
//创建活动
|
//创建活动
|
||||||
const createActivity = () => {
|
const createActivity = () => {
|
||||||
if(!state.inputV1) return message.info("请输入活动名称");
|
if(!state.inputV1) return message.warning("请输入活动名称");
|
||||||
if(!state.inputV2) return message.info("请输入活动时长");
|
if(!state.inputV2) return message.warning("请输入活动时长");
|
||||||
if(!state.textV1) return message.info("请输入活动公告");
|
if(!state.textV1) return message.warning("请输入活动公告");
|
||||||
if(!state.inputV3) return message.info("请输入活动地址");
|
if(!state.inputV3) return message.warning("请输入活动地址");
|
||||||
|
let startTime = toDate(new Date(state.time[0].$d).getTime() / 1000, "Y-M-D");
|
||||||
|
let endTime = toDate(new Date(state.time[1].$d).getTime() / 1000, "Y-M-D");
|
||||||
let obj = {
|
let obj = {
|
||||||
activityAddress: state.inputV3, //活动地址
|
activityAddress: state.inputV3, //活动地址
|
||||||
activityDuration: state.inputV2, //活动时长
|
activityDuration: state.inputV2, //活动时长
|
||||||
activityEndTime: "", //活动结束时间
|
activityExplain: state.textV2, //活动说明
|
||||||
|
activityEndTime: endTime, //活动结束时间
|
||||||
activityId: 0, //活动ID
|
activityId: 0, //活动ID
|
||||||
activityName: state.inputV1, //活动名称
|
activityName: state.inputV1, //活动名称
|
||||||
activityNotice: state.textV1, //活动公告
|
activityNotice: state.textV1, //活动公告
|
||||||
activityStartTime: "", //活动开始时间
|
activityStartTime: startTime, //活动开始时间
|
||||||
activityTag: "", //活动逻辑删除标识
|
activityTag: "", //活动逻辑删除标识
|
||||||
afterSignIn: state.inputV5, //活动开始后多少分钟签到
|
afterSignIn: state.inputV5, //活动开始后多少分钟签到
|
||||||
beforeSignIn: state.inputV4, //活动开始前多少分钟签到
|
beforeSignIn: state.inputV4, //活动开始前多少分钟签到
|
||||||
@@ -301,6 +314,17 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("创建成功", res);
|
console.log("创建成功", res);
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
|
state.radioV1 = "";
|
||||||
|
state.inputV1 = "";
|
||||||
|
state.inputV2 = "";
|
||||||
|
state.inputV3 = "";
|
||||||
|
state.inputV4 = "";
|
||||||
|
state.inputV5 = "";
|
||||||
|
state.inputV6 = "";
|
||||||
|
state.textV1 = "";
|
||||||
|
state.textV2 = "";
|
||||||
|
state.time = "";
|
||||||
|
ctx.emit("update:addactiveVisible", false);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -341,6 +365,9 @@ export default {
|
|||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
.ant-picker {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
.main_left {
|
.main_left {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<div class="main_btns">
|
||||||
<button class="btn1">取消</button>
|
<button class="btn1" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2" @click="createDiscuss">确定</button>
|
<button class="btn2" @click="createDiscuss">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import * as api from "../../api/discuss";
|
import * as api from "../../api/indexDiscuss";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
const rowSelection = ref({
|
const rowSelection = ref({
|
||||||
checkStrictly: false,
|
checkStrictly: false,
|
||||||
@@ -109,7 +109,7 @@ export default {
|
|||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:adddiscussVisible", false);
|
ctx.emit("update:adddiscussVisible", false);
|
||||||
state.inputV1 = "";
|
state.inputV1 = "";
|
||||||
state.textV2 = "";
|
state.textV1 = "";
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state", bool);
|
console.log("state", bool);
|
||||||
@@ -117,7 +117,7 @@ export default {
|
|||||||
|
|
||||||
//创建讨论
|
//创建讨论
|
||||||
const createDiscuss = () => {
|
const createDiscuss = () => {
|
||||||
if(!state.inputV1) return message.info("请输入讨论名称");
|
if(!state.inputV1) return message.warning("请输入讨论名称");
|
||||||
let obj = {
|
let obj = {
|
||||||
discussName: state.inputV1, //讨论名称
|
discussName: state.inputV1, //讨论名称
|
||||||
discussExplain: state.textV1, //讨论说明
|
discussExplain: state.textV1, //讨论说明
|
||||||
@@ -136,8 +136,12 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("创建成功", res);
|
console.log("创建成功", res);
|
||||||
|
state.inputV1 = "";
|
||||||
|
state.textV1 = "";
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
|
ctx.emit("update:adddiscussVisible", false);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("创建失败", err);
|
console.log("创建失败", err);
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
<div class="co1">{{ value2.length }}/100</div>
|
<div class="co1">{{ value2.length }}/100</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button class="btn1">取消</button>
|
<button class="btn1" @click="closeModal">取消</button>
|
||||||
<button class="btn2" @click="editChapter">确定</button>
|
<button class="btn2" @click="editChapter">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -504,7 +504,7 @@
|
|||||||
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
import { reactive, toRefs, onMounted, onUnmounted } from "vue";
|
||||||
import AddStu from "../../components/drawers/AddLevelAddStu";
|
import AddStu from "../../components/drawers/AddLevelAddStu";
|
||||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||||
import * as api from "../../api/level";
|
import * as api from "../../api/indexLevel";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
export default {
|
export default {
|
||||||
name: "LevelAddDetail",
|
name: "LevelAddDetail",
|
||||||
@@ -813,6 +813,7 @@ export default {
|
|||||||
|
|
||||||
//新建或编辑关卡
|
//新建或编辑关卡
|
||||||
const editChapter = () => {
|
const editChapter = () => {
|
||||||
|
if(!state.value1) return message.warning("请输入关卡名称");
|
||||||
let obj = {
|
let obj = {
|
||||||
name: state.value1,
|
name: state.value1,
|
||||||
remark: state.value2,
|
remark: state.value2,
|
||||||
@@ -824,6 +825,9 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log("创建成功", res);
|
console.log("创建成功", res);
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
|
state.value1 = "";
|
||||||
|
state.value2 = "";
|
||||||
|
state.modal = false;
|
||||||
// state.createLoading = false;
|
// state.createLoading = false;
|
||||||
//state.currentPage = 1;
|
//state.currentPage = 1;
|
||||||
// getLearnPath();
|
// getLearnPath();
|
||||||
@@ -838,14 +842,14 @@ export default {
|
|||||||
};
|
};
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
state.visible = false;
|
state.visible = false;
|
||||||
state.value1 = "";
|
|
||||||
state.value2 = "";
|
|
||||||
};
|
};
|
||||||
const showModal = () => {
|
const showModal = () => {
|
||||||
state.modal = true;
|
state.modal = true;
|
||||||
};
|
};
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
state.modal = false;
|
state.modal = false;
|
||||||
|
state.value1 = "";
|
||||||
|
state.value2 = "";
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("visible", bool);
|
console.log("visible", bool);
|
||||||
@@ -1317,9 +1321,9 @@ export default {
|
|||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #387df7;
|
border: 1px solid #409EFF;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #387df7;
|
color: #409EFF;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
@@ -1332,7 +1336,7 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: #388be1;
|
background: #409EFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user