Commit 5e189b2c authored by zhengke's avatar zhengke

no message

parent 17377cec
......@@ -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) {
......
......@@ -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){
......
......@@ -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) =>{
......
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