centaline-data-driven 1.6.63 → 1.6.65

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.
Files changed (30) hide show
  1. package/build/centaline/centaline.path.js +1 -0
  2. package/package.json +2 -1
  3. package/release-log.md +22 -0
  4. package/src/SearchList.vue +2 -2
  5. package/src/SearchTree.vue +3 -3
  6. package/src/centaline/dialogList/src/dialog.vue +332 -322
  7. package/src/centaline/dynamicFile/src/dynamicFile.vue +62 -14
  8. package/src/centaline/dynamicForm/src/dynamicForm.vue +1714 -1450
  9. package/src/centaline/dynamicMarkdownViewer/index.js +11 -0
  10. package/src/centaline/dynamicMarkdownViewer/src/dynamicMarkdownViewer.vue +128 -0
  11. package/src/centaline/dynamicMo/src/dynamicMo.vue +4 -0
  12. package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -1
  13. package/src/centaline/dynamicTags/src/dynamicTags.vue +4 -0
  14. package/src/centaline/dynamicTreeList/src/dynamicTreeList.vue +2 -2
  15. package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +374 -392
  16. package/src/centaline/dynamicViewerFile/src/dynamicViewerImage.vue +1 -1
  17. package/src/centaline/loader/src/ctl/MarkdownViewer.js +17 -0
  18. package/src/centaline/loader/src/ctl/Router.js +13 -0
  19. package/src/centaline/loader/src/ctl/lib/LibFunction.js +5 -0
  20. package/src/centaline/loader/src/ctl.js +1 -0
  21. package/src/main.js +5 -5
  22. package/wwwroot/static/centaline/centaline-data-driven.js +6324 -5682
  23. package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
  24. package/wwwroot/static/centaline/fonts/element-icons.535877f5.woff +0 -0
  25. package/wwwroot/static/centaline/fonts/element-icons.732389de.ttf +0 -0
  26. package/wwwroot/static/centaline/fonts/fontawesome-webfont.674f50d2.eot +0 -0
  27. package/wwwroot/static/centaline/fonts/fontawesome-webfont.af7ae505.woff2 +0 -0
  28. package/wwwroot/static/centaline/fonts/fontawesome-webfont.b06871f2.ttf +0 -0
  29. package/wwwroot/static/centaline/fonts/fontawesome-webfont.fee66e71.woff +0 -0
  30. package/wwwroot/static/centaline/static/img/fontawesome-webfont.912ec66d.912ec66.svg +2671 -0
@@ -1,343 +1,353 @@
1
1
  <script>
2
- export default {
3
- name: 'ctDialog',
4
- props: {
5
- vmodel: Object,
6
- zindex: Number
7
- },
8
- data() {
9
- return {
10
- dialogTableVisible: true,
11
- contentLeft: 0,
12
- contentTop: 0,
13
- pane:null,
14
- captionBarButtons:[],
15
- modelSelf:null,
16
- submitCancelData:null,
17
- };
18
- },
19
- activated(){
20
- if (this.contentTop && this.$refs.content) {
21
- this.$refs.content.scrollTop=this.contentTop;
2
+ export default {
3
+ name: 'ctDialog',
4
+ props: {
5
+ vmodel: Object,
6
+ zindex: Number
7
+ },
8
+ data() {
9
+ return {
10
+ dialogTableVisible: true,
11
+ contentLeft: 0,
12
+ contentTop: 0,
13
+ pane: null,
14
+ captionBarButtons: [],
15
+ modelSelf: null,
16
+ submitCancelData: null,
17
+ };
18
+ },
19
+ activated() {
20
+ if (this.contentTop && this.$refs.content) {
21
+ this.$refs.content.scrollTop = this.contentTop;
22
+ }
23
+ },
24
+ destroyed() {
25
+ this.$off();
26
+ if (this.$el.parentNode) this.$el.parentNode.removeChild(this.$el);
27
+ this.modelSelf = null;
28
+ this.$el = null;
29
+ },
30
+ methods: {
31
+ close() {
32
+ this.$emit('close', this);
33
+ if (this.vmodel.content[0].on && typeof this.vmodel.content[0].on["closeDialog"] === "function") {
34
+ this.vmodel.content[0].on["closeDialog"](this.submitCancelData);
22
35
  }
23
36
  },
24
- destroyed (){
25
- this.$off();
26
- if(this.$el.parentNode)this.$el.parentNode.removeChild(this.$el);
27
- this.modelSelf = null;
28
- this.$el = null;
37
+ bodyClickHandler(ev) {
38
+ //ev.cancelBubble = true;
39
+ //ev.stopPropagation();
40
+ //ev.preventDefault();
29
41
  },
30
- methods: {
31
- close() {
32
- this.$emit('close', this);
33
- if (this.vmodel.content[0].on && typeof this.vmodel.content[0].on["closeDialog"] === "function") {
34
- this.vmodel.content[0].on["closeDialog"](this.submitCancelData);
35
- }
36
- },
37
- bodyClickHandler(ev) {
38
- //ev.cancelBubble = true;
39
- //ev.stopPropagation();
40
- //ev.preventDefault();
41
- },
42
- scrollHandle(ev) {
43
- this.contentTop=this.$refs.content.scrollTop;
44
- ev.cancelBubble = true;
45
- ev.stopPropagation();
46
- },
42
+ scrollHandle(ev) {
43
+ this.contentTop = this.$refs.content.scrollTop;
44
+ ev.cancelBubble = true;
45
+ ev.stopPropagation();
47
46
  },
48
- mounted() {
49
- //this.$el.parentNode.removeChild(this.$el);
50
- //if (this.vmodel.pane) {
51
- // this.vmodel.pane.$el.appendChild(this.$el);
52
- //}
53
- //else {
54
- // document.body.appendChild(this.$el);
55
- //}
56
- },
57
- render: function (h) {
58
- var self = this;
59
- this.vmodel.dialog = self;
60
- return h('div', {}, [
47
+ },
48
+ mounted() {
49
+ //this.$el.parentNode.removeChild(this.$el);
50
+ //if (this.vmodel.pane) {
51
+ // this.vmodel.pane.$el.appendChild(this.$el);
52
+ //}
53
+ //else {
54
+ // document.body.appendChild(this.$el);
55
+ //}
56
+ },
57
+ render: function (h) {
58
+ var self = this;
59
+ this.vmodel.dialog = self;
60
+ return h('div', {}, [
61
+ h('div', {
62
+ style: {
63
+ 'display': this.dialogTableVisible ? 'block' : 'none',
64
+ },
65
+ 'class': [
66
+ 'ct-dialog_app'
67
+ ],
68
+ }, [
61
69
  h('div', {
62
- style: {
63
- 'display': this.dialogTableVisible ? 'block' : 'none',
64
- },
70
+ ref: 'wrapper',
65
71
  'class': [
66
- 'ct-dialog_app'
72
+ 'ct-dialog_wrapper'
67
73
  ],
74
+ style: {
75
+ 'z-index': this.zindex,
76
+ //'wiidth': (this.vmodel.pane ? this.vmodel.pane.$el.offsetWidth : document.body.offsetWidth) + 'px',
77
+ // 'height': (self.vmodel.pane ? self.vmodel.pane.$el.offsetHeight : document.body.offsetHeight + 10) + 'px',
78
+ 'height': '100%',
79
+ 'width': '100%',
80
+ // 'height': '100%',
81
+ }
82
+
68
83
  }, [
69
- h('div', {
70
- ref: 'wrapper',
71
- 'class': [
72
- 'ct-dialog_wrapper'
73
- ],
74
- style: {
75
- 'z-index': this.zindex,
76
- //'wiidth': (this.vmodel.pane ? this.vmodel.pane.$el.offsetWidth : document.body.offsetWidth) + 'px',
77
- // 'height': (self.vmodel.pane ? self.vmodel.pane.$el.offsetHeight : document.body.offsetHeight + 10) + 'px',
78
- 'height':'100%',
79
- 'width': '100%',
80
- // 'height': '100%',
81
- }
82
-
83
- }, [
84
- //h('div', {
85
- // 'class': [
86
- // 'dialog-cover'
87
- // ]}),
88
- h('div', {
84
+ //h('div', {
85
+ // 'class': [
86
+ // 'dialog-cover'
87
+ // ]}),
88
+ h('div', {
89
+ style: {
90
+ 'margin': 'auto',
91
+ 'position': 'relative'
92
+ },
93
+ //'class': [
94
+ // 'dialog-content '
95
+ //]
96
+ },
97
+ [
98
+ h('table',
99
+ {
100
+ attrs: {
101
+ border: '0',
102
+ cellspacing: '0',
103
+ cellpadding: '0'
104
+ },
105
+ class: [
106
+ 'ct-dialog_content'
107
+ ],
89
108
  style: {
90
- 'margin': 'auto',
91
- 'position': 'relative'
92
109
  },
93
- //'class': [
94
- // 'dialog-content '
95
- //]
96
- },
110
+ on: {
111
+ click: (event) => {
112
+ this.bodyClickHandler(event);
113
+ },
114
+ }
115
+ },
97
116
  [
98
- h('table',
99
- {
100
- attrs: {
101
- border: '0',
102
- cellspacing: '0',
103
- cellpadding: '0'
104
- },
105
- class: [
106
- 'ct-dialog_content'
107
- ],
108
- style: {
109
- },
110
- on: {
111
- click: (event) => {
112
- this.bodyClickHandler(event);
117
+ h('tbody', {}, [
118
+ h('tr', {}, [
119
+ h('td', {
120
+ class: ['ct-dialog_header'],
121
+ style: {
122
+ 'position': 'relative',
123
+ 'padding': '10px 20px 10px 20px',
124
+ 'height': '44px'
113
125
  },
114
- }
115
- },
116
- [
117
- h('tbody', {}, [
118
- h('tr', {}, [
119
- h('td', {
120
- class: ['ct-dialog_header'],
126
+ }, [
127
+ h('span',
128
+ {
129
+ style: {
130
+
131
+ },
132
+ },
133
+ this.vmodel.title),
134
+ h('i', {
135
+ class: ['el-icon', 'close-mark', 'cursor'],
136
+ style: {
137
+ 'position': 'absolute',
138
+ 'right': '8px',
139
+ 'top': '10px',
140
+ 'font-size': '24px',
141
+ },
142
+ on: {
143
+ click: (event) => { this.close(event); }
144
+ }
145
+ }),
146
+ // h('i', {
147
+ // class: ['el-icon', 'question-mark'],
148
+ // style: {
149
+ // 'position': 'absolute',
150
+ // 'right': '35px',
151
+ // 'top':'10px',
152
+ // 'font-size':'24px',
153
+ // },
154
+ // on: {
155
+ // click: (event) => { this.close(event); }
156
+ // }
157
+ // })
158
+ h('div', {
159
+ style: {
160
+ 'display': 'inline-block',
161
+ 'position': 'absolute',
162
+ 'right': '44px',
163
+ 'top': '10px',
164
+ }
165
+ }, this.captionBarButtons.map((item, index) => {
166
+ let mySelf = this;
167
+ if (item.show) {
168
+ return h('ct-btn', {
169
+ props: {
170
+ key: index,
171
+ vmodel: item
172
+ },
173
+ on: {
174
+ click(ev) {
175
+ mySelf.modelSelf.self.fieldClickHandler(item)
176
+ }
177
+ }
178
+ }, [])
179
+ }
180
+ }))
181
+ ])
182
+ ]),
183
+ h('tr', {}, [
184
+ h('td', {
185
+ class: ['ct-dialog_body']
186
+ }, this.vmodel.content.map((item) => {
187
+ let mySelf = this;
188
+ function tempContent() {
189
+ if (typeof item.component !== 'undefined') {
190
+ //设置弹框标题
191
+ if (typeof item.on.loaded === "undefined") {
192
+ item.on.loaded = (model) => {
193
+ mySelf.vmodel.title = (model && model.title) ? model.title : mySelf.vmodel.title
194
+ if (model && model.captionBarButtons) {
195
+ mySelf.captionBarButtons = model.captionBarButtons
196
+ }
197
+ mySelf.modelSelf = model
198
+ }
199
+ }
200
+ //AI弹框宽度自适应
201
+ if (typeof item.on.ToggleWidth === "undefined") {
202
+ item.on.ToggleWidth = (newWidth) => {
203
+ item.attrs.width = parseFloat(item.attrs.width) + newWidth + 'px';
204
+ }
205
+ }
206
+ //加载失败关闭弹框
207
+ if (typeof item.on.failLoad === "undefined") {
208
+ item.on.failLoad = () => {
209
+ mySelf.close();
210
+ }
211
+ }
212
+ //加载submit事件后,没有关闭弹框
213
+ if (typeof item.on.submitCancel === "undefined") {
214
+ item.on.submitCancel = (ev) => {
215
+ mySelf.submitCancelData = ev;
216
+ }
217
+ }
218
+ //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
219
+ //暂时注释 高度由接口控制
220
+ var ph = 0;
221
+ if (item.attrs.height) {
222
+ ph = parseInt(item.attrs.height.replace('px', ''));
223
+ }
224
+ if (item.attrs.documentHeight && item.attrs.documentHeight != 'auto') {
225
+ let dh = parseInt(item.attrs.documentHeight.replace('px', ''));
226
+ if (dh < ph) {
227
+ item.attrs.height = item.attrs.documentHeight;
228
+ }
229
+ }
230
+ else if (self.vmodel.pane && self.vmodel.pane.$el) {
231
+ if (self.vmodel.pane.$el.clientHeight < ph + 44) {
232
+ item.attrs.height = (self.vmodel.pane.$el.clientHeight - 60) + 'px';
233
+ }
234
+ if (item.component == 'ct-form') {
235
+ item.attrs.documentHeight = (self.vmodel.pane.$el.clientHeight - 60) + 'px';
236
+ }
237
+ }
238
+ //此行代码是为了防止弹出的窗口宽度 大于父级页面的宽度
239
+ var pw = 0;
240
+ if (item.attrs.width) {
241
+ pw = parseInt(item.attrs.width.replace('px', ''));
242
+ }
243
+ if (item.attrs.documentWidth && item.attrs.documentWidth != 'auto') {
244
+ let dw = parseInt(item.attrs.documentWidth.replace('px', ''));
245
+ if (dw < pw) {
246
+ item.attrs.width = item.attrs.documentWidth;
247
+ }
248
+ }
249
+ else if (self.vmodel.pane && self.vmodel.pane.$el) {
250
+ if (self.vmodel.pane.$el.clientWidth < pw) {
251
+ item.attrs.width = (self.vmodel.pane.$el.clientWidth - 20) + 'px';
252
+ }
253
+ if (item.component == 'ct-form') {
254
+ item.attrs.documentWidth = (self.vmodel.pane.$el.clientWidth - 20) + 'px';
255
+ }
256
+ }
257
+
258
+ return h('div', {
121
259
  style: {
122
- 'position': 'relative',
123
- 'padding': '10px 20px 10px 20px',
124
- 'height': '44px'
260
+ width: item.attrs.width,
261
+ 'height': item.attrs.height,
262
+ 'overflow': 'auto',
125
263
  },
264
+ ref: 'content',
265
+ on: {
266
+ scroll: (event) => {
267
+ self.scrollHandle(event);
268
+ },
269
+ }
126
270
  }, [
127
- h('span',
128
- {
129
- style: {
130
-
131
- },
132
- },
133
- this.vmodel.title),
134
- h('i', {
135
- class: ['el-icon', 'close-mark','cursor'],
136
- style: {
137
- 'position': 'absolute',
138
- 'right': '8px',
139
- 'top':'10px',
140
- 'font-size':'24px',
141
- },
142
- on: {
143
- click: (event) => { this.close(event); }
144
- }
145
- }),
146
- // h('i', {
147
- // class: ['el-icon', 'question-mark'],
148
- // style: {
149
- // 'position': 'absolute',
150
- // 'right': '35px',
151
- // 'top':'10px',
152
- // 'font-size':'24px',
153
- // },
154
- // on: {
155
- // click: (event) => { this.close(event); }
156
- // }
157
- // })
158
- h('div',{
159
- style: {
160
- 'display':'inline-block',
161
- 'position': 'absolute',
162
- 'right': '44px',
163
- 'top':'10px',
164
- }
165
- },this.captionBarButtons.map((item,index) => {
166
- let mySelf = this;
167
- if(item.show){
168
- return h('ct-btn', {
169
- props: {
170
- key:index,
171
- vmodel:item
172
- },
173
- on: {
174
- click(ev) {
175
- mySelf.modelSelf.self.fieldClickHandler(item)
176
- }
177
- }
178
- }, [])
179
- }
180
- }))
181
- ])
182
- ]),
183
- h('tr', {}, [
184
- h('td', {
185
- class: ['ct-dialog_body']
186
- }, this.vmodel.content.map((item) => {
187
- let mySelf = this;
188
- function tempContent() {
189
- if (typeof item.component !== 'undefined') {
190
- //设置弹框标题
191
- if (typeof item.on.loaded === "undefined") {
192
- item.on.loaded = (model) => {
193
- mySelf.vmodel.title = (model && model.title) ? model.title : mySelf.vmodel.title
194
- if(model && model.captionBarButtons){
195
- mySelf.captionBarButtons = model.captionBarButtons
196
- }
197
- mySelf.modelSelf = model
198
- }
199
- }
200
- //加载失败关闭弹框
201
- if (typeof item.on.failLoad === "undefined") {
202
- item.on.failLoad = () => {
203
- mySelf.close();
204
- }
205
- }
206
- //加载submit事件后,没有关闭弹框
207
- if (typeof item.on.submitCancel === "undefined") {
208
- item.on.submitCancel = (ev) => {
209
- mySelf.submitCancelData = ev;
210
- }
211
- }
212
- //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
213
- //暂时注释 高度由接口控制
214
- var ph=0;
215
- if(item.attrs.height){
216
- ph=parseInt(item.attrs.height.replace('px',''));
217
- }
218
- if(item.attrs.documentHeight && item.attrs.documentHeight!='auto'){
219
- let dh=parseInt(item.attrs.documentHeight.replace('px',''));
220
- if(dh<ph){
221
- item.attrs.height=item.attrs.documentHeight;
222
- }
223
- }
224
- else if(self.vmodel.pane && self.vmodel.pane.$el){
225
- if(self.vmodel.pane.$el.clientHeight<ph+44) {
226
- item.attrs.height=(self.vmodel.pane.$el.clientHeight-60)+'px';
227
- }
228
- if(item.component=='ct-form'){
229
- item.attrs.documentHeight=(self.vmodel.pane.$el.clientHeight-60)+'px';
230
- }
231
- }
232
- //此行代码是为了防止弹出的窗口宽度 大于父级页面的宽度
233
- var pw=0;
234
- if(item.attrs.width){
235
- pw=parseInt(item.attrs.width.replace('px',''));
236
- }
237
- if(item.attrs.documentWidth && item.attrs.documentWidth!='auto'){
238
- let dw=parseInt(item.attrs.documentWidth.replace('px',''));
239
- if(dw<pw){
240
- item.attrs.width=item.attrs.documentWidth;
241
- }
242
- }
243
- else if(self.vmodel.pane && self.vmodel.pane.$el){
244
- if(self.vmodel.pane.$el.clientWidth<pw) {
245
- item.attrs.width=(self.vmodel.pane.$el.clientWidth-20)+'px';
246
- }
247
- if(item.component=='ct-form'){
248
- item.attrs.documentWidth=(self.vmodel.pane.$el.clientWidth-20)+'px';
249
- }
250
- }
251
-
252
- return h('div', {
253
- style: {
254
- width: item.attrs.width,
255
- 'height': item.attrs.height,
256
- 'overflow': 'auto',
257
- },
258
- ref:'content',
259
- on: {
260
- scroll: (event) => {
261
- self.scrollHandle(event);
262
- },
263
- }
264
- }, [
265
- h(item.component, {
266
- props: item.attrs,
267
- on: item.on
268
- }, [])
269
- ]);
270
- }
271
- else {
272
- //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
273
- //暂时注释 高度由接口控制
274
- var ph=0;
275
- if(item.attrs.height){
276
- ph=parseInt(item.attrs.height.replace('px',''));
277
- }
278
- if(self.vmodel.pane && self.vmodel.pane.$el.clientHeight<ph){
279
- item.attrs.height=(self.vmodel.pane.$el.clientHeight-50)+'px';
280
- }
281
- return h('div', {
282
- style: {
283
- }
284
- }, [
285
- h('iframe', {
286
- attrs: {
287
- name: 'name',
288
- id: 'id',
289
- src: item.attrs.src,
290
- frameborder: '0',
291
- align: "left",
292
- width: item.attrs.width,
293
- height: item.attrs.height,
294
- scrolling: "yes"
295
- }
296
- })
297
- ]);
298
- }
271
+ h(item.component, {
272
+ props: item.attrs,
273
+ on: item.on
274
+ }, [])
275
+ ]);
276
+ }
277
+ else {
278
+ //此行代码是为了防止弹出的窗口高度 大于父级页面的高度
279
+ //暂时注释 高度由接口控制
280
+ var ph = 0;
281
+ if (item.attrs.height) {
282
+ ph = parseInt(item.attrs.height.replace('px', ''));
283
+ }
284
+ if (self.vmodel.pane && self.vmodel.pane.$el.clientHeight < ph) {
285
+ item.attrs.height = (self.vmodel.pane.$el.clientHeight - 50) + 'px';
286
+ }
287
+ return h('div', {
288
+ style: {
299
289
  }
300
- return tempContent();
301
- }, self)//第二个参数,改变作用域
302
- )
303
- ])
304
- ])
305
- ])
290
+ }, [
291
+ h('iframe', {
292
+ attrs: {
293
+ name: 'name',
294
+ id: 'id',
295
+ src: item.attrs.src,
296
+ frameborder: '0',
297
+ align: "left",
298
+ width: item.attrs.width,
299
+ height: item.attrs.height,
300
+ scrolling: "yes"
301
+ }
302
+ })
303
+ ]);
304
+ }
305
+ }
306
+ return tempContent();
307
+ }, self)//第二个参数,改变作用域
308
+ )
309
+ ])
306
310
  ])
307
- ])
308
- ]
309
- )
310
- ])
311
- },
312
- }
311
+ ])
312
+ ])
313
+ ])
314
+ ]
315
+ )
316
+ ])
317
+ },
318
+ }
313
319
  </script>
314
320
  <style scoped>
315
- .ct-form .el-main .el-collapse{
316
- border-top:initial;
317
- border-bottom: initial;
318
- }
319
- .question-mark {
320
- background: url(../../../assets/question.png) no-repeat;
321
- background-size: 100% 100%;
322
- height: 22px;
323
- width: 22px;
324
- display: inline-block;
325
- font-weight: bold;
326
- }
327
- .question-mark:hover {
328
- background-color: #e4624c;
329
- color: fff;
330
- }
331
- .close-mark{
332
- background: url(../../../assets/close.png) no-repeat;
333
- background-size: 100% 100%;
334
- height: 26px;
335
- width: 26px;
336
- display: inline-block;
337
- font-weight: bold;
338
- }
339
- .close-mark:hover {
340
- background-color: #e4624c;
341
- color: fff;
342
- }
321
+ .ct-form .el-main .el-collapse {
322
+ border-top: initial;
323
+ border-bottom: initial;
324
+ }
325
+
326
+ .question-mark {
327
+ background: url(../../../assets/question.png) no-repeat;
328
+ background-size: 100% 100%;
329
+ height: 22px;
330
+ width: 22px;
331
+ display: inline-block;
332
+ font-weight: bold;
333
+ }
334
+
335
+ .question-mark:hover {
336
+ background-color: #e4624c;
337
+ color: fff;
338
+ }
339
+
340
+ .close-mark {
341
+ background: url(../../../assets/close.png) no-repeat;
342
+ background-size: 100% 100%;
343
+ height: 26px;
344
+ width: 26px;
345
+ display: inline-block;
346
+ font-weight: bold;
347
+ }
348
+
349
+ .close-mark:hover {
350
+ background-color: #e4624c;
351
+ color: fff;
352
+ }
343
353
  </style>