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 = { ...@@ -28,6 +28,13 @@ module.exports = {
...data ...data
}) })
}, },
getShortUrl(data){
return http.post({
method: 'dj.api.car.boutique.inspection.batch.file.short.url',
projectName: 'boutique',
...data
})
}
} }
<template> <template>
<view class="left-side"> <view class="left-side">
<view class="user-box"> <view class="user-box">
<view class="user-info flex" @click="jumpPersonCenter"> <view
class="user-info flex"
@click="jumpPersonCenter"
>
<view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view> <view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view>
<view class="user-name"> <view class="user-name">
{{ userInfo.name }} {{ userInfo.name }}
<view v-if="hasPerson" class="sprite-icon icon-arrow-next"></view> <view
v-if="hasPerson"
class="sprite-icon icon-arrow-next"
></view>
</view> </view>
</view> </view>
</view> </view>
<view :class="['left-tabs', { three: tabs.length == 3 }]"> <view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs"> <template v-for="(i, index) in tabs">
<view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index, i)"> <view
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
>
<view class="icon-box"> <view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view> <view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view> </view>
{{ i.label }} {{ i.label }}
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view> <view
<view class="dot" v-if="i.icon == 'ai' && sopCount"></view> class="dot"
<view class="tip-box" v-if="i.icon == 'study' && readCount" @click.stop="readCount = 0">待办事项:{{ readCount }}</view> v-if="i.icon == 'record' && perRecordNumber"
></view>
<view
class="dot"
v-if="i.icon == 'ai' && sopCount"
></view>
<view
class="tip-box"
v-if="i.icon == 'study' && readCount"
>待办事项:{{ readCount }}</view>
</view> </view>
</template> </template>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view class="btn" @click="openPop"> <view
class="btn"
@click="openPop"
>
<view class="sprite-icon icon-feedback"></view> <view class="sprite-icon icon-feedback"></view>
<view class="message-number" v-if="messageTotal > 0"></view> <view
class="message-number"
v-if="messageTotal > 0"
></view>
</view> </view>
<view class="btn" @click="handleSetting"> <view
class="btn"
@click="handleSetting"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
<!-- 客服弹框 --> <!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> --> <!-- <kf-box ref="kfRef" /> -->
<message-pop ref="kfRef" :type="messageType" :messageData="messageData"></message-pop> <message-pop
ref="kfRef"
:type="messageType"
:messageData="messageData"
></message-pop>
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" /> <setting-box
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
</view> </view>
</template> </template>
...@@ -44,6 +79,7 @@ import KfBox from "./KfBox"; ...@@ -44,6 +79,7 @@ import KfBox from "./KfBox";
import MessagePop from "./MessagePop" import MessagePop from "./MessagePop"
import SettingBox from "./SettingBox"; import SettingBox from "./SettingBox";
import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData' import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData'
import utils from '@/utils/utils'
export default { export default {
components: { KfBox, SettingBox, MessagePop }, components: { KfBox, SettingBox, MessagePop },
props: { props: {
...@@ -51,7 +87,7 @@ export default { ...@@ -51,7 +87,7 @@ export default {
userInfo: Object userInfo: Object
}, },
name: '', name: '',
data() { data () {
return { return {
tabs: [ tabs: [
{ {
...@@ -72,7 +108,7 @@ export default { ...@@ -72,7 +108,7 @@ export default {
{ {
label: "学习中心", label: "学习中心",
icon: "study", icon: "study",
isTrack:true, isTrack: true,
name: 'StudyCenter' name: 'StudyCenter'
}, },
], ],
...@@ -82,31 +118,31 @@ export default { ...@@ -82,31 +118,31 @@ export default {
total: 0 total: 0
}, },
messageTotal: 0, messageTotal: 0,
readCount:0, readCount: 0,
trackId:0, trackId: 0,
trackInterval:null, trackInterval: null,
collectTrack:false, collectTrack: false,
hasPerson: false, hasPerson: false,
messageType: 'study', messageType: 'study',
sopCount: 0 sopCount: 0
} }
}, },
watch: { watch: {
userInfo(n) { userInfo (n) {
if (n.shopMerchantId) this.haveCustomerAccess(n) if (n.shopMerchantId) this.haveCustomerAccess(n)
}, },
trackId(n) { trackId (n) {
if(!n) { if (!n) {
clearInterval(this.trackInterval) clearInterval(this.trackInterval)
} }
} }
}, },
computed: { computed: {
perRecordNumber() { perRecordNumber () {
return this.$store.state.audio.perRecordNumber return this.$store.state.audio.perRecordNumber
} }
}, },
created() { created () {
// 监听自定义事件 // 监听自定义事件
uni.$on('pageBack', () => { uni.$on('pageBack', () => {
console.log('pageBack') console.log('pageBack')
...@@ -115,7 +151,7 @@ export default { ...@@ -115,7 +151,7 @@ export default {
}); });
uni.$on('studyCenter', () => { uni.$on('studyCenter', () => {
console.log('studyCenter') console.log('studyCenter')
this.changeIndex(3,this.tabs[3]) this.changeIndex(3, this.tabs[3])
}); });
this.getMessageInfo() this.getMessageInfo()
this.getUnreadCount() this.getUnreadCount()
...@@ -123,42 +159,51 @@ export default { ...@@ -123,42 +159,51 @@ export default {
}, },
inject: ['showPage'], inject: ['showPage'],
methods: { methods: {
getUnreadCount() { getUnreadCount () {
let _this = this
uni.$api.commonApi.getUnreadCount({}).then(res => { uni.$api.commonApi.getUnreadCount({}).then(res => {
this.readCount = res.data this.readCount = res.data
setTimeout(() => {
utils.getViewInfo('.tip-box', info => {
_this.$emit('showReadCountTips', {
style: `display:block;opacity:1;top: ${info.top}px; left: ${info.left}px;`,
text: `待办事项:${res.data}`
})
})
}, 1e3)
}) })
}, },
addTrack() { addTrack () {
const { merchantId, merchantName } = uni.$storage.get("userInfo") const { merchantId, merchantName } = uni.$storage.get("userInfo")
const params = { const params = {
goodsType: 1, goodsType: 1,
merchantId, merchantId,
merchantName merchantName
} }
uni.$api.commonApi.dynamicrecordAdd(params).then(res=>{ uni.$api.commonApi.dynamicrecordAdd(params).then(res => {
this.trackId = res this.trackId = res
}) })
}, },
leaveTrack() { leaveTrack () {
if(!this.trackId) return if (!this.trackId) return
uni.$api.commonApi.dynamicrecordLeave({id:this.trackId}).then(res=>{ uni.$api.commonApi.dynamicrecordLeave({ id: this.trackId }).then(res => {
console.log(res) console.log(res)
}) })
}, },
startTrack() { startTrack () {
this.trackInterval = setInterval(()=>{ this.trackInterval = setInterval(() => {
this.leaveTrack() this.leaveTrack()
}, 5000) }, 5000)
}, },
clickHome() { clickHome () {
if(this.tabs[this.tabIndex].isTrack) if (this.tabs[this.tabIndex].isTrack)
this.changeIndex(0,this.tabs[0]) this.changeIndex(0, this.tabs[0])
}, },
handleSetting() { handleSetting () {
this.$refs.settingRef.open() this.$refs.settingRef.open()
this.clickHome() this.clickHome()
}, },
findBeiSenSSOToken() { findBeiSenSSOToken () {
return new Promise(resolve => { return new Promise(resolve => {
const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2' const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => { uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
...@@ -169,25 +214,25 @@ export default { ...@@ -169,25 +214,25 @@ export default {
}) })
}) })
}, },
async changeIndex(index,item) { async changeIndex (index, item) {
console.log(index, 'changeIndex') console.log(index, 'changeIndex')
// if (this.tabIndex == index) return; // if (this.tabIndex == index) return;
// 点击学习中心要跳从北森回后台配置的学习中心,学习中心为3 // 点击学习中心要跳从北森回后台配置的学习中心,学习中心为3
if (this.tabIndex == index && index !== 3) return; if (this.tabIndex == index && index !== 3) return;
let jumpUrl let jumpUrl
if(item.isTrack) { if (item.isTrack) {
this.readCount = 0 this.readCount = 0
try { try {
jumpUrl = await this.findBeiSenSSOToken() jumpUrl = await this.findBeiSenSSOToken()
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
if(jumpUrl) { if (jumpUrl) {
this.addTrack() this.addTrack()
this.startTrack() this.startTrack()
} }
}else { } else {
this.leaveTrack() this.leaveTrack()
this.trackId = 0 this.trackId = 0
clearInterval(this.trackInterval) clearInterval(this.trackInterval)
...@@ -197,30 +242,30 @@ export default { ...@@ -197,30 +242,30 @@ export default {
this.getMessageInfo() this.getMessageInfo()
this.getSopCount() this.getSopCount()
}, },
async haveCustomerAccess(val) { async haveCustomerAccess (val) {
const {shopMerchantId, sceneType:scene} = val const { shopMerchantId, sceneType: scene } = val
const res = await uni.$api.customerApi.haveCustomerAccess({ const res = await uni.$api.customerApi.haveCustomerAccess({
merchantId:shopMerchantId merchantId: shopMerchantId
}) })
if (res) this.tabs.push( { if (res) this.tabs.push({
label: "客户档案", label: "客户档案",
icon: "customer-file", icon: "customer-file",
name: 'CustomerFile' name: 'CustomerFile'
}) })
this.$store.state.user.haveCustomerAccess = res this.$store.state.user.haveCustomerAccess = res
uni.$api.customerApi.saleOpen({ uni.$api.customerApi.saleOpen({
merchantId:shopMerchantId, merchantId: shopMerchantId,
scene scene
}).then(result=>{ }).then(result => {
if(result) { if (result) {
this.hasPerson = true this.hasPerson = true
} }
}) })
}, },
// 获取话术未读列表 // 获取话术未读列表
async getMessage() { async getMessage () {
console.log('获取话术', uni.$storage.get("userInfo")) console.log('获取话术', uni.$storage.get("userInfo"))
const {sceneType, uuid} = uni.$storage.get("userInfo") const { sceneType, uuid } = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getUnreadRecord({ const res = await uni.$api.commonApi.getUnreadRecord({
businessType: sceneType, businessType: sceneType,
uuid uuid
...@@ -232,8 +277,8 @@ export default { ...@@ -232,8 +277,8 @@ export default {
} }
}, },
// 消息中心未读总数 // 消息中心未读总数
async getMessageCount() { async getMessageCount () {
const {sceneType} = uni.$storage.get("userInfo") const { sceneType } = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getMessageCount({ const res = await uni.$api.commonApi.getMessageCount({
status: 0, // 待查看,未读 status: 0, // 待查看,未读
businessType: sceneType businessType: sceneType
...@@ -242,7 +287,7 @@ export default { ...@@ -242,7 +287,7 @@ export default {
this.messageTotal = res this.messageTotal = res
}, },
// 学习中心消息弹窗,优先级高于有修改话术弹窗 // 学习中心消息弹窗,优先级高于有修改话术弹窗
async getMessagePop() { async getMessagePop () {
const res = await uni.$api.commonApi.getMessagePop({}) const res = await uni.$api.commonApi.getMessagePop({})
console.log(res, 'res111') console.log(res, 'res111')
if (res.ids && res.ids.length > 0) { if (res.ids && res.ids.length > 0) {
...@@ -258,26 +303,26 @@ export default { ...@@ -258,26 +303,26 @@ export default {
await this.getMessage() await this.getMessage()
} }
}, },
openPop() { openPop () {
// this.messageType = 'system' // this.messageType = 'system'
// this.$refs.kfRef.open() // this.$refs.kfRef.open()
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/messageList` url: `/pages/common/messageList`
}) })
}, },
getMessageInfo() { getMessageInfo () {
// this.getMessage() // this.getMessage()
this.getMessageCount() this.getMessageCount()
this.getMessagePop() this.getMessagePop()
}, },
jumpPersonCenter() { jumpPersonCenter () {
if(this.hasPerson) { if (this.hasPerson) {
this.clickHome() this.clickHome()
this.$emit('update:tabIndex', 99) this.$emit('update:tabIndex', 99)
} }
}, },
async getSopCount() { async getSopCount () {
const {sceneType} = uni.$storage.get("userInfo") const { sceneType } = uni.$storage.get("userInfo")
this.sopCount = await uni.$api.commonApi.getSopAiAgentMessageCount({ this.sopCount = await uni.$api.commonApi.getSopAiAgentMessageCount({
moduleType: 4, // 0-系统通知,1-优秀话术,2-话术预警,3-AI导师 moduleType: 4, // 0-系统通知,1-优秀话术,2-话术预警,3-AI导师
businessType: sceneType, businessType: sceneType,
...@@ -286,7 +331,7 @@ export default { ...@@ -286,7 +331,7 @@ export default {
console.log(this.sopCount, 'sopCount') console.log(this.sopCount, 'sopCount')
} }
}, },
beforeCreate() { beforeCreate () {
clearInterval(this.trackInterval) clearInterval(this.trackInterval)
}, },
} }
...@@ -371,6 +416,7 @@ export default { ...@@ -371,6 +416,7 @@ export default {
z-index: 99999; z-index: 99999;
padding-left: toRpx(60); padding-left: toRpx(60);
text-align: left; text-align: left;
opacity: 0;
} }
} }
......
<template> <template>
<view class="container" @click="handleTouchStart"> <view
class="container"
@click="handleTouchStart"
>
<view :class="['home', { show: !id && showHome }]"> <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"> <view class="right-side">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<view class="right-content"> <view class="right-content">
<view class="start" @click="$emit('start')"> <view
<image class="start-btn" src="../../assets/images/home/start.gif" alt="开始接待" /> class="start"
<image class="start-border" src="../../assets/images/home/start-border.png" /> @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>
<view class="module-list"> <view class="module-list">
<slot name="module" /> <slot name="module" />
...@@ -15,12 +40,26 @@ ...@@ -15,12 +40,26 @@
</view> </view>
</template> </template>
<template v-else-if="tabIndex == 99"> <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>
<template v-else> <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> </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="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view> <view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view> </view>
...@@ -29,17 +68,41 @@ ...@@ -29,17 +68,41 @@
<view :class="['detail', { show: id }]"> <view :class="['detail', { show: id }]">
<slot name="detail" /> <slot name="detail" />
</view> </view>
<view class="point-page" v-if="!showHome"> <view
<component :is="pointComponentName" @backHome="backHome" @jump="jump" :transfer="transfer" /> class="point-page"
v-if="!showHome"
>
<component
:is="pointComponentName"
@backHome="backHome"
@jump="jump"
:transfer="transfer"
/>
</view> </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 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">
<view class="footer-btn confirm flex" @click="$emit('openStep')"> <view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<template v-if="finishDoneText"> <template v-if="finishDoneText">
{{ finishDoneText }} {{ finishDoneText }}
</template> </template>
...@@ -48,7 +111,10 @@ ...@@ -48,7 +111,10 @@
<text>(推荐)</text> <text>(推荐)</text>
</template> </template>
</view> </view>
<view class="footer-btn cancel flex" @click="$emit('backHome')"> <view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
仍要退出 仍要退出
<text>(不推荐)</text> <text>(不推荐)</text>
</view> </view>
...@@ -57,9 +123,23 @@ ...@@ -57,9 +123,23 @@
<!-- 升级弹框 --> <!-- 升级弹框 -->
<update-box /> <update-box />
<slot name="content" /> <slot name="content" />
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view> <web-view
<web-view ref="studyWebview" :src="jumpUrl" v-if="showBeisen"></web-view> @message="handlerMessage"
<image v-if="showLeadPage" @click="showLeadPage = false" class="lead-page" src="../../assets/images/noviceGuide/lead-page.png" mode="scaleToFill" /> 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> </view>
</template> </template>
<script> <script>
...@@ -96,7 +176,7 @@ export default { ...@@ -96,7 +176,7 @@ export default {
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」' default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
} }
}, },
data() { data () {
return { return {
studyUrl: '', studyUrl: '',
jumpUrl: '', jumpUrl: '',
...@@ -107,29 +187,30 @@ export default { ...@@ -107,29 +187,30 @@ export default {
userInfo: {}, userInfo: {},
tabIndex: 0, tabIndex: 0,
showLeadPage: false, showLeadPage: false,
showBeisen: false showBeisen: false,
tipsObject: {}
} }
}, },
mounted() { mounted () {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
this.checkVersion() this.checkVersion()
this.checkLead() this.checkLead()
}, },
provide() { provide () {
return { return {
showPage: this.handleShowPage, showPage: this.handleShowPage,
hideFooter: this.handleFooter hideFooter: this.handleFooter
} }
}, },
computed: { computed: {
previewRef() { previewRef () {
return this.$refs.previewRef return this.$refs.previewRef
}, },
finishRef() { finishRef () {
return this.$refs.finish return this.$refs.finish
}, },
componentName() { componentName () {
console.log(this.$refs.leftBox.tabs, this.tabIndex, this.$refs.leftBox.tabs[this.tabIndex].name) console.log(this.$refs.leftBox.tabs, this.tabIndex, this.$refs.leftBox.tabs[this.tabIndex].name)
return this.$refs.leftBox.tabs[this.tabIndex].name return this.$refs.leftBox.tabs[this.tabIndex].name
} }
...@@ -153,17 +234,17 @@ export default { ...@@ -153,17 +234,17 @@ export default {
this.jumpUrl = '' this.jumpUrl = ''
} }
}, },
handleFooter(val) { handleFooter (val) {
this.footerBox = val this.footerBox = val
}, },
backHome() { backHome () {
this.showHome = true this.showHome = true
console.log(this.$refs.pointRef) console.log(this.$refs.pointRef)
Promise.resolve().then(() => { Promise.resolve().then(() => {
this.$refs.pointRef?.$refs?.centerRef?.init && this.$refs.pointRef.$refs.centerRef.init() this.$refs.pointRef?.$refs?.centerRef?.init && this.$refs.pointRef.$refs.centerRef.init()
}) })
}, },
jump(val) { jump (val) {
this.showHome = true this.showHome = true
if (val == 'CustomerFile') { if (val == 'CustomerFile') {
this.tabIndex = 2 this.tabIndex = 2
...@@ -171,12 +252,12 @@ export default { ...@@ -171,12 +252,12 @@ export default {
} }
this.$emit('start') this.$emit('start')
}, },
handleShowPage(name, transfer) { handleShowPage (name, transfer) {
this.transfer = transfer this.transfer = transfer
this.showHome = false this.showHome = false
this.pointComponentName = name this.pointComponentName = name
}, },
checkLead() { checkLead () {
let leadPage = uni.$storage.get('leadPage') || [] let leadPage = uni.$storage.get('leadPage') || []
const { phone } = this.userInfo const { phone } = this.userInfo
const version = plus?.runtime?.version || '' // 平板 const version = plus?.runtime?.version || '' // 平板
...@@ -198,7 +279,7 @@ export default { ...@@ -198,7 +279,7 @@ export default {
} }
} }
}, },
handleOperation(val, data) { handleOperation (val, data) {
console.log(val, data, 'val, data') console.log(val, data, 'val, data')
const { type } = val; const { type } = val;
...@@ -242,7 +323,7 @@ export default { ...@@ -242,7 +323,7 @@ export default {
}; };
// 根据操作类型执行相应逻辑 // 根据操作类型执行相应逻辑
switch(type) { switch (type) {
case 'openCourse': case 'openCourse':
this.showBeisen = true; this.showBeisen = true;
setWebviewStyle(); setWebviewStyle();
...@@ -257,10 +338,22 @@ export default { ...@@ -257,10 +338,22 @@ export default {
} }
}, },
// 学习中心修改阅读状态,打开后才修改 // 学习中心修改阅读状态,打开后才修改
async getStudyCenterRead(id) { async getStudyCenterRead (id) {
console.log(id, 'getStudyCenterRead') console.log(id, 'getStudyCenterRead')
const res = await uni.$api.commonApi.getStudyCenterRead({ id }) const res = await uni.$api.commonApi.getStudyCenterRead({ id })
console.log(res) console.log(res)
},
showReadCountTips (res) {
this.tipsObject = res
},
closeTips () {
this.$refs.leftBox.readCount = 0
this.tipsObject = {
style: '',
text: ''
}
} }
} }
} }
...@@ -268,6 +361,21 @@ export default { ...@@ -268,6 +361,21 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
position: relative; 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 { &::after {
content: ''; content: '';
position: absolute; position: absolute;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<template v-for="(i, ind) in item.recordingCheckResultList"> <template v-for="(i, ind) in item.recordingCheckResultList">
<view <view
:class="['detail-box',i.detailClassName]" :class="['detail-box',i.detailClassName]"
:key="`${index}_${ind}`" :key="`text_${index}_${ind}`"
> >
<view class="text-box"> <view class="text-box">
<view <view
...@@ -46,14 +46,14 @@ ...@@ -46,14 +46,14 @@
<view class="content-box"> <view class="content-box">
<block v-if="!i.scriptRec"> <block v-if="!i.scriptRec">
<view class="suggestions-box no"> <view class="suggestions-box no">
暂无建议 暂无话术推荐
</view> </view>
</block> </block>
<block v-else> <block v-else>
<view class="suggestions-box"> <view class="suggestions-box">
<view class="title"> <view class="title">
<view class="sprite-icon icon-suggestions-icon"></view> <view class="sprite-icon icon-suggestions-icon"></view>
话术建议 话术推荐
</view> </view>
<view class="text"> <view class="text">
<rich-text :nodes="i.scriptRec"></rich-text> <rich-text :nodes="i.scriptRec"></rich-text>
...@@ -121,7 +121,6 @@ ...@@ -121,7 +121,6 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import dayjs from 'dayjs'
import utils from '@/utils/utils' import utils from '@/utils/utils'
export default { export default {
...@@ -420,7 +419,7 @@ export default { ...@@ -420,7 +419,7 @@ export default {
.detail-box { .detail-box {
background: #f5f8fc; background: #f5f8fc;
overflow: hidden; overflow: hidden;
opacity: 0;
.content-box { .content-box {
transform: translateY(-100%); transform: translateY(-100%);
} }
...@@ -522,6 +521,7 @@ export default { ...@@ -522,6 +521,7 @@ export default {
@keyframes hide-box { @keyframes hide-box {
100% { 100% {
height: toRpx(80); height: toRpx(80);
opacity: 1;
} }
} }
...@@ -633,7 +633,8 @@ export default { ...@@ -633,7 +633,8 @@ export default {
right: toRpx(20); right: toRpx(20);
font-size: toRpx(24); font-size: toRpx(24);
color: #757980; color: #757980;
display: inline-block; display: inline-flex;
align-items: center;
height: toRpx(36); height: toRpx(36);
border-radius: toRpx(16); border-radius: toRpx(16);
padding: 0 toRpx(22) 0 toRpx(12); padding: 0 toRpx(22) 0 toRpx(12);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<view class="suggestions-box"> <view class="suggestions-box">
<view class="suggestions-title"> <view class="suggestions-title">
<view class="sprite-icon icon-suggestions-icon"></view> <view class="sprite-icon icon-suggestions-icon"></view>
话术建议 话术推荐
</view> </view>
<view class="text"> <view class="text">
<rich-text :nodes="item.scriptRec"></rich-text> <rich-text :nodes="item.scriptRec"></rich-text>
...@@ -163,29 +163,29 @@ export default { ...@@ -163,29 +163,29 @@ export default {
} }
.quality-block { .quality-block {
.title { .title {
height: 80rpx; height: toRpx(80);
background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%); 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; font-weight: 600;
padding: 0 20rpx; padding: 0 toRpx(20);
&::before { &::before {
content: ''; content: '';
width: 8rpx; width: toRpx(8);
height: 8rpx; height: toRpx(8);
background: #000000; background: #000000;
border-radius: 100%; border-radius: 100%;
display: block; display: block;
margin-right: 16rpx; margin-right: toRpx(16);
} }
.matched-btn { .matched-btn {
margin-left: auto; margin-left: auto;
height: 56rpx; height: toRpx(56);
border-radius: 28rpx; border-radius: toRpx(28);
background: #ffffff; background: #ffffff;
padding: 0 36rpx; padding: 0 toRpx(36);
color: #eb4e4e; color: #eb4e4e;
font-size: 24rpx; font-size: toRpx(24);
font-weight: 600; font-weight: 600;
} }
.hit { .hit {
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
} }
} }
.script-rec { .script-rec {
padding: 24rpx; padding: toRpx(24);
.suggestions-box { .suggestions-box {
background: #ffffff; background: #ffffff;
border-radius: toRpx(16); border-radius: toRpx(16);
......
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.quality-table-box { .quality-table-box {
.quality-table { .quality-table {
height: 872rpx; height: toRpx(872);
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
border-radius: toRpx(16); border-radius: toRpx(16);
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
} }
} }
.row-1 { .row-1 {
width: 272rpx; width: toRpx(272);
} }
.row-2 { .row-2 {
width: toRpx(248); width: toRpx(248);
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.row-3 { .row-3 {
padding: 24rpx 48rpx; padding: toRpx(24) toRpx(48);
justify-content: flex-start; justify-content: flex-start;
} }
} }
......
...@@ -56,17 +56,17 @@ export default { ...@@ -56,17 +56,17 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.tags-box { .tags-box {
padding-bottom: 24rpx; padding-bottom: toRpx(24);
.tags-flex { .tags-flex {
gap: 20rpx; gap: toRpx(20);
flex-wrap: wrap; flex-wrap: wrap;
.tag { .tag {
height: 64rpx; height: toRpx(64);
border-radius: 16rpx; border-radius: toRpx(16);
background: #edf3ff; background: #edf3ff;
padding: 0 20rpx; padding: 0 toRpx(20);
color: #4673ff; color: #4673ff;
font-size: 28rpx; font-size: toRpx(28);
} }
} }
} }
......
...@@ -49,7 +49,10 @@ ...@@ -49,7 +49,10 @@
</template> </template>
</view> </view>
<view class="control-box flex"> <view class="control-box flex">
<view class="sprite-icon icon-reception-share"></view> <view
class="sprite-icon icon-reception-share"
@click="share"
></view>
<view <view
class="play-box flex" class="play-box flex"
@click="onHandle" @click="onHandle"
...@@ -98,6 +101,7 @@ import Dialogue from './components/Dialogue.vue' ...@@ -98,6 +101,7 @@ import Dialogue from './components/Dialogue.vue'
import Quality from './components/Quality.vue' import Quality from './components/Quality.vue'
import Tags from './components/Tags.vue' import Tags from './components/Tags.vue'
import QualityTable from './components/QualityTable.vue' import QualityTable from './components/QualityTable.vue'
import dayjs from 'dayjs'
export default { export default {
components: { components: {
QualityTable, QualityTable,
...@@ -183,6 +187,7 @@ export default { ...@@ -183,6 +187,7 @@ export default {
}, },
setAudio (recordingUrl) { setAudio (recordingUrl) {
this.qualityAudio = uni.createInnerAudioContext() this.qualityAudio = uni.createInnerAudioContext()
console.log(recordingUrl)
this.qualityAudio.src = recordingUrl this.qualityAudio.src = recordingUrl
this.qualityAudio.onPause(() => { this.qualityAudio.onPause(() => {
...@@ -197,6 +202,7 @@ export default { ...@@ -197,6 +202,7 @@ export default {
this.status = 'ending' this.status = 'ending'
this.currentTime = this.formatTime(this.qualityAudio.duration) this.currentTime = this.formatTime(this.qualityAudio.duration)
this.dialogueRef.isPlayIng = false this.dialogueRef.isPlayIng = false
this.isOperate = true
}) })
}, },
onTimeUpdate () { onTimeUpdate () {
...@@ -257,14 +263,61 @@ export default { ...@@ -257,14 +263,61 @@ export default {
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
} }
} else item.conversationDetailDTOList = [{ } else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议' scriptRec: scriptRec || '暂无话术推荐'
}] }]
}) })
this.qualityData = res this.qualityData = res
}, },
desensitizePhoneNumber(phoneNumber){ desensitizePhoneNumber (phoneNumber) {
return phoneNumber.replace(phoneNumber.slice(3,7),'****') 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> </script>
...@@ -463,7 +516,7 @@ export default { ...@@ -463,7 +516,7 @@ export default {
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; 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!