Commit f4278420 by chenwq

选择客户弹窗

1 parent a4e9755b
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable> <GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div> </div>
<div class="selected-list"> <div class="selected-list">
<p class="list-title p-16">已选({{ selectedSum }})</p> <p class="list-title p-16">已选({{ Array.isArray(selectedCustomerList) ? selectedCustomerList.length : 0 }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }"> <div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false"> <el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
...@@ -37,7 +37,6 @@ export default { ...@@ -37,7 +37,6 @@ export default {
url: url, url: url,
searchForm: {}, searchForm: {},
customerList: [], customerList: [],
selectedSum: 0,
heightBox: 200, heightBox: 200,
// 表格 // 表格
getListApi: this.$apis.sop.getCustomerListApi, getListApi: this.$apis.sop.getCustomerListApi,
...@@ -140,15 +139,6 @@ export default { ...@@ -140,15 +139,6 @@ export default {
} }
}, },
watch: {
selectedCustomerList: {
handler() {
this.selectedSum = this.selectedCustomerList.length
},
deep: true
}
},
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350 this.heightBox = clientHeight - 0.15 * clientHeight - 350
...@@ -158,13 +148,12 @@ export default { ...@@ -158,13 +148,12 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm = { this.searchForm = {
// labelStandInfoList: []
tagLists: [] tagLists: []
} }
this.selectedLabelList.length && this.selectedLabelList.length &&
this.selectedLabelList.forEach(item => { this.selectedLabelList.forEach(item => {
item.labelList.length &&
item.labelList.forEach(subItem => { item.labelList.forEach(subItem => {
// this.searchForm.labelStandInfoList.push({
this.searchForm.tagLists.push({ this.searchForm.tagLists.push({
groupId: item.labelGroup.id, groupId: item.labelGroup.id,
groupName: item.labelGroup.name, groupName: item.labelGroup.name,
...@@ -227,7 +216,7 @@ export default { ...@@ -227,7 +216,7 @@ export default {
var selectIds = this.selectedCustomerList.map(item => item.id) var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => { currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) { if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
this.selectedLabelList.push(item) this.selectedCustomerList.push(item)
} }
}) })
this.recoverySelected() this.recoverySelected()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!