Commit e7a366c8 authored by youjie's avatar youjie

签证 富文本上传图

parent 1c2a393e
......@@ -678,6 +678,7 @@
this.myQuillEditor = "editer_" + this.guid();
this.myImageUploader = "imageUploader_" + this.guid();
this.editorOption.modules.toolbar = "#" + this.myToolbar;
if (this.toolbarShow != null) {
for (let key in this.toolbarShow) {
this.toolbar[key] = this.toolbarShow[key];
......@@ -726,7 +727,8 @@
// 获取富文本组件实例
let quill = this.$refs[this.myQuillEditor].quill
try {
quill.getSelection().index;
// quill.getSelection().index;
quill.selection.savedRange.index;
} catch (err) {
this.$message.error(this.$t('objFill.wufahqgbwz'));
return;
......@@ -741,7 +743,9 @@
// 如果上传成功
if (url != null && url.length > 0) {
// 获取光标所在位置
let length = quill.getSelection().index;
let length
// length = quill.getSelection().index;
length = quill.selection.savedRange.index
quill.insertEmbed(length, 'image', url)
// 调整光标到最后
quill.setSelection(length + 1)
......
......@@ -332,6 +332,9 @@
.ModifyVisaProduct .icon-img_bianji_small{
font-size: 12px;
}
.ModifyVisaProduct .icon-shanchu{
font-size: 12px;
}
.ModifyVisaProduct .el-upload-list{
width:500px;
}
......@@ -524,7 +527,20 @@
icon="iconfont icon-img_bianji_small"
@click="EditTag(tag,1)"
></el-button>
</el-tooltip>
</el-tooltip>
<!-- <el-tooltip
class="item"
effect="dark"
:content="$t('system.table_delete')"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-shanchu"
@click="shanchuTag(tag,1)"
></el-button>
</el-tooltip> -->
</span>
</div>
</li>
......@@ -560,6 +576,19 @@
@click="EditTag(tag,2)"
></el-button>
</el-tooltip>
<!-- <el-tooltip
class="item"
effect="dark"
:content="$t('system.table_delete')"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-shanchu"
@click="shanchuTag(tag,2)"
></el-button>
</el-tooltip> -->
</span>
</div>
</li>
......@@ -595,6 +624,19 @@
@click="EditTag(tag,3)"
></el-button>
</el-tooltip>
<!-- <el-tooltip
class="item"
effect="dark"
:content="$t('system.table_delete')"
placement="top-start"
>
<el-button
type="primary"
style="background:#409EFF; border-color:#409EFF;padding:2px"
icon="iconfont icon-shanchu"
@click="shanchuTag(tag,3)"
></el-button>
</el-tooltip> -->
</span>
</div>
</li>
......@@ -641,8 +683,11 @@
{{$t('objFill.feiyongbaohan')}}
</div>
<div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.FeeInclude = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.FeeInclude"
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></my-edit>
<my-edit
v-on:edit-value="addMsg.VisaProductInfo.FeeInclude = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.FeeInclude"
v-bind:toolbarShow="toolbar"
v-bind:referenceList="FeeInclude"
v-bind:defaultAccount="false"></my-edit>
</div>
<div class="TNtitle NotContain">
......@@ -767,7 +812,8 @@ export default {
toolbar: {
clean: false, //加粗
font: false, //字体
narrative: true //叙述,
narrative: true, //叙述,
image: true,
},
referenceList:[],
FeeInclude:[],
......@@ -1126,7 +1172,33 @@ getCompanyList() {
VisaCountry(val) {
this.GetProductLabel(val);
},
// 删除标签
shanchuTag(tag, num) {
this.productlabel.TagType = num
this.productlabel.Id = tag.Id;
this.CountryTagList = this.CountryTagList.filter(x=>x.Id!=tag.Id);
console.log(list,tag.Id)
return
this.$confirm(this.$t('objFill.shifouscbkhf'), this.$t('tips.tips'), {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: "warning"
})
.then(() => {
this.apipost('', {
Id: this.productlabel.Id
}, res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message)
} else {
this.Error(res.data.message)
}
})
})
.catch(() => {});
},
// 双击编辑标签
EditTag(tag, num) {
this.showInput(num);
......
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