Browse Source

修复评测并增加商品参数字段

master
sj 2 years ago
parent
commit
18bd0e9f19
  1. 35
      public/UEditor/ueditor.all.js
  2. 4
      public/UEditor/ueditor.config.js
  3. 2
      src/components/editorMaterial/index.vue
  4. 3
      src/components/material/index.vue
  5. 2
      src/views/bxg/shop/goods/attr.vue
  6. 57
      src/views/bxg/shop/goods/form.vue
  7. 4
      src/views/bxg/shop/goods/index.vue
  8. 1
      src/views/bxg/shop/goods/index2.vue
  9. 1
      src/views/bxg/shop/goods/index3.vue
  10. 92
      src/views/bxg/yxEvaluation/index.vue

35
public/UEditor/ueditor.all.js

@ -12673,7 +12673,7 @@ UE.plugins['paragraph'] = function() {
} ); } );
} }
tmpRange.setEndAfter( tmpNode ); tmpRange.setEndAfter( tmpNode );
para = range.document.createElement( style ); para = range.document.createElement( style );
if(attrs){ if(attrs){
domUtils.setAttributes(para,attrs); domUtils.setAttributes(para,attrs);
@ -12685,7 +12685,7 @@ UE.plugins['paragraph'] = function() {
//需要内容占位 //需要内容占位
if(domUtils.isEmptyNode(para)){ if(domUtils.isEmptyNode(para)){
domUtils.fillChar(range.document,para); domUtils.fillChar(range.document,para);
} }
tmpRange.insertNode( para ); tmpRange.insertNode( para );
@ -12809,7 +12809,7 @@ UE.plugins['paragraph'] = function() {
}, },
doDirectionality = function(range,editor,forward){ doDirectionality = function(range,editor,forward){
var bookmark, var bookmark,
filterFn = function( node ) { filterFn = function( node ) {
return node.nodeType == 1 ? !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace(node); return node.nodeType == 1 ? !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace(node);
@ -22731,7 +22731,7 @@ UE.plugins['formatmatch'] = function(){
}); });
function addList(type,evt){ function addList(type,evt){
if(browser.webkit){ if(browser.webkit){
var target = evt.target.tagName == 'IMG' ? evt.target : null; var target = evt.target.tagName == 'IMG' ? evt.target : null;
} }
@ -22797,7 +22797,7 @@ UE.plugins['formatmatch'] = function(){
me.commands['formatmatch'] = { me.commands['formatmatch'] = {
execCommand : function( cmdName ) { execCommand : function( cmdName ) {
if(flag){ if(flag){
flag = 0; flag = 0;
list = []; list = [];
@ -22806,7 +22806,7 @@ UE.plugins['formatmatch'] = function(){
} }
var range = me.selection.getRange(); var range = me.selection.getRange();
img = range.getClosedNode(); img = range.getClosedNode();
if(!img || img.tagName != 'IMG'){ if(!img || img.tagName != 'IMG'){
@ -25082,10 +25082,11 @@ UE.ui = baidu.editor.ui = {};
} else { } else {
layer.style.position = 'fixed'; layer.style.position = 'fixed';
} }
layer.style.left = '0'; layer.style.left = '30';
layer.style.top = '0'; layer.style.top = '0';
layer.style.width = '0'; layer.style.width = '50';
layer.style.height = '0'; layer.style.height = '0';
layer.style.zIndex="5000!important;"
} }
return layer; return layer;
}, },
@ -25113,8 +25114,8 @@ UE.ui = baidu.editor.ui = {};
function updateFixedOffset(){ function updateFixedOffset(){
var layer = document.getElementById('edui_fixedlayer'); var layer = document.getElementById('edui_fixedlayer');
uiUtils.setViewportOffset(layer, { uiUtils.setViewportOffset(layer, {
left: 0, left: 666,
top: 0 top: 888
}); });
// layer.style.display = 'none'; // layer.style.display = 'none';
// layer.style.display = 'block'; // layer.style.display = 'block';
@ -25245,7 +25246,7 @@ UE.ui = baidu.editor.ui = {};
domUtils = baidu.editor.dom.domUtils, domUtils = baidu.editor.dom.domUtils,
UIBase = baidu.editor.ui.UIBase, UIBase = baidu.editor.ui.UIBase,
uiUtils = baidu.editor.ui.uiUtils; uiUtils = baidu.editor.ui.uiUtils;
var Mask = baidu.editor.ui.Mask = function (options){ var Mask = baidu.editor.ui.Mask = function (options){
this.initOptions(options); this.initOptions(options);
this.initUIBase(); this.initUIBase();
@ -25541,7 +25542,7 @@ UE.ui = baidu.editor.ui = {};
} }
}; };
utils.inherits(Popup, UIBase); utils.inherits(Popup, UIBase);
domUtils.on( document, 'mousedown', function ( evt ) { domUtils.on( document, 'mousedown', function ( evt ) {
var el = evt.target || evt.srcElement; var el = evt.target || evt.srcElement;
closeAllPopup( evt,el ); closeAllPopup( evt,el );
@ -25637,7 +25638,7 @@ UE.ui = baidu.editor.ui = {};
var utils = baidu.editor.utils, var utils = baidu.editor.utils,
uiUtils = baidu.editor.ui.uiUtils, uiUtils = baidu.editor.ui.uiUtils,
UIBase = baidu.editor.ui.UIBase; UIBase = baidu.editor.ui.UIBase;
var TablePicker = baidu.editor.ui.TablePicker = function (options){ var TablePicker = baidu.editor.ui.TablePicker = function (options){
this.initOptions(options); this.initOptions(options);
this.initTablePicker(); this.initTablePicker();
@ -25721,7 +25722,7 @@ UE.ui = baidu.editor.ui = {};
var browser = baidu.editor.browser, var browser = baidu.editor.browser,
domUtils = baidu.editor.dom.domUtils, domUtils = baidu.editor.dom.domUtils,
uiUtils = baidu.editor.ui.uiUtils; uiUtils = baidu.editor.ui.uiUtils;
var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' + var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' +
' onmouseup="$$.Stateful_onMouseUp(event, this);"' + ' onmouseup="$$.Stateful_onMouseUp(event, this);"' +
( browser.ie ? ( ( browser.ie ? (
@ -25730,7 +25731,7 @@ UE.ui = baidu.editor.ui = {};
: ( : (
' onmouseover="$$.Stateful_onMouseOver(event, this);"' + ' onmouseover="$$.Stateful_onMouseOver(event, this);"' +
' onmouseout="$$.Stateful_onMouseOut(event, this);"' )); ' onmouseout="$$.Stateful_onMouseOut(event, this);"' ));
baidu.editor.ui.Stateful = { baidu.editor.ui.Stateful = {
alwalysHoverable: false, alwalysHoverable: false,
target:null,//目标元素和this指向dom不一样 target:null,//目标元素和this指向dom不一样
@ -27355,7 +27356,7 @@ UE.ui = baidu.editor.ui = {};
setValue : function(value){ setValue : function(value){
this._value = value; this._value = value;
} }
}; };
utils.inherits(MenuButton, SplitButton); utils.inherits(MenuButton, SplitButton);
})(); })();
@ -28985,7 +28986,7 @@ UE.ui = baidu.editor.ui = {};
// } // }
// }); // });
for(var key in UE._customizeUI){ for(var key in UE._customizeUI){
var obj = UE._customizeUI[key] var obj = UE._customizeUI[key]
var itemUI,index; var itemUI,index;

4
public/UEditor/ueditor.config.js

@ -62,7 +62,7 @@
//,theme:'default' //,theme:'default'
//,themePath:URL +"themes/" //,themePath:URL +"themes/"
,zIndex : 9999 //编辑器层级的基数,默认是900 // ,zIndex : 9999 //编辑器层级的基数,默认是900
//针对getAllHtml方法,会在对应的head标签中增加该编码设置。 //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
//,charset:"utf-8" //,charset:"utf-8"
@ -88,7 +88,7 @@
//indentValue //indentValue
//首行缩进距离,默认是2em //首行缩进距离,默认是2em
//,indentValue:'2em' // ,indentValue:'2em'
//,initialFrameWidth:1000 //初始化编辑器宽度,默认1000 //,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
//,initialFrameHeight:320 //初始化编辑器高度,默认320 //,initialFrameHeight:320 //初始化编辑器高度,默认320

2
src/components/editorMaterial/index.vue

@ -40,7 +40,7 @@
width="100%" width="100%"
> >
<el-container> <el-container>
<el-aside width="unset"> <el-aside width="unset" style="height: 510px">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<el-button <el-button
class="el-icon-plus" class="el-icon-plus"

3
src/components/material/index.vue

@ -35,9 +35,9 @@
<el-dialog <el-dialog
title="图片素材库" title="图片素材库"
append-to-body
:visible.sync="listDialogVisible" :visible.sync="listDialogVisible"
width="70%" width="70%"
append-to-body
> >
<el-container> <el-container>
<el-aside width="unset" style="height: 510px"> <el-aside width="unset" style="height: 510px">
@ -468,6 +468,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-icon-circle-close{ ::v-deep .el-icon-circle-close{
color: red; color: red;
} }

2
src/views/bxg/shop/goods/attr.vue

@ -129,6 +129,7 @@ export default {
sliderImage: '', sliderImage: '',
storeName: '', storeName: '',
storeInfo: '', storeInfo: '',
parameter:[],
keyword: '', keyword: '',
barCode: '', barCode: '',
cateId: 1, cateId: 1,
@ -253,6 +254,7 @@ export default {
sliderImage: '', sliderImage: '',
storeName: '', storeName: '',
storeInfo: '', storeInfo: '',
parameter:[],
keyword: '', keyword: '',
barCode: '', barCode: '',
cateId: '', cateId: '',

57
src/views/bxg/shop/goods/form.vue

@ -215,11 +215,51 @@
<el-form-item label="商品详情:"> <el-form-item label="商品详情:">
<ueditor-wrap v-model="formValidate.description" :config="myConfig" <ueditor-wrap v-model="formValidate.description" :config="myConfig"
@beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap> @beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap>
<!-- <editor v-model="formValidate.description" :config="myConfig" @beforeInit="addCustomDialog"></editor>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24">
<el-form-item label="商品参数:">
<el-table
:header-cell-style="{'padding-top':'0'}"
:data="formValidate.parameter"
style="width: 100%">
>
<el-table-column
label="参数名"
prop="name"
width="300">
<template slot-scope="scope">
<el-input v-model="scope.row.name" placeholder="请输入参数名"></el-input>
</template>
</el-table-column>
<el-table-column
label="参数详情"
prop="details"
>
<template slot-scope="scope">
<el-input v-model="scope.row.details" placeholder="请输入参数详情"></el-input>
</template>
</el-table-column>
<el-table-column
align="center">
<template slot="header" slot-scope="scope">
<el-button type="success" size="mini" @click="addParameter">增加参数</el-button>
</template>
<template slot-scope="scope">
<!-- <el-button-->
<!-- size="mini"-->
<!-- @click="handleEdit(scope.$index, scope.row)">Edit</el-button>-->
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<el-col v-bind="grid"> <el-col v-bind="grid">
<el-form-item label="虚拟销量:"> <el-form-item label="虚拟销量:">
<el-input-number :min="0" v-model="formValidate.ficti" placeholder="请输入虚拟销量" /> <el-input-number :min="0" v-model="formValidate.ficti" placeholder="请输入虚拟销量" />
@ -373,6 +413,7 @@ export default {
data() { data() {
return { return {
// //
parameter:[],
brandList:[], brandList:[],
spinShow: false, spinShow: false,
grid2: { grid2: {
@ -423,6 +464,7 @@ export default {
}, },
columns: [], columns: [],
formValidate: { formValidate: {
parameter:[],
imageArr:[], imageArr:[],
sliderImageArr: [], sliderImageArr: [],
store_name: '', store_name: '',
@ -549,6 +591,19 @@ export default {
this.getInfo(); this.getInfo();
}, },
methods: { methods: {
addParameter(){
// console.log('this.formValidate.parameter',this.formValidate.parameter)
if (!this.formValidate.parameter){
this.formValidate.parameter=[]
}
this.formValidate.parameter.push({
name:'',
details:''
})
},
handleDelete(index, row) {
this.parameter.splice(index,1);
},
dataFilter(val){ dataFilter(val){
this.value=val this.value=val
if(val){ if(val){

4
src/views/bxg/shop/goods/index.vue

@ -63,7 +63,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="265px" align="center"> <el-table-column label="新增" width="265px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -215,6 +215,7 @@ export default {
sliderImageArr: data.sliderImage.split(','), sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName, storeName: data.storeName,
storeInfo: data.storeInfo, storeInfo: data.storeInfo,
parameter:data.parameter,
keyword: data.keyword, keyword: data.keyword,
barCode: data.barCode, barCode: data.barCode,
storeCategory: data.storeCategory || {id:null}, storeCategory: data.storeCategory || {id:null},
@ -260,6 +261,7 @@ export default {
sliderImage: data.sliderImage, sliderImage: data.sliderImage,
storeName: data.storeName, storeName: data.storeName,
storeInfo: data.storeInfo, storeInfo: data.storeInfo,
parameter:data.parameter,
keyword: data.keyword, keyword: data.keyword,
barCode: data.barCode, barCode: data.barCode,
storeCategory: data.storeCategory, storeCategory: data.storeCategory,

1
src/views/bxg/shop/goods/index2.vue

@ -171,6 +171,7 @@ export default {
sliderImageArr: data.sliderImage.split(','), sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName, storeName: data.storeName,
storeInfo: data.storeInfo, storeInfo: data.storeInfo,
parameter:data.parameter,
keyword: data.keyword, keyword: data.keyword,
barCode: data.barCode, barCode: data.barCode,
storeCategory: data.storeCategory || {id:null}, storeCategory: data.storeCategory || {id:null},

1
src/views/bxg/shop/goods/index3.vue

@ -153,6 +153,7 @@ export default {
sliderImageArr: data.sliderImage.split(','), sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName, storeName: data.storeName,
storeInfo: data.storeInfo, storeInfo: data.storeInfo,
parameter:data.parameter,
keyword: data.keyword, keyword: data.keyword,
barCode: data.barCode, barCode: data.barCode,
storeCategory: data.storeCategory || {id:null}, storeCategory: data.storeCategory || {id:null},

92
src/views/bxg/yxEvaluation/index.vue

@ -148,37 +148,11 @@ export default {
initialFrameHeight: 500, // initialFrameHeight: 500, //
initialFrameWidth: '100%', // initialFrameWidth: '100%', //
UEDITOR_HOME_URL: '/UEditor/', UEDITOR_HOME_URL: '/UEditor/',
serverUrl: '' serverUrl: '',
zIndex:9999,
}, },
editableTabsValue: '1', editableTabsValue: '1',
editableTabs:[], 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, tabIndex: 5,
activeName:'1', activeName:'1',
product:[], product:[],
@ -256,9 +230,19 @@ export default {
}, },
watch: { watch: {
video:function(val) { video:function(val) {
console.log('val',val); console.log('val11111111',val,typeof(val),val.length==0);
this.form.videoInput = val //
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: { editableTabs: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log(newVal, oldVal); console.log(newVal, oldVal);
@ -281,7 +265,7 @@ export default {
editor: editor, editor: editor,
name: uiName, name: uiName,
title: '上传图片', title: '上传图片',
cssRules: 'width:1200px;height:500px;padding:20px' cssRules: 'width:1200px;height:500px;padding:20px',
}); });
this.dialog = dialog; this.dialog = dialog;
@ -384,28 +368,52 @@ export default {
}, // }, //
[CRUD.HOOK.afterToCU](crud, form) { [CRUD.HOOK.afterToCU](crud, form) {
this.picArr = [] 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) { if (form.homeImage && form.id) {
this.picArr = form.homeImage.split(',') this.picArr = form.homeImage.split(',')
} }
console.log('form',form,form.product!=null&& form.id!=null) console.log('form',form,form.product!=null&& form.id!=null)
if (form.product && form.id) { if (form.product && form.id) {
let data=JSON.parse(this.form.product) let data = JSON.parse(this.form.product)
this.product=[Number(data.cateId),Number(data.id)] this.product = [Number(data.cateId), Number(data.id)]
// this.product=[50,105] // this.product=[50,105]
this.form.product=this.product[1] this.form.product = this.product[1]
console.log( '111',this.product,typeof(this.product)); console.log('111', this.product, typeof (this.product));
}else {
this.product=[]
} }
if (form.editableTabs && form.id) { if (form.editableTabs && form.id) {
this.editableTabs=this.form.editableTabs this.editableTabs=this.form.editableTabs
}else{
this.editableTabs=this.editableTabs1
} }
if (form.videoInput && form.id) { if (form.videoInput && form.id) {
this.video.push(this.form.videoInput) this.video.push(form.videoInput)
}else{
this.video=[]
} }
}, },
} }

Loading…
Cancel
Save