askbot-dragon 1.1.5 → 1.1.7
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="answer-docknowledge">
|
|
3
3
|
<div v-if="msg.content.type == 0" class="answer-text">{{ msg.content.text }}<span
|
|
4
|
-
@click="lookAttach(msg.content.list[0].url)" class="aci-view">查看原文 ></span></div>
|
|
4
|
+
@click="lookAttach(msg.content.list[0].url, msg.content.list[0])" class="aci-view">查看原文 ></span></div>
|
|
5
5
|
<div v-if="msg.content.type == 1" class="answer-text">{{ msg.content.text }}</div>
|
|
6
6
|
<div class="ad-list">
|
|
7
7
|
<div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell">
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
<span class="alc-title-from">{{ item.from }}</span>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="alc-content-text" v-if="msg.content.type == 1">
|
|
16
|
-
<span @click="lookAttach(item.url)" class="aci-view">查看 ></span>
|
|
16
|
+
<span @click="lookAttach(item.url, item)" class="aci-view">查看 ></span>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="alc-box-introduction">
|
|
20
|
-
{{ item.introduction }}
|
|
19
|
+
<div v-html="item.introduction" class="alc-box-introduction">
|
|
21
20
|
</div>
|
|
22
21
|
<div class="alc-updateTime" v-if="isAskLightning == 1">
|
|
23
|
-
<div class="upload-source">
|
|
24
|
-
{{item.source}}
|
|
25
|
-
</div>
|
|
26
|
-
<div class="time">
|
|
27
|
-
最后更新时间: {{ item.updateTime }}
|
|
22
|
+
<div v-show="docSource[item.source]" class="upload-source">
|
|
23
|
+
{{docSource[item.source]}}
|
|
28
24
|
</div>
|
|
25
|
+
<!-- <div class="time">
|
|
26
|
+
<span>更新时间:</span>
|
|
27
|
+
{{ new Date(item.updateTime).Format('MM-dd hh:mm') }}
|
|
28
|
+
</div> -->
|
|
29
29
|
</div>
|
|
30
30
|
<!-- <span v-if="isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>-->
|
|
31
31
|
</div>
|
|
32
32
|
<div class="alc-content" v-if="false">
|
|
33
33
|
<div v-if="msg.content.type == 1" class="alc-content-text">{{ item.introduction }} <span
|
|
34
|
-
@click="lookAttach(item.url)" class="aci-view">查看原文 ></span>
|
|
34
|
+
@click="lookAttach(item.url, item)" class="aci-view">查看原文 ></span>
|
|
35
35
|
</div>
|
|
36
36
|
<span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
|
|
37
37
|
<div v-if="false" class="alc-content-info">
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
|
-
<previewDoc ref="previewDoc" :url="previewHref"></previewDoc>
|
|
47
|
+
<previewDoc ref="previewDoc" :url="previewHref" officePreviewType="pdf"></previewDoc>
|
|
48
48
|
</div>
|
|
49
49
|
</template>
|
|
50
50
|
|
|
@@ -57,6 +57,12 @@ export default {
|
|
|
57
57
|
return {
|
|
58
58
|
isPC: true,
|
|
59
59
|
previewHref: "",
|
|
60
|
+
docSource: {
|
|
61
|
+
LOCAL_FILE: "上传于本地文件",
|
|
62
|
+
CREATED_BY_ONESELF: "来源于自建",
|
|
63
|
+
WECHAT: "来源于微信",
|
|
64
|
+
AUTO_SYN_FROM_LOCAL_FILE: "自动同步与本地",
|
|
65
|
+
},
|
|
60
66
|
imageObj: {
|
|
61
67
|
PDF: 'pdf',
|
|
62
68
|
pdf: 'pdf',
|
|
@@ -128,6 +134,9 @@ export default {
|
|
|
128
134
|
lookAttach(url) {
|
|
129
135
|
this.previewHref = url
|
|
130
136
|
this.$refs.previewDoc.previewShowPopup = true;
|
|
137
|
+
this.$nextTick(() =>{
|
|
138
|
+
this.$refs.previewDoc.loadIframe(item)
|
|
139
|
+
})
|
|
131
140
|
},
|
|
132
141
|
}
|
|
133
142
|
}
|
|
@@ -166,16 +175,20 @@ export default {
|
|
|
166
175
|
display: flex;
|
|
167
176
|
align-items: center;
|
|
168
177
|
justify-content: space-between;
|
|
169
|
-
font-size:
|
|
178
|
+
font-size: 12px;
|
|
170
179
|
width: 100%;
|
|
171
180
|
.alc-source-left{
|
|
172
181
|
display: flex;
|
|
173
182
|
align-items: center;
|
|
174
183
|
.source-form{
|
|
184
|
+
width: 40px;
|
|
185
|
+
flex: none;
|
|
175
186
|
color: #A9B3C6;
|
|
176
187
|
}
|
|
177
188
|
}
|
|
178
189
|
.alc-content-text{
|
|
190
|
+
width: 55px;
|
|
191
|
+
flex: none;
|
|
179
192
|
.aci-view{
|
|
180
193
|
color: #366aff;
|
|
181
194
|
cursor: pointer;
|
|
@@ -195,13 +208,13 @@ export default {
|
|
|
195
208
|
-webkit-box-orient:vertical;
|
|
196
209
|
margin-top: 10px;
|
|
197
210
|
color: #616161;
|
|
198
|
-
font-size:
|
|
211
|
+
font-size: 12px;
|
|
199
212
|
}
|
|
200
213
|
.alc-updateTime{
|
|
201
214
|
display: flex;
|
|
202
215
|
align-items: center;
|
|
203
216
|
justify-content: space-between;
|
|
204
|
-
font-size:
|
|
217
|
+
font-size: 12px;
|
|
205
218
|
width: 100%;
|
|
206
219
|
margin-top: 10px;
|
|
207
220
|
.upload-source{
|
|
@@ -218,12 +231,13 @@ export default {
|
|
|
218
231
|
}
|
|
219
232
|
.time{
|
|
220
233
|
color: #999999;
|
|
234
|
+
margin-left: 10px;
|
|
221
235
|
}
|
|
222
236
|
}
|
|
223
237
|
.alc-title-icon {
|
|
224
|
-
margin: 0
|
|
225
|
-
width:
|
|
226
|
-
height:
|
|
238
|
+
margin: 0 2px;
|
|
239
|
+
width: 18px;
|
|
240
|
+
height: 18px;
|
|
227
241
|
}
|
|
228
242
|
|
|
229
243
|
.alc-title-updateTime {
|
|
@@ -244,7 +258,8 @@ export default {
|
|
|
244
258
|
|
|
245
259
|
.alc-content-text {
|
|
246
260
|
margin-bottom: 6px;
|
|
247
|
-
|
|
261
|
+
width: 55px;
|
|
262
|
+
flex: none;
|
|
248
263
|
.aci-view {
|
|
249
264
|
display: inline-block;
|
|
250
265
|
margin-left: 30px;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
:formList="formList2"
|
|
18
18
|
@submitClick="submitClick"
|
|
19
19
|
></form-template>
|
|
20
|
-
<answer-docknowledge :msg="answerDocknowledge"></answer-docknowledge>
|
|
20
|
+
<answer-docknowledge :isAskLightning="1" :msg="answerDocknowledge"></answer-docknowledge>
|
|
21
21
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
22
22
|
<div slot="voiceTip">
|
|
23
23
|
松开发送
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
127
127
|
introduction: "女职工生育享受98天产假,其中产前可以休假15天,难产的或者生育多 胞胎的,可以增加产假时间。女职工在休产假期间", // 简介
|
|
128
128
|
owner: "管理员", // 所有者
|
|
129
129
|
enterprise: "果然智汇", // 所属企业
|
|
130
|
-
source: "
|
|
130
|
+
source: "LOCAL_FILE", // 文件来源 例如 企业微信微盘
|
|
131
131
|
url: "https://www.baidu.com/",
|
|
132
132
|
},{
|
|
133
133
|
format: "TXT", // 格式 例如 PDF,DOC 等
|
|
@@ -136,7 +136,7 @@ export default {
|
|
|
136
136
|
introduction: "女职工生育享受98天产假,其中产前可以休假15天,难产的或者生育多 胞胎的,可以增加产假时间。女职工在休产假期间", // 简介
|
|
137
137
|
owner: "管理员", // 所有者
|
|
138
138
|
enterprise: "果然智汇", // 所属企业
|
|
139
|
-
source: "
|
|
139
|
+
source: "CREATED_BY_ONESELF", // 文件来源 例如 企业微信微盘
|
|
140
140
|
url: "https://www.baidu.com/",
|
|
141
141
|
}
|
|
142
142
|
]
|
|
@@ -35,6 +35,10 @@ export default {
|
|
|
35
35
|
url:{
|
|
36
36
|
type: String,
|
|
37
37
|
required: true,
|
|
38
|
+
},
|
|
39
|
+
officePreviewType:{
|
|
40
|
+
type: String,
|
|
41
|
+
default: ''
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
computed:{
|
|
@@ -48,6 +52,9 @@ export default {
|
|
|
48
52
|
url += btoa(this.url)
|
|
49
53
|
}
|
|
50
54
|
}
|
|
55
|
+
if(this.officePreviewType !== '') {
|
|
56
|
+
url += '&officePreviewType=pdf'
|
|
57
|
+
}
|
|
51
58
|
return url
|
|
52
59
|
},
|
|
53
60
|
fileType() {
|
|
@@ -63,6 +70,22 @@ export default {
|
|
|
63
70
|
methods :{
|
|
64
71
|
close() {
|
|
65
72
|
this.previewShowPopup = false
|
|
73
|
+
},
|
|
74
|
+
loadIframe(item) {
|
|
75
|
+
let iframe = document.getElementsByClassName('preview_iframe')[0]
|
|
76
|
+
iframe.onload(() =>{
|
|
77
|
+
iframe.contentWindow.postMessage({
|
|
78
|
+
type: "positionText",
|
|
79
|
+
data: item.text,
|
|
80
|
+
page: item.page
|
|
81
|
+
}, '*')
|
|
82
|
+
})
|
|
83
|
+
// if(preview) {
|
|
84
|
+
// preview.postMessage({
|
|
85
|
+
// type: "positionText",
|
|
86
|
+
// data: ``
|
|
87
|
+
// }, '*')
|
|
88
|
+
// }
|
|
66
89
|
}
|
|
67
90
|
}
|
|
68
91
|
}
|