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
7fd936ec
authored
Jan 06, 2022
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://gitlab.corp.qinqinxiaobao.com:9880/uniplat/customer-service
parents
f2aba9bf
23a41a63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
4 deletions
components/message-item/position-message.vue
xim/models/chat.ts
components/message-item/position-message.vue
View file @
7fd936ec
<
template
>
<
template
>
<div
class=
"position-message"
@
click=
"openPosition"
>
<div
class=
"position-message"
@
click=
"openPosition"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<span
class=
"d-flex align-items-center"
>
<span
class=
"d-flex align-items-center
flex-fill
"
>
<span
class=
"title"
>
{{
title
}}
</span>
<span
class=
"title
flex-fill
"
>
{{
title
}}
</span>
<span
<span
v-for=
"item in tags"
v-for=
"item in tags"
:key=
"item.title"
:key=
"item.title"
...
@@ -46,7 +46,43 @@
...
@@ -46,7 +46,43 @@
}
}
private
get
salary
()
{
private
get
salary
()
{
return
this
.
positionData
.
salary
;
const
max
=
this
.
positionData
.
max_salary
;
const
min
=
this
.
positionData
.
min_salary
;
const
formatSalary
=
(
v
:
number
,
type
?:
"Y"
|
"K"
)
=>
{
if
(
type
===
"K"
)
{
return
{
v
:
parseFloat
((
v
/
1000
).
toFixed
(
2
)),
unit
:
"K"
,
};
}
if
(
+
v
<
1000
)
{
return
{
v
,
unit
:
""
,
};
}
else
{
return
{
v
:
parseFloat
((
v
/
1000
).
toFixed
(
2
)),
unit
:
"K"
,
};
}
};
if
(
!
max
&&
!
min
)
{
return
"面议"
;
}
if
(
+
min
>=
+
max
)
{
const
v
=
formatSalary
(
min
);
return
`
${
v
.
v
}${
v
.
unit
}
`
;
}
const
formatMin
=
formatSalary
(
min
);
const
formatMax
=
formatSalary
(
max
);
if
(
formatMin
.
unit
===
formatMax
.
unit
)
{
return
`
${
formatMin
.
v
}
-
${
formatMax
.
v
}
${
formatMax
.
unit
}
`
;
}
else
{
const
formatMin
=
formatSalary
(
min
,
"K"
);
const
formatMax
=
formatSalary
(
max
,
"K"
);
return
`
${
formatMin
.
v
}
-
${
formatMax
.
v
}
K`
;
}
}
}
private
get
positionBody
()
{
private
get
positionBody
()
{
...
@@ -64,7 +100,9 @@
...
@@ -64,7 +100,9 @@
private
get
tail
()
{
private
get
tail
()
{
return
[
return
[
this
.
positionData
.
company_name
,
this
.
positionData
.
company_name
,
this
.
positionData
.
business_scope
,
this
.
positionData
.
business_scope
!==
'0'
?
this
.
positionData
.
business_scope
:
""
,
];
];
}
}
...
...
xim/models/chat.ts
View file @
7fd936ec
...
@@ -230,6 +230,8 @@ export interface PositionMessage {
...
@@ -230,6 +230,8 @@ export interface PositionMessage {
company_name
:
string
;
company_name
:
string
;
business_scope
:
string
;
business_scope
:
string
;
post_id
:
number
;
post_id
:
number
;
max_salary
:
number
;
min_salary
:
number
;
}
}
export
interface
CsUser
{
export
interface
CsUser
{
...
...
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