修改文件夹展示问题和文件夹删除问题

This commit is contained in:
Sh1yu
2023-08-01 10:45:48 +08:00
parent 901a165fb1
commit 1cb19841a8
4 changed files with 31 additions and 11 deletions

View File

@@ -8,7 +8,7 @@
a.update_time as updateTime, a.name as pageTitle, b.preview as previewContent
from wiki_page a
join wiki_page_content b on b.page_id = a.id
where a.del_flag = 0
where a.del_flag = 0 and a.editor_type != 0
<if test="keywords != null and keywords != ''">
and (
a.name like #{keywords} or b.preview like #{keywords}

View File

@@ -144,7 +144,7 @@
</a-menu>
</template>
</a-dropdown>
<a-dropdown :trigger="['click']" style="float:right">
<a-dropdown :trigger="['click']" style="float:right" @click="choosePageIdFunc(data.id)">
<a class="ant-dropdown-link" @click.stop>
<el-icon style="margin-right: 5px">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224zm336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224z"></path></svg>
@@ -158,6 +158,12 @@
</el-icon>
重命名
</a-menu-item>
<a-menu-item key="1" @click="deleteWikiPage">
<el-icon class="clickAddIcon" style="margin-right: 5px">
<svg width="1em" height="1em" viewBox="0 0 48 48" fill="none"><path d="M9 10V44H39V10H9Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"></path><path d="M20 20V33" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M28 20V33" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4 10H44" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 10L19.289 4H28.7771L32 10H16Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"></path></svg>
</el-icon>
删除
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@@ -356,6 +362,20 @@
})
}
const deleteWikiPage = () => {
ElMessageBox.confirm('确定要删除此页面及其所有子页面吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let param = {pageId: optionPageId.value};
pageApi.pageDelete(param).then(() => {
ElMessage.success('已删除')
doGetPageList(null)
});
}).catch(() => {});
}
const choosePageIdFunc = (id) => {
optionLock.value= true
choosePageId.value = id

View File

@@ -5,7 +5,7 @@
<link rel="icon" href="./wiki-logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WIKI文档管理系统</title>
<script type="module" crossorigin src="./assets/main-ed1a906d.js"></script>
<script type="module" crossorigin src="./assets/main-9c7938ab.js"></script>
<link rel="modulepreload" crossorigin href="./assets/highlight.js-1b0b64aa.js">
<link rel="modulepreload" crossorigin href="./assets/vue-650a4d10.js">
<link rel="modulepreload" crossorigin href="./assets/vendor-f8f18bc4.js">