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

4
public/UEditor/ueditor.config.js

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

2
src/components/editorMaterial/index.vue

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

3
src/components/material/index.vue

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

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

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

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

@ -215,11 +215,51 @@
<el-form-item label="商品详情:">
<ueditor-wrap v-model="formValidate.description" :config="myConfig"
@beforeInit="addCustomDialog" style="width: 90%;"></ueditor-wrap>
<!-- <editor v-model="formValidate.description" :config="myConfig" @beforeInit="addCustomDialog"></editor>-->
</el-form-item>
</el-col>
</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-form-item label="虚拟销量:">
<el-input-number :min="0" v-model="formValidate.ficti" placeholder="请输入虚拟销量" />
@ -373,6 +413,7 @@ export default {
data() {
return {
//
parameter:[],
brandList:[],
spinShow: false,
grid2: {
@ -423,6 +464,7 @@ export default {
},
columns: [],
formValidate: {
parameter:[],
imageArr:[],
sliderImageArr: [],
store_name: '',
@ -549,6 +591,19 @@ export default {
this.getInfo();
},
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){
this.value=val
if(val){

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

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

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

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

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

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

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

@ -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)
}
},
}

Loading…
Cancel
Save