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
98c8b50b
Commit
98c8b50b
authored
Dec 11, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 替换本地图 的比例
parent
54d70992
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
24 deletions
+94
-24
ConfigService.ts
src/services/ConfigService.ts
+8
-1
UploadPicture.vue
src/views/Editor/CanvasTool/UploadPicture.vue
+39
-16
index.vue
src/views/Editor/EditorHeader/index.vue
+1
-1
Index.vue
src/views/Market/Index.vue
+46
-6
No files found.
src/services/ConfigService.ts
View file @
98c8b50b
...
@@ -21,10 +21,17 @@ class ConfigService{
...
@@ -21,10 +21,17 @@ class ConfigService{
/**
/**
* 新增修改模版数据
* 新增修改模版数据
*/
*/
static
async
Set
Set
TripConfig
(
params
:
any
):
Promise
<
HttpResponse
>
{
static
async
SetTripConfig
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_SetTripConfig"
,
params
)
return
Api
.
Post
(
"triptemplate_SetTripConfig"
,
params
)
}
}
/**
* 删除模版
*/
static
async
SetDeleteTripTemplate
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"triptemplate_RemoveTripTemplate"
,
params
)
}
/**
/**
* 新增修改模版
* 新增修改模版
*/
*/
...
...
src/views/Editor/CanvasTool/UploadPicture.vue
View file @
98c8b50b
...
@@ -199,7 +199,9 @@ const setImgs = async () => {
...
@@ -199,7 +199,9 @@ const setImgs = async () => {
maxWidth
=
VIEWPORT_VER_SIZE
maxWidth
=
VIEWPORT_VER_SIZE
maxHeight
=
VIEWPORT_SIZE
maxHeight
=
VIEWPORT_SIZE
}
}
let
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
propsDatas
.
value
.
src
)
let
tempSize
=
null
if
(
activeName
.
value
==
1
||
activeName
.
value
==
3
){
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
propsDatas
.
value
.
src
)
if
(
tempSize
.
width
>
maxWidth
){
if
(
tempSize
.
width
>
maxWidth
){
let
ratio
=
maxWidth
/
tempSize
.
width
let
ratio
=
maxWidth
/
tempSize
.
width
tempSize
.
width
=
maxWidth
tempSize
.
width
=
maxWidth
...
@@ -214,11 +216,32 @@ const setImgs = async () => {
...
@@ -214,11 +216,32 @@ const setImgs = async () => {
if
(
y
.
top
<
0
)
y
.
top
=
0
if
(
y
.
top
<
0
)
y
.
top
=
0
y
.
width
=
tempSize
.
width
y
.
width
=
tempSize
.
width
y
.
height
=
tempSize
.
height
y
.
height
=
tempSize
.
height
}
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
(
y
.
left
<
0
)
y
.
left
=
0
if
(
y
.
top
<
0
)
y
.
top
=
0
y
.
width
=
img
.
width
y
.
height
=
img
.
height
}
y
.
src
=
propsDatas
.
value
.
src
y
.
src
=
propsDatas
.
value
.
src
y
.
fixedRatio
=
true
y
.
fixedRatio
=
true
}
}
}
}
}
}
}
slidesStore
.
updateElement
({
id
:
handleElementId
.
value
,
props
:
propsDatas
.
value
})
slidesStore
.
updateElement
({
id
:
handleElementId
.
value
,
props
:
propsDatas
.
value
})
addHistorySnapshot
()
addHistorySnapshot
()
close
()
close
()
...
...
src/views/Editor/EditorHeader/index.vue
View file @
98c8b50b
...
@@ -312,7 +312,7 @@ const SetTripTemplateConfig = async () => {
...
@@ -312,7 +312,7 @@ const SetTripTemplateConfig = async () => {
TempId
:
queryObj
.
value
.
TempId
,
TempId
:
queryObj
.
value
.
TempId
,
TempData
:
queryObj
.
value
.
TempData
,
TempData
:
queryObj
.
value
.
TempData
,
}
}
let
TemplateRes
=
await
ConfigService
.
Set
Set
TripConfig
(
queryMsg
);
let
TemplateRes
=
await
ConfigService
.
SetTripConfig
(
queryMsg
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
!
ConfigId
.
value
){
if
(
!
ConfigId
.
value
){
ConfigIdStore
.
value
=
TemplateRes
.
data
.
data
.
ConfigId
ConfigIdStore
.
value
=
TemplateRes
.
data
.
data
.
ConfigId
...
...
src/views/Market/Index.vue
View file @
98c8b50b
...
@@ -71,15 +71,17 @@
...
@@ -71,15 +71,17 @@
<div
class=
"MarketIndexListBox bg-white rounded"
>
<div
class=
"MarketIndexListBox bg-white rounded"
>
<div
class=
"MarketIndexList-Hover"
>
<div
class=
"MarketIndexList-Hover"
>
<div>
<div>
<el-button
type=
"primary"
<el-button
class=
"MarketIndexButtom"
type=
"primary"
style=
"color: #ffff;"
@
click=
"getTemplate(item)"
>
详情
</el-button>
@
click=
"getTemplate(item)"
>
详情
</el-button>
</div>
</div>
<div
class=
"q-mt-lg"
>
<div
class=
"q-mt-lg"
>
<el-button
type=
"primary"
<el-button
class=
"MarketIndexButtom"
type=
"primary"
style=
"color: #ffff;"
@
click=
"goToTemplate(item)"
>
选择该模版
</el-button>
@
click=
"goToTemplate(item)"
>
选择该模版
</el-button>
</div>
</div>
<div
class=
"q-mt-lg"
v-if=
"model==1"
>
<el-button
class=
"MarketIndexButtom"
type=
"primary"
@
click=
"deleteTemplate(item)"
>
删除
</el-button>
</div>
</div>
</div>
<div
class=
"MarketIndexList-img"
>
<div
class=
"MarketIndexList-img"
>
<img
:src=
"item.CoverImg"
class=
"rounded"
/>
<img
:src=
"item.CoverImg"
class=
"rounded"
/>
...
@@ -122,7 +124,7 @@
...
@@ -122,7 +124,7 @@
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
LayoutPool
from
'./LayoutPool.vue'
import
LayoutPool
from
'./LayoutPool.vue'
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
const
{
const
{
userInfo
userInfo
...
@@ -136,6 +138,7 @@ import { ElMessage } from "element-plus";
...
@@ -136,6 +138,7 @@ import { ElMessage } from "element-plus";
const
currentPage
=
ref
(
1
as
Number
);
const
currentPage
=
ref
(
1
as
Number
);
const
showCurrentTemplate
=
ref
<
any
>
()
const
showCurrentTemplate
=
ref
<
any
>
()
const
deleteLoading
=
ref
<
any
>
(
null
)
const
datas
=
reactive
({
const
datas
=
reactive
({
TemplateRow
:
{},
TemplateRow
:
{},
DetailsVisible
:
false
,
DetailsVisible
:
false
,
...
@@ -166,6 +169,39 @@ import { ElMessage } from "element-plus";
...
@@ -166,6 +169,39 @@ import { ElMessage } from "element-plus";
searchData
.
value
.
TempId
=
0
searchData
.
value
.
TempId
=
0
}
}
// 删除模版
const
deleteTemplate
=
(
item
:
any
)
=>
{
ElMessageBox
.
confirm
(
'此操作将删除该模版,是否确定?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
).
then
(()
=>
{
try
{
let
queryMsg
=
{
TempId
:
item
.
TempId
}
deleteLoading
.
value
=
ElLoading
.
service
()
let
dataRes
=
ConfigService
.
SetDeleteTripTemplate
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
queryObj
.
pageIndex
==
1
deleteLoading
.
value
.
close
()
deleteLoading
.
value
=
null
ElMessage
({
showClose
:
true
,
message
:
'删除模版成功'
,
type
:
'success'
,
})
queryTemplateBySearchHandler
()
}
}
catch
(
error
)
{}
}).
catch
(()
=>
{})
}
// 查看所有子模版
// 查看所有子模版
const
getTemplate
=
async
(
item
:
any
)
=>
{
const
getTemplate
=
async
(
item
:
any
)
=>
{
...
@@ -396,6 +432,10 @@ import { ElMessage } from "element-plus";
...
@@ -396,6 +432,10 @@ import { ElMessage } from "element-plus";
margin-right
:
30px
;
margin-right
:
30px
;
margin-top
:
5px
;
margin-top
:
5px
;
}
}
.MarketIndexButtom
{
color
:
#ffff
;
width
:
92px
;
}
.layout-item
{
.layout-item
{
width
:
180px
;
width
:
180px
;
}
}
...
...
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