centaline-data-driven 1.2.63 → 1.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/src/centaline/dynamicContact/src/dynamicContact.vue +28 -7
- package/src/centaline/dynamicRepeat/src/dynamicRepeat.vue +0 -1
- package/src/centaline/dynamicRichText/index.js +5 -5
- package/src/centaline/dynamicRichText/src/dynamicRichText.vue +255 -11
- package/src/centaline/loader/src/ctl/RichText.js +24 -0
- package/src/centaline/loader/src/ctl/Router.js +1 -1
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +20 -16
- package/src/centaline/selectOption/src/selectOptionVertical.vue +1 -1
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centaline-data-driven",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.66",
|
|
4
4
|
"description": "ccai",
|
|
5
5
|
"author": "hjc <3226136347@qq.com>",
|
|
6
6
|
"private": false,
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
"babel-polyfill": "^6.26.0",
|
|
17
17
|
"compression-webpack-plugin": "^2.0.0",
|
|
18
18
|
"element-ui": "^2.15.7",
|
|
19
|
+
"module": "^1.2.5",
|
|
19
20
|
"sass": "^1.34.0",
|
|
20
21
|
"save": "^2.4.0",
|
|
21
|
-
"vue": "2.5.17",
|
|
22
22
|
"v-viewer": "^1.6.4",
|
|
23
|
+
"vue": "2.5.17",
|
|
24
|
+
"vue-ueditor-wrap": "^2.5.6",
|
|
23
25
|
"vuedraggable": "^2.24.3"
|
|
24
26
|
},
|
|
25
27
|
"peerDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="apiRouter!=={} && model && model.listData.length>0"
|
|
2
|
+
<div ref="contact" v-if="apiRouter!=={} && model && model.listData.length>0"
|
|
3
3
|
style="border: 1px solid #ECEFF2;box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);border-radius: 6px;
|
|
4
4
|
padding-bottom: 10px;padding-top: 10px;padding-left: 10px;display: flex;font-size: 12px;width:100%">
|
|
5
5
|
<div class="ct-so" style="width:auto;margin-right: 10px;">
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
<div>
|
|
8
8
|
<ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
|
|
9
9
|
</div>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@
|
|
10
|
+
<div slot="reference" readonly="readonly" ref="ct-input"
|
|
11
|
+
style="font-weight: Bold;color:#333333 !important;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: flex;"
|
|
12
|
+
:style="{height:inputHeight + 'px','line-height':inputLineHeight + 'px',width:inputLinewidth+'px'}"
|
|
13
|
+
@focus="focusHandle" @blur="blurHandle" @click="clickHandle" @input="inputHandler($event)" v-html="model.text"
|
|
14
|
+
@change="changeHandler($event)" :disabled="model.lock" :class="model.lock ? 'ct-is-disabled' : 'ct-input_inner'"></div>
|
|
14
15
|
</el-popover>
|
|
15
16
|
<span class="el-input__suffix" @click="clickHandle" :class="[model.attrs.size?'el-input--'+model.attrs.size:'']">
|
|
16
17
|
<span class="el-input__suffix-inner">
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
</span>
|
|
19
20
|
</span>
|
|
20
21
|
</div>
|
|
21
|
-
<div style="margin-left: 5px;display: flex;">
|
|
22
|
+
<div ref="routers" style="margin-left: 5px;display: flex;">
|
|
22
23
|
<component v-for="(router, index) in model.rowRouter" :key="index" :ref="'router'+router.id"
|
|
23
24
|
v-if="!router.rightField || model.listData[model.value][router.rightField] == 1"
|
|
24
25
|
:is="router.is" :vmodel="router" :api="model.optionApi" @click="fieldClickHandler(router)">
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
showDrop: false,
|
|
54
55
|
inputHeight: 26,
|
|
55
56
|
inputLineHeight: 26,
|
|
57
|
+
inputLinewidth: 150,
|
|
56
58
|
}
|
|
57
59
|
},
|
|
58
60
|
created() {
|
|
@@ -69,16 +71,26 @@
|
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
},
|
|
72
|
-
activated() {
|
|
74
|
+
activated() {
|
|
75
|
+
this.$nextTick(() => {
|
|
76
|
+
this.setCss();
|
|
77
|
+
})
|
|
73
78
|
},
|
|
74
79
|
methods: {
|
|
75
80
|
load(data) {
|
|
81
|
+
var self=this;
|
|
76
82
|
this.model = data;
|
|
77
83
|
this.model.$vue = self;
|
|
78
84
|
if(this.model.listData.length>0){
|
|
79
85
|
this.model.text=data.listData[0][data.columns[0].id];
|
|
80
86
|
this.model.value=0;
|
|
81
87
|
}
|
|
88
|
+
this.setCss();
|
|
89
|
+
this.$nextTick(() => {
|
|
90
|
+
window.addEventListener("resize", (ev) => {
|
|
91
|
+
self.setCss();
|
|
92
|
+
});
|
|
93
|
+
});
|
|
82
94
|
},
|
|
83
95
|
focusHandle: function () {
|
|
84
96
|
this.$refs['ct-input'].focus();
|
|
@@ -286,6 +298,15 @@
|
|
|
286
298
|
clickAcion(field,submitData);
|
|
287
299
|
}
|
|
288
300
|
},
|
|
301
|
+
setCss() {
|
|
302
|
+
this.$nextTick(() => {
|
|
303
|
+
if (this.$refs.contact) {
|
|
304
|
+
var w1 = this.$refs.contact.clientWidth | 0;
|
|
305
|
+
var w2 = this.$refs.routers.clientWidth | 0;
|
|
306
|
+
this.inputLinewidth=w1-w2-50;
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
},
|
|
289
310
|
}
|
|
290
311
|
}
|
|
291
312
|
</script>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import dynamicRichText from './src/dynamicRichText';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Vue.component(
|
|
3
|
+
dynamicRichText.install = function (Vue) {
|
|
4
|
+
Vue.component(dynamicRichText.name, dynamicRichText);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
8
|
-
window.Vue.use(
|
|
8
|
+
window.Vue.use(dynamicRichText);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export default
|
|
11
|
+
export default dynamicRichText;
|
|
@@ -1,31 +1,275 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="field-top">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
3
|
+
<template v-if="model !== null">
|
|
4
|
+
<div class="ct-rich-text" style="width:100%;display:flex" v-if="model.lock">
|
|
5
|
+
<p v-html="model.value"></p>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="ct-rich-text"
|
|
8
|
+
style="width: 100%;"
|
|
9
|
+
v-else>
|
|
10
|
+
<vue-ueditor-wrap ref="editor" v-model="model.value" :config="config"></vue-ueditor-wrap>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
6
13
|
</div>
|
|
7
14
|
</template>
|
|
8
15
|
<script>
|
|
9
|
-
|
|
16
|
+
|
|
17
|
+
import VueUeditorWrap from 'vue-ueditor-wrap'
|
|
18
|
+
|
|
19
|
+
import dynamicElement from "../../mixins/dynamicElement";
|
|
20
|
+
import Enum from "../../loader/src/ctl/lib/Enum";
|
|
21
|
+
|
|
10
22
|
export default {
|
|
11
|
-
name:
|
|
23
|
+
name: "ct-rich-text",
|
|
12
24
|
mixins: [dynamicElement],
|
|
25
|
+
components: {
|
|
26
|
+
VueUeditorWrap,
|
|
27
|
+
},
|
|
13
28
|
props: {
|
|
14
|
-
vmodel: Object
|
|
29
|
+
vmodel: Object,
|
|
15
30
|
},
|
|
16
31
|
data() {
|
|
32
|
+
const that = this;
|
|
17
33
|
return {
|
|
34
|
+
editor: {},
|
|
35
|
+
config: {
|
|
36
|
+
imageUrl: "",
|
|
37
|
+
serverUrl: "",
|
|
38
|
+
UEDITOR_HOME_URL: '/static/UEditor/',
|
|
39
|
+
readonly: false,
|
|
40
|
+
initialFrameHeight: 300,
|
|
41
|
+
initialFrameWidth: '100%',
|
|
42
|
+
autoFloatEnabled: true,
|
|
43
|
+
maximumWords: 5000,
|
|
44
|
+
toolbars: [[
|
|
45
|
+
'fullscreen',
|
|
46
|
+
'source',
|
|
47
|
+
'|',
|
|
48
|
+
'undo',
|
|
49
|
+
'redo',
|
|
50
|
+
'|',
|
|
51
|
+
'bold',
|
|
52
|
+
'italic',
|
|
53
|
+
'underline',
|
|
54
|
+
'fontborder',
|
|
55
|
+
'strikethrough',
|
|
56
|
+
'superscript',
|
|
57
|
+
'subscript',
|
|
58
|
+
'removeformat',
|
|
59
|
+
'formatmatch',
|
|
60
|
+
'autotypeset',
|
|
61
|
+
'blockquote',
|
|
62
|
+
'pasteplain',
|
|
63
|
+
'|',
|
|
64
|
+
'forecolor',
|
|
65
|
+
'backcolor',
|
|
66
|
+
'insertorderedlist',
|
|
67
|
+
'insertunorderedlist',
|
|
68
|
+
'selectall',
|
|
69
|
+
'cleardoc',
|
|
70
|
+
'|',
|
|
71
|
+
'rowspacingtop',
|
|
72
|
+
'rowspacingbottom',
|
|
73
|
+
'lineheight',
|
|
74
|
+
'|',
|
|
75
|
+
'customstyle',
|
|
76
|
+
'paragraph',
|
|
77
|
+
'fontfamily',
|
|
78
|
+
'fontsize',
|
|
79
|
+
'|',
|
|
80
|
+
'directionalityltr',
|
|
81
|
+
'directionalityrtl',
|
|
82
|
+
'indent',
|
|
83
|
+
'|',
|
|
84
|
+
'justifyleft',
|
|
85
|
+
'justifycenter',
|
|
86
|
+
'justifyright',
|
|
87
|
+
'justifyjustify',
|
|
88
|
+
'|',
|
|
89
|
+
'touppercase',
|
|
90
|
+
'tolowercase',
|
|
91
|
+
'|',
|
|
92
|
+
'link',
|
|
93
|
+
'unlink',
|
|
94
|
+
'anchor',
|
|
95
|
+
'|',
|
|
96
|
+
'imagenone',
|
|
97
|
+
'imageleft',
|
|
98
|
+
'imageright',
|
|
99
|
+
'imagecenter',
|
|
100
|
+
'|',
|
|
101
|
+
//'simpleupload',
|
|
102
|
+
'insertimage',
|
|
103
|
+
'emotion',
|
|
104
|
+
'scrawl',
|
|
105
|
+
'insertvideo',
|
|
106
|
+
'music',
|
|
107
|
+
'attachment',
|
|
108
|
+
'map',
|
|
109
|
+
'gmap',
|
|
110
|
+
'insertframe',
|
|
111
|
+
'insertcode',
|
|
112
|
+
'webapp',
|
|
113
|
+
'pagebreak',
|
|
114
|
+
'template',
|
|
115
|
+
'background',
|
|
116
|
+
'|',
|
|
117
|
+
'horizontal',
|
|
118
|
+
'date',
|
|
119
|
+
'time',
|
|
120
|
+
'spechars',
|
|
121
|
+
'wordimage',
|
|
122
|
+
'|',
|
|
123
|
+
'inserttable',
|
|
124
|
+
'deletetable',
|
|
125
|
+
'insertparagraphbeforetable',
|
|
126
|
+
'insertrow',
|
|
127
|
+
'deleterow',
|
|
128
|
+
'insertcol',
|
|
129
|
+
'deletecol',
|
|
130
|
+
'mergecells',
|
|
131
|
+
'mergeright',
|
|
132
|
+
'mergedown',
|
|
133
|
+
'splittocells',
|
|
134
|
+
'splittorows',
|
|
135
|
+
'splittocols',
|
|
136
|
+
'charts',
|
|
137
|
+
'|',
|
|
138
|
+
'print',
|
|
139
|
+
'preview',
|
|
140
|
+
'searchreplace',
|
|
141
|
+
'drafts',
|
|
142
|
+
'help'
|
|
143
|
+
]],
|
|
144
|
+
zIndex: 16777271,
|
|
145
|
+
/* 上传图片配置项 */
|
|
146
|
+
"imageActionName": "uploadimage222", /* 执行上传图片的action名称 */
|
|
147
|
+
"imageFieldName": "file", /* 提交的图片表单名称 */
|
|
148
|
+
"imageMaxSize": 2048000, /* 上传大小限制,单位B */
|
|
149
|
+
"imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */
|
|
150
|
+
"imageCompressEnable": true, /* 是否压缩图片,默认是true */
|
|
151
|
+
"imageCompressBorder": 1600, /* 图片压缩最长边限制 */
|
|
152
|
+
"imageInsertAlign": "none", /* 插入的图片浮动方式 */
|
|
153
|
+
"imageUrlPrefix": "", /* 图片访问路径前缀 */
|
|
154
|
+
"imagePathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
155
|
+
/* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
|
|
156
|
+
/* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
|
|
157
|
+
/* {time} 会替换成时间戳 */
|
|
158
|
+
/* {yyyy} 会替换成四位年份 */
|
|
159
|
+
/* {yy} 会替换成两位年份 */
|
|
160
|
+
/* {mm} 会替换成两位月份 */
|
|
161
|
+
/* {dd} 会替换成两位日期 */
|
|
162
|
+
/* {hh} 会替换成两位小时 */
|
|
163
|
+
/* {ii} 会替换成两位分钟 */
|
|
164
|
+
/* {ss} 会替换成两位秒 */
|
|
165
|
+
/* 非法字符 \ : * ? " < > | */
|
|
166
|
+
/* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */
|
|
167
|
+
|
|
168
|
+
/* 涂鸦图片上传配置项 */
|
|
169
|
+
"scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */
|
|
170
|
+
"scrawlFieldName": "file", /* 提交的图片表单名称 */
|
|
171
|
+
"scrawlPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
172
|
+
"scrawlMaxSize": 2048000, /* 上传大小限制,单位B */
|
|
173
|
+
"scrawlUrlPrefix": "", /* 图片访问路径前缀 */
|
|
174
|
+
"scrawlInsertAlign": "none",
|
|
175
|
+
|
|
176
|
+
/* 截图工具上传 */
|
|
177
|
+
"snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */
|
|
178
|
+
"snapscreenPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
179
|
+
"snapscreenUrlPrefix": "", /* 图片访问路径前缀 */
|
|
180
|
+
"snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */
|
|
181
|
+
|
|
182
|
+
/* 抓取远程图片配置 */
|
|
183
|
+
"catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"],
|
|
184
|
+
"catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */
|
|
185
|
+
"catcherFieldName": "source", /* 提交的图片列表表单名称 */
|
|
186
|
+
"catcherPathFormat": "/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
187
|
+
"catcherUrlPrefix": "", /* 图片访问路径前缀 */
|
|
188
|
+
"catcherMaxSize": 2048000, /* 上传大小限制,单位B */
|
|
189
|
+
"catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */
|
|
190
|
+
|
|
191
|
+
/* 上传视频配置 */
|
|
192
|
+
"videoActionName": "uploadvideo", /* 执行上传视频的action名称 */
|
|
193
|
+
"videoFieldName": "file", /* 提交的视频表单名称 */
|
|
194
|
+
"videoPathFormat": "/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
195
|
+
"videoUrlPrefix": "", /* 视频访问路径前缀 */
|
|
196
|
+
"videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */
|
|
197
|
+
"videoAllowFiles": [
|
|
198
|
+
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
|
|
199
|
+
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */
|
|
200
|
+
|
|
201
|
+
/* 上传文件配置 */
|
|
202
|
+
"fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
|
|
203
|
+
"fileFieldName": "file", /* 提交的文件表单名称 */
|
|
204
|
+
"filePathFormat": "/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
|
205
|
+
"fileUrlPrefix": "", /* 文件访问路径前缀 */
|
|
206
|
+
"fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
|
|
207
|
+
"fileAllowFiles": [
|
|
208
|
+
".png", ".jpg", ".jpeg", ".gif", ".bmp",
|
|
209
|
+
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
|
|
210
|
+
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
|
|
211
|
+
".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
|
|
212
|
+
".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
|
|
213
|
+
], /* 上传文件格式显示 */
|
|
214
|
+
|
|
215
|
+
/* 列出指定目录下的图片 */
|
|
216
|
+
"imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
|
|
217
|
+
"imageManagerListPath": "/ueditor/jsp/upload/image/", /* 指定要列出图片的目录 */
|
|
218
|
+
"imageManagerListSize": 20, /* 每次列出文件数量 */
|
|
219
|
+
"imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
|
|
220
|
+
"imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
|
|
221
|
+
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
|
|
222
|
+
|
|
223
|
+
/* 列出指定目录下的文件 */
|
|
224
|
+
"fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
|
|
225
|
+
"fileManagerListPath": "/ueditor/jsp/upload/file/", /* 指定要列出文件的目录 */
|
|
226
|
+
"fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
|
|
227
|
+
"fileManagerListSize": 20, /* 每次列出文件数量 */
|
|
228
|
+
"fileManagerAllowFiles": [
|
|
229
|
+
".png", ".jpg", ".jpeg", ".gif", ".bmp",
|
|
230
|
+
".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg",
|
|
231
|
+
".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid",
|
|
232
|
+
".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso",
|
|
233
|
+
".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml"
|
|
234
|
+
] /* 列出的文件类型 */
|
|
235
|
+
},/* 前后端通信相关的配置,注释只允许使用多行方式 */
|
|
236
|
+
|
|
18
237
|
}
|
|
19
238
|
},
|
|
20
239
|
created() {
|
|
21
|
-
|
|
240
|
+
debugger
|
|
241
|
+
if (typeof this.vmodel === "undefined") {
|
|
22
242
|
this.model = this.loaderObj.Base(this.source);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
243
|
+
} else {
|
|
25
244
|
this.model = this.vmodel;
|
|
26
245
|
}
|
|
27
|
-
|
|
28
|
-
|
|
246
|
+
|
|
247
|
+
if (this.model.action == "" && !this.model.lock) {
|
|
248
|
+
this.$message.warning("请配置富文本Action!");
|
|
249
|
+
this.config.toolbars = [['help']];
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
this.config.maximumWords = this.model && this.model.maxValue1 ? parseFloat(this.model.maxValue1) : 5000;
|
|
253
|
+
this.config.serverUrl = this.model.action;
|
|
254
|
+
this.config.imageUrl = this.model.action;
|
|
255
|
+
},
|
|
256
|
+
computed: {
|
|
257
|
+
|
|
258
|
+
},
|
|
259
|
+
mounted() {
|
|
260
|
+
|
|
261
|
+
},
|
|
262
|
+
beforeDestroy: function () {
|
|
263
|
+
|
|
264
|
+
},
|
|
265
|
+
methods: {
|
|
266
|
+
|
|
267
|
+
},
|
|
268
|
+
watch: {
|
|
269
|
+
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
</script>
|
|
29
273
|
<style>
|
|
30
274
|
.ct-rich-text {
|
|
31
275
|
min-height: 28px;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import valid from '../../../validate/index';
|
|
4
|
+
import Axios from 'axios';
|
|
5
|
+
import common from '../../../common';
|
|
6
|
+
import Vue from 'vue';
|
|
7
|
+
const RichText = function (source, router) {
|
|
8
|
+
var rtn = {
|
|
9
|
+
options: [{ code: source.code1, name: source.name1 }],
|
|
10
|
+
get value() {
|
|
11
|
+
return source.code1;
|
|
12
|
+
},
|
|
13
|
+
set value(v) {
|
|
14
|
+
source.code1 = v;
|
|
15
|
+
},
|
|
16
|
+
get action() {
|
|
17
|
+
return router &&router.action ? router.action : "";//上传完整地址
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
rtn = base.copy(Base(source), rtn);
|
|
21
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
22
|
+
return rtn;
|
|
23
|
+
}
|
|
24
|
+
export default RichText;
|
|
@@ -34,12 +34,13 @@ import Cb from '../Cb';
|
|
|
34
34
|
import PhotoSelect from '../PhotoSelect';
|
|
35
35
|
import Repeat from '../Repeat';
|
|
36
36
|
import Compound from '../Compound';
|
|
37
|
+
import RichText from '../RichText';
|
|
37
38
|
|
|
38
39
|
const LibFunction = {
|
|
39
40
|
install(Vue) {
|
|
40
41
|
},
|
|
41
42
|
GetControl(field, source, showLabel, isList) {
|
|
42
|
-
|
|
43
|
+
|
|
43
44
|
let item;
|
|
44
45
|
field.isList = isList;
|
|
45
46
|
if (typeof field.required === 'undefined') {
|
|
@@ -80,7 +81,7 @@ const LibFunction = {
|
|
|
80
81
|
field.width = field.width || 280;
|
|
81
82
|
}
|
|
82
83
|
else if (field.controlType === Enum.ControlType.RadioButton) {
|
|
83
|
-
if(!field.displayLabelAfterSelected){
|
|
84
|
+
if (!field.displayLabelAfterSelected) {
|
|
84
85
|
showLabel = false;
|
|
85
86
|
}
|
|
86
87
|
field.width = field.width || 300;
|
|
@@ -175,9 +176,9 @@ const LibFunction = {
|
|
|
175
176
|
item.is = 'ct-date';
|
|
176
177
|
break;
|
|
177
178
|
case Enum.ControlType.DateYearMonth://年份-月份
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
item = D(field, 'month');
|
|
180
|
+
item.is = 'ct-date';
|
|
181
|
+
break;
|
|
181
182
|
case Enum.ControlType.DateTime://日期时间
|
|
182
183
|
item = D(field, 'datetime');
|
|
183
184
|
item.is = 'ct-date';
|
|
@@ -256,22 +257,22 @@ const LibFunction = {
|
|
|
256
257
|
item = Button(field);
|
|
257
258
|
item.is = 'ct-btn';
|
|
258
259
|
item.action = 'search';
|
|
259
|
-
item.attrs.class=item.attrs.class+' max-search-btn ';
|
|
260
|
+
item.attrs.class = item.attrs.class + ' max-search-btn ';
|
|
260
261
|
break;
|
|
261
262
|
case Enum.ControlType.ButtonAdvancedSearch://高级查询按钮
|
|
262
263
|
item = Button(field);
|
|
263
264
|
item.is = 'ct-btn';
|
|
264
265
|
item.action = 'showHigh';
|
|
265
|
-
item.attrs.class=item.attrs.class+' max-search-btn ';
|
|
266
|
-
item.icon='max-open';
|
|
266
|
+
item.attrs.class = item.attrs.class + ' max-search-btn ';
|
|
267
|
+
item.icon = 'max-open';
|
|
267
268
|
break;
|
|
268
269
|
case Enum.ControlType.ButtonReset://重置查询按钮
|
|
269
270
|
item = Button(field);
|
|
270
271
|
item.is = 'ct-btn';
|
|
271
272
|
item.action = 'reset';
|
|
272
|
-
item.bgColor='#519DA6';
|
|
273
|
-
item.borderColor='#519DA6';
|
|
274
|
-
item.attrs.class=item.attrs.class+' max-reset-btn ';
|
|
273
|
+
item.bgColor = '#519DA6';
|
|
274
|
+
item.borderColor = '#519DA6';
|
|
275
|
+
item.attrs.class = item.attrs.class + ' max-reset-btn ';
|
|
275
276
|
break;
|
|
276
277
|
case Enum.ControlType.File://文件
|
|
277
278
|
var router = source.actionRouters.find((v1) => {
|
|
@@ -314,7 +315,10 @@ const LibFunction = {
|
|
|
314
315
|
item.is = 'ct-text';
|
|
315
316
|
break;
|
|
316
317
|
case Enum.ControlType.RichText://富文本框
|
|
317
|
-
|
|
318
|
+
var router = source.actionRouters.find((v1) => {
|
|
319
|
+
return v1.key === field.fieldName1;
|
|
320
|
+
});
|
|
321
|
+
item = RichText(field, router);
|
|
318
322
|
item.is = 'ct-rich-text';
|
|
319
323
|
break;
|
|
320
324
|
case Enum.ControlType.MultiComboBoxWithTextBox://多个下拉框后面带1个文本框,下拉框最多支持3个
|
|
@@ -341,9 +345,9 @@ const LibFunction = {
|
|
|
341
345
|
item.is = 'ct-hyperLink';
|
|
342
346
|
break;
|
|
343
347
|
case Enum.ControlType.HyperlinkListWithLabel://带标签的超链接列表
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
348
|
+
item = HyperLinkList(field);
|
|
349
|
+
item.is = 'ct-hyperLinkList';
|
|
350
|
+
break;
|
|
347
351
|
case Enum.ControlType.PlaceHolder://占位控件
|
|
348
352
|
item = PlaceHolder(field);
|
|
349
353
|
item.is = 'ct-ph';
|
|
@@ -369,7 +373,7 @@ const LibFunction = {
|
|
|
369
373
|
var num;
|
|
370
374
|
var colNum = source.colSpan ? source.colSpan : 3;
|
|
371
375
|
if (item1.excLine) {
|
|
372
|
-
num =
|
|
376
|
+
num = 24;
|
|
373
377
|
}
|
|
374
378
|
else if (field.spanCols > 0) {
|
|
375
379
|
num = field.spanCols * (24 / colNum);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="ct-selectOptionVertical" style="">
|
|
3
3
|
<ul>
|
|
4
4
|
<li v-for="(op, index) in model.options" :key="index" :class="[getOptionSelect(op[model.optionAttrs.value])?'select':'']" @click="selectOption(op[model.optionAttrs.value])">
|
|
5
|
-
<
|
|
5
|
+
<div v-html="op[model.optionAttrs.displayLabel]||op[model.optionAttrs.label]"></div>
|
|
6
6
|
</li>
|
|
7
7
|
</ul>
|
|
8
8
|
</div>
|
package/src/main.js
CHANGED
|
@@ -12,7 +12,7 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
12
12
|
// 关闭生产模式下给出的提示
|
|
13
13
|
Vue.config.productionTip = false;
|
|
14
14
|
Vue.use(centaline, {
|
|
15
|
-
baseUrl: "http://10.88.22.
|
|
15
|
+
baseUrl: "http://10.88.22.13:7070/v1/form/router",
|
|
16
16
|
// baseUrl: "http://10.88.23.22:9999/v1/form/router",
|
|
17
17
|
// baseUrl: "http://tjcptest.centaline.com.cn/",
|
|
18
18
|
// flagRouterSelf: true,
|