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 ef88607f
authored
Apr 24, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
AI对练联调
1 parent
80ba3133
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
179 additions
and
120 deletions
src/api/exercise.js
src/views/residentManage/el-input-range/index.vue
src/views/residentManage/exercise/components/dialogResult.vue
src/views/residentManage/exercise/components/pairDetail.vue
src/views/residentManage/exercise/components/qualityInspectionAnalyse.vue
src/views/residentManage/exercise/detail.vue
src/views/residentManage/exercise/index.vue
src/views/residentManage/exercise/view.vue
src/api/exercise.js
View file @
ef88607
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-19 11:02:02
* @Date: 2024-04-19 11:02:02
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-23 1
3:45:23
* @LastEditTime: 2024-04-23 1
6:16:52
*/
*/
import
request
from
"./request"
import
request
from
"./request"
const
path
=
'dj.api.smartcarlife.ai.sparring.'
const
path
=
'dj.api.smartcarlife.ai.sparring.'
...
@@ -50,3 +50,21 @@ export function getAllStore(data = {}) {
...
@@ -50,3 +50,21 @@ export function getAllStore(data = {}) {
data
.
method
=
`dj.smartcarlife.api.yqMerchant.list`
data
.
method
=
`dj.smartcarlife.api.yqMerchant.list`
return
request
(
data
)
return
request
(
data
)
}
}
// 获取质检结果
export
function
getQualityResult
(
data
)
{
data
.
method
=
`dj.api.carboutique.ai.sparring.detail.check.result`
return
request
(
data
)
}
// 查询对练详情
export
function
getSparringDetail
(
data
)
{
data
.
method
=
`
${
path
}
task.staff.detail.page`
return
request
(
data
)
}
// 更新任务提示词状态
export
function
updateTaskPromptStatus
(
data
)
{
data
.
method
=
`
${
path
}
task.updatePrompt`
return
request
(
data
)
}
src/views/residentManage/el-input-range/index.vue
View file @
ef88607
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
this
.
userInput
[
0
]
=
event
this
.
userInput
[
0
]
=
event
},
},
handleEndInput
(
event
)
{
handleEndInput
(
event
)
{
const
isNumber
=
/^
\d
+$/
.
test
(
event
)
const
isNumber
=
/^
\d
+$/
.
test
(
event
)
if
(
!
isNumber
)
{
if
(
!
isNumber
)
{
event
=
null
event
=
null
...
@@ -130,15 +130,14 @@ export default {
...
@@ -130,15 +130,14 @@ export default {
this
.
$emit
(
"focus"
,
this
)
this
.
$emit
(
"focus"
,
this
)
}
}
},
},
handleBlur
(
index
)
{
handleBlur
(
index
)
{
this
.
pickerVisible
=
false
this
.
pickerVisible
=
false
this
.
contrastValue
()
this
.
contrastValue
()
},
},
contrastValue
()
{
contrastValue
()
{
const
val
=
this
.
userInput
const
val
=
this
.
userInput
if
(
Array
.
isArray
(
val
))
{
if
(
Array
.
isArray
(
val
))
{
if
(
val
[
0
]
>
val
[
1
])
{
if
(
+
val
[
0
]
>
+
val
[
1
])
{
val
[
1
]
=
null
val
[
1
]
=
null
}
}
}
}
...
...
src/views/residentManage/exercise/components/dialogResult.vue
View file @
ef88607
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<el-tab-pane
label=
"质检分析"
name=
"analyse"
>
<el-tab-pane
label=
"质检分析"
name=
"analyse"
>
<quality-analyse
v-if=
"activeName == 'analyse'"
v-bind=
"$attrs"
ref=
"analyseList"
/>
<quality-analyse
v-if=
"activeName == 'analyse'"
v-bind=
"$attrs"
ref=
"analyseList"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"对
话
详情"
name=
"dialogue"
>
<el-tab-pane
label=
"对
练
详情"
name=
"dialogue"
>
<dialogue-detail
<dialogue-detail
v-if=
"activeName == 'dialogue'"
v-if=
"activeName == 'dialogue'"
ref=
"dialogueDetail"
ref=
"dialogueDetail"
...
...
src/views/residentManage/exercise/components/pairDetail.vue
View file @
ef88607
<
template
>
<
template
>
<div
class=
"dialogue"
>
<div
class=
"dialogue"
>
<div
class=
"record"
>
<
!--
<
div
class=
"record"
>
<audio
id=
"audio1"
>
<audio
id=
"audio1"
>
<source
:src=
"detailObj.fileUrl"
type=
"audio/mpeg"
/>
<source
:src=
"detailObj.fileUrl"
type=
"audio/mpeg"
/>
<source
:src=
"detailObj.fileUrl"
type=
"audio/ogg"
/>
<source
:src=
"detailObj.fileUrl"
type=
"audio/ogg"
/>
...
@@ -29,15 +29,15 @@
...
@@ -29,15 +29,15 @@
<img
src=
"@/assets/trumpet.png"
v-if=
"isMuted"
/>
<img
src=
"@/assets/trumpet.png"
v-if=
"isMuted"
/>
<img
src=
"@/assets/mute.png"
v-if=
"!isMuted"
/>
<img
src=
"@/assets/mute.png"
v-if=
"!isMuted"
/>
</div>
</div>
</div>
</div>
-->
<div
class=
"record-info"
>
<div
class=
"record-info"
>
<div
class=
"dialog"
>
<div
class=
"dialog"
>
<template
v-for=
"item in dialogList"
>
<template
v-for=
"item in dialogList"
>
<div
:class=
"
{ 'dialog-detail': true, 'nth-child': item.role
% 2 === 1
}" :key="item.id">
<div
:class=
"
{ 'dialog-detail': true, 'nth-child': item.role
== 'b'
}" :key="item.id">
<div
class=
"name"
>
<div
class=
"name"
>
<img
class=
"role"
src=
"@/assets/role-one.png"
v-if=
"
item.role % 2 === 0"
/>
<img
class=
"role"
src=
"@/assets/role-one.png"
v-if=
"
item.role == 'a'"
/>
{{
item
.
role
%
2
===
0
?
'车主'
:
'销售'
}}
{{
item
.
role
==
'b'
?
'客户'
:
'销售'
}}
<img
class=
"role"
src=
"@/assets/role-two.png"
v-if=
"
item.role % 2 === 1"
/>
<img
class=
"role"
src=
"@/assets/role-two.png"
v-if=
"
item.role == 'b'"
/>
</div>
</div>
<div
class=
"dig-content"
@
click=
"currentDialog(item)"
>
<div
class=
"dig-content"
@
click=
"currentDialog(item)"
>
{{
item
.
content
}}
{{
item
.
content
}}
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<img
class=
"robot"
src=
"@/assets/robot.png"
/>
<img
class=
"robot"
src=
"@/assets/robot.png"
/>
AI对话摘要
AI对话摘要
</div>
</div>
<div
class=
"abText"
v-html=
"formatSrt(d
etailObj.d
igest)"
>
<div
class=
"abText"
v-html=
"formatSrt(digest)"
>
</div>
</div>
</div>
</div>
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
conversationDetailPage
,
getPointCategory
}
from
"@api/resident
"
import
{
getSparringDetail
,
getQualityResult
}
from
"@api/exercise
"
export
default
{
export
default
{
name
:
'PairDetail'
,
name
:
'PairDetail'
,
props
:
{
props
:
{
...
@@ -72,22 +72,22 @@ export default {
...
@@ -72,22 +72,22 @@ export default {
return
{
return
{
myAud
:
""
,
myAud
:
""
,
isPlay
:
true
,
isPlay
:
true
,
isMuted
:
true
,
isMuted
:
true
,
dialogList
:
[],
dialogList
:
[],
totalTime
:
"0:00"
,
totalTime
:
"0:00"
,
currentTime
:
"0:00"
,
currentTime
:
"0:00"
,
isCircle
:
false
isCircle
:
false
,
digest
:
''
}
}
},
},
mounted
()
{
mounted
()
{
this
.
myAud
=
document
.
getElementById
(
"audio1"
)
// this.myAud = document.getElementById("audio1")
// this.handleprogress()
this
.
handleprogress
()
this
.
conversationDetailPage
()
this
.
conversationDetailPage
()
},
},
methods
:
{
methods
:
{
formatSrt
(
str
)
{
formatSrt
(
str
)
{
return
str
.
replace
(
/
\n
/g
,
"<br/>"
)
return
str
?
str
.
replace
(
/
\n
/g
,
"<br/>"
)
:
''
},
},
currentDialog
(
data
)
{
currentDialog
(
data
)
{
this
.
myAud
.
currentTime
=
data
.
mergedOffset
this
.
myAud
.
currentTime
=
data
.
mergedOffset
...
@@ -148,18 +148,23 @@ export default {
...
@@ -148,18 +148,23 @@ export default {
},
},
handleMute
()
{
handleMute
()
{
this
.
isMuted
=
!
this
.
isMuted
this
.
isMuted
=
!
this
.
isMuted
this
.
myAud
.
muted
=
!
this
.
isMuted
this
.
myAud
.
muted
=
!
this
.
isMuted
},
},
conversationDetailPage
()
{
conversationDetailPage
()
{
console
.
log
(
this
.
detailObj
)
console
.
log
(
this
.
detailObj
)
conversationDetailPage
({
getSparringDetail
({
batch
Id
:
this
.
detailObj
.
id
,
taskStaff
Id
:
this
.
detailObj
.
id
,
currentPage
:
1
,
currentPage
:
1
,
pageSize
:
9999
pageSize
:
9999
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
dialogList
=
res
.
list
this
.
dialogList
=
res
.
list
})
})
getQualityResult
({
taskStaffId
:
this
.
detailObj
.
id
}).
then
(
res
=>
{
this
.
digest
=
res
.
digest
})
}
}
}
}
}
}
...
@@ -168,6 +173,7 @@ export default {
...
@@ -168,6 +173,7 @@ export default {
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.dialogue
{
.dialogue
{
margin
:
auto
;
margin
:
auto
;
.record
{
.record
{
width
:
600px
;
width
:
600px
;
margin
:
5px
auto
0px
;
margin
:
5px
auto
0px
;
...
@@ -176,6 +182,7 @@ export default {
...
@@ -176,6 +182,7 @@ export default {
border-radius
:
32px
;
border-radius
:
32px
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
audio
{
audio
{
width
:
600px
;
width
:
600px
;
height
:
56px
;
height
:
56px
;
...
@@ -183,22 +190,27 @@ export default {
...
@@ -183,22 +190,27 @@ export default {
border-radius
:
32px
;
border-radius
:
32px
;
}
}
}
}
.play
{
.play
{
width
:
24px
;
width
:
24px
;
height
:
24px
;
height
:
24px
;
margin
:
0
20px
0
24px
;
margin
:
0
20px
0
24px
;
img
{
img
{
width
:
100%
;
width
:
100%
;
}
}
}
}
.trumpet
{
.trumpet
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
margin-left
:
24px
;
margin-left
:
24px
;
img
{
img
{
width
:
100%
;
width
:
100%
;
}
}
}
}
.times
{
.times
{
font-size
:
14px
;
font-size
:
14px
;
color
:
#666666
;
color
:
#666666
;
...
@@ -206,22 +218,28 @@ export default {
...
@@ -206,22 +218,28 @@ export default {
text-align
:
center
;
text-align
:
center
;
margin-right
:
19px
;
margin-right
:
19px
;
}
}
#progressBar
{
#progressBar
{
//
position
:
absolute
;
//
position
:
absolute
;
height
:
6px
;
height
:
6px
;
width
:
370px
;
width
:
370px
;
background-color
:
#e7e7e7
;
/* 进度条背景颜色 */
background-color
:
#e7e7e7
;
/* 进度条背景颜色 */
border-radius
:
6px
;
border-radius
:
6px
;
}
}
#progress
{
#progress
{
width
:
0
;
/* 初始进度为0 */
width
:
0
;
/* 初始进度为0 */
height
:
6px
;
height
:
6px
;
background-image
:
linear-gradient
(
90deg
,
#9662ff
0%
,
#5850ff
100%
);
/* 进度条颜色 */
background-image
:
linear-gradient
(
90deg
,
#9662ff
0%
,
#5850ff
100%
);
transition
:
width
0.5s
;
/* 进度条宽度变化动画 */
/* 进度条颜色 */
transition
:
width
0.5s
;
/* 进度条宽度变化动画 */
border-radius
:
6px
;
border-radius
:
6px
;
position
:
relative
;
position
:
relative
;
}
}
.circle
{
.circle
{
width
:
16px
;
width
:
16px
;
height
:
16px
;
height
:
16px
;
...
@@ -233,6 +251,7 @@ export default {
...
@@ -233,6 +251,7 @@ export default {
top
:
-4px
;
top
:
-4px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.record-info
{
.record-info
{
width
:
100%
;
width
:
100%
;
float
:
left
;
float
:
left
;
...
@@ -241,6 +260,7 @@ export default {
...
@@ -241,6 +260,7 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
height
:
544px
;
height
:
544px
;
margin
:
20px
0
;
margin
:
20px
0
;
//
display
:
flex
;
//
display
:
flex
;
//
align-items
:
center
;
//
align-items
:
center
;
.dialog
{
.dialog
{
...
@@ -252,14 +272,17 @@ export default {
...
@@ -252,14 +272,17 @@ export default {
overflow-y
:
scroll
;
overflow-y
:
scroll
;
padding
:
20px
;
padding
:
20px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.dialog-detail
{
.dialog-detail
{
margin-bottom
:
8px
;
margin-bottom
:
8px
;
text-align
:
left
;
text-align
:
left
;
.name
{
.name
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#666666
;
color
:
#666666
;
letter-spacing
:
0
;
letter-spacing
:
0
;
line-height
:
16px
;
line-height
:
16px
;
.role
{
.role
{
width
:
40px
;
width
:
40px
;
height
:
40px
;
height
:
40px
;
...
@@ -267,6 +290,7 @@ export default {
...
@@ -267,6 +290,7 @@ export default {
margin-right
:
10px
;
margin-right
:
10px
;
}
}
}
}
.dig-content
{
.dig-content
{
width
:
404px
;
width
:
404px
;
background
:
#EBEBFF
;
background
:
#EBEBFF
;
...
@@ -281,8 +305,10 @@ export default {
...
@@ -281,8 +305,10 @@ export default {
line-height
:
20px
;
line-height
:
20px
;
}
}
}
}
.nth-child
{
.nth-child
{
text-align
:
right
;
text-align
:
right
;
.dig-content
{
.dig-content
{
display
:
inline-block
;
display
:
inline-block
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
...
@@ -290,6 +316,7 @@ export default {
...
@@ -290,6 +316,7 @@ export default {
}
}
}
}
}
}
.abstract
{
.abstract
{
width
:
334px
;
width
:
334px
;
height
:
544px
;
height
:
544px
;
...
@@ -301,10 +328,12 @@ export default {
...
@@ -301,10 +328,12 @@ export default {
border
:
1px
solid
#5850ff80
;
border
:
1px
solid
#5850ff80
;
border-radius
:
4px
;
border-radius
:
4px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.title
{
.title
{
font-weight
:
700
;
font-weight
:
700
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#333333
;
color
:
#333333
;
.robot
{
.robot
{
width
:
28px
;
width
:
28px
;
height
:
28px
;
height
:
28px
;
...
@@ -313,6 +342,7 @@ export default {
...
@@ -313,6 +342,7 @@ export default {
vertical-align
:
middle
;
vertical-align
:
middle
;
}
}
}
}
.abText
{
.abText
{
margin-top
:
14px
;
margin-top
:
14px
;
width
:
294px
;
width
:
294px
;
...
...
src/views/residentManage/exercise/components/qualityInspectionAnalyse.vue
View file @
ef88607
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
:search-form=
"searchFormSearch"
:search-form=
"searchFormSearch"
:table-params=
"tableParams"
:table-params=
"tableParams"
:before-search-fn=
"beforeSearchFn"
:before-search-fn=
"beforeSearchFn"
:has
P
age=
"false"
>
:has
-p
age=
"false"
>
<div
slot=
"scoreHtml"
slot-scope=
"scope"
>
<div
slot=
"scoreHtml"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.score || scope.scope.score === 0"
>
<
template
v-if=
"scope.scope.score || scope.scope.score === 0"
>
{{
scope
.
scope
.
score
}}
{{
scope
.
scope
.
score
}}
...
@@ -88,7 +88,8 @@
...
@@ -88,7 +88,8 @@
<
script
>
<
script
>
import
ElInputRange
from
"../../el-input-range"
import
ElInputRange
from
"../../el-input-range"
import
{
Util
,
deepClone
}
from
"@/common/util"
import
{
Util
,
deepClone
}
from
"@/common/util"
import
{
conversationCheckList
,
getPointCategory
}
from
"@api/resident"
// import { conversationCheckList, getPointCategory } from "@api/resident"
import
{
getQualityResult
}
from
"@api/exercise"
export
default
{
export
default
{
name
:
'QualityInspectionAnalyse'
,
name
:
'QualityInspectionAnalyse'
,
components
:
{
components
:
{
...
@@ -114,23 +115,9 @@ export default {
...
@@ -114,23 +115,9 @@ export default {
{
{
text
:
'预计营销结果'
,
text
:
'预计营销结果'
,
formatter
:
data
=>
{
formatter
:
data
=>
{
le
t
classStr
=
data
.
estimatedResult
==
'成交'
?
(
data
.
estimatedResult
==
'战败'
?
'redStr'
:
'greenStr'
)
:
'grayStr'
cons
t
classStr
=
data
.
estimatedResult
==
'成交'
?
(
data
.
estimatedResult
==
'战败'
?
'redStr'
:
'greenStr'
)
:
'grayStr'
return
`<span class="
${
classStr
}
" style="font-weight:700;font-size:20px;">
${
data
.
estimatedResult
?
data
.
estimatedResult
:
'--'
}
</span>`
return
`<span class="
${
classStr
}
" style="font-weight:700;font-size:20px;">
${
data
.
estimatedResult
?
data
.
estimatedResult
:
'--'
}
</span>`
}
}
},
{
text
:
"开始录音时间"
,
formatter
:
(
data
)
=>
{
return
`<span style="font-weight:700;font-size:20px;">
${
data
.
startTime
?
data
.
startTime
:
"--"
}
</span>`
}
},
{
text
:
'对话时长'
,
formatter
:
data
=>
{
return
`<span style="font-weight:700;font-size:20px;">
${
this
.
toMinutesAndSeconds
(
data
.
duration
)}
</span>`
},
}
}
],
],
searchForm
:
{
searchForm
:
{
...
@@ -158,10 +145,10 @@ export default {
...
@@ -158,10 +145,10 @@ export default {
}
}
],
],
select
:
"全部"
,
select
:
"全部"
,
getListApi
:
conversationCheckLis
t
,
getListApi
:
getQualityResul
t
,
tableParams
:
{
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"
l
ist"
,
listName
:
"
checkDetailL
ist"
,
tableOption
:
false
,
tableOption
:
false
,
tableColumns
:
[
tableColumns
:
[
{
{
...
@@ -193,8 +180,8 @@ export default {
...
@@ -193,8 +180,8 @@ export default {
{
{
label
:
"话术建议"
,
label
:
"话术建议"
,
prop
:
"suggestions"
,
prop
:
"suggestions"
,
addHtml
:
'suggestions'
,
addHtml
:
'suggestions'
,
align
:
'left'
align
:
'left'
}
}
]
]
},
},
...
@@ -221,15 +208,15 @@ export default {
...
@@ -221,15 +208,15 @@ export default {
let
formattedTime
=
''
let
formattedTime
=
''
if
(
seconds
<
60
)
return
seconds
+
'秒'
if
(
seconds
<
60
)
return
seconds
+
'秒'
else
if
(
seconds
>
3600
)
{
else
if
(
seconds
>
3600
)
{
let
hours
=
Math
.
floor
(
seconds
/
3600
),
const
hours
=
Math
.
floor
(
seconds
/
3600
)
minutes
=
Math
.
floor
((
seconds
%
3600
)
/
60
)
const
minutes
=
Math
.
floor
((
seconds
%
3600
)
/
60
)
if
(
hours
>
0
)
formattedTime
+=
hours
+
'小时'
if
(
hours
>
0
)
formattedTime
+=
hours
+
'小时'
if
(
minutes
>
0
||
hours
>
0
)
formattedTime
+=
minutes
+
'分'
if
(
minutes
>
0
||
hours
>
0
)
formattedTime
+=
minutes
+
'分'
return
formattedTime
return
formattedTime
}
else
{
}
else
{
let
hours
=
Math
.
floor
(
seconds
/
3600
),
const
hours
=
Math
.
floor
(
seconds
/
3600
)
minutes
=
Math
.
floor
((
seconds
%
3600
)
/
60
),
const
minutes
=
Math
.
floor
((
seconds
%
3600
)
/
60
)
remainingSeconds
=
seconds
%
60
const
remainingSeconds
=
seconds
%
60
if
(
hours
>
0
)
formattedTime
+=
hours
+
'小时'
if
(
hours
>
0
)
formattedTime
+=
hours
+
'小时'
if
(
minutes
>
0
||
hours
>
0
)
formattedTime
+=
minutes
+
'分'
if
(
minutes
>
0
||
hours
>
0
)
formattedTime
+=
minutes
+
'分'
if
(
remainingSeconds
>
0
)
formattedTime
+=
remainingSeconds
+
'秒'
if
(
remainingSeconds
>
0
)
formattedTime
+=
remainingSeconds
+
'秒'
...
@@ -263,9 +250,10 @@ export default {
...
@@ -263,9 +250,10 @@ export default {
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
this
.
searchFormSearch
.
batch
Id
=
this
.
detailObj
.
id
this
.
searchFormSearch
.
taskStaff
Id
=
this
.
detailObj
.
id
this
.
searchFormSearch
.
pageSize
=
99999
//
this.searchFormSearch.pageSize = 99999
if
(
this
.
searchFormSearch
.
qualityTestScore
)
{
if
(
this
.
searchFormSearch
.
qualityTestScore
)
{
console
.
log
(
this
.
searchForm
,
'==='
)
this
.
searchFormSearch
.
qualityTestScoreBegin
=
this
.
searchFormSearch
.
qualityTestScoreBegin
=
this
.
searchFormSearch
.
qualityTestScore
[
0
]
this
.
searchFormSearch
.
qualityTestScore
[
0
]
this
.
searchFormSearch
.
qualityTestScoreEnd
=
this
.
searchFormSearch
.
qualityTestScoreEnd
=
...
...
src/views/residentManage/exercise/detail.vue
View file @
ef88607
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-16 17:54:27
* @Date: 2024-04-16 17:54:27
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-2
3 14:23:11
* @LastEditTime: 2024-04-2
4 15:02:34
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -76,17 +76,20 @@ export default {
...
@@ -76,17 +76,20 @@ export default {
{
{
label
:
"手机号"
,
label
:
"手机号"
,
name
:
"staffPhone"
,
name
:
"staffPhone"
,
type
:
"input"
type
:
"input"
,
isclear
:
true
},
},
{
{
label
:
"驻店名称"
,
label
:
"驻店名称"
,
name
:
"yqMerchantName"
,
name
:
"yqMerchantName"
,
type
:
"input"
type
:
"input"
,
isclear
:
true
},
},
{
{
label
:
"完成时间"
,
label
:
"完成时间"
,
name
:
"completionTime"
,
name
:
"completionTime"
,
type
:
"datePicker"
type
:
"datePicker"
,
isclear
:
true
}
}
],
],
// table 相关
// table 相关
...
@@ -143,6 +146,7 @@ export default {
...
@@ -143,6 +146,7 @@ export default {
this
.
searchFormSearch
=
{}
this
.
searchFormSearch
=
{}
this
.
$refs
.
exerciseDetailTable
.
refreshTable
(
true
,
true
)
this
.
$refs
.
exerciseDetailTable
.
refreshTable
(
true
,
true
)
},
},
// 查询和导出的参数
getParams
()
{
getParams
()
{
var
params
=
deepClone
(
this
.
searchForm
)
var
params
=
deepClone
(
this
.
searchForm
)
const
{
activeName
}
=
this
const
{
activeName
}
=
this
...
@@ -152,7 +156,7 @@ export default {
...
@@ -152,7 +156,7 @@ export default {
params
.
endTime
=
Util
.
dateFormate
(
params
.
completionTime
[
1
],
'YYYY-MM-DD HH:mm:ss'
)
params
.
endTime
=
Util
.
dateFormate
(
params
.
completionTime
[
1
],
'YYYY-MM-DD HH:mm:ss'
)
delete
params
.
completionTime
delete
params
.
completionTime
}
}
params
.
sparringStatus
=
activeName
!=
'all'
?
v
:
''
params
.
sparringStatus
=
activeName
!=
'all'
?
activeName
:
''
return
params
return
params
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
...
@@ -167,10 +171,15 @@ export default {
...
@@ -167,10 +171,15 @@ export default {
this
.
activeName
=
tab
.
name
this
.
activeName
=
tab
.
name
this
.
handleSearch
()
this
.
handleSearch
()
},
},
// 查看结果和提醒
btnClick
(
scope
)
{
btnClick
(
scope
)
{
console
.
log
(
scope
,
'2222222'
)
console
.
log
(
scope
,
'2222222'
)
const
_row
=
scope
.
scope
const
_row
=
scope
.
scope
if
(
!
_row
.
sparringStatus
)
{
if
(
_row
.
sparringStatus
==
'1'
)
{
// 查看结果
this
.
detailObj
=
_row
this
.
isQualityVisible
=
true
}
else
{
this
.
$confirm
(
'是否确认发送提醒给驻店员工?'
,
'发送提醒'
,
{
this
.
$confirm
(
'是否确认发送提醒给驻店员工?'
,
'发送提醒'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
type
:
'warning'
type
:
'warning'
...
@@ -184,9 +193,6 @@ export default {
...
@@ -184,9 +193,6 @@ export default {
this
.
$message
.
success
(
'提醒成功'
)
this
.
$message
.
success
(
'提醒成功'
)
})
})
})
})
}
else
{
this
.
detailObj
=
_row
this
.
isQualityVisible
=
true
}
}
},
},
closeDialog
()
{
closeDialog
()
{
...
...
src/views/residentManage/exercise/index.vue
View file @
ef88607
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-15 16:26:57
* @Date: 2024-04-15 16:26:57
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-2
2 15:42:40
* @LastEditTime: 2024-04-2
4 14:43:49
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<
script
>
<
script
>
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
Util
,
deepClone
}
from
'@/common/util'
import
{
getList
}
from
'@api/exercise'
import
{
getList
,
updateTaskPromptStatus
}
from
'@api/exercise'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -67,39 +67,39 @@ export default {
...
@@ -67,39 +67,39 @@ export default {
name
:
'taskName'
,
name
:
'taskName'
,
type
:
'input'
type
:
'input'
},
},
{
//
{
label
:
'状态'
,
//
label: '状态',
name
:
'taskState'
,
//
name: 'taskState',
type
:
'select'
,
//
type: 'select',
optionList
:
[
//
optionList: [
{
//
{
label
:
'全部'
,
//
label: '全部',
value
:
''
//
value: ''
},
//
},
{
//
{
label
:
'进行中'
,
//
label: '进行中',
value
:
'1'
//
value: '1'
},
//
},
{
//
{
label
:
'已结束'
,
//
label: '已结束',
value
:
'2'
//
value: '2'
},
//
},
{
//
{
label
:
'未开始'
,
//
label: '未开始',
value
:
'0'
//
value: '0'
}
//
}
],
//
],
optionId
:
"value"
,
//
optionId: "value",
optionLabel
:
"label"
,
//
optionLabel: "label",
isClear
:
true
//
isClear: true
},
//
},
{
{
label
:
'业务场景'
,
label
:
'业务场景'
,
name
:
'businessScenario'
,
name
:
'businessScenario'
,
type
:
'select'
,
type
:
'select'
,
isClear
:
true
,
isClear
:
true
,
optionList
:
[{
optionList
:
[{
label
:
'
请选择
'
,
label
:
'
全部
'
,
name
:
''
name
:
''
},
{
},
{
label
:
'会员权益/升级'
,
label
:
'会员权益/升级'
,
...
@@ -119,8 +119,8 @@ export default {
...
@@ -119,8 +119,8 @@ export default {
label
:
'任务时间'
,
label
:
'任务时间'
,
name
:
'taskTime'
,
name
:
'taskTime'
,
type
:
'datePicker'
,
type
:
'datePicker'
,
isClear
:
true
,
isClear
:
true
pickerOptions
:
'rangePickerOptions'
//
pickerOptions: 'rangePickerOptions'
}
}
],
],
statusTypeList
:
[
statusTypeList
:
[
...
@@ -175,7 +175,7 @@ export default {
...
@@ -175,7 +175,7 @@ export default {
label
:
'任务时间'
,
label
:
'任务时间'
,
prop
:
'startTime'
,
prop
:
'startTime'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
Util
.
dateFormate
(
cellValue
.
startTime
,
'YYYY-MM-DD'
)
+
'-'
+
Util
.
dateFormate
(
cellValue
.
updatedDat
e
,
'YYYY-MM-DD'
)
return
Util
.
dateFormate
(
cellValue
.
startTime
,
'YYYY-MM-DD'
)
+
'-'
+
Util
.
dateFormate
(
cellValue
.
endTim
e
,
'YYYY-MM-DD'
)
}
}
}]
}]
}
}
...
@@ -233,21 +233,26 @@ export default {
...
@@ -233,21 +233,26 @@ export default {
// 状态改变
// 状态改变
handleSwitch
(
scope
,
e
)
{
handleSwitch
(
scope
,
e
)
{
console
.
log
(
scope
)
console
.
log
(
scope
)
scope
.
scope
.
enabledFlag
const
{
promptOnOff
,
id
}
=
scope
.
scope
?
this
.
$confirm
(
'是否确认开启提示词?'
,
'提示'
,
{
this
.
$confirm
(
`是否确认
${
promptOnOff
?
'关闭'
:
'开启'
}
提示词?`
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
console
.
log
(
'dia开启'
)
console
.
log
(
'dia开启'
)
scope
.
scope
.
enabledFlag
=
!
scope
.
scope
.
enabledFlag
updateTaskPromptStatus
({
// this.$refs.employeeRef.refreshTable(false)
id
,
promptOnOff
:
!
promptOnOff
}).
then
(
res
=>
{
if
(
res
&&
res
.
id
)
{
this
.
$message
.
success
(
'修改成功'
)
}
else
{
this
.
$message
.
error
(
'修改失败'
)
}
this
.
$refs
.
exerciseTable
.
refreshTable
(
true
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
this
.
$message
.
error
(
'修改失败'
)
})
})
:
this
.
$confirm
(
'是否确认关闭提示词?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
type
:
'warning'
}).
then
(()
=>
{
console
.
log
(
'dia关闭'
)
scope
.
enabledFlag
=
!
scope
.
enabledFlag
})
})
},
},
// 明细
// 明细
...
...
src/views/residentManage/exercise/view.vue
View file @
ef88607
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2024-04-17 17:50:41
* @Date: 2024-04-17 17:50:41
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-04-2
3 09:56:5
3
* @LastEditTime: 2024-04-2
4 11:42:0
3
-->
-->
<
template
>
<
template
>
<div>
<div>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<span>
{{
taskType
[
taskInfo
.
taskType
]
}}
</span>
<span>
{{
taskType
[
taskInfo
.
taskType
]
}}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户分类:"
>
<el-form-item
label=
"客户分类:"
>
<span>
3个月
</span>
<span>
{{
aiType
[
taskInfo
.
aiType
]
}}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"提示词:"
>
<el-form-item
label=
"提示词:"
>
<span>
{{
taskInfo
.
promptOnOff
==
1
?
'开'
:
'关'
}}
</span>
<span>
{{
taskInfo
.
promptOnOff
==
1
?
'开'
:
'关'
}}
</span>
...
@@ -52,24 +52,16 @@
...
@@ -52,24 +52,16 @@
:get-list-api="getListApi">
:get-list-api="getListApi">
</d2-table>
</d2-table>
</div>
</div>
<!--
<el-table
style=
"width: 728px"
:data=
"tableData"
border
stripe
:row-style=
"
{height: '50px'}" :header-cell-style="{background:'#F4F6FC'}">
<el-table-column
label=
"序号"
type=
"index"
width=
"50"
>
</el-table-column>
<el-table-column
label=
"门店名称"
prop=
"staffName"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"驻店员工名称"
prop=
"phoneNumber"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"手机号"
prop=
"registerTime"
align=
"center"
>
</el-table-column>
</el-table>
-->
</el-form-item>
</el-form-item>
</div>
</div><el-form-item
style=
"margin-top: 40px;text-align: center;"
>
<el-button
class=
"width_100 cancel-btn"
type=
"primary"
plain
@
click=
"handleClose"
>
返回
</el-button>
</el-form-item>
</el-form>
</el-form>
</d2-container>
</d2-container>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
mapActions
}
from
'vuex'
import
{
getTaskStaffList
}
from
"@api/exercise"
import
{
getTaskStaffList
}
from
"@api/exercise"
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -103,6 +95,17 @@ export default {
...
@@ -103,6 +95,17 @@ export default {
taskInfo
:
{},
taskInfo
:
{},
taskType
:
{
taskType
:
{
1
:
'实战演练'
1
:
'实战演练'
},
aiType
:
{
1
:
'独裁型'
,
2
:
'沉默型'
,
3
:
'理智型'
,
4
:
'人际型'
,
5
:
'犹豫型'
,
6
:
'新手司机'
,
7
:
'老手司机'
,
8
:
'女司机'
,
9
:
'价格型'
}
}
}
}
},
},
...
@@ -110,6 +113,16 @@ export default {
...
@@ -110,6 +113,16 @@ export default {
this
.
taskInfo
=
this
.
$route
.
query
.
row
this
.
taskInfo
=
this
.
$route
.
query
.
row
console
.
log
(
this
.
taskInfo
)
console
.
log
(
this
.
taskInfo
)
this
.
searchForm
.
taskId
=
this
.
taskInfo
.
id
this
.
searchForm
.
taskId
=
this
.
taskInfo
.
id
},
methods
:
{
...
mapActions
({
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
}),
handleClose
()
{
this
.
close
({
tagName
:
'/exerciseView'
})
this
.
$router
.
push
({
name
:
'exercise'
})
}
}
}
}
}
</
script
>
</
script
>
...
...
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