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
b072b068
Commit
b072b068
authored
Feb 26, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.0' of
http://gitlab.oytour.com/viitto/pptist
into 1.2.0
parents
d4ca7880
f0135ede
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
165 additions
and
22 deletions
+165
-22
common.css
src/assets/styles/common.css
+6
-0
Share.vue
src/views/SellTemplate/Share.vue
+149
-17
breadPeeling.vue
src/views/SellTemplate/components/breadPeeling.vue
+9
-5
journeyAds.vue
src/views/SellTemplate/components/journeyAds.vue
+1
-0
No files found.
src/assets/styles/common.css
View file @
b072b068
...
...
@@ -19,6 +19,9 @@ page {
src
:
url("https://im.oytour.com/tripfont/PingFangR.ttf")
format
(
"truetype"
);
font-display
:
swap
;
}
.pingfangr
{
font-family
:
"pingfangr"
!important
;
}
.block
{
display
:
block
;
}
...
...
@@ -126,6 +129,9 @@ page {
.text-primary
{
color
:
#0b40fe
;
}
.text-el-primary
{
color
:
#d14424
!important
;
}
.text-info
{
color
:
#b1b7cf
;
}
...
...
src/views/SellTemplate/Share.vue
View file @
b072b068
<
template
>
<div
class=
"q-px-md q-pt-lg column full-height"
>
<div
class=
"q-px-md q-pt-lg column full-height"
ref=
"currentRootDom"
>
<div
class=
"q-pl-lg row q-mb-lg"
>
<div
class=
"col row items-center q-pl-md"
>
<h5
class=
"row items-center"
>
...
...
@@ -9,8 +9,8 @@
</el-icon>
</span>
<span
class=
"q-pl-md"
:class=
"[queryObj.FileId == 0 ? '' : 'row items-center']"
>
<span
class=
"pointer"
@
click=
"
(queryObj.FileId = 0), refreshHandler()
"
>
分享
</span>
<breadPeeling
v-if=
"
queryObj.FileId
"
:navigations=
"navigations"
@
Inquire=
"breadPeelingInquire"
>
<span
class=
"pointer"
@
click=
"
clearNavigationHandler
"
>
分享
</span>
<breadPeeling
v-if=
"
navigations && navigations.length>0
"
:navigations=
"navigations"
@
Inquire=
"breadPeelingInquire"
>
</breadPeeling>
</span>
</h5>
...
...
@@ -21,18 +21,45 @@
</el-icon>
</div>
</div>
<div></div>
<div>
<el-button
v-if=
"selectedItems && selectedItems.length>0"
>
<el-icon><CopyDocument
/></el-icon>
<span
class=
""
>
批量复制
</span>
</el-button>
</div>
</div>
<div
class=
"col full-width"
>
<el-table
class=
"sample-table"
:data=
"data"
style=
"width: 100%"
height=
"100%"
v-loading=
"loading
"
>
<el-table
class=
"sample-table"
@
selection-change=
"handleSelectionChange"
:data=
"data"
style=
"width: 100%"
height=
"100%"
v-loading=
"loading"
@
sort-change=
"sortHandler"
:default-sort=
"
{ prop: 'CreateTime', order: 'descending' }
">
<el-table-column
type=
"selection"
width=
"20"
/>
<el-table-column
label=
"文档名称"
className=
"indentLeft"
>
<el-table-column
className=
"indentLeft"
>
<template
#
header
>
<div
class=
"row items-center"
>
<span>
文档名称
</span>
<el-popover
:width=
"200"
trigger=
"click"
@
before-enter=
"()=>filterFileNameStatus=true"
@
before-leave=
"()=>filterFileNameStatus=false"
>
<template
#
reference
>
<el-icon
size=
"14px"
class=
"q-ml-md cusor-pointer"
:class=
"
{'text-el-primary':queryObj.FileName!=''}">
<ArrowDown
v-if=
"!filterFileNameStatus"
/>
<ArrowUp
v-else
/>
</el-icon>
</
template
>
<el-input
v-model=
"tempFilterName"
placeholder=
"请输入文档关键字"
size=
"mini"
class=
"full-width"
/>
<div
class=
"q-mt-md text-right"
>
<el-button
link
class=
"q-mr-sm"
>
<span
class=
"text-bolder pingfangr"
@
click=
"setFilterNameHandler(0)"
>
重置
</span>
</el-button>
<el-button
link
type=
"primary"
>
<span
class=
"text-bolder pingfangr"
@
click=
"setFilterNameHandler(1)"
>
确认
</span>
</el-button>
</div>
</el-popover>
</div>
</template>
<
template
#
default=
"scope"
>
<div
class=
"row items-center full-width"
style=
"padding-left: 12px;"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png"
height=
"25"
v-if=
"scope.row.FileType==1"
/>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png"
height=
"25"
v-else-if=
"scope.row.FileType==2"
/>
<img
src=
"@/assets/img/file.png"
height=
"25"
v-else
/>
<div
class=
"temp-tr col q-ml-md file-name"
:class=
"
{'cusor-pointer':scope.row.FileType==0}">
<div
class=
"temp-tr col q-ml-md file-name"
:class=
"
{'cusor-pointer':scope.row.FileType==0}"
@click="changeFolderHandler(scope.row)"
>
<el-tooltip
effect=
"dark"
:content=
"scope.row.FileName"
>
{{
scope
.
row
.
FileName
}}
</el-tooltip>
...
...
@@ -40,7 +67,7 @@
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"最近修改"
width=
"150"
>
<el-table-column
label=
"最近修改"
width=
"150"
sortable=
"custom"
prop=
"CreateTime"
>
<
template
#
default=
"scope"
>
{{
formatDateTimeToRead
(
scope
.
row
.
UpdateTime
&&
scope
.
row
.
UpdateTime
!=
''
?
scope
.
row
.
UpdateTime
:
scope
.
row
.
CreateTime
)
}}
</
template
>
...
...
@@ -54,9 +81,9 @@
<el-icon
size=
"16"
color=
"#b1b7cf"
><MoreFilled
/></el-icon>
<template
#
dropdown
>
<el-dropdown-menu
class=
"q-pa-md"
>
<el-dropdown-item
v-if=
"scope.row.IsEdit
or && scope.row.FileType!=0"
icon=
"EditPen
"
>
编辑
</el-dropdown-item>
<el-dropdown-item
v-if=
"scope.row.IsDownload && scope.row.FileType!=0"
icon=
"Download"
>
导出
</el-dropdown-item>
<el-dropdown-item
icon=
"Copy"
v-if=
"scope.row.IsView"
>
复制到
</el-dropdown-item>
<el-dropdown-item
v-if=
"scope.row.IsEdit
&& scope.row.FileType!=0"
icon=
"EditPen"
@
click=
"editorFileHandler(scope.row)
"
>
编辑
</el-dropdown-item>
<el-dropdown-item
v-if=
"scope.row.IsDownload && scope.row.FileType!=0"
icon=
"Download"
@
click=
"exportDocument(scope.row)"
>
导出
</el-dropdown-item>
<el-dropdown-item
icon=
"Copy"
v-if=
"scope.row.IsView"
@
click=
"openCopyHandler(scope.row)"
>
复制到
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
...
...
@@ -64,19 +91,25 @@
</template>
</el-table-column>
<
template
#
empty
>
<el-empty
:image-size=
"150"
v-if=
"(!data || data.length==0) && !loading"
description=
"没有分享给我的文档
"
/>
<el-empty
:image-size=
"150"
v-if=
"(!data || data.length==0) && !loading"
:description=
"(queryObj.FileId==0?'没有分享给我的文档':'文件夹里没有文件')
"
/>
</
template
>
</el-table>
</div>
</div>
<CopyFile
v-if=
"openCopy"
:details=
"copyObject"
@
close=
"() => openCopy=false"
></CopyFile>
</template>
<
script
setup
lang=
"ts"
>
import
{
ApiResult
}
from
"@/configs/axios"
;
import
ConfigService
from
"@/services/ConfigService"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
reactive
,
ref
}
from
"vue"
;
import
{
inject
,
reactive
,
ref
}
from
"vue"
;
import
{
formatDateTimeToRead
,
query
}
from
'@/utils/common'
import
{
Download
,
View
}
from
"@element-plus/icons-vue"
;
import
breadPeeling
from
'./components/breadPeeling.vue'
import
CopyFile
from
'./components/CopyFile.vue'
import
{
useScreenStore
,
useSellTemplateStore
,
useSlidesStore
}
from
"@/store"
;
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
;
import
FolderService
from
"@/services/FolderService"
;
import
{
ArrowDown
,
ArrowUp
}
from
"@element-plus/icons-vue"
;
const
queryObj
=
reactive
<
any
>
({
pageIndex
:
1
,
...
...
@@ -84,6 +117,9 @@ const queryObj = reactive<any>({
pageCount
:
0
,
//总页数
FileType
:
0
,
FileId
:
0
,
OrderByType
:
2
,
FileName
:
''
,
QShareCreateBy
:
0
});
const
refreshLoading
=
ref
(
false
);
const
navigations
=
ref
<
{
FileId
:
number
;
FileName
:
string
}[]
>
([]);
...
...
@@ -93,6 +129,14 @@ const data = ref<any[]>([])
const
loading
=
ref
(
false
)
const
pageCount
=
ref
(
0
)
const
showItemId
=
ref
(
0
)
const
openCopy
=
ref
(
false
)
const
copyObject
=
ref
<
any
>
()
const
searchData
=
ref
({}
as
any
);
searchData
.
value
=
inject
(
injectKeyTemplate
);
const
filterFileNameStatus
=
ref
(
false
)
const
tempFilterName
=
ref
(
''
)
const
currentRootDom
=
ref
()
const
selectedItems
=
ref
<
any
[]
>
([])
const
backInquireHandler
=
()
=>
{
let
Navigation
=
navigations
.
value
[
navigations
.
value
.
length
-
2
];
...
...
@@ -100,12 +144,32 @@ const backInquireHandler = () => {
else
breadPeelingInquire
(
0
,
0
);
};
const
breadPeelingInquire
=
(
FileId
:
number
,
index
:
number
)
=>
{
console
.
log
(
FileId
,
index
)
selectAll
.
value
=
false
;
selectedDatas
.
value
=
[];
navigations
.
value
.
splice
(
index
+
1
,
navigations
.
value
.
length
-
1
);
queryObj
.
FileId
=
FileId
;
refreshHandler
();
}
const
editorFileHandler
=
(
item
:
any
)
=>
{
let
list
:
any
=
[{
id
:
"test-slide-1"
,
pageType
:
0
,
elements
:
[],
background
:
{
type
:
"solid"
,
color
:
"#ffffff"
,
},
}];
const
SalesEditorStore
=
useSellTemplateStore
();
useSlidesStore
().
setSlides
(
list
);
const
marketStore
=
useScreenStore
();
searchData
.
value
.
sellId
=
item
.
FileId
;
searchData
.
value
.
sellTempId
=
item
.
TempId
;
searchData
.
value
.
TemplateType
=
item
.
FileType
;
SalesEditorStore
.
setSalesEditor
(
2
);
marketStore
.
setMarket
(
false
);
}
const
getDocumentData
=
async
()
=>
{
if
(
loading
.
value
)
return
loading
.
value
=
true
...
...
@@ -133,12 +197,77 @@ const exportDocument = (item:any) => {
if
(
item
.
FileType
==
1
)
url
=
`http://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
`
window
.
open
(
url
);
}
const
changeFolderHandler
=
async
(
item
:
any
)
=>
{
if
(
item
.
FileType
==
0
){
queryObj
.
FileId
=
item
.
FileId
navigations
.
value
.
push
({
FileId
:
item
.
FileId
,
FileName
:
item
.
FileName
})
await
refreshHandler
()
}
}
const
dropdownChange
=
(
val
:
boolean
,
id
:
number
)
=>
{
showItemId
.
value
=
val
?
id
:
0
}
const
refreshHandler
=
()
=>
{
};
const
clearNavigationHandler
=
async
()
=>
{
navigations
.
value
=
[]
queryObj
.
FileId
=
0
await
refreshHandler
()
}
const
refreshHandler
=
async
()
=>
{
queryObj
.
pageIndex
=
0
queryObj
.
pageCount
=
0
data
.
value
=
[]
refreshLoading
.
value
=
true
await
getDocumentData
()
}
const
openCopyHandler
=
(
item
:
any
)
=>
{
openCopy
.
value
=
true
,
copyObject
.
value
=
item
}
const
sortHandler
=
(
val
:
any
)
=>
{
queryObj
.
OrderByType
=
val
==
'descending'
?
2
:
1
refreshHandler
()
}
const
setFilterNameHandler
=
(
t
:
0
|
1
)
=>
{
if
(
!
t
)
tempFilterName
.
value
=
''
queryObj
.
FileName
=
tempFilterName
.
value
currentRootDom
.
value
.
click
()
refreshHandler
()
}
const
collectHandler
=
async
(
row
:
any
)
=>
{
if
(
loading
.
value
)
return
let
errmsg
=
''
loading
.
value
=
true
try
{
let
queryMsg
=
{
FileId
:
row
.
FileId
,
FileType
:
row
.
FileType
,
IsCollect
:
row
.
IsCollect
?
0
:
1
,
}
let
response
=
await
FolderService
.
SetFileCollect
(
queryMsg
);
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
ElMessage
.
success
({
message
:
`
${
queryMsg
.
IsCollect
?
'收藏'
:
'取消收藏'
}${
row
.
FileName
}
成功`
});
row
.
IsCollect
=!
row
.
IsCollect
}
else
{
errmsg
=
`收藏
${
row
.
FileName
}
失败,请刷新页面重试`
}
}
catch
(
error
)
{
errmsg
=
`收藏
${
row
.
FileName
}
失败,请刷新页面重试`
}
if
(
errmsg
!=
''
){
ElMessage
.
error
({
message
:
errmsg
})
}
loading
.
value
=
false
}
const
handleSelectionChange
=
(
val
:
any
)
=>
{
selectedItems
.
value
=
val
}
getDocumentData
()
</
script
>
<
style
>
...
...
@@ -193,6 +322,9 @@ getDocumentData()
text-overflow
:
ellipsis
;
width
:
0
;
}
.el-table
.caret-wrapper
{
height
:
12px
!important
;
}
/* .sample-table th:nth-child(2) .cell{
padding-left: 0 !important;
} */
...
...
src/views/SellTemplate/components/breadPeeling.vue
View file @
b072b068
<
template
>
<span
class=
"pointer"
v-for=
"(item,index) in navigations"
@
click=
"goInquire(item.FileId,index)"
>
<span
class=
"text-info q-ml-sm"
>
/
</span>
{{
item
.
FileName
}}
<span
class=
"pointer"
v-if=
"navigations.length>3"
>
<span
class=
"text-info q-ml-sm"
>
/
</span>
...
</span>
<template
v-for=
"(item,index) in navigations"
>
<span
class=
"pointer"
v-if=
"navigations.length
<4
||
index
>
=(navigations.length-3) " @click="goInquire(item.FileId,index)">
<span
class=
"text-info q-ml-sm"
>
/
</span>
{{
item
.
FileName
}}
</span>
</
template
>
</template>
<
script
setup
lang=
"ts"
>
import
{
ApiResult
}
from
'@/configs/axios'
;
...
...
@@ -11,7 +16,6 @@ import OrgService from '@/services/OrgService';
import
{
ref
,
reactive
,
watch
}
from
'vue'
;
import
{
View
,
Download
,
EditPen
,
Delete
}
from
'@element-plus/icons-vue'
;
import
FolderService
from
"@/services/FolderService"
;
const
props
=
defineProps
({
navigations
:{
type
:
Array
,
...
...
src/views/SellTemplate/components/journeyAds.vue
View file @
b072b068
...
...
@@ -321,6 +321,7 @@ const operaFolder = (id: number, name: string) => {
folderObj
.
value
.
id
=
id
;
folderObj
.
value
.
name
=
name
;
folderObj
.
value
.
type
=
queryObj
.
FileType
;
folderObj
.
value
.
parentId
=
queryObj
.
FileId
};
const
checkPositionHandler
=
(
n
:
any
)
=>
{
if
(
n
){
...
...
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