Commit dbaca312 by xiaohai

细节优化

parent 20dddfda
......@@ -24,6 +24,7 @@
</div>
<div class="memberGroupDetail-wrap__table">
<el-table
v-loading="loading"
:data="memberGroupDetailData"
style="width: 100%">
<div v-for="(item,index) in selectedFields" :key="index">
......@@ -247,6 +248,7 @@
name: "memberGroupDetail",
data() {
return {
loading: false,
// 面包屑参数
navpath: [
{
......@@ -302,6 +304,9 @@
baseUrl: ""
}
},
created() {
this.loading = true;
},
computed: {
},
......@@ -386,6 +391,7 @@
})
return false;
}
that.loading = true;
let fields = data.join(",");
that.selectedUserDefined = data;
that.showUserDefined = false;
......@@ -458,9 +464,11 @@
}
});
}
that.loading = false;
})
.catch(e => {
console.log(e, 'error of get group detail');
that.loading = false;
});
},
/**
......@@ -474,12 +482,13 @@
* 获取头像处显示信息
*/
showSingleInfo(memberId) {
console.log(memberId);
const that = this
const para = {
memberId: memberId
}
that.singleInfo = '';
that.axios.post(`${that.baseUrl}/api-member/load-member-single-info?requestProject='memberTag'`, para)
that.axios.post(`${that.baseUrl}/api-member/load-member-single-info?requestProject=memberTag`, para)
.then((res) => {
const resData = res.data
if (resData.errorCode == 0) {
......
......@@ -17,6 +17,7 @@
</div>
<div class="common-wrap__table m-t-20">
<el-table
v-loading="loading"
ref="multipleTable"
:data="groupTableData"
tooltip-effect="dark"
......@@ -176,7 +177,8 @@
currentPage: 1,
pageSize: 20,
total: 0,
groupSetShow: false
groupSetShow: false,
loading: false
}
},
filters: {
......@@ -280,6 +282,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.loading = true;
let pramas = {
effectiveStatus: '0',
memberTagGroupId: info.memberTagGroupId
......@@ -296,6 +299,7 @@
refreshGroup(obj) {
// console.log(obj);
const that = this;
that.loading = true;
const memberTagGroupId = obj.memberTagGroupId;
let params = {
memberTagGroupId,
......@@ -310,6 +314,7 @@
that.updateGroup(param, obj);
})
.catch(e => {
that.loading = false;
// console.log(e, 'error');
});
},
......@@ -324,9 +329,16 @@
// console.log(res, 'updateResult');
info.effectiveStatus = pramas.effectiveStatus || info.effectiveStatus;
info.memberCount = pramas.memberCount || pramas.memberCount == 0 ? pramas.memberCount : info.memberCount;
that.loading = false;
that.$message.success({
duration: 1000,
message: '操作成功!'
});
that.loading = false;
})
.catch(e => {
// console.log(e, 'error');
that.loading = false;
});
},
......@@ -349,6 +361,7 @@
type: 'warning'
}).then(() => {
// that.groupTableData.splice(index,1)
that.loading = true;
that.delGroup(obj.memberTagGroupId, index);
}).catch(() => {});
},
......@@ -365,8 +378,13 @@
.then((res) => {
// console.log(res, "delResult");
var resData = res.data
that.loading = false;
if (resData.errorCode == 1) {
that.groupTableData.splice(index,1);
that.$message.success({
duration: 1000,
message: '删除成功!'
});
return;
} else if (resData.errorCode == 200003) {
that.$confirm(`该分组正在被活动使用,无法删除!`, '提示', {
......@@ -378,11 +396,12 @@
errMsg.errorMsg(resData);
})
.catch(function (error) {
that.loading = false;
// console.log(error);
that.$message.error({
duration: 1000,
message: error.message
})
});
});
},
......
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