删除页面时递归删除子页面
This commit is contained in:
@@ -187,6 +187,7 @@
|
||||
app = this;
|
||||
global.vue.$app = this;
|
||||
this.loadSpaceList();
|
||||
this.checkSystemUpgrade();
|
||||
},
|
||||
methods: {
|
||||
createWiki() {
|
||||
@@ -294,7 +295,14 @@
|
||||
app.nowClickPath = {spaceId: spaceId};
|
||||
app.choiceSpace = spaceId;
|
||||
app.doGetPageList(null);
|
||||
app.$router.push({path: '/home', query: {spaceId: spaceId}});
|
||||
// 在首页时跳转
|
||||
try {
|
||||
if (app.$router.app._route.path == "/home") {
|
||||
app.$router.push({path: '/home', query: {spaceId: spaceId}});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -394,6 +402,19 @@
|
||||
onNewSpaceCancel() {
|
||||
this.newSpaceDialogVisible = false;
|
||||
},
|
||||
checkSystemUpgrade() {
|
||||
this.common.post(this.apilist1.systemUpgradeInfo, {}, function (json) {
|
||||
if (!!json.data) {
|
||||
app.upgradeInfo = json.data;
|
||||
console.log("zyplayer-doc发现新版本:"
|
||||
+ "\n升级地址:" + json.data.upgradeUrl
|
||||
+ "\n当前版本:" + json.data.nowVersion
|
||||
+ "\n最新版本:" + json.data.lastVersion
|
||||
+ "\n升级内容:" + json.data.upgradeContent
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
init() {
|
||||
|
||||
},
|
||||
|
||||
@@ -7,6 +7,7 @@ var URL = {
|
||||
pageList: '/zyplayer-doc-wiki/page/list',
|
||||
updatePage: '/zyplayer-doc-wiki/page/update',
|
||||
pageDetail: '/zyplayer-doc-wiki/page/detail',
|
||||
pageDelete: '/zyplayer-doc-wiki/page/delete',
|
||||
pageNews: '/zyplayer-doc-wiki/page/news',
|
||||
spaceList: '/zyplayer-doc-wiki/space/list',
|
||||
updateSpace: '/zyplayer-doc-wiki/space/update',
|
||||
@@ -21,6 +22,8 @@ var URL = {
|
||||
|
||||
commonUpload: '/zyplayer-doc-wiki/common/upload',
|
||||
getUserBaseInfo: '/zyplayer-doc-wiki/common/user/base',
|
||||
|
||||
systemUpgradeInfo: '/system/info/upgrade',
|
||||
};
|
||||
|
||||
var URL1 = {};
|
||||
|
||||
@@ -244,18 +244,18 @@
|
||||
this.pageAuthUserList = pageAuthUserList;
|
||||
},
|
||||
deleteWikiPage() {
|
||||
this.$confirm('确定要删除此页面吗?', '提示', {
|
||||
this.$confirm('确定要删除此页面及其所有子页面吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = {id: app.wikiPage.id, delFlag: 1};
|
||||
this.common.post(this.apilist1.updatePage, param, function (json) {
|
||||
var param = {pageId: app.wikiPage.id};
|
||||
this.common.post(this.apilist1.pageDelete, param, function (json) {
|
||||
// 重新加载左侧列表,跳转到展示页面
|
||||
global.vue.$app.doGetPageList(null);
|
||||
app.$router.push({path: '/home', query: {spaceId: app.nowClickPath.spaceId}});
|
||||
app.$router.push({path: '/home', query: {spaceId: app.wikiPage.spaceId}});
|
||||
});
|
||||
});
|
||||
}).catch(()=>{});
|
||||
},
|
||||
loadPageDetail(pageId) {
|
||||
app.rightContentType = 1;
|
||||
|
||||
Reference in New Issue
Block a user