centaline-data-driven 1.6.33 → 1.6.35
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 +1 -1
- package/release-log.md +28 -0
- package/src/SearchList.vue +17 -4
- package/src/centaline/dynamicFile/src/dynamicFile.vue +99 -29
- package/src/centaline/dynamicForm/src/dynamicForm.vue +42 -3
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +8 -2
- package/src/centaline/dynamicSos/src/dynamicSos.vue +20 -12
- package/src/centaline/dynamicTags/src/dynamicTags.vue +15 -7
- package/src/centaline/dynamicTreeList/src/dynamicTreeList.vue +75 -24
- package/src/centaline/dynamicViewerFile/src/dynamicViewerPDF.vue +38 -24
- package/src/centaline/loader/src/ctl/File.js +4 -2
- package/src/centaline/loader/src/ctl/FormList.js +26 -0
- package/src/centaline/loader/src/ctl/lib/Enum.js +6 -19
- package/src/centaline/selectOption/src/selectOptionVertical.vue +1 -0
- package/src/main.js +4 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +463 -267
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id="app-Tree" style="height:100%;">
|
|
3
3
|
<el-container style="height: calc(100vh - 98px);" ref="tree_left">
|
|
4
|
-
<el-aside :width="
|
|
4
|
+
<el-aside :width="asideWidth ? asideWidth + 'px' : '15%'"
|
|
5
5
|
style="background-color:white;border-radius: 6px;overflow-y:hidden">
|
|
6
|
-
<ct-searchtree :flagsearch="true" :searchConditionApi="searchConditionApi" :searchDataApi="searchDataApi"
|
|
7
|
-
@loaded="loaded"></ct-searchtree>
|
|
6
|
+
<ct-searchtree :flagsearch="true" :searchConditionApi="searchConditionApi" :searchDataApi="searchDataApi"
|
|
7
|
+
:searchtreeHeight="searchtreeHeight" @loaded="loaded"></ct-searchtree>
|
|
8
|
+
|
|
8
9
|
</el-aside>
|
|
9
|
-
<el-main v-if="isShowMain">
|
|
10
|
-
|
|
11
|
-
<template v-if="pageType=='form'">
|
|
10
|
+
<el-main v-if="isShowMain" style="position: relative;">
|
|
11
|
+
<div class="resizer" @mousedown="startResizing"></div>
|
|
12
|
+
<template v-if="pageType == 'form'">
|
|
12
13
|
<div style="height: calc(100vh - 120px);">
|
|
13
|
-
<div class="ct-form"
|
|
14
|
+
<div class="ct-form"
|
|
15
|
+
:style="{ 'width': (width ? width + 'px' : 'auto'), 'height': (height ? height + 'px' : 'auto') }">
|
|
14
16
|
<ct-form :api="formApi" :api-param="apiParam" :width="width" :height="height"></ct-form>
|
|
15
17
|
</div>
|
|
16
18
|
</div>
|
|
@@ -52,16 +54,28 @@ export default {
|
|
|
52
54
|
isShowMain: false,
|
|
53
55
|
pageType: 'list',
|
|
54
56
|
apiParam: {},
|
|
55
|
-
searchtreeHeight:0,
|
|
57
|
+
searchtreeHeight: 0,
|
|
58
|
+
dataRowRouter: "",
|
|
59
|
+
asideWidth: 200,
|
|
60
|
+
isResizing: false,
|
|
61
|
+
startX: 0,
|
|
62
|
+
startWidth: 0
|
|
56
63
|
};
|
|
57
64
|
},
|
|
58
65
|
methods: {
|
|
59
66
|
loaded(data) {
|
|
60
|
-
|
|
67
|
+
this.asideWidth = Number(this.leftWidth ? this.leftWidth : 200);
|
|
68
|
+
|
|
61
69
|
var self = this;
|
|
62
70
|
self.isShowMain = false;
|
|
63
71
|
self.pageType = "list";
|
|
64
72
|
if (data && data.rowRouter && (JSON.stringify(data.rowRouter) != "{}")) {
|
|
73
|
+
|
|
74
|
+
self.dataRowRouter = JSON.stringify(data.rowRouter);
|
|
75
|
+
let localStorageWidth = window.localStorage.getItem(self.dataRowRouter);
|
|
76
|
+
localStorageWidth = localStorageWidth ? localStorageWidth : self.asideWidth + "";
|
|
77
|
+
self.asideWidth = Number(localStorageWidth);
|
|
78
|
+
|
|
65
79
|
self.formApi = data.rowRouter.getLayout;
|
|
66
80
|
self.pageType = data.rowRouter.pageType != undefined ? data.rowRouter.pageType : "list";
|
|
67
81
|
self.width = parseFloat(data.rowRouter.width != undefined ? data.rowRouter.width : "0");
|
|
@@ -83,35 +97,64 @@ export default {
|
|
|
83
97
|
}
|
|
84
98
|
|
|
85
99
|
});
|
|
86
|
-
}
|
|
100
|
+
}
|
|
87
101
|
this.$emit('loaded');
|
|
88
102
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
103
|
+
setsearchtreeHeight() {
|
|
104
|
+
let self = this;
|
|
105
|
+
if (self.$refs.tree_left && self.$refs.tree_left.$el) {
|
|
93
106
|
self.searchtreeHeight = self.$refs.tree_left.$el.offsetHeight;
|
|
94
107
|
}
|
|
95
|
-
|
|
108
|
+
},
|
|
109
|
+
startResizing(event) {
|
|
110
|
+
this.isResizing = true;
|
|
111
|
+
this.startX = event.clientX;
|
|
112
|
+
this.startWidth = this.asideWidth;
|
|
113
|
+
document.addEventListener('mousemove', this.resizeAside);
|
|
114
|
+
document.addEventListener('mouseup', this.stopResizing);
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
resizeAside(event) {
|
|
118
|
+
if ( this.isResizing) {
|
|
119
|
+
const newWidth = this.startWidth + (event.clientX - this.startX);
|
|
120
|
+
this.asideWidth = newWidth > 50 ? newWidth : 50; // 设置最小宽度为 50px
|
|
121
|
+
window.localStorage.setItem(this.dataRowRouter, this.asideWidth);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
stopResizing() {
|
|
126
|
+
this.isResizing = false;
|
|
127
|
+
document.removeEventListener('mousemove', this.resizeAside);
|
|
128
|
+
document.removeEventListener('mouseup', this.stopResizing);
|
|
129
|
+
}
|
|
96
130
|
},
|
|
97
|
-
created() {
|
|
131
|
+
created() {
|
|
98
132
|
this.model = this.vmodel;
|
|
99
133
|
},
|
|
100
134
|
mounted() {
|
|
101
135
|
let self = this;
|
|
102
136
|
window.addEventListener('resize', function () {
|
|
103
137
|
self.$nextTick(() => {
|
|
104
|
-
|
|
138
|
+
self.setsearchtreeHeight();
|
|
105
139
|
})
|
|
106
140
|
})
|
|
107
|
-
|
|
141
|
+
self.setsearchtreeHeight();
|
|
142
|
+
document.addEventListener('mouseup', this.stopResizing);
|
|
143
|
+
|
|
108
144
|
},
|
|
109
|
-
activated(){
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
145
|
+
activated() {
|
|
146
|
+
let self = this;
|
|
147
|
+
self.$nextTick(() => {
|
|
148
|
+
self.setsearchtreeHeight();
|
|
149
|
+
document.addEventListener('mouseup', self.stopResizing);
|
|
150
|
+
})
|
|
151
|
+
},
|
|
152
|
+
deactivated() {
|
|
153
|
+
document.removeEventListener('mouseup', this.stopResizing);
|
|
154
|
+
},
|
|
155
|
+
unmounted() {
|
|
156
|
+
document.removeEventListener('mouseup', this.stopResizing);
|
|
157
|
+
}
|
|
115
158
|
}
|
|
116
159
|
|
|
117
160
|
</script>
|
|
@@ -129,5 +172,13 @@ export default {
|
|
|
129
172
|
-webkit-box-shadow: #cfcece 0px 7px 9px 0px !important;
|
|
130
173
|
border-radius: 6px !important;
|
|
131
174
|
margin-top: 14px;
|
|
175
|
+
}
|
|
176
|
+
.resizer {
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 0;
|
|
179
|
+
left: 0;
|
|
180
|
+
width: 2px;
|
|
181
|
+
height: 100%;
|
|
182
|
+
cursor: ew-resize;
|
|
132
183
|
}
|
|
133
184
|
</style>
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
<template>
|
|
3
2
|
<div v-loading="loading">
|
|
4
|
-
<iframe
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:src="'/static/pdf/web/viewer.html?' + fileUrl"
|
|
8
|
-
:height="displayAreaHeight - 78 + 'px'"
|
|
9
|
-
:width="displayAreaWidth + 'px'"
|
|
10
|
-
@load="complete()"
|
|
11
|
-
@contextmenu="handleMouse" style="border-width: 0px;"
|
|
12
|
-
>
|
|
3
|
+
<iframe ref="previewPdf" id="previewPdf" :src="'/static/pdf/web/viewer.html?' + fileUrl"
|
|
4
|
+
:height="displayAreaHeight - 78 + 'px'" :width="displayAreaWidth + 'px'" @load="complete()"
|
|
5
|
+
@contextmenu="handleMouse" style="border-width: 0px;">
|
|
13
6
|
</iframe>
|
|
14
7
|
</div>
|
|
15
8
|
</template>
|
|
@@ -22,7 +15,7 @@ export default {
|
|
|
22
15
|
},
|
|
23
16
|
data() {
|
|
24
17
|
return {
|
|
25
|
-
|
|
18
|
+
loading: true,
|
|
26
19
|
numPages: 1,
|
|
27
20
|
fileUrl: "",
|
|
28
21
|
};
|
|
@@ -30,32 +23,53 @@ export default {
|
|
|
30
23
|
mounted() {
|
|
31
24
|
this.init(this.pdfUrl);
|
|
32
25
|
},
|
|
33
|
-
created() {
|
|
26
|
+
created() {
|
|
34
27
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
methods: {
|
|
29
|
+
handleMouse(e) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
},
|
|
39
32
|
init(pdfUrl) {
|
|
40
33
|
var self = this;
|
|
41
|
-
self.fileUrl = 'r='+Math.random()+'&file='+encodeURIComponent(pdfUrl);
|
|
34
|
+
self.fileUrl = 'r=' + Math.random() + '&file=' + encodeURIComponent(pdfUrl);
|
|
42
35
|
},
|
|
43
36
|
complete() {
|
|
44
|
-
|
|
37
|
+
this.loading = false;
|
|
45
38
|
var doc = document.getElementById("previewPdf").contentWindow.document;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
elementHideById("download",doc)
|
|
40
|
+
elementHideById("openFile",doc)
|
|
41
|
+
elementHideById("print",doc)
|
|
42
|
+
elementHideById("viewBookmark",doc)
|
|
43
|
+
|
|
44
|
+
elementHideById("editorHighlightButton",doc)
|
|
45
|
+
elementHideById("editorFreeText",doc)
|
|
46
|
+
elementHideById("editorInk",doc)
|
|
47
|
+
elementHideById("editorStamp",doc)
|
|
48
|
+
elementHideById("editorModeButtons",doc)
|
|
49
|
+
|
|
50
|
+
elementHideById("printButton",doc)
|
|
51
|
+
elementHideById("downloadButton",doc)
|
|
52
|
+
|
|
53
|
+
elementHideById("secondaryOpenFile",doc)
|
|
54
|
+
elementHideById("cursorToolButtons",doc)
|
|
55
|
+
elementHideById("documentProperties",doc)
|
|
56
|
+
|
|
50
57
|
doc.oncontextmenu = new Function("event.returnValue=false");
|
|
51
58
|
},
|
|
52
59
|
},
|
|
53
60
|
watch: {
|
|
54
61
|
pdfUrl(newValue, oldValue) {
|
|
55
|
-
|
|
62
|
+
this.loading = true;
|
|
56
63
|
this.init(newValue);
|
|
57
64
|
},
|
|
58
65
|
},
|
|
59
66
|
};
|
|
67
|
+
|
|
68
|
+
function elementHideById(elementId, doc) {
|
|
69
|
+
if (doc.getElementById(elementId) != null) {
|
|
70
|
+
if (doc.getElementById(elementId).style) {
|
|
71
|
+
doc.getElementById(elementId).style.display = "none";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
60
75
|
</script>
|
|
61
|
-
|
|
@@ -323,7 +323,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
323
323
|
classify.file.source.mediaLabelID = classify.option[rtn.optionModel.optionAttrs.value];
|
|
324
324
|
},
|
|
325
325
|
handleAvatarSuccess(res, file, fileList) {
|
|
326
|
-
if (res
|
|
326
|
+
if (Object.prototype.toString.call(res ) === '[object Object]') {
|
|
327
|
+
if ( res.rtnCode === Enum.ReturnCode.Successful) {
|
|
327
328
|
var media = res.content[0];
|
|
328
329
|
media.mediaLabelID =file.mediaLabelID || rtn.mediaLabe.mediaLabelID;
|
|
329
330
|
media.mediaLabelName = file.mediaLabelName || rtn.mediaLabe.mediaLabelName;
|
|
@@ -368,7 +369,8 @@ const box = function (source, fileSourceList, router, optionApi,videoPlayIconUrl
|
|
|
368
369
|
type: 'error',
|
|
369
370
|
showClose:true,
|
|
370
371
|
});
|
|
371
|
-
|
|
372
|
+
}
|
|
373
|
+
}
|
|
372
374
|
},
|
|
373
375
|
addfileItem(file) {
|
|
374
376
|
let awaitfile = {
|
|
@@ -440,6 +440,7 @@ const FormList = function (source, master) {
|
|
|
440
440
|
width: rtn.pageWidth+'px',
|
|
441
441
|
height: rtn.pageHeight+'px',
|
|
442
442
|
parentModelForm:self.$self.parentModel,
|
|
443
|
+
relationParentFormFields:rtn.getRelationParentFormFields(),
|
|
443
444
|
},
|
|
444
445
|
on: {
|
|
445
446
|
submit: function (ev) {
|
|
@@ -452,6 +453,7 @@ const FormList = function (source, master) {
|
|
|
452
453
|
Vue.set(row[findex], 'code1', ev.formData.source.fields[findex].code1);
|
|
453
454
|
Vue.set(row[findex], 'name1', ev.formData.source.fields[findex].name1);
|
|
454
455
|
Vue.set(row[findex], 'locked', ev.formData.source.fields[findex].locked);
|
|
456
|
+
Vue.set(row[findex], 'required', ev.formData.source.fields[findex].required);
|
|
455
457
|
switch(ev.formData.source.fields[findex].controlType){
|
|
456
458
|
case 19:
|
|
457
459
|
case 20:
|
|
@@ -525,6 +527,7 @@ const FormList = function (source, master) {
|
|
|
525
527
|
width: rtn.pageWidth+'px',
|
|
526
528
|
height: rtn.pageHeight+'px',
|
|
527
529
|
parentModelForm:self.$self.parentModel,
|
|
530
|
+
relationParentFormFields:rtn.getRelationParentFormFields(),
|
|
528
531
|
},
|
|
529
532
|
on: {
|
|
530
533
|
submit: function (ev) {
|
|
@@ -534,6 +537,7 @@ const FormList = function (source, master) {
|
|
|
534
537
|
field.code1 = ev.formData.source.fields[findex].code1;
|
|
535
538
|
field.name1 = ev.formData.source.fields[findex].name1;
|
|
536
539
|
field.locked = ev.formData.source.fields[findex].locked;
|
|
540
|
+
field.required = ev.formData.source.fields[findex].required;
|
|
537
541
|
switch(ev.formData.source.fields[findex].controlType){
|
|
538
542
|
case 19:
|
|
539
543
|
case 20:
|
|
@@ -785,6 +789,28 @@ const FormList = function (source, master) {
|
|
|
785
789
|
get frozenColumns() {
|
|
786
790
|
return source.frozenColumns || [];
|
|
787
791
|
},
|
|
792
|
+
get relationParentFormFields() {
|
|
793
|
+
return source.relationParentFormFields;
|
|
794
|
+
},
|
|
795
|
+
getRelationParentFormFields(){
|
|
796
|
+
let relfields=[];
|
|
797
|
+
if(rtn.relationParentFormFields){
|
|
798
|
+
if(rtn.form && rtn.form.fieldsDic){
|
|
799
|
+
(rtn.relationParentFormFields.split(',')).forEach(function(f){
|
|
800
|
+
if(rtn.form.fieldsDic[f]){
|
|
801
|
+
let newField={...rtn.form.fieldsDic[f]};
|
|
802
|
+
newField.is='ct-labelText';
|
|
803
|
+
newField.type=Enum.ControlType.Label;
|
|
804
|
+
newField.colspan=24;
|
|
805
|
+
newField.required=false;
|
|
806
|
+
newField.labelClass='';
|
|
807
|
+
relfields.push(newField);
|
|
808
|
+
}
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
return relfields;
|
|
813
|
+
}
|
|
788
814
|
};
|
|
789
815
|
return rtn;
|
|
790
816
|
};
|
|
@@ -643,32 +643,19 @@ const Enum = {
|
|
|
643
643
|
/// <summary>
|
|
644
644
|
/// 平台类型
|
|
645
645
|
/// </summary>
|
|
646
|
-
Platform: {
|
|
647
|
-
/// <summary>
|
|
648
|
-
///
|
|
649
|
-
/// </summary>
|
|
646
|
+
Platform: {
|
|
650
647
|
iOS: 0,
|
|
651
|
-
|
|
652
|
-
/// <summary>
|
|
653
|
-
///
|
|
654
|
-
/// </summary>
|
|
655
|
-
Android: 1,
|
|
656
|
-
|
|
657
|
-
/// <summary>
|
|
658
|
-
///
|
|
659
|
-
/// </summary>
|
|
660
|
-
///
|
|
648
|
+
Android: 1,
|
|
661
649
|
WEB: 2,
|
|
662
|
-
/// <summary>
|
|
663
|
-
///
|
|
664
|
-
/// </summary>
|
|
665
|
-
|
|
666
650
|
WeChat: 3,
|
|
667
|
-
|
|
668
651
|
/// <summary>
|
|
669
652
|
///
|
|
670
653
|
/// </summary>
|
|
671
654
|
WeChatMiniProgram: 4,
|
|
655
|
+
/// <summary>
|
|
656
|
+
/// 鸿蒙 Next
|
|
657
|
+
/// </summary>
|
|
658
|
+
Harmony:5,
|
|
672
659
|
|
|
673
660
|
/// <summary>
|
|
674
661
|
///
|
package/src/main.js
CHANGED
|
@@ -15,6 +15,7 @@ Vue.use(ElementUI, { size: 'mini'});
|
|
|
15
15
|
Vue.config.productionTip = false;
|
|
16
16
|
Vue.use(centaline, {
|
|
17
17
|
// baseUrl: "http://10.88.22.46:17070/max-uplink-api/",
|
|
18
|
+
// baseUrl: "http://10.88.22.46:9004/max-uplink-api/",
|
|
18
19
|
// baseUrl: "http://10.88.22.46:6060/onecard-api/",
|
|
19
20
|
baseUrl: "http://10.88.22.46:9999/service-api/",
|
|
20
21
|
// baseUrl: "http://10.88.22.46:22324/service-api/v1/form/router",
|
|
@@ -68,14 +69,14 @@ Vue.use(centaline, {
|
|
|
68
69
|
return {
|
|
69
70
|
oldToken: 'da18df1e-9ee2-49fd-a5ca-a3e17c8947e5',
|
|
70
71
|
token:'aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjksOwjAMBe-SdS05tuPE7PpJNhwCBWglWCHaSiDE3SniEGznjfTm5eb16HYuIUWltoc-sYKkYGDcF_ApGWYzjrE_CHOHKANQxAJSYgYTCYBoahaC0qAHJc6lbRW8bLuUbpNIBDS3QTJhZiHXuPFxczsfmXxCJG3cpS4_gMb6Bes83vfj8x9x1-Wy3eJ48seQJuCaziATTWDRIlSazCNrlerd-wMAAP__.93H7c7k4TLTqbKpozp0aTSU4U_WrQu3eS990iS-TCpw',
|
|
71
|
-
// authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.
|
|
72
|
+
// authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjktqAzEQBe-itRv6Oy15J3mkTQ5hxnEPOKsQ25AQcveIXCK7R_Gg6jvdn5d0TOxr174QtE4CyipzCQOi2drq6M35XEa1vKICc2mgwwfk4gJGRSrm3HrTcz4hMTKBnaqDejWoNgpIX9Qz-oqN0yHF53s6kouhEGU9pNv2-ANadP4meN7j4yW-_iPu7XGbWovd46oIsV9tatEgRwmg14V1l4tssaWfXwAAAP__.sF1LYLtwnVq8_fFcoq7FA9hy44G1H7SMCYBmZqeKnLY"}',
|
|
72
73
|
|
|
73
74
|
// originalRequestURL: 'http://10.88.22.67:8080',
|
|
74
75
|
EstateInfo: '{"estateId":"1c581b7c-d629-4670-8a7c-6d622860bc58","estateName":"0%E9%87%91%E9%9A%85%E4%BA%91%E7%AD%91%E5%A4%A9%E6%B4%A5","estDeptPath":"009.014.001.001"}',
|
|
75
76
|
estateId: '',
|
|
76
77
|
|
|
77
|
-
authObject: '{"currentEstate":{},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"
|
|
78
|
-
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.
|
|
78
|
+
authObject: '{"currentEstate":{},"platform":1,"osVersion":"","clientVersion":"","machineCode":"eeb8e2fc88b5bcbc2e4f297777142537","token":"","random":"588NJK","time":1733886962541,"sign":"7cb413ac60ed50fe406c9b91c8d4a836","systemSource":"CCESU","empNo":"hqxtgl","empId":"2411121446336B97FBEB7FD54905A903"}',
|
|
79
|
+
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5ZThjMmI3LTg5NmUtNDc5MS1iZmYxLWM5YWE2NzhlMWZmYiJ9.CRhyx5tOWgVA5l5wmcjIuAyjAlgN9zCAvLoDQ9xjHbW9iLfdz8_fjhbe3QwoS4nQ7tzrzPu97PfVZNw0mQP6cA',
|
|
79
80
|
};
|
|
80
81
|
},
|
|
81
82
|
// 请求完成事件,可判断是否登录过期执行响应操作
|