Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
pptist
Commits
d1fbdbdb
Commit
d1fbdbdb
authored
Feb 21, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移动到指定文件夹
parent
ae359e0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
13 deletions
+73
-13
FolderService.ts
src/services/FolderService.ts
+7
-0
journeyAds.vue
src/views/SellTemplate/components/journeyAds.vue
+66
-13
No files found.
src/services/FolderService.ts
View file @
d1fbdbdb
...
...
@@ -2,6 +2,13 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class
FolderService
{
/**
* 移动到文件夹
*/
static
async
UpdateTripOtherFolder
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_UpdateTripOtherFolder"
,
params
)
}
/**
* 删除文件夹
*/
...
...
src/views/SellTemplate/components/journeyAds.vue
View file @
d1fbdbdb
...
...
@@ -23,7 +23,7 @@
<
template
v-if=
"currentMenu == 3"
>
行程文档
</
template
>
<
template
v-else-if=
"currentMenu == 4"
>
广告图
</
template
>
</span>
<span>
/
{{ Navigation.FileName }}
</span>
<span>
<span
class=
"text-info q-ml-sm"
>
/
</span>
{{ Navigation.FileName }}
</span>
</span>
</h5>
<div
class=
"select-btn q-pl-lg pointer q-mt-sm"
>
...
...
@@ -135,9 +135,24 @@
<el-icon
size=
"16"
color=
"#b1b7cf"
><MoreFilled
/></el-icon>
<
template
#
dropdown
>
<el-dropdown-menu
class=
"q-pa-md"
@
click
.
stop=
"OffEdit"
>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"EditPen"
@
click
.
stop=
"startEditTitle(item)"
>
重命名
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Position"
@
click=
"()=>shareId=item.Id"
>
分享
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"EditPen"
@
click
.
stop=
"startEditTitle(item)"
>
重命名
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Position"
@
click
.
stop=
"()=>shareId=item.FileId"
>
分享
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Expand"
>
移动至
<el-select
class=
"q-pl-md"
v-model=
"item.Id"
filterable
placeholder=
"请选择文件夹"
style=
"width: 130px"
size=
"small"
@
change=
"MoveToFolder(item)"
>
<el-option
v-for=
"x in datas.fileList"
:key=
"x.FileId"
:label=
"x.FileName"
:value=
"x.FileId"
/>
</el-select>
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
...
...
@@ -208,7 +223,6 @@ import { useSellTemplateStore, useScreenStore, useSlidesStore } from "@/store";
import
ShareForm
from
"./ShareForm.vue"
;
import
Folder
from
"./Folder.vue"
;
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
Draggable
from
"vuedraggable"
;
const
SalesEditorStore
=
useSellTemplateStore
();
const
marketStore
=
useScreenStore
();
...
...
@@ -233,6 +247,7 @@ const datas = reactive({
selectedDatas
:
[]
as
Array
,
selectAll
:
false
as
any
,
journeyAds
:
{
RefreshLoading
:
false
}
as
any
,
fileList
:
[]
as
any
,
pdfImg
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png"
,
adsImg
:
...
...
@@ -260,14 +275,49 @@ const editObj = reactive({});
//datas.journeyAds = inject('journeyAds')
const
loading
=
ref
(
false
as
any
);
const
SellTemplateRef
=
ref
<
any
>
();
// 拖拽
const
onMoveCallback
=
(
event
)
=>
{
console
.
log
(
event
.
relatedContext
,
"=====event1111"
);
};
const
getdata
=
(
event
:
any
)
=>
{
console
.
log
(
event
,
"=====event222222"
);
};
// 移动到文件夹
const
MoveToFolder
=
(
item
:
any
)
=>
{
let
File
=
datas
.
fileList
.
find
(
x
=>
{
return
x
.
FileId
==
item
.
Id
})
ElMessageBox
.
confirm
(
`此操作将
${
item
.
FileName
}
移动到
${
File
.
FileName
}
,是否确定?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(
async
()
=>
{
try
{
let
queryMsg
=
{
FolderId
:
item
.
Id
,
//文件夹Id
Id
:
item
.
FileId
,
//广告行程Id
};
deleteLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
text
:
"正在处理"
,
});
let
pageRes
=
await
FolderService
.
UpdateTripOtherFolder
(
queryMsg
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
ElMessage
({
showClose
:
true
,
message
:
`移动
${
queryObj
.
FileType
==
2
?
"广告"
:
"行程"
}
至文件夹成功`
,
type
:
"success"
,
});
refreshHandler
();
}
else
{
ElMessage
({
showClose
:
true
,
message
:
`移动
${
queryObj
.
FileType
==
2
?
"广告"
:
"行程"
}
至文件夹失败`
,
type
:
"warning"
,
});
}
deleteLoading
.
value
.
close
();
deleteLoading
.
value
=
null
;
}
catch
(
error
)
{}
})
.
catch
(()
=>
{});
}
// 历史版本
const
history
=
(
row
:
any
)
=>
{
journeyAdsDetails
.
value
=
row
;
...
...
@@ -487,6 +537,8 @@ const querySearchHandler = async () => {
list
.
forEach
((
x
)
=>
{
x
.
show
=
false
;
x
.
singleChoice
=
false
;
x
.
Id
=
''
x
.
showSelect
=
false
if
(
datas
.
selectAll
)
{
x
.
singleChoice
=
true
;
datas
.
selectedDatas
.
push
(
x
.
FileId
);
...
...
@@ -502,6 +554,7 @@ const querySearchHandler = async () => {
};
arrList
(
pageRes
.
data
.
data
.
pageData
);
dataList
.
value
=
dataList
.
value
.
concat
(
pageRes
.
data
.
data
.
pageData
);
datas
.
fileList
=
dataList
.
value
.
filter
(
x
=>
{
return
!
x
.
FileType
})
queryObj
.
pageCount
=
pageRes
.
data
.
data
.
pageCount
;
}
loading
.
value
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment