Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2f52dab9
authored
Jul 19, 2024
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
52426686
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
144 additions
and
115 deletions
packageEquity/pages/aiCheck/detail/components/quality/index.js
packageEquity/pages/aiCheck/detail/components/quality/index.sass
packageEquity/pages/aiCheck/detail/components/quality/index.wxml
packageEquity/pages/aiCheck/detail/components/skilled/skilled.js
packageEquity/pages/aiCheck/detail/components/skilled/skilled.wxml
packageEquity/pages/aiCheck/result/result.js
packageEquity/pages/aiCheck/detail/components/quality/index.js
View file @
2f52dab
// packageEquity/pages/receptionDetail/components/quality/index.js
import
api
from
"../../../../../carEquityApi"
;
const
IMG_URL
=
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
batchId
:
Number
list
:
{
type
:
Object
,
observer
:
function
(
n
)
{
this
.
setAudio
(
0
)
this
.
setData
({
isShow
:
true
})
}
}
},
lifetimes
:
{
ready
()
{
this
.
getReceptionResult
()
}
},
/**
* 组件的初始数据
...
...
@@ -21,23 +26,36 @@ Component({
IMG_URL
,
isShow
:
false
,
activeIndex
:
0
,
list
:
[{
stage
:
'接待环节'
},
{
stage
:
'车辆交付'
},
{
stage
:
'需求挖掘'
},
{
stage
:
'促成交'
}
]
qualityAudio
:
''
},
/**
* 组件的方法列表
*/
methods
:
{
setAudio
()
{
this
.
qualityAudio
=
wx
.
createInnerAudioContext
({
useWebAudioImplement
:
true
})
this
.
qualityAudio
.
onPause
(()
=>
{
this
.
setData
({
status
:
'pause'
})
})
//监听音频的播放事件
this
.
qualityAudio
.
onPlay
(()
=>
{
this
.
setData
({
status
:
'start'
})
})
// this.qualityAudio.onTimeUpdate(this.onTimeUpdate)
this
.
qualityAudio
.
onEnded
(()
=>
{
this
.
setData
({
status
:
'ending'
,
})
})
},
handleShow
(
e
)
{
let
{
findex
,
...
...
@@ -48,12 +66,10 @@ Component({
list
}
=
this
.
data
;
list
[
activeIndex
].
conversation
CheckDetailDTOList
[
findex
].
conversationDetailDTOList
[
sindex
].
isdown
=
!
list
[
activeIndex
].
conversationCheckDetailDTOList
[
findex
].
conversationDetailDTO
List
[
sindex
].
isdown
list
[
activeIndex
].
conversation
DetailList
[
findex
].
detailList
[
sindex
].
isdown
=
!
list
[
activeIndex
].
conversationDetailList
[
findex
].
detail
List
[
sindex
].
isdown
this
.
setData
({
list
})
},
changeClassifyType
(
e
)
{
let
{
...
...
@@ -64,92 +80,22 @@ Component({
scrollTop
:
0
})
},
getReceptionResult
()
{
let
{
list
,
batchId
}
=
this
.
data
;
let
params
=
{
batchId
}
api
.
getReceptionResultData
(
params
).
then
(
res
=>
{
res
.
data
.
forEach
(
first
=>
{
first
.
conversationCheckDetailDTOList
.
forEach
(
second
=>
{
second
.
firstClassify
=
second
.
firstClassify
.
slice
(
0
,
4
)
second
.
conversationDetailDTOList
&&
second
.
conversationDetailDTOList
.
forEach
(
third
=>
{
third
.
time
=
this
.
formatTime
(
third
.
mergedOffset
)
if
(
third
.
id
===
second
.
inspectionConversationDetailId
)
{
third
.
hit
=
true
third
.
isdown
=
false
}
})
})
})
list
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
row
=>
{
if
(
row
.
stage
.
indexOf
(
item
.
stage
)
!=
-
1
)
{
Object
.
assign
(
item
,
row
,
{
stage
:
item
.
stage
})
}
else
if
(
row
.
stage
===
'结束环节'
&&
item
.
stage
===
'促成交'
)
{
Object
.
assign
(
item
,
row
,
{
stage
:
'促成交'
})
}
})
})
this
.
setData
({
list
:
list
,
isShow
:
true
})
console
.
log
(
list
)
})
play
()
{
console
.
log
(
this
.
qualityAudio
)
const
{
paused
}
=
this
.
qualityAudio
if
(
paused
)
this
.
qualityAudio
.
play
()
},
lookMore
(
e
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
();
let
{
findex
}
=
e
.
currentTarget
.
dataset
;
let
{
activeIndex
,
list
}
=
this
.
data
;
let
item
=
list
[
activeIndex
].
conversationCheckDetailDTOList
[
findex
].
conversationDetailDTOList
[
0
];
item
.
text_id
=
`text_
${
item
.
id
}
`
thisPage
.
onPause
()
thisPage
.
setData
({
activeIndex
:
0
},
()
=>
{
thisPage
.
dialogueRef
().
setTopId
(
item
,
true
)
})
onPause
()
{
this
.
qualityAudio
.
pause
()
},
seek
(
e
)
{
let
{
findex
url
}
=
e
.
currentTarget
.
dataset
;
let
{
activeIndex
,
list
}
=
this
.
data
;
let
time
=
list
[
activeIndex
].
conversationCheckDetailDTOList
[
findex
].
conversationDetailDTOList
[
0
].
mergedOffset
;
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
seek
(
time
)
thisPage
.
play
()
},
formatTime
(
num
)
{
let
minutes
=
Math
.
floor
(
num
/
60
)
||
'0'
,
seconds
=
num
%
60
||
'0'
seconds
=
seconds
<
10
?
`0
${
seconds
}
`
:
seconds
return
`
${
minutes
}
:
${
seconds
}
`
},
practiceHandle
()
{
this
.
qualityAudio
.
src
=
url
this
.
play
()
}
}
})
\ No newline at end of file
packageEquity/pages/aiCheck/detail/components/quality/index.sass
View file @
2f52dab
...
...
@@ -151,13 +151,19 @@ color:#F24724;
position
:relative
;
background
:
#F0F6FF
;
margin-bottom
:
0
!
important
;
.trumpet
{
width
:var
(
--fontSize48
);
.trumpet
-box
{
width
:var
(
--fontSize48
);
height
:
var
(
--
fontSize40
)
;
background
:
#fff
;
border-radius
:
50%
;
position
:absolute
;
right
:var
(
--fontSize12
);
margin
:
0
auto
;
}
.trumpet
{
width
:var
(
--fontSize48
);
height
:
var
(
--
fontSize40
)
;
}
}
...
...
packageEquity/pages/aiCheck/detail/components/quality/index.wxml
View file @
2f52dab
...
...
@@ -9,21 +9,24 @@
</view>
</view>
<scroll-view scroll-y class="quality-reception-wrap" scroll-top="{{scrollTop}}">
<block wx-if="{{list[activeIndex].conversation
CheckDetailDTO
List.length}}">
<view class="link-list" wx:for="{{list[activeIndex].conversation
CheckDetailDTO
List}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<block wx-if="{{list[activeIndex].conversation
Detail
List.length}}">
<view class="link-list" wx:for="{{list[activeIndex].conversation
Detail
List}}" wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<view class="link-title">
<view class="dot"></view>{{i.firstClassify}}-{{i.secondClassify}} <view class="score"><text class="{{(i.score/i.rawScore)<0.5?'failStage':''}}">{{i.score}}</text>/{{i.rawScore}}</view>
<view class="{{i.
conversationDetailDTOList?'success':'fail'}}">{{i.conversationDetailDTO
List?'意图匹配':'意图不匹配'}}</view>
<view class="{{i.
detailList?'success':'fail'}}">{{i.detail
List?'意图匹配':'意图不匹配'}}</view>
</view>
<view class="quality-content">
<blcok wx:for="{{i.
conversationDetailDTO
List}}" wx:for-item="c" wx:for-index='cind' wx:key='cind'>
<blcok wx:for="{{i.
detail
List}}" wx:for-item="c" wx:for-index='cind' wx:key='cind'>
<view class="content {{c.hit?'hit':''}}">
<view class="left">
<gl-image class="avatar" webp src="/equity/reception/role-{{c.role}}.png" />
<view class="duration">{{c.time}}</view>
</view>
<view class="text">{{c.content}}</view>
<gl-image class="trumpet" webp src="/equity/trumpet.png" data-fIndex="{{ind}}" bind:tap="seek" />
<view class="trumpet-box">
<gl-image class="trumpet" webp src="/equity/trumpet.png" data-url="{{c.voiceUrl}}" bind:tap="seek" />
</view>
</view>
<view class="hit-content" wx:if="{{c.hit}}">
<view class="matching" bind:tap="handleShow" data-fIndex="{{ind}}" data-sIndex="{{cind}}">
...
...
@@ -50,7 +53,7 @@
</view>
</blcok>
<view class="no-hit-content" wx:if="{{!i.
conversationDetailDTO
List}}">
<view class="no-hit-content" wx:if="{{!i.
detail
List}}">
<view class="verbal-warp" wx:if="{{i.suggestions}}">
<view class="title">
<gl-image class="improve" webp src="/improve.png" />话术建议
...
...
@@ -65,7 +68,7 @@
<gl-image class="improve" webp src="/improve.png" />快速练习
</view> -->
</view>
<!-- <view class="more" wx:if="{{i.
conversationDetailDTO
List}}" bind:tap="lookMore" data-fIndex="{{ind}}">查看更多</view> -->
<!-- <view class="more" wx:if="{{i.
detail
List}}" bind:tap="lookMore" data-fIndex="{{ind}}">查看更多</view> -->
</view>
</view>
</block>
...
...
packageEquity/pages/aiCheck/detail/components/skilled/skilled.js
View file @
2f52dab
// packageEquity/pages/aiCheck/result/components/skilled/skilled.js
import
{
skilledEmoji
}
from
'../../../contant'
import
{
skilledEmoji
}
from
'../../../contant'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
detailInfo
:
{
type
:
Object
,
observer
:
function
(
n
)
{
this
.
initData
(
n
)
}
},
},
/**
...
...
@@ -14,14 +21,81 @@ Component({
*/
data
:
{
emojiList
:
skilledEmoji
,
level
:
3
,
star
:
3
,
level
:
3
,
star
:
3
,
sort
:
[
'接待环节'
,
'车辆交付'
,
'需求挖掘'
,
'促成交'
],
list
:
[]
},
/**
* 组件的方法列表
*/
methods
:
{
initData
(
n
)
{
let
data
=
n
.
inspectionConversationCheck
data
.
aiSparringCheckDetailDTOList
.
forEach
(
item
=>
{
item
.
stage
=
item
.
stage
.
slice
(
0
,
4
)
if
(
item
.
stage
==
'结束环节'
)
{
item
.
stage
=
'促成交'
}
item
.
conversationDetailList
=
[]
data
.
conversationDetailList
.
forEach
(
con
=>
{
if
(
con
.
detailList
&&
con
.
detailList
.
length
)
{
con
.
detailList
.
forEach
(
detail
=>
{
detail
.
time
=
this
.
formatTime
(
detail
.
mergedOffset
)
if
(
detail
.
id
==
con
.
detail
.
id
)
{
detail
.
hit
=
true
detail
.
isdown
=
false
}
})
}
con
.
firstClassify
=
con
.
firstClassify
.
slice
(
0
,
4
)
if
(
con
.
firstClassify
==
'结束环节'
)
{
con
.
firstClassify
=
'促成交'
}
if
(
con
.
firstClassify
.
indexOf
(
item
.
stage
)
!=
-
1
)
{
item
.
conversationDetailList
.
push
(
con
)
}
})
})
this
.
setData
({
list
:
data
.
aiSparringCheckDetailDTOList
,
// isShow:true
},
()
=>
{
this
.
handleSort
()
})
},
handleSort
()
{
let
{
list
,
sort
}
=
this
.
data
;
list
.
sort
((
a
,
b
)
=>
{
// 找到a和b在predefinedOrder中的索引
let
indexA
=
sort
.
indexOf
(
a
.
stage
);
let
indexB
=
sort
.
indexOf
(
b
.
stage
);
// 如果索引相同,则元素相等,返回0
if
(
indexA
===
indexB
)
{
return
0
;
}
// 如果a的索引小于b的索引,则a应该排在b前面,返回-1
if
(
indexA
<
indexB
)
{
return
-
1
;
}
// 否则,b应该排在a前面,返回1
return
1
;
});
this
.
setData
({
list
})
},
formatTime
(
num
)
{
let
minutes
=
Math
.
floor
(
num
/
60
)
||
'0'
,
seconds
=
num
%
60
||
'0'
seconds
=
seconds
<
10
?
`0
${
seconds
}
`
:
seconds
return
`
${
minutes
}
:
${
seconds
}
`
},
}
})
\ No newline at end of file
packageEquity/pages/aiCheck/detail/components/skilled/skilled.wxml
View file @
2f52dab
...
...
@@ -13,4 +13,4 @@
</view>
<view class="report-content">上党课海口市都是对的</view>
</view>
<quality batchId="{{17}}"></quality>
\ No newline at end of file
<quality list="{{list}}"></quality>
\ No newline at end of file
packageEquity/pages/aiCheck/result/result.js
View file @
2f52dab
...
...
@@ -122,7 +122,7 @@ Page({
*
*/
onLoad
(
options
)
{
this
.
getDetail
(
95
);
this
.
getDetail
(
121
);
return
;
const
{
history_message
,
...
...
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