centaline-data-driven 1.6.34 → 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 +15 -0
- package/src/SearchList.vue +3 -3
- package/src/centaline/dynamicForm/src/dynamicForm.vue +42 -3
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +8 -2
- package/src/centaline/dynamicViewerFile/src/dynamicViewerPDF.vue +38 -24
- package/src/centaline/loader/src/ctl/FormList.js +26 -0
- package/src/main.js +1 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +254 -168
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
package/release-log.md
CHANGED
package/src/SearchList.vue
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<!-- CCES -->
|
|
33
33
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/agentuserlist/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/agentuserlist/getList'"></ct-searchlist> -->
|
|
34
|
-
|
|
34
|
+
<ct-searchlist :apiParam="para" :searchConditionApi="'/contractmanage/ContractList/getLayoutOfSearch'" :searchDataApi="'/contractmanage/ContractList/getList'"></ct-searchlist>
|
|
35
35
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/sunexpensemanage/sunexpenserecordlist/getLayoutOfSearch'" :searchDataApi="'/sunexpensemanage/sunexpenserecordlist/getList'"></ct-searchlist> -->
|
|
36
36
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/customermanage/ProjectCustomerList/getLayoutOfSearch'" :searchDataApi="'/customermanage/ProjectCustomerList/getList'"></ct-searchlist> -->
|
|
37
37
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/workwxmanage/WorkWXApplicationList/getLayoutOfSearch'" :searchDataApi="'/workwxmanage/WorkWXApplicationList/getList'"></ct-searchlist> -->
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/salemattersmanage/EntranceNoticeInfoList/getLayoutOfSearch'" :searchDataApi="'/salemattersmanage/EntranceNoticeInfoList/getList'"></ct-searchlist> -->
|
|
42
42
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/commissionquery/properformanceszjjbreport/getLayoutOfSearch'" :searchDataApi="'/commissionquery/properformanceszjjbreport/getList'"></ct-searchlist> -->
|
|
43
43
|
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/employeelist/getLayoutOfSearch'" :searchDataApi="'/employeelist/getList'"></ct-searchlist> -->
|
|
44
|
-
<ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist>
|
|
44
|
+
<!-- <ct-searchlist :apiParam="para" :searchConditionApi="'/estatemanage/estatlist/getLayoutOfSearch'" :searchDataApi="'/estatemanage/estatlist/getList'"></ct-searchlist> -->
|
|
45
45
|
<!-- CCES -->
|
|
46
46
|
|
|
47
47
|
<!-- <ct-searchlist :apiParam="para"
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
// appRootUrl:'http://10.88.22.13:6060/onecard-api/',
|
|
160
160
|
appRootUrl:'',
|
|
161
161
|
para:{
|
|
162
|
-
|
|
162
|
+
type: "top",
|
|
163
163
|
"deleteRight": 0,
|
|
164
164
|
"editRight": 0,
|
|
165
165
|
"browseRight": 0,
|
|
@@ -11,6 +11,21 @@
|
|
|
11
11
|
<span style="font-weight:bold">{{model.title}}</span>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
+
<!--relationParentFormFields-->
|
|
15
|
+
<el-row v-if="relationParentFormFields.length > 0">
|
|
16
|
+
<template v-for="(col, index) in relationParentFormFields">
|
|
17
|
+
<el-col :key="index" v-if="col.show !== false" :span="col.colspan" style="padding:5px">
|
|
18
|
+
<component ref="Fields" :is="col.is" :vmodel="col" :api="model.optionApi" :parentModel="model" v-bind="col.bindPara"
|
|
19
|
+
:fileData="getFileData(col)" :from="'form'" :documentHeight="documentHeight" :documentWidth="documentWidth"
|
|
20
|
+
@click="fieldClickHandler(col,$event)" @change="changeHandler(col,$event)" @enter="enterHandler(col,$event)"
|
|
21
|
+
@input="inputHandler(col,$event)" @importComplete="importComplete" @blur="blurHandler(col,$event)"
|
|
22
|
+
@popupSearchList="popupSearchListHandler" @flagNotificationParentAfterContentChanged="flagNotificationParentAfterContentChanged"
|
|
23
|
+
@popupLocation="popupLocationHandler"
|
|
24
|
+
@tableButtonClick="clickHandler"></component>
|
|
25
|
+
</el-col>
|
|
26
|
+
</template>
|
|
27
|
+
</el-row>
|
|
28
|
+
|
|
14
29
|
<!--头部元素-->
|
|
15
30
|
<el-row v-if="collapseFieldsRow.length > 0">
|
|
16
31
|
<template v-for="(col, index) in collapseFieldsRow[0]">
|
|
@@ -208,6 +223,12 @@
|
|
|
208
223
|
Boolean,
|
|
209
224
|
default: false,
|
|
210
225
|
},
|
|
226
|
+
relationParentFormFields: {
|
|
227
|
+
Array,
|
|
228
|
+
default: function () {
|
|
229
|
+
return [];
|
|
230
|
+
},
|
|
231
|
+
},
|
|
211
232
|
},
|
|
212
233
|
data() {
|
|
213
234
|
return {
|
|
@@ -1167,7 +1188,16 @@
|
|
|
1167
1188
|
var router = self.model.actionRouters.find((v) => {
|
|
1168
1189
|
return v.id === field.onAfterChanged;
|
|
1169
1190
|
});
|
|
1170
|
-
|
|
1191
|
+
if(router){
|
|
1192
|
+
self.clickHandler(router);
|
|
1193
|
+
}
|
|
1194
|
+
else{
|
|
1195
|
+
if (typeof this.model.scripts !== 'undefined') {
|
|
1196
|
+
this.model.scripts.formData.setExcuteListData(this.model.fields);
|
|
1197
|
+
}
|
|
1198
|
+
this.model.scripts.$fd = field.id;
|
|
1199
|
+
this.$common.excute.call(this.model.scripts, field.onAfterChanged);
|
|
1200
|
+
}
|
|
1171
1201
|
}
|
|
1172
1202
|
|
|
1173
1203
|
self.$forceUpdate();
|
|
@@ -1177,8 +1207,17 @@
|
|
|
1177
1207
|
if (field.onAfterChanged) {
|
|
1178
1208
|
var router = self.model.actionRouters.find((v) => {
|
|
1179
1209
|
return v.id === field.onAfterChanged;
|
|
1180
|
-
});
|
|
1181
|
-
|
|
1210
|
+
});
|
|
1211
|
+
if(router){
|
|
1212
|
+
self.clickHandler(router);
|
|
1213
|
+
}
|
|
1214
|
+
else{
|
|
1215
|
+
if (typeof this.model.scripts !== 'undefined') {
|
|
1216
|
+
this.model.scripts.formData.setExcuteListData(this.model.fields);
|
|
1217
|
+
}
|
|
1218
|
+
this.model.scripts.$fd = field.id;
|
|
1219
|
+
this.$common.excute.call(this.model.scripts, field.onAfterChanged);
|
|
1220
|
+
}
|
|
1182
1221
|
}
|
|
1183
1222
|
self.$forceUpdate();
|
|
1184
1223
|
},
|
|
@@ -795,8 +795,14 @@ import dynamicElement from '../../mixins/dynamicElement';
|
|
|
795
795
|
if (field.onAfterChanged && field.type !== 4) {
|
|
796
796
|
var router = self.model.actionRouters.find((v) => {
|
|
797
797
|
return v.id === field.onAfterChanged;
|
|
798
|
-
});
|
|
799
|
-
|
|
798
|
+
});
|
|
799
|
+
if(router){
|
|
800
|
+
self.clickHandlerfield(router);
|
|
801
|
+
}
|
|
802
|
+
else{
|
|
803
|
+
this.model.scripts.$fd = field.id;
|
|
804
|
+
this.$common.excute.call(this.model.scripts, field.onAfterChanged);
|
|
805
|
+
}
|
|
800
806
|
}
|
|
801
807
|
|
|
802
808
|
self.$forceUpdate();
|
|
@@ -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
|
-
|
|
@@ -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
|
};
|
package/src/main.js
CHANGED
|
@@ -76,7 +76,7 @@ Vue.use(centaline, {
|
|
|
76
76
|
estateId: '',
|
|
77
77
|
|
|
78
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.
|
|
79
|
+
AuthorizationCode:'Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijc5ZThjMmI3LTg5NmUtNDc5MS1iZmYxLWM5YWE2NzhlMWZmYiJ9.CRhyx5tOWgVA5l5wmcjIuAyjAlgN9zCAvLoDQ9xjHbW9iLfdz8_fjhbe3QwoS4nQ7tzrzPu97PfVZNw0mQP6cA',
|
|
80
80
|
};
|
|
81
81
|
},
|
|
82
82
|
// 请求完成事件,可判断是否登录过期执行响应操作
|