|
|
@@ -15,7 +15,6 @@
|
|
|
<el-button @click="setBgMusic">设置背景音乐</el-button>
|
|
|
<el-button @click="router.go(-1)">取消</el-button>
|
|
|
<el-button @click="previewTpl" type="primary">预览</el-button>
|
|
|
- <el-button @click="publishTpl" type="success">发布</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="flex1 ov-hd d-flex">
|
|
|
@@ -69,13 +68,16 @@ const activated = (item: any) => {
|
|
|
};
|
|
|
const selectItem = (item: any) => {
|
|
|
form.value = { ...item };
|
|
|
+ curEvent.value = null;
|
|
|
};
|
|
|
-const saveEevent = (item: any) => {
|
|
|
+const saveEevent = async (item: any) => {
|
|
|
if (!form.value?.events || !form.value?.events.length) return;
|
|
|
const index = form.value.events.findIndex((it: any) => it.id === item.id);
|
|
|
if (index === -1) return;
|
|
|
form.value.events[index] = item;
|
|
|
// 保存成功
|
|
|
+ const res: any = await httpRequests.post(`/dgtmedicine/trainpage/edit`, form.value);
|
|
|
+ if (!res || res.code !== 200) return;
|
|
|
proxy?.$modal.msgSuccess('保存成功');
|
|
|
};
|
|
|
const deleteItemEvents = (item: any) => {
|