Commit 5dca2477 by 李长胜

修改客户详情标签处

1 parent ad24619c
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"echarts": "^5.2.0", "echarts": "^5.2.0",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.0", "glsx-components": "^1.3.2",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
......
...@@ -137,10 +137,9 @@ export default { ...@@ -137,10 +137,9 @@ export default {
methods: { methods: {
getTotal(num) { getTotal(num) {
if(this.currentIndex==0){ if (this.currentIndex == 0) {
this.$set(this.titles[0], 'personNum',num) this.$set(this.titles[0], 'personNum', num)
} }
}, },
tabClick(index) { tabClick(index) {
this.currentIndex = index this.currentIndex = index
......
...@@ -75,15 +75,17 @@ ...@@ -75,15 +75,17 @@
</p> </p>
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
<p><span>标签信息</span></p> <div class="choseRow">
<span class="tabItemText" :class="{ activeItemText: currentIndex == 1 }" @click="tabClick(1)">概况</span>
<span class="tabItemText" :class="{ activeItemText: currentIndex == 2 }" @click="tabClick(2)">标签信息</span>
</div>
<template v-if="currentIndex == 1">
<!-- <p><span>标签信息</span></p>
<div class="tagsWrap"> <div class="tagsWrap">
<!-- <el-tooltip effect="dark" :content="leftPanelInfo.addWay | toLabel" placement="top">
<span class="ellipsis-1">{{ leftPanelInfo.addWay | toLabel }}</span>
</el-tooltip> -->
<span class="tag ellipsis-1" v-for="item in tagsList" :key="item.labelId" :title="item.labelValue">{{ item.labelValue }}</span> <span class="tag ellipsis-1" v-for="item in tagsList" :key="item.labelId" :title="item.labelValue">{{ item.labelValue }}</span>
<!-- 添加标签 仅对该客户的跟进员工可见(要有登录信息)1--商户 2--员工--> 添加标签 仅对该客户的跟进员工可见(要有登录信息)1--商户 2--员工
<span class="tag addTag" @click="btnClick('create')" v-if="userType == 2">添加</span> <span class="tag addTag" @click="btnClick('create')" v-if="userType == 2">添加</span>
</div> </div> -->
<p> <p>
<span>车辆信息</span> <span>车辆信息</span>
<span>{{ vehicleTableData.length || 0 }}辆</span> <span>{{ vehicleTableData.length || 0 }}辆</span>
...@@ -95,39 +97,6 @@ ...@@ -95,39 +97,6 @@
<span>{{ myStandNo(scope.scope.standNo) }}</span> <span>{{ myStandNo(scope.scope.standNo) }}</span>
</span> </span>
</GLTable> </GLTable>
<!-- <el-table :data="vehicleTableData" style="width: 100%" :headerStyle="{ height: '54px' }">
<el-table-column prop="standNo" label="车架号(后6位)" align="center" width="120">
<template slot-scope="scope">
<span>{{ myStandNo(scope.scope) }}</span>
</template>
</el-table-column>
<el-table-column prop="vehicleNo" label="车牌号" align="center"></el-table-column>
<el-table-column prop="vehicleBrand" label="车辆品牌" align="center"></el-table-column>
<el-table-column prop="vehicleTrain" label="车系" align="center">
<template slot-scope="scope">
<el-tooltip :content="scope.row.vehicleTrain" placement="top">
<p class="showOverTooltip">{{ scope.row.vehicleTrain }}</p>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="vehicleType" label="车型" align="center">
<template slot-scope="scope">
<el-tooltip :content="scope.row.vehicleType" placement="top">
<p class="showOverTooltip">{{ scope.row.vehicleType }}</p>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="vehicleModelYear" label="年款" align="center"></el-table-column>
<el-table-column prop="vehiclePrice" label="购车价格" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehiclePrice || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="buyTime" label="购车时间" align="center"></el-table-column>
<el-table-column prop="insBgnTime" label="保险开始时间" align="center" width="120"></el-table-column>
<el-table-column prop="insEndTime" label="保险到期时间" align="center" width="120"></el-table-column>
<el-table-column prop="maintRecTime" label="最近保养时间" align="center" width="120"></el-table-column>
</el-table> -->
<p> <p>
<span>跟进员工</span> <span>跟进员工</span>
<span>{{ employTableList.length || 0 }}人</span> <span>{{ employTableList.length || 0 }}人</span>
...@@ -153,6 +122,36 @@ ...@@ -153,6 +122,36 @@
<el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button> <el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
</template>
<div v-show="currentIndex == 2" class="clientTagsWrap">
<div style="height:40px"></div>
<!-- v-if="userType == 2" -->
<el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">添加标签</el-button>
<GLTable ref="clientTagsListRef" :hasNum="false" :noDataImg="url" :tableData="clientTagsList" :hasPage="false" :tableParams="tagsParams" :headerStyle="{ height: '54px' }">
<span slot="labelGroupInfo" slot-scope="scope">
<span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span>
</span>
<span slot="labelInfoList" slot-scope="scope">
<div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelInfoList)" :key="index" class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.labelName" placement="top">
<span>{{ item.labelName }}</span>
</el-tooltip>
</span>
<el-popover v-if="scope.scope.labelInfoList.length > 9" class="ellipsis-1 tag-box-wrap" placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.labelInfoList.length }})</span>
<div class="entmicro-hover" style="height: 214px; overflow-y: auto">
<el-tag type="info" class="ellipsis-1" style="margin-right: 10px; margin-bottom: 10px; max-width: 200px" v-for="(i, sindex) in scope.scope.labelInfoList" :key="sindex" :disable-transitions="false">
<el-tooltip class="item" :content="i.labelName" placement="top">
<span>{{ i.labelName }}</span>
</el-tooltip>
</el-tag>
</div>
</el-popover>
</div>
</span>
</GLTable>
</div>
</div> </div>
</div> </div>
<basic-dialog class="tags" :title="tagsDialogTitle" :width="'712px'" :isShowThirdBtn="true" @btnEvent="goNewTag" :isVisible="tagsVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose"> <basic-dialog class="tags" :title="tagsDialogTitle" :width="'712px'" :isShowThirdBtn="true" @btnEvent="goNewTag" :isVisible="tagsVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
...@@ -181,10 +180,12 @@ ...@@ -181,10 +180,12 @@
<script> <script>
import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail } from '@/api/modules/clientManage' import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail } from '@/api/modules/clientManage'
import url from "@/assets/clientDetail/noDataBox.png"
export default { export default {
name: 'clientDetail', name: 'clientDetail',
data() { data() {
return { return {
url:url,
leftPanelInfo: {}, leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id labelIdList: [], //存放用户被标记标签的id
tagsList: [ tagsList: [
...@@ -200,64 +201,63 @@ export default { ...@@ -200,64 +201,63 @@ export default {
label: '车架号(后6位)', label: '车架号(后6位)',
prop: 'standNo', prop: 'standNo',
addHtml: 'standNo', addHtml: 'standNo',
minWidth:'120' minWidth: '120'
}, },
{ {
label: '车牌号', label: '车牌号',
prop: 'vehicleNo', prop: 'vehicleNo',
minWidth:'100' minWidth: '100'
}, },
{ {
label: '车辆品牌', label: '车辆品牌',
prop: 'vehicleBrand', prop: 'vehicleBrand',
minWidth:'100' minWidth: '100'
}, },
{ {
label: '车系', label: '车系',
prop: 'vehicleTrain', prop: 'vehicleTrain',
width:160, width: 160,
line: 2 line: 2
}, },
{ {
label: '车型', label: '车型',
prop: 'vehicleType', prop: 'vehicleType',
width:160, width: 160,
line: 2 line: 2
}, },
{ {
label: '年款', label: '年款',
prop: 'vehicleModelYear', prop: 'vehicleModelYear',
minWidth:'100' minWidth: '100'
}, },
{ {
label: '购车价格', label: '购车价格',
prop: 'vehiclePrice', prop: 'vehiclePrice',
minWidth:'100', minWidth: '100',
formatter: cellValue => { formatter: cellValue => {
return cellValue.vehiclePrice || '' return cellValue.vehiclePrice || ''
} }
}, },
{ {
label: '购车时间', label: '购车时间',
prop: 'buyTime', prop: 'buyTime',
minWidth:'120' minWidth: '120'
}, },
{ {
label: '保险开始时间', label: '保险开始时间',
prop: 'insBgnTime', prop: 'insBgnTime',
minWidth:'120' minWidth: '120'
}, },
{ {
label: '保险到期时间', label: '保险到期时间',
prop: 'insEndTime', prop: 'insEndTime',
minWidth:'120' minWidth: '120'
}, },
{ {
label: '最近保养时间', label: '最近保养时间',
prop: 'maintRecTime', prop: 'maintRecTime',
minWidth:'120' minWidth: '120'
}, }
] ]
}, },
//员工跟进 //员工跟进
...@@ -341,6 +341,27 @@ export default { ...@@ -341,6 +341,27 @@ export default {
// width:80 // width:80
// } // }
}, },
//标签信息的内容
currentIndex: 1,
clientTagsList: [],
tagsParams: {
listName: 'labelInfos',
tableOption: false,
tableColumns: [
{
label: '标签组',
prop: 'labelGroupInfo',
addHtml: 'labelGroupInfo',
width: '160'
},
{
label: '已打标签',
prop: 'labelInfoList',
addHtml: 'labelInfoList',
align: 'left'
}
]
},
//弹窗数据 //弹窗数据
tagsDialogTitle: '添加标签', tagsDialogTitle: '添加标签',
tagsVisible: false, tagsVisible: false,
...@@ -357,6 +378,7 @@ export default { ...@@ -357,6 +378,7 @@ export default {
userid: 0 //小龙需要用户id userid: 0 //小龙需要用户id
} }
}, },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
...@@ -368,8 +390,25 @@ export default { ...@@ -368,8 +390,25 @@ export default {
this.getPageDetail() this.getPageDetail()
//舍弃调用小龙的获取单用户标签的接口 //舍弃调用小龙的获取单用户标签的接口
// this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.$route.query.id, this.merchantId)
console.log(this.tagsParams, 'kkkk')
}, },
methods: { methods: {
tabClick(index){
// if (!this.$refs.memberOrderRef.data.length) {
// this.$refs.memberOrderRef.setTableHeightFun()
// }
this.currentIndex=index
if(this.currentIndex ==2 && this.clientTagsList.length<=0){
this.$refs.clientTagsListRef.setTableHeightFun()
}
},
showTagArray(list) {
if (list.length == 0) {
return []
}
return list.slice(0, 9)
},
/* * /* *
用途:js中字符串超长作固定长度加省略号(...)处理 用途:js中字符串超长作固定长度加省略号(...)处理
参数说明: 参数说明:
...@@ -446,6 +485,7 @@ export default { ...@@ -446,6 +485,7 @@ export default {
this.clientGroupTableList = res.customerBases || [] this.clientGroupTableList = res.customerBases || []
this.tagsList = res.labels || [] this.tagsList = res.labels || []
this.labelIdList = (res.labels || []).map(item => item.labelId) this.labelIdList = (res.labels || []).map(item => item.labelId)
this.clientTagsList = res.labelInfos || []
}, },
goNewTag() { goNewTag() {
this.$router.push({ path: '/tagsManage/index' }) this.$router.push({ path: '/tagsManage/index' })
...@@ -679,7 +719,69 @@ export default { ...@@ -679,7 +719,69 @@ export default {
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
padding: 20px; padding: 20px;
position: relative;
.choseRow {
position: absolute;
width: 100%;
left: 0;
top: 0;
display: flex;
background-color: $bgColor;
.tabItemText {
display: inline-block;
height: 40px;
line-height: 40px;
width: 180px;
box-sizing: border-box;
background: #ffffff;
text-align: center;
border: 1px solid #eeedff;
&:first-child {
border-left: 0;
}
font-weight: 400;
font-size: 14px;
color: #37383a;
}
.activeItemText {
border-radius: 4px 4px 0 0;
color: $btnBlue;
font-weight: 600;
box-sizing: border-box;
border-bottom: 0 !important;
}
}
.addTagBtn {
margin-bottom: 10px;
}
// 处理客户标签的样式
.clientTagsWrap {
.allTagsWrap {
position: relative;
.tag-box-wrap {
display: inline-block;
margin-right: 10px;
// margin-bottom: 2px;
padding: 0 10px;
box-sizing: border-box;
min-width: 76px;
max-width: 200px;
height: 26px;
line-height: 26px;
border-radius: 4px;
border: 1px solid #e8e8ea;
background: #fafbfe;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #666666;
max-width: 245px;
cursor: pointer;
}
}
}
.showOverTooltip { .showOverTooltip {
display: -webkit-box; display: -webkit-box;
text-overflow: ellipsis; text-overflow: ellipsis;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!