Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
4abf166f
Commit
4abf166f
authored
Aug 27, 2021
by
liyuhang19990520
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天记录导出
parent
d325d5f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
7 deletions
+45
-7
package-lock.json
+3
-3
src/views/im/components/chat.vue
+36
-2
src/views/im/conf/index.js
+6
-2
No files found.
package-lock.json
View file @
4abf166f
...
@@ -13001,9 +13001,9 @@
...
@@ -13001,9 +13001,9 @@
"dev"
:
true
"dev"
:
true
},
},
"tar"
:
{
"tar"
:
{
"version"
:
"6.1.1
0
"
,
"version"
:
"6.1.1
1
"
,
"resolved"
:
"https://registry.npmjs.org/tar/-/tar-6.1.1
0
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/tar/-/tar-6.1.1
1
.tgz"
,
"integrity"
:
"sha512-
kvvfiVvjGMxeUNB6MyYv5z7vhfFRwbwCXJAeL0/lnbrttBVqcMOnpHUf0X42LrPMR8mMpgapkJMchFH4FSHzN
A=="
,
"integrity"
:
"sha512-
an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tzn
A=="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"chownr"
:
"^2.0.0"
,
"chownr"
:
"^2.0.0"
,
...
...
src/views/im/components/chat.vue
View file @
4abf166f
...
@@ -206,6 +206,9 @@
...
@@ -206,6 +206,9 @@
class=
"history-message"
class=
"history-message"
width=
"60%"
width=
"60%"
>
>
<Button
type=
"warning"
class=
"export"
@
click=
"exportEvent"
>
导出聊天记录
</Button
>
<history-message
<history-message
:showHistory=
"showHistory"
:showHistory=
"showHistory"
:chat=
"chat"
:chat=
"chat"
...
@@ -368,7 +371,35 @@ export default {
...
@@ -368,7 +371,35 @@ export default {
});
});
console
.
log
(
user
);
console
.
log
(
user
);
},
},
exportEvent
()
{
RequestUtils
.
request
(
conf
.
getExportUrl
())
.
then
((
json
)
=>
{
if
(
json
.
code
==
200
)
{
let
str
=
"D:/temp"
;
let
fileUrl
=
json
.
data
.
fileUrl
.
replace
(
/
\\
/g
,
"/"
);
let
url
=
"https://"
+
localStorage
.
getItem
(
"host"
)
+
":"
+
conf
.
http_port
+
fileUrl
.
slice
(
str
.
length
);
// 组装a标签
let
elink
=
document
.
createElement
(
"a"
);
// 设置下载文件名
elink
.
download
=
'聊天记录.xls'
;
elink
.
style
.
display
=
"none"
;
elink
.
href
=
URL
.
createObjectURL
(
blob
);
document
.
body
.
appendChild
(
elink
);
elink
.
click
();
document
.
body
.
removeChild
(
elink
);
}
else
if
(
json
.
code
==
201
)
{
this
.
$Message
.
error
(
"操作失败"
);
}
})
.
catch
((
err
)
=>
{
console
.
error
(
err
);
});
},
approver
()
{
approver
()
{
this
.
groupPersonBoo
=
true
;
this
.
groupPersonBoo
=
true
;
this
.
getApplyList
();
this
.
getApplyList
();
...
@@ -907,7 +938,10 @@ export default {
...
@@ -907,7 +938,10 @@ export default {
width
:
100%
;
width
:
100%
;
margin
:
0.5rem
;
margin
:
0.5rem
;
}
}
.export
{
margin-left
:
10px
;
margin-top
:
10px
;
}
.ivu-drawer-body
{
.ivu-drawer-body
{
padding
:
0
!important
;
padding
:
0
!important
;
...
...
src/views/im/conf/index.js
View file @
4abf166f
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2021-08-20 16:31:17
* @Date: 2021-08-20 16:31:17
* @LastEditTime: 2021-08-2
5 14:42:06
* @LastEditTime: 2021-08-2
7 15:34:23
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \V-IM-PC\src\views\im\conf\index.js
* @FilePath: \V-IM-PC\src\views\im\conf\index.js
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
export
default
{
export
default
{
app_name
:
"V-IM"
,
app_name
:
"V-IM"
,
http_protocol
:
"http"
,
http_protocol
:
"http"
,
http_port
:
808
4
,
http_port
:
808
2
,
ws_port
:
9326
,
ws_port
:
9326
,
init
:
"/api/user/init"
,
init
:
"/api/user/init"
,
his_url
:
"/api/message/list"
,
his_url
:
"/api/message/list"
,
...
@@ -25,6 +25,7 @@ export default {
...
@@ -25,6 +25,7 @@ export default {
chatGroupUserDsh_url
:
'/api/chatGroupUser/dsh'
,
chatGroupUserDsh_url
:
'/api/chatGroupUser/dsh'
,
chatGroupUserAgree_url
:
'/api/chatGroupUser/agree'
,
chatGroupUserAgree_url
:
'/api/chatGroupUser/agree'
,
chatGroupDelUser_url
:
'/api/chatGroupUser/delete'
,
chatGroupDelUser_url
:
'/api/chatGroupUser/delete'
,
export_url
:
'/api/message/export'
,
ws_protocol
:
"ws"
,
ws_protocol
:
"ws"
,
getHostUrl
:
function
()
{
getHostUrl
:
function
()
{
return
(
return
(
...
@@ -80,6 +81,9 @@ export default {
...
@@ -80,6 +81,9 @@ export default {
getChatGroupUserAgreeUrl
:
function
()
{
getChatGroupUserAgreeUrl
:
function
()
{
return
this
.
getHostUrl
()
+
this
.
chatGroupUserAgree_url
;
return
this
.
getHostUrl
()
+
this
.
chatGroupUserAgree_url
;
},
},
getExportUrl
:
function
()
{
return
this
.
getHostUrl
()
+
this
.
export_url
;
},
getWsUrl
:
function
()
{
getWsUrl
:
function
()
{
return
(
return
(
this
.
ws_protocol
+
this
.
ws_protocol
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment