Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3b7ebc78
authored
Jul 22, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.42' of
http://192.168.3.233:8090/saas_plus/dj-car-life-system
into SAAS+V4.42
2 parents
3002819b
9a3f0f86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
154 additions
and
57 deletions
src/views/residentManage/exercise/components/pairDetail.vue
src/views/residentManage/exercise/components/pairDetail.vue
View file @
3b7ebc7
<
template
>
<div
class=
"dialogue"
>
<!--
<div
class=
"record"
>
<audio
id=
"audio1"
>
<source
:src=
"detailObj.fileUrl"
type=
"audio/mpeg"
/>
<source
:src=
"detailObj.fileUrl"
type=
"audio/ogg"
/>
您的浏览器不支持 audio 标签。
</audio>
<div
class=
"play"
v-if=
"isPlay"
@
click=
"handleAudio"
>
<img
src=
"@/assets/play.png"
/>
</div>
<div
class=
"play"
v-else
@
click=
"handleAudio"
>
<img
src=
"@/assets/pause.png"
/>
</div>
<div
class=
"times"
>
{{
currentTime
}}
/
{{
totalTime
}}
</div>
<div
id=
"progressBar"
@
mousemove=
"isCircle = true"
@
mouseout=
"isCircle = false"
>
<div
id=
"progress"
>
<div
class=
"circle"
@
mousemove=
"isCircle = true"
draggable=
"true"
v-if=
"isCircle"
></div>
</div>
</div>
<div
class=
"trumpet"
@
click=
"handleMute"
>
<img
src=
"@/assets/trumpet.png"
v-if=
"isMuted"
/>
<img
src=
"@/assets/mute.png"
v-if=
"!isMuted"
/>
</div>
</div>
-->
<div
class=
"record-info"
>
<div
class=
"dialog"
>
<template
v-for=
"item in dialogList"
>
<div
:class=
"
{ 'dialog-detail': true, 'nth-child': item.role == '2' }" :key="item.id">
<div
:class=
"
{ 'dialog-detail': true, 'nth-child': item.role == '2' }"
:key="item.id"
>
<div
class=
"name"
>
<img
class=
"role"
src=
"@/assets/role-one.png"
v-if=
"item.role == '1'"
/>
{{
item
.
role
==
'1'
?
'客户'
:
'销售'
}}
<img
class=
"role"
src=
"@/assets/role-two.png"
v-if=
"item.role == '2'"
/>
<img
class=
"role"
src=
"@/assets/role-one.png"
v-if=
"item.role == '1'"
/>
{{
item
.
role
==
"1"
?
"客户"
:
"销售"
}}
<img
class=
"role"
src=
"@/assets/role-two.png"
v-if=
"item.role == '2'"
/>
</div>
<div
class=
"dig-content"
@
click=
"currentDialog(item)"
>
{{
item
.
content
}}
<div
class=
"dig-content"
>
{{
item
.
content
}}
</br>
<template
v-if=
"item.role == 2"
>
<div
class=
"improve-btn"
v-if=
"!item.isdown"
@
click=
"handleDown(item)"
>
改进建议
<i
class=
"el-icon-arrow-down"
></i></div>
<div
class=
"suggest"
v-if=
"item.isdown"
>
<div
class=
"improve"
>
<img
src=
"@/assets/improve.png"
class=
"improve-img"
/>
改进建议
</div>
<template
v-if=
"item.suggestionsForImprovement"
>
<div
class=
"improve-text"
v-html=
"
regText(item.highlight, item.suggestionsForImprovement)
"
></div></
template
>
<div
class=
"no-data"
v-else
>
暂无数据
</div>
<div
class=
"line"
></div>
<div
class=
"improve"
>
<img
src=
"@/assets/polish.png"
class=
"improve-img"
/>
润色表达
</div>
<
template
v-if=
"item.refineTheExpression"
>
<div
class=
"improve-text"
v-html=
"regText(item.highlight, item.refineTheExpression)"
></div>
</
template
>
<div
class=
"no-data"
v-else
>
暂无数据
</div>
<div
class=
"improve-btn pack"
v-if=
"item.isdown"
@
click=
"handleDown(item)"
>
收起
<i
class=
"el-icon-arrow-down"
></i></div>
</div>
</template>
</div>
</div>
</template>
</div>
<div
class=
"abstract"
>
<div
class=
"title"
>
<img
class=
"robot"
src=
"@/assets/robot.png"
/>
AI对话摘要
</div>
<div
class=
"abText"
v-html=
"formatSrt(digest)"
>
</div>
</div>
</div>
</div>
</template>
...
...
@@ -61,7 +64,7 @@
<
script
>
import
{
getSparringDetail
,
getQualityResult
}
from
"@api/exercise"
export
default
{
name
:
'PairDetail'
,
name
:
"PairDetail"
,
props
:
{
detailObj
:
{
type
:
Object
,
...
...
@@ -77,7 +80,7 @@ export default {
totalTime
:
"0:00"
,
currentTime
:
"0:00"
,
isCircle
:
false
,
digest
:
''
digest
:
""
}
},
mounted
()
{
...
...
@@ -86,8 +89,23 @@ export default {
this
.
conversationDetailPage
()
},
methods
:
{
handleDown
(
data
)
{
data
.
isdown
=
!
data
.
isdown
},
regText
(
highlight
,
value
)
{
highlight
=
highlight
?
JSON
.
parse
(
highlight
)
:
[]
let
replacedText
=
value
if
(
value
)
{
highlight
.
forEach
((
item
)
=>
{
replacedText
=
replacedText
.
replace
(
item
,
function
(
match
)
{
return
'<span style="color: #FE9220;">'
+
match
+
"</span>"
})
})
}
return
replacedText
},
formatSrt
(
str
)
{
return
str
?
str
.
replace
(
/
\n
/g
,
"<br/>"
)
:
''
return
str
?
str
.
replace
(
/
\n
/g
,
"<br/>"
)
:
""
},
currentDialog
(
data
)
{
this
.
myAud
.
currentTime
=
data
.
mergedOffset
...
...
@@ -96,7 +114,8 @@ export default {
let
minutes
=
Math
.
floor
(
seconds
/
60
)
let
remainingSeconds
=
parseInt
(
seconds
%
60
)
minutes
=
minutes
>
10
?
minutes
:
`0
${
minutes
}
`
remainingSeconds
=
remainingSeconds
>
10
?
remainingSeconds
:
`0
${
remainingSeconds
}
`
remainingSeconds
=
remainingSeconds
>
10
?
remainingSeconds
:
`0
${
remainingSeconds
}
`
return
`
${
minutes
}
:
${
remainingSeconds
}
`
},
handleprogress
()
{
...
...
@@ -158,11 +177,14 @@ export default {
pageSize
:
9999
}).
then
((
res
)
=>
{
console
.
log
(
res
)
res
.
list
.
forEach
((
item
)
=>
{
item
.
isdown
=
false
})
this
.
dialogList
=
res
.
list
})
getQualityResult
({
taskStaffId
:
this
.
detailObj
.
id
}).
then
(
res
=>
{
}).
then
(
(
res
)
=>
{
this
.
digest
=
res
.
digest
})
}
...
...
@@ -175,7 +197,7 @@ export default {
margin
:
auto
;
.record
{
width
:
600px
;
width
:
100%
;
margin
:
5px
auto
0px
;
height
:
56px
;
background
:
#f7f9fa
;
...
...
@@ -254,9 +276,9 @@ export default {
.record-info
{
width
:
100%
;
float
:
left
;
position
:
relative
;
padding-right
:
354px
;
//
float
:
left
;
//
position
:
relative
;
//
padding-right
:
354px
;
box-sizing
:
border-box
;
height
:
544px
;
margin
:
20px
0
;
...
...
@@ -292,8 +314,9 @@ export default {
}
.dig-content
{
width
:
404px
;
background
:
#EBEBFF
;
width
:
fit-content
;
//
min-width
:
404px
;
background
:
#e6eeff
;
border-radius
:
4px
;
font-size
:
14px
;
color
:
#333333
;
...
...
@@ -303,6 +326,30 @@ export default {
margin-left
:
50px
;
margin-top
:
-20px
;
line-height
:
20px
;
.improve-btn
{
margin-top
:
14px
;
margin-left
:
4px
;
width
:
100px
;
height
:
28px
;
background
:
#f7f9fa
;
border-radius
:
4px
;
line-height
:
28px
;
font-size
:
14px
;
color
:
#2a58ad
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.el-icon-arrow-down
{
color
:
#2a58ad
;
margin-left
:
7px
;
}
}
.pack
{
width
:
70px
!important
;
.el-icon-arrow-down
{
transform
:
rotate
(
180deg
);
}
}
}
}
...
...
@@ -311,7 +358,7 @@ export default {
.dig-content
{
display
:
inline-block
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
margin-right
:
58px
;
}
}
...
...
@@ -357,4 +404,54 @@ export default {
}
}
}
.suggest
{
width
:
100%
;
//
width
:
fit-content
;
//
max-width
:
100%
;
background
:
#fff
;
border-radius
:
4px
;
font-size
:
14px
;
color
:
#333333
;
padding
:
10px
4px
;
white-space
:
pre-wrap
;
text-align
:
left
;
line-height
:
20px
;
margin-top
:
12px
;
margin-right
:
40px
;
display
:
inline-block
;
.improve
{
width
:
94px
;
height
:
28px
;
border-radius
:
4px
;
padding
:
4px
8px
;
display
:
flex
;
align-items
:
center
;
font-weight
:
500
;
font-size
:
14px
;
color
:
#333333
;
margin-bottom
:
6px
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
.improve-img
{
width
:
14px
;
height
:
14px
;
margin-right
:
8px
;
}
}
.improve-text
{
margin
:
0
8px
;
}
.no-data
{
font-weight
:
400
;
font-size
:
12px
;
color
:
#999ea8
;
text-align
:
center
;
}
.line
{
width
:
100%
;
height
:
1px
;
margin
:
12px
8px
;
background-color
:
#ebedff
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment