Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,103 @@
|
|||||||
|
<!-- UEditor -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<script id="editor" type="text/plain" ></script>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/* eslint-disable */
|
||||||
|
// import 'ueditor/example/public/ueditor/ueditor.config'
|
||||||
|
// import 'ueditor/example/public/ueditor/ueditor.all'
|
||||||
|
// import 'ueditor/example/public/ueditor/lang/zh-cn/zh-cn'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// import '@/../public/ueditor/ueditor.config.js'
|
||||||
|
// import '@/../public/ueditor/ueditor.all.js'
|
||||||
|
// import '@/../public/ueditor/lang/zh-cn/zh-cn.js'
|
||||||
|
export default {
|
||||||
|
name: 'UEditor',
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
editor: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getUEContent: function () {
|
||||||
|
// return this.editor.ready(()=>{
|
||||||
|
// this.editor.getContent()
|
||||||
|
// })
|
||||||
|
return this.editor.getContent()
|
||||||
|
},
|
||||||
|
getContentTxt: function () {
|
||||||
|
return this.editor.getContentTxt()
|
||||||
|
},
|
||||||
|
setContent (content) {
|
||||||
|
return this.editor.ready(()=>{
|
||||||
|
this.editor.setContent(content,true)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 清空内容
|
||||||
|
execCommand (content) {
|
||||||
|
return this.editor.execCommand('cleardoc')
|
||||||
|
},
|
||||||
|
getContentLength () {
|
||||||
|
return this.editor.getContentLength()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
config: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
fontfamily: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
fontsize: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
bold: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
content:{
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
// 初始化UE
|
||||||
|
this.editor = UE.delEditor('editor')
|
||||||
|
this.editor = UE.getEditor('editor', this.config)
|
||||||
|
let _this = this
|
||||||
|
UE.getEditor('editor').addListener('blur',function(editor){
|
||||||
|
_this.$emit('editor-onChange', _this.getUEContent())
|
||||||
|
});
|
||||||
|
UE.getEditor('editor').ready(function() {
|
||||||
|
if (_this.fontfamily !== '') {
|
||||||
|
UE.getEditor('editor').execCommand( 'fontfamily',_this.fontfamily)
|
||||||
|
}
|
||||||
|
if (_this.content !== '') {
|
||||||
|
UE.getEditor('editor').setContent(_this.content)
|
||||||
|
}
|
||||||
|
if (_this.fontsize !== '') {
|
||||||
|
UE.getEditor('editor').execCommand( 'fontsize', _this.fontsize )
|
||||||
|
}
|
||||||
|
if (_this.bold) {
|
||||||
|
UE.getEditor('editor').execCommand('bold')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
destoryed () {
|
||||||
|
this.editor.destory()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -184,8 +184,8 @@
|
|||||||
console.log("------------WebSocket连接成功");
|
console.log("------------WebSocket连接成功");
|
||||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
let userId = store.getters.userInfo.id;
|
let userId = store.getters.userInfo.id;
|
||||||
// let url = window._CONFIG['domianWebSocketURL'].replace("https://","wss://").replace("http://","ws://") + '/websocket/socketServer'
|
let url = window._CONFIG['domianWebSocketURL'].replace("https://","wss://").replace("http://","ws://") + '/websocket/socketServer'
|
||||||
let url = 'http://139.9.235.66:8008/jero-boot'.replace("https://","wss://").replace("http://","ws://") + '/websocket/socketServer'
|
// let url = 'http://139.9.235.66:8008/jero-boot'.replace("https://","wss://").replace("http://","ws://") + '/websocket/socketServer'
|
||||||
this.websock = new WebSocket(url);
|
this.websock = new WebSocket(url);
|
||||||
this.websock.onopen = this.websocketOnopen;
|
this.websock.onopen = this.websocketOnopen;
|
||||||
this.websock.onerror = this.websocketOnerror;
|
this.websock.onerror = this.websocketOnerror;
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
try {
|
try {
|
||||||
self.websock.send('test')
|
self.websock.send('test')
|
||||||
console.log('发送消息');
|
// console.log('发送消息');
|
||||||
}catch(err){
|
}catch(err){
|
||||||
console.log('断开了:' + err);
|
console.log('断开了:' + err);
|
||||||
self.connection()
|
self.connection()
|
||||||
@@ -213,9 +213,9 @@
|
|||||||
this.reconnect();
|
this.reconnect();
|
||||||
},
|
},
|
||||||
websocketOnmessage: function (e) {
|
websocketOnmessage: function (e) {
|
||||||
console.log("WebSocket连接数据1111",e);
|
// console.log("WebSocket连接数据1111",e);
|
||||||
if(e.data=='1'){
|
if(e.data=='1'){
|
||||||
console.log('data改变')
|
// console.log('data改变')
|
||||||
eventBUs.$emit('searchReset')
|
eventBUs.$emit('searchReset')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,6 +117,17 @@
|
|||||||
</a-modal>
|
</a-modal>
|
||||||
<!-- 上传图片弹框-->
|
<!-- 上传图片弹框-->
|
||||||
<split-upload v-if="splitVisible" ref="uploadFile2" :disabled="disabled" :accept="accept" :title="titleImg" :listType='listType' :splitVisible="splitVisible" @uploadSuccess="uploadSuccess"></split-upload>
|
<split-upload v-if="splitVisible" ref="uploadFile2" :disabled="disabled" :accept="accept" :title="titleImg" :listType='listType' :splitVisible="splitVisible" @uploadSuccess="uploadSuccess"></split-upload>
|
||||||
|
<!-- 表格弹框-->
|
||||||
|
<a-modal
|
||||||
|
:title="titleTable"
|
||||||
|
class="split-title"
|
||||||
|
:visible="tableVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
>
|
||||||
|
<!-- <u-editor :content="ueContent" :config=config ref="ueditor" @editor-onChange="uEditorChange"></u-editor>-->
|
||||||
|
</a-modal>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,13 +136,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import splitUpload from '@/components/splitUpload/index'
|
import splitUpload from '@/components/splitUpload/index'
|
||||||
|
// import uEditor from '@/components/ueditor/index'
|
||||||
export default {
|
export default {
|
||||||
name: 'splitAddForm',
|
name: 'splitAddForm',
|
||||||
components:{
|
components:{
|
||||||
splitUpload
|
splitUpload,
|
||||||
|
// uEditor
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
titleTable:'表格',
|
||||||
title:this.$t('newClause'),
|
title:this.$t('newClause'),
|
||||||
TitlePreImg:'',
|
TitlePreImg:'',
|
||||||
contentList:[
|
contentList:[
|
||||||
@@ -182,8 +196,105 @@
|
|||||||
splitVisible:false,
|
splitVisible:false,
|
||||||
tableVisible:false,
|
tableVisible:false,
|
||||||
preImgVisible:false, //图片预览
|
preImgVisible:false, //图片预览
|
||||||
itemSrc:'' //预览图片
|
itemSrc:'', //预览图片
|
||||||
|
ueContent: '',
|
||||||
|
// UE编辑器配置
|
||||||
|
config: {
|
||||||
|
// 可以在此处定义工具栏的内容
|
||||||
|
toolbars: [
|
||||||
|
[
|
||||||
|
'undo', // 撤销
|
||||||
|
'redo', // 重做
|
||||||
|
'bold', // 加粗
|
||||||
|
'italic', // 斜体
|
||||||
|
'underline', // 下划线
|
||||||
|
'strikethrough', // 删除线
|
||||||
|
'subscript', // 下标
|
||||||
|
'superscript', // 上标
|
||||||
|
'fontborder', // 字符边框
|
||||||
|
'fontfamily', // 字体
|
||||||
|
'fontsize', // 字号
|
||||||
|
'forecolor', // 字体颜色
|
||||||
|
// 'backcolor', // 背景色
|
||||||
|
'paragraph', // 段落格式
|
||||||
|
'customstyle', // 自定义标题
|
||||||
|
'indent', // 首行缩进
|
||||||
|
'justifyleft', // 居左对齐
|
||||||
|
'justifyright', // 居右对齐
|
||||||
|
'justifycenter', // 居中对齐
|
||||||
|
'justifyjustify', // 两端对齐
|
||||||
|
'lineheight', // 行间距,
|
||||||
|
'rowspacingtop', // 段前距
|
||||||
|
'rowspacingbottom', // 段后距
|
||||||
|
'directionalityltr', // 从左向右输入
|
||||||
|
'directionalityrtl', // 从右向左输入
|
||||||
|
'fullscreen' // 全屏
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'cleardoc', // 清空文档
|
||||||
|
'formatmatch', // 格式刷
|
||||||
|
'removeformat', // 清除格式
|
||||||
|
'source', // 源代码
|
||||||
|
'blockquote', // 引用
|
||||||
|
'pasteplain', // 纯文本粘贴模式
|
||||||
|
'selectall', // 全选
|
||||||
|
'horizontal', // 分隔线
|
||||||
|
'time', // 时间
|
||||||
|
'date', // 日期
|
||||||
|
'link', // 超链接
|
||||||
|
'unlink', // 取消链接
|
||||||
|
// 'background', // 背景
|
||||||
|
// 'simpleupload', // 单图上传
|
||||||
|
'imagenone', // 默认
|
||||||
|
'imageleft', // 左浮动
|
||||||
|
'imageright', // 右浮动
|
||||||
|
'imagecenter', // 居中
|
||||||
|
'touppercase', // 字母大写
|
||||||
|
'tolowercase', // 字母小写
|
||||||
|
'emotion', // 表情
|
||||||
|
'spechars', // 特殊字符
|
||||||
|
'searchreplace', // 查询替换
|
||||||
|
'insertunorderedlist', // 无序列表
|
||||||
|
'insertorderedlist', // 有序列表
|
||||||
|
'pagebreak', // 分页
|
||||||
|
'insertframe', // 插入Iframe
|
||||||
|
'charts', // 图表
|
||||||
|
'edittip ', // 编辑提示
|
||||||
|
'autotypeset', // 自动排版
|
||||||
|
'drafts' // 从草稿箱加载
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'inserttable', // 插入表格
|
||||||
|
'deletetable', // 删除表格,
|
||||||
|
'insertparagraphbeforetable', // ”表格前插入行”
|
||||||
|
'insertrow', // 前插入行
|
||||||
|
'insertcol', // 前插入列
|
||||||
|
'mergeright', // 右合并单元格
|
||||||
|
'mergedown', // 下合并单元格
|
||||||
|
'deleterow', // 删除行
|
||||||
|
'deletecol', // 删除列
|
||||||
|
'splittorows', // 拆分成行
|
||||||
|
'splittocols', // 拆分成列
|
||||||
|
'splittocells', // 完全拆分单元格
|
||||||
|
'inserttitle', // 插入标题
|
||||||
|
'deletecaption', // 删除表格标题,
|
||||||
|
'mergecells', // 合并多个单元格
|
||||||
|
'edittable', // 表格属性
|
||||||
|
'edittd' // 单元格属性
|
||||||
|
]
|
||||||
|
],
|
||||||
|
autoHeightEnabled: false,
|
||||||
|
autoFloatEnabled: false,
|
||||||
|
initialContent: '', // 初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
|
||||||
|
autoClearinitialContent: true, // 是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
|
||||||
|
initialFrameWidth: 650,
|
||||||
|
elementPathEnabled: false,
|
||||||
|
initialFrameHeight: 300,
|
||||||
|
maximumWords: 4000,
|
||||||
|
BaseUrl: '',
|
||||||
|
UEDITOR_HOME_URL: 'ueditor/',
|
||||||
|
editTableIndex: 1
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -294,6 +405,9 @@
|
|||||||
handlePreImgCancel(){
|
handlePreImgCancel(){
|
||||||
this.preImgVisible=false
|
this.preImgVisible=false
|
||||||
},
|
},
|
||||||
|
uEditorChange () {
|
||||||
|
this.itemContent = this.$refs.ueditor.getUEContent()
|
||||||
|
},
|
||||||
//正则替换小数点
|
//正则替换小数点
|
||||||
limitNumber(value) {
|
limitNumber(value) {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
|
|||||||
@@ -92,31 +92,31 @@
|
|||||||
title: this.$t('ChineseName'),
|
title: this.$t('ChineseName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dbFieldTxt_dictText',
|
dataIndex: 'dbFieldTxt',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('enName'),
|
title: this.$t('enName'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'dbFieldEnName_dictText',
|
dataIndex: 'dbFieldEnName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('AttributeType'),
|
title: this.$t('AttributeType'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: 'fieldShowType_dictText',
|
dataIndex: 'fieldShowTypeName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('FieldLength'),
|
title: this.$t('FieldLength'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'dbLength_dictText'
|
dataIndex: 'dbLength'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DisplayOrder'),
|
title: this.$t('DisplayOrder'),
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 80,
|
width: 80,
|
||||||
dataIndex: 'orderNum_dictText'
|
dataIndex: 'orderNum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('DisplayArea'),
|
title: this.$t('DisplayArea'),
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{x: true}"
|
:scroll="{x: true}"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:data-source="tableData"
|
:data-source="dataSource"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
@@ -155,9 +155,7 @@
|
|||||||
return {
|
return {
|
||||||
searchOption: [],
|
searchOption: [],
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
tableData: [
|
dataSource: [],
|
||||||
{}
|
|
||||||
],
|
|
||||||
url: {
|
url: {
|
||||||
queryCondition: 'search/document/queryCondition',
|
queryCondition: 'search/document/queryCondition',
|
||||||
getInfoList: 'search/document/getInfoList',
|
getInfoList: 'search/document/getInfoList',
|
||||||
|
|||||||
Reference in New Issue
Block a user