Browse Source

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

master
sj 2 years ago
parent
commit
18bd0e9f19
  1. 9
      public/UEditor/ueditor.all.js
  2. 2
      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. 82
      src/views/bxg/yxEvaluation/index.vue

9
public/UEditor/ueditor.all.js

@ -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';

2
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"

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

82
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);
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,6 +368,36 @@ 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(',')
}
@ -394,18 +408,12 @@ export default {
// this.product=[50,105]
this.form.product = this.product[1]
console.log('111', this.product, typeof (this.product));
}else {
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