centaline-data-driven 1.2.78 → 1.2.81
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/build/centaline/centaline.path.js +0 -2
- package/package.json +1 -1
- package/src/Form.vue +5 -4
- package/src/SearchList.vue +9 -3
- package/src/centaline/css/max.css +4 -1
- package/src/centaline/dynamicContact/src/dynamicContact.vue +5 -1
- package/src/centaline/dynamicDetail/src/dynamicContactList.vue +6 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +5 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertySimpleDetailRET.vue +5 -1
- package/src/centaline/dynamicForm/index.js +0 -4
- package/src/centaline/dynamicForm/src/dynamicForm.vue +12 -3
- package/src/centaline/dynamicForm/src/dynamicFormListTable.vue +7 -0
- package/src/centaline/dynamicLayout/src/dynamicLayout.vue +16 -270
- package/src/centaline/dynamicLayout/src/dynamicLayoutChildren.vue +6 -12
- package/src/centaline/dynamicLayout/src/dynamicLayoutImage.vue +55 -6
- package/src/centaline/dynamicLayout/src/dynamicLayoutLabel.vue +11 -7
- package/src/centaline/dynamicLayout/src/dynamicLayoutLine.vue +3 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +206 -6
- package/src/centaline/loader/src/ctl/CellLayout.js +234 -115
- package/src/centaline/loader/src/ctl/Form.js +11 -4
- package/src/centaline/loader/src/ctl/FormList.js +81 -13
- package/src/centaline/loader/src/ctl/RichText.js +3 -0
- package/src/centaline/loader/src/ctl/SearchScreen.js +22 -22
- package/src/centaline/loader/src/ctl/SearchTable.js +215 -8
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +6 -3
- package/src/main.js +6 -3
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/src/centaline/dynamicLabel/index.js +0 -11
- package/src/centaline/dynamicLabel/src/dynamicLabel.vue +0 -73
- package/src/centaline/dynamicLs/index.js +0 -22
- package/src/centaline/dynamicLs/src/dynamicLs.vue +0 -233
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="model.routerKey"
|
|
3
|
-
<
|
|
2
|
+
<div v-if="model.routerKey">
|
|
3
|
+
<div v-if="model.rightRouter&&model.value!=''" :ref="'router'+forname+forrowindex" :style="model.styleObject">
|
|
4
|
+
<el-popover class="Stats-popover" :popper-class="'el-popoverCallTel'" :placement="option.placement?option.placement:'left'"
|
|
5
|
+
v-model="visible" :trigger="option.trigger?option.trigger:''">
|
|
6
|
+
<div style="border-bottom:none">
|
|
7
|
+
<div style="color: #388cd3;text-align: center;">{{message}}</div>
|
|
8
|
+
<img v-show="qrCode" :src="qrCode" style="margin-top: 5px;" :style="{'width':width+'px','height':height+'px'}" />
|
|
9
|
+
</div>
|
|
10
|
+
<img :src="tellImgUrl?tellImgUrl:model.value" slot="reference" @click="clickHandler($event)" style="cursor:pointer;width:100%" />
|
|
11
|
+
</el-popover>
|
|
12
|
+
</div>
|
|
4
13
|
</div>
|
|
5
|
-
<div v-else :style="model.styleObject">
|
|
14
|
+
<div v-else-if="model.value!=''" :style="model.styleObject">
|
|
6
15
|
<el-image :src="model.value"
|
|
7
16
|
fit="fit"></el-image>
|
|
8
17
|
</div>
|
|
@@ -15,10 +24,25 @@
|
|
|
15
24
|
mixins: [dynamicElement],
|
|
16
25
|
props: {
|
|
17
26
|
vmodel: Object,
|
|
18
|
-
rowindex: Number
|
|
27
|
+
rowindex: Number,
|
|
28
|
+
forname: String,
|
|
29
|
+
forrowindex: String
|
|
19
30
|
},
|
|
20
31
|
data() {
|
|
21
32
|
return {
|
|
33
|
+
visible: false,
|
|
34
|
+
message: '',
|
|
35
|
+
qrCode: '',
|
|
36
|
+
width: 300,
|
|
37
|
+
height: 300,
|
|
38
|
+
tellImgUrl: '',
|
|
39
|
+
option: {
|
|
40
|
+
isHidden: true,//是否开启操作栏隐藏设置,默认开启
|
|
41
|
+
showNum: 3,//如果isHidden为true时,个数大于3就会隐藏,默认是3
|
|
42
|
+
appendId: '',//将浮动栏添加到对应id或者class节点中。或者.xxx。传空字符串是添加到body中。
|
|
43
|
+
trigger: 'manual',//触发方式,传值可查看Popper UI组件trigger属性
|
|
44
|
+
placement: 'bottom-start',//方向,传值可查看Popper UI组件placement属性
|
|
45
|
+
},
|
|
22
46
|
}
|
|
23
47
|
},
|
|
24
48
|
created() {
|
|
@@ -29,8 +53,33 @@
|
|
|
29
53
|
|
|
30
54
|
methods: {
|
|
31
55
|
clickHandler(ev) {
|
|
32
|
-
|
|
33
|
-
|
|
56
|
+
if (!this.visible) {
|
|
57
|
+
this.$emit('click', this.model.routerKey, this.rowindex, this.forname, this.forrowindex);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.visible = false;
|
|
61
|
+
this.tellImgUrl = '';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
callTelClick(data) {
|
|
66
|
+
this.message = '';
|
|
67
|
+
this.qrCode = '';
|
|
68
|
+
this.tellImgUrl = '';
|
|
69
|
+
if (data.content.actionType == '显示消息') {
|
|
70
|
+
this.visible = true;
|
|
71
|
+
this.message = data.content.message;
|
|
72
|
+
if (data.content.imgUrl) this.tellImgUrl = data.content.imgUrl;
|
|
73
|
+
}
|
|
74
|
+
else if (data.content.actionType == '扫码拨号') {
|
|
75
|
+
this.visible = true;
|
|
76
|
+
this.message = data.content.message;
|
|
77
|
+
this.qrCode = data.content.qrCode;
|
|
78
|
+
if (data.content.width) this.width = data.content.width;
|
|
79
|
+
if (data.content.height) this.height = data.content.height;
|
|
80
|
+
if (data.content.imgUrl) this.tellImgUrl = data.content.imgUrl;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
34
83
|
},
|
|
35
84
|
computed: {
|
|
36
85
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="model.routerKey"
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<div v-if="model.routerKey">
|
|
3
|
+
<div v-if="model.rightRouter&&model.value!=''" :style="model.styleObject">
|
|
4
|
+
<a href="javascript:void(0);" @click="clickHandler($event)" class="ct-tablecurrencyItem">
|
|
5
|
+
{{model.value}}
|
|
6
|
+
</a>
|
|
7
|
+
</div>
|
|
6
8
|
</div>
|
|
7
|
-
<div v-else :style="model.styleObject" v-html="model.value">
|
|
9
|
+
<div v-else-if="model.value!=''" :style="model.styleObject" v-html="model.value">
|
|
8
10
|
</div>
|
|
9
11
|
</template>
|
|
10
12
|
|
|
@@ -15,7 +17,9 @@
|
|
|
15
17
|
mixins: [dynamicElement],
|
|
16
18
|
props: {
|
|
17
19
|
vmodel: Object,
|
|
18
|
-
rowindex: Number
|
|
20
|
+
rowindex: Number,
|
|
21
|
+
forname: String,
|
|
22
|
+
forrowindex: String
|
|
19
23
|
},
|
|
20
24
|
data() {
|
|
21
25
|
return {
|
|
@@ -27,7 +31,7 @@
|
|
|
27
31
|
|
|
28
32
|
methods: {
|
|
29
33
|
clickHandler(ev) {
|
|
30
|
-
this.$emit('click', this.model.routerKey, this.rowindex);
|
|
34
|
+
this.$emit('click', this.model.routerKey, this.rowindex, this.forname, this.forrowindex);
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
computed: {
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
</tbody>
|
|
134
134
|
</table>
|
|
135
135
|
</div>
|
|
136
|
-
<div v-else>
|
|
137
|
-
<div v-for="(row,rowindex) in model.
|
|
138
|
-
|
|
136
|
+
<div class="ct-Layout" v-else>
|
|
137
|
+
<div v-for="(row,rowindex) in model.layoutData" :key="rowindex">
|
|
138
|
+
<ct-layout :ref="'layoutrows.'+rowindex" :vmodel="row" :rowindex="rowindex" @click="rolRouterCellClickHandler"></ct-layout>
|
|
139
139
|
</div>
|
|
140
140
|
</div>
|
|
141
141
|
</div>
|
|
@@ -549,8 +549,14 @@
|
|
|
549
549
|
else {
|
|
550
550
|
if (this.$parent.$parent.$vnode.componentOptions.tag === 'ct-PropertySimpleDetailRET') {
|
|
551
551
|
var h1 = this.$parent.$parent.$parent.$parent.$refs.sidebar.offsetHeight | 0;
|
|
552
|
-
var h2 =
|
|
553
|
-
|
|
552
|
+
var h2 = 0;
|
|
553
|
+
if (this.$parent.$parent.$refs.contact) {
|
|
554
|
+
h2 = this.$parent.$parent.$refs.contact.offsetHeight | 0;
|
|
555
|
+
}
|
|
556
|
+
var h3 = 0;
|
|
557
|
+
if (this.$parent.$parent.$refs.contact) {
|
|
558
|
+
h3 = this.$parent.$parent.$refs.title.offsetHeight | 0;
|
|
559
|
+
}
|
|
554
560
|
let tableHeight = h1 - h2 - h3 - 270;
|
|
555
561
|
if (h2 == 0) {
|
|
556
562
|
tableHeight = tableHeight + 15;
|
|
@@ -728,13 +734,17 @@
|
|
|
728
734
|
//若不是客户端方法,则直接访问接口
|
|
729
735
|
if (!field.isClientFuntion) {
|
|
730
736
|
// 外部框架tab页打开
|
|
731
|
-
if (field.isFormPageInTab
|
|
737
|
+
if (field.isFormPageInTab) {
|
|
732
738
|
submitData = field.getActionPara(submitData).para;
|
|
733
739
|
if (field.pageStyle) {
|
|
734
740
|
submitData.pageStyle = field.pageStyle;
|
|
735
741
|
}
|
|
736
742
|
self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model,field.dialogWidth);
|
|
737
743
|
}
|
|
744
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
745
|
+
submitData = field.getActionPara(submitData).para;
|
|
746
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
747
|
+
}
|
|
738
748
|
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
739
749
|
submitData = field.getActionPara(submitData).para;
|
|
740
750
|
let query = self.$common.objectToQueryStr(submitData);
|
|
@@ -869,6 +879,193 @@
|
|
|
869
879
|
clickAcion();
|
|
870
880
|
}
|
|
871
881
|
},
|
|
882
|
+
rolRouterCellClickHandler(routerKey, rowindex, forname, forrowindex) {
|
|
883
|
+
var self = this;
|
|
884
|
+
var submitData = {};
|
|
885
|
+
var rowData = self.model.listData[rowindex];
|
|
886
|
+
var actionRouter = self.model.actionRouter;
|
|
887
|
+
let field = actionRouter.find(b => {
|
|
888
|
+
return b.id === routerKey;
|
|
889
|
+
});
|
|
890
|
+
if (typeof forname !== "undefined") {
|
|
891
|
+
field.submitListField.forEach((k) => {
|
|
892
|
+
submitData[k] = rowData[forname][forrowindex][k];
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
else {
|
|
896
|
+
field.submitListField.forEach((k) => {
|
|
897
|
+
submitData[k] = rowData[k];
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
let action = field.action;
|
|
901
|
+
if (field.actionField) {
|
|
902
|
+
action = rowData[field.actionField];
|
|
903
|
+
}
|
|
904
|
+
this.routerCellClickHandler(field, submitData, action, rowindex, forname, forrowindex);
|
|
905
|
+
},
|
|
906
|
+
routerCellClickHandler(field, submitData, action, rowindex, forname, forrowindex) {
|
|
907
|
+
let self = this;
|
|
908
|
+
action = action || field.action;
|
|
909
|
+
|
|
910
|
+
var clickAcion = function () {
|
|
911
|
+
//若不是客户端方法,则直接访问接口
|
|
912
|
+
if (!field.isClientFuntion) {
|
|
913
|
+
// 外部框架tab页打开
|
|
914
|
+
if (field.isFormPageInTab) {
|
|
915
|
+
submitData = field.getActionPara(submitData).para;
|
|
916
|
+
if (field.pageStyle) {
|
|
917
|
+
submitData.pageStyle = field.pageStyle;
|
|
918
|
+
}
|
|
919
|
+
self.$common.getDataDrivenOpts().handler.openTab(action, submitData, field.pageTitle, self.model, field.dialogWidth);
|
|
920
|
+
}
|
|
921
|
+
else if (field.isSearchPageInTab) {// 外部框架tab页打开
|
|
922
|
+
submitData = field.getActionPara(submitData).para;
|
|
923
|
+
self.$common.getDataDrivenOpts().handler.openTabSearch(field, submitData);
|
|
924
|
+
}
|
|
925
|
+
else if (field.isBrowserNewTab) {// 浏览器打开
|
|
926
|
+
submitData = field.getActionPara(submitData).para;
|
|
927
|
+
let query = self.$common.objectToQueryStr(submitData);
|
|
928
|
+
window.open(action + query, "_blank");
|
|
929
|
+
}
|
|
930
|
+
else {
|
|
931
|
+
//self.operationLoading = true;
|
|
932
|
+
|
|
933
|
+
//Form
|
|
934
|
+
if (field.isOpenForm) {
|
|
935
|
+
var dialogOption = {
|
|
936
|
+
title: field.pageTitle,
|
|
937
|
+
pane: self.$common.getParentPane(self),
|
|
938
|
+
content: [{
|
|
939
|
+
component: field.navToNewPageName,
|
|
940
|
+
attrs: {
|
|
941
|
+
//source: data.content,
|
|
942
|
+
api: action,
|
|
943
|
+
apiParam: field.getActionPara(submitData).para,
|
|
944
|
+
showTitle: false,
|
|
945
|
+
width: field.dialogWidth + 'px',
|
|
946
|
+
height: field.dialogHeight + 'px'
|
|
947
|
+
},
|
|
948
|
+
on: {
|
|
949
|
+
submit(ev) {
|
|
950
|
+
if (!field.flagFreshCurrentRow && !field.flagAddRowAfterAction) {
|
|
951
|
+
self.model.doAction(ev);
|
|
952
|
+
}
|
|
953
|
+
self.$forceUpdate();
|
|
954
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
955
|
+
self.updateCurrentRow(field, ev);
|
|
956
|
+
},
|
|
957
|
+
refreshParent() {
|
|
958
|
+
self.getPage(1);
|
|
959
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
960
|
+
},
|
|
961
|
+
closeDialog() {
|
|
962
|
+
self.updateCurrentRow(field);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}]
|
|
966
|
+
};
|
|
967
|
+
self.$common.openDialog(dialogOption);
|
|
968
|
+
}
|
|
969
|
+
//SearchList
|
|
970
|
+
else if (field.isOpenList) {
|
|
971
|
+
var dialogOption = {
|
|
972
|
+
title: field.pageTitle,
|
|
973
|
+
pane: self.$common.getParentPane(self),
|
|
974
|
+
content: [{
|
|
975
|
+
component: field.navToNewPageName,
|
|
976
|
+
attrs: {
|
|
977
|
+
searchConditionApi: field.actionForSearchLayout,
|
|
978
|
+
searchDataApi: field.actionForSearch,
|
|
979
|
+
apiParam: submitData,
|
|
980
|
+
width: field.dialogWidth + 'px',
|
|
981
|
+
height: field.dialogHeight + 'px'
|
|
982
|
+
},
|
|
983
|
+
on: {
|
|
984
|
+
refreshParent() {
|
|
985
|
+
self.getPage(1);
|
|
986
|
+
self.$common.closeDialog(dialogOption.dialog);
|
|
987
|
+
},
|
|
988
|
+
closeDialog() {
|
|
989
|
+
self.updateCurrentRow(field);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}]
|
|
993
|
+
};
|
|
994
|
+
self.$common.openDialog(dialogOption);
|
|
995
|
+
}
|
|
996
|
+
//Tabs
|
|
997
|
+
else if (field.isOpenTabs) {
|
|
998
|
+
var dialogOption = {
|
|
999
|
+
title: field.pageTitle,
|
|
1000
|
+
pane: self.$common.getParentPane(self),
|
|
1001
|
+
content: [{
|
|
1002
|
+
component: field.navToNewPageName,
|
|
1003
|
+
attrs: {
|
|
1004
|
+
searchConditionApi: field.actionForSearchLayout,
|
|
1005
|
+
searchDataApi: field.actionForSearch,
|
|
1006
|
+
apiParam: submitData,
|
|
1007
|
+
width: field.dialogWidth + 'px',
|
|
1008
|
+
height: field.dialogHeight + 'px'
|
|
1009
|
+
},
|
|
1010
|
+
on: {
|
|
1011
|
+
}
|
|
1012
|
+
}]
|
|
1013
|
+
};
|
|
1014
|
+
self.$common.openDialog(dialogOption);
|
|
1015
|
+
}
|
|
1016
|
+
else {
|
|
1017
|
+
field.doAction(submitData, (data) => {
|
|
1018
|
+
self.model.doAction(data, field);
|
|
1019
|
+
if (field.actionType === 19) {
|
|
1020
|
+
self.callTelClick(self.$refs['layout' + rowindex].$refs.layoutchildren, data, forname, forrowindex)
|
|
1021
|
+
}
|
|
1022
|
+
})
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
//执行客户端脚本
|
|
1027
|
+
else {
|
|
1028
|
+
// let parm={submitData:submitData,field:field}
|
|
1029
|
+
// self.$common.excuteFunStr.call(self.model.scripts, field.action,parm);
|
|
1030
|
+
let title = field.pageTitle == undefined ? field.label : field.pageTitle;
|
|
1031
|
+
submitData.actionType = field.actionType;
|
|
1032
|
+
var fun = self.$common.getDataDrivenOpts().handler[action];
|
|
1033
|
+
fun(submitData, title, self.model);
|
|
1034
|
+
// var fun = self.model.scripts.formData[action];
|
|
1035
|
+
// fun(submitData,field);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
if (field.alert) {
|
|
1040
|
+
self.$common.confirm(field.alertMsg, field.alertCaption, {
|
|
1041
|
+
confirmButtonText: field.alertOKButtonText,
|
|
1042
|
+
cancelButtonText: field.alertCancelButtonText,
|
|
1043
|
+
//type: 'warning'
|
|
1044
|
+
center: field.alertCenter
|
|
1045
|
+
}).then(() => {
|
|
1046
|
+
clickAcion();
|
|
1047
|
+
}).catch(() => {
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
else {
|
|
1051
|
+
clickAcion();
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
callTelClick(VueCom, data, forname, forrowindex) {
|
|
1055
|
+
if (typeof VueCom.$refs['router' + forname + forrowindex] !== "undefined") {
|
|
1056
|
+
VueCom.callTelClick(data);
|
|
1057
|
+
return true;
|
|
1058
|
+
}
|
|
1059
|
+
if (VueCom.$children.length > 0) {
|
|
1060
|
+
for (var i = 0; i < VueCom.$children.length; i++) {
|
|
1061
|
+
var item = VueCom.$children[i];
|
|
1062
|
+
var result = this.callTelClick(item, data, forname, forrowindex);
|
|
1063
|
+
if (result) {
|
|
1064
|
+
return result;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
872
1069
|
selectAll($ev) {
|
|
873
1070
|
this.model.listData.forEach((ro) => {
|
|
874
1071
|
if (!this.model.rightMulti || ro[this.model.rightMulti] == 1) {
|
|
@@ -1201,4 +1398,7 @@
|
|
|
1201
1398
|
.el-popover1 {
|
|
1202
1399
|
min-width: inherit !important;
|
|
1203
1400
|
}
|
|
1401
|
+
.ct-Layout {
|
|
1402
|
+
font-size: 12px;
|
|
1403
|
+
}
|
|
1204
1404
|
</style>
|