Commit 69702b55 by 胡悦

Merge branch 'SAAS+V4.54.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.54.0

2 parents a9b52cf5 52104f93
......@@ -28,6 +28,13 @@ module.exports = {
...data
})
},
getShortUrl(data){
return http.post({
method: 'dj.api.car.boutique.inspection.batch.file.short.url',
projectName: 'boutique',
...data
})
}
}
<template>
<view class="container" @click="handleTouchStart">
<view
class="container"
@click="handleTouchStart"
>
<view :class="['home', { show: !id && showHome }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" ref="leftBox" @changeTab="changeTab" @stopAudio="stopAudio" />
<left-side
:userInfo="userInfo"
:tabIndex.sync="tabIndex"
ref="leftBox"
@changeTab="changeTab"
@stopAudio="stopAudio"
@showReadCountTips="showReadCountTips"
/>
<view
class="tips-box"
:style="tipsObject.style"
@click.stop="closeTips"
>{{tipsObject.text}}</view>
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
<view class="start" @click="$emit('start')">
<image class="start-btn" src="../../assets/images/home/start.gif" alt="开始接待" />
<image class="start-border" src="../../assets/images/home/start-border.png" />
<view
class="start"
@click="$emit('start')"
>
<image
class="start-btn"
src="../../assets/images/home/start.gif"
alt="开始接待"
/>
<image
class="start-border"
src="../../assets/images/home/start-border.png"
/>
</view>
<view class="module-list">
<slot name="module" />
......@@ -15,12 +40,26 @@
</view>
</template>
<template v-else-if="tabIndex == 99">
<component is="Point" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage" />
<component
:is="'Point'"
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
/>
</template>
<template v-else>
<component :is="componentName" @handleOperation="handleOperation" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage" />
<component
:is="componentName"
@handleOperation="handleOperation"
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
/>
</template>
<view class="store-addr" v-if="footerBox">
<view
class="store-addr"
v-if="footerBox"
>
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
......@@ -29,17 +68,41 @@
<view :class="['detail', { show: id }]">
<slot name="detail" />
</view>
<view class="point-page" v-if="!showHome">
<component :is="pointComponentName" @backHome="backHome" @jump="jump" :transfer="transfer" />
<view
class="point-page"
v-if="!showHome"
>
<component
:is="pointComponentName"
@backHome="backHome"
@jump="jump"
:transfer="transfer"
/>
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<MessageBox
ref="previewRef"
@confirm="$emit('preview')"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox>
<!-- 停留弹框 -->
<!-- <MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox> -->
<!-- 退出弹框 -->
<MessageBox :popupW="704" ref="finish" :content="finishContene" :isFooter="false">
<MessageBox
:popupW="704"
ref="finish"
:content="finishContene"
:isFooter="false"
>
<view class="footer">
<view class="footer-btn confirm flex" @click="$emit('openStep')">
<view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<template v-if="finishDoneText">
{{ finishDoneText }}
</template>
......@@ -48,7 +111,10 @@
<text>(推荐)</text>
</template>
</view>
<view class="footer-btn cancel flex" @click="$emit('backHome')">
<view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
仍要退出
<text>(不推荐)</text>
</view>
......@@ -57,9 +123,23 @@
<!-- 升级弹框 -->
<update-box />
<slot name="content" />
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view>
<web-view ref="studyWebview" :src="jumpUrl" v-if="showBeisen"></web-view>
<image v-if="showLeadPage" @click="showLeadPage = false" class="lead-page" src="../../assets/images/noviceGuide/lead-page.png" mode="scaleToFill" />
<web-view
@message="handlerMessage"
ref="webview"
src="/hybrid/html/index.html"
></web-view>
<web-view
ref="studyWebview"
:src="jumpUrl"
v-if="showBeisen"
></web-view>
<image
v-if="showLeadPage"
@click="showLeadPage = false"
class="lead-page"
src="../../assets/images/noviceGuide/lead-page.png"
mode="scaleToFill"
/>
</view>
</template>
<script>
......@@ -96,7 +176,7 @@ export default {
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
}
},
data() {
data () {
return {
studyUrl: '',
jumpUrl: '',
......@@ -107,29 +187,30 @@ export default {
userInfo: {},
tabIndex: 0,
showLeadPage: false,
showBeisen: false
showBeisen: false,
tipsObject: {}
}
},
mounted() {
mounted () {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
this.checkVersion()
this.checkLead()
},
provide() {
provide () {
return {
showPage: this.handleShowPage,
hideFooter: this.handleFooter
}
},
computed: {
previewRef() {
previewRef () {
return this.$refs.previewRef
},
finishRef() {
finishRef () {
return this.$refs.finish
},
componentName() {
componentName () {
console.log(this.$refs.leftBox.tabs, this.tabIndex, this.$refs.leftBox.tabs[this.tabIndex].name)
return this.$refs.leftBox.tabs[this.tabIndex].name
}
......@@ -148,22 +229,22 @@ export default {
})
return
}
} else {
this.jumpUrl = ''
}
},
handleFooter(val) {
handleFooter (val) {
this.footerBox = val
},
backHome() {
backHome () {
this.showHome = true
console.log(this.$refs.pointRef)
Promise.resolve().then(() => {
this.$refs.pointRef?.$refs?.centerRef?.init && this.$refs.pointRef.$refs.centerRef.init()
})
},
jump(val) {
jump (val) {
this.showHome = true
if (val == 'CustomerFile') {
this.tabIndex = 2
......@@ -171,12 +252,12 @@ export default {
}
this.$emit('start')
},
handleShowPage(name, transfer) {
handleShowPage (name, transfer) {
this.transfer = transfer
this.showHome = false
this.pointComponentName = name
},
checkLead() {
checkLead () {
let leadPage = uni.$storage.get('leadPage') || []
const { phone } = this.userInfo
const version = plus?.runtime?.version || '' // 平板
......@@ -198,22 +279,22 @@ export default {
}
}
},
handleOperation(val, data) {
handleOperation (val, data) {
console.log(val, data, 'val, data')
const { type } = val;
// 提取公共的webview设置逻辑
const setWebviewStyle = () => {
setTimeout(() => {
const currentWebview = this.$parent.$scope.$getAppWebview();
const wv = currentWebview.children()[1];
if (wv) {
wv.setStyle({
left: '8%',
top: '3%',
height: '97%',
width: '92%'
wv.setStyle({
left: '8%',
top: '3%',
height: '97%',
width: '92%'
});
} else {
this.jumpUrl = '';
......@@ -232,7 +313,7 @@ export default {
appCode: 'Learning',
id: COURSE_ID
};
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.join('&');
......@@ -242,12 +323,12 @@ export default {
};
// 根据操作类型执行相应逻辑
switch(type) {
switch (type) {
case 'openCourse':
this.showBeisen = true;
setWebviewStyle();
break;
case 'courseDetail':
handleCourseDetail();
this.showBeisen = true;
......@@ -257,10 +338,22 @@ export default {
}
},
// 学习中心修改阅读状态,打开后才修改
async getStudyCenterRead(id) {
async getStudyCenterRead (id) {
console.log(id, 'getStudyCenterRead')
const res = await uni.$api.commonApi.getStudyCenterRead({ id })
console.log(res)
},
showReadCountTips (res) {
this.tipsObject = res
},
closeTips () {
this.$refs.leftBox.readCount = 0
this.tipsObject = {
style: '',
text: ''
}
}
}
}
......@@ -268,6 +361,21 @@ export default {
<style scoped lang="scss">
.container {
position: relative;
.tips-box {
position: absolute;
color: #ffffff;
font-size: toRpx(28);
width: toRpx(310);
height: toRpx(90);
line-height: toRpx(64);
background-image: url('@/assets/images/home/daliog.png');
background-size: 100% 100%;
z-index: 9;
padding-left: toRpx(60);
text-align: left;
display: none;
opacity: 0;
}
&::after {
content: '';
position: absolute;
......
......@@ -30,7 +30,7 @@
<template v-for="(i, ind) in item.recordingCheckResultList">
<view
:class="['detail-box',i.detailClassName]"
:key="`${index}_${ind}`"
:key="`text_${index}_${ind}`"
>
<view class="text-box">
<view
......@@ -46,14 +46,14 @@
<view class="content-box">
<block v-if="!i.scriptRec">
<view class="suggestions-box no">
暂无建议
暂无话术推荐
</view>
</block>
<block v-else>
<view class="suggestions-box">
<view class="title">
<view class="sprite-icon icon-suggestions-icon"></view>
话术建议
话术推荐
</view>
<view class="text">
<rich-text :nodes="i.scriptRec"></rich-text>
......@@ -121,7 +121,6 @@
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
import utils from '@/utils/utils'
export default {
......@@ -420,7 +419,7 @@ export default {
.detail-box {
background: #f5f8fc;
overflow: hidden;
opacity: 0;
.content-box {
transform: translateY(-100%);
}
......@@ -522,6 +521,7 @@ export default {
@keyframes hide-box {
100% {
height: toRpx(80);
opacity: 1;
}
}
......@@ -633,7 +633,8 @@ export default {
right: toRpx(20);
font-size: toRpx(24);
color: #757980;
display: inline-block;
display: inline-flex;
align-items: center;
height: toRpx(36);
border-radius: toRpx(16);
padding: 0 toRpx(22) 0 toRpx(12);
......
......@@ -45,7 +45,7 @@
<view class="suggestions-box">
<view class="suggestions-title">
<view class="sprite-icon icon-suggestions-icon"></view>
话术建议
话术推荐
</view>
<view class="text">
<rich-text :nodes="item.scriptRec"></rich-text>
......@@ -163,29 +163,29 @@ export default {
}
.quality-block {
.title {
height: 80rpx;
height: toRpx(80);
background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%);
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 600;
padding: 0 20rpx;
padding: 0 toRpx(20);
&::before {
content: '';
width: 8rpx;
height: 8rpx;
width: toRpx(8);
height: toRpx(8);
background: #000000;
border-radius: 100%;
display: block;
margin-right: 16rpx;
margin-right: toRpx(16);
}
.matched-btn {
margin-left: auto;
height: 56rpx;
border-radius: 28rpx;
height: toRpx(56);
border-radius: toRpx(28);
background: #ffffff;
padding: 0 36rpx;
padding: 0 toRpx(36);
color: #eb4e4e;
font-size: 24rpx;
font-size: toRpx(24);
font-weight: 600;
}
.hit {
......@@ -239,7 +239,7 @@ export default {
}
}
.script-rec {
padding: 24rpx;
padding: toRpx(24);
.suggestions-box {
background: #ffffff;
border-radius: toRpx(16);
......
......@@ -124,7 +124,7 @@ export default {
<style scoped lang='scss'>
.quality-table-box {
.quality-table {
height: 872rpx;
height: toRpx(872);
width: 100%;
box-sizing: border-box;
border-radius: toRpx(16);
......@@ -144,7 +144,7 @@ export default {
}
}
.row-1 {
width: 272rpx;
width: toRpx(272);
}
.row-2 {
width: toRpx(248);
......@@ -178,7 +178,7 @@ export default {
box-sizing: border-box;
}
.row-3 {
padding: 24rpx 48rpx;
padding: toRpx(24) toRpx(48);
justify-content: flex-start;
}
}
......
......@@ -56,17 +56,17 @@ export default {
<style scoped lang='scss'>
.tags-box {
padding-bottom: 24rpx;
padding-bottom: toRpx(24);
.tags-flex {
gap: 20rpx;
gap: toRpx(20);
flex-wrap: wrap;
.tag {
height: 64rpx;
border-radius: 16rpx;
height: toRpx(64);
border-radius: toRpx(16);
background: #edf3ff;
padding: 0 20rpx;
padding: 0 toRpx(20);
color: #4673ff;
font-size: 28rpx;
font-size: toRpx(28);
}
}
}
......
......@@ -49,7 +49,10 @@
</template>
</view>
<view class="control-box flex">
<view class="sprite-icon icon-reception-share"></view>
<view
class="sprite-icon icon-reception-share"
@click="share"
></view>
<view
class="play-box flex"
@click="onHandle"
......@@ -98,6 +101,7 @@ import Dialogue from './components/Dialogue.vue'
import Quality from './components/Quality.vue'
import Tags from './components/Tags.vue'
import QualityTable from './components/QualityTable.vue'
import dayjs from 'dayjs'
export default {
components: {
QualityTable,
......@@ -183,6 +187,7 @@ export default {
},
setAudio (recordingUrl) {
this.qualityAudio = uni.createInnerAudioContext()
console.log(recordingUrl)
this.qualityAudio.src = recordingUrl
this.qualityAudio.onPause(() => {
......@@ -197,6 +202,7 @@ export default {
this.status = 'ending'
this.currentTime = this.formatTime(this.qualityAudio.duration)
this.dialogueRef.isPlayIng = false
this.isOperate = true
})
},
onTimeUpdate () {
......@@ -257,14 +263,61 @@ export default {
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
}
} else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议'
scriptRec: scriptRec || '暂无话术推荐'
}]
})
this.qualityData = res
},
desensitizePhoneNumber(phoneNumber){
return phoneNumber.replace(phoneNumber.slice(3,7),'****')
}
desensitizePhoneNumber (phoneNumber) {
return phoneNumber.replace(phoneNumber.slice(3, 7), '****')
},
async share () {
try {
const {
merchantName,
receptionStartTime,
receptionEndTime,
duration,
merchantId,
batchId,
receptionStatus
} = this.pageData,
receptionStatusText = {
1: '成交',
2: '战败',
3: '未知'
}[receptionStatus]
// 获取短链地址
const url = await uni.$api.receptionApi.getShortUrl({
merchantNo: merchantId,
batchId,
receptionStartTime: receptionStartTime
})
if (url) {
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址(更换成短链)
let text = [
merchantName,
dayjs(receptionStartTime).format("YYYY年MM月DD日 HH:mm:ss"),
dayjs(receptionEndTime).format("YYYY年MM月DD日 HH:mm:ss"),
duration,
receptionStatusText,
url
].join(' - ')
uni.setClipboardData({
data: text,
})
} else uni.showToast({
title: "获取短链失败",
icon: "none",
})
} catch (error) {
uni.showToast({
title: error,
icon: "none",
})
}
},
}
}
</script>
......@@ -463,7 +516,7 @@ export default {
background: #ffffff;
box-sizing: border-box;
overflow-y: auto;
padding: 0 40rpx;
padding: 0 toRpx(40);
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!