Commit e7a366c8 authored by youjie's avatar youjie

签证 富文本上传图

parent 1c2a393e
...@@ -678,6 +678,7 @@ ...@@ -678,6 +678,7 @@
this.myQuillEditor = "editer_" + this.guid(); this.myQuillEditor = "editer_" + this.guid();
this.myImageUploader = "imageUploader_" + this.guid(); this.myImageUploader = "imageUploader_" + this.guid();
this.editorOption.modules.toolbar = "#" + this.myToolbar; this.editorOption.modules.toolbar = "#" + this.myToolbar;
if (this.toolbarShow != null) { if (this.toolbarShow != null) {
for (let key in this.toolbarShow) { for (let key in this.toolbarShow) {
this.toolbar[key] = this.toolbarShow[key]; this.toolbar[key] = this.toolbarShow[key];
...@@ -726,7 +727,8 @@ ...@@ -726,7 +727,8 @@
// 获取富文本组件实例 // 获取富文本组件实例
let quill = this.$refs[this.myQuillEditor].quill let quill = this.$refs[this.myQuillEditor].quill
try { try {
quill.getSelection().index; // quill.getSelection().index;
quill.selection.savedRange.index;
} catch (err) { } catch (err) {
this.$message.error(this.$t('objFill.wufahqgbwz')); this.$message.error(this.$t('objFill.wufahqgbwz'));
return; return;
...@@ -741,7 +743,9 @@ ...@@ -741,7 +743,9 @@
// 如果上传成功 // 如果上传成功
if (url != null && url.length > 0) { 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.insertEmbed(length, 'image', url)
// 调整光标到最后 // 调整光标到最后
quill.setSelection(length + 1) quill.setSelection(length + 1)
......
...@@ -332,6 +332,9 @@ ...@@ -332,6 +332,9 @@
.ModifyVisaProduct .icon-img_bianji_small{ .ModifyVisaProduct .icon-img_bianji_small{
font-size: 12px; font-size: 12px;
} }
.ModifyVisaProduct .icon-shanchu{
font-size: 12px;
}
.ModifyVisaProduct .el-upload-list{ .ModifyVisaProduct .el-upload-list{
width:500px; width:500px;
} }
...@@ -525,6 +528,19 @@ ...@@ -525,6 +528,19 @@
@click="EditTag(tag,1)" @click="EditTag(tag,1)"
></el-button> ></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> </span>
</div> </div>
</li> </li>
...@@ -560,6 +576,19 @@ ...@@ -560,6 +576,19 @@
@click="EditTag(tag,2)" @click="EditTag(tag,2)"
></el-button> ></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,2)"
></el-button>
</el-tooltip> -->
</span> </span>
</div> </div>
</li> </li>
...@@ -595,6 +624,19 @@ ...@@ -595,6 +624,19 @@
@click="EditTag(tag,3)" @click="EditTag(tag,3)"
></el-button> ></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,3)"
></el-button>
</el-tooltip> -->
</span> </span>
</div> </div>
</li> </li>
...@@ -641,8 +683,11 @@ ...@@ -641,8 +683,11 @@
{{$t('objFill.feiyongbaohan')}} {{$t('objFill.feiyongbaohan')}}
</div> </div>
<div class="ql-container"> <div class="ql-container">
<my-edit v-on:edit-value="addMsg.VisaProductInfo.FeeInclude = arguments[0]" v-bind:editValue="addMsg.VisaProductInfo.FeeInclude" <my-edit
v-bind:toolbarShow="toolbar" v-bind:referenceList="FeeInclude" v-bind:defaultAccount="false"></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>
<div class="TNtitle NotContain"> <div class="TNtitle NotContain">
...@@ -767,7 +812,8 @@ export default { ...@@ -767,7 +812,8 @@ export default {
toolbar: { toolbar: {
clean: false, //加粗 clean: false, //加粗
font: false, //字体 font: false, //字体
narrative: true //叙述, narrative: true, //叙述,
image: true,
}, },
referenceList:[], referenceList:[],
FeeInclude:[], FeeInclude:[],
...@@ -1126,7 +1172,33 @@ getCompanyList() { ...@@ -1126,7 +1172,33 @@ getCompanyList() {
VisaCountry(val) { VisaCountry(val) {
this.GetProductLabel(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) { EditTag(tag, num) {
this.showInput(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