Commit d69de018 by 王志慧

Merge branch 'v1.2.0' of http://192.168.3.233:8090/saas/scrm-micro-custom into v1.2.0

2 parents b59e8291 9ac43841
......@@ -39,7 +39,10 @@
</div>
<div class="export" @click="handleExport">导出</div>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<span slot="carVin" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span>
</span>
<span slot="status" slot-scope="scope">
<span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span>
</span>
......@@ -55,7 +58,7 @@
</div>
<el-dialog title="选择标签" width="20%" :visible="dialogVisible" class="labelDialog" :before-close="handleDialogClose">
<el-input placeholder="请输入搜索关键字" v-model="searchLabel">
<el-input placeholder="请输入搜索关键字" v-model="searchLabel" fixed>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
<div class="labelCombination">
......@@ -63,13 +66,15 @@
<img src="@/assets/tagsManage/doc.png" alt="" />
<span class="iconLabelstext">{{ labelGroupName }}</span>
</div>
<div class="label-panle" :style="{height: boxHeight+'px'}">
<template v-for="(item, index) in items">
<div class="iconLabelsName" :class="{ active: checkedTag.indexOf(index) > -1 }" v-if="item.isHidden" :key="index" @click="seletLabelActive(item.labelId, index, item.labelName)">
<img src="@/assets/tagsManage/label.png" alt="" />
<span class="LabelsNameTxt">{{ item.labelName }}</span>
<span :title="item.labelName.length > 10 ? 'item.labelName' : '' " class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedTag.indexOf(index) > -1" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div>
</template>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetSearch">重置</el-button>
......@@ -102,7 +107,9 @@ export default {
url: url,
sloading: false,
searchForm: {},
searchForm3:{},
searchFormTable: {},
boxHeight: 200,
clientGroupFormList: [
{
type: 'input',
......@@ -212,6 +219,7 @@ export default {
{
label: '车架号(后6位)',
prop: 'carVin',
addHtml: 'carVin',
minWidth: 120
},
{
......@@ -260,6 +268,8 @@ export default {
},
mounted() {
// this.wxTips()
let clientHeight = document.documentElement.clientHeight
this.boxHeight = clientHeight - 250
},
watch: {
labelType(val) {
......@@ -279,15 +289,18 @@ export default {
computed: {
items: function () {
var _search = this.searchLabel
// if (_search) {
// console.log()
// return this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
// }
this.labelList.forEach(item => (item.labelName.indexOf(_search) > -1 ? (item.isHidden = true) : (item.isHidden = false)))
return this.labelList
}
},
methods: {
myStandNo(carVin) {
if (!carVin) {
return ''
}
return carVin.substring(carVin.length - 6)
},
//获取标签组
getLabelList() {
let params = {
......@@ -303,7 +316,19 @@ export default {
this.groupId = res.groupId
this.labelList.forEach(item => {
item.isHidden = true
let res = this.getListParams(item.labelId, item.labelName)
this.tagLists.push(res)
})
console.log(this.tagLists)
this.searchForm = {
tagLists: this.tagLists
}
this.searchForm3 = {
...this.searchForm,
pageSize: 10,
pageNum: 1
}
this.getAllClientList(this.searchForm3)
})
},
seletLabelActive(id, index, name) {
......@@ -320,10 +345,23 @@ export default {
}
console.log(this.checkedTag)
},
// 首次加载页面显示所有客户数据
getAllClientList(params) {
var listParams = JSON.parse(JSON.stringify(params))
if (listParams.method) delete params.method
getCustomersList(listParams).then(res => {
this.customerListsNum = res.count
})
this.searchTable()
this.tagLists = []
},
// 根据标签获取客户列表
searchClientData() {
this.dialogVisible = false
this.searchForm = {
if(!this.tagLists.length){
this.getAllClientList(this.searchForm3)
}else{
this.searchForm = {
tagLists: this.tagLists
}
this.searchForm2 = {
......@@ -331,10 +369,9 @@ export default {
pageSize: 10,
pageNum: 1
}
getCustomersList(this.searchForm2).then(res => {
this.customerListsNum = res.count
})
this.searchTable()
}
},
getListParams(id, name) {
const params = {}
......@@ -343,7 +380,6 @@ export default {
params.groupType = this.labelType
params.labelId = id
params.labelName = name
// console.log(params)
return params
},
......@@ -400,6 +436,7 @@ export default {
},
setTableFinishFun(content) {
console.log(content, this.$refs.viewCustomers.data.length, '获取数据')
this.customerListsNum = this.$refs.viewCustomers.total
this.$refs.viewCustomers.data.length ? (this.$refs.viewCustomers.tableHeightValues = '') : this.$refs.viewCustomers.setTableHeightFun()
},
//导出
......@@ -421,7 +458,6 @@ export default {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
}
......@@ -481,6 +517,7 @@ export default {
bottom: 0px;
width: 100%;
}
.scrm-sub-client-container {
.pageTitle {
position: relative;
......@@ -592,6 +629,10 @@ export default {
color: #333333;
}
}
.label-panle {
height: calc(100% - 200px);
overflow-y: auto;
}
.iconLabelsName {
position: relative;
margin-left: 10px;
......@@ -611,17 +652,12 @@ export default {
height: 16px;
}
.LabelsNameTxt {
max-width: 155px;
max-width: 100%;
margin-left: 5px;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: right;
display: block; /*内联对象需加*/
word-break: keep-all; /* 不换行 */
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!