huangxw 4 月之前
父節點
當前提交
05a88e26f4
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/views/training/ptpl/edit/index.vue

+ 4 - 2
src/views/training/ptpl/edit/index.vue

@@ -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) => {