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
5e189b2c
Commit
5e189b2c
authored
Dec 01, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
17377cec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
19 deletions
+41
-19
screen.ts
src/store/screen.ts
+3
-3
index.vue
src/views/Editor/EditorHeader/index.vue
+10
-14
index.vue
src/views/Editor/Thumbnails/index.vue
+28
-2
No files found.
src/store/screen.ts
View file @
5e189b2c
...
...
@@ -12,7 +12,7 @@ export interface ScreenState {
TempId
:
number
,
CoverImg
:
any
,
isCoverImg
:
boolean
,
dataLoading
:
boolean
,
dataLoading
:
number
,
FeatureImg
:
any
}
...
...
@@ -29,7 +29,7 @@ export const useScreenStore = defineStore('screen', {
TempId
:
0
,
// 模版Id
CoverImg
:
null
,
// 封面图
isCoverImg
:
false
,
// 封面
dataLoading
:
false
,
// 记录保存是否成功
dataLoading
:
0
,
// 记录保存是否成功
FeatureImg
:
[],
// 行程特色图
}),
...
...
@@ -67,7 +67,7 @@ export const useScreenStore = defineStore('screen', {
setTempId
(
TempId
:
number
)
{
this
.
TempId
=
TempId
},
setDataLoading
(
dataLoading
:
boolean
)
{
setDataLoading
(
dataLoading
:
number
)
{
this
.
dataLoading
=
dataLoading
},
setFeatureImg
(
FeatureImg
:
any
)
{
...
...
src/views/Editor/EditorHeader/index.vue
View file @
5e189b2c
...
...
@@ -234,7 +234,7 @@ const SetTripTemplateSlide = async () => {
message
:
'操作成功'
,
type
:
'success'
,
})
dataLoadingStore
.
setDataLoading
(
true
)
dataLoadingStore
.
setDataLoading
(
1
)
}
else
{
ElMessage
({
showClose
:
true
,
...
...
@@ -245,11 +245,6 @@ const SetTripTemplateSlide = async () => {
datas
.
loading
=
false
}
catch
(
error
)
{
datas
.
loading
=
false
ElMessage
({
showClose
:
true
,
message
:
'操作失败'
,
type
:
'warning'
,
})
}
}
// 用户新增修改数据
...
...
@@ -271,8 +266,14 @@ const SetTripTemplateConfig = async () => {
message
:
'操作成功'
,
type
:
'success'
,
})
dataLoadingStore
.
setDataLoading
(
true
)
// window.parent.postMessage({
// cmd: 'returnHeight',
// params: {
// success: true,
// data: '行程数据保存成功'
// }
// }, '*');
dataLoadingStore
.
setDataLoading
(
2
)
}
else
{
ElMessage
({
showClose
:
true
,
...
...
@@ -285,11 +286,6 @@ const SetTripTemplateConfig = async () => {
}
catch
(
error
)
{
FeatureImgStore
.
setFeatureImg
([])
datas
.
loading
=
false
ElMessage
({
showClose
:
true
,
message
:
'操作失败'
,
type
:
'warning'
,
})
}
...
...
@@ -298,7 +294,7 @@ const SetTripTemplateConfig = async () => {
const
setTemplate
=
async
()
=>
{
let
arr
=
JSON
.
parse
(
JSON
.
stringify
(
slides
.
value
))
if
(
dataLoading
.
value
){
dataLoadingStore
.
setDataLoading
(
false
)
dataLoadingStore
.
setDataLoading
(
0
)
}
// console.log(JSON.stringify(slides.value),'----保存接口',queryObj.value)
if
(
model
.
value
&&
userInfo
.
value
.
IsEditTripTemplate
==
1
){
...
...
src/views/Editor/Thumbnails/index.vue
View file @
5e189b2c
...
...
@@ -119,15 +119,41 @@ watch(() => slideIndex.value, () => {
})
})
// 监听请求保存成功 重新请求数据
// 监听请求保存成功 重新请求数据
1模版
watch
(()
=>
dataLoading
.
value
,
(
n
,
o
)
=>
{
if
(
n
!=
o
&&
n
){
if
(
dataLoading
.
value
==
1
){
GetTripTemplate
()
}
else
if
(
dataLoading
.
value
==
2
){
GetTripConfig
()
}
})
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
/**
* 行程保存成功获取行程详情
*/
const
GetTripConfig
=
async
()
=>
{
try
{
let
queryMsg
=
{
ConfigId
:
ConfigId
.
value
}
let
datasRes
=
await
ConfigService
.
triptemplateGetTripConfig
(
queryMsg
);
if
(
datasRes
.
data
.
resultCode
==
1
)
{
if
(
datasRes
.
data
.
data
&&
datasRes
.
data
.
data
.
length
>
0
){
console
.
log
(
datasRes
.
data
.
data
,
'---------'
)
}
}
else
{
return
ElMessage
({
showClose
:
true
,
message
:
datasRes
.
data
.
message
,
type
:
'warning'
,
})
}
}
catch
(
error
)
{
}
}
// 获取行程团数据
const
GetTripFiledData
=
async
(
status
)
=>
{
...
...
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