centaline-data-driven 1.3.7 → 1.3.8
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 +2 -1
- package/package.json +1 -1
- package/src/centaline/browseIframe/src/browseIframe.vue +49 -3
- package/src/centaline/dialogList/src/dialog.vue +2 -3
- package/src/centaline/dialogList/src/dialogList.vue +0 -25
- package/src/centaline/dynamicFile/src/dynamicFile.vue +4 -4
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +2 -1
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
- package/wwwroot/static/centaline/6032ad6e6e5a3ca138d5.worker.js +0 -8
- package/wwwroot/static/centaline/6032ad6e6e5a3ca138d5.worker.js.map +0 -1
|
@@ -45,7 +45,8 @@ const paths = {
|
|
|
45
45
|
"dynamicContact": "./src/centaline/dynamicContact/index.js",//联系人电话
|
|
46
46
|
"dynamicLayout": "./src/centaline/dynamicLayout/index.js",//Layout组件
|
|
47
47
|
"browseVideo": "./src/centaline/browseVideo/index.js",//确认框组件
|
|
48
|
-
|
|
48
|
+
"browseIframe": "./src/centaline/browseIframe/index.js",//URL弹层
|
|
49
|
+
"dynamicViewerFile": "./src/centaline/dynamicViewerFile/index.js",//图片预览框组件
|
|
49
50
|
},
|
|
50
51
|
"plugs": {
|
|
51
52
|
"api": "./src/centaline/api/index.js",//调用API插件
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width:100%;height:100%;">
|
|
3
|
-
<iframe :src="src" ref="iframe"
|
|
3
|
+
<iframe :src="src" ref="iframe" style="width:100%;height:99%;" frameborder="0" @load="sendMessage()"></iframe>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
<script>
|
|
@@ -11,12 +11,58 @@
|
|
|
11
11
|
},
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
14
|
-
|
|
15
14
|
};
|
|
16
15
|
},
|
|
17
|
-
mounted () {
|
|
16
|
+
mounted () {
|
|
17
|
+
window.addEventListener('message', this.handleMessage);
|
|
18
18
|
},
|
|
19
19
|
methods: {
|
|
20
|
+
sendMessage () {
|
|
21
|
+
let deviceID= this.getCookie("DeviceID");
|
|
22
|
+
this.$refs.iframe.contentWindow.postMessage({
|
|
23
|
+
functionName: 'cookie',
|
|
24
|
+
params: {
|
|
25
|
+
success: true,
|
|
26
|
+
data: deviceID || 'XXXXXXXXXXX',
|
|
27
|
+
}
|
|
28
|
+
}, '*');
|
|
29
|
+
},
|
|
30
|
+
handleMessage (event) {
|
|
31
|
+
var self=this;
|
|
32
|
+
var data = event.data;
|
|
33
|
+
switch (data.functionName) {
|
|
34
|
+
case 'new':
|
|
35
|
+
self.$emit('new',data.params.data);
|
|
36
|
+
break
|
|
37
|
+
case 'update':
|
|
38
|
+
self.$emit('update');
|
|
39
|
+
break
|
|
40
|
+
case 'delete':
|
|
41
|
+
self.$emit('delete');
|
|
42
|
+
break
|
|
43
|
+
case 'refresh':
|
|
44
|
+
self.$emit('refreshParent');
|
|
45
|
+
break
|
|
46
|
+
case 'close':
|
|
47
|
+
self.$emit('closeDialog');
|
|
48
|
+
break
|
|
49
|
+
case 'title':
|
|
50
|
+
self.$parent.vmodel.title=data.params.data;
|
|
51
|
+
break
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
getCookie(c_name){
|
|
55
|
+
if (document.cookie.length>0){
|
|
56
|
+
let c_start=document.cookie.indexOf(c_name + "=")
|
|
57
|
+
if (c_start!=-1){
|
|
58
|
+
c_start=c_start + c_name.length+1
|
|
59
|
+
let c_end=document.cookie.indexOf(";",c_start)
|
|
60
|
+
if (c_end==-1) c_end=document.cookie.length
|
|
61
|
+
return unescape(document.cookie.substring(c_start,c_end))
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return ""
|
|
65
|
+
},
|
|
20
66
|
}
|
|
21
67
|
}
|
|
22
68
|
</script>
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
methods: {
|
|
17
17
|
close() {
|
|
18
|
-
//this.dialogTableVisible = false;
|
|
19
18
|
this.$emit('close', this);
|
|
20
19
|
if (this.vmodel.content[0].on && typeof this.vmodel.content[0].on["closeDialog"] === "function") {
|
|
21
20
|
this.vmodel.content[0].on["closeDialog"]();
|
|
@@ -25,7 +24,7 @@
|
|
|
25
24
|
//ev.cancelBubble = true;
|
|
26
25
|
//ev.stopPropagation();
|
|
27
26
|
//ev.preventDefault();
|
|
28
|
-
}
|
|
27
|
+
},
|
|
29
28
|
},
|
|
30
29
|
mounted() {
|
|
31
30
|
//this.$el.parentNode.removeChild(this.$el);
|
|
@@ -206,7 +205,7 @@
|
|
|
206
205
|
]
|
|
207
206
|
)
|
|
208
207
|
])
|
|
209
|
-
}
|
|
208
|
+
},
|
|
210
209
|
}
|
|
211
210
|
</script>
|
|
212
211
|
<style scoped>
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
mounted() {
|
|
23
23
|
this.$common.dialogList = this;
|
|
24
24
|
this.overflow = document.body.style.overflow;
|
|
25
|
-
window.addEventListener('message', this.handleMessage)
|
|
26
25
|
},
|
|
27
26
|
computed: {
|
|
28
27
|
zindex: function () {
|
|
@@ -61,30 +60,6 @@
|
|
|
61
60
|
document.removeEventListener("touchmove", mo, false);
|
|
62
61
|
}
|
|
63
62
|
},
|
|
64
|
-
handleMessage (event) {
|
|
65
|
-
var self=this;
|
|
66
|
-
var data = event.data;
|
|
67
|
-
switch (data.functionName) {
|
|
68
|
-
case 'new':
|
|
69
|
-
self.$children[0].vmodel.content[0].on.new(data.params.data);
|
|
70
|
-
break
|
|
71
|
-
case 'update':
|
|
72
|
-
self.$children[0].vmodel.content[0].on.update();
|
|
73
|
-
break
|
|
74
|
-
case 'delete':
|
|
75
|
-
self.$children[0].vmodel.content[0].on.delete();
|
|
76
|
-
break
|
|
77
|
-
case 'refresh':
|
|
78
|
-
self.$children[0].vmodel.content[0].on.refreshParent();
|
|
79
|
-
break
|
|
80
|
-
case 'close':
|
|
81
|
-
self.$children[0].vmodel.content[0].on.closeDialog();
|
|
82
|
-
break
|
|
83
|
-
case 'title':
|
|
84
|
-
self.$children[0].vmodel.title=data.params.data;
|
|
85
|
-
break
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
63
|
}
|
|
89
64
|
}
|
|
90
65
|
</script>
|
|
@@ -184,11 +184,13 @@ export default {
|
|
|
184
184
|
var index = MediaAlbum[0].medias.findIndex(
|
|
185
185
|
(v) => v.mediaID === file.source.mediaID
|
|
186
186
|
);
|
|
187
|
+
debugger;
|
|
187
188
|
var width = parseInt(window.document.body.clientWidth * 0.8);
|
|
189
|
+
var height = parseInt(window.document.body.clientHeight * 0.8);
|
|
188
190
|
width = width > 1160 ? 1160 : width;
|
|
189
191
|
var dialogOption = {
|
|
190
192
|
title: this.model.label || "预览媒体",
|
|
191
|
-
pane: self.$common.getParentPane(self),
|
|
193
|
+
//pane: self.$common.getParentPane(self),
|
|
192
194
|
content: [
|
|
193
195
|
{
|
|
194
196
|
component: "ct-viewerfile",
|
|
@@ -200,9 +202,7 @@ export default {
|
|
|
200
202
|
// width: self.modelPhotoselect.router.pageWidth + 'px',
|
|
201
203
|
// height: self.modelPhotoselect.router.pageHeight+'px',
|
|
202
204
|
width: width + "px",
|
|
203
|
-
height:
|
|
204
|
-
parseInt(window.document.body.clientHeight * 0.8).toString() +
|
|
205
|
-
"px",
|
|
205
|
+
height: height + "px",
|
|
206
206
|
},
|
|
207
207
|
on: {
|
|
208
208
|
handlePhoto(photoList) {},
|
|
@@ -769,6 +769,7 @@
|
|
|
769
769
|
title: field.pageTitle,
|
|
770
770
|
pane: self.$common.getParentPane(self),
|
|
771
771
|
content: [{
|
|
772
|
+
component: 'ct-iframe',
|
|
772
773
|
attrs: {
|
|
773
774
|
src: submitData[field.submitListField],
|
|
774
775
|
width: field.dialogWidth + 'px',
|
|
@@ -803,7 +804,7 @@
|
|
|
803
804
|
},
|
|
804
805
|
closeDialog() {
|
|
805
806
|
self.$common.closeDialog(dialogOption.dialog);
|
|
806
|
-
}
|
|
807
|
+
},
|
|
807
808
|
}
|
|
808
809
|
}]
|
|
809
810
|
};
|