|
@@ -105,11 +105,6 @@
|
|
|
</span>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <!-- <el-dropdown-item @click="fileUpload">
|
|
|
- <img src="../../assets/images/file.png" alt="">
|
|
|
- <span id="uploadButton">上传</span>
|
|
|
- <input id="fileInput" type="file" style="display: none;">
|
|
|
- </el-dropdown-item> -->
|
|
|
<template v-for="(item, index) in arrorMenu">
|
|
|
<el-dropdown-item @click="arrowClick(item, index)">
|
|
|
<img :src="item.img" alt="">
|
|
@@ -133,11 +128,7 @@
|
|
|
</div>
|
|
|
<!-- 面包屑 -->
|
|
|
<div>
|
|
|
- <el-breadcrumb separator="/">
|
|
|
- <el-breadcrumb-item style="font-size: 12px;">homepage</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item style="font-size: 12px;">promotion management</el-breadcrumb-item>
|
|
|
- <el-breadcrumb-item style="font-size: 12px;">promotion detail</el-breadcrumb-item>
|
|
|
- </el-breadcrumb>
|
|
|
+ <BreadMenu></BreadMenu>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 右侧 -->
|
|
@@ -235,12 +226,30 @@
|
|
|
<!-- 穿梭框 -->
|
|
|
<div>
|
|
|
<el-dialog v-model="transferModal" title="分享" width="40%">
|
|
|
- <el-transfer v-model="tranvalue" filterable :filter-method="filterMethod"
|
|
|
- filter-placeholder="State Abbreviations" :data="trandata" />
|
|
|
+ <!-- 穿梭大盒子 -->
|
|
|
+ <div class="transBox">
|
|
|
+ <!-- 总数据包 -->
|
|
|
+ <div class="allBag">
|
|
|
+ <el-input style="width: 220px;margin-left: 18px;margin-top:5px" v-model="allBag"
|
|
|
+ placeholder="搜索"></el-input>
|
|
|
+ <div class="allLog">
|
|
|
+ <el-tree :data="allTreeData" :props="allTreeProps" show-checkbox node-key="id"
|
|
|
+ :default-expanded-keys="openTree" @check-change="allTreeChange" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 需要的数据包 -->
|
|
|
+ <div class="needBag">
|
|
|
+ <el-input style="width: 220px;margin-left: 18px;margin-top:5px" v-model="needBag"
|
|
|
+ placeholder="搜索"></el-input>
|
|
|
+ <div class="needLog">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="transferModal = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="transferSure">
|
|
|
+ <el-button type="primary" @click="sureShare">
|
|
|
确定
|
|
|
</el-button>
|
|
|
</span>
|
|
@@ -388,30 +397,15 @@ import myfile from '../../api/myfile/myfile'
|
|
|
import space from '../../api/space/space'
|
|
|
import documents from '../../api/document/document'
|
|
|
import fileSpace from '../../api/filespace/fileSpace'
|
|
|
+import userTree from '../../api/user/userTree'
|
|
|
+import fileShare from '../../api/fileShare/fileShare'
|
|
|
+import BreadMenu from './components/BreadMenu.vue'
|
|
|
+import ImgFile from "./jsComponents/ImgFile"
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
-import copy from '../../assets/images/copy.png'
|
|
|
-import clipboard from '../../assets/images/clipboard.png'
|
|
|
-import share from '../../assets/images/share.png'
|
|
|
-import trash from '../../assets/images/trash.png'
|
|
|
-import file from '../../assets/images/file.png'
|
|
|
-import folder from '../../assets/images/folder.png'
|
|
|
-import image from '../../assets/images/image.png'
|
|
|
-import filmSlate from '../../assets/images/filmSlate.png'
|
|
|
-import musicNotes from '../../assets/images/musicNotes.png'
|
|
|
import blueLeft from '../../assets/images/blueLeft.png'
|
|
|
import grayRight from "../../assets/images/grayRight.png"
|
|
|
import sort from '../../assets/images/sort.png'
|
|
|
import squre from '../../assets/images/squre.png'
|
|
|
-import addolder from '../../assets/images/addolder.png'
|
|
|
-import textbox from '../../assets/images/textbox.png'
|
|
|
-import goon from '../../assets/images/goon.png'
|
|
|
-import notePencil from '../../assets/images/notePencil.png'
|
|
|
-import togger from '../../assets/images/togger.png'
|
|
|
-import icc from '../../assets/images/icc.png'
|
|
|
-import history from '../../assets/images/history.png'
|
|
|
-import fileBox from '../../assets/images/fileBox.png'
|
|
|
-import user from '../../assets/images/user.png'
|
|
|
-import archiveTray from '../../assets/images/archiveTray.png'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
import txt from '../../assets/images/txt.png'
|
|
|
import pptx from '../../assets/images/pptx.png'
|
|
@@ -437,7 +431,7 @@ export default {
|
|
|
let selectedBox = ref(-1)
|
|
|
let newName = ref('')
|
|
|
let clickRowId = ref("")
|
|
|
- let trandata = ref(generateData())
|
|
|
+ let trandata = ref()
|
|
|
let folderId = ref('')
|
|
|
let fileId = ref('')
|
|
|
let tranvalue = ref([])
|
|
@@ -474,93 +468,102 @@ export default {
|
|
|
])
|
|
|
let useMenu = ref([
|
|
|
{
|
|
|
- img: copy,
|
|
|
+ img: ImgFile.copy,
|
|
|
name: "复制"
|
|
|
},
|
|
|
{
|
|
|
- img: clipboard,
|
|
|
+ img: ImgFile.clipboard,
|
|
|
name: "粘贴"
|
|
|
},
|
|
|
{
|
|
|
- img: share,
|
|
|
+ img: ImgFile.share,
|
|
|
name: "分享给"
|
|
|
},
|
|
|
{
|
|
|
- img: trash,
|
|
|
+ img: ImgFile.trash,
|
|
|
name: "删除"
|
|
|
},
|
|
|
])
|
|
|
let arrorMenu = ref([
|
|
|
{
|
|
|
- img: file,
|
|
|
+ img: ImgFile.file,
|
|
|
name: "文件"
|
|
|
},
|
|
|
{
|
|
|
- img: folder,
|
|
|
+ img: ImgFile.folder,
|
|
|
name: '文件夹'
|
|
|
},
|
|
|
{
|
|
|
- img: image,
|
|
|
+ img: ImgFile.image,
|
|
|
name: "图片"
|
|
|
},
|
|
|
{
|
|
|
- img: filmSlate,
|
|
|
+ img: ImgFile.filmSlate,
|
|
|
name: "视频"
|
|
|
},
|
|
|
{
|
|
|
- img: musicNotes,
|
|
|
+ img: ImgFile.musicNotes,
|
|
|
name: "音频"
|
|
|
}
|
|
|
])
|
|
|
let mouseCli = ref([
|
|
|
{
|
|
|
- img: addolder,
|
|
|
+ img: ImgFile.addolder,
|
|
|
name: "移动",
|
|
|
},
|
|
|
{
|
|
|
- img: copy,
|
|
|
+ img: ImgFile.copy,
|
|
|
name: "复制",
|
|
|
},
|
|
|
{
|
|
|
- img: clipboard,
|
|
|
+ img: ImgFile.clipboard,
|
|
|
name: "粘贴"
|
|
|
},
|
|
|
{
|
|
|
- img: textbox,
|
|
|
+ img: ImgFile.textbox,
|
|
|
name: "重命名"
|
|
|
},
|
|
|
{
|
|
|
- img: goon,
|
|
|
+ img: ImgFile.goon,
|
|
|
name: "发送"
|
|
|
},
|
|
|
{
|
|
|
- img: share,
|
|
|
+ img: ImgFile.share,
|
|
|
name: "分享"
|
|
|
},
|
|
|
{
|
|
|
- img: notePencil,
|
|
|
+ img: ImgFile.notePencil,
|
|
|
name: "在线编辑"
|
|
|
},
|
|
|
{
|
|
|
- img: togger,
|
|
|
+ img: ImgFile.togger,
|
|
|
name: "协作"
|
|
|
},
|
|
|
{
|
|
|
- img: icc,
|
|
|
+ img: ImgFile.icc,
|
|
|
name: "文字识别"
|
|
|
},
|
|
|
{
|
|
|
- img: history,
|
|
|
+ img: ImgFile.history,
|
|
|
name: "历史版本"
|
|
|
},
|
|
|
{
|
|
|
- img: share,
|
|
|
+ img: ImgFile.share,
|
|
|
name: "删除"
|
|
|
}
|
|
|
])
|
|
|
let nameForm = ref({
|
|
|
name: ""
|
|
|
})
|
|
|
+ let allTreeProps = {
|
|
|
+ label: 'label',
|
|
|
+ children: 'children',
|
|
|
+ disabled: false,
|
|
|
+ id: "id"
|
|
|
+ }
|
|
|
+ let allTreeData = ref([])
|
|
|
+ let needTagData = ref([])
|
|
|
+ let openTree = ref([])
|
|
|
let fileNameChange = ref(false)
|
|
|
let fileMenu = ref([])
|
|
|
// 获取所有文件夹
|
|
@@ -577,6 +580,26 @@ export default {
|
|
|
fileMenu.value = res.rows
|
|
|
})
|
|
|
}
|
|
|
+ // 获取用户树
|
|
|
+ function getAllUser() {
|
|
|
+ userTree.getUserTree({}).then(res => {
|
|
|
+ allTreeData.value = [res]
|
|
|
+ userTree.getUserTree({}).then(res => {
|
|
|
+ allTreeData.value = [res];
|
|
|
+ // 递归函数来获取所有节点的 id
|
|
|
+ function getAllNodeIds(nodes) {
|
|
|
+ nodes.forEach(node => {
|
|
|
+ openTree.value.push(node.id);
|
|
|
+ if (node.children && node.children.length > 0) {
|
|
|
+ getAllNodeIds(node.children);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 调用递归函数获取所有节点的 id
|
|
|
+ getAllNodeIds(allTreeData.value);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
function changeFile(row, num) {
|
|
|
directoryId.value = row.spaceId
|
|
|
getAllText()
|
|
@@ -605,7 +628,6 @@ export default {
|
|
|
}
|
|
|
// 文件名表格每一行点击事件
|
|
|
function handleRowClick(row) {
|
|
|
- console.log(row,'55');
|
|
|
clickRowId.value = row.docId
|
|
|
copyDirId.value = row.dirId
|
|
|
copySpaceId.value = row.spaceId
|
|
@@ -682,32 +704,6 @@ export default {
|
|
|
transferModal.value = true
|
|
|
anyP.value = false
|
|
|
}
|
|
|
- // 穿梭框
|
|
|
- function generateData() {
|
|
|
- const data = []
|
|
|
- const states = [
|
|
|
- 'California',
|
|
|
- 'Illinois',
|
|
|
- 'Maryland',
|
|
|
- 'Texas',
|
|
|
- 'Florida',
|
|
|
- 'Colorado',
|
|
|
- 'Connecticut ',
|
|
|
- ]
|
|
|
- const initials = ['CA', 'IL', 'MD', 'TX', 'FL', 'CO', 'CT']
|
|
|
- states.forEach((city, index) => {
|
|
|
- data.push({
|
|
|
- label: city,
|
|
|
- key: index,
|
|
|
- initial: initials[index],
|
|
|
- })
|
|
|
- })
|
|
|
- return data
|
|
|
- }
|
|
|
- // 穿梭狂数据
|
|
|
- function filterMethod(query, item) {
|
|
|
- return item.initial.toLowerCase().includes(query.toLowerCase())
|
|
|
- }
|
|
|
function getSpace() {
|
|
|
|
|
|
}
|
|
@@ -918,7 +914,7 @@ export default {
|
|
|
remark: '',
|
|
|
spaceId: copySpaceId.value - 0,
|
|
|
}).then(res => {
|
|
|
- console.log(res,'852');
|
|
|
+ console.log(res, '852');
|
|
|
if (res.code === 200) {
|
|
|
ElMessage({
|
|
|
message: "重命名成功",
|
|
@@ -929,6 +925,27 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ // 分享穿梭框
|
|
|
+ function allTreeChange(e) {
|
|
|
+ const id = e.id;
|
|
|
+ const label = e.label;
|
|
|
+ // 查找是否已经存在相同 userId 的数据
|
|
|
+ const existingData = needTagData.value.find(item => item.userId === id);
|
|
|
+ if (existingData) {
|
|
|
+ // 如果已存在,不执行任何操作或根据需求进行其他处理
|
|
|
+ console.log(`数据已存在: ${existingData.userName}`);
|
|
|
+ } else {
|
|
|
+ // 选择操作,将数据添加到 needTagData 中
|
|
|
+ needTagData.value.push({ userId: id, userName: label });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 确认分享
|
|
|
+ function sureShare() {
|
|
|
+ fileShare.addSharePeople({ docId: needTagData.value }).then(res => {
|
|
|
+ console.log(res, 'sss');
|
|
|
+ })
|
|
|
+ }
|
|
|
return {
|
|
|
folderList,//文件夹的数据
|
|
|
fileList,//文件夹的数据
|
|
@@ -954,23 +971,11 @@ export default {
|
|
|
askNum,
|
|
|
askTalk,
|
|
|
cliCC,
|
|
|
- addolder,//图片↓
|
|
|
- textbox,
|
|
|
- goon,
|
|
|
- notePencil,
|
|
|
- togger,
|
|
|
- icc,
|
|
|
- history,
|
|
|
mouseCli,//文件点击弹框
|
|
|
chooseSet,
|
|
|
- fileBox,
|
|
|
transferModal,
|
|
|
- generateData,
|
|
|
- filterMethod,
|
|
|
trandata,
|
|
|
tranvalue,
|
|
|
- archiveTray,//协作图标
|
|
|
- user,//用户图标
|
|
|
anyP,
|
|
|
chooseSet1,
|
|
|
getSpace,//获取内存空间
|
|
@@ -1024,6 +1029,12 @@ export default {
|
|
|
sureChangeName,//文件重命名
|
|
|
fileNameChange,//文件重命名模态框
|
|
|
nameForm,
|
|
|
+ getAllUser,//获取所有用户
|
|
|
+ allTreeProps,//树形控件需要显示键名
|
|
|
+ allTreeData,//树形控件数据
|
|
|
+ allTreeChange,
|
|
|
+ sureShare,
|
|
|
+ openTree,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -1039,9 +1050,13 @@ export default {
|
|
|
this.folderId = 0
|
|
|
this.getAll()
|
|
|
}
|
|
|
+ this.getAllUser()
|
|
|
},
|
|
|
watch: {
|
|
|
},
|
|
|
+ components: {
|
|
|
+ BreadMenu,
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -1178,7 +1193,7 @@ p {
|
|
|
background-color: #D9E0F0;
|
|
|
}
|
|
|
|
|
|
-::v-deep .el-collapse-item__header {
|
|
|
+:deep(.el-collapse-item__header) {
|
|
|
height: 24px !important;
|
|
|
background-color: #EBEFF6 !important;
|
|
|
}
|
|
@@ -1188,7 +1203,7 @@ p {
|
|
|
height: 270px;
|
|
|
}
|
|
|
|
|
|
-::v-deep .el-dialog__header {
|
|
|
+:deep(.el-dialog__header) {
|
|
|
background-color: #ECEFF7;
|
|
|
margin-right: 0px;
|
|
|
}
|
|
@@ -1237,11 +1252,11 @@ p {
|
|
|
color: white;
|
|
|
}
|
|
|
|
|
|
-::v-deep [data-v-69cdaa40] .el-collapse-item__header {
|
|
|
+:deep([data-v-69cdaa40] .el-collapse-item__header) {
|
|
|
padding-left: 10px;
|
|
|
}
|
|
|
|
|
|
-::v-deep .el-collapse-item__content {
|
|
|
+:deep(.el-collapse-item__content) {
|
|
|
height: 260px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
@@ -1252,4 +1267,42 @@ p {
|
|
|
text-overflow: ellipsis;
|
|
|
max-width: auto;
|
|
|
}
|
|
|
+
|
|
|
+.transBox {
|
|
|
+ width: 550px;
|
|
|
+ height: 400px;
|
|
|
+ margin: 0 auto;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: center;
|
|
|
+ border: 1px solid black;
|
|
|
+}
|
|
|
+
|
|
|
+.allBag {
|
|
|
+ width: 255px;
|
|
|
+ height: 380px;
|
|
|
+ border: 1px solid green;
|
|
|
+}
|
|
|
+
|
|
|
+.needBag {
|
|
|
+ width: 255px;
|
|
|
+ height: 380px;
|
|
|
+ border: 1px solid green;
|
|
|
+}
|
|
|
+
|
|
|
+.allLog {
|
|
|
+ width: 245px;
|
|
|
+ height: 330px;
|
|
|
+ margin: 5px auto;
|
|
|
+ border: 1px solid red;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.needLog {
|
|
|
+ width: 245px;
|
|
|
+ height: 330px;
|
|
|
+ margin: 5px auto;
|
|
|
+ border: 1px solid red;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
</style>
|