Commit 2c232544 by xiaohai

优化修改

parent 1c2c9ecd
......@@ -224,7 +224,7 @@
*/
getGroupList() {
const that = this;
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}`)
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}`)
.then(res => {
if (res.data.errorCode == 1) {
that.tableData = that.tableData.concat(res.data.result.result);
......@@ -267,6 +267,13 @@
},
selectToTransfer() {
if (this.selectionToTransfer.length < 1) {
this.$message.error({
duration: 1000,
message: '请选择分组!'
});
return false;
}
this.selectedData = this.uniqueByGroupId(this.selectedData.concat(this.selectionToTransfer)); // 数组拼接并去重
this.getMemberCountByGroups();
this.$emit('handleDataTransferred', this.selectedData, this.selectionToTransfer);
......@@ -308,6 +315,13 @@
},
selectToRemove() {
if (this.selectionToRemove.length < 1) {
this.$message.error({
duration: 1000,
message: '请选择分组!'
});
return false;
}
let seleced = this.selectedData;
let setection = this.selectionToRemove;
let aSet = new Set(seleced);
......
......@@ -18,6 +18,7 @@
<div class="common-wrap__table m-t-20">
<el-table
v-loading="loading"
:row-class-name="setRowClassName"
ref="multipleTable"
:data="groupTableData"
tooltip-effect="dark"
......@@ -59,7 +60,7 @@
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 + '号' : '每月一次')}} -->
<template v-if="scope.row.isRealTime == 1">
<template v-if="scope.row.isRealTime == 0">
{{scope.row.updateType, scope.row.updateDay | formatUpdateFrequency}}
</template>
<template v-else>
......@@ -148,6 +149,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() {
......@@ -181,6 +183,9 @@
loading: false
}
},
created() {
this.loading = true;
},
filters: {
formatTimeYMD(data) {
return data && data != '- -' ? data.split(' ')[0] : '--';
......@@ -211,6 +216,12 @@
}
},
methods: {
setRowClassName({row, rowIndex}) {
console.log(row, rowIndex);
// if (rowIndex === 1) {
// return 'row-need-loading';
// }
},
/**
*
*/
......@@ -432,15 +443,17 @@
})
that.groupTableData = resData.result.result
that.loading = false;
// showMsg.showmsg('保存成功','success')
return;
}
that.loading = false;
errMsg.errorMsg(resData)
})
.catch(function (error) {
// console.log(error);
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
......@@ -453,11 +466,10 @@
that.getGroupList()
},
components: {
groupTransfer,
navCrumb
}
}
</script>
<style lang="scss" scoped>
<style lang="scss">
</style>
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