左边栏组件化,新增文档移动功能
This commit is contained in:
@@ -66,39 +66,19 @@
|
||||
</el-icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
<a-sub-menu key="2" title="移动文档">
|
||||
<a-sub-menu key="2" title="移动文档" >
|
||||
<a-menu-item key="3" @click="openMoveMenu(false)">
|
||||
<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>
|
||||
<DocumentCopy/>
|
||||
</el-icon>
|
||||
复制文档
|
||||
</a-menu-item>
|
||||
<a-menu-item key="4" @click="openMoveMenu(true)">
|
||||
<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>
|
||||
<Scissor/>
|
||||
</el-icon>
|
||||
迁移文档
|
||||
</a-menu-item>
|
||||
<a-modal
|
||||
v-model:open="visibleMoveMenu"
|
||||
title="选择"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
ok-text="确认"
|
||||
cancel-text="取消"
|
||||
:confirm-loading="aModalWaiting"
|
||||
:destroyOnClose=true
|
||||
:closable=false>
|
||||
<LeftSidebar
|
||||
:readOnly=true
|
||||
:wikiPageList="moveToWikiPageList"
|
||||
:spaceOptions="spaceOptions"
|
||||
:nowPageId="moveToPageId"
|
||||
:choiceSpace="moveToSpaceId"
|
||||
@setNowPageId="setNowPageId"
|
||||
@doGetPageList="doGetPageList"
|
||||
@spaceChangeEvents="spaceChangeEvents"/>
|
||||
</a-modal>
|
||||
</a-sub-menu>
|
||||
</a-menu>
|
||||
</template>
|
||||
@@ -106,8 +86,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</LeftSidebar>
|
||||
</el-aside>
|
||||
@@ -187,6 +165,26 @@
|
||||
</el-container>
|
||||
</el-container>
|
||||
<create-space ref="createSpaceRef" @success="loadSpaceList"></create-space>
|
||||
<a-modal
|
||||
v-model:open="visibleMoveMenu"
|
||||
title="选择"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
ok-text="确认"
|
||||
cancel-text="取消"
|
||||
:confirm-loading="aModalWaiting"
|
||||
:destroyOnClose=true
|
||||
:closable=false>
|
||||
<LeftSidebar
|
||||
:readOnly=true
|
||||
:wikiPageList="moveToWikiPageList"
|
||||
:spaceOptions="spaceOptions"
|
||||
:nowPageId="moveToPageId"
|
||||
:choiceSpace="moveToSpaceId"
|
||||
@setNowPageId="setNowPageId"
|
||||
@doGetPageList="doGetPageList"
|
||||
@spaceChangeEvents="spaceChangeEvents"/>
|
||||
</a-modal>
|
||||
<about-dialog ref="aboutDialogRef"></about-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -201,7 +199,10 @@
|
||||
Setting as ElIconSetting,
|
||||
Plus as ElIconPlus,
|
||||
Check as ElIconCheck,
|
||||
MoreFilled,
|
||||
Files,
|
||||
Scissor,
|
||||
DocumentCopy,
|
||||
MoreFilled
|
||||
} from '@element-plus/icons-vue'
|
||||
|
||||
import {onBeforeUnmount, toRefs, ref, reactive, onMounted, watch, defineProps, nextTick, defineEmits, defineExpose, computed} from 'vue';
|
||||
@@ -344,14 +345,11 @@
|
||||
}
|
||||
|
||||
const setNowPageId = (id,readOnly)=>{
|
||||
console.log(readOnly)
|
||||
if (readOnly){
|
||||
moveToPageId.value = id
|
||||
console.log("moveToPageId修改")
|
||||
return
|
||||
}
|
||||
nowPageId.value = id
|
||||
console.log("nowPageId修改")
|
||||
}
|
||||
|
||||
const rename = (node,data) => {
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
|
||||
const handleNodeClick = (data) => {
|
||||
console.log('点击节点:', data, props.nowPageId)
|
||||
//console.log('点击节点:', data, props.nowPageId)
|
||||
emit('setNowPageId', data.id, props.readOnly)
|
||||
if (props.readOnly) {
|
||||
return
|
||||
|
||||
@@ -231,7 +231,7 @@ public class WikiPageController {
|
||||
@PostMapping("/move")
|
||||
public ResponseJson<Object> move(WikiPage wikiPage, String moveToPageId, String moveToSpaceId) {
|
||||
if (isLassoDoll(wikiPage,moveToPageId)){
|
||||
return DocResponseJson.warn("禁止无限套娃,不能移动自己到自己或自己的子节点下");
|
||||
return DocResponseJson.warn("不能移动自己到自己或自己的子节点下");
|
||||
}
|
||||
DocUserDetails currentUser = DocUserUtil.getCurrentUser();
|
||||
//获取原page信息
|
||||
@@ -259,7 +259,7 @@ public class WikiPageController {
|
||||
@PostMapping("/copy")
|
||||
public ResponseJson<Object> copy(WikiPage wikiPage, String moveToPageId, String moveToSpaceId) {
|
||||
if (isLassoDoll(wikiPage,moveToPageId)){
|
||||
return DocResponseJson.warn("禁止无限套娃,不能移动自己到自己或自己的子节点下");
|
||||
return DocResponseJson.warn("不能移动自己到自己或自己的子节点下");
|
||||
}
|
||||
DocUserDetails currentUser = DocUserUtil.getCurrentUser();
|
||||
//获取原page信息
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,11 +5,11 @@
|
||||
<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-ab18a781.js"></script>
|
||||
<script type="module" crossorigin src="./assets/main-38b62da0.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-d51e6ee8.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/vant-a2f25ba3.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/vendor-312b3cf5.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/vant-6dbc81d6.js">
|
||||
<link rel="modulepreload" crossorigin href="./assets/wangeditor-564d5916.js">
|
||||
<link rel="stylesheet" href="./assets/style.13e54fdd.css">
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user