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
fc933bf8
Commit
fc933bf8
authored
Feb 23, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查看历史版本入口
parent
71bce5cd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
449 additions
and
41 deletions
+449
-41
App.vue
src/App.vue
+66
-5
common.ts
src/utils/common.ts
+11
-14
BrowsingHistory.vue
src/views/SellTemplate/components/BrowsingHistory.vue
+13
-2
CopyFile.vue
src/views/SellTemplate/components/CopyFile.vue
+253
-0
HistoricalVersion.vue
src/views/SellTemplate/components/HistoricalVersion.vue
+78
-14
TreeFile.vue
src/views/SellTemplate/components/TreeFile.vue
+15
-4
journeyAds.vue
src/views/SellTemplate/components/journeyAds.vue
+13
-2
No files found.
src/App.vue
View file @
fc933bf8
...
@@ -26,6 +26,7 @@ import { injectKeyTemplate } from '@/types/injectKey'
...
@@ -26,6 +26,7 @@ import { injectKeyTemplate } from '@/types/injectKey'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
domainManager
}
from
'@/utils/domainManager'
import
{
domainManager
}
from
'@/utils/domainManager'
import
{
enterFullscreen
,
exitFullscreen
,
isFullscreen
}
from
'@/utils/fullscreen'
import
{
enterFullscreen
,
exitFullscreen
,
isFullscreen
}
from
'@/utils/fullscreen'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
Editor
from
'./views/Editor/index.vue'
import
Editor
from
'./views/Editor/index.vue'
import
Screen
from
'./views/Screen/index.vue'
import
Screen
from
'./views/Screen/index.vue'
...
@@ -77,7 +78,7 @@ const userLoginHandler = async ()=>{
...
@@ -77,7 +78,7 @@ const userLoginHandler = async ()=>{
SalesTripId
=
param
.
SalesTripId
SalesTripId
=
param
.
SalesTripId
SellTemplateStore
.
setSalesTripId
(
SalesTripId
)
SellTemplateStore
.
setSalesTripId
(
SalesTripId
)
try
{
try
{
await
sell
GetTrip
Template
()
await
sell
Share
Template
()
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
ConfigIdStore
.
setConfigId
(
ConfigId
)
ConfigIdStore
.
setConfigId
(
ConfigId
)
...
@@ -86,6 +87,11 @@ const userLoginHandler = async ()=>{
...
@@ -86,6 +87,11 @@ const userLoginHandler = async ()=>{
if
(
param
.
uid
)
await
userStore
().
setUserLoginAsync
(
userId
)
if
(
param
.
uid
)
await
userStore
().
setUserLoginAsync
(
userId
)
if
(
ConfigId
>
0
&&
model
!=
2
)
await
GetTripConfig
(
ConfigId
)
if
(
ConfigId
>
0
&&
model
!=
2
)
await
GetTripConfig
(
ConfigId
)
}
catch
(
error
)
{}
}
catch
(
error
)
{}
if
(
param
.
ViewSlideshow
)
{
try
{
await
sellHistoryTripTemplate
(
param
.
sellId
)
}
catch
(
error
)
{}
}
if
(
userId
>
0
)
isFinish
.
value
=
true
if
(
userId
>
0
)
isFinish
.
value
=
true
if
(
!
ConfigId
&&!
model
&&
(
param
.
SalesTripId
&&
param
.
SalesTripId
==
''
))
ElMessageBox
.
confirm
(
if
(
!
ConfigId
&&!
model
&&
(
param
.
SalesTripId
&&
param
.
SalesTripId
==
''
))
ElMessageBox
.
confirm
(
'当前没有权限进行任何操作,请联系管理员!'
,
'当前没有权限进行任何操作,请联系管理员!'
,
...
@@ -105,8 +111,55 @@ onMounted(async () => {
...
@@ -105,8 +111,55 @@ onMounted(async () => {
mainStore
.
setAvailableFonts
()
mainStore
.
setAvailableFonts
()
})
})
// 销售模版数据
// 销售历史版本模版数据
const
sellGetTripTemplate
=
async
()
=>
{
const
sellHistoryTripTemplate
=
async
(
sellId
:
any
)
=>
{
const
loadingObj
=
ElLoading
.
service
({
text
:
'正在渲染数据'
,
lock
:
true
})
try
{
let
queryMsg
=
{
Id
:
sellId
}
let
dataRes
=
await
ConfigService
.
sellGetTemplateDetails
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
loadingObj
.
close
()
loading
.
value
=
false
isFinish
.
value
=
true
let
dataObj
=
dataRes
.
data
.
data
let
viewportRatios
=
1.414
if
(
dataObj
.
TemplateType
==
1
)
viewportRatios
=
0.7069
if
(
dataObj
.
Width
&&
dataObj
.
Height
)
{
viewportRatios
=
dataObj
.
Height
/
dataObj
.
Width
VIEWPORT_SIZE
.
Value
=
dataObj
.
Height
VIEWPORT_VER_SIZE
.
Value
=
dataObj
.
Width
}
else
{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
slidesStore
.
setViewportRatio
(
viewportRatios
)
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
newSlides
=
[]
await
SlidesData
.
forEach
((
x
,
i
)
=>
{
newSlides
.
push
(
x
)
})
slidesStore
.
setSlides
(
newSlides
)
slidesStore
.
updateSlideIndex
(
0
)
ScreenStore
.
setScreening
(
true
)
enterScreeningFromStart
}
else
{
loading
.
value
=
true
ShareTips
.
value
=
dataRes
.
data
.
message
loadingObj
.
close
()
}
}
catch
(
error
)
{
}
}
// 销售分享模版数据
const
sellShareTemplate
=
async
()
=>
{
const
loadingObj
=
ElLoading
.
service
({
const
loadingObj
=
ElLoading
.
service
({
text
:
'正在渲染数据'
,
text
:
'正在渲染数据'
,
...
@@ -124,9 +177,17 @@ const sellGetTripTemplate = async () =>{
...
@@ -124,9 +177,17 @@ const sellGetTripTemplate = async () =>{
isFinish
.
value
=
true
isFinish
.
value
=
true
let
dataObj
=
dataRes
.
data
.
data
let
dataObj
=
dataRes
.
data
.
data
let
viewportRatio
=
1.414
let
viewportRatio
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataObj
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
viewportRatio
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
if
(
dataObj
.
Width
&&
dataObj
.
Height
)
{
viewportRatio
=
dataObj
.
Height
/
dataObj
.
Width
VIEWPORT_SIZE
.
Value
=
dataObj
.
Height
VIEWPORT_VER_SIZE
.
Value
=
dataObj
.
Width
}
else
{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
slidesStore
.
setViewportRatio
(
viewportRatio
)
slidesStore
.
setViewportRatio
(
viewportRatio
)
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
newSlides
=
[]
let
newSlides
=
[]
await
SlidesData
.
forEach
((
x
,
i
)
=>
{
await
SlidesData
.
forEach
((
x
,
i
)
=>
{
...
...
src/utils/common.ts
View file @
fc933bf8
...
@@ -19,23 +19,20 @@ export const isPC = () => {
...
@@ -19,23 +19,20 @@ export const isPC = () => {
export
const
query
=
(
url
?:
string
)
=>
{
export
const
query
=
(
url
?:
string
)
=>
{
url
=
url
??
location
.
href
url
=
url
??
location
.
href
if
(
url
.
indexOf
(
process
.
env
.
VUE_APP_SHARE_URL
)
!=-
1
){
let
str
=
url
.
substr
(
url
.
indexOf
(
'?'
)
+
1
)
let
str
=
url
.
substr
(
url
.
indexOf
(
'?'
)
+
1
)
const
arr
=
str
.
split
(
'&'
)
let
json
=
{
let
json
=
{}
as
any
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
item
=
arr
[
i
].
split
(
'='
)
json
[
item
[
0
]]
=
item
[
1
]
}
if
(
url
.
indexOf
(
process
.
env
.
VUE_APP_SHARE_URL
)
!=-
1
&&!
json
.
ViewSlideshow
){
json
=
{
SalesTripId
:
str
.
slice
(
2
)
SalesTripId
:
str
.
slice
(
2
)
}
as
any
}
as
any
return
json
return
json
}
else
{
}
else
return
json
let
str
=
url
.
substr
(
url
.
indexOf
(
'?'
)
+
1
)
let
json
=
{}
as
any
const
arr
=
str
.
split
(
'&'
)
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
item
=
arr
[
i
].
split
(
'='
)
json
[
item
[
0
]]
=
item
[
1
]
}
return
json
}
}
}
/**
/**
...
...
src/views/SellTemplate/components/BrowsingHistory.vue
View file @
fc933bf8
...
@@ -136,7 +136,8 @@
...
@@ -136,7 +136,8 @@
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"Clock"
@
click
.
stop=
"history(item)"
>
历史版本
</el-dropdown-item>
<el-dropdown-item
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
v-if=
"item.IsShare"
icon=
"Hide"
@
click
.
stop=
"removeShareHandler(item)"
>
取消分享
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"CopyDocument"
@
click
.
stop=
"CopyTo(item)"
>
复制到
</el-dropdown-item>
<!--
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
-->
</el-dropdown-menu>
</el-dropdown-menu>
</
template
>
</
template
>
</el-dropdown>
</el-dropdown>
...
@@ -156,7 +157,7 @@
...
@@ -156,7 +157,7 @@
</div>
</div>
<el-divider
<el-divider
class=
"no-bg q-mt-lg"
class=
"no-bg q-mt-lg"
v-if=
"queryObj.pageCount == queryObj.pageIndex && !loading"
v-if=
"queryObj.pageCount == queryObj.pageIndex && !loading
&& queryObj.pageCount != 1
"
>
>
<span
<span
class=
"text-small bg-white"
class=
"text-small bg-white"
...
@@ -184,6 +185,10 @@
...
@@ -184,6 +185,10 @@
v-if=
"isHistoricalVersion"
v-if=
"isHistoricalVersion"
@
close=
"() => {journeyAdsDetails = '';isHistoricalVersion=false}"
@
close=
"() => {journeyAdsDetails = '';isHistoricalVersion=false}"
></HistoricalVersion>
></HistoricalVersion>
<CopyFile
v-if=
"isCopyTo"
:details=
"journeyAdsDetails"
@
close=
"() => {journeyAdsDetails = '';isCopyTo=false}"
></CopyFile>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -197,6 +202,7 @@
...
@@ -197,6 +202,7 @@
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
ShareForm
from
"./ShareForm.vue"
;
import
ShareForm
from
"./ShareForm.vue"
;
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
HistoricalVersion
from
"./HistoricalVersion.vue"
;
import
CopyFile
from
"./CopyFile.vue"
;
const
SalesEditorStore
=
useSellTemplateStore
();
const
SalesEditorStore
=
useSellTemplateStore
();
const
marketStore
=
useScreenStore
();
const
marketStore
=
useScreenStore
();
...
@@ -211,6 +217,7 @@
...
@@ -211,6 +217,7 @@
const
shareId
=
ref
(
0
);
const
shareId
=
ref
(
0
);
const
journeyAdsDetails
=
ref
(
''
);
const
journeyAdsDetails
=
ref
(
''
);
const
isHistoricalVersion
=
ref
(
false
);
const
isHistoricalVersion
=
ref
(
false
);
const
isCopyTo
=
ref
(
false
);
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
showHistory
=
ref
(
true
);
const
showHistory
=
ref
(
true
);
const
isIndeterminate
=
ref
(
false
);
const
isIndeterminate
=
ref
(
false
);
...
@@ -246,6 +253,10 @@
...
@@ -246,6 +253,10 @@
const
loading
=
ref
(
false
as
any
);
const
loading
=
ref
(
false
as
any
);
const
SellTemplateRef
=
ref
<
any
>
();
const
SellTemplateRef
=
ref
<
any
>
();
const
CopyTo
=
(
row
:
any
)
=>
{
isCopyTo
.
value
=
true
journeyAdsDetails
.
value
=
row
}
const
clickSort
=
(
type
:
any
)
=>
{
const
clickSort
=
(
type
:
any
)
=>
{
if
(
datas
.
Sort
==
0
)
copyDataList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
.
value
))
if
(
datas
.
Sort
==
0
)
copyDataList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
.
value
))
// 1降序 2升序
// 1降序 2升序
...
...
src/views/SellTemplate/components/CopyFile.vue
0 → 100644
View file @
fc933bf8
<
template
>
<el-dialog
v-model=
"show"
v-loading=
"loading"
:show-close=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
style=
"width: 260px;"
>
<template
#
header
>
<div
class=
"row overflow-hide"
@
click=
"OffEdit"
>
<div>
<img
v-if=
"details.FileType>0"
class=
"q-px-md"
:src=
"details.FileType==1?datas.pdfImg:datas.adsImg"
style=
"height: 43px;"
/>
<img
v-else
class=
"q-px-md"
src=
"@/assets/img/file.png"
style=
"height: 43px;"
/>
</div>
<div
class=
"q-pl-md col"
>
<div
class=
"row flex-center"
>
<el-tooltip
v-if=
"!datas.editTitle"
placement=
"top-start"
>
<template
#
content
><div
class=
"text-center"
style=
"width: 200px;"
>
{{
details
.
FileName
}}
</div></
template
>
<div
class=
"TreeFile-Title pointer"
@
click
.
stop=
"datas.editTitle=true"
>
{{details.FileName}}
</div>
</el-tooltip>
<el-input
class=
"journeyAds-Input"
v-model=
"details.FileName"
autosize
type=
"textarea"
placeholder=
"Please input"
maxlength=
"500"
size=
"small"
v-if=
"datas.editTitle"
@
blur=
"handleUpdateTitle"
/>
</div>
<div
class=
"text-small text-5B5D62 q-pt-sm"
>
创建者:{{details.CreateName}}
</div>
</div>
</div>
</template>
<div
class=
"TreeFile-container"
@
click=
"OffEdit"
>
<el-tree-select
placeholder=
"请选择文件"
node-key=
"FileId"
:props=
"defaultProps"
v-model=
"datas.FolderId"
:data=
"dataList"
default-expand-all
check-strictly
:render-after-expand=
"false"
style=
"width: 220px"
:filter-node-method=
"filterNode"
@
check=
"handleTreeNodeClick"
/>
</div>
<
template
#
footer
>
<div
@
click=
"OffEdit"
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"()=>closedhandler()"
>
关闭
</el-button>
<el-button
type=
"primary"
@
click=
"()=>save()"
>
保存复制
</el-button>
</span>
</div>
</
template
>
</el-dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
ApiResult
}
from
'@/configs/axios'
;
import
OrgService
from
'@/services/OrgService'
;
import
{
ref
,
reactive
,
watch
}
from
'vue'
;
import
{
View
,
Download
,
EditPen
,
Delete
}
from
'@element-plus/icons-vue'
;
import
{
ElMessage
,
ElTree
}
from
'element-plus'
;
import
FolderService
from
"@/services/FolderService"
;
const
props
=
defineProps
({
details
:{
type
:
Object
,
required
:
''
},
fileType
:
{
type
:
Number
,
required
:
1
}
})
const
emit
=
defineEmits
<
{
(
event
:
'close'
):
void
,
(
event
:
'success'
):
void
}
>
()
interface
Tree
{
[
key
:
string
]:
any
}
const
filterText
=
ref
(
''
)
const
treeRef
=
ref
<
InstanceType
<
typeof
ElTree
>>
()
const
defaultProps
=
{
children
:
'ChildList'
,
label
:
'FileName'
,
disabled
:
'disabled'
,
}
const
datas
=
reactive
({
pdfImg
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708337830000_43.png'
,
adsImg
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png'
,
fileList
:
[]
as
Tree
[],
FolderId
:
null
as
Number
,
FolderObj
:
{},
checkedKeys
:
null
as
any
,
editTitle
:
false
,
})
const
show
=
ref
(
true
)
const
loading
=
ref
(
true
)
const
deleteLoading
=
ref
<
any
>
(
null
);
const
dataList
=
ref
([])
const
OffEdit
=
()
=>
{
datas
.
editTitle
=
false
}
const
handleUpdateTitle
=
()
=>
{
OffEdit
()
}
const
closedhandler
=
()
=>
{
emit
(
'close'
)
}
const
handleTreeNodeClick
=
(
data
:
any
,
checkObj
:
any
)
=>
{
OffEdit
()
if
(
checkObj
.
checkedKeys
.
length
!=
0
)
{
datas
.
FolderObj
=
data
}
}
const
filterNode
=
(
value
:
string
,
data
:
Tree
)
=>
{
if
(
!
value
)
return
true
return
data
.
FileName
.
includes
(
value
)
}
const
save
=
()
=>
{
return
let
title
=
''
let
FileList
=
[]
if
(
!
props
.
details
)
{
title
=
` 12121 `
FileList
=
[]
}
else
{
title
=
props
.
details
.
FileName
FileList
.
push
({
FileId
:
props
.
details
.
FileId
,
FileType
:
props
.
details
.
FileType
})
}
ElMessageBox
.
confirm
(
`此操作将
${
title
}
移动到
${
datas
.
FolderObj
.
FileName
}
,是否确定?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(
async
()
=>
{
try
{
let
queryMsg
=
{
FileList
:
FileList
,
TargetFolderId
:
datas
.
FolderId
,
};
deleteLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
text
:
"正在处理"
,
});
let
pageRes
=
await
FolderService
.
UpdateTripOtherFolder
(
queryMsg
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
ElMessage
({
showClose
:
true
,
message
:
`移动文件成功`
,
type
:
"success"
,
});
emit
(
'close'
)
emit
(
'success'
)
}
else
{
ElMessage
({
showClose
:
true
,
message
:
`移动文件失败`
,
type
:
"warning"
,
});
}
deleteLoading
.
value
.
close
();
deleteLoading
.
value
=
null
;
}
catch
(
error
)
{}
})
.
catch
(()
=>
{});
}
const
getFile
=
async
()
=>
{
let
querys
=
{
FileType
:
props
.
fileType
}
let
pageRes
=
await
FolderService
.
GetMyFolderTree
(
querys
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
dataList
.
value
=
pageRes
.
data
.
data
recursive
(
dataList
.
value
)
}
}
const
recursive
=
(
arrs
:
Array
,
disabled
:
any
)
=>
{
let
isDisableds
:
Boolean
if
(
arrs
.
length
>
0
)
arrs
.
forEach
(
x
=>
{
isDisableds
=
false
Object
.
assign
(
x
,{
disabled
:
isDisableds
})
if
(
x
.
ChildList
.
length
>
0
){
recursionChild
(
x
,
isDisableds
)
}
})
else
{
isDisableds
=
false
Object
.
assign
(
arrs
,{
disabled
:
isDisableds
})
}
}
const
recursionChild
=
(
arrs
:
any
,
disabled
:
any
)
=>
{
if
(
arrs
&&
arrs
.
ChildList
.
length
>
0
)
{
recursive
(
arrs
.
ChildList
,
disabled
)
}
}
watch
(
filterText
,
(
val
)
=>
{
treeRef
.
value
!
.
filter
(
val
)
})
getFile
()
</
script
>
<
style
scoped
>
.TreeFile-Title
{
width
:
100%
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
font-size
:
15px
;
position
:
relative
;
}
.TreeFile-Title.text-sm
{
font-size
:
12px
;
}
.TreeFile-container
th
{
padding
:
0
10px
5px
10px
;
border-bottom
:
1px
solid
#f6f6f6
;
background
:
#fff
;
position
:
sticky
;
top
:
0px
;
z-index
:
2
;
}
.TreeFile-container
td
{
padding
:
8px
10px
;
border-bottom
:
1px
solid
#f6f6f6
;
}
.TreeFile-table
{
}
</
style
>
\ No newline at end of file
src/views/SellTemplate/components/HistoricalVersion.vue
View file @
fc933bf8
<
template
>
<
template
>
<el-dialog
v-model=
"show"
v-loading=
"loading"
:show-close=
"false"
<el-dialog
v-model=
"show"
v-loading=
"loading"
:show-close=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
:close-on-click-modal=
"false"
style=
"width:
5
00px;"
>
style=
"width:
6
00px;"
>
<template
#
header
>
<template
#
header
>
<div
class=
"row overflow-hide"
>
<div
class=
"row overflow-hide"
>
<div>
<div>
...
@@ -32,20 +32,36 @@
...
@@ -32,20 +32,36 @@
<th
class=
"text-light"
style=
"min-width: 100px;width: 100px;"
><span
>
更新者
</span></th>
<th
class=
"text-light"
style=
"min-width: 100px;width: 100px;"
><span
>
更新者
</span></th>
<th
class=
"text-light"
style=
"min-width: 80px;width: 80px;"
>
大小
</th>
<th
class=
"text-light"
style=
"min-width: 80px;width: 80px;"
>
大小
</th>
<th
class=
"text-light"
>
版本名称
</th>
<th
class=
"text-light"
>
版本名称
</th>
<
!-- <th class="text-light" style="min-width: 120px;width: 120px;">操作</th> --
>
<
th
class=
"text-light text-center"
style=
"min-width: 120px;width: 120px;"
>
操作
</th
>
</tr>
</tr>
<
template
v-for=
"(item,index) in dataList"
>
<
template
v-for=
"(item,index) in dataList"
>
<tr
class=
"
text-5B5D62
HistoricalVersion-table pointer"
>
<tr
class=
"HistoricalVersion-table pointer"
>
<td
class=
"text-light"
>
<td
class=
"text-light
text-5B5D62
"
>
<span
class=
"text-bold"
>
{{
item
.
UpdateTime
.
substr
(
0
,
11
)
}}
</span>
<span
class=
"text-bold"
>
{{
item
.
UpdateTime
.
substr
(
0
,
11
)
}}
</span>
<span
class=
"q-pl-md q-pt-sm"
>
{{
item
.
UpdateTime
.
substr
(
11
,
19
)
}}
</span>
<span
class=
"q-pl-md q-pt-sm"
>
{{
item
.
UpdateTime
.
substr
(
11
,
19
)
}}
</span>
</td>
</td>
<td
class=
"HistoricalVersion-title text-light wrap"
>
<td
class=
"HistoricalVersion-title text-light wrap
text-5B5D62
"
>
<span>
{{
item
.
CreateByName
}}
</span>
<span>
{{
item
.
CreateByName
}}
</span>
</td>
</td>
<td
class=
"text-light"
><span>
{{
item
.
FileSize
}}
KB
</span></td>
<td
class=
"text-light text-5B5D62"
><span>
{{
item
.
FileSize
}}
KB
</span></td>
<td
class=
"text-light"
><span>
{{
item
.
Title
}}
</span></td>
<td
class=
"text-light"
>
<!--
<td
class=
"text-center"
></td>
-->
<span
:class=
"[item.NewTitle?'active':'text-5B5D62']"
>
{{
item
.
NewTitle
?
item
.
NewTitle
:
item
.
Title
}}
</span>
</td>
<td
class=
"text-center"
>
<span
class=
"hoverShow"
>
<el-button
type=
"primary"
icon=
"View"
size=
"small"
@
click
.
stop=
"clickControls(item)"
>
查看
</el-button>
<el-dropdown
class=
"q-pl-md"
trigger=
"click"
>
<el-icon
size=
"16"
color=
"#b1b7cf"
><MoreFilled
/></el-icon>
<template
#
dropdown
>
<el-dropdown-menu
class=
"q-pa-md"
@
click
.
stop=
"OffEdit"
>
<el-dropdown-item
icon=
"EditPen"
@
click
.
stop=
"clickControls(item,1)"
>
另存
</el-dropdown-item>
<el-dropdown-item
icon=
"Clock"
@
click
.
stop=
"clickControls(item,2)"
>
替换
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</span>
</td>
</tr>
</tr>
</template>
</template>
</table>
</table>
...
@@ -53,7 +69,7 @@
...
@@ -53,7 +69,7 @@
style=
"padding: 0 10px;"
>
style=
"padding: 0 10px;"
>
<el-empty
:image-size=
"60"
description=
"暂无数据"
/>
<el-empty
:image-size=
"60"
description=
"暂无数据"
/>
</div>
</div>
<el-divider
class=
"no-bg q-mt-lg"
v-if=
'dataList.length>0
&&queryObj.pageCount == queryObj.pageIndex && !loading
'
>
<el-divider
class=
"no-bg q-mt-lg"
v-if=
'dataList.length>0
&& queryObj.pageCount == queryObj.pageIndex && !loading && queryObj.pageCount != 1
'
>
<span
class=
"text-small bg-white"
style=
"padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
<span
class=
"text-small bg-white"
style=
"padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
</el-divider>
</el-divider>
<div
v-if=
"loading"
style=
"height:40px;"
class=
"q-mt-md no-bg"
background=
"transparent"
v-loading=
"loading"
element-loading-text=
"正在加载中"
></div>
<div
v-if=
"loading"
style=
"height:40px;"
class=
"q-mt-md no-bg"
background=
"transparent"
v-loading=
"loading"
element-loading-text=
"正在加载中"
></div>
...
@@ -70,10 +86,12 @@
...
@@ -70,10 +86,12 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ApiResult
}
from
'@/configs/axios'
;
import
{
ApiResult
}
from
'@/configs/axios'
;
import
OrgService
from
'@/services/OrgService'
;
import
OrgService
from
'@/services/OrgService'
;
import
{
ref
,
reactive
}
from
'vue'
;
import
{
ref
,
reactive
,
provide
}
from
'vue'
;
import
{
View
,
Download
,
EditPen
,
Delete
}
from
'@element-plus/icons-vue'
;
import
{
View
,
Download
,
EditPen
,
Delete
}
from
'@element-plus/icons-vue'
;
import
{
ElMessage
}
from
'element-plus'
;
import
{
ElMessage
}
from
'element-plus'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
{
isPC
,
query
}
from
'@/utils/common'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
const
props
=
defineProps
({
const
props
=
defineProps
({
id
:{
id
:{
...
@@ -93,17 +111,49 @@ import ConfigService from '@/services/ConfigService';
...
@@ -93,17 +111,49 @@ import ConfigService from '@/services/ConfigService';
adsImg
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png'
,
adsImg
:
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1708250377000_777.png'
,
})
})
const
searchData
=
ref
({}
as
any
)
provide
(
injectKeyTemplate
,
searchData
)
const
show
=
ref
(
true
)
const
show
=
ref
(
true
)
const
loading
=
ref
(
true
)
const
loading
=
ref
(
true
)
const
HistoricalVersion
=
ref
<
any
>
()
const
HistoricalVersion
=
ref
<
any
>
()
const
copyDataList
=
ref
([]
as
Array
<
any
>
);
const
queryObj
=
reactive
({
const
queryObj
=
reactive
({
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
1
0
,
pageSize
:
3
0
,
pageCount
:
0
,
//总页数
pageCount
:
0
,
//总页数
FileId
:
props
.
details
.
FileId
,
FileId
:
props
.
details
.
FileId
,
UpdateTime
:
''
})
})
const
dataList
=
ref
([])
const
dataList
=
ref
([])
const
clickControls
=
(
row
:
any
,
type
:
any
)
=>
{
if
(
type
){
}
else
{
let
param
=
query
()
const
url
=
`
${
process
.
env
.
VUE_APP_SHARE_URL
}
/?uid=
${
param
.
uid
}
&sellId=
${
row
.
FileId
}
&ViewSlideshow=1`
window
.
open
(
url
);
}
}
const
getSort
=
()
=>
{
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
.
value
))
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
for
(
let
j
=
i
;
j
<
list
.
length
;
j
++
){
let
time
time
=
new
Date
(
list
[
j
].
UpdateTime
.
replace
(
/-/
,
'/'
))
-
new
Date
(
list
[
i
].
UpdateTime
.
replace
(
/-/
,
'/'
))
if
(
time
>
0
){
let
listObj
=
list
[
i
];
list
[
i
]
=
list
[
j
];
list
[
j
]
=
listObj
;
}
}
}
datas
.
UpdateTime
=
list
[
0
].
UpdateTime
for
(
let
i
=
0
;
i
<
dataList
.
value
.
length
;
i
++
){
if
(
dataList
.
value
[
i
].
UpdateTime
==
datas
.
UpdateTime
)
dataList
.
value
[
i
].
NewTitle
=
'当前版本'
}
}
const
closedhandler
=
()
=>
{
const
closedhandler
=
()
=>
{
emit
(
'close'
)
emit
(
'close'
)
}
}
...
@@ -113,8 +163,16 @@ import ConfigService from '@/services/ConfigService';
...
@@ -113,8 +163,16 @@ import ConfigService from '@/services/ConfigService';
if
(
queryObj
.
pageIndex
==
1
)
dataList
.
value
=
[]
if
(
queryObj
.
pageIndex
==
1
)
dataList
.
value
=
[]
let
pageRes
=
await
ConfigService
.
GetFileHistory
(
queryObj
);
let
pageRes
=
await
ConfigService
.
GetFileHistory
(
queryObj
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
if
(
pageRes
.
data
.
resultCode
==
1
)
{
let
arrList
=
function
(
list
)
{
list
.
forEach
((
x
)
=>
{
x
.
NewTitle
=
''
});
};
arrList
(
pageRes
.
data
.
data
.
pageData
);
dataList
.
value
=
dataList
.
value
.
concat
(
pageRes
.
data
.
data
.
pageData
);
dataList
.
value
=
dataList
.
value
.
concat
(
pageRes
.
data
.
data
.
pageData
);
copyDataList
.
value
=
dataList
.
value
queryObj
.
pageCount
=
pageRes
.
data
.
data
.
pageCount
;
queryObj
.
pageCount
=
pageRes
.
data
.
data
.
pageCount
;
getSort
()
}
}
loading
.
value
=
false
loading
.
value
=
false
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -135,7 +193,7 @@ import ConfigService from '@/services/ConfigService';
...
@@ -135,7 +193,7 @@ import ConfigService from '@/services/ConfigService';
querySearchHandler
()
querySearchHandler
()
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.HistoricalVersion-Title
{
.HistoricalVersion-Title
{
width
:
100%
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -156,7 +214,13 @@ import ConfigService from '@/services/ConfigService';
...
@@ -156,7 +214,13 @@ import ConfigService from '@/services/ConfigService';
padding
:
8px
10px
;
padding
:
8px
10px
;
border-bottom
:
1px
solid
#f6f6f6
;
border-bottom
:
1px
solid
#f6f6f6
;
}
}
.HistoricalVersion-table
{
.hoverShow
{
opacity
:
0
;
}
.HistoricalVersion-table
:hover
.hoverShow
{
opacity
:
1
;
}
.active
{
color
:
$themeColor
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/SellTemplate/components/TreeFile.vue
View file @
fc933bf8
...
@@ -25,12 +25,12 @@
...
@@ -25,12 +25,12 @@
创建者:
{{
details
.
CreateName
}}
创建者:
{{
details
.
CreateName
}}
</
template
>
</
template
>
<div
v-else
class=
"row items-center"
>
<div
v-else
class=
"row items-center"
>
<el-tooltip
<
!-- <
el-tooltip
placement="top-start">
placement="top-start">
<template #content><div class="text-center" style="width: 200px;">移动文件 {{selectedDatas.join(',')}}</div></template>
<template #content><div class="text-center" style="width: 200px;">移动文件 {{selectedDatas.join(',')}}</div></template>
<div class="TreeFile-Title text-sm pointer">移动文件 {{selectedDatas.join(',')}}</div>
<div class="TreeFile-Title text-sm pointer">移动文件 {{selectedDatas.join(',')}}</div>
</el-tooltip>
</el-tooltip>
-->
<div
class=
"TreeFile-Title text-sm pointer"
>
批量移动文件
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -123,6 +123,7 @@ import FolderService from "@/services/FolderService";
...
@@ -123,6 +123,7 @@ import FolderService from "@/services/FolderService";
FolderObj
:
{},
FolderObj
:
{},
checkedKeys
:
null
as
any
checkedKeys
:
null
as
any
})
})
datas
.
FolderId
=
props
.
details
?
props
.
details
.
ParentFileId
:
props
.
setFileList
[
0
].
ParentFileId
const
show
=
ref
(
true
)
const
show
=
ref
(
true
)
const
loading
=
ref
(
true
)
const
loading
=
ref
(
true
)
const
deleteLoading
=
ref
<
any
>
(
null
);
const
deleteLoading
=
ref
<
any
>
(
null
);
...
@@ -153,7 +154,15 @@ import FolderService from "@/services/FolderService";
...
@@ -153,7 +154,15 @@ import FolderService from "@/services/FolderService";
let
title
=
''
let
title
=
''
let
FileList
=
[]
let
FileList
=
[]
if
(
!
props
.
details
)
{
if
(
!
props
.
details
)
{
title
=
`文件ID
${
props
.
selectedDatas
.
join
(
','
)}
`
title
=
`批量`
for
(
let
i
=
0
;
i
<
props
.
setFileList
.
length
;
i
++
){
FileList
.
push
(
{
FileId
:
props
.
setFileList
[
i
].
FileId
,
FileType
:
props
.
setFileList
[
i
].
FileType
}
)
}
FileList
=
props
.
setFileList
FileList
=
props
.
setFileList
}
else
{
}
else
{
title
=
props
.
details
.
FileName
title
=
props
.
details
.
FileName
...
@@ -214,6 +223,7 @@ import FolderService from "@/services/FolderService";
...
@@ -214,6 +223,7 @@ import FolderService from "@/services/FolderService";
const
recursive
=
(
arrs
:
Array
,
disabled
:
any
)
=>
{
const
recursive
=
(
arrs
:
Array
,
disabled
:
any
)
=>
{
console
.
log
(
props
.
setFileList
[
0
],
'====='
)
let
isDisableds
:
Boolean
let
isDisableds
:
Boolean
if
(
arrs
.
length
>
0
)
arrs
.
forEach
(
x
=>
{
if
(
arrs
.
length
>
0
)
arrs
.
forEach
(
x
=>
{
isDisableds
=
(
props
.
selectedDatas
.
indexOf
(
x
.
FileId
)
!=-
1
&&!
props
.
details
)
||
props
.
details
.
FileId
==
x
.
FileId
||
disabled
?
true
:
false
isDisableds
=
(
props
.
selectedDatas
.
indexOf
(
x
.
FileId
)
!=-
1
&&!
props
.
details
)
||
props
.
details
.
FileId
==
x
.
FileId
||
disabled
?
true
:
false
...
@@ -223,6 +233,7 @@ import FolderService from "@/services/FolderService";
...
@@ -223,6 +233,7 @@ import FolderService from "@/services/FolderService";
if
(
props
.
setFileList
[
i
].
FileType
&&
props
.
setFileList
[
i
].
FileId
==
x
.
FileId
)
isDisableds
=
false
if
(
props
.
setFileList
[
i
].
FileType
&&
props
.
setFileList
[
i
].
FileId
==
x
.
FileId
)
isDisableds
=
false
}
}
}
}
if
((
props
.
details
.
ParentFileId
!=
undefined
&&
props
.
details
&&
x
.
FileId
==
props
.
details
.
ParentFileId
)
||
(
props
.
setFileList
.
length
>
0
&&
props
.
setFileList
[
0
].
ParentFileId
==
x
.
FileId
))
datas
.
FolderObj
=
x
Object
.
assign
(
x
,{
disabled
:
isDisableds
})
Object
.
assign
(
x
,{
disabled
:
isDisableds
})
if
(
x
.
ChildList
.
length
>
0
){
if
(
x
.
ChildList
.
length
>
0
){
recursionChild
(
x
,
isDisableds
)
recursionChild
(
x
,
isDisableds
)
...
...
src/views/SellTemplate/components/journeyAds.vue
View file @
fc933bf8
...
@@ -152,7 +152,8 @@
...
@@ -152,7 +152,8 @@
<el-dropdown-item
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
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=
"Expand"
@
click
.
stop=
"MoveFile(item)"
>
移动至
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
<el-dropdown-item
v-if=
"item.FileType"
icon=
"CopyDocument"
@
click
.
stop=
"CopyTo(item)"
>
复制到
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(item,1)"
>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</
template
>
</
template
>
</el-dropdown>
</el-dropdown>
...
@@ -222,6 +223,10 @@
...
@@ -222,6 +223,10 @@
datas.selectAll = false;
datas.selectAll = false;
datas.selectedDatas = [];
datas.selectedDatas = [];
refreshHandler()}"
></TreeFile>
refreshHandler()}"
></TreeFile>
<CopyFile
v-if=
"isCopyTo"
:details=
"journeyAdsDetails"
@
close=
"() => {journeyAdsDetails = '';isCopyTo=false}"
></CopyFile>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
}
from
"vue"
;
import
{
ref
,
reactive
,
provide
,
watch
,
inject
,
onMounted
}
from
"vue"
;
...
@@ -252,6 +257,7 @@ const PopoverVisibleControls = ref(false);
...
@@ -252,6 +257,7 @@ const PopoverVisibleControls = ref(false);
const
shareId
=
ref
(
0
);
const
shareId
=
ref
(
0
);
const
journeyAdsDetails
=
ref
(
''
);
const
journeyAdsDetails
=
ref
(
''
);
const
isHistoricalVersion
=
ref
(
false
);
const
isHistoricalVersion
=
ref
(
false
);
const
isCopyTo
=
ref
(
false
);
const
isTreeFile
=
ref
(
false
)
const
isTreeFile
=
ref
(
false
)
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
Navigations
=
ref
([]
as
Array
<
any
>
);
const
showHistory
=
ref
(
true
);
const
showHistory
=
ref
(
true
);
...
@@ -298,6 +304,10 @@ const editObj = reactive({});
...
@@ -298,6 +304,10 @@ const editObj = reactive({});
const
loading
=
ref
(
false
as
any
);
const
loading
=
ref
(
false
as
any
);
const
SellTemplateRef
=
ref
<
any
>
();
const
SellTemplateRef
=
ref
<
any
>
();
const
CopyTo
=
(
row
:
any
)
=>
{
isCopyTo
.
value
=
true
journeyAdsDetails
.
value
=
row
}
const
clickSort
=
(
type
:
any
)
=>
{
const
clickSort
=
(
type
:
any
)
=>
{
if
(
datas
.
Sort
==
0
)
copyDataList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
.
value
))
if
(
datas
.
Sort
==
0
)
copyDataList
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
dataList
.
value
))
// 1降序 2升序
// 1降序 2升序
...
@@ -367,7 +377,8 @@ const MoveFile = (item:any) => {
...
@@ -367,7 +377,8 @@ const MoveFile = (item:any) => {
datas
.
setFileList
.
push
(
datas
.
setFileList
.
push
(
{
{
FileId
:
dataList
.
value
[
i
].
FileId
,
FileId
:
dataList
.
value
[
i
].
FileId
,
FileType
:
dataList
.
value
[
i
].
FileType
FileType
:
dataList
.
value
[
i
].
FileType
,
ParentFileId
:
dataList
.
value
[
i
].
ParentFileId
}
}
)
)
}
}
...
...
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