Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
new-sing
admin-base
Commits
c681d0bc
Commit
c681d0bc
authored
Sep 10, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拆分出 录音播放组件、聊天记录组件
parent
30b4ef29
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
591 additions
and
5 deletions
+591
-5
webpack.base.conf.js
build/webpack.base.conf.js
+1
-0
ChatRecord.vue
src/components/framework/ChatRecord.vue
+524
-0
PhoneRecord.vue
src/components/framework/PhoneRecord.vue
+46
-0
hourDialog.vue
src/components/team/hourDialog.vue
+20
-5
No files found.
build/webpack.base.conf.js
View file @
c681d0bc
...
@@ -28,6 +28,7 @@ module.exports = {
...
@@ -28,6 +28,7 @@ module.exports = {
alias
:
{
alias
:
{
'vue$'
:
'vue/dist/vue.esm.js'
,
'vue$'
:
'vue/dist/vue.esm.js'
,
'@'
:
resolve
(
'src'
),
'@'
:
resolve
(
'src'
),
'@api'
:
resolve
(
'src/service/api'
),
'@util'
:
resolve
(
'src/util'
),
'@util'
:
resolve
(
'src/util'
),
'@service'
:
resolve
(
'src/service'
),
'@service'
:
resolve
(
'src/service'
),
'@framework'
:
resolve
(
'src/components/framework'
),
'@framework'
:
resolve
(
'src/components/framework'
),
...
...
src/components/framework/ChatRecord.vue
0 → 100644
View file @
c681d0bc
This diff is collapsed.
Click to expand it.
src/components/framework/PhoneRecord.vue
0 → 100644
View file @
c681d0bc
<
template
>
<div>
<el-button
@
click=
"dialogToggle"
size=
"mini"
type=
"primary"
plain
>
录音
</el-button>
<el-dialog
title=
"录音播放"
append-to-body
:visible
.
sync=
"dialog.show"
width=
"500px"
>
<audio
ref=
"recordAudio"
style=
"display: block; width: 100%;"
:src=
"src"
controls
preload=
"metadata"
></audio>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
"PhoneRecord"
,
props
:
{
src
:
{
type
:
String
,
required
:
true
}
},
data
()
{
return
{
dialog
:
{
show
:
false
}
}
},
watch
:
{
'dialog.show'
(
value
)
{
if
(
!
value
)
{
this
.
$refs
[
'recordAudio'
].
pause
()
}
}
},
methods
:
{
dialogToggle
()
{
this
.
dialog
.
show
=
!
this
.
dialog
.
show
;
}
}
}
</
script
>
<
style
>
</
style
>
src/components/team/hourDialog.vue
View file @
c681d0bc
...
@@ -72,8 +72,15 @@
...
@@ -72,8 +72,15 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
class=
"cell-link"
v-if=
"scope.row.chat_count > 0"
>
聊天记录
</span>
<!--
<el-button
size=
"small"
v-if=
"scope.row.chat_count > 0"
>
聊天记录
</el-button>
-->
<span
class=
"cell-link"
v-if=
"scope.row.phone_source_file"
>
录音
</span>
<chat-record
v-if=
"scope.row.chat_count > 0"
:friend-id=
"scope.row.friend_id"
:start-at=
"dialogObj.start_at"
></chat-record>
<phone-record
v-if=
"scope.row.phone_source_file"
:src=
"scope.row.phone_source_file"
></phone-record>
<!--
<span
class=
"cell-link"
v-if=
"scope.row.phone_source_file"
>
录音
</span>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -119,8 +126,14 @@
...
@@ -119,8 +126,14 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"dialog.search.type == '0'"
class=
"cell-link"
>
聊天记录
</span>
<chat-record
<span
v-if=
"dialog.search.type == '1'"
class=
"cell-link"
>
录音
</span>
v-if=
"dialog.search.type == '0'"
:friend-id=
"scope.row.friend_id"
:start-at=
"dialogObj.start_at"
></chat-record>
<phone-record
v-if=
"dialog.search.type == '1' && scope.row.source_file"
:src=
"scope.row.source_file"
></phone-record>
<!--
<span
v-if=
"dialog.search.type == '0'"
class=
"cell-link"
>
聊天记录
</span>
<span
v-if=
"dialog.search.type == '1'"
class=
"cell-link"
>
录音
</span>
-->
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -135,11 +148,13 @@
...
@@ -135,11 +148,13 @@
<
script
>
<
script
>
import
{
getHourSingleApi
,
getHourTimeApi
}
from
"@service/api"
;
import
{
getHourSingleApi
,
getHourTimeApi
}
from
"@service/api"
;
import
PhoneRecord
from
'@framework/PhoneRecord'
import
ChatRecord
from
'@framework/ChatRecord'
import
page
from
'@framework/page'
import
page
from
'@framework/page'
export
default
{
export
default
{
name
:
"HourDialog"
,
name
:
"HourDialog"
,
components
:
{
page
},
components
:
{
page
,
PhoneRecord
,
ChatRecord
},
props
:
{
props
:
{
dialogObj
:
{
dialogObj
:
{
type
:
Object
,
type
:
Object
,
...
...
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