Commit cf5ba059 authored by zhengke's avatar zhengke

修复bug

parent 80866bdc
...@@ -514,7 +514,7 @@ ...@@ -514,7 +514,7 @@
const SearchCloudInfo = () => { const SearchCloudInfo = () => {
if(queryObj.QFileName) formatType.value = formatTypeAll.value.filter((item) => { if(queryObj.QFileName) formatType.value = formatTypeAll.value.filter((item) => {
return item.FileFormat.toLowerCase().includes(queryObj.QFileName.toLowerCase()) return item.FileFormat&&item.FileFormat.toLowerCase().includes(queryObj.QFileName.toLowerCase())
}) })
else formatType.value = formatTypeAll.value else formatType.value = formatTypeAll.value
} }
...@@ -524,8 +524,8 @@ ...@@ -524,8 +524,8 @@
if(props.isPersonage) QUserType = 2 if(props.isPersonage) QUserType = 2
const response = await CloudDiskService.GetPPTistCloudInfoFileFormatCount(QUserType); const response = await CloudDiskService.GetPPTistCloudInfoFileFormatCount(QUserType);
if (response.data.resultCode==ApiResult.SUCCESS) { if (response.data.resultCode==ApiResult.SUCCESS) {
formatType.value = response.data.data formatType.value = response.data.data.filter(x=> {return x.FileFormat})
formatTypeAll.value = response.data.data formatTypeAll.value = response.data.data.filter(x=> {return x.FileFormat})
} }
} }
......
...@@ -565,8 +565,6 @@ const SetTripTemplateConfig = async () => { ...@@ -565,8 +565,6 @@ const SetTripTemplateConfig = async () => {
} }
// 保存 type行程另存 sellType行程保存并退出 // 保存 type行程另存 sellType行程保存并退出
const setTemplate = async (type:any,sellType:any) =>{ const setTemplate = async (type:any,sellType:any) =>{
queryObj.value.Title = title.value
if(SourceLoading.value) setNewDatasList(datas.DataSource) if(SourceLoading.value) setNewDatasList(datas.DataSource)
await uploadImageHandler() await uploadImageHandler()
...@@ -599,7 +597,7 @@ const setTemplate = async (type:any,sellType:any) =>{ ...@@ -599,7 +597,7 @@ const setTemplate = async (type:any,sellType:any) =>{
let url = await AliyunUpload.UploadAsync(file,`Feature/CoverImg_${name}`) let url = await AliyunUpload.UploadAsync(file,`Feature/CoverImg_${name}`)
queryObj.value.CoverImg = url queryObj.value.CoverImg = url
} }
if(searchData.value.TemplateType!=2&&(queryObj.value.Title==''||queryObj.value.CountryName=='' if(searchData.value.TemplateType==1&&(queryObj.value.Title==''||queryObj.value.CountryName==''
||queryObj.value.ColorStr==''||queryObj.value.SeasonName=='')){ ||queryObj.value.ColorStr==''||queryObj.value.SeasonName=='')){
datas.loading = false datas.loading = false
mainStore.setToolbarState(ToolbarStates.EL_TEMPLATEDATA) mainStore.setToolbarState(ToolbarStates.EL_TEMPLATEDATA)
...@@ -623,8 +621,32 @@ const setTemplate = async (type:any,sellType:any) =>{ ...@@ -623,8 +621,32 @@ const setTemplate = async (type:any,sellType:any) =>{
message: '请完善右侧季节', message: '请完善右侧季节',
type: 'warning', type: 'warning',
}) })
} }else if(searchData.value.TemplateType==2&&(queryObj.value.Title==''||queryObj.value.CountryName==''
} else { ||queryObj.value.ColorStr==''||queryObj.value.SeasonName=='')){
datas.loading = false
mainStore.setToolbarState(ToolbarStates.EL_TEMPLATEDATA)
if(queryObj.value.Title=='') return ElMessage({
showClose: true,
message: '请完善右侧广告名称',
type: 'warning',
})
if(queryObj.value.CountryName=='') return ElMessage({
showClose: true,
message: '请完善右侧国家',
type: 'warning',
})
if(queryObj.value.ColorStr=='') return ElMessage({
showClose: true,
message: '请完善右侧颜色',
type: 'warning',
})
if(queryObj.value.SeasonName=='') return ElMessage({
showClose: true,
message: '请完善右侧季节',
type: 'warning',
})
}
}else {
arr.forEach(x=>{ arr.forEach(x=>{
x.elements.forEach(y=>{ x.elements.forEach(y=>{
delete y.TemplateList delete y.TemplateList
...@@ -683,7 +705,8 @@ const startEditTitle = () => { ...@@ -683,7 +705,8 @@ const startEditTitle = () => {
const handleUpdateTitle = () => { const handleUpdateTitle = () => {
slidesStore.setTitle(titleValue.value) slidesStore.setTitle(titleValue.value)
editingTitle.value = false editingTitle.value = false
queryObj.value.Title = titleValue.value if(titleValue.value!='未命名演示文稿') queryObj.value.Title = titleValue.value
else queryObj.value.Title = ''
} }
const goLink = (url: string) => { const goLink = (url: string) => {
...@@ -701,6 +724,12 @@ watch(()=>autoSave.value,(newVal)=>{ ...@@ -701,6 +724,12 @@ watch(()=>autoSave.value,(newVal)=>{
setTemplate(0) setTemplate(0)
} }
}) })
watch(()=>title.value,(n,o)=>{
if(n!='未命名演示文稿') queryObj.value.Title = n
else queryObj.value.Title = ''
})
watch(()=>slides.value,(newVal,oldVal)=>{ watch(()=>slides.value,(newVal,oldVal)=>{
if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){ if(model.value==2&&SalesEditor.value>0&&searchData.value.sellId){
if(searchData.value.MonitoringNumber==0){ if(searchData.value.MonitoringNumber==0){
......
...@@ -774,7 +774,10 @@ ...@@ -774,7 +774,10 @@
getLinesHandler() getLinesHandler()
getColor(0) getColor(0)
// GetTemplateColors() // GetTemplateColors()
watch(()=>title.value,(n,o)=>{
if(n!='未命名演示文稿') titleValue.value = n
else titleValue.value = ''
})
onMounted( () => { onMounted( () => {
document.addEventListener('click', (e) => { document.addEventListener('click', (e) => {
if (datas.addColorsShow) { if (datas.addColorsShow) {
......
...@@ -115,7 +115,7 @@ const datas = reactive({ ...@@ -115,7 +115,7 @@ const datas = reactive({
Title: '',//名称 是 [string] Title: '',//名称 是 [string]
TempData: null,//模板数据 是 [json] TempData: null,//模板数据 是 [json]
CoverImg: '',//封面图 是 [string] CoverImg: '',//封面图 是 [string]
CountryName: null,//国家 是 [string] CountryName: '不限',//国家 是 [string]
SeasonName: '不限',//季节 是 [string] SeasonName: '不限',//季节 是 [string]
ColorName: '',//颜色名称 是 [string] ColorName: '',//颜色名称 是 [string]
ColorStr: null,//颜色值 是 [string] ColorStr: null,//颜色值 是 [string]
......
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