Commit f4d4e8d6 by chenwq

图文编辑器

1 parent 4ec5a9de
......@@ -98,6 +98,8 @@
</template>
<slot :name="item.suffixSlot" :scope="item"></slot>
</template>
<!-- 图文编辑器 -->
<textBox v-else-if="item.type === 'textBox'" :ref="item.name + 'TextBox'" @change="e => handleTextBoxChange(e, item)" @forbid="forbidEdit"></textBox>
</el-form-item>
</template>
<slot name="footer"></slot>
......@@ -114,6 +116,7 @@
</template>
<script>
import textBox from '@/views/material/components/textBox'
import { beforeRangePickerOptions, afterRangePickerOptions } from './common'
export default {
name: 'glsx-combi-form',
......@@ -180,6 +183,10 @@ export default {
}
},
components: {
textBox
},
mounted() { },
methods: {
......@@ -255,6 +262,10 @@ export default {
url: src,
uploadType: targetItem.uploadType || 'img'
}
},
// 获取富文本框内容
handleTextBoxChange(val, targetItem) {
this.formObj[targetItem.name] = val
}
}
}
......
......@@ -173,7 +173,8 @@ export default {
customerServiceFlag: 1,
sponsorName: '',
activityBigImg: '',
activityVideo: []
activityVideo: [],
activityDetail: ''
},
//商品列表
tableParams: {
......@@ -383,7 +384,9 @@ export default {
},
{
label: '活动详情',
tips: '展示活动的详细内容'
name: 'activityDetail',
tips: '展示活动的详细内容',
type: 'textBox'
},
{
label: '音乐文件',
......@@ -655,6 +658,11 @@ export default {
form.activityPrice = (info.activityPrice / 100).toFixed(2)
form.goodsStock = info.goodsStock
}
// 活动详情
if (info.activityDetail) {
form.activityDetail = decodeURIComponent(info.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox.setEdit(info.activityDetail)
}
this.$nextTick(() => {
this.editStatus = false
})
......@@ -701,20 +709,18 @@ export default {
param.specificationDetailList.push(obj)
})
}
// 活动详情
if (this.editForm.activityDetail) {
param.activityDetail = encodeURIComponent(this.editForm.activityDetail)
}
return param
},
handleConfirm() {
console.log(this.editForm)
this.validateRules()
var flag = true
// if(JSON.stringify(this.selectedProInfo) == '{}'){
// this.$message({
// message: '未选择商品',
// type: 'error'
// })
// flag = false
// }
if (this.nameToValSpecsList && this.nameToValSpecsList.length > 0) {
var list = this.nameToValSpecsList
for (var key = 0; key < list.length; key++) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!