Commit 3a6fb9f8 by xuyl

修复UI样式以及查看客户页面bug

1 parent 8c3b921e
......@@ -39,7 +39,7 @@
</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" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" @refreshTable="getCustomersListData" :tableParams="tableParams">
<span slot="carVin" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span>
</span>
......@@ -66,26 +66,24 @@
<img src="@/assets/tagsManage/doc.png" alt="" />
<span class="iconLabelstext">{{ labelGroupName }}</span>
</div>
<div class="label-panle" :style="{ height: boxHeight + 'px' }" v-if="items.length>0">
<div class="label-panle" :style="{ height: boxHeight + 'px' }" v-if="items.length > 0">
<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 :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> -->
<div class="iconLabelsName" :class="{ 'active': checkedId==item.labelId }" :key="index" @click="seletLabelActive(item.labelId, item)">
<div class="iconLabelsName" :class="{ active: checkedId == item.labelId }" :key="index" @click="seletLabelActive(item.labelId, item)">
<img src="@/assets/tagsManage/label.png" alt="" />
<span :title="item.labelName.length > 10 ? 'item.labelName' : ''" class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedId==item.labelId" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
<img v-if="checkedId == item.labelId" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div>
</template>
</div>
<div class="noRelatedLabel" v-else>
<img src="@/assets/tagsManage/noData.png" alt="">
<div>无相关{{searchLabel}}数据</div>
</div>
<div class="noRelatedLabel" v-else>
<img src="@/assets/tagsManage/noData.png" alt="" />
<div>暂无 {{ searchLabel }} 相关内容</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetSearch">重置</el-button>
......@@ -104,12 +102,10 @@ export default {
data() {
return {
checkedId: '',
allListParams:{
pageSize: 10,
pageNum: 1,
tagLists:[]
allListParams: {
tagLists: []
},
allLabeltags:[],
allLabeltags: [],
customerListsNum: 0,
checkedTag: [],
isActive: -1,
......@@ -122,7 +118,7 @@ export default {
dialogVisible: false,
labelType: '',
isReload: true,
noRelatedLabel:false,
noRelatedLabel: false,
url: url,
sloading: false,
searchForm: {},
......@@ -210,13 +206,15 @@ export default {
placeholder: ''
}
],
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal: 0,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data',
tableColumns: [
{
label: '客户名称',
label: '客户姓名',
prop: 'customerName'
// width: 160
},
......@@ -252,7 +250,7 @@ export default {
// width: 160
},
{
label: '是否加入企微',
label: '是否加企微',
prop: 'isJoin',
addHtml: 'isJoin'
// width: 160
......@@ -264,7 +262,7 @@ export default {
}
]
},
getListApi: getCustomersList,
tableData: [],
merchantModel: 1,
flushTime: false
// items
......@@ -285,7 +283,6 @@ export default {
this.$message.closeAll()
},
mounted() {
// this.wxTips()
let clientHeight = document.documentElement.clientHeight
this.boxHeight = clientHeight - 250
},
......@@ -303,10 +300,10 @@ export default {
break
}
},
searchLabel(val){
if(this.allLabeltags.indexOf(val) == -1){
searchLabel(val) {
if (this.allLabeltags.indexOf(val) == -1) {
this.noRelatedLabel = true
}else{
} else {
this.noRelatedLabel = false
}
}
......@@ -325,7 +322,21 @@ export default {
}
return carVin.substring(carVin.length - 6)
},
getCustomersListData() {
const params = {
...JSON.parse(JSON.stringify(this.allListParams)),
pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum
}
console.log(this.$apis.tagsManage)
getCustomersList(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data.length == 0) {
this.$refs.viewCustomers.setTableHeightFun()
}
})
},
//获取标签组
getLabelList() {
let params = {
......@@ -334,28 +345,36 @@ export default {
'labelByGroupIdReq.labelGroupType': this.groupType
}
getLabelList(params).then(res => {
console.log(this.$common)
this.labelGroupName = res.groupName
this.labelList = res.labelNameIds
this.labelType = res.groupType
this.groupId = res.groupId
this.labelList.forEach(item => {
// this.allLabeltags.push(item.labelName)
item.isHidden = true
let res = this.getListParams(item.labelId, item.labelName)
this.allListParams.tagLists.push(res)
})
// this.allLabeltags.push(item.labelName)
item.isHidden = true
let res = this.getListParams(item.labelId, item.labelName)
this.allListParams.tagLists.push(res)
})
this.startParams = this.$common.utils.deepClone(this.allListParams)
this.searchForm = {
...this.allListParams
}
this.searchTable()
this.getCustomersListData()
})
},
seletLabelActive(id, arr) {
if (id == this.checkedId) {
this.checkedId = ''
this.tagLists = []
this.allListParams = this.startParams
return
}
this.checkedId = id
const labelId = arr.labelId
const labelName = arr.labelName
let res = this.getListParams(labelId, labelName)
if (this.tagLists.length > 0 ) {
if (this.tagLists.length > 0) {
// this.checkedTag.shift()
this.tagLists.shift()
}
......@@ -363,10 +382,10 @@ export default {
},
// 首次加载页面显示所有客户数据
getAllClientList(allListParams) {
this.searchForm ={
this.searchForm = {
...allListParams
}
this.searchTable()
this.getCustomersListData()
this.tagLists = []
},
// 根据标签获取客户列表
......@@ -375,12 +394,10 @@ export default {
if (!this.tagLists.length) {
this.getAllClientList(this.allListParams)
} else {
this.searchForm = {
pageSize: 10,
pageNum: 1,
this.allListParams = {
tagLists: this.tagLists
}
this.searchTable()
this.getCustomersListData()
}
},
getListParams(id, name) {
......@@ -398,6 +415,7 @@ export default {
this.searchLabel = ''
this.checkedId = ''
this.tagLists = []
this.allListParams = this.startParams
},
filterNode(val, labelData) {
if (!val) return true
......@@ -419,28 +437,7 @@ export default {
goBack() {
this.$router.go(-1)
},
// wxTips() {
// const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
// menu.forEach(item => {
// if (!item.children) {
// return
// }
// item.children.forEach(itm => {
// if (itm.path == '/enterpriseWechat/index') {
// getStatus({}).then(res => {
// if (res.status != 'SUCCESS') {
// const h = this.$createElement
// this.$message({
// showClose: true,
// duration: 0,
// message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
// })
// }
// })
// }
// })
// })
// },
setTableHeightEvent() {
this.$refs.viewCustomers.setTableHeightFun()
},
......@@ -477,16 +474,16 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.noRelatedLabel{
.noRelatedLabel {
margin-top: 59px;
text-align: center;
div{
margin-top: 12px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
div {
margin-top: 12px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.active {
border: 1px solid rgba(88, 80, 255, 1) !important;
......@@ -532,6 +529,7 @@ color: #000000;
height: 100%;
margin-right: 0px;
margin-top: 0 !important;
// margin-bottom: 0 !important;
position: relative;
}
::v-deep .el-dialog__wrapper {
......@@ -653,6 +651,7 @@ color: #000000;
}
}
.labelDialog {
overflow: hidden;
.labelCombination {
.iconLabels {
margin-top: 20px;
......@@ -670,6 +669,7 @@ color: #000000;
}
}
.label-panle {
min-width: 300px;
height: calc(100% - 200px);
overflow-y: auto;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!