|
@@ -266,42 +266,42 @@ export default {
|
|
|
addWork({ sceneDtoList: list }, (ok) => {
|
|
|
console.error("ok", ok);
|
|
|
this.newWorkId = ok.data.id;
|
|
|
- addWorks({ workId: this.newWorkId }, (res) => {
|
|
|
- $waiting.hide();
|
|
|
- // 隐藏素材选择弹窗
|
|
|
- this.isShowMaterialSelector = false;
|
|
|
-
|
|
|
- // 刷新作品列表
|
|
|
- this.list = [];
|
|
|
- this.isRequestingMoreData = false;
|
|
|
- this.hasMoreData = true;
|
|
|
- this.requestMoreData()
|
|
|
- .then(() => {
|
|
|
- // 刷新成功
|
|
|
-
|
|
|
- // 弹出提示窗口
|
|
|
- this.$confirm({
|
|
|
- title: this.$i18n.t("tips_code.tips"),
|
|
|
- content: this.$i18n.t("material.works.had_created"),
|
|
|
- okText: this.$i18n.t("material.works.goto_preview"),
|
|
|
- ok: () => {
|
|
|
- this.handlePreview(this.list[0]);
|
|
|
- this.newWorkId = "";
|
|
|
- this.$store.commit("SetInfo", {});
|
|
|
- },
|
|
|
- ok2Text: this.$i18n.t("material.works.continue_edit"),
|
|
|
- ok2: () => {
|
|
|
- window.open(`./edit.html?id=${this.newWorkId}&lang=${this.$lang}`);
|
|
|
- this.newWorkId = "";
|
|
|
- this.$store.commit("SetInfo", {});
|
|
|
- },
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$msg.message(this.$i18n.t("material.works.had_created_but_no_link"));
|
|
|
- console.error("已成功新建作品,但刷新作品列表失败。");
|
|
|
+ // addWorks({ workId: this.newWorkId }, (res) => {
|
|
|
+ $waiting.hide();
|
|
|
+ // 隐藏素材选择弹窗
|
|
|
+ this.isShowMaterialSelector = false;
|
|
|
+
|
|
|
+ // 刷新作品列表
|
|
|
+ this.list = [];
|
|
|
+ this.isRequestingMoreData = false;
|
|
|
+ this.hasMoreData = true;
|
|
|
+ this.requestMoreData()
|
|
|
+ .then(() => {
|
|
|
+ // 刷新成功
|
|
|
+
|
|
|
+ // 弹出提示窗口
|
|
|
+ this.$confirm({
|
|
|
+ title: this.$i18n.t("tips_code.tips"),
|
|
|
+ content: this.$i18n.t("material.works.had_created"),
|
|
|
+ okText: this.$i18n.t("material.works.goto_preview"),
|
|
|
+ ok: () => {
|
|
|
+ this.handlePreview(this.list[0]);
|
|
|
+ this.newWorkId = "";
|
|
|
+ this.$store.commit("SetInfo", {});
|
|
|
+ },
|
|
|
+ ok2Text: this.$i18n.t("material.works.continue_edit"),
|
|
|
+ ok2: () => {
|
|
|
+ window.open(`./edit.html?id=${this.newWorkId}&lang=${this.$lang}`);
|
|
|
+ this.newWorkId = "";
|
|
|
+ this.$store.commit("SetInfo", {});
|
|
|
+ },
|
|
|
});
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$msg.message(this.$i18n.t("material.works.had_created_but_no_link"));
|
|
|
+ console.error("已成功新建作品,但刷新作品列表失败。");
|
|
|
+ });
|
|
|
+ // });
|
|
|
});
|
|
|
|
|
|
// 拿新作品的初始数据
|