Commit 451e4696 by xiaohai

插件添加已覆盖人数栏目

parent f45abbf8
......@@ -57,7 +57,8 @@
width="150px"
show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.updateType == 1 ? '每天一次' : scope.row.updateType == 2 ? (scope.row.updateDay ? '每周'+ weekArr[scope.row.updateDay - 1] : '每周一次') : (scope.row.updateDay ? '每月' + scope.row.updateDay + '号' : '每月一次')}}
<!-- {{ scope.row.updateType == 1 ? '每天一次' : scope.row.updateType == 2 ? (scope.row.updateDay ? '每周'+ weekArr[scope.row.updateDay - 1] : '每周一次') : (scope.row.updateDay ? '每月' + scope.row.updateDay + '号' : '每月一次')}} -->
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
</template>
</el-table-column>
<el-table-column
......@@ -105,19 +106,6 @@
<router-link :to="{path:'/memberGroupDetail',query:{memberTagGroupId:scope.row.memberTagGroupId}}" class="edit-btn el-button--text p-r-20">详情</router-link>
<router-link :to="{path:'/memberGroupEdit',query:{memberTagGroupId:scope.row.memberTagGroupId}}" class="edit-btn el-button--text p-r-20">编辑</router-link>
<!-- <el-popover
placement="top"
width="160"
v-model="scope.row.popVisible">
<p style="line-height: 1.5; padding: 10px 10px 20px;">确认删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="cancelDelTag(scope.$index,scope.row)">取消</el-button>
<el-button type="primary" size="mini" @click="toDelTag(scope.$index,scope.row)">确定</el-button>
</div>
<el-button slot="reference" type="text">
删除
</el-button>
</el-popover> -->
<el-button type="text" size="small" class="p-r-12" @click="toDelTag(scope.row, scope.$index)">删除</el-button>
<el-popover
placement="top-start"
......@@ -154,7 +142,6 @@
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() {
......@@ -198,6 +185,22 @@
formatNum(data){
const reg=/\d{1,3}(?=(\d{3})+$)/g;
return (data + '').replace(reg, '$&,');
},
formatUpdateFrequency(type, day) {
const that = this;
switch(type) {
case 1:
return '每天一次';
break;
case 2:
return day ? `每周${that.weekArr[day - 1]}` : '每周一次';
break;
case 3:
return day ? `每月${that.weekArr[day - 1]}号` : '每月一次';
break;
default:
return '--';
}
}
},
methods: {
......@@ -238,7 +241,7 @@
*/
searchEnterFun(e) {
const that = this
console.log(e)
// console.log(e)
that.currentPage = 1;
that.getGroupList()
},
......@@ -248,7 +251,7 @@
*/
handleSizeChange(val) {
const that = this
console.log(`每页 ${val} 条`);
// console.log(`每页 ${val} 条`);
that.getGroupList()
},
......@@ -257,7 +260,7 @@
*/
handleCurrentChange(val) {
const that = this
console.log(`当前页: ${val}`);
// console.log(`当前页: ${val}`);
that.getGroupList()
},
......@@ -265,7 +268,7 @@
* 点击失效
*/
toInvalid(info) {
console.log(info, "thisGroup");
// console.log(info, "thisGroup");
const that = this
that.$confirm('该分组失效后,不再更新数据,确认要失效吗?', '提示', {
confirmButtonText: '确定',
......@@ -286,7 +289,7 @@
* 刷新当前分组
*/
refreshGroup(obj) {
console.log(obj);
// console.log(obj);
const that = this;
const memberTagGroupId = obj.memberTagGroupId;
let params = {
......@@ -294,7 +297,7 @@
};
getRequest('/member-tag-member/findMemberList.json', params)
.then(res => {
console.log(res, 'groupinfo');
// console.log(res, 'groupinfo');
let param = {
memberTagGroupId,
memberCount: res.data.result.page.totalCount
......@@ -302,7 +305,7 @@
that.updateGroup(param, obj);
})
.catch(e => {
console.log(e, 'error');
// console.log(e, 'error');
});
},
......@@ -313,12 +316,12 @@
const that = this;
getRequest('/member-tag-group/simpleUpdate.json', pramas)
.then(res => {
console.log(res, 'updateResult');
// console.log(res, 'updateResult');
info.effectiveStatus = pramas.effectiveStatus || info.effectiveStatus;
info.memberCount = pramas.memberCount || pramas.memberCount == 0 ? pramas.memberCount : info.memberCount;
})
.catch(e => {
console.log(e, 'error');
// console.log(e, 'error');
});
},
......@@ -355,7 +358,7 @@
};
getRequest('/member-tag-group/delete.json',para)
.then((res) => {
console.log(res, "delResult");
// console.log(res, "delResult");
var resData = res.data
if (resData.errorCode == 1) {
that.groupTableData.splice(index,1);
......@@ -370,7 +373,7 @@
errMsg.errorMsg(resData);
})
.catch(function (error) {
console.log(error);
// console.log(error);
that.$message.error({
duration: 1000,
message: error.message
......@@ -390,7 +393,7 @@
};
getRequest('/member-tag-group/findList.json',para)
.then((res) => {
console.log(res, "groupList");
// console.log(res, "groupList");
var resData = res.data
if (resData.errorCode == 1) {
that.total = resData.result.totalCount;
......@@ -413,7 +416,7 @@
})
.catch(function (error) {
console.log(error);
// console.log(error);
that.$message.error({
duration: 1000,
message: error.message
......@@ -426,7 +429,6 @@
that.getGroupList()
},
components: {
// groupTransfer,
navCrumb
}
}
......
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