Commit 250510e4 by xiaohai

fix bug

parent 5ad2019a
...@@ -23,6 +23,7 @@ Vue.use(vueGicMemberGroup) ...@@ -23,6 +23,7 @@ Vue.use(vueGicMemberGroup)
:height='height' :height='height'
:projectName="projectName" :projectName="projectName"
:headerList='headerList' :headerList='headerList'
:effectiveStatus="effectiveStatus"
@handleDataTransferred="handleDataTransferred" @handleDataTransferred="handleDataTransferred"
@handleDataLeft="handleDataLeft"> @handleDataLeft="handleDataLeft">
</vue-gic-member-group> </vue-gic-member-group>
...@@ -54,6 +55,7 @@ data() { ...@@ -54,6 +55,7 @@ data() {
height: 200, // 穿梭窗高度, 默认是543 height: 200, // 穿梭窗高度, 默认是543
projectName: 'memberTag', // 默认是memberTag projectName: 'memberTag', // 默认是memberTag
headerList: ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'] // 表头配置,默认全部,分组名称默认显示不可配置 headerList: ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'] // 表头配置,默认全部,分组名称默认显示不可配置
effectiveStatus: 1 // 不传: 所有状态 1: 有效 0: 失效
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "@gic-test/vue-gic-member-group", "name": "@gic-test/vue-gic-member-group",
"description": "vue-gic-member-group Plugin", "description": "vue-gic-member-group Plugin",
"version": "1.0.33", "version": "1.0.34",
"license": "MIT", "license": "MIT",
"private": false, "private": false,
"author": "fairyly", "author": "fairyly",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="input-div"> <div class="input-div">
<el-input <el-input
class="w_100" class="w_100"
placeholder="请输入关键字搜索人群" placeholder="请输入关键字搜索分组"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="dataSearch" v-model="dataSearch"
@keyup.enter.native="searchEnterFun" @keyup.enter.native="searchEnterFun"
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<div class="input-div"> <div class="input-div">
<el-input <el-input
class="w_100" class="w_100"
placeholder="请输入关键字搜索人群" placeholder="请输入关键字搜索分组"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="dataSearchSelected" v-model="dataSearchSelected"
clearable clearable
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
label="是否实时" label="是否实时"
width="116px"> width="116px">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.isRealTime == 1? '实时':'非实时'}} {{scope.row.isRealTime == 1 ? '实时':'非实时'}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -163,6 +163,10 @@ ...@@ -163,6 +163,10 @@
default() { default() {
return ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate']; return ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'];
} }
},
effectiveStatus: {
type: [String, Number],
default: ""
} }
}, },
data() { data() {
...@@ -198,7 +202,7 @@ ...@@ -198,7 +202,7 @@
* *
*/ */
let sign = 1; // 定义默认的向上滚于乡下滚的边界 let sign = 1; // 定义默认的向上滚于乡下滚的边界
const CONDITION = ((this.scrollHeight - this.scrollTop === this.clientHeight) && const CONDITION = ((this.scrollHeight - this.scrollTop < this.clientHeight + 1) &&
this.scrollTop > sign)// 注意: && this.scrollTop this.scrollTop > sign)// 注意: && this.scrollTop
if(this.scrollTop > sign) { if(this.scrollTop > sign) {
...@@ -242,7 +246,7 @@ ...@@ -242,7 +246,7 @@
getGroupList() { getGroupList() {
const that = this; const that = this;
that.loading = true; that.loading = true;
that.axios.get(`${that.baseUrl}/gic-member-tag-web/member-tag-group/findList.json?requestProject=${that.projectName}&pageSize=${that.pageSize}&pageNum=${that.currentPage}&groupName=${that.dataSearch}&effectiveStatus=${1}`) that.axios.get(`${that.baseUrl}/gic-member-tag-web/member-tag-group/findList.json?requestProject=${that.projectName}&pageSize=${that.pageSize}&pageNum=${that.currentPage}&groupName=${that.dataSearch}&effectiveStatus=${that.effectiveStatus}`)
.then(res => { .then(res => {
if (res.data.errorCode == 1) { if (res.data.errorCode == 1) {
that.tableData = that.tableData.concat(res.data.result.result); that.tableData = that.tableData.concat(res.data.result.result);
...@@ -338,10 +342,12 @@ ...@@ -338,10 +342,12 @@
let aSet = new Set(seleced); let aSet = new Set(seleced);
let bSet = new Set(setection); let bSet = new Set(setection);
that.selectedData = seleced.concat(setection).filter(v => !aSet.has(v) || !bSet.has(v)); // 两数组非交集部分即为剔除后剩下的数据 that.selectedData = seleced.concat(setection).filter(v => !aSet.has(v) || !bSet.has(v)); // 两数组非交集部分即为剔除后剩下的数据
that.staticSelectedData.forEach((father, idx) => { let arr = that.staticSelectedData.slice(0);
arr.forEach((father, idx) => {
setection.forEach(son => { setection.forEach(son => {
if (son.memberTagGroupId == father.memberTagGroupId) { if (son.memberTagGroupId == father.memberTagGroupId) {
that.staticSelectedData.splice(idx, 1); let index = that.staticSelectedData.indexOf(father);
that.staticSelectedData.splice(index, 1);
} }
}); });
}); });
...@@ -423,6 +429,7 @@ ...@@ -423,6 +429,7 @@
} }
}, },
mounted() { mounted() {
console.log(this.defaltSelected, "defaltSelected");
this.getGroupList(); this.getGroupList();
if (this.defaltSelected.length > 0) { if (this.defaltSelected.length > 0) {
this.selectedData = this.uniqueByGroupId(this.selectedData.concat(this.defaltSelected)); // 数组拼接并去重 this.selectedData = this.uniqueByGroupId(this.selectedData.concat(this.defaltSelected)); // 数组拼接并去重
......
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