|
@@ -9,7 +9,7 @@
|
|
|
<el-container class="bodys">
|
|
|
<!-- 左侧树状导航栏部分 -->
|
|
|
<el-aside class="aside" width="200px">
|
|
|
- <leftAsideTree @changeNode="changeNode"></leftAsideTree>
|
|
|
+ <leftAsideTree ref="leftAsideTree" @changeNode="changeNode"></leftAsideTree>
|
|
|
</el-aside>
|
|
|
<!-- 展示部分 -->
|
|
|
<el-main class="main">
|
|
@@ -31,15 +31,16 @@
|
|
|
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
<span style="margin-left: 10px;">|</span>
|
|
|
<span class="sum">已选择<span style="color:#252b30;margin: 0 5px;">{{selectCard.length}}</span>项目</span>
|
|
|
- <el-button size="mini" @click="move">移动到</el-button>
|
|
|
- <el-button size="mini" @click="download" v-if="isPub">下载</el-button>
|
|
|
- <el-button size="mini" @click="deleteSelect">删除</el-button>
|
|
|
+ <el-button size="mini" @click="groupMove">移动到</el-button>
|
|
|
+ <el-button size="mini" @click="groupDownload" v-if="isPub">下载</el-button>
|
|
|
+ <el-button size="mini" @click="groupDelete">删除</el-button>
|
|
|
<i class="el-icon-close" style="float:right;line-height: 28px;margin-right: 5px;" @click="handleCheckAllChange(false)"></i>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="main-body" :class="{'no-data': !cardList.length}">
|
|
|
<template v-for="t in cardList">
|
|
|
- <topoImageCard :data="t" :key="t.id" @changeCheck="changeCheck" @rename="rename" @publishSuc="updateSuc"></topoImageCard>
|
|
|
+ <topoImageCard :data="t" :key="t.id" @changeCheck="changeCheck" @rename="rename" @publishSuc="updateSuc" @moveTo="moveTo"
|
|
|
+ @delete="deleteGraph"></topoImageCard>
|
|
|
</template>
|
|
|
<div v-if="!cardList.length" style="margin-top: 112px;">
|
|
|
<img src="./../assets/images/no-data.png" alt="" style="width: 116px;height:116px;">
|
|
@@ -82,6 +83,10 @@
|
|
|
|
|
|
<!-- 重命名 -->
|
|
|
<rename ref="rename" @updateSuc="updateSuc"></rename>
|
|
|
+ <!-- 移动到 -->
|
|
|
+ <move ref="move" @moveSuc="moveSuc"></move>
|
|
|
+ <!-- 删除二次确认 -->
|
|
|
+ <deleteDialog ref="deleteDialog" @deleteSuc="deleteSuc"></deleteDialog>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
@@ -91,6 +96,8 @@ import leftAsideTree from "@/components/homeView/leftAsideTree.vue";
|
|
|
import topoImageCard from "@/components/homeView/topoImageCard.vue";
|
|
|
import { queryDraftsGraph, queryPubGraph } from "@/api/home"
|
|
|
import rename from "@/components/homeView/rename"
|
|
|
+import move from "@/components/homeView/move"
|
|
|
+import deleteDialog from "@/components/homeView/deleteDialog"
|
|
|
export default {
|
|
|
name: "home",
|
|
|
data() {
|
|
@@ -215,25 +222,43 @@ export default {
|
|
|
this.selectCard = val ? this.cardList.map(t => { t.checked = true; return t }) : [];
|
|
|
this.isIndeterminate = false;
|
|
|
},
|
|
|
- // 移动到
|
|
|
- move() {
|
|
|
- console.log('move');
|
|
|
+ // 批量移动到
|
|
|
+ groupMove() {
|
|
|
+ this.$refs.move.showDialog(this.selectCard)
|
|
|
},
|
|
|
// 下载
|
|
|
- download() {
|
|
|
+ groupDownload() {
|
|
|
console.log('download');
|
|
|
},
|
|
|
// 删除
|
|
|
- deleteSelect() {
|
|
|
- console.log('deleteSelect');
|
|
|
+ groupDelete() {
|
|
|
+ this.$refs.deleteDialog.showDialog(this.selectCard);
|
|
|
},
|
|
|
// 重命名
|
|
|
- rename(data){
|
|
|
+ rename(data) {
|
|
|
this.$refs.rename.showDialog(data)
|
|
|
},
|
|
|
+ // 移动到
|
|
|
+ moveTo(data) {
|
|
|
+ this.$refs.move.showDialog([data])
|
|
|
+ },
|
|
|
+ // 单独删除
|
|
|
+ deleteGraph(data) {
|
|
|
+ this.$refs.deleteDialog.showDialog([data]);
|
|
|
+ },
|
|
|
// 更新成功-发布成功
|
|
|
- updateSuc(){
|
|
|
+ updateSuc() {
|
|
|
+ this.queryGraph()
|
|
|
+ },
|
|
|
+ // 移动成功
|
|
|
+ moveSuc() {
|
|
|
+ this.queryGraph()
|
|
|
+ this.$refs.leftAsideTree.getCategoryGraph();
|
|
|
+ },
|
|
|
+ // 删除成功
|
|
|
+ deleteSuc() {
|
|
|
this.queryGraph()
|
|
|
+ this.$refs.leftAsideTree.getCategoryGraph();
|
|
|
},
|
|
|
// 选中节点变化
|
|
|
changeNode(data) {
|
|
@@ -245,7 +270,7 @@ export default {
|
|
|
this.queryGraph()
|
|
|
},
|
|
|
// 输入内容变化
|
|
|
- changeQueryText(){
|
|
|
+ changeQueryText() {
|
|
|
this.queryGraph()
|
|
|
},
|
|
|
/////////////////接口
|
|
@@ -282,7 +307,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- components: { Select, Button, leftAsideTree, Dropdown, topoImageCard, rename },
|
|
|
+ components: { Select, Button, leftAsideTree, Dropdown, topoImageCard, rename, move, deleteDialog },
|
|
|
watch: {
|
|
|
// 排序方式修改
|
|
|
selVal(n, o) {
|