Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
marketing-web
marketing
Commits
e800b87a
Commit
e800b87a
authored
Mar 30, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 话术管理
parent
943f0441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
9 deletions
+35
-9
manage.vue
src/views/ai/manage.vue
+35
-9
No files found.
src/views/ai/manage.vue
View file @
e800b87a
...
...
@@ -27,30 +27,30 @@
</svg>
<div
class=
"no-data-text"
>
还未创建话术,请联系运营经理创建话术
</div>
</div>
<el-dialog
:visible
.
sync=
"tempDetail.show"
@
closed=
"onClosed"
width=
"760px"
title=
"查看话术"
>
<el-dialog
:visible
.
sync=
"tempDetail.show"
@
closed=
"onClosed"
custom-class=
"temp-detail"
width=
"760px"
title=
"查看话术"
>
<div
v-if=
"!Array.isArray(tempDetail.tempData) || tempDetail.tempData.length == 0"
class=
"no-temp-data"
>
<svg
class=
"no-temp-icon"
aria-hidden=
"true"
>
<use
xlink:href=
"#icon-zanwuhuashu"
></use>
</svg>
暂无话术内容
</div>
<
template
v-else
>
<
div
class=
"temp-detail-list"
v-else
>
<div
class=
"temp-detail-item"
v-for=
"el in tempDetail.tempData"
:key=
"el.decisionId"
>
<div
class=
"temp-detail-content"
>
<div
class=
"temp-detail-title"
>
{{
el
.
decisionNodeType
|
formatNodeType
}}
</div>
<div
v-if=
"!Array.isArray(el.
list) || el.l
ist.length == 0"
class=
"no-temp-data"
>
暂无录音
</div>
<div
v-if=
"!Array.isArray(el.
decisionItemRecordDTOList) || el.decisionItemRecordDTOL
ist.length == 0"
class=
"no-temp-data"
>
暂无录音
</div>
<template
v-else
>
<div
v-for=
"item in el.
l
ist"
:key=
"item.id"
class=
"sound-record"
>
<div
v-for=
"item in el.
decisionItemRecordDTOL
ist"
:key=
"item.id"
class=
"sound-record"
>
<div
class=
"temp-detail-desc"
>
{{
item
.
knowledge
}}
</div>
<template
v-if=
"item.realKnowledgeOssUrl"
>
<el-button
type=
"text"
@
click=
"onPlay
"
>
播放
</el-button>
<audio
id=
"player"
:src=
"item.real
KnowledgeOssUrl"
></audio>
<el-button
type=
"text"
@
click=
"onPlay
(item, `player-$
{el.decisionId}-${item.id}`)" :loading="item.playing">
{{
item
.
playing
?
'播放中...'
:
'播放'
}}
</el-button>
<audio
:id=
"`player-$
{el.decisionId}-${item.id}`" :src="item.tts
KnowledgeOssUrl">
</audio>
</
template
>
</div>
</template>
</div>
</div>
</
template
>
</
div
>
</el-dialog>
</div>
</template>
...
...
@@ -136,8 +136,21 @@ export default {
this
.
tempDetail
.
aiTemplateId
=
''
;
this
.
tempDetail
.
tempData
=
[];
},
onPlay
()
{
document
.
getElementById
(
'player'
).
play
();
onPlay
(
data
,
playerId
)
{
const
handleError
=
()
=>
{
this
.
$message
.
error
(
'资源错误'
);
handleEnded
(
this
);
};
const
handleEnded
=
()
=>
{
this
.
$set
(
data
,
'playing'
,
false
);
player
.
removeEventListener
(
'error'
,
handleError
);
player
.
removeEventListener
(
'ended'
,
handleEnded
);
};
this
.
$set
(
data
,
'playing'
,
true
);
const
player
=
document
.
getElementById
(
playerId
);
player
.
addEventListener
(
'error'
,
handleError
);
player
.
addEventListener
(
'ended'
,
handleEnded
);
player
.
play
().
catch
(
handleError
);
}
}
};
...
...
@@ -284,3 +297,16 @@ export default {
}
}
</
style
>
<
style
lang=
"scss"
>
.temp-detail
{
.el-dialog__body
{
padding-right
:
0
;
padding-left
:
0
;
}
.temp-detail-list
{
padding
:
0
20px
;
max-height
:
50vh
;
overflow-y
:
auto
;
}
}
</
style
>
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