Commit 1098fcad by xiaohai

分组详情页修改 分组穿梭窗插件开发

parent 509324be
......@@ -4,7 +4,7 @@
<div class="right-content">
<div class="right-box">
<div class="memberGroupDetail-wrap__head">
<p class="m-b-20"><span class="group-name">{{groupName}}</span><span class="font-10 real-time inline-block m-l-8">{{!!groupIsRealTime? '实时':''}}</span></p>
<p class="m-b-20"><span class="group-name">{{groupName}}</span><span class="font-10 real-time inline-block m-l-8">{{!!groupIsRealTime ? '实时':'非实时'}}</span></p>
<div>
<span>筛选标签</span>
<div class="inline-block tag-cell-wrap">
......@@ -344,6 +344,8 @@
getRequest('/member-tag-group/findOneDetial.json', params)
.then(res => {
console.log(res, 'tagValueDtoList');
that.groupName = res.data.result.tagGroupDto.groupName;
that.groupIsRealTime = res.data.result.tagGroupDto.isRealTime;
let list = res.data.result.tagValueDtoList;
list.forEach(li => {
li.tagParams && (li.tagParams = JSON.parse(li.tagParams));
......@@ -374,6 +376,8 @@
* 确认选择-弹层隐藏
*/
confirmUserDefined(data) {
console.log(data);
let fields = data.join(",");
const that = this;
that.selectedUserDefined = data;
that.showUserDefined = false;
......@@ -384,10 +388,26 @@
that.selectedFields.push(ele);
}
});
that.saveFieldsList(fields);
that.getGroupDetail();
},
/**
* 列表自定义字段选择保存
*/
saveFieldsList(fields) {
const that = this
const para = {
pageName: "memberSign",
fields
};
that.axios.post(`${that.baseUrl}/api-member/update-fields?requestProject=memberTag`, para)
.then(res => {
console.log(res);
});
},
/**
* 分页---页码变化
*/
handleSizeChange(val) {
......@@ -473,11 +493,11 @@
getFieldsList() {
const that = this
const para = {
pageName: "wxMember",
pageName: "memberSign",
};
that.selectedUserDefined = [];
that.selectedFields = [];
that.axios.post(`${that.baseUrl}/api-member/find-member-fields?requestProject='memberTag'`, para)
that.axios.post(`${that.baseUrl}/api-member/find-member-fields?requestProject=memberTag`, para)
.then((res) => {
console.log(res, '自定义列表字段');
const resData = res.data
......@@ -503,7 +523,7 @@
message: error.message
})
});
},
}
},
beforeMount() {
var that = this;
......
<template>
<div class="memberGroupList-wrap common-wrap">
<nav-crumb :navpath="navpath"></nav-crumb>
<div class="p-20">
<group-transfer></group-transfer>
</div>
<div class="right-content">
<div class="right-box">
<div class="common-wrap__opt">
......@@ -13,6 +16,7 @@
@clear="clearSearch"
@keyup.enter.native="searchEnterFun">
</el-input>
<el-button slot="reference" type="text" size="small" class="fr" @click="showGroupSet">设置组</el-button>
<el-button type="primary" @click="toAddGroup" class="fr">新增分组</el-button>
</div>
<div class="common-wrap__table m-t-20">
......@@ -57,7 +61,7 @@
width="150px"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.updateRate }}
{{ scope.row.updateType == 1 ? '每天一次' : scope.row.updateType == 2 ? (scope.row.updateDay ? '每周'+ weekArr[scope.row.updateDay - 1] : '每周一次') : (scope.row.updateDay ? '每月' + scope.row.updateDay + '号' : '每月一次')}}
</template>
</el-table-column>
<el-table-column
......@@ -75,7 +79,7 @@
width="150px"
show-overflow-tooltip>
<template slot-scope="scope">
{{scope.row.memberCount | formatNum }}
{{(scope.row.memberCount || 0) | formatNum }}
</template>
</el-table-column>
<el-table-column
......@@ -118,7 +122,13 @@
删除
</el-button>
</el-popover> -->
<el-button type="text" size="small" @click="toDelTag(scope.row, scope.$index)">删除</el-button>
<el-button type="text" size="small" class="p-r-12" @click="toDelTag(scope.row, scope.$index)">删除</el-button>
<el-popover
placement="top-start"
trigger="hover">
<span>刷新覆盖人数</span>
<el-button slot="reference" type="text" size="small" @click="refreshGroup(scope.row)">刷新</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
......@@ -148,6 +158,7 @@
import timeFormat from '@/common/js/timeFormat';
import { _debounce } from "@/common/js/public";
import { getRequest, postRequest, postJson, postForm } from '@/api/api';
import groupTransfer from '@/components/groupTransfer';
export default {
name: 'memberGroupList',
data() {
......@@ -171,26 +182,14 @@
tagSearch: '', // 搜索值绑定的参数
// 会员分组列表数据
groupTableData:[
{
memberTagGroupId: 1,
describle: '标签列表数据',
groupName: '123',
isRealTime: 1,
latestUpdateTime: '2018-09-30 14:30:28',
updateRate: '-',
effectiveStatus: 1,
memberCount: '456566',
createTime: '2018-09-30 14:30:28',
expiredTime: '2018-09-30 14:30:28',
popVisible: false,
}
],
groupTableData:[],
// 分页参数
currentPage: 1,
pageSize: 20,
total: 0,
groupSetShow: false,
weekArr: ['一', '二', '三', '四', '五', '六', '日']
}
},
filters: {
......@@ -207,6 +206,14 @@
},
methods: {
/**
*
*/
showGroupSet() {
const that = this;
that.groupSetShow = true;
},
/**
* 路由跳转
*/
changeRoute(route) {
......@@ -248,6 +255,7 @@
console.log(`每页 ${val} 条`);
that.getGroupList()
},
/**
* 分页---当前页变化
*/
......@@ -277,6 +285,31 @@
});
},
/**
* 刷新当前分组
*/
refreshGroup(obj) {
console.log(obj);
const that = this;
const memberTagGroupId = obj.memberTagGroupId;
let params = {
memberTagGroupId,
};
getRequest('/member-tag-member/findMemberList.json', params)
.then(res => {
console.log(res, 'groupinfo');
let param = {
memberTagGroupId,
memberCount: res.data.result.page.totalCount
};
that.updateGroup(param, obj);
})
.catch(e => {
console.log(e, 'error');
});
},
/**
* 简单更新当前分组 -- 失效/更改人数
*/
......@@ -286,12 +319,13 @@
.then(res => {
console.log(res, 'updateResult');
info.effectiveStatus = pramas.effectiveStatus || info.effectiveStatus;
info.memberCount = pramas.memberCount || info.memberCount;
info.memberCount = pramas.memberCount || pramas.memberCount == 0 ? pramas.memberCount : info.memberCount;
})
.catch(e => {
console.log(e, 'error');
});
},
/**
* 删除当前分组 -- 取消
*/
......@@ -396,7 +430,8 @@
that.getGroupList()
},
components: {
navCrumb
navCrumb,
groupTransfer
}
}
</script>
......
......@@ -410,9 +410,16 @@ input:focus {
padding-right: 8px;
}
.p-r-12 {
padding-right: 12px;
}
.p-r-20 {
padding-right: 20px;
}
.w_100 {
width: 100%;
}
.w-86 {
width: 86px;
}
......
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