Browse Source

优化

master
陈裕财 4 years ago
parent
commit
230d5ff1a8
  1. 22
      src/components/Tinymce/index.vue
  2. 2
      src/views/xm/core/xmMenuExchange/MenuUserEditor.vue
  3. 6
      src/views/xm/core/xmMenuExchange/XmMenuExchangeMng.vue
  4. 4
      src/views/xm/core/xmQuestion/XmQuestionMng.vue

22
src/components/Tinymce/index.vue

@ -63,16 +63,14 @@ export default {
},
},
data() {
var tinymceId="vue-tinymce-" + new Date().getTime() + ((Math.random() * 1000).toFixed(0) + "")
return {
uploadAction: config.getArcImagePath()+"/arc/image/upload",
uploadOptions:{branchId:'',categoryId:'uploadImm',fileName:'',remark:'',deptid:''},//
imageList: [],
dialogVisible: false,
editorHtmlData: this.value,
tinymceId:
"vue-tinymce-" +
new Date().getTime() +
((Math.random() * 1000).toFixed(0) + ""),
tinymceId: tinymceId,
fullscreen: false,
languageTypeList: {
en: "en",
@ -99,7 +97,7 @@ export default {
this.$emit("input", val);
},
language() {
this.destroyTinymce();
//this.destroyTinymce();
//this.$nextTick(() => this.initTinymce())
},
},
@ -122,13 +120,13 @@ export default {
initTinymce() {
const _this = this;
window.tinymce.init({
language: this.language,
selector: `#${this.tinymceId}`,
height: this.height,
language: _this.language,
selector: `#${_this.tinymceId}`,
height: _this.height,
body_class: "panel-body ",
object_resizing: false,
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
menubar: this.menubar,
toolbar: _this.toolbar.length > 0 ? _this.toolbar : toolbar,
menubar: _this.menubar,
plugins: plugins,
end_container_on_empty_block: true,
powerpaste_word_import: "clean",
@ -203,10 +201,10 @@ export default {
// },
});
this.setContent(this.value);
_this.setContent(_this.value);
},
destroyTinymce() {
const tinymce = window.tinymce.get(this.tinymceId);
var tinymce = window.tinymce.get(this.tinymceId);
if (this.fullscreen) {
tinymce.execCommand("mceFullScreen");
}

2
src/views/xm/core/xmMenuExchange/MenuUserEditor.vue

@ -6,7 +6,7 @@
</div>
<div class="comment-wrap">
<div class="clearfix">
<vue-editor :id="id" :branch-id="userInfo.branchId" :category-id="productId+'-'+menuId" v-model="content"></vue-editor>
<vue-editor :key="id" :branch-id="userInfo.branchId" :category-id="productId+'-'+menuId" v-model="content"></vue-editor>
</div>
<div style="margin-top:20px;"></div>
<el-button @click="publish" class="toolbar" type="primary">发布</el-button> <el-button @click="clearContent" style="margin-right: 0.25rem;" class="toolbar" type="plain"></el-button>

6
src/views/xm/core/xmMenuExchange/XmMenuExchangeMng.vue

@ -2,7 +2,7 @@
<section class="padding">
<el-row class="page-main ">
<div style="overflow-x:hidden">
<menu-user-editor :id="'head'+filters.xmMenu.menuId" v-if="filters.xmMenu" :user="{userid:userInfo.userid,username:userInfo.username,headimgurl:userInfo.headimgurl}" :product-id="filters.xmMenu.productId" :menu-id="filters.xmMenu.menuId" @publish="onPublishContent"></menu-user-editor>
<menu-user-editor key="head" :id="'head'+filters.xmMenu.menuId" v-if="filters.xmMenu" :user="{userid:userInfo.userid,username:userInfo.username,headimgurl:userInfo.headimgurl}" :product-id="filters.xmMenu.productId" :menu-id="filters.xmMenu.menuId" @publish="onPublishContent"></menu-user-editor>
<div v-for="(item,i) in xmMenuExchanges" :key="i" class="comment-list clearfix">
<div class="comment-avater">
<el-avatar icon="el-icon-user-solid"></el-avatar>
@ -14,13 +14,13 @@
<el-popover
placement="bottom"
trigger="click">
<menu-user-editor :id="'userquote'+i+item.id" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :product-id="item.productId" :menu-id="item.menuId" @publish="onPublishContent($event,item)"></menu-user-editor>
<menu-user-editor :key="'menu-'+i" :id="'menu-'+item.menuId+'-'+i" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :product-id="item.productId" :menu-id="item.menuId" @publish="onPublishContent($event,item)"></menu-user-editor>
<el-button slot="reference" type="text" style="font-size:12px;"><i class="el-icon-paperclip"></i>引用</el-button>
</el-popover>
<el-popover
placement="bottom"
trigger="click">
<menu-user-editor :id="'userreply'+i+item.id" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :product-id="item.productId" :menu-id="item.menuId" @publish="onPublishContent($event,item)"></menu-user-editor>
<menu-user-editor :key="'userreply-'+i" :id="'userreply'+i+item.id" :user="{userid:item.cuserid,username:item.cusername,headimgurl:item.cuserHeadImg}" :product-id="item.productId" :menu-id="item.menuId" @publish="onPublishContent($event,item)"></menu-user-editor>
<el-button slot="reference" type="text" style="font-size:12px;"><i class="el-icon-s-comment"></i>回复</el-button>
</el-popover>
<small>{{item.createTime}}</small>

4
src/views/xm/core/xmQuestion/XmQuestionMng.vue

@ -154,10 +154,10 @@
<el-table-column prop="askUsername" label="创建人" width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="100" show-overflow-tooltip>
<el-table-column prop="createTime" label="创建时间" sortable width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="ltime" label="更新时间" width="100" show-overflow-tooltip>
<el-table-column prop="ltime" label="更新时间" sortable width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="handlerUsername" label="指派给" width="100" show-overflow-tooltip>
</el-table-column>

Loading…
Cancel
Save