Commit 6ac2bcf7 authored by 乐宝呗666's avatar 乐宝呗666

添加重要客户列表页

parent d5b1dfed
......@@ -81,3 +81,12 @@ export function getImportantCus (params) {
params
})
}
// 获取重要客户列表
export function getCustomPageList (params) {
return request({
url: '/tp/customerInformation/getPageList',
method: 'post',
params
})
}
......@@ -32,5 +32,10 @@ export default [
name: 'enterpriseDetail',
meta,
component: _import('system/index/components/enterpriseDetail')
}, {
path: '/customList', // 重要客户
name: 'customList',
meta,
component: _import('content/client/components/customList')
}
]
<template>
<d2-container class="companyNews">
<headerLayout active="0"></headerLayout>
<div class="news-wrapper">
<div class="news-title d-flex jc-between">
<label>重要客户</label>
<span @click="goBack">&lt; 返回</span>
</div>
<div class="news-content">
<el-table stripe :data="tableData" style="width: 100%">
<el-table-column prop="customerName"></el-table-column>
<el-table-column align="right" prop="createTime"></el-table-column>
</el-table>
<Pagination
v-show="pageObj.total > 0"
:total="pageObj.total"
layout="->,total, prev, pager, next"
:page.sync="pageObj.pageNo"
:limit.sync="pageObj.pageSize"
@pagination="pageChange"
/>
</div>
</div>
</d2-container>
</template>
<script>
import headerLayout from '@/components/headerLayout/index' // 公共头部
import Pagination from '@/components/Pagination'
import * as API_CLIENT from '@/api/con.client.js'
export default {
components: { headerLayout, Pagination },
data () {
return {
pageObj: {
pageNo: 1,
total: 1,
pageSize: 10
},
tableData: []
}
},
mounted () {
this.getCustomList()
},
methods: {
// 查询概况页面数据
getCustomList () {
API_CLIENT.getCustomPageList({ _index: this.pageObj.pageNo, _size: this.pageObj.pageSize }).then(res => {
this.tableData = res.data.records
this.pageObj.total = Number(res.data.total)
})
},
goBack () {
this.$router.back(-1)
},
// 翻页
pageChange (page) {
this.pageObj.pageSize = page.limit
this.pageObj.pageNo = page.page
this.getCustomList()
}
}
}
</script>
<style lang="scss" scoped>
.companyNews {
.news-wrapper {
padding: .5rem 1rem;
}
.news-title {
width: 100%;
height: .54rem;
font-size: .24rem;
line-height: 1.5;
color: $color-primary;
border-bottom: .02rem solid $color-primary;
margin-bottom: .5rem;
span {
cursor: pointer;
}
}
.news-content {
::v-deep .el-table {
font-size: .16rem;
color: #fff;
margin-bottom: .24rem;
background-color: rgba(47, 219, 243, 0.05);
&::before {
height: 0;
}
.el-table__header-wrapper {
display: none;
}
td {
border-bottom: none;
}
.el-table__row--striped td {
background-color: $color-bg;
}
tr {
background-color: $color-bg;
cursor: pointer;
&.is-leaf {
border-bottom: none;
}
}
.el-table__body tr:hover>td {
background-color: rgba(47, 219, 243, 0.15);
}
}
::v-deep .el-pagination.is-background {
.el-pager li:not(.disabled):hover {
color: $color-primary;
}
.el-pager li:not(.disabled).active {
background-color:$color-primary;
color: #fff;
}
}
}
}
</style>
......@@ -143,8 +143,9 @@
<div class="title">立项分析</div>
<serviceAnalysis class="heightCut44" />
</div>
<div class="boxHeight-3 mt-2">
<div class="boxHeight-3 mt-2" style="position:relative;">
<div class="title">重要客户</div>
<div class="lookMore" @click="goCustomerList">查看更多</div>
<div class="d-flex search-box jc-end">
<el-select v-model="selectYear" size="mini" @change="getImportantCus">
<el-option
......@@ -280,6 +281,9 @@ export default {
this.industry = item.type || null
this.clickDistributeId = item.id || null
this.getDistribution()
},
goCustomerList () {
this.$router.push('/customList')
}
}
}
......
......@@ -36,10 +36,10 @@
</div>
</div>
<h3>关系筛选</h3>
<div style="padding-left:30px;color:#fff;">
<!-- <div style="padding-left:30px;color:#fff;">
群智合
<span class="pointer" style="background-color:#f40;"></span>
</div>
</div> -->
<el-checkbox-group v-model="checked">
<el-checkbox :disabled="value==item.value" v-for="item in checkList" :key="item.value" :label="item.value">
{{item.name}}
......@@ -56,11 +56,12 @@ import * as API_KNOWLED from '@/api/sys.knowled.js'
import graphChart from '@/components/echarts/graphChart'
// import knowledgeJSON from '@/assets/js/knowledgeJSON.js'
const colorMap = new Map()
colorMap.set(1, '#E23AA2')
colorMap.set(2, '#b9c719')
colorMap.set(3, '#199fc7')
colorMap.set(4, '#4f19c7')
colorMap.set(5, '#69c719')
colorMap.set(0, '#FF4400') // 群智合
colorMap.set(1, '#E23AA2') // 项目
colorMap.set(2, '#b9c719') // 销售
colorMap.set(3, '#199fc7') // 商机
colorMap.set(4, '#4f19c7') // 客户
colorMap.set(5, '#69c719') // 成员
export default {
components: { graphChart },
data () {
......@@ -95,8 +96,9 @@ export default {
state: '',
mapData: {},
knowledData: [],
checked: [1, 2, 3, 4, 5],
checked: [],
checkList: [
{ name: '群智合', value: 0, color: '#FF4400' },
{ name: '项目', value: 1, color: '#E23AA2' },
{ name: '销售', value: 2, color: '#b9c719' },
{ name: '商机', value: 3, color: '#199fc7' },
......@@ -118,6 +120,7 @@ export default {
if (data) {
vm.mapData = data
vm.sourceData = JSON.parse(JSON.stringify(data))
vm.checked = [0, 1, 2, 3, 4, 5]
}
},
// 根据name查id
......@@ -152,7 +155,7 @@ export default {
type: this.value
}
this.sourceData = JSON.parse(JSON.stringify(this.mapData))
this.checked = [1, 2, 3, 4, 5]
this.checked = [0, 1, 2, 3, 4, 5]
localStorage.setItem('data', JSON.stringify(this.mapData))
})
},
......
......@@ -18,7 +18,7 @@
size="mini"
clearable
:fetch-suggestions="querySearch"
placeholder="请输入项目名称"
placeholder="请输入名称"
:trigger-on-focus="false"
@select="handleSelect"
></el-autocomplete>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment