Commit 250510e4 by xiaohai

fix bug

parent 5ad2019a
......@@ -23,6 +23,7 @@ Vue.use(vueGicMemberGroup)
:height='height'
:projectName="projectName"
:headerList='headerList'
:effectiveStatus="effectiveStatus"
@handleDataTransferred="handleDataTransferred"
@handleDataLeft="handleDataLeft">
</vue-gic-member-group>
......@@ -54,6 +55,7 @@ data() {
height: 200, // 穿梭窗高度, 默认是543
projectName: 'memberTag', // 默认是memberTag
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",
"description": "vue-gic-member-group Plugin",
"version": "1.0.33",
"version": "1.0.34",
"license": "MIT",
"private": false,
"author": "fairyly",
......
......@@ -4,7 +4,7 @@
<div class="input-div">
<el-input
class="w_100"
placeholder="请输入关键字搜索人群"
placeholder="请输入关键字搜索分组"
prefix-icon="el-icon-search"
v-model="dataSearch"
@keyup.enter.native="searchEnterFun"
......@@ -107,7 +107,7 @@
<div class="input-div">
<el-input
class="w_100"
placeholder="请输入关键字搜索人群"
placeholder="请输入关键字搜索分组"
prefix-icon="el-icon-search"
v-model="dataSearchSelected"
clearable
......@@ -132,7 +132,7 @@
label="是否实时"
width="116px">
<template slot-scope="scope">
{{scope.row.isRealTime == 1? '实时':'非实时'}}
{{scope.row.isRealTime == 1 ? '实时':'非实时'}}
</template>
</el-table-column>
</el-table>
......@@ -163,6 +163,10 @@
default() {
return ['isRealTime', 'latestUpdateTime', 'updateType', 'effectiveStatus', 'effectiveDate'];
}
},
effectiveStatus: {
type: [String, Number],
default: ""
}
},
data() {
......@@ -198,7 +202,7 @@
*
*/
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
if(this.scrollTop > sign) {
......@@ -242,7 +246,7 @@
getGroupList() {
const that = this;
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 => {
if (res.data.errorCode == 1) {
that.tableData = that.tableData.concat(res.data.result.result);
......@@ -338,10 +342,12 @@
let aSet = new Set(seleced);
let bSet = new Set(setection);
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 => {
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 @@
}
},
mounted() {
console.log(this.defaltSelected, "defaltSelected");
this.getGroupList();
if (this.defaltSelected.length > 0) {
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