Commit 8339eed2 authored by lixy's avatar lixy

旅游富文本

parent 82fb39fc
......@@ -163,13 +163,22 @@
</el-form-item>
<el-tabs v-model="activeName2" type="card" @tab-click="handleClick">
<el-tab-pane label="行程亮点" name="first">
<Editor v-if="activeName2=='first'" @input="handelContentIncrease" :value="form.content" :myQuillEditor="'myQuillEditorContent'" :activeName2="activeName2"></Editor>
<div class="editor-container" v-if="activeName2=='first'">
<UE :editorId="activeName2" :defaultMsg="form.content" :config=config ref="ue" @ready="editorReadyEvent"></UE>
</div>
<!--<Editor v-if="activeName2=='first'" @input="handelContentIncrease" :value="form.content" :myQuillEditor="'myQuillEditorContent'" :activeName2="activeName2"></Editor>-->
</el-tab-pane>
<el-tab-pane label="行程介绍" name="second">
<Editor v-if="activeName2=='second'" @input="handelIntroduceIncrease" :value="form.introduce" :myQuillEditor="'myQuillEditorIntroduce'" :activeName2="activeName2"></Editor>
<div class="editor-container" v-if="activeName2=='second'">
<UE :editorId="activeName2" :defaultMsg="form.introduce" :config=config ref="ue" @ready="editorReadyEvent"></UE>
</div>
<!--<Editor v-if="activeName2=='second'" @input="handelIntroduceIncrease" :value="form.introduce" :myQuillEditor="'myQuillEditorIntroduce'" :activeName2="activeName2"></Editor>-->
</el-tab-pane>
<el-tab-pane label="费用说明" name="third">
<Editor v-if="activeName2=='third'" @input="handelExplainIncrease" :value="form.explain" :myQuillEditor="'myQuillEditorExplain'" :activeName2="activeName2"></Editor>
<div class="editor-container" v-if="activeName2=='third'">
<UE :editorId="activeName2" :defaultMsg="form.explain" :config=config ref="ue" @ready="editorReadyEvent"></UE>
</div>
<!--<Editor v-if="activeName2=='third'" @input="handelExplainIncrease" :value="form.explain" :myQuillEditor="'myQuillEditorExplain'" :activeName2="activeName2"></Editor>-->
</el-tab-pane>
</el-tabs>
<el-form-item></el-form-item>
......@@ -201,7 +210,8 @@
}
</style>
<script>
import Editor from "../../modal/editorTool";//富文本
// import Editor from "../../modal/editorTool";//富文本
import UE from '../../modal/Ueditor';//百度ue富文本
import Destination from "./destinationModal";//目的地弹框
import tourTime from "./tourTime";//活动时间
import tourLabelModal from "./tourLabelModal";//旅游标签
......@@ -234,7 +244,8 @@
props: ["oneTourRow", "title"],
name: 'upkeepDialog',
components: {
Editor,
// Editor,
UE,
Destination,
tourTime,
tourLabelModal,
......@@ -242,6 +253,10 @@
},
data() {
return {
config: {
initialFrameWidth: null,
initialFrameHeight: 350
},
percent: 0,//上传进度
imgFlag: false,
onePathObj:{name: ""},//待编辑的途径地
......@@ -251,7 +266,7 @@
pathway: [],//途径地
isCreate: false,//是否点击了创建-确定
fileList2:[],
activeName2: 'first',//行程亮点
activeName2: '',//行程亮点
form: {
childPrice: undefined,//儿童价
isOutside:"0",
......@@ -814,6 +829,7 @@
this.form.isMember = this.form.isMember+"";
this.form.recommend = this.form.recommend+"";
this.form.isOutside = this.form.isOutside+"";
this.activeName2 = "first";
})
},
querySearch(queryString, cb) {
......@@ -844,24 +860,39 @@
this.$emit("oneTourDialogEvent", false);
},
/**
* 富文本内容 费用说明
* @param step
*/
handelExplainIncrease(step) {
this.form.explain = step;
},
/**
* 行程介绍 富文本
* 富文本 营地详情
* */
handelIntroduceIncrease(step){
this.form.introduce = step;
},
/**
* 富文本 content行程亮点
* */
handelContentIncrease(step){
this.form.content = step;
editorReadyEvent(instance){
let t = this;
instance.addListener('contentChange', () => {
if(t.activeName2 == "first"){
t.form.content = instance.getContent();
} else if(t.activeName2 == "second"){
t.form.introduce = instance.getContent();
} else if(t.activeName2 == "third"){
t.form.explain = instance.getContent();
}
});
},
// /**
// * 富文本内容 费用说明
// * @param step
// */
// handelExplainIncrease(step) {
// this.form.explain = step;
// },
// /**
// * 行程介绍 富文本
// * */
// handelIntroduceIncrease(step){
// this.form.introduce = step;
// },
// /**
// * 富文本 content行程亮点
// * */
// handelContentIncrease(step){
// this.form.content = step;
// },
/**
* 删除banner
* */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment