Commit 5e189b2c authored by zhengke's avatar zhengke

no message

parent 17377cec
...@@ -12,7 +12,7 @@ export interface ScreenState { ...@@ -12,7 +12,7 @@ export interface ScreenState {
TempId: number, TempId: number,
CoverImg: any, CoverImg: any,
isCoverImg: boolean, isCoverImg: boolean,
dataLoading: boolean, dataLoading: number,
FeatureImg: any FeatureImg: any
} }
...@@ -29,7 +29,7 @@ export const useScreenStore = defineStore('screen', { ...@@ -29,7 +29,7 @@ export const useScreenStore = defineStore('screen', {
TempId: 0, // 模版Id TempId: 0, // 模版Id
CoverImg: null, // 封面图 CoverImg: null, // 封面图
isCoverImg: false, // 封面 isCoverImg: false, // 封面
dataLoading: false, // 记录保存是否成功 dataLoading: 0, // 记录保存是否成功
FeatureImg: [], // 行程特色图 FeatureImg: [], // 行程特色图
}), }),
...@@ -67,7 +67,7 @@ export const useScreenStore = defineStore('screen', { ...@@ -67,7 +67,7 @@ export const useScreenStore = defineStore('screen', {
setTempId(TempId: number) { setTempId(TempId: number) {
this.TempId = TempId this.TempId = TempId
}, },
setDataLoading(dataLoading: boolean) { setDataLoading(dataLoading: number) {
this.dataLoading = dataLoading this.dataLoading = dataLoading
}, },
setFeatureImg(FeatureImg: any) { setFeatureImg(FeatureImg: any) {
......
...@@ -234,7 +234,7 @@ const SetTripTemplateSlide = async () => { ...@@ -234,7 +234,7 @@ const SetTripTemplateSlide = async () => {
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
}) })
dataLoadingStore.setDataLoading(true) dataLoadingStore.setDataLoading(1)
}else{ }else{
ElMessage({ ElMessage({
showClose: true, showClose: true,
...@@ -245,11 +245,6 @@ const SetTripTemplateSlide = async () => { ...@@ -245,11 +245,6 @@ const SetTripTemplateSlide = async () => {
datas.loading = false datas.loading = false
} catch (error) { } catch (error) {
datas.loading = false datas.loading = false
ElMessage({
showClose: true,
message: '操作失败',
type: 'warning',
})
} }
} }
// 用户新增修改数据 // 用户新增修改数据
...@@ -271,8 +266,14 @@ const SetTripTemplateConfig = async () => { ...@@ -271,8 +266,14 @@ const SetTripTemplateConfig = async () => {
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
}) })
// window.parent.postMessage({
dataLoadingStore.setDataLoading(true) // cmd: 'returnHeight',
// params: {
// success: true,
// data: '行程数据保存成功'
// }
// }, '*');
dataLoadingStore.setDataLoading(2)
}else{ }else{
ElMessage({ ElMessage({
showClose: true, showClose: true,
...@@ -285,11 +286,6 @@ const SetTripTemplateConfig = async () => { ...@@ -285,11 +286,6 @@ const SetTripTemplateConfig = async () => {
} catch (error) { } catch (error) {
FeatureImgStore.setFeatureImg([]) FeatureImgStore.setFeatureImg([])
datas.loading = false datas.loading = false
ElMessage({
showClose: true,
message: '操作失败',
type: 'warning',
})
} }
...@@ -298,7 +294,7 @@ const SetTripTemplateConfig = async () => { ...@@ -298,7 +294,7 @@ const SetTripTemplateConfig = async () => {
const setTemplate = async () =>{ const setTemplate = async () =>{
let arr = JSON.parse(JSON.stringify(slides.value)) let arr = JSON.parse(JSON.stringify(slides.value))
if(dataLoading.value){ if(dataLoading.value){
dataLoadingStore.setDataLoading(false) dataLoadingStore.setDataLoading(0)
} }
// console.log(JSON.stringify(slides.value),'----保存接口',queryObj.value) // console.log(JSON.stringify(slides.value),'----保存接口',queryObj.value)
if(model.value&&userInfo.value.IsEditTripTemplate==1){ if(model.value&&userInfo.value.IsEditTripTemplate==1){
......
...@@ -119,15 +119,41 @@ watch(() => slideIndex.value, () => { ...@@ -119,15 +119,41 @@ watch(() => slideIndex.value, () => {
}) })
}) })
// 监听请求保存成功 重新请求数据 // 监听请求保存成功 重新请求数据 1模版
watch(() => dataLoading.value, (n,o) =>{ watch(() => dataLoading.value, (n,o) =>{
if(n!=o&&n){ if(dataLoading.value==1){
GetTripTemplate() GetTripTemplate()
}else if(dataLoading.value==2){
GetTripConfig()
} }
}) })
queryObj.value = inject(injectKeyDataSource).queryObj 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) =>{ const GetTripFiledData = async (status) =>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment