Commit 6d0d26a7 by 李伟康

commit 质检埋点

1 parent aeb3e8b8
...@@ -38,7 +38,8 @@ const request = ( ...@@ -38,7 +38,8 @@ const request = (
scrm: "axios2", scrm: "axios2",
merchants: "axios3", merchants: "axios3",
reportExport: "axios4", reportExport: "axios4",
"glsx.accounts.biz.common.pictureUpload": "common" "glsx.accounts.biz.common.pictureUpload": "common",
clue:'axios5'
} }
const baseApiName = mappingName[apiName] const baseApiName = mappingName[apiName]
// console.log(baseApiName, "baseApiName") // console.log(baseApiName, "baseApiName")
...@@ -70,7 +71,8 @@ const request = ( ...@@ -70,7 +71,8 @@ const request = (
dj: "sha1", dj: "sha1",
scrm: "sha1", scrm: "sha1",
glsx: "md5", glsx: "md5",
"glsx.accounts.biz.common.pictureUpload": "md5" "glsx.accounts.biz.common.pictureUpload": "md5",
clue:'sha1'
} }
// console.log(signWay[apiName], "baseApiName") // console.log(signWay[apiName], "baseApiName")
const secret = baseConfig[baseApiName].secret const secret = baseConfig[baseApiName].secret
......
...@@ -118,3 +118,9 @@ export function defenceDetail(data) { ...@@ -118,3 +118,9 @@ export function defenceDetail(data) {
data.method = "dj.api.smartcarlife.inspection.defence.detail" data.method = "dj.api.smartcarlife.inspection.defence.detail"
return request(data, "post") return request(data, "post")
} }
/** 质检埋点*/
export function reportTrack(data) {
data.method = "clue.api.burial.point.record.batch.insert"
return request(data, "post")
}
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
:tree-props="{ children: 'upgradeGoodsList' }" :tree-props="{ children: 'upgradeGoodsList' }"
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
v-bind="$attrs" v-bind="$attrs"
v-scroll="scroll"
> >
<el-table-column <el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
...@@ -194,6 +195,16 @@ ...@@ -194,6 +195,16 @@
<script> <script>
import TableHeadSearch from "./TableHeadSearch" import TableHeadSearch from "./TableHeadSearch"
export default { export default {
directives: {
scroll: {
bind: function (el, binding) {
const ele = el.querySelector('.el-table__body-wrapper');
ele.addEventListener('scroll', function(e){
binding.value(e)
})
}
}
},
name: "D2Table", name: "D2Table",
data () { data () {
return { return {
...@@ -488,6 +499,7 @@ export default { ...@@ -488,6 +499,7 @@ export default {
this.getListApi this.getListApi
? this.refreshTable(false) ? this.refreshTable(false)
: this.$emit("refreshTable", this.page) : this.$emit("refreshTable", this.page)
this.$emit('pageChange', this.page)
}, },
// 页码 // 页码
...@@ -496,6 +508,7 @@ export default { ...@@ -496,6 +508,7 @@ export default {
this.getListApi this.getListApi
? this.refreshTable(false) ? this.refreshTable(false)
: this.$emit("refreshTable", this.page) : this.$emit("refreshTable", this.page)
this.$emit('pageChange', this.page)
}, },
// 重置请求 // 重置请求
resetRefreshTable () { resetRefreshTable () {
...@@ -507,6 +520,9 @@ export default { ...@@ -507,6 +520,9 @@ export default {
pageSize: 10, pageSize: 10,
currentPage: 1 currentPage: 1
} }
},
scroll(e){
this.$emit('scroll',e)
} }
} }
} }
......
import { Util } from "@/common/util"
export default {
data () {
return {
prePagePath: '',
track_timerFlag: false,
track_batchId: null,
track_page_view_flag: false,
track_timer_out: null
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.prePagePath = from.path
})
},
computed: {
loginAccount () {
return this.$store.state.d2admin.user.info.loginAccount
}
},
methods: {
setReportTrackData (eventType, eventCode = '', businessParam = '', batchId = '') {
let recordList = localStorage.getItem('recordList'),
route = this.$route,
{ loginAccout, uuid, userType } = this.loginAccount,
{ prePagePath } = this,
item = {
loginAccount: loginAccout,
uuid,
userType,
systemSource: 1,
eventTime: Util.dateFormate(Date.now(), "YYYY-MM-DD HH:mm:ss"),
eventType,
prePagePath: prePagePath || '/',
pagePath: route.path,
}
if (batchId) item.batchId = batchId
if (eventCode) item.eventCode = eventCode
if (businessParam) item.businessParam = JSON.stringify(businessParam)
if (!recordList) recordList = [item]
else {
recordList = JSON.parse(recordList)
recordList.push(item)
}
localStorage.setItem('recordList', JSON.stringify(recordList))
},
getRandomString (length = 30) {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
},
onPageShow () {
if (this.track_page_view_flag) return
if (!this.track_batchId) this.track_batchId = `DJ_${this.getRandomString()}_${Date.now()}`
this.track_timerFlag = true
this.track_page_view_flag = true
this.setBrowseTrackData()
},
onPageHide () {
this.track_timerFlag = false
this.track_batchId = null
this.track_page_view_flag = false
clearTimeout(this.track_timer_out)
this.track_timer_out = null
},
setBrowseTrackData () {
try {
if (!this.track_timerFlag) return
else this.track_timer_out = setTimeout(() => {
this.setBrowseTrackData()
}, 10e3)
this.setReportTrackData(2, this.track_event_code, this[this.track_businessParam_key], this.track_batchId)
} catch (error) {
console.log(error)
}
},
}
}
\ No newline at end of file \ No newline at end of file
import { reportTrack } from "@api/resident"
import reportTrackFunMixin from './reportTrackFunMixin'
function getRandomString (length = 10) {
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let result = '';
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}
export default {
mixins: [reportTrackFunMixin],
data () {
return {
timerFlag: false,
track_set_timer: null
}
},
beforeDestroy () {
window.removeEventListener('click', this.getTrackData)
this.timerFlag = false
clearTimeout(this.this.track_set_timer)
this.this.track_set_timer = null
},
mounted () {
window.addEventListener('click', this.getTrackData)
this.timerFlag = true
this.intervalRepoet()
},
methods: {
getTrackData (e) {
setTimeout(() => {
if (e.id == 'app') return
let target = e.target || e
if (target.dataset && Object.keys(target.dataset).length && target.dataset.eventCode) this.setReportTrackData(0, target.dataset.eventCode, JSON.parse(target.dataset.track))
else this.getTrackData(target.parentElement)
}, 100)
},
intervalRepoet () {
if (!this.timerFlag) return
this.track_set_timer = setTimeout(() => {
let recordList = localStorage.getItem('recordList')
if (recordList) {
reportTrack({
recordList: JSON.parse(recordList)
}).then(res => {
if (res) localStorage.removeItem('recordList')
})
}
if (this.timerFlag) this.intervalRepoet()
}, 60 * 1e3)
},
getRandomString: getRandomString
}
}
\ No newline at end of file \ No newline at end of file
import reportTrackFunMixin from './reportTrackFunMixin'
export default {
mixins: [reportTrackFunMixin],
methods: {
watchScrollTrack: _.throttle(function (e, eventCode) {
const {
id
} = this.detailObj
this.setReportTrackData(1, eventCode, {
batchId: id
})
}, 1e3)
}
}
\ No newline at end of file \ No newline at end of file
...@@ -130,8 +130,9 @@ import { getMerchantEmployeeList, updateRecordings, getAliOSSToken } from "@api/ ...@@ -130,8 +130,9 @@ import { getMerchantEmployeeList, updateRecordings, getAliOSSToken } from "@api/
import OSS from 'ali-oss' import OSS from 'ali-oss'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import { rangePickerOptions } from "@/common/format" import { rangePickerOptions } from "@/common/format"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
mixins: [reportTrackFunMixin],
name: 'VoiceDialog', name: 'VoiceDialog',
props: { props: {
visible: Boolean visible: Boolean
...@@ -260,6 +261,7 @@ export default { ...@@ -260,6 +261,7 @@ export default {
e.badgeId = badgeId e.badgeId = badgeId
e.recordingStartTime = dayjs(e.recordingStartTime).format('YYYY-MM-DD HH:mm:ss') e.recordingStartTime = dayjs(e.recordingStartTime).format('YYYY-MM-DD HH:mm:ss')
}) })
this.setReportTrackData(0,'upload_audio',{recordings})
console.log(recordings) console.log(recordings)
const res = await updateRecordings({ recordings }) const res = await updateRecordings({ recordings })
console.log(res) console.log(res)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="value">{{ item.value(defenceDetail) }}</div> <div class="value">{{ item.value(defenceDetail) }}</div>
</div> </div>
</div> </div>
<div class="dialog-box"> <div class="dialog-box" @scroll="watchScrollTrack($event,'offense_and_defense_detail')">
<div <div
class="dialog-item" class="dialog-item"
v-for="(item, index) in defenceDetail.detailList" v-for="(item, index) in defenceDetail.detailList"
...@@ -111,7 +111,9 @@ ...@@ -111,7 +111,9 @@
<script> <script>
import { defenceDetail } from "@api/resident" import { defenceDetail } from "@api/resident"
import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin'
export default { export default {
mixins: [watchScrollTrackMixin],
props: { props: {
detailObj: { detailObj: {
type: Object, type: Object,
......
...@@ -3,14 +3,36 @@ ...@@ -3,14 +3,36 @@
<div class="record-box"> <div class="record-box">
<div class="record"> <div class="record">
<audio id="audio1"> <audio id="audio1">
<source :src="detailObj.fileUrl" type="audio/mpeg" /> <source
<source :src="detailObj.fileUrl" type="audio/ogg" /> :src="detailObj.fileUrl"
type="audio/mpeg"
/>
<source
:src="detailObj.fileUrl"
type="audio/ogg"
/>
您的浏览器不支持 audio 标签。 您的浏览器不支持 audio 标签。
</audio> </audio>
<div class="play" v-if="isPlay" @click="handleAudio"> <div
class="play"
v-if="isPlay"
@click="handleAudio"
:data-track="JSON.stringify({
batchId:detailObj.id
})"
data-event-code="pause_audio"
>
<img src="@/assets/play.png" /> <img src="@/assets/play.png" />
</div> </div>
<div class="play" v-else @click="handleAudio"> <div
class="play"
v-else
@click="handleAudio"
:data-track="JSON.stringify({
batchId:detailObj.id
})"
data-event-code="play_audio"
>
<img src="@/assets/pause.png" /> <img src="@/assets/pause.png" />
</div> </div>
<div class="times">{{ currentTime }}/{{ totalTime }}</div> <div class="times">{{ currentTime }}/{{ totalTime }}</div>
...@@ -18,6 +40,11 @@ ...@@ -18,6 +40,11 @@
id="progressBar" id="progressBar"
@mousemove="isCircle = true" @mousemove="isCircle = true"
@mouseout="isCircle = false" @mouseout="isCircle = false"
:data-track="JSON.stringify({
batchId:detailObj.id,
mergedOffset:myAud.currentTime
})"
data-event-code="audio_progress_bar"
> >
<div id="progress"> <div id="progress">
<div <div
...@@ -28,22 +55,55 @@ ...@@ -28,22 +55,55 @@
></div> ></div>
</div> </div>
</div> </div>
<div class="trumpet" @click="handleMute"> <div
<img src="@/assets/trumpet.png" v-if="isMuted" /> class="trumpet"
<img src="@/assets/mute.png" v-if="!isMuted" /> @click="handleMute"
>
<img
src="@/assets/trumpet.png"
v-if="isMuted"
/>
<img
src="@/assets/mute.png"
v-if="!isMuted"
/>
</div> </div>
</div> </div>
<div class="copy-btn" @click="copyText"> <div
<img class="icon" src="@/assets/copy.png" /> class="copy-btn"
@click="copyText"
:data-track="JSON.stringify(copyTrack)"
data-event-code="audio_link"
>
<img
class="icon"
src="@/assets/copy.png"
/>
音频链接 音频链接
</div> </div>
</div> </div>
<div class="record-info" v-loading="loading"> <div
<el-tabs v-model="activeName"> class="record-info"
<el-tab-pane label="对话详情" name="dialog"> v-loading="loading"
>
<el-tabs
v-model="activeName"
@tab-click="tabClick"
:data-track="JSON.stringify({
batchId:detailObj.id
})"
:data-event-code="tabsEventCode"
>
<el-tab-pane
label="对话详情"
name="dialog"
>
<template v-if="!loading"> <template v-if="!loading">
<template v-if="dialogList.length"> <template v-if="dialogList.length">
<div class="dialog"> <div
class="dialog"
@scroll="watchScrollTrack($event,'dialogue_detail')"
>
<template v-for="item in dialogList"> <template v-for="item in dialogList">
<div <div
:class="{ :class="{
...@@ -51,6 +111,11 @@ ...@@ -51,6 +111,11 @@
'nth-child': item.role % 2 === 1 'nth-child': item.role % 2 === 1
}" }"
:key="item.id" :key="item.id"
:data-track="JSON.stringify({
batchId:detailObj.id,
mergedOffset:item.mergedOffset
})"
data-event-code="dialogue_detail_statement"
> >
<div class="name"> <div class="name">
<img <img
...@@ -80,9 +145,15 @@ ...@@ -80,9 +145,15 @@
</template> </template>
</template> </template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="对话摘要" name="abstract"> <el-tab-pane
label="对话摘要"
name="abstract"
>
<template v-if="detailObj.digest"> <template v-if="detailObj.digest">
<div class="abstract" v-html="formatSrt(detailObj.digest)"></div> <div
class="abstract"
v-html="formatSrt(detailObj.digest)"
></div>
</template> </template>
<template v-else> <template v-else>
<empty /> <empty />
...@@ -96,7 +167,9 @@ ...@@ -96,7 +167,9 @@
<script> <script>
import { conversationDetailPage, getPointCategory } from "@api/resident" import { conversationDetailPage, getPointCategory } from "@api/resident"
import Empty from "./Empty" import Empty from "./Empty"
import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin'
export default { export default {
mixins: [watchScrollTrackMixin],
components: { Empty }, components: { Empty },
props: { props: {
detailObj: { detailObj: {
...@@ -104,7 +177,7 @@ export default { ...@@ -104,7 +177,7 @@ export default {
default: {} default: {}
} }
}, },
data() { data () {
return { return {
myAud: "", myAud: "",
isPlay: true, isPlay: true,
...@@ -114,10 +187,12 @@ export default { ...@@ -114,10 +187,12 @@ export default {
currentTime: "00:00", currentTime: "00:00",
isCircle: false, isCircle: false,
activeName: "dialog", activeName: "dialog",
loading: true loading: true,
copyTrack: {},
tabsEventCode: ''
} }
}, },
mounted() { mounted () {
this.conversationDetailPage() this.conversationDetailPage()
this.myAud = document.getElementById("audio1") this.myAud = document.getElementById("audio1")
...@@ -128,13 +203,13 @@ export default { ...@@ -128,13 +203,13 @@ export default {
}) })
}, },
methods: { methods: {
formatSrt(str) { formatSrt (str) {
return str?.replace(/\n/g, "<br/>") || "" return str?.replace(/\n/g, "<br/>") || ""
}, },
currentDialog(time) { currentDialog (time) {
this.myAud.currentTime = time this.myAud.currentTime = time
}, },
toMinutesAndSeconds(seconds) { toMinutesAndSeconds (seconds) {
let minutes = Math.floor(seconds / 60) let minutes = Math.floor(seconds / 60)
let remainingSeconds = parseInt(seconds % 60) let remainingSeconds = parseInt(seconds % 60)
minutes = minutes > 9 ? minutes : `0${minutes}` minutes = minutes > 9 ? minutes : `0${minutes}`
...@@ -142,7 +217,7 @@ export default { ...@@ -142,7 +217,7 @@ export default {
remainingSeconds > 9 ? remainingSeconds : `0${remainingSeconds}` remainingSeconds > 9 ? remainingSeconds : `0${remainingSeconds}`
return `${minutes}:${remainingSeconds}` return `${minutes}:${remainingSeconds}`
}, },
handleprogress() { handleprogress () {
const progress = document.getElementById("progress") const progress = document.getElementById("progress")
const progressBar = document.getElementById("progressBar") const progressBar = document.getElementById("progressBar")
this.myAud.addEventListener("canplay", () => { this.myAud.addEventListener("canplay", () => {
...@@ -183,7 +258,7 @@ export default { ...@@ -183,7 +258,7 @@ export default {
false false
) )
}, },
handleAudio() { handleAudio () {
this.isPlay = !this.isPlay this.isPlay = !this.isPlay
if (!this.isPlay) { if (!this.isPlay) {
this.myAud.play() this.myAud.play()
...@@ -191,11 +266,11 @@ export default { ...@@ -191,11 +266,11 @@ export default {
this.myAud.pause() this.myAud.pause()
} }
}, },
handleMute() { handleMute () {
this.isMuted = !this.isMuted this.isMuted = !this.isMuted
this.myAud.muted = !this.isMuted this.myAud.muted = !this.isMuted
}, },
async conversationDetailPage() { async conversationDetailPage () {
try { try {
this.loading = true this.loading = true
const res = await conversationDetailPage({ const res = await conversationDetailPage({
...@@ -209,13 +284,13 @@ export default { ...@@ -209,13 +284,13 @@ export default {
this.loading = false this.loading = false
} }
}, },
copyText() { copyText () {
const { detailObj } = this, const { detailObj } = this,
receptionStatus = { receptionStatus = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
}[detailObj.receptionStatus], }[detailObj.receptionStatus],
{ customerName, startTime, duration, fileUrl } = detailObj { customerName, startTime, duration, fileUrl, id } = detailObj
// 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址 // 客户姓名 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址
let text = [ let text = [
customerName, customerName,
...@@ -224,6 +299,10 @@ export default { ...@@ -224,6 +299,10 @@ export default {
receptionStatus, receptionStatus,
fileUrl fileUrl
].join(" - ") ].join(" - ")
this.copyTrack = {
context: text,
batchId: id
}
var textarea = document.createElement("textarea") var textarea = document.createElement("textarea")
textarea.style.position = "fixed" textarea.style.position = "fixed"
textarea.style.opacity = 0 textarea.style.opacity = 0
...@@ -234,7 +313,7 @@ export default { ...@@ -234,7 +313,7 @@ export default {
document.body.removeChild(textarea) document.body.removeChild(textarea)
this.$message.success("已复制到剪切板") this.$message.success("已复制到剪切板")
}, },
formatTime(seconds) { formatTime (seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) return seconds + "秒" if (seconds < 60) return seconds + "秒"
...@@ -247,6 +326,10 @@ export default { ...@@ -247,6 +326,10 @@ export default {
if (remainingSeconds > 0) formattedTime += remainingSeconds + "秒" if (remainingSeconds > 0) formattedTime += remainingSeconds + "秒"
return formattedTime return formattedTime
} }
},
tabClick (e) {
let { index } = e
this.tabsEventCode = ['dialogue_detail', 'dialogue_digest'][index]
} }
} }
} }
......
<template> <template>
<div class="analyse" v-loading="loading"> <div
<el-tabs v-model="activeName"> class="analyse"
<el-tab-pane label="质检明细" name="first"></el-tab-pane> v-loading="loading"
<el-tab-pane label="攻防明细" name="second"></el-tab-pane> >
<el-tab-pane label="开口明细" name="third"></el-tab-pane> <el-tabs
v-model="activeName"
@tab-click="tabClick"
:data-track="JSON.stringify({
batchId:detailObj.id
})"
:data-event-code="tabsEventCode"
>
<el-tab-pane
label="质检明细"
name="first"
></el-tab-pane>
<el-tab-pane
label="攻防明细"
name="second"
></el-tab-pane>
<el-tab-pane
label="开口明细"
name="third"
></el-tab-pane>
</el-tabs> </el-tabs>
<template v-if="activeName === 'first'"> <template v-if="activeName === 'first'">
<d2-search <d2-search
...@@ -50,16 +69,31 @@ ...@@ -50,16 +69,31 @@
></el-input-range> ></el-input-range>
</template> </template>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button
@click="handleSearch"
size="small"
type="primary"
:data-track="JSON.stringify(searchForm)"
data-event-code="quality_inspection_search"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
:data-track="JSON.stringify(searchForm)"
data-event-code="quality_inspection_search"
> 重置 </el-button>
</div> </div>
</d2-search> </d2-search>
<div class="theader"> <div class="theader">
<div class="title">话术列表</div> <div class="title">话术列表</div>
<el-radio-group v-model="searchForm.hitResult" size="small"> <el-radio-group
v-model="searchForm.hitResult"
size="small"
@input="radioReport"
>
<el-radio-button label="">全部</el-radio-button> <el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">命中</el-radio-button> <el-radio-button label="1">命中</el-radio-button>
<el-radio-button label="0">未命中</el-radio-button> <el-radio-button label="0">未命中</el-radio-button>
...@@ -78,25 +112,41 @@ ...@@ -78,25 +112,41 @@
noDataText="数据分析中,请稍等…" noDataText="数据分析中,请稍等…"
:noDataImg="noDataImg" :noDataImg="noDataImg"
height="100%" height="100%"
@scroll="watchScrollTrack($event,'verbal_trick_list')"
>
<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 }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<template slot="suggestions" slot-scope="scope"> <template
slot="suggestions"
slot-scope="scope"
>
<el-tooltip <el-tooltip
v-if="scope.scope.suggestions" v-if="scope.scope.suggestions"
effect="light" effect="light"
placement="top" placement="top"
> >
<div slot="content" v-html="scope.scope.suggestions"></div> <div
<div class="two-line" v-html="scope.scope.suggestions"></div> slot="content"
v-html="scope.scope.suggestions"
></div>
<div
class="two-line"
v-html="scope.scope.suggestions"
></div>
</el-tooltip> </el-tooltip>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
<template slot="hitText" slot-scope="scope"> <template
slot="hitText"
slot-scope="scope"
>
<div v-if="!scope.scope.score">--</div> <div v-if="!scope.scope.score">--</div>
<template v-else> <template v-else>
<el-tooltip <el-tooltip
...@@ -104,14 +154,23 @@ ...@@ -104,14 +154,23 @@
effect="light" effect="light"
placement="top" placement="top"
> >
<div slot="content" v-html="scope.scope.hitText"></div> <div
slot="content"
v-html="scope.scope.hitText"
></div>
<div class="two-line" v-html="scope.scope.hitText"></div> <div
class="two-line"
v-html="scope.scope.hitText"
></div>
</el-tooltip> </el-tooltip>
<div v-else>--</div> <div v-else>--</div>
</template> </template>
</template> </template>
<template slot="hitResult" slot-scope="scope"> <template
slot="hitResult"
slot-scope="scope"
>
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']"> <div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
{{ scope.scope.hitResult == 1 ? "是" : "否" }} {{ scope.scope.hitResult == 1 ? "是" : "否" }}
</div> </div>
...@@ -141,7 +200,10 @@ ...@@ -141,7 +200,10 @@
{{ scope.scope.mentionedTime }} {{ scope.scope.mentionedTime }}
<img src="@/assets/open-time.png" /> <img src="@/assets/open-time.png" />
</div> </div>
<template slot="mentionedContext" slot-scope="scope"> <template
slot="mentionedContext"
slot-scope="scope"
>
<el-tooltip <el-tooltip
v-if="scope.scope.mentionedContext" v-if="scope.scope.mentionedContext"
effect="light" effect="light"
...@@ -166,7 +228,9 @@ import { ...@@ -166,7 +228,9 @@ import {
} from "@api/resident" } from "@api/resident"
import noDataImg from "@/assets/empty-2.png" import noDataImg from "@/assets/empty-2.png"
import AttackDetail from "./attackDetail" import AttackDetail from "./attackDetail"
import watchScrollTrackMixin from '@/mixins/watchScrollTrackMixin'
export default { export default {
mixins: [watchScrollTrackMixin],
components: { components: {
ElInputRange, ElInputRange,
AttackDetail AttackDetail
...@@ -177,7 +241,7 @@ export default { ...@@ -177,7 +241,7 @@ export default {
default: {} default: {}
} }
}, },
data() { data () {
return { return {
activeName: "first", activeName: "first",
noDataImg, noDataImg,
...@@ -274,27 +338,28 @@ export default { ...@@ -274,27 +338,28 @@ export default {
firstClassifyList: [], firstClassifyList: [],
secondClassifyList: [] secondClassifyList: []
}, },
loading: true loading: true,
tabsEventCode: ''
} }
}, },
watch: { watch: {
"searchForm.hitResult"() { "searchForm.hitResult" () {
this.getList() this.getList()
} }
}, },
mounted() { mounted () {
this.$refs.analyseTable.tableHeightValues = "100%" this.$refs.analyseTable.tableHeightValues = "100%"
// this.getPointCategory() // this.getPointCategory()
this.getList() this.getList()
this.findAxbByBatchId() this.findAxbByBatchId()
}, },
methods: { methods: {
setAudioTime(val) { setAudioTime (val) {
const time = this.formatTime(val) const time = this.formatTime(val)
console.log(time) console.log(time)
this.$EventBus.$emit("setAudioTime", time) this.$EventBus.$emit("setAudioTime", time)
}, },
formatTime(time) { formatTime (time) {
const arr = time.split(":") const arr = time.split(":")
let second = let second =
arr.length == 3 arr.length == 3
...@@ -302,12 +367,12 @@ export default { ...@@ -302,12 +367,12 @@ export default {
: arr[0] * 60 + arr[1] * 1 : arr[0] * 60 + arr[1] * 1
return second return second
}, },
findAxbByBatchId() { findAxbByBatchId () {
findAxbByBatchId({ batchId: this.detailObj.id }).then((res) => { findAxbByBatchId({ batchId: this.detailObj.id }).then((res) => {
this.analyseOpen = res || [] this.analyseOpen = res || []
}) })
}, },
async getList() { async getList () {
this.loading = true this.loading = true
try { try {
await this.beforeSearchFn() await this.beforeSearchFn()
...@@ -332,10 +397,10 @@ export default { ...@@ -332,10 +397,10 @@ export default {
this.loading = false this.loading = false
} }
}, },
formatSrt(str) { formatSrt (str) {
return str?.replace(/\n/g, "<br/>") || "" return str?.replace(/\n/g, "<br/>") || ""
}, },
getPointCategory() { getPointCategory () {
this.classifyMap = new Map() this.classifyMap = new Map()
getPointCategory().then((res) => { getPointCategory().then((res) => {
console.log(res) console.log(res)
...@@ -345,13 +410,13 @@ export default { ...@@ -345,13 +410,13 @@ export default {
} }
}) })
}, },
changeClassify() { changeClassify () {
this.searchForm.secondClassify = "" this.searchForm.secondClassify = ""
this.baseData.secondClassifyList = this.classifyMap.get( this.baseData.secondClassifyList = this.classifyMap.get(
this.searchForm.firstClassify this.searchForm.firstClassify
) )
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.batchId = this.detailObj.id this.searchFormSearch.batchId = this.detailObj.id
...@@ -367,10 +432,10 @@ export default { ...@@ -367,10 +432,10 @@ export default {
resolve() resolve()
}) })
}, },
handleSearch() { handleSearch () {
this.getList() this.getList()
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
// firstClassify: "", // firstClassify: "",
// secondClassify: "", // secondClassify: "",
...@@ -381,12 +446,12 @@ export default { ...@@ -381,12 +446,12 @@ export default {
this.getList() this.getList()
}, },
// 初始化合并行数组 // 初始化合并行数组
mergeInit() { mergeInit () {
this.spanArr1 = [] // this.spanArr1 = [] //
this.spanIndex1 = 0 // this.spanIndex1 = 0 //
}, },
// 合并表格 // 合并表格
merge(data) { merge (data) {
this.mergeInit() this.mergeInit()
if (data.length > 0) { if (data.length > 0) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
...@@ -407,7 +472,7 @@ export default { ...@@ -407,7 +472,7 @@ export default {
} }
}, },
// 合并单元格 // 合并单元格
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod ({ row, column, rowIndex, columnIndex }) {
const len = this.analyseList.length const len = this.analyseList.length
if (columnIndex === 0) { if (columnIndex === 0) {
...@@ -424,6 +489,19 @@ export default { ...@@ -424,6 +489,19 @@ export default {
colspan: 1 colspan: 1
} }
} }
},
tabClick (e) {
let { index } = e
this.tabsEventCode = ['quality_inspection_detail', 'offense_and_defense_detail', 'safety_bag'][index]
},
radioReport (e) {
console.log(e)
if (e > -1) this.setReportTrackData(0, {
1: 'hit',
0: 'miss'
}[e], JSON.stringify({
batchId: this.detailObj.id
}))
} }
} }
} }
......
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
<template v-if="qualityDetailList.length"> <template v-if="qualityDetailList.length">
<div class="overview"> <div class="overview">
<template v-for="(i, index) in overviewObject"> <template v-for="(i, index) in overviewObject">
<div :key="index" class="overview-item"> <div
:key="index"
class="overview-item"
>
<div class="label">{{ i.label }}</div> <div class="label">{{ i.label }}</div>
<div class="value"> <div class="value">
<template v-if="i.formatter"> <template v-if="i.formatter">
<div <div v-html="i.formatter(qualityDetailList[currentNum])"></div>
v-html="i.formatter(qualityDetailList[currentNum])"
></div>
</template> </template>
<template v-else> <template v-else>
{{ qualityDetailList[currentNum][i.key] || "-" }} {{ qualityDetailList[currentNum][i.key] || "-" }}
...@@ -30,7 +31,10 @@ ...@@ -30,7 +31,10 @@
</template> </template>
</div> </div>
<div class="content" :key="currentNum"> <div
class="content"
:key="currentNum"
>
<div class="dialogue-box"> <div class="dialogue-box">
<dialogue-detail :detailObj="qualityDetailList[currentNum]" /> <dialogue-detail :detailObj="qualityDetailList[currentNum]" />
</div> </div>
...@@ -44,8 +48,11 @@ ...@@ -44,8 +48,11 @@
size="small" size="small"
:class="{ opacity: currentNum == 0 }" :class="{ opacity: currentNum == 0 }"
@click="jump(-1)" @click="jump(-1)"
>上一条</el-button :data-track="JSON.stringify({
> batchId:qualityDetailList[currentNum].id
})"
data-event-code="previous"
>上一条</el-button>
<div class="text"> <div class="text">
{{ currentNum + 1 }}/{{ qualityDetailList.length }} {{ currentNum + 1 }}/{{ qualityDetailList.length }}
</div> </div>
...@@ -54,8 +61,11 @@ ...@@ -54,8 +61,11 @@
size="small" size="small"
:class="{ opacity: currentNum == qualityDetailList.length - 1 }" :class="{ opacity: currentNum == qualityDetailList.length - 1 }"
@click="jump(1)" @click="jump(1)"
>下一条</el-button :data-track="JSON.stringify({
> batchId:qualityDetailList[currentNum].id
})"
data-event-code="next"
>下一条</el-button>
</div> </div>
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -90,13 +100,15 @@ const toMinutesAndSeconds = (seconds) => { ...@@ -90,13 +100,15 @@ const toMinutesAndSeconds = (seconds) => {
return formattedTime return formattedTime
} }
} }
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
mixins: [reportTrackFunMixin],
name: "RelatActivityOrderDialog", name: "RelatActivityOrderDialog",
components: { components: {
QualityAnalyse, QualityAnalyse,
DialogueDetail DialogueDetail
}, },
data() { data () {
return { return {
overviewObject: [ overviewObject: [
{ {
...@@ -110,14 +122,14 @@ export default { ...@@ -110,14 +122,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
key: "bussinessType", key: "bussinessType",
formatter(row) { formatter (row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter(row) { formatter (row) {
// if (row.bussinessType == 2) return "-" // if (row.bussinessType == 2) return "-"
const val = { const val = {
1: "成交", 1: "成交",
...@@ -127,28 +139,26 @@ export default { ...@@ -127,28 +139,26 @@ export default {
1: "#2CCA74", 1: "#2CCA74",
0: "#EB4E4E" 0: "#EB4E4E"
}[row.receptionStatus] }[row.receptionStatus]
return `<span style="font-size:20px;color:${color}">${ return `<span style="font-size:20px;color:${color}">${val || "-"
val || "-"
}</span>` }</span>`
} }
}, },
{ {
label: "预计营销结果", label: "预计营销结果",
formatter(row) { formatter (row) {
if (row.bussinessType == 2) return "-" if (row.bussinessType == 2) return "-"
const color = const color =
{ {
成交: "#2CCA74", 成交: "#2CCA74",
战败: "#EB4E4E" 战败: "#EB4E4E"
}[row.estimatedResult] || "#999999" }[row.estimatedResult] || "#999999"
return `<span style="font-size:20px;color:${color}">${ return `<span style="font-size:20px;color:${color}">${row.estimatedResult || "分析中"
row.estimatedResult || "分析中"
}</span>` }</span>`
} }
}, },
{ {
label: "质检得分", label: "质检得分",
formatter(row) { formatter (row) {
if (row.bussinessType == 2) return "-" if (row.bussinessType == 2) return "-"
return row.score != null return row.score != null
? `<div class="num">${row.score}<span class="unit">分</span></div>` ? `<div class="num">${row.score}<span class="unit">分</span></div>`
...@@ -157,10 +167,10 @@ export default { ...@@ -157,10 +167,10 @@ export default {
}, },
{ {
label: "攻防得分", label: "攻防得分",
formatter(row) { formatter (row) {
return row.defence === 2 return row.defence === 2
? `<div class="num">${row.defencePoint}<span class="unit">分</span></div>` ? `<div class="num">${row.defencePoint}<span class="unit">分</span></div>`
: row.defence === 1||row.defence === 0||row.defence === 4 : row.defence === 1 || row.defence === 0 || row.defence === 4
? `<span style="font-size:22px;color:#999">分析中</span>` ? `<span style="font-size:22px;color:#999">分析中</span>`
: row.defence === 3 : row.defence === 3
? `<span style="font-size:22px;color:#999">未发现攻防</span>` ? `<span style="font-size:22px;color:#999">未发现攻防</span>`
...@@ -168,7 +178,12 @@ export default { ...@@ -168,7 +178,12 @@ export default {
} }
} }
], ],
activeName: "analyse" activeName: "analyse",
track_event_code: 'reception_detail',
track_businessParam_key: 'searchForm',
searchForm: {
batchId: ""
}
} }
}, },
...@@ -186,20 +201,32 @@ export default { ...@@ -186,20 +201,32 @@ export default {
default: () => [] default: () => []
} }
}, },
watch: {
currentNum: {
handler (val) {
this.searchForm.batchId = this.qualityDetailList[val].id
this.onPageShow()
},
immediate: true
}
},
computed: {}, computed: {},
mounted() {}, mounted () {
console.log(this.qualityDetailList[this.currentNum])
},
methods: { methods: {
handleClose() { handleClose () {
this.$emit("closeDialog", false) this.$emit("closeDialog", false)
this.onPageHide()
}, },
jump(num) { jump (num) {
try { try {
const { qualityDetailList, currentNum } = this, const { qualityDetailList, currentNum } = this,
max = qualityDetailList.length - 1 max = qualityDetailList.length - 1
if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1)) if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1))
throw "无更多接待记录" throw "无更多接待记录"
this.onPageHide()
this.currentNum += num this.currentNum += num
} catch (error) { } catch (error) {
if (error) this.$message.error(error) if (error) this.$message.error(error)
......
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span <span>{{ queryData.employeeName || "-" }}
>{{ queryData.employeeName || "-" }} {{ queryData.phoneNumber || "" }}</span>
{{ queryData.phoneNumber || "" }}</span
>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
...@@ -67,10 +65,21 @@ ...@@ -67,10 +65,21 @@
</template> </template>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button
@click="handleSearch"
size="small"
type="primary"
:data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search"
>
查询 查询
</el-button> </el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button> <el-button
size="small"
@click="handleReset"
:data-track="JSON.stringify(searchForm)"
data-event-code="reception_list_search"
> 重置 </el-button>
</div> </div>
<div class="content-table"> <div class="content-table">
<d2-table <d2-table
...@@ -81,14 +90,21 @@ ...@@ -81,14 +90,21 @@
:table-params="tableParams" :table-params="tableParams"
:before-search-fn="beforeSearchFn" :before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@pageChange="pageChange"
>
<div
slot="durationHtml"
slot-scope="scope"
> >
<div slot="durationHtml" slot-scope="scope">
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div slot="scoreHtml" slot-scope="scope"> <div
slot="scoreHtml"
slot-scope="scope"
>
<template v-if="scope.scope.bussinessType != 2"> <template v-if="scope.scope.bussinessType != 2">
<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 }}
...@@ -97,7 +113,10 @@ ...@@ -97,7 +113,10 @@
</template> </template>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<div slot="estimatedResult" slot-scope="scope"> <div
slot="estimatedResult"
slot-scope="scope"
>
<div <div
v-if="scope.scope.bussinessType != 2" v-if="scope.scope.bussinessType != 2"
:class="['tag', setTagColor(scope.scope.estimatedResult)]" :class="['tag', setTagColor(scope.scope.estimatedResult)]"
...@@ -106,42 +125,48 @@ ...@@ -106,42 +125,48 @@
</div> </div>
<div v-else></div> <div v-else></div>
</div> </div>
<div slot="defencePoint" slot-scope="scope"> <div
slot="defencePoint"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint ? scope.scope.defencePoint : "-" scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template> }}</template>
<template <template v-else-if="
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
" ">分析中</template>
>分析中</template <template v-else-if="scope.scope.defence === 3">未发现攻防</template>
>
<template v-else-if="scope.scope.defence === 3"
>未发现攻防</template
>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<div slot="customerTypeName" slot-scope="scope"> <div
slot="customerTypeName"
slot-scope="scope"
>
<template v-if="scope.scope.defence === 2">{{ <template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName scope.scope.customerTypeName
? scope.scope.customerTypeName ? scope.scope.customerTypeName
: "-" : "-"
}}</template> }}</template>
<template <template v-else-if="
v-else-if="
scope.scope.defence === 1 || scope.scope.defence === 1 ||
scope.scope.defence === 0 || scope.scope.defence === 0 ||
scope.scope.defence === 4 scope.scope.defence === 4
" ">分析中</template>
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template> <template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template> <template v-else>-</template>
</div> </div>
<template slot="auth-button" slot-scope="scope"> <template
<el-button type="text" @click="qualitDetail(scope.scope)"> slot="auth-button"
slot-scope="scope"
>
<el-button
type="text"
@click="qualitDetail(scope.scope)"
:data-track="JSON.stringify(scope.scope)"
data-event-code="reception_detail"
>
接待详情 接待详情
</el-button> </el-button>
</template> </template>
...@@ -163,11 +188,14 @@ import { Util, deepClone } from "@/common/util" ...@@ -163,11 +188,14 @@ import { Util, deepClone } from "@/common/util"
import ElInputRange from "../el-input-range" import ElInputRange from "../el-input-range"
import QualityDetail from "./qualityDetail.vue" import QualityDetail from "./qualityDetail.vue"
import { conversationPage } from "@api/resident" import { conversationPage } from "@api/resident"
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export default { export default {
mixins: [reportTrackFunMixin],
props: { props: {
queryData: Object queryData: Object,
show: Boolean
}, },
data() { data () {
return { return {
isQualityVisible: false, isQualityVisible: false,
searchForm: { searchForm: {
...@@ -220,14 +248,14 @@ export default { ...@@ -220,14 +248,14 @@ export default {
{ {
label: "业务场景", label: "业务场景",
prop: "bussinessType", prop: "bussinessType",
formatter(row) { formatter (row) {
let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType] let result = { 1: "会员权益/升级", 2: "轻改" }[row.bussinessType]
return result || "-" return result || "-"
} }
}, },
{ {
label: "APP接待结果", label: "APP接待结果",
formatter(row) { formatter (row) {
let result = { let result = {
1: "成交", 1: "成交",
0: "战败" 0: "战败"
...@@ -264,7 +292,7 @@ export default { ...@@ -264,7 +292,7 @@ export default {
label: "安心包是否开口", label: "安心包是否开口",
prop: "axbOpenFlag", prop: "axbOpenFlag",
width: 130, width: 130,
formatter(row) { formatter (row) {
return row.axbOpenFlag ? "是" : "否" return row.axbOpenFlag ? "是" : "否"
} }
}, },
...@@ -272,7 +300,7 @@ export default { ...@@ -272,7 +300,7 @@ export default {
label: "安心包是否成交", label: "安心包是否成交",
prop: "isFinishFlag", prop: "isFinishFlag",
width: 130, width: 130,
formatter(row) { formatter (row) {
return row.finishFlag ? "是" : "否" return row.finishFlag ? "是" : "否"
} }
}, },
...@@ -304,14 +332,25 @@ export default { ...@@ -304,14 +332,25 @@ export default {
}, },
qualityDetailList: [], qualityDetailList: [],
currentNum: 0, currentNum: 0,
batchNum: null batchNum: null,
track_event_code: 'reception_detail_list',
track_businessParam_key: 'searchForm'
} }
}, },
components: { components: {
ElInputRange, ElInputRange,
QualityDetail QualityDetail
}, },
mounted() { watch: {
show: {
handler (val) {
if (val) this.onPageShow()
else this.onPageHide()
},
immediate: true
}
},
mounted () {
this.getOptionsList() this.getOptionsList()
let timer = setInterval(() => { let timer = setInterval(() => {
if (timer && this.batchNum != null) { if (timer && this.batchNum != null) {
...@@ -323,7 +362,7 @@ export default { ...@@ -323,7 +362,7 @@ export default {
}, 1e3) }, 1e3)
}, },
methods: { methods: {
toMinutesAndSeconds(seconds) { toMinutesAndSeconds (seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = "" let formattedTime = ""
if (seconds < 60) { if (seconds < 60) {
...@@ -344,10 +383,10 @@ export default { ...@@ -344,10 +383,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch() { handleSearch () {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -355,17 +394,19 @@ export default { ...@@ -355,17 +394,19 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog() { closeDialog () {
this.isQualityVisible = false this.isQualityVisible = false
this.onPageShow()
}, },
qualitDetail(row) { qualitDetail (row) {
const list = this.$refs.recepDetail.data, const list = this.$refs.recepDetail.data,
currentNum = list.findIndex((e) => e.id == row.id) currentNum = list.findIndex((e) => e.id == row.id)
this.currentNum = currentNum this.currentNum = currentNum
this.qualityDetailList = list this.qualityDetailList = list
this.isQualityVisible = true this.isQualityVisible = true
this.onPageHide()
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise((resolve) => { return new Promise((resolve) => {
const { queryData } = this const { queryData } = this
if (!this.searchForm.recepTime.length) if (!this.searchForm.recepTime.length)
...@@ -408,13 +449,13 @@ export default { ...@@ -408,13 +449,13 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun(data) { setTableFinishFun (data) {
let { page } = this.$refs.recepDetail let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1) data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
} }
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === "select") { if (item.type === "select") {
if ( if (
...@@ -436,7 +477,7 @@ export default { ...@@ -436,7 +477,7 @@ export default {
} }
}) })
}, },
setTagColor(estimatedResult) { setTagColor (estimatedResult) {
switch (estimatedResult) { switch (estimatedResult) {
case "成交": case "成交":
return "greenBg" return "greenBg"
...@@ -445,6 +486,13 @@ export default { ...@@ -445,6 +486,13 @@ export default {
default: default:
return "grayBg" return "grayBg"
} }
},
pageChange (page) {
let { searchForm } = this
this.setReportTrackData(0, 'reception_list_page', {
...searchForm,
...page
})
} }
} }
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{{ i.text }} {{ i.text }}
<div <div
class="close" class="close"
@click.stop="close(index)" @click.stop="close(index, i.id)"
> >
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</div> </div>
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<quality-index <quality-index
v-show="windowId == -1" v-show="windowId == -1"
@openWindow="openWindow" @openWindow="openWindow"
:show="windowId == -1"
/> />
<template v-for="i in [...tab, ...dropdownList]"> <template v-for="i in [...tab, ...dropdownList]">
<recep-detail <recep-detail
...@@ -71,6 +72,7 @@ ...@@ -71,6 +72,7 @@
:key="i.id" :key="i.id"
v-show="windowId == i.id" v-show="windowId == i.id"
:queryData="i.data" :queryData="i.data"
:show="windowId == i.id"
/> />
</template> </template>
</div> </div>
...@@ -80,7 +82,9 @@ ...@@ -80,7 +82,9 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import qualityIndex from "./components/qualityIndex" import qualityIndex from "./components/qualityIndex"
import recepDetail from "./components/recepDetail.vue" import recepDetail from "./components/recepDetail.vue"
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export default { export default {
mixins: [reportTrackPageMixin],
name: "", name: "",
components: { components: {
qualityIndex, qualityIndex,
...@@ -91,9 +95,10 @@ export default { ...@@ -91,9 +95,10 @@ export default {
tab: [], tab: [],
dropdownList: [], dropdownList: [],
windowId: -1, windowId: -1,
tabboxWidth: 0 tabboxWidth: 0,
} }
}, },
// 在beforeDestroy钩子中移除事件监听 // 在beforeDestroy钩子中移除事件监听
beforeDestroy () { beforeDestroy () {
window.removeEventListener('popstate', this.preventBack) window.removeEventListener('popstate', this.preventBack)
...@@ -114,7 +119,7 @@ export default { ...@@ -114,7 +119,7 @@ export default {
} else this.$router.go(-1) } else this.$router.go(-1)
}, },
openWindow (data) { openWindow (data) {
let id = `${data.searchdate}_${data.phoneNumber}_${data.merchantNo}`, let id = `${data.searchdate}_${data.phoneNumber}_${data.merchantNo}}`,
windowList = [...this.tab, ...this.dropdownList], windowList = [...this.tab, ...this.dropdownList],
windowItem = windowList.find((e) => e.id == id) windowItem = windowList.find((e) => e.id == id)
if (windowItem) return this.windowId = id if (windowItem) return this.windowId = id
...@@ -131,7 +136,8 @@ export default { ...@@ -131,7 +136,8 @@ export default {
} }
this.windowId = id this.windowId = id
}, },
close (index) { close (index, id) {
this.$refs[`recep-${id}`][0].onPageHide()
this.tab.splice(index, 1) this.tab.splice(index, 1)
if (this.dropdownList.length) { if (this.dropdownList.length) {
this.tab.push(this.dropdownList[0]) this.tab.push(this.dropdownList[0])
...@@ -146,6 +152,7 @@ export default { ...@@ -146,6 +152,7 @@ export default {
checkEl () { checkEl () {
let { tab, tabboxWidth } = this, let { tab, tabboxWidth } = this,
len = tab.length - 1 len = tab.length - 1
if (len == -1) return
this.$nextTick(() => { this.$nextTick(() => {
let [el] = this.$refs[`tab-${len}`] let [el] = this.$refs[`tab-${len}`]
if (el) { if (el) {
...@@ -156,7 +163,8 @@ export default { ...@@ -156,7 +163,8 @@ export default {
} }
} }
}) })
} },
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!