Commit 96a68288 authored by zhengke's avatar zhengke

修复 保存有TempId 不执行模版 及初始化行程

parent a1b0e6b9
......@@ -183,8 +183,8 @@ const goBack = () =>{
}
]
if(model.value) {
// searchData.value.TempId = 0
TempIdStore.setTempId(0)
searchData.value.TempId = 0
// TempIdStore.setTempId(0)
marketStore.setMarket(true)
slidesStore.setSlides(list)
layoutsStore.setLayouts([])
......@@ -201,8 +201,8 @@ const goBack = () =>{
}
)
.then(() => {
// searchData.value.TempId = 0
TempIdStore.setTempId(0)
searchData.value.TempId = 0
// TempIdStore.setTempId(0)
marketStore.setMarket(true)
slidesStore.setSlides(list)
layoutsStore.setLayouts([])
......
......@@ -134,6 +134,7 @@ queryObj.value = inject(injectKeyDataSource).queryObj
* 行程保存成功获取行程详情
*/
const GetTripConfig = async () =>{
console.log('获取行程','----------')
try {
let queryMsg = {
ConfigId: ConfigId.value
......@@ -167,6 +168,7 @@ queryObj.value = inject(injectKeyDataSource).queryObj
// 获取行程团数据初始化数据
const GetTripFiledData = async () =>{
console.log('初始化行程','----------')
const slidesData = slides.value
try {
let queryMsg = {
......@@ -220,7 +222,7 @@ const GetTripFiledData = async () =>{
// 获取行程模版数据
const GetTripTemplate = async () =>{
if(!queryObj.value.TempId) {
if(!TempId.value) {
let list = [
{
id: 'test-slide-1',
......@@ -272,7 +274,11 @@ const GetTripTemplate = async () =>{
queryObj.value.ColorStr = dataRes.data.data.ColorStr
queryObj.value.TempType = dataRes.data.data.TempType
slidesStore.updateSlideIndex(0)
if(ConfigId.value==0||TempId.value) return await GetTripConfig()
if(ConfigId.value==0||TempId.value||dataLoading.value==2) {
await GetTripConfig()
return
}
console.log(ConfigId.value,'----------',TempId.value)
await GetTripFiledData()
}
} catch (error) {
......
......@@ -164,7 +164,7 @@
const { slides, slideIndex } = storeToRefs(slidesStore)
const isCoverImgStore = useScreenStore()
const { model, TemplateDataSource, TemplateType, CoverImg, isCoverImg } = storeToRefs(useScreenStore())
const { TemplateDataSource, TemplateType, CoverImg, isCoverImg } = storeToRefs(useScreenStore())
const mainStore = useMainStore()
const mainMenuVisible = ref(false)
......
......@@ -54,12 +54,20 @@ const elementTabs = computed<ElementTabs[]>(() => {
]
})
const slideTabs = ref([] as any)
slideTabs.value = [
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
{ label: '模版数据', key: ToolbarStates.EL_TEMPLATEDATA },
]
if(model.value){
slideTabs.value = [
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
{ label: '模版数据', key: ToolbarStates.EL_TEMPLATEDATA },
]
}else {
slideTabs.value = [
{ label: '设计', key: ToolbarStates.SLIDE_DESIGN },
{ label: '切换', key: ToolbarStates.SLIDE_ANIMATION },
{ label: '动画', key: ToolbarStates.EL_ANIMATION },
]
}
const multiSelectTabs = [
{ label: '样式', key: ToolbarStates.EL_STYLE },
......
......@@ -197,7 +197,6 @@
const addTemplate = () =>{
marketStore.setMarket(!market)
// TempIdStore.setTempId(0)
searchData.value.TempId = 0
}
......
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