Commit 9f5cb278 by xinla

--no commit message

1 parent b8059913
<script> <script>
import { getSummary, getFollowUpRecord, getCustomerInfoByUserId } from '@/api/customer' import { getSummary, getFollowUpRecord, getCustomerInfoByUserId } from '@/api/customer'
import record from './record' import record from './record'
import ctrack from './track'
export default { export default {
name: '', name: '',
props: { props: {
...@@ -12,8 +11,7 @@ export default { ...@@ -12,8 +11,7 @@ export default {
} }
}, },
components: { components: {
record, record
ctrack
}, },
data() { data() {
return { return {
...@@ -27,7 +25,7 @@ export default { ...@@ -27,7 +25,7 @@ export default {
}, },
recod: [], recod: [],
active: '0', active: '0',
openTrack: [null] openTrack: ['0']
} }
}, },
computed: {}, computed: {},
...@@ -175,7 +173,7 @@ export default { ...@@ -175,7 +173,7 @@ export default {
<span class="card-title">客户轨迹</span> <span class="card-title">客户轨迹</span>
<span style=" color: #13a2e8;" class="fr cp" @click="sync">同步</span> <span style=" color: #13a2e8;" class="fr cp" @click="sync">同步</span>
</div> </div>
<div class="flex track-tab-wrap"> <div class="flex track-tab-wrap mb15">
<div <div
v-for="(value, type) of trajectoryType" v-for="(value, type) of trajectoryType"
:key="type" :key="type"
...@@ -185,12 +183,14 @@ export default { ...@@ -185,12 +183,14 @@ export default {
{{ value }} {{ value }}
</div> </div>
</div> </div>
<template v-for="(item, index) in openTrack">
<record <record
v-for="(item, index) in openTrack" v-show="item === active"
:key="index" :key="index"
:userId="userId" :userId="userId"
:trajectoryType="item" :trajectoryType="item == 0 ? null : item"
></record> ></record>
</template>
</el-card> </el-card>
</div> </div>
</el-col> </el-col>
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
</script> </script>
<template> <template>
<div> <div v-loading="loading">
<template v-if="viewType"> <template v-if="viewType">
<el-table :data="list" v-loading="loading"> <el-table :data="list" v-loading="loading">
<el-table-column label="员工" align="center" prop="userName" /> <el-table-column label="员工" align="center" prop="userName" />
...@@ -105,11 +105,12 @@ export default { ...@@ -105,11 +105,12 @@ export default {
</template> </template>
<ul v-else class="infinite-list" v-infinite-scroll="getList" style="overflow:auto"> <ul v-else class="infinite-list" v-infinite-scroll="getList" style="overflow:auto">
<li v-for="i in list" class="infinite-list-item" :key="i"> <!-- <li v-for="i in list" class="infinite-list-item" :key="i">
<div>2021-02-16 星期二</div> <div>2021-02-16 星期二</div>
<el-timeline> </li> -->
<el-timeline v-if="list.length">
<el-timeline-item <el-timeline-item
v-for="(item, index) in 6" v-for="(item, index) in list"
:key="index" :key="index"
:timestamp="item.trackTime" :timestamp="item.trackTime"
placement="top" placement="top"
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
<p>{{ item.trackContent }}</p> <p>{{ item.trackContent }}</p>
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</li> <el-empty v-else :image-size="150"></el-empty>
</ul> </ul>
</div> </div>
</template> </template>
......
<script>
export default {
name: '',
props: {
userId: {
type: String,
default: ''
}
},
components: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: '' // "客户名称",
},
loading: false,
total: 0,
list: [] // 列表
}
},
computed: {},
watch: {},
created() {
// this.getList()
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
page && (this.query.pageNum = page)
this.loading = true
api
.getList(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
}
}
}
</script>
<template>
<ul class="infinite-list" v-infinite-scroll="getList" style="overflow:auto">
<li v-for="i in list" class="infinite-list-item" :key="i">
<div>2021-02-16 星期二</div>
<el-timeline>
<el-timeline-item
v-for="(activity, index) in 6"
:key="index"
timestamp="2018/4/12"
placement="top"
>
<p>更新 Github 模板</p>
<p>王小虎 提交于 2018/4/12 20:46</p>
</el-timeline-item>
</el-timeline>
</li>
</ul>
</template>
<style lang="less" scoped></style>
...@@ -89,12 +89,12 @@ export default { ...@@ -89,12 +89,12 @@ export default {
<i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[customer.gender]]"></i> <i :class="['el-icon-s-custom', { 1: 'man', 2: 'woman' }[customer.gender]]"></i>
</div> </div>
<div class="mt10"> <div class="mt10">
<template v-if="customer.companyTags"> <template v-if="customer.tagNames">
<el-tag type="info" v-for="(unit, unique) in customer.companyTags" :key="unique">{{ <el-tag v-for="(unit, unique) in customer.tagNames.split(',')" :key="unique">{{
unit unit
}}</el-tag> }}</el-tag>
</template> </template>
<div> <div v-else>
暂无标签 暂无标签
</div> </div>
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!