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
a805b73d
Commit
a805b73d
authored
Feb 22, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成分享功能
parent
d4fb8556
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
ConfigService.ts
src/services/ConfigService.ts
+5
-0
journeyAds.vue
src/views/SellTemplate/components/journeyAds.vue
+31
-2
No files found.
src/services/ConfigService.ts
View file @
a805b73d
...
...
@@ -168,6 +168,11 @@ class ConfigService{
return
Api
.
Post
(
"triptemplate_RemoveTripShare"
,
msg
)
}
static
async
RemoveFileShareAsync
(
FileIdList
:
number
[]):
Promise
<
HttpResponse
>
{
let
msg
=
{
FileIdList
}
return
Api
.
Post
(
"triptemplate_RemoveTripShareBatch"
,
msg
)
}
static
async
UpdateShareAsync
(
params
:{
ShareId
:
number
,
ShareTargetIds
:
string
,
EditType
:
string
}):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_EditTripShare"
,
params
)
}
...
...
src/views/SellTemplate/components/journeyAds.vue
View file @
a805b73d
...
...
@@ -149,7 +149,8 @@
<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
.
stop=
"()=>shareId=item.FileId"
>
分享
</el-dropdown-item>
<el-dropdown-item
icon=
"Position"
@
click
.
stop=
"()=>shareId=item.FileId"
>
分享
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.IsShare"
icon=
"Hide"
@
click
.
stop=
"removeShareHandler(item)"
>
取消分享
</el-dropdown-item>
<el-dropdown-item
icon=
"Expand"
@
click
.
stop=
"MoveFile(item)"
>
移动至
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -191,7 +192,7 @@
<ShareForm
:id=
"shareId"
v-if=
"shareId > 0"
@
close=
"() => (shareId = 0)"
@
close=
"() => (shareId = 0
,refreshHandler()
)"
></ShareForm>
<Folder
:folder-id=
"folderObj?.id"
...
...
@@ -236,6 +237,7 @@ import Folder from "./Folder.vue";
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
TreeFile
from
"./TreeFile.vue"
;
import
breadPeeling
from
"./breadPeeling.vue"
;
import
{
ApiResult
}
from
"@/configs/axios"
;
const
SalesEditorStore
=
useSellTemplateStore
();
const
marketStore
=
useScreenStore
();
...
...
@@ -260,6 +262,7 @@ const NewDataList = ref([] as Array<any>);
const
searchData
=
ref
({}
as
any
);
searchData
.
value
=
inject
(
injectKeyTemplate
);
const
deleteLoading
=
ref
<
any
>
(
null
);
const
removeShareLoading
=
ref
<
any
>
(
null
);
const
datas
=
reactive
({
Sort
:
0
,
selectedDatas
:
[]
as
Array
,
...
...
@@ -424,6 +427,32 @@ const startEditTitle = (row: any) => {
editObj
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
));
};
const
removeShareHandler
=
async
(
item
:
any
)
=>
{
if
(
removeShareLoading
.
value
)
return
removeShareLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
text
:
"正在处理"
,
})
let
errmsg
=
''
try
{
let
response
=
await
ConfigService
.
RemoveFileShareAsync
([
item
.
FileId
])
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
ElMessage
.
success
({
message
:
'设置成功'
})
item
.
IsShare
=
false
}
else
errmsg
=
'取消分享失败,请刷新重试'
}
catch
(
error
)
{
errmsg
=
'取消分享失败,请刷新重试'
}
if
(
errmsg
!=
''
)
{
ElMessage
.
error
({
message
:
errmsg
})
}
removeShareLoading
.
value
.
close
();
removeShareLoading
.
value
=
null
;
}
// 全选按钮
const
clickSelectAll
=
()
=>
{
...
...
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