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
6f0439ab
Commit
6f0439ab
authored
Mar 01, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表同步状态
parent
bfc5e196
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
159 additions
and
74 deletions
+159
-74
common.css
src/assets/styles/common.css
+12
-0
ConfigService.ts
src/services/ConfigService.ts
+7
-0
UploadPicture.vue
src/views/Editor/CanvasTool/UploadPicture.vue
+61
-61
index.vue
src/views/Editor/EditorHeader/index.vue
+0
-1
index.vue
src/views/Editor/Thumbnails/index.vue
+16
-6
journeyAdsList.vue
src/views/SellTemplate/components/journeyAdsList.vue
+62
-4
journeyAds.vue
src/views/SellTemplate/journeyAds.vue
+1
-2
No files found.
src/assets/styles/common.css
View file @
6f0439ab
...
...
@@ -305,6 +305,15 @@ page {
padding-left
:
10px
;
padding-right
:
10px
;
}
.q-pr-sm
{
padding-right
:
5px
;
}
.q-pr-md
{
padding-right
:
10px
;
}
.q-pl-sm
{
padding-left
:
5px
;
}
.q-pl-md
{
padding-left
:
10px
;
}
...
...
@@ -338,6 +347,9 @@ page {
.q-pt-lg
{
padding-top
:
20px
;
}
.q-pt-xs
{
padding-top
:
5px
;
}
.q-pt-sm
{
padding-top
:
8px
;
}
...
...
src/services/ConfigService.ts
View file @
6f0439ab
...
...
@@ -5,6 +5,13 @@ import Api,{ HttpResponse, Result } from './../utils/request';
*/
class
ConfigService
{
/**
* 手动生成行程文件
*/
static
async
CreateTripFile
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_CreateTripFile"
,
params
)
}
/**
* 获取行程广告最近版本
*/
...
...
src/views/Editor/CanvasTool/UploadPicture.vue
View file @
6f0439ab
...
...
@@ -227,76 +227,76 @@ const setImgs = async () => {
maxWidth
=
VIEWPORT_VER_SIZE
.
Value
maxHeight
=
VIEWPORT_SIZE
.
Value
}
if
(
activeName
.
value
==
'1'
||
activeName
.
value
==
'3'
||
activeName
.
value
==
'4'
){
let
tempSize
=
downloadInfo
if
(
activeName
.
value
!=
'4'
)
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
propsDatas
.
value
.
src
)
if
(
tempSize
.
width
>
maxWidth
){
let
ratio
=
maxWidth
/
tempSize
.
width
tempSize
.
width
=
maxWidth
tempSize
.
height
=
tempSize
.
height
*
ratio
}
if
(
tempSize
.
height
>
maxHeight
){
let
ratio
=
maxHeight
/
tempSize
.
height
tempSize
.
height
=
maxHeight
tempSize
.
width
=
tempSize
.
width
*
ratio
}
if
(
tempSize
.
width
!=
width
){
let
ratio
=
width
/
tempSize
.
width
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
tempSize
.
height
<
height
){
let
ratio
=
height
/
tempSize
.
height
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
tempSize
.
width
)
{
propsDatas
.
value
.
left
-=
(
tempSize
.
width
-
width
)
/
2
propsDatas
.
value
.
top
-=
(
tempSize
.
height
-
height
)
/
2
propsDatas
.
value
.
width
=
tempSize
.
width
propsDatas
.
value
.
height
=
tempSize
.
height
}
setPropsDatas
(
tempSize
)
}
else
{
var
img
=
new
Image
()
img
.
src
=
propsDatas
.
value
.
src
img
.
onload
=
()
=>
{
if
(
img
.
width
>
maxWidth
){
let
ratio
=
maxWidth
/
img
.
width
img
.
width
=
maxWidth
img
.
height
=
img
.
height
*
ratio
}
if
(
img
.
height
>
maxHeight
){
let
ratio
=
maxHeight
/
img
.
height
img
.
height
=
maxHeight
img
.
width
=
img
.
width
*
ratio
}
if
(
img
.
width
!=
width
){
let
ratio
=
width
/
img
.
width
img
.
width
=
Math
.
ceil
(
img
.
width
*
ratio
)
img
.
height
=
Math
.
ceil
(
img
.
height
*
ratio
)
}
if
(
img
.
height
<
height
){
let
ratio
=
height
/
img
.
height
img
.
width
=
Math
.
ceil
(
img
.
width
*
ratio
)
img
.
height
=
Math
.
ceil
(
img
.
height
*
ratio
)
}
if
(
img
.
width
)
{
propsDatas
.
value
.
left
-=
(
img
.
width
-
width
)
/
2
propsDatas
.
value
.
top
-=
(
img
.
height
-
height
)
/
2
propsDatas
.
value
.
width
=
img
.
width
propsDatas
.
value
.
height
=
img
.
height
}
}
const
image
=
new
Image
()
new
Promise
((
resolve
,
reject
)
=>
{
image
.
onload
=
()
=>
{
resolve
({
width
:
image
.
width
,
height
:
image
.
height
});
URL
.
revokeObjectURL
(
propsDatas
.
value
.
src
);
};
image
.
onerror
=
reject
;
image
.
src
=
propsDatas
.
value
.
src
;
});
setPropsDatas
(
image
)
}
propsDatas
.
value
.
fixedRatio
=
true
slidesStore
.
updateElement
({
id
:
handleElementId
.
value
,
props
:
propsDatas
.
value
})
addHistorySnapshot
()
close
()
}
}
const
setPropsDatas
=
(
image
:
any
)
=>
{
let
width
=
handleImageElement
.
value
.
width
let
height
=
handleImageElement
.
value
.
height
let
maxWidth
=
VIEWPORT_SIZE
,
maxHeight
=
VIEWPORT_VER_SIZE
.
Value
,
viewportRatio
=
slidesStore
.
viewportRatio
if
(
viewportRatio
<
1
){
maxWidth
=
VIEWPORT_VER_SIZE
.
Value
maxHeight
=
VIEWPORT_SIZE
.
Value
}
if
(
image
.
width
>
maxWidth
){
let
ratio
=
maxWidth
/
img
.
width
image
.
width
=
maxWidth
image
.
height
=
img
.
height
*
ratio
}
if
(
image
.
height
>
maxHeight
){
let
ratio
=
maxHeight
/
image
.
height
image
.
height
=
maxHeight
image
.
width
=
image
.
width
*
ratio
}
if
(
width
>
height
){
let
ratio
=
width
/
image
.
width
image
.
width
=
Math
.
ceil
(
image
.
width
*
ratio
)
image
.
height
=
Math
.
ceil
(
image
.
height
*
ratio
)
}
if
(
width
<
height
){
let
ratio
=
height
/
image
.
height
image
.
width
=
Math
.
ceil
(
image
.
width
*
ratio
)
image
.
height
=
Math
.
ceil
(
image
.
height
*
ratio
)
}
if
(
image
.
height
<
height
){
let
ratio
=
height
/
image
.
height
image
.
width
=
Math
.
ceil
(
image
.
width
*
ratio
)
image
.
height
=
Math
.
ceil
(
image
.
height
*
ratio
)
}
if
(
image
.
width
<
width
){
let
ratio
=
width
/
image
.
width
image
.
width
=
Math
.
ceil
(
image
.
width
*
ratio
)
image
.
height
=
Math
.
ceil
(
image
.
height
*
ratio
)
}
if
(
image
.
width
)
{
if
(
image
.
width
>
image
.
height
)
propsDatas
.
value
.
left
-=
(
image
.
width
-
width
)
/
2
if
(
image
.
width
<
image
.
height
)
propsDatas
.
value
.
top
-=
(
image
.
height
-
height
)
/
2
propsDatas
.
value
.
width
=
image
.
width
propsDatas
.
value
.
height
=
image
.
height
}
propsDatas
.
value
.
fixedRatio
=
true
slidesStore
.
updateElement
({
id
:
handleElementId
.
value
,
props
:
propsDatas
.
value
})
addHistorySnapshot
()
close
()
}
const
getImgs
=
(
item
:
any
,
index
:
number
)
=>
{
datas
.
imgList
.
forEach
(
x
=>
{
x
.
show
=
false
})
...
...
src/views/Editor/EditorHeader/index.vue
View file @
6f0439ab
...
...
@@ -313,7 +313,6 @@ const SetSellTemplate = async (type:Number,FolderId:Number) => {
}
journeyAdsDetails
.
value
=
''
isCopyTo
.
value
=
false
console
.
log
(
queryMsg
,
'------queryMsg销售保存'
)
let
TemplateRes
=
await
ConfigService
.
sellSetTemplate
(
queryMsg
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
ElMessage
({
...
...
src/views/Editor/Thumbnails/index.vue
View file @
6f0439ab
...
...
@@ -276,19 +276,29 @@ const GetTripFiledData = async () =>{
tempSize
.
height
=
maxHeight
tempSize
.
width
=
tempSize
.
width
*
ratio
}
if
(
tempSize
.
width
!=
width
){
let
ratio
=
width
/
tempSize
.
width
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
if
(
width
>
height
){
let
ratio
=
width
/
tempSize
.
width
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
width
<
height
){
let
ratio
=
height
/
tempSize
.
height
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
tempSize
.
height
<
height
){
let
ratio
=
height
/
tempSize
.
height
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
tempSize
.
width
<
width
){
let
ratio
=
width
/
tempSize
.
width
tempSize
.
width
=
Math
.
ceil
(
tempSize
.
width
*
ratio
)
tempSize
.
height
=
Math
.
ceil
(
tempSize
.
height
*
ratio
)
}
if
(
tempSize
.
width
){
y
.
left
-=
(
tempSize
.
width
-
width
)
/
2
y
.
top
-=
(
tempSize
.
height
-
height
)
/
2
if
(
tempSize
.
width
>
tempSize
.
height
)
y
.
left
-=
(
tempSize
.
width
-
width
)
/
2
if
(
tempSize
.
width
<
tempSize
.
height
)
y
.
top
-=
(
tempSize
.
height
-
height
)
/
2
y
.
width
=
tempSize
.
width
y
.
height
=
tempSize
.
height
}
...
...
src/views/SellTemplate/components/journeyAdsList.vue
View file @
6f0439ab
...
...
@@ -39,7 +39,7 @@
<span
class=
'text-waring'
@
click
.
stop=
"scope.row.FileType?OffEdit():editDelete(scope.row,2)"
>
{{
scope
.
row
.
FileName
}}
</span>
</
template
>
-->
<div
class=
"file-name"
v-html=
"queryObj.FileName!=''?(scope.row.FileName.replaceAll(queryObj.FileName,`<span class='text-waring'>${queryObj.FileName}</span>`)):scope.row.FileName"
@
click
.
stop=
"scope.row.FileType?OffEdit():editDelete(scope.row,2)"
></div>
@
click
.
stop=
"scope.row.FileType
>0
?OffEdit():editDelete(scope.row,2)"
></div>
</el-tooltip>
<el-input
class=
"journeyAds-Input"
...
...
@@ -62,8 +62,28 @@
</el-table-column>
<el-table-column
label=
"创建人"
prop=
""
width=
"180"
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
CreateName
}}
<span
class=
"text-info"
v-if=
"datas.loggedder!=scope.row.CreateName"
>
分享的
</span>
<span
class=
"row items-center"
>
<span
class=
"q-pr-sm q-pt-xs pointer"
v-if=
"scope.row.FileType&&datas.loggedder==scope.row.CreateName&¤tMenu!=-1"
>
<el-tooltip
effect=
"dark"
>
<template
#
content
>
<span
v-if=
"scope.row.UpdateStatus==1||scope.row.UpdateStatus==2"
>
{{
scope
.
row
.
UpdateStatus
==
1
?
'同步中'
:
scope
.
row
.
UpdateStatus
==
2
?
'同步成功'
:
'同步失败'
}}
</span>
<div
v-if=
"scope.row.UpdateStatus==3"
class=
"row flex-end"
>
<el-button
type=
"primary"
icon=
"Refresh"
size=
"small"
@
click
.
stop=
"SynchronousUpdate(scope.row)"
>
更新
</el-button>
</div>
</
template
>
<el-icon>
<Clock
:class=
"[scope.row.UpdateStatus==1?'text-info':'']"
v-if=
"scope.row.UpdateStatus==1"
/>
<CircleCheck
:class=
"[scope.row.UpdateStatus==2?'text-el-primary':'']"
v-if=
"scope.row.UpdateStatus==2"
/>
<CircleClose
:class=
"[scope.row.UpdateStatus==3?'text-waring':'']"
v-if=
"scope.row.UpdateStatus==3"
/>
</el-icon>
</el-tooltip>
</span>
<span>
{{scope.row.CreateName}}
</span>
<span
class=
"text-info q-pl-sm"
v-if=
"datas.loggedder!=scope.row.CreateName"
>
分享的
</span>
</span>
</template>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
>
...
...
@@ -158,7 +178,7 @@ import { storeToRefs } from 'pinia';
import
{
ApiResult
}
from
'@/configs/axios'
;
import
OrgService
from
'@/services/OrgService'
;
import
{
ref
,
reactive
,
watch
,
inject
,
nextTick
,
PropType
}
from
'vue'
;
import
{
Edit
,
View
,
Download
,
EditPen
,
Delete
,
Star
}
from
'@element-plus/icons-vue'
;
import
{
Edit
,
View
,
Download
,
EditPen
,
Delete
,
Star
,
Clock
,
CircleCheck
,
CircleClose
}
from
'@element-plus/icons-vue'
;
import
{
ElMessage
,
ElTree
,
ElLoading
,
ElMessageBox
}
from
'element-plus'
;
import
ConfigService
from
"@/services/ConfigService"
;
...
...
@@ -275,6 +295,44 @@ import CopyFile from "./CopyFile.vue";
datas
.
emptyTitle
=
'没有删除文档'
}
const
SynchronousUpdate
=
async
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
`此操作将更新行程
${
row
.
FileName
}
,是否确定?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(
async
()
=>
{
try
{
let
queryMsg
=
{
FileId
:
row
.
FileId
,
};
deleteLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
text
:
"正在处理"
,
});
let
pageRes
=
await
ConfigService
.
CreateTripFile
(
queryMsg
);
if
(
pageRes
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
ElMessage
({
showClose
:
true
,
message
:
`更新操作成功`
,
type
:
"success"
,
});
emit
(
'refreshHandler'
);
}
else
{
ElMessage
({
showClose
:
true
,
message
:
`更新操作失败`
,
type
:
"warning"
,
});
}
deleteLoading
.
value
.
close
();
deleteLoading
.
value
=
null
;
}
catch
(
error
)
{}
})
.
catch
(()
=>
{});
}
const
exportDocument
=
(
item
:
any
)
=>
{
let
url
=
`http://fileservice.oytour.com/api/img/
${
item
.
FileId
}
/1/png/1`
if
(
item
.
FileType
==
1
)
url
=
`http://fileservice.oytour.com/api/pdf/
${
item
.
FileId
}
`
...
...
src/views/SellTemplate/journeyAds.vue
View file @
6f0439ab
...
...
@@ -195,8 +195,7 @@ const success = () => {
// 导航
const
BackInquire
=
()
=>
{
datas
.
selectedDatas
=
[];
let
Navigation
=
Navigations
.
value
[
Navigations
.
value
.
length
-
2
]
let
Navigation
=
Navigations
.
value
[
Navigations
.
value
.
length
-
2
]
if
(
Navigation
&&
Navigation
.
FileId
){
breadPeelingInquire
(
Navigation
.
FileId
,
Navigations
.
value
.
length
-
2
)
}
else
breadPeelingInquire
(
0
,
0
)
...
...
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