askbot-dragon 1.7.41-beta → 1.7.44-beta
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/README.md +27 -27
- package/babel.config.js +6 -6
- package/dragon.iml +7 -7
- package/package.json +56 -55
- package/public/index.html +73 -75
- package/src/App.vue +31 -31
- package/src/api/index.js +1 -1
- package/src/api/mock.http +2 -2
- package/src/api/requestUrl.js +185 -185
- package/src/assets/js/AliyunlssUtil.js +141 -117
- package/src/assets/js/Base64Util.js +22 -22
- package/src/assets/js/common.js +252 -252
- package/src/assets/js/hammer.js +100 -89
- package/src/assets/js/script.js +36 -36
- package/src/assets/less/common.css +6773 -6773
- package/src/assets/less/converSationContainer/common.less +199 -192
- package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
- package/src/assets/less/iconfont.css +37 -37
- package/src/assets/less/ticketMessage.less +294 -294
- package/src/components/ActionAlertIframe.vue +177 -154
- package/src/components/AiGuide.vue +438 -471
- package/src/components/AnswerDocknowledge.vue +1091 -1087
- package/src/components/AnswerVoice.vue +285 -285
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +10766 -10875
- package/src/components/FileType.vue +86 -86
- package/src/components/Message.vue +27 -27
- package/src/components/MyEditor.vue +342 -341
- package/src/components/QwFeedback.vue +301 -301
- package/src/components/actionSatisfaction.vue +107 -107
- package/src/components/actionSendToBot.vue +62 -62
- package/src/components/answerDissatisfaction.vue +62 -62
- package/src/components/answerRadio.vue +211 -211
- package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
- package/src/components/ask-components/Msgloading.vue +37 -37
- package/src/components/ask-components/SatisfactionV2.vue +15 -15
- package/src/components/askVideo.vue +162 -139
- package/src/components/assetDetails.vue +378 -378
- package/src/components/assetMessage.vue +228 -228
- package/src/components/associationIntention.vue +378 -374
- package/src/components/attachmentPreview.vue +90 -90
- package/src/components/botActionSatisfactor.vue +68 -68
- package/src/components/chatContent.vue +513 -513
- package/src/components/feedBack.vue +136 -136
- package/src/components/fielListView.vue +351 -351
- package/src/components/file/AliyunOssComponents.vue +108 -108
- package/src/components/formTemplate.vue +3501 -3497
- package/src/components/imgView.vue +31 -31
- package/src/components/intelligentSummary.vue +231 -227
- package/src/components/kkview.vue +1138 -1138
- package/src/components/loadingProcess.vue +164 -164
- package/src/components/markDownText.vue +197 -197
- package/src/components/message/ActionAlertIframe.vue +112 -112
- package/src/components/message/ShopMessage.vue +164 -164
- package/src/components/message/TextMessage.vue +928 -924
- package/src/components/message/TicketMessage.vue +201 -201
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +503 -503
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- package/src/components/msgLoading.vue +231 -231
- package/src/components/myPopup.vue +70 -70
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pagination.vue +129 -0
- package/src/components/pdfPosition.vue +1514 -1334
- package/src/components/popup.vue +227 -227
- package/src/components/preview/docView.vue +107 -0
- package/src/components/preview/excelView.vue +177 -0
- package/src/components/preview/newPositionPreview.vue +351 -0
- package/src/components/preview/pdfView.vue +760 -0
- package/src/components/previewDoc.vue +251 -247
- package/src/components/previewPdf.vue +1069 -779
- package/src/components/receiverMessagePlatform.vue +65 -65
- package/src/components/recommend.vue +80 -80
- package/src/components/selector/hOption.vue +20 -20
- package/src/components/selector/hSelector.vue +199 -199
- package/src/components/selector/hWrapper.vue +216 -216
- package/src/components/senderMessagePlatform.vue +50 -50
- package/src/components/source/BotMessage.vue +24 -24
- package/src/components/source/CustomMessage.vue +24 -24
- package/src/components/test.vue +260 -260
- package/src/components/tree.vue +307 -307
- package/src/components/utils/AliyunIssUtil.js +103 -103
- package/src/components/utils/ckeditor.js +185 -185
- package/src/components/utils/format_date.js +25 -25
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +29 -29
- package/src/components/voiceComponent.vue +119 -119
- package/src/components/welcomeKnowledgeFile.vue +344 -340
- package/src/components/welcomeLlmCard.vue +144 -140
- package/src/components/welcomeSuggest.vue +97 -97
- package/src/locales/cn.json +72 -0
- package/src/locales/en.json +73 -0
- package/src/locales/jp.json +73 -0
- package/src/main.js +75 -57
- package/vue.config.js +54 -54
|
@@ -1,198 +1,198 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div @click="lookImage">
|
|
3
|
-
<vue-markdown class="mark_down" :source="typedContent" :ref="'markdown' + msgId">
|
|
4
|
-
</vue-markdown>
|
|
5
|
-
<div v-if="showPreview">
|
|
6
|
-
<img-view :url-list="imgList" @closeViewer="closeViewer"></img-view>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import VueMarkdown from "vue-markdown";
|
|
13
|
-
import ImgView from "./imgView.vue";
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
name: "markDownText",
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
typedContent: "",
|
|
20
|
-
typingSpeed: 15,
|
|
21
|
-
showPreview: false,
|
|
22
|
-
imgList: [],
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
chainValues: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: "",
|
|
29
|
-
},
|
|
30
|
-
msgId: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: "",
|
|
33
|
-
},
|
|
34
|
-
isHistory: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
components: {
|
|
40
|
-
ImgView,
|
|
41
|
-
VueMarkdown,
|
|
42
|
-
},
|
|
43
|
-
mounted() {
|
|
44
|
-
this.$nextTick(() => {
|
|
45
|
-
// let ref = 'markdown' + this.msgId
|
|
46
|
-
// const el = this.$refs[ref].$el;
|
|
47
|
-
// if (this.isHistory){
|
|
48
|
-
// el.innerHTML = this.chainValues;
|
|
49
|
-
// } else {
|
|
50
|
-
// new Typed(el, {
|
|
51
|
-
// strings: [this.chainValues],
|
|
52
|
-
// typeSpeed: 30,
|
|
53
|
-
// showCursor: false
|
|
54
|
-
// })
|
|
55
|
-
// }
|
|
56
|
-
this.typedContent = this.chainValues;
|
|
57
|
-
// if (this.isHistory) {
|
|
58
|
-
// this.typedContent = this.chainValues;
|
|
59
|
-
// } else {
|
|
60
|
-
// this.startTypingEffect();
|
|
61
|
-
// }
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
startTypingEffect() {
|
|
66
|
-
let i = 0;
|
|
67
|
-
const interval = setInterval(() => {
|
|
68
|
-
if (i < this.chainValues.length) {
|
|
69
|
-
this.typedContent += this.chainValues.charAt(i);
|
|
70
|
-
i++;
|
|
71
|
-
} else {
|
|
72
|
-
clearInterval(interval);
|
|
73
|
-
}
|
|
74
|
-
}, this.typingSpeed);
|
|
75
|
-
},
|
|
76
|
-
lookImage(e) {
|
|
77
|
-
let previewImageUrl = "";
|
|
78
|
-
console.log("e.target", e.target);
|
|
79
|
-
if (e.target.localName == "img") {
|
|
80
|
-
previewImageUrl = e.target.currentSrc;
|
|
81
|
-
this.showPreview = true;
|
|
82
|
-
}
|
|
83
|
-
let richtext = JSON.parse(JSON.stringify(this.typedContent));
|
|
84
|
-
this.imgList = [];
|
|
85
|
-
richtext.replace(
|
|
86
|
-
/<img [^>]*src=['"]([^'"]+)[^>]*>/g,
|
|
87
|
-
(match, capture) => {
|
|
88
|
-
this.imgList.push(capture);
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
/*当前点击的图片作为第一个图片*/
|
|
92
|
-
let index = this.imgList.indexOf(previewImageUrl);
|
|
93
|
-
this.imgList.splice(index, 1);
|
|
94
|
-
this.imgList.unshift(previewImageUrl);
|
|
95
|
-
},
|
|
96
|
-
closeViewer() {
|
|
97
|
-
this.showPreview = false;
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
<style scoped lang="less">
|
|
104
|
-
.mark_down {
|
|
105
|
-
line-height: 24px;
|
|
106
|
-
overflow-x: auto;
|
|
107
|
-
/deep/p {
|
|
108
|
-
margin-bottom: 14px;
|
|
109
|
-
font-size: 16px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/deep/p:only-child {
|
|
113
|
-
margin: 0 !important;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/deep/p:last-child {
|
|
117
|
-
margin-bottom: 0 !important;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/deep/ul {
|
|
121
|
-
margin-bottom: 16px;
|
|
122
|
-
list-style: disc;
|
|
123
|
-
padding-left: 16px;
|
|
124
|
-
|
|
125
|
-
li {
|
|
126
|
-
margin: 7px 0 !important;
|
|
127
|
-
font-size: 16px;
|
|
128
|
-
// padding-left: 40px;
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/deep/ ol {
|
|
134
|
-
list-style: auto;
|
|
135
|
-
padding-left: 16px;
|
|
136
|
-
|
|
137
|
-
li {
|
|
138
|
-
margin: 7px 0 !important;
|
|
139
|
-
font-size: 16px;
|
|
140
|
-
// padding-left: 40px;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/deep/img {
|
|
145
|
-
max-width: 400px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/deep/h3,
|
|
149
|
-
/deep/h2,
|
|
150
|
-
/deep/h1,
|
|
151
|
-
/deep/h4,
|
|
152
|
-
/deep/h5,
|
|
153
|
-
/deep/h6 {
|
|
154
|
-
color: #000000;
|
|
155
|
-
font-weight: 500;
|
|
156
|
-
line-height: 26px;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/deep/h3 {
|
|
160
|
-
font-size: 20px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/deep/h2 {
|
|
164
|
-
font-size: 22px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/deep/h1 {
|
|
168
|
-
font-size: 24px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/deep/h3 {
|
|
172
|
-
font-size: 20px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/deep/ table {
|
|
176
|
-
border-spacing: 0;
|
|
177
|
-
// border-radius: 8px;
|
|
178
|
-
// overflow: hidden;
|
|
179
|
-
border: solid 1px #e0e6f7;
|
|
180
|
-
min-width: 800px;
|
|
181
|
-
overflow-x: auto;
|
|
182
|
-
}
|
|
183
|
-
/deep/ th {
|
|
184
|
-
background: #EEF1FF;
|
|
185
|
-
border: solid 1px #e0e6f7;
|
|
186
|
-
padding: 10px;
|
|
187
|
-
height: 60px;
|
|
188
|
-
min-width: 100px;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/deep/ td {
|
|
192
|
-
border: solid 1px #e0e6f7;
|
|
193
|
-
padding: 10px;
|
|
194
|
-
height: 48px;
|
|
195
|
-
min-width: 100px;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div @click="lookImage">
|
|
3
|
+
<vue-markdown class="mark_down" :source="typedContent" :ref="'markdown' + msgId">
|
|
4
|
+
</vue-markdown>
|
|
5
|
+
<div v-if="showPreview">
|
|
6
|
+
<img-view :url-list="imgList" @closeViewer="closeViewer"></img-view>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import VueMarkdown from "vue-markdown";
|
|
13
|
+
import ImgView from "./imgView.vue";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "markDownText",
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
typedContent: "",
|
|
20
|
+
typingSpeed: 15,
|
|
21
|
+
showPreview: false,
|
|
22
|
+
imgList: [],
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
chainValues: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "",
|
|
29
|
+
},
|
|
30
|
+
msgId: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "",
|
|
33
|
+
},
|
|
34
|
+
isHistory: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
components: {
|
|
40
|
+
ImgView,
|
|
41
|
+
VueMarkdown,
|
|
42
|
+
},
|
|
43
|
+
mounted() {
|
|
44
|
+
this.$nextTick(() => {
|
|
45
|
+
// let ref = 'markdown' + this.msgId
|
|
46
|
+
// const el = this.$refs[ref].$el;
|
|
47
|
+
// if (this.isHistory){
|
|
48
|
+
// el.innerHTML = this.chainValues;
|
|
49
|
+
// } else {
|
|
50
|
+
// new Typed(el, {
|
|
51
|
+
// strings: [this.chainValues],
|
|
52
|
+
// typeSpeed: 30,
|
|
53
|
+
// showCursor: false
|
|
54
|
+
// })
|
|
55
|
+
// }
|
|
56
|
+
this.typedContent = this.chainValues;
|
|
57
|
+
// if (this.isHistory) {
|
|
58
|
+
// this.typedContent = this.chainValues;
|
|
59
|
+
// } else {
|
|
60
|
+
// this.startTypingEffect();
|
|
61
|
+
// }
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
startTypingEffect() {
|
|
66
|
+
let i = 0;
|
|
67
|
+
const interval = setInterval(() => {
|
|
68
|
+
if (i < this.chainValues.length) {
|
|
69
|
+
this.typedContent += this.chainValues.charAt(i);
|
|
70
|
+
i++;
|
|
71
|
+
} else {
|
|
72
|
+
clearInterval(interval);
|
|
73
|
+
}
|
|
74
|
+
}, this.typingSpeed);
|
|
75
|
+
},
|
|
76
|
+
lookImage(e) {
|
|
77
|
+
let previewImageUrl = "";
|
|
78
|
+
console.log("e.target", e.target);
|
|
79
|
+
if (e.target.localName == "img") {
|
|
80
|
+
previewImageUrl = e.target.currentSrc;
|
|
81
|
+
this.showPreview = true;
|
|
82
|
+
}
|
|
83
|
+
let richtext = JSON.parse(JSON.stringify(this.typedContent));
|
|
84
|
+
this.imgList = [];
|
|
85
|
+
richtext.replace(
|
|
86
|
+
/<img [^>]*src=['"]([^'"]+)[^>]*>/g,
|
|
87
|
+
(match, capture) => {
|
|
88
|
+
this.imgList.push(capture);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
/*当前点击的图片作为第一个图片*/
|
|
92
|
+
let index = this.imgList.indexOf(previewImageUrl);
|
|
93
|
+
this.imgList.splice(index, 1);
|
|
94
|
+
this.imgList.unshift(previewImageUrl);
|
|
95
|
+
},
|
|
96
|
+
closeViewer() {
|
|
97
|
+
this.showPreview = false;
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style scoped lang="less">
|
|
104
|
+
.mark_down {
|
|
105
|
+
line-height: 24px;
|
|
106
|
+
overflow-x: auto;
|
|
107
|
+
/deep/p {
|
|
108
|
+
margin-bottom: 14px;
|
|
109
|
+
font-size: 16px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/deep/p:only-child {
|
|
113
|
+
margin: 0 !important;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/deep/p:last-child {
|
|
117
|
+
margin-bottom: 0 !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/deep/ul {
|
|
121
|
+
margin-bottom: 16px;
|
|
122
|
+
list-style: disc;
|
|
123
|
+
padding-left: 16px;
|
|
124
|
+
|
|
125
|
+
li {
|
|
126
|
+
margin: 7px 0 !important;
|
|
127
|
+
font-size: 16px;
|
|
128
|
+
// padding-left: 40px;
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/deep/ ol {
|
|
134
|
+
list-style: auto;
|
|
135
|
+
padding-left: 16px;
|
|
136
|
+
|
|
137
|
+
li {
|
|
138
|
+
margin: 7px 0 !important;
|
|
139
|
+
font-size: 16px;
|
|
140
|
+
// padding-left: 40px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/deep/img {
|
|
145
|
+
max-width: 400px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/deep/h3,
|
|
149
|
+
/deep/h2,
|
|
150
|
+
/deep/h1,
|
|
151
|
+
/deep/h4,
|
|
152
|
+
/deep/h5,
|
|
153
|
+
/deep/h6 {
|
|
154
|
+
color: #000000;
|
|
155
|
+
font-weight: 500;
|
|
156
|
+
line-height: 26px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/deep/h3 {
|
|
160
|
+
font-size: 20px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/deep/h2 {
|
|
164
|
+
font-size: 22px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/deep/h1 {
|
|
168
|
+
font-size: 24px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/deep/h3 {
|
|
172
|
+
font-size: 20px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/deep/ table {
|
|
176
|
+
border-spacing: 0;
|
|
177
|
+
// border-radius: 8px;
|
|
178
|
+
// overflow: hidden;
|
|
179
|
+
border: solid 1px #e0e6f7;
|
|
180
|
+
min-width: 800px;
|
|
181
|
+
overflow-x: auto;
|
|
182
|
+
}
|
|
183
|
+
/deep/ th {
|
|
184
|
+
background: #EEF1FF;
|
|
185
|
+
border: solid 1px #e0e6f7;
|
|
186
|
+
padding: 10px;
|
|
187
|
+
height: 60px;
|
|
188
|
+
min-width: 100px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/deep/ td {
|
|
192
|
+
border: solid 1px #e0e6f7;
|
|
193
|
+
padding: 10px;
|
|
194
|
+
height: 48px;
|
|
195
|
+
min-width: 100px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
198
|
</style>
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="action_alert_iframe">
|
|
3
|
-
<iframe
|
|
4
|
-
class="grzh-iframe"
|
|
5
|
-
:id="tampId"
|
|
6
|
-
:data-name="tampId"
|
|
7
|
-
:src="actionAlertIframe.template"
|
|
8
|
-
:width="actionAlertIframe.version == 1?actionAlertIframe.width:'100%'"
|
|
9
|
-
:height="actionAlertIframe.height"
|
|
10
|
-
:scrolling="actionAlertIframe.scrolling"
|
|
11
|
-
frameborder="no"
|
|
12
|
-
border="0"
|
|
13
|
-
></iframe>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
name: "action_alert_iframe",
|
|
19
|
-
props: ["actionAlertIframe"],
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
name: "action_alert_iframe",
|
|
23
|
-
dataName: "",
|
|
24
|
-
tampId:'',
|
|
25
|
-
// 组件接收数据
|
|
26
|
-
actionAlertIframeObj: {
|
|
27
|
-
template: "url地址(可插入变量)",
|
|
28
|
-
description: "描述",
|
|
29
|
-
height: "frame高度",
|
|
30
|
-
width: "iframe 的宽度",
|
|
31
|
-
scrolling: "yes/no/auto(是否在 iframe 中显示滚动条)",
|
|
32
|
-
sandbox: [
|
|
33
|
-
"预留",
|
|
34
|
-
"启用一系列对 <iframe> 中内容的额外限制",
|
|
35
|
-
"参考 https://www.w3school.com.cn/tags/att_iframe_sandbox.asp",
|
|
36
|
-
],
|
|
37
|
-
frameborder: "0/1(是否显示框架周围的边框)",
|
|
38
|
-
displayStyle:
|
|
39
|
-
"iframe 样式(点击弹出/嵌入iframe 字符串类型后端未做限制)",
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
methods: {},
|
|
44
|
-
mounted() {
|
|
45
|
-
this.tampId = 'iframeId++' + new Date().getTime();
|
|
46
|
-
let tampUrl = this.actionAlertIframe.template;
|
|
47
|
-
function GetRequest() {
|
|
48
|
-
var url = tampUrl.split("?")[1]; //获取url中"?"符后的字串
|
|
49
|
-
var theRequest = new Object();
|
|
50
|
-
if (url) {
|
|
51
|
-
// var str = url.substr(1);
|
|
52
|
-
let strs = url.split("&");
|
|
53
|
-
for (var i = 0; i < strs.length; i++) {
|
|
54
|
-
theRequest[strs[i].split("=")[0]] = unescape(
|
|
55
|
-
strs[i].split("=")[1]
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return theRequest;
|
|
60
|
-
}
|
|
61
|
-
if (JSON.stringify(GetRequest()) == "{}") {
|
|
62
|
-
this.actionAlertIframe.template = this.actionAlertIframe.template + "?iframeId=" + this.tampId
|
|
63
|
-
} else {
|
|
64
|
-
this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
</script>
|
|
69
|
-
<style lang="less" scoped>
|
|
70
|
-
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
71
|
-
|
|
72
|
-
#action_alert_iframe {
|
|
73
|
-
width: 100%;
|
|
74
|
-
margin: 0 auto;
|
|
75
|
-
overflow-x: auto;
|
|
76
|
-
.grzh-iframe {
|
|
77
|
-
scrollbar-face-color: #9aa1c4;
|
|
78
|
-
/* 滚动条滑块按钮的颜色 */
|
|
79
|
-
scrollbar-highlight-color: #f60;
|
|
80
|
-
/* 滚动条整体颜色 */
|
|
81
|
-
scrollbar-3dlight-color: #f00;
|
|
82
|
-
scrollbar-darkshadow-color: #000;
|
|
83
|
-
/* 滚动条阴影 */
|
|
84
|
-
scrollbar-shadow-color: #000;
|
|
85
|
-
/* 三角箭头颜色 */
|
|
86
|
-
scrollbar-arrow-color: #394264;
|
|
87
|
-
/* 滚动条轨道颜色 */
|
|
88
|
-
scrollbar-track-color: #394264;
|
|
89
|
-
|
|
90
|
-
::-webkit-scrollbar {
|
|
91
|
-
width: 5px;
|
|
92
|
-
height: 5px;
|
|
93
|
-
}
|
|
94
|
-
::-webkit-scrollbar-thumb {
|
|
95
|
-
background-color: #999;
|
|
96
|
-
-webkit-border-radius: 5px;
|
|
97
|
-
border-radius: 5px;
|
|
98
|
-
}
|
|
99
|
-
::-webkit-scrollbar-thumb:vertical:hover {
|
|
100
|
-
background-color: #666;
|
|
101
|
-
}
|
|
102
|
-
::-webkit-scrollbar-thumb:vertical:active {
|
|
103
|
-
background-color: #333;
|
|
104
|
-
}
|
|
105
|
-
::-webkit-scrollbar-button {
|
|
106
|
-
display: none;
|
|
107
|
-
}
|
|
108
|
-
::-webkit-scrollbar-track {
|
|
109
|
-
background-color: #f1f1f1;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div id="action_alert_iframe">
|
|
3
|
+
<iframe
|
|
4
|
+
class="grzh-iframe"
|
|
5
|
+
:id="tampId"
|
|
6
|
+
:data-name="tampId"
|
|
7
|
+
:src="actionAlertIframe.template"
|
|
8
|
+
:width="actionAlertIframe.version == 1?actionAlertIframe.width:'100%'"
|
|
9
|
+
:height="actionAlertIframe.height"
|
|
10
|
+
:scrolling="actionAlertIframe.scrolling"
|
|
11
|
+
frameborder="no"
|
|
12
|
+
border="0"
|
|
13
|
+
></iframe>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "action_alert_iframe",
|
|
19
|
+
props: ["actionAlertIframe"],
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
name: "action_alert_iframe",
|
|
23
|
+
dataName: "",
|
|
24
|
+
tampId:'',
|
|
25
|
+
// 组件接收数据
|
|
26
|
+
actionAlertIframeObj: {
|
|
27
|
+
template: "url地址(可插入变量)",
|
|
28
|
+
description: "描述",
|
|
29
|
+
height: "frame高度",
|
|
30
|
+
width: "iframe 的宽度",
|
|
31
|
+
scrolling: "yes/no/auto(是否在 iframe 中显示滚动条)",
|
|
32
|
+
sandbox: [
|
|
33
|
+
"预留",
|
|
34
|
+
"启用一系列对 <iframe> 中内容的额外限制",
|
|
35
|
+
"参考 https://www.w3school.com.cn/tags/att_iframe_sandbox.asp",
|
|
36
|
+
],
|
|
37
|
+
frameborder: "0/1(是否显示框架周围的边框)",
|
|
38
|
+
displayStyle:
|
|
39
|
+
"iframe 样式(点击弹出/嵌入iframe 字符串类型后端未做限制)",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
methods: {},
|
|
44
|
+
mounted() {
|
|
45
|
+
this.tampId = 'iframeId++' + new Date().getTime();
|
|
46
|
+
let tampUrl = this.actionAlertIframe.template;
|
|
47
|
+
function GetRequest() {
|
|
48
|
+
var url = tampUrl.split("?")[1]; //获取url中"?"符后的字串
|
|
49
|
+
var theRequest = new Object();
|
|
50
|
+
if (url) {
|
|
51
|
+
// var str = url.substr(1);
|
|
52
|
+
let strs = url.split("&");
|
|
53
|
+
for (var i = 0; i < strs.length; i++) {
|
|
54
|
+
theRequest[strs[i].split("=")[0]] = unescape(
|
|
55
|
+
strs[i].split("=")[1]
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return theRequest;
|
|
60
|
+
}
|
|
61
|
+
if (JSON.stringify(GetRequest()) == "{}") {
|
|
62
|
+
this.actionAlertIframe.template = this.actionAlertIframe.template + "?iframeId=" + this.tampId
|
|
63
|
+
} else {
|
|
64
|
+
this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
</script>
|
|
69
|
+
<style lang="less" scoped>
|
|
70
|
+
// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
71
|
+
|
|
72
|
+
#action_alert_iframe {
|
|
73
|
+
width: 100%;
|
|
74
|
+
margin: 0 auto;
|
|
75
|
+
overflow-x: auto;
|
|
76
|
+
.grzh-iframe {
|
|
77
|
+
scrollbar-face-color: #9aa1c4;
|
|
78
|
+
/* 滚动条滑块按钮的颜色 */
|
|
79
|
+
scrollbar-highlight-color: #f60;
|
|
80
|
+
/* 滚动条整体颜色 */
|
|
81
|
+
scrollbar-3dlight-color: #f00;
|
|
82
|
+
scrollbar-darkshadow-color: #000;
|
|
83
|
+
/* 滚动条阴影 */
|
|
84
|
+
scrollbar-shadow-color: #000;
|
|
85
|
+
/* 三角箭头颜色 */
|
|
86
|
+
scrollbar-arrow-color: #394264;
|
|
87
|
+
/* 滚动条轨道颜色 */
|
|
88
|
+
scrollbar-track-color: #394264;
|
|
89
|
+
|
|
90
|
+
::-webkit-scrollbar {
|
|
91
|
+
width: 5px;
|
|
92
|
+
height: 5px;
|
|
93
|
+
}
|
|
94
|
+
::-webkit-scrollbar-thumb {
|
|
95
|
+
background-color: #999;
|
|
96
|
+
-webkit-border-radius: 5px;
|
|
97
|
+
border-radius: 5px;
|
|
98
|
+
}
|
|
99
|
+
::-webkit-scrollbar-thumb:vertical:hover {
|
|
100
|
+
background-color: #666;
|
|
101
|
+
}
|
|
102
|
+
::-webkit-scrollbar-thumb:vertical:active {
|
|
103
|
+
background-color: #333;
|
|
104
|
+
}
|
|
105
|
+
::-webkit-scrollbar-button {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
::-webkit-scrollbar-track {
|
|
109
|
+
background-color: #f1f1f1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
113
|
</style>
|