Commit 6a3510d0 by xinla

--no commit message

1 parent e870aa5b
...@@ -9,6 +9,10 @@ export default { ...@@ -9,6 +9,10 @@ export default {
type: String, type: String,
default: '' default: ''
} }
// trackUsers: {
// type: Array,
// default: ''
// }
}, },
components: { components: {
record record
...@@ -105,7 +109,8 @@ export default { ...@@ -105,7 +109,8 @@ export default {
:key="index" :key="index"
:class="['flex', index && 'mt20']" :class="['flex', index && 'mt20']"
> >
<div class="name oe">{{ item.userName }}</div> <!-- 汇总的场景显示名字 -->
<div v-if="!userId" class="name oe">{{ item.userName }}</div>
: :
<template v-if="item.tagNames"> <template v-if="item.tagNames">
<el-tag <el-tag
...@@ -133,7 +138,8 @@ export default { ...@@ -133,7 +138,8 @@ export default {
:key="index" :key="index"
:class="['flex', index && 'mt20']" :class="['flex', index && 'mt20']"
> >
<div class="name oe">{{ item.userName }}</div> <!-- 汇总的场景显示名字 -->
<div v-if="!userId" class="name oe">{{ item.userName }}</div>
: :
<template v-if="item.tagNames"> <template v-if="item.tagNames">
<el-tag <el-tag
...@@ -157,7 +163,8 @@ export default { ...@@ -157,7 +163,8 @@ export default {
<div slot="header" class="card-title">跟进状态</div> <div slot="header" class="card-title">跟进状态</div>
<template v-if="portrayalSum.trackStates && portrayalSum.trackStates.length"> <template v-if="portrayalSum.trackStates && portrayalSum.trackStates.length">
<div class="flex mb20" v-for="(item, index) of portrayalSum.trackStates" :key="index"> <div class="flex mb20" v-for="(item, index) of portrayalSum.trackStates" :key="index">
<div class="name oe">{{ item.userName }}</div> <!-- 汇总的场景显示名字 -->
<div class="name oe" v-if="!userId">{{ item.userName }}</div>
: :
<template v-if="item.trackStateList.length"> <template v-if="item.trackStateList.length">
<el-steps <el-steps
...@@ -183,19 +190,22 @@ export default { ...@@ -183,19 +190,22 @@ export default {
<el-card shadow="never"> <el-card shadow="never">
<div slot="header" class="card-title">跟进记录</div> <div slot="header" class="card-title">跟进记录</div>
<!-- 单个人的场景 -->
<record v-if="userId" :userId="userId" viewType="1"></record>
<!-- 汇总的场景 -->
<el-tabs <el-tabs
v-if="portrayalSum.trackStates && portrayalSum.trackStates.length" v-else-if="portrayalSum.trackUsers && portrayalSum.trackUsers.length"
value="0" value="0"
@tab-click="changeTab" @tab-click="changeTab"
> >
<el-tab-pane <el-tab-pane
v-for="(item, index) in portrayalSum.trackStates" v-for="(item, index) in portrayalSum.trackUsers"
:key="index" :key="index"
:label="item.userName" :label="item.userName"
> >
<record <record
v-if="openedTabs.includes(index + '')" v-if="openedTabs.includes(index + '')"
:userId="item.userId" :userId="item.trackUserId"
viewType="1" viewType="1"
></record> ></record>
</el-tab-pane> </el-tab-pane>
......
...@@ -14,6 +14,7 @@ export default { ...@@ -14,6 +14,7 @@ export default {
type: String, type: String,
default: null default: null
}, },
// 视图展示类型 1:表格展示,2:轨迹时间线展示
viewType: { viewType: {
type: String, type: String,
default: '' default: ''
...@@ -23,7 +24,7 @@ export default { ...@@ -23,7 +24,7 @@ export default {
data() { data() {
return { return {
query: { query: {
pageNum: 1, pageNum: 0,
pageSize: 10, pageSize: 10,
externalUserid: '', // 是 当前客户id externalUserid: '', // 是 当前客户id
userId: null, // 当前跟进人id, userId: null, // 当前跟进人id,
...@@ -38,7 +39,7 @@ export default { ...@@ -38,7 +39,7 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
created() { created() {
this.viewType && this.getList() this.viewType && this.getList(1)
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -60,7 +61,9 @@ export default { ...@@ -60,7 +61,9 @@ export default {
if (this.viewType) { if (this.viewType) {
this.list = rows this.list = rows
} else { } else {
debugger
this.list = this.list.concat(rows) this.list = this.list.concat(rows)
console.log(this.list)
} }
this.total = +total this.total = +total
this.loading = false this.loading = false
......
...@@ -62,11 +62,15 @@ export default { ...@@ -62,11 +62,15 @@ export default {
getDetail(this.$route.query).then(({ data }) => { getDetail(this.$route.query).then(({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(',')) data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data this.customer = data
if (data.trackUsers && data.trackUsers.length === 1) {
this.openedTabs = [data.trackUsers[0].trackUserId]
}
this.birthday = data.birthday this.birthday = data.birthday
}) })
}, },
changeTab(tab) { changeTab(tab) {
this.openedTabs.includes(tab.id) || this.openedTabs.push(tab.id) this.openedTabs.includes(tab.$attrs.id) || this.openedTabs.push(tab.$attrs.id)
} }
// remark(item) { // remark(item) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!