Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11ecf879
authored
Nov 25, 2021
by
zhousil
Browse files
Options
_('Browse Files')
Download
Plain Diff
解决冲突
parents
0f1e57c5
b17cc118
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
16 deletions
components/css/benefits-plan.less
components/message.vue
database/index.ts
hybrid-input/index.vue
xim/index.ts
components/css/benefits-plan.less
View file @
11ecf879
...
@@ -4,7 +4,77 @@
...
@@ -4,7 +4,77 @@
color: #E84929;
color: #E84929;
margin-bottom: 10px;
margin-bottom: 10px;
}
}
.item-title{
}
/deep/.benefits-plan-message {
.plan-title-wrap {
display: flex;
justify-content: space-between;
margin-bottom: 4px;
.total-price {
color: #e84929;
white-space: nowrap;
}
.paid-money{
color: #e84929;
margin: 0 10px;
white-space: nowrap;
}
.plan-status{
white-space: nowrap;
}
.item-title {
max-width: 185px;
color: #373737;
font-size: 14px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: underline;
margin-right: 8px;
cursor: pointer;
&:hover{
color: #666;
}
}
}
.product-item {
display: flex;
padding: 16px 0;
&:not(:last-child) {
border-bottom: 1px dashed #ededed;
}
img {
width: 50px;
height: 50px;
margin-right: 10px;
}
.product-detail {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1;
.product-name {
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.price-nums{
display: flex;
justify-content: space-between;
}
}
}
}
/deep/.benefits-welfare-message {
.item-title {
font-weight: bold;
margin-bottom: 10px;
text-decoration: underline;
cursor: pointer;
cursor: pointer;
text-decoration: underline;
text-decoration: underline;
}
}
...
...
components/message.vue
View file @
11ecf879
...
@@ -76,7 +76,12 @@
...
@@ -76,7 +76,12 @@
<span
<span
class=
"withdraw"
class=
"withdraw"
v-if=
"isMyMessage && canWithdraw && !isWithdrawMessage && !isQuestionAnswerMessage"
v-if=
"
isMyMessage &&
canWithdraw &&
!isWithdrawMessage &&
!isQuestionAnswerMessage
"
@
click=
"withdraw"
@
click=
"withdraw"
>
撤回此消息
</span
>
撤回此消息
</span
>
>
...
@@ -194,6 +199,9 @@
...
@@ -194,6 +199,9 @@
@
chatStore
.
Action
(
ChatStore
.
ACTION_SET_HANDLED
)
@
chatStore
.
Action
(
ChatStore
.
ACTION_SET_HANDLED
)
private
readonly
setHandled
!
:
ChatStore
.
ACTION_SET_HANDLED
;
private
readonly
setHandled
!
:
ChatStore
.
ACTION_SET_HANDLED
;
@
chatStore
.
Getter
(
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
)
private
readonly
currentChat
!
:
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
;
@
Prop
({
type
:
Object
,
default
:
()
=>
Object
.
create
(
null
)
})
@
Prop
({
type
:
Object
,
default
:
()
=>
Object
.
create
(
null
)
})
private
readonly
data
!
:
dto
.
Message
;
private
readonly
data
!
:
dto
.
Message
;
...
@@ -281,12 +289,22 @@
...
@@ -281,12 +289,22 @@
if
(
this
.
chatMembers
)
{
if
(
this
.
chatMembers
)
{
const
t
=
this
.
chatMembers
.
find
((
i
)
=>
i
.
eid
===
this
.
data
.
eid
);
const
t
=
this
.
chatMembers
.
find
((
i
)
=>
i
.
eid
===
this
.
data
.
eid
);
if
(
t
)
{
if
(
t
)
{
return
t
.
name
;
return
t
his
.
getFilterUsername
(
t
.
name
)
;
}
}
}
}
return
""
;
return
""
;
}
}
private
getFilterUsername
(
name
:
string
)
{
if
(
this
.
currentChat
&&
this
.
currentChat
.
catalog
===
"福利宝"
&&
this
.
chatRole
===
"customer-service"
)
{
return
`采购顾问
${
name
}
`
;
}
return
name
;
}
private
get
avatar
()
{
private
get
avatar
()
{
const
mapping
=
getUserMapping
();
const
mapping
=
getUserMapping
();
...
...
database/index.ts
View file @
11ecf879
...
@@ -57,17 +57,17 @@ class ChatCacheDatabaseController {
...
@@ -57,17 +57,17 @@ class ChatCacheDatabaseController {
}
}
resolve
();
resolve
();
};
};
r
.
onsuccess
=
function
(
e
)
{
r
.
onsuccess
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`index database init comepleted`
);
console
.
log
(
`index database init comepleted`
);
setupDb
();
setupDb
();
};
};
r
.
onupgradeneeded
=
function
(
e
)
{
r
.
onupgradeneeded
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`upgrade database comepleted`
);
console
.
log
(
`upgrade database comepleted`
);
setupDb
();
setupDb
();
};
};
r
.
onerror
=
function
(
e
)
{
r
.
onerror
=
function
(
e
)
{
console
.
log
(
`index database init failed,
${
e
}
`
);
console
.
log
(
`index database init failed,
${
e
}
`
);
};
};
}
else
{
}
else
{
...
@@ -94,17 +94,17 @@ class ChatCacheDatabaseController {
...
@@ -94,17 +94,17 @@ class ChatCacheDatabaseController {
}
}
setTimeout
(()
=>
resolve
(),
200
);
setTimeout
(()
=>
resolve
(),
200
);
};
};
r
.
onsuccess
=
function
(
e
)
{
r
.
onsuccess
=
function
(
e
)
{
const
db
=
(
e
.
target
as
any
).
result
;
const
db
=
(
e
.
target
as
any
).
result
;
that
.
messageDatabases
.
set
(
k
,
db
);
that
.
messageDatabases
.
set
(
k
,
db
);
setupDb
();
setupDb
();
};
};
r
.
onupgradeneeded
=
function
(
e
)
{
r
.
onupgradeneeded
=
function
(
e
)
{
const
db
=
(
e
.
target
as
any
).
result
;
const
db
=
(
e
.
target
as
any
).
result
;
that
.
messageDatabases
.
set
(
k
,
db
);
that
.
messageDatabases
.
set
(
k
,
db
);
setupDb
();
setupDb
();
};
};
r
.
onerror
=
function
(
e
)
{
r
.
onerror
=
function
(
e
)
{
console
.
log
(
console
.
log
(
`chat message index database init failed,
${
e
}
`
`chat message index database init failed,
${
e
}
`
);
);
...
...
hybrid-input/index.vue
View file @
11ecf879
...
@@ -127,6 +127,15 @@
...
@@ -127,6 +127,15 @@
"xls"
,
"xls"
,
"xlsx"
,
"xlsx"
,
"pdf"
,
"pdf"
,
"zip"
,
"rar"
,
"rars"
,
"7z"
,
"iso"
,
"tar"
,
"cab"
,
"jar"
,
"uue"
,
];
];
@
Component
({
components
:
{}
})
@
Component
({
components
:
{}
})
...
@@ -208,7 +217,7 @@
...
@@ -208,7 +217,7 @@
private
allowLoadFile
()
{
private
allowLoadFile
()
{
this
.
acceptType
=
this
.
acceptType
=
limitedFileExtension
.
map
((
i
)
=>
`.
${
i
}
`
).
join
(
","
)
+
",image/*"
;
limitedFileExtension
.
map
((
i
)
=>
`.
${
i
}
`
).
join
(
","
)
+
",image/*
,video/*
"
;
}
}
private
async
handlePasteEvent
(
event
:
ClipboardEvent
)
{
private
async
handlePasteEvent
(
event
:
ClipboardEvent
)
{
...
...
xim/index.ts
View file @
11ecf879
...
@@ -59,7 +59,7 @@ class Chat {
...
@@ -59,7 +59,7 @@ class Chat {
option
.
avatar
!==
undefined
&&
option
.
avatar
!==
undefined
&&
(
this
.
defaultAvatar
=
option
.
avatar
);
(
this
.
defaultAvatar
=
option
.
avatar
);
await
this
.
setupIndexDb
();
await
this
.
setupIndexDb
(
option
.
orgId
()
);
this
.
token
=
async
()
=>
option
.
sdk
().
global
.
jwtToken
;
this
.
token
=
async
()
=>
option
.
sdk
().
global
.
jwtToken
;
tokenManager
.
save
(
this
.
token
);
tokenManager
.
save
(
this
.
token
);
...
@@ -83,12 +83,11 @@ class Chat {
...
@@ -83,12 +83,11 @@ class Chat {
});
});
}
}
private
setupIndexDb
()
{
private
setupIndexDb
(
orgId
:
number
|
string
)
{
if
(
this
.
_sdk
)
{
if
(
this
.
_sdk
)
{
const
s
=
this
.
_sdk
();
const
s
=
this
.
_sdk
();
return
dbController
.
setup
(
const
key
=
`
${
s
.
global
.
uid
}
-
${
orgId
||
0
}
`
s
.
global
.
uid
+
"-"
+
(
s
.
global
.
initData
.
orgId
||
0
)
return
dbController
.
setup
(
key
);
);
}
}
return
Promise
.
reject
();
return
Promise
.
reject
();
}
}
...
@@ -96,7 +95,7 @@ class Chat {
...
@@ -96,7 +95,7 @@ class Chat {
public
resetup
(
org
:
()
=>
string
|
number
)
{
public
resetup
(
org
:
()
=>
string
|
number
)
{
this
.
_orgId
=
org
;
this
.
_orgId
=
org
;
xim
.
onConnected
();
xim
.
onConnected
();
return
this
.
setupIndexDb
();
return
this
.
setupIndexDb
(
org
()
);
}
}
public
unSetup
()
{
public
unSetup
()
{
...
...
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