|
|
|
@ -148,37 +148,11 @@ export default {
|
|
|
|
|
initialFrameHeight: 500, // 初始容器高度 |
|
|
|
|
initialFrameWidth: '100%', // 初始容器宽度 |
|
|
|
|
UEDITOR_HOME_URL: '/UEditor/', |
|
|
|
|
serverUrl: '' |
|
|
|
|
serverUrl: '', |
|
|
|
|
zIndex:9999, |
|
|
|
|
}, |
|
|
|
|
editableTabsValue: '1', |
|
|
|
|
editableTabs:[], |
|
|
|
|
editableTabs1: [{ |
|
|
|
|
title: '第一栏', |
|
|
|
|
name: '1', |
|
|
|
|
content: '眼界甄选评测员总结', |
|
|
|
|
configuration:'' |
|
|
|
|
}, { |
|
|
|
|
title: '第二栏', |
|
|
|
|
name: '2', |
|
|
|
|
content: '品牌背景', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第三栏', |
|
|
|
|
name: '3', |
|
|
|
|
content: '甄选测评官点评', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第四栏', |
|
|
|
|
name: '4', |
|
|
|
|
content: '产品成分', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第五栏', |
|
|
|
|
name: '5', |
|
|
|
|
content: '产品细节', |
|
|
|
|
configuration:'' |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
tabIndex: 5, |
|
|
|
|
activeName:'1', |
|
|
|
|
product:[], |
|
|
|
@ -256,9 +230,19 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
video:function(val) { |
|
|
|
|
console.log('val',val); |
|
|
|
|
this.form.videoInput = val |
|
|
|
|
console.log('val11111111',val,typeof(val),val.length==0); |
|
|
|
|
//空对象 |
|
|
|
|
if (val.length==0){ |
|
|
|
|
this.form.videoInput='' |
|
|
|
|
}else { |
|
|
|
|
this.form.videoInput=val |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
picArr: function(val) { |
|
|
|
|
console.log(val, 'val'); |
|
|
|
|
this.form.homeImage = val.join(',') |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
editableTabs: { |
|
|
|
|
handler(newVal, oldVal) { |
|
|
|
|
console.log(newVal, oldVal); |
|
|
|
@ -281,7 +265,7 @@ export default {
|
|
|
|
|
editor: editor, |
|
|
|
|
name: uiName, |
|
|
|
|
title: '上传图片', |
|
|
|
|
cssRules: 'width:1200px;height:500px;padding:20px' |
|
|
|
|
cssRules: 'width:1200px;height:500px;padding:20px', |
|
|
|
|
}); |
|
|
|
|
this.dialog = dialog; |
|
|
|
|
|
|
|
|
@ -384,28 +368,52 @@ export default {
|
|
|
|
|
}, // 新增与编辑前做的操作 |
|
|
|
|
[CRUD.HOOK.afterToCU](crud, form) { |
|
|
|
|
this.picArr = [] |
|
|
|
|
this.video=[] |
|
|
|
|
this.editableTabs=[{ |
|
|
|
|
title: '第一栏', |
|
|
|
|
name: '1', |
|
|
|
|
content: '眼界甄选评测员总结', |
|
|
|
|
configuration:'' |
|
|
|
|
}, { |
|
|
|
|
title: '第二栏', |
|
|
|
|
name: '2', |
|
|
|
|
content: '品牌背景', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第三栏', |
|
|
|
|
name: '3', |
|
|
|
|
content: '甄选测评官点评', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第四栏', |
|
|
|
|
name: '4', |
|
|
|
|
content: '产品成分', |
|
|
|
|
configuration:'' |
|
|
|
|
},{ |
|
|
|
|
title: '第五栏', |
|
|
|
|
name: '5', |
|
|
|
|
content: '产品细节', |
|
|
|
|
configuration:'' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
this.product=[] |
|
|
|
|
|
|
|
|
|
if (form.homeImage && form.id) { |
|
|
|
|
this.picArr = form.homeImage.split(',') |
|
|
|
|
} |
|
|
|
|
console.log('form',form,form.product!=null&& form.id!=null) |
|
|
|
|
if (form.product && form.id) { |
|
|
|
|
let data=JSON.parse(this.form.product) |
|
|
|
|
this.product=[Number(data.cateId),Number(data.id)] |
|
|
|
|
let data = JSON.parse(this.form.product) |
|
|
|
|
this.product = [Number(data.cateId), Number(data.id)] |
|
|
|
|
// this.product=[50,105] |
|
|
|
|
this.form.product=this.product[1] |
|
|
|
|
console.log( '111',this.product,typeof(this.product)); |
|
|
|
|
}else { |
|
|
|
|
this.product=[] |
|
|
|
|
this.form.product = this.product[1] |
|
|
|
|
console.log('111', this.product, typeof (this.product)); |
|
|
|
|
} |
|
|
|
|
if (form.editableTabs && form.id) { |
|
|
|
|
this.editableTabs=this.form.editableTabs |
|
|
|
|
}else{ |
|
|
|
|
this.editableTabs=this.editableTabs1 |
|
|
|
|
} |
|
|
|
|
if (form.videoInput && form.id) { |
|
|
|
|
this.video.push(this.form.videoInput) |
|
|
|
|
}else{ |
|
|
|
|
this.video=[] |
|
|
|
|
this.video.push(form.videoInput) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|