提交 6bf07bed 编写于 作者: zhujiamin's avatar zhujiamin

Revert "项目级组件和模板级组件分开放置"

This reverts commit 466f77d5.
上级 904f1ef6
...@@ -114,6 +114,16 @@ export const AppComponents = { ...@@ -114,6 +114,16 @@ export const AppComponents = {
// 搜索历史组件 // 搜索历史组件
v.component('app-search-history',() => import('@/components/app-search-history/app-search-history.vue')); v.component('app-search-history',() => import('@/components/app-search-history/app-search-history.vue'));
// 更新日志
v.component('app-update-log',() => import('@/ibiz-core/components/app-update-log/app-update-log.vue'));
// 风格切换组件
v.component('app-mob-select-changeStyle',() => import('@/ibiz-core/components/app-mob-select-changeStyle/app-mob-select-changeStyle.vue'));
// setting组件
v.component('app-setting',() => import('@/ibiz-core/components/app-setting/app-setting.vue'));
// 定制组件
v.component('app-customize',() => import('@/ibiz-core/components/app-customize/app-customize.vue'));
// 主题切换组件
v.component('app-mob-select-changeTheme',() => import('@/ibiz-core/components/app-mob-select-changeTheme/app-mob-select-changeTheme.vue'));
// 内置组件 BEGIN // 内置组件 BEGIN
}, },
}; };
\ No newline at end of file
.container {
.onecontent {
background: #fcfcfc;
.oneitem {
width: 100%;
min-height: 30px;
box-sizing: border-box;
padding: 0 15px;
// margin-bottom: 15px;
.header {
font-size: 15px;
display: flex;
justify-content: space-between;
span:nth-child(1) {
color: #1d1d1d;
}
span:nth-child(2) {
margin-left: 30px;
color: #afafaf;
}
}
.footer {
margin-top: 7px;
font-size: 14px;
font-family: Helvetica;
color: #323538;
padding-bottom: 15px;
border-bottom: 1px dashed #ececff;
.comment {
display: inline-block;
p {
margin: 0;
padding: 0;
}
}
}
}
overflow: hidden;
transition: height 1s ease;
}
.button {
background-color: #fcfcfc;
color: #8cb4e2;
margin: auto;
text-align: center;
font-size: 15px;
padding: 15px 0;
border-top: 1px solid rgb(248, 242, 242);
}
.zero {
background-color: white;
color: #8cb4e2;
margin: 0 auto;
text-align: center;
font-size: 13px;
padding: 15px 0;
}
}
<template>
<div class="container">
<div class="onecontent" ref="onecontent">
<div v-for="item in items" :key="item.id" class="oneitem" ref="oneitem">
<div class="header"><span>{{item.date}}</span> <span>{{item.method}}</span></div>
<div v-if="item.item.length > 0" class="footer">
<div v-for="(detail,index) in item.item" :key="index">
<span>{{$t('by')}} </span>
<strong>{{item.actor}}</strong>
{{item.method}}
<span v-if="item.actions !== 'closed'">
<span v-if="item.actions !=='suspended'">
<span v-if="item.actions !=='delayed'">
<strong>{{detail.file}} </strong>
</span>
</span>
<span v-if="item.actions == 'delayed'">
</span>
<span v-if="item.actions == 'commented' ">
<strong v-html="item.comment" class="comment"></strong>
</span>
<span v-if="item.actions == 'edited' ">
<span v-if="item.old">{{$t('oldvalue')}}</span> <span v-html="item.old"></span>,<span v-if="item.new">{{$t('newvalue')}}</span> <span v-html="item.new"></span>
</span>
<span v-if="item.actions == 'activated'">
<span v-if="item.old">{{$t('oldvalue')}}</span> <span v-html="item.old"></span>,<span v-if="item.new">{{$t('newvalue')}}</span> <span v-html="item.new"></span>
</span>
</span>
</div>
</div>
<div v-else class="footer">
<span>{{$t('by')}} </span>
<strong>{{item.actor}}</strong>
{{item.method}}
<span v-if="item.actions !== 'closed'">
<span v-if="item.actions !=='suspended'">
<span v-if="item.actions !=='delayed'">
<strong>{{item.file}} </strong>
</span>
</span>
<span v-if="item.actions == 'delayed'">
</span>
<span v-if="item.actions == 'commented' ">
<strong v-html="item.comment" class="comment"></strong>
</span>
<span v-if="item.actions == 'edited' ">
<span v-if="detail.old">{{$t('oldvalue')}}</span> <span v-html="detail.old"></span>,<span v-if="detail.ibiznew">{{$t('newvalue')}}</span> <span v-html="detail.ibiznew"></span>
</span>
<span v-if="item.actions == 'activated'">
<span v-if="detail.old">{{$t('oldvalue')}}</span> <span v-html="detail.old"></span>,<span v-if="detail.ibiznew">{{$t('newvalue')}}</span> <span v-html="detail.ibiznew"></span>
</span>
</span>
</div>
</div>
</div>
<div class="button" v-if="items.length > 3" ref="loadMore">
<div @click="loadMore"><span>{{text}}</span></div>
</div>
<div class="zero" v-if="items.length == 0">
<div>{{$t('nodata')}}</div>
</div>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop,Watch } from 'vue-property-decorator';
import { CodeListService } from "@/ibiz-core";
@Component({
components: {},
i18n: {
messages: {
'ZH-CN': {
by: '由',
oldvalue: '旧值为',
newvalue: '新值为',
nodata: '暂无记录',
},
'EN-US': {
by: 'By',
oldvalue: 'Old value:',
newvalue: 'New value:',
nodata: 'No data',
}
}
}
})
export default class APPHistoryList extends Vue {
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof APPHistoryList
*/
public codeListService: CodeListService = new CodeListService();
/**
* 传入数据items
*
* @type {Array}
* @memberof APPHistoryList
*/
@Prop() public items?: Array<any>;
public listItems:Array<any> = [];
/**
* 传入数据itemNameDetail
*
* @type {any}
* @memberof APPHistoryList
*/
@Prop() public itemNameDetail?:any;
/**
* 监听itemNameDetail
*
* @returns {void}
* @memberof APPHistoryList
*/
@Watch('itemNameDetail')
itemNameDetailChange(){
this.handler();
}
/**
* 监听items
*
* @returns {void}
* @memberof APPHistoryList
*/
@Watch('items',{immediate: true, deep: true})
itemsChange(){
if (this.items && this.items.length !== 0) {
this.text = '查看更多记录';
} else {
this.text = '暂无更多记录';
}
this.handler();
this.setHeight();
}
/**
* 获取代码表
*
* @returns {void}
* @memberof APPHistoryList
*/
public getCodeList(tag:string,type:string,value:any){
if (type == 'STATIC') {
let infos:any = this.$store.getters.getCodeListItems(tag);
let info:any = infos.find((v:any)=>v.value == value);
return info;
}
}
/**
* 解析代码表获取数据
*
* @returns {void}
* @memberof APPHistoryList
*/
public handler() {
if (this.items) {
this.items.forEach((v:any) => {
let file:string = "";
let method:string = "";
if (v.actions) {
let info:any = this.getCodeList(this.codeListStandard.actions.tag,'STATIC',v.actions);
v.method = info.text;
method = info.text;
if (v.actions === 'closed') {
v.item.length = 1;
}
}
if (v.item.length > 0) {
v.item.forEach((i:any) => {
i.file = (this.$t(v.objecttype+'.fields.'+i.field.toLowerCase()) as string);
v.old = i.old;
v.new = i.ibiznew;
});
}
})
}
}
/**
* 按钮文本
*
* @type {String}
* @memberof APPHistoryList
*/
public text:string = '查看更多记录';
/**
* 文本切换
*
* @type {Boolean}
* @memberof APPHistoryList
*/
public isShow:boolean = false;
/**
* 代码表规范
*
* @memberof APPHistoryList
*/
public codeListStandard :any= {
"actions":{
type:"static",
tag:"Action__type"
},
"old":{
type:"static",
tag:"Product__status"
}
}
/**
* 初始个数
*
* @type {Number}
* @memberof APPHistoryList
*/
public num:number = 3;
/**
* 初始高度
*
* @type {Number}
* @memberof APPHistoryList
*/
public startHeig:number = 0;
/**
* 终止高度
*
* @type {Number}
* @memberof APPHistoryList
*/
public endHeig:number = 0;
/**
* 点击展开
*
* @returns {void}
* @memberof APPHistoryList
*/
public loadMore():void {
this.isShow = !this.isShow;
this.text = this.isShow? '收起':'查看更多记录';
let ele:any = document.querySelector('.onecontent');
let ite:any = document.querySelectorAll('.oneitem');
this.startHeig = 0;
this.endHeig = 0;
for (let i = 0; i < this.num; i++) {
if (ite[i] != undefined) {
this.startHeig += ite[i].offsetHeight;
}
}
for (let i = 0; i <= ite.length; i++) {
if (ite[i] != undefined) {
this.endHeig += ite[i].offsetHeight;
}
}
ele.style.height = this.isShow?this.endHeig+'px': + this.startHeig+'px';
}
/**
* 生命周期created
*
* @returns {void}
* @memberof APPHistoryList
*/
public created(){
this.handler();
}
/**
* 设置初始高度
*
* @returns {void}
* @memberof APPHistoryList
*/
public setHeight() {
let ele:any = document.querySelector('.onecontent');
let ite:any = this.$refs.oneitem;
if (ite !== undefined) {
for(let i:any = 0; i < this.num; i++){
if (ite[i] !== undefined) {
this.startHeig += ite[i].offsetHeight;
}
}
}
if (ele && ele.style) {
ele.style.height = this.startHeig + 'px';
}
const userAgent:string = navigator.userAgent;
let isIOS = (userAgent: string) => /iphone/i.test(userAgent) || /ipod/i.test(userAgent) || /iPad/i.test(userAgent);
if (isIOS(userAgent)) {
let loadMore:any = this.$refs.loadMore;
if (loadMore) {
loadMore.style.marginBottom = "10px";
}
}
}
/**
* 生命周期mounted
*
* @returns {void}
* @memberof APPHistoryList
*/
public mounted(){
this.setHeight();
// console.log("this.items",this.items)
}
}
</script>
<style lang="less">
@import "./app-history-list.less";
</style>
\ No newline at end of file
.app-mob-rich-text-editor{
width: 100%;
height: 100%;
.app-mob-rich-text-editor-icon{
margin-right: 4px;
color: #777272;
font-size: 18px;
}
.rich-text-editor-info{
ol {
list-style: decimal;
}
ul{
list-style: inside;
}
}
}
.van-popup--center{
width: 100%;
.van-popup__close-icon--top-right{
display: none;
}
}
\ No newline at end of file
<template>
<div class="app-mob-rich-text-editor" >
<div class="rich-text-editor-info" v-html="showVal" ref="content" @click="open"></div>
<ion-icon class="app-mob-rich-text-editor-icon" v-if="!showVal" name="options-outline" @click.stop="open"></ion-icon>
</div>
</template>
<script lang = 'ts'>
import { Vue, Component, Prop, Model, Watch,Provide } from 'vue-property-decorator';
import { Environment } from '@/environments/environment';
import qs from 'qs';
import { ImagePreview } from 'vant';
@Component({
components: {
[ImagePreview.Component.name]: ImagePreview.Component,
},
})
export default class AppRichTextEditor extends Vue {
/**
* 值
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Prop() public value?: any;
/**
* 是否禁用
*
* @type {boolean}
* @memberof AppRichTextEditor
*/
@Prop() public disabled?: boolean;
/**
* 富文本显示值
*
* @type {boolean}
* @memberof AppRichTextEditor
*/
public showVal:string = "";
/**
* 展示的值
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Watch("value")
onValueChange(){
const url:string = this.downloadUrl.indexOf('../') === 0 ? this.downloadUrl.substring(3) : this.downloadUrl;
this.showVal = this.value ? this.value.replace(/\{(\d+)\.(bmp|jpg|jpeg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp)\}/g, `${url}/$1`) : "";
}
/**
* 上传params
*
* @type {Array<any>}
* @memberof AppRichTextEditor
*/
public upload_params: Array<any> = [];
/**
* 导出params
*
* @type {Array<any>}
* @memberof AppRichTextEditor
*/
public export_params:any ;
/**
* 上传参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Prop() public uploadparams?: any;
/**
* 下载参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Prop() public exportparams?: any;
/**
* 视图参数
*
* @type {*}
* @memberof AppRichTextEditor
*/
@Prop() public viewparams!: any;
/**
* 视图上下文
*
* @type {*}
* @memberof AppRichTextEditor
*/
@Prop() public context!: any;
/**
* 表单数据
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Prop() public data!: string;
/**
* 上传文件路径
*
* @memberof AppMobFileUpload
*/
public uploadUrl = Environment.BaseUrl + Environment.UploadFile;
/**
* 下载文件路径
*
* @memberof AppMobFileUpload
*/
public downloadUrl = Environment.BaseUrl + Environment.ExportFile;
/**
* 文件列表
*
* @memberof AppMobFileUpload
*/
@Provide() public files: Array<any> = [];
/**
* 开发模式文件数组
*
* @private
* @type {Array<any>}
* @memberof AppMobFileUpload
*/
private devFiles: Array<any> = [];
/**
* 打开富文本
*
* @type {string}
* @memberof AppRichTextEditor
*/
public open(){
if (this.disabled) {
return false;
}
let curVal:any = null;
if(this.value){
const url:string = this.downloadUrl.indexOf('../') === 0 ? this.downloadUrl.substring(3) : this.downloadUrl;
curVal = this.value.replace(/\{(\d+)\.(bmp|jpg|jpeg|png|tif|gif|pcx|tga|exif|fpx|svg|psd|cdr|pcd|dxf|ufo|eps|ai|raw|WMF|webp)\}/g, `${url}/$1`);
}
this.openPopupModal({ viewname: 'app-rich-text-pms', title: 'app-rich-text-pms'},{},{value:curVal,uploadUrl:this.uploadUrl,export_params:this.export_params});
}
/**
* 模态打开富文本
*
* @type {string}
* @memberof AppRichTextEditor
*/
private async openPopupModal(view: any, context: any, param: any): Promise<any> {
const result: any = await this.$appmodal.openModal(view, context, param);
if (result || Object.is(result.ret, 'OK')) {
this.$emit("change", result.datas[0].backEnd);
}
}
/**
* 数据处理
*
* @private
* @memberof AppMobFileUpload
*/
private dataProcess(): void {
const { context: uploadContext, param: uploadParam }
= this.$viewTool.formatNavigateParam(this.uploadparams, {}, this.context, this.viewparams, JSON.parse(this.data));
const { context: exportContext, param: exportParam }
= this.$viewTool.formatNavigateParam(this.exportparams, {}, this.context, this.viewparams, JSON.parse(this.data));
this.export_params ={exportParamStr: qs.stringify(exportParam, { delimiter: '&' }),exportContextStr:qs.stringify(exportContext, { delimiter: '&' })};
let _uploadUrl = `${Environment.BaseUrl}${Environment.UploadFile}`;
const uploadContextStr: string = qs.stringify(uploadContext, { delimiter: '&' });
const uploadParamStr: string = qs.stringify(uploadParam, { delimiter: '&' });
if (!Object.is(uploadContextStr, '') ) {
_uploadUrl = `${_uploadUrl}?${uploadContextStr}`;
}
if(!Object.is(uploadParamStr, '')){
_uploadUrl += `&${uploadParamStr}`;
}
this.uploadUrl = _uploadUrl;
}
/**
* 生命周期
*
* @private
* @memberof AppMobFileUpload
*/
public mounted(){
this.dataProcess();
this.getPictureDom();
}
/**
* 获取图片DOM进行操作
*
* @memberof AppMobFileUpload
*/
public getPictureDom(){
// 获取到所有图片dom节点
let contents:any = this.$refs.content;
let imgs:any = contents.getElementsByTagName("img");
setTimeout(() => {
Array.from(imgs).forEach((img:any)=>{
img.addEventListener('click',(event:any)=>{
this.getPreview(img.src);
event.stopPropagation();
},false)
})
}, 500);
}
/**
* 打开图片预览弹出层后
*
* @memberof AppMobFileUpload
*/
public getPreview(src:any){
ImagePreview({
images: [
src,
],
showIndex: false,
});
}
}
</script>
<style lang="less">
@import './app-mob-rich-text-editor-pms.less';
</style>
\ No newline at end of file
.richtext{
height: calc(100% - 10vh);
.quill-editor {
-webkit-touch-callout: text !important;
-webkit-user-select: text !important;
-khtml-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
img{
max-width: 90%;
}
}
.quill-editor-button {
text-align: center;
position: absolute;
bottom: 0;
width: 100%;
.rich-text-pms-btn{
width: 90%;
margin:0 auto;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
.pms-btn{
width: 45%;
}
}
}
.ql-container {
height: calc(100% - 65px);
}
.user-html{
color: rgb(16, 140, 238);
}
}
\ No newline at end of file
<template>
<div class="richtext">
<quill-editor
v-if="parmRead"
class="ql-editor quill-editor"
v-model="resloutValue"
ref="myQuillEditor"
:options="editorOption"
></quill-editor>
<ion-toolbar class="quill-editor-button">
<van-uploader v-show="false" :after-read="afterRead" ref="upload" />
<div class="rich-text-pms-btn">
<ion-button class="pms-btn" @click="onClickCancel" color="medium">{{$t('app.button.cancel')}}</ion-button>
<ion-button class="pms-btn" @click="onClickOk">{{$t('app.button.confirm')}}</ion-button>
</div>
</ion-toolbar>
</div>
</template>
<script lang = 'ts'>
import {
Vue,
Component,
Prop,
Model,
Watch,
Emit,
} from "vue-property-decorator";
import { Subject } from "rxjs";
import { Environment } from "@/environments/environment";
import axios from "axios";
import qs from "qs";
import { Quill } from "vue-quill-editor";
const BlockEmbed = Quill.import("blots/block/embed");
@Component({})
export default class AppRichTextEditor extends Vue {
/**
* 工具栏参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
public editorOption = {
modules: {
toolbar: {
container: [
"bold",
"italic",
"underline",
"strike",
"image",
{ list: "ordered" },
{ list: "bullet" },
{ color: [] },
{ background: [] },
"sourceEditor",
],
handlers: {
image: () => {
this.uploadFile(this.uploadUrl, {});
},
sourceEditor: () => {
this.open();
},
},
},
},
};
/**
* 视图参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
@Prop() protected _viewparams!: string;
/**
* 参数是否准备完毕
*
* @type {string}
* @memberof AppRichTextEditor
*/
public parmRead = false;
/**
* 上传文件路径
*
* @type {string}
* @memberof AppRichTextEditor
*/
protected uploadUrl: string = "";
/**
* 下载路径
*
* @type {string}
* @memberof AppRichTextEditor
*/
public downloadUrl = Environment.BaseUrl + Environment.ExportFile;
/**
* 下载参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
public export_params: any = {};
/**
* 双向绑定值
*
* @type {string}
* @memberof AppRichTextEditor
*/
public resloutValue: any = "";
/**
* 传给后台的数据
*
* @type {string}
* @memberof AppRichTextEditor
*/
public backEndValue: any = "";
/**
* 上传图片成功后的response.data
*
* @private
* @type {Object}
* @memberof AppRichTextEditor
*/
public resFile: any;
/**
* 生命周期
*
* @type {string}
* @memberof AppRichTextEditor
*/
public mounted() {
this.getParms();
this.thirdPartyInit();
let myquil: any = this.$refs.myQuillEditor;
if (myquil) {
myquil.quill.enable(false);
this.$nextTick(() => {
myquil.quill.enable(true);
myquil.quill.blur();
});
}
this.inintBlotName();
}
/**
* 初始化富文本 BlotName
*
* @type {string}
* @memberof AppRichTextEditor
*/
public inintBlotName() {
// 引入源码中的BlockEmbed
const BlockEmbed = Quill.import("blots/block/embed");
// 定义新的blot类型
class AppPanelEmbed extends BlockEmbed {
static create(value1: any) {
// console.log(value);
let value = value1.split("***")[0];
let value2 = value1.split("***")[1];
const node = super.create(value);
// node.setAttribute("contenteditable", "false");
node.setAttribute("style", "color: rgb(16, 140, 238);");
// node.setAttribute('width', '100%');
// 设置自定义html
node.innerHTML = this.transformValue(value);
node.setAttribute("title", value2);
return node;
}
static transformValue(value: any) {
let handleArr = value.split("\n");
handleArr = handleArr.map((e: any) =>
e.replace(/^[\s]+/, "").replace(/[\s]+$/, "")
);
return handleArr.join("");
}
// 返回节点自身的value值 用于撤销操作
static value(node: any) {
return node.innerHTML;
}
}
// blotName
AppPanelEmbed.blotName = "AppPanelEmbed";
// class名将用于匹配blot名称
// AppPanelEmbed.className = "user-html";
// 标签类型自定义
AppPanelEmbed.tagName = "user";
Quill.register(AppPanelEmbed, true);
}
/**
* 第三方容器初始化
*
* @type {function}
* @memberof AppRichTextEditor
*/
protected thirdPartyInit() {
this.$viewTool.setViewTitleOfThirdParty("编辑");
this.$viewTool.setThirdPartyEvent(this.onClickCancel);
}
/**
* 获取模态参数
*
* @type {string}
* @memberof AppRichTextEditor
*/
public getParms() {
let parm: any = JSON.parse(this._viewparams);
if (parm) {
setTimeout(() => {
this.resloutValue = parm.value ? parm.value : "";
const sourceEditorButton: any = document.querySelector(
".ql-sourceEditor"
);
sourceEditorButton.style.cssText = "";
sourceEditorButton.innerText = "@";
}, 200);
this.uploadUrl = parm.uploadUrl ? parm.uploadUrl : "";
this.export_params = parm.export_params ? parm.export_params : {};
}
this.parmRead = true;
}
/**
* 确定
*
* @memberof AppRichTextEditor
*/
public onClickOk(): void {
if (this.resFile) {
this.backEndValue = this.resFile.imgsrc.replace(
this.resFile.url,
"{" + this.resFile.id + this.resFile.ext + "}"
);
this.$emit("close", [
{ frontEnd: this.resloutValue, backEnd: this.backEndValue },
]);
} else {
this.$emit("close", [
{ frontEnd: this.resloutValue, backEnd: this.resloutValue },
]);
}
}
/**
* 取消
*
* @memberof AppRichTextEditor
*/
public onClickCancel(): void {
this.$emit("close", null);
}
/**
* 上传文件
*
* @param url 路径
* @param formData 文件对象
* @memberof AppRichTextEditor
*/
public uploadFile(url: string, formData: any) {
let up: any = this.$refs.upload;
if (up) {
up.chooseFile();
}
}
/**
* 开发模式文件数组
*
* @private
* @type {Array<any>}
* @memberof AppRichTextEditor
*/
private devFiles: Array<any> = [];
/**
* 文件选择完成
*
* @protected
* @param {*} file 文件信息
* @param {*} detail 详情
* @memberof AppRichTextEditor
*/
protected afterRead(file: any, detail: any): void {
const params = new FormData();
params.append("file", file.file, file.file.name);
const config = {
headers: {
"Content-Type": "multipart/form-data",
},
};
axios
.post(this.uploadUrl, params, config)
.then((response: any) => {
if (response && response.data && response.status === 200) {
// let data: any = response.data;
this.resFile = response.data;
// if (process.env.NODE_ENV === "development") {
this.dataProcess(
Object.assign({}, this.resFile, { url: file.content })
);
// }
} else {
}
})
.catch((response: any) => {});
}
/**
* 数据处理
*
* @private
* @memberof AppRichTextEditor
*/
private dataProcess(file: any): void {
let _downloadUrl = `${this.downloadUrl}/${file.id}`;
if (!Object.is(this.export_params.exportContextStr, '')) {
_downloadUrl = `${_downloadUrl}?${this.export_params.exportContextStr}`;
}
if(!Object.is(this.export_params.exportParamStr, '')){
_downloadUrl += `&${this.export_params.exportParamStr}`;
}
file.url = _downloadUrl;
this.resFile.url = _downloadUrl;
this.resloutValue = this.resloutValue + '<img src="' + file.url + '"alt="'+file.filename+'">';
this.resFile.imgsrc = this.resloutValue;
// this.putContent('image',file.url);
}
/**
* 光标处添加值
*
* @private
* @memberof AppRichTextEditor
*/
public putContent(type: string, content: string) {
let myquil: any = this.$refs.myQuillEditor;
if (myquil) {
myquil.quill.insertEmbed(
myquil.quill.selection.savedRange.index,
type,
content
);
}
}
/**
* @功能
*
* @private
* @memberof AppRichTextEditor
*/
public async open() {
const result: any = await this.$appmodal.openModal(
{ viewname: "user-mob-pickup-view", title: "" },
{},
{}
);
if (result || Object.is(result.ret, "OK")) {
this.putContent("AppPanelEmbed",`@${result.datas[0].srfmajortext}***${result.datas[0].account}`);
}
}
}
</script>
<style lang="less">
@import "./app-rich-text-pms.less";
</style>
\ No newline at end of file
export const UserComponent = { export const UserComponent = {
install(v: any, opt: any) { install(v: any, opt: any) {
// 历史记录插件
v.component('app-history-list',() => import('@/ibiz-core/components/app-history-list/app-history-list.vue'));
// 富文本编辑器(show)
v.component('app-mob-rich-text-editor-pms',() => import('@/ibiz-core/components/app-mob-rich-text-editor-pms/app-mob-rich-text-editor-pms.vue'));
// 富文本编辑器(edit)
v.component('app-rich-text-pms',() => import('@/ibiz-core/components/app-rich-text-pms/app-rich-text-pms.vue'));
// 定制组件
v.component('app-customize',() => import('@/ibiz-core/components/app-customize/app-customize.vue'));
// 主题切换组件
v.component('app-mob-select-changeTheme',() => import('@/ibiz-core/components/app-mob-select-changeTheme/app-mob-select-changeTheme.vue'));
// 风格切换组件
v.component('app-mob-select-changeStyle',() => import('@/ibiz-core/components/app-mob-select-changeStyle/app-mob-select-changeStyle.vue'));
// setting组件
v.component('app-setting',() => import('@/ibiz-core/components/app-setting/app-setting.vue'));
// 更新日志组件
v.component('app-update-log',() => import('@/ibiz-core/components/app-update-log/app-update-log.vue'))
} }
}; };
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册