Commit 02079b6f by liuchenxi

update: 分组优化

parent 1ecdaad1
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</el-form-item> </el-form-item>
<el-form-item label prop="fixedType"> <el-form-item label prop="fixedType">
<div class="label-title m-b-15">是否固化<el-link class="m-l-16" type="primary" :underline="false" target="_blank" href="https://www.yuque.com/exnmlu/hpbb1c/ke8o0d">什么是固化?</el-link></div> <div class="label-title m-b-15">是否固化<el-link class="m-l-16" type="primary" :underline="false" target="_blank" href="https://www.yuque.com/exnmlu/hpbb1c/ke8o0d">什么是固化?</el-link></div>
<el-radio-group v-model="ruleForm.fixedType" class="radio-group"> <el-radio-group v-model="ruleForm.fixedType" class="radio-group" :disabled="$route.query.memberTagGroupId">
<el-radio :label="0" class="m-b-0"></el-radio> <el-radio :label="0" class="m-b-0"></el-radio>
<el-radio :label="1" class="m-b-0"></el-radio> <el-radio :label="1" class="m-b-0"></el-radio>
</el-radio-group> </el-radio-group>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</el-form-item> </el-form-item>
<el-form-item label prop="isTogether" v-if="ruleForm.fixedType"> <el-form-item label prop="isTogether" v-if="ruleForm.fixedType">
<div class="label-title m-b-15">是否同时生成非固化分组</div> <div class="label-title m-b-15">是否同时生成非固化分组</div>
<el-radio-group v-model="ruleForm.isTogether" class="radio-group"> <el-radio-group v-model="ruleForm.isTogether" class="radio-group" :disabled="$route.query.memberTagGroupId">
<el-radio :label="false" class="m-b-0"></el-radio> <el-radio :label="false" class="m-b-0"></el-radio>
<el-radio :label="true" class="m-b-0"></el-radio> <el-radio :label="true" class="m-b-0"></el-radio>
</el-radio-group> </el-radio-group>
......
<template> <template>
<div class="member-group"> <div class="member-group">
<div class="flex"> <div class="flex">
<el-tabs v-model="activeType" class="tabs" @tab-click="onTabClick"> <el-tabs v-model="activeType" class="tabs" ref="fixedGroup" @tab-click="onTabClick">
<el-tab-pane label="我的客户分组" name="1"></el-tab-pane> <el-tab-pane label="我的客户分组" name="1"></el-tab-pane>
<el-tab-pane label="固化分组" name="2"></el-tab-pane> <el-tab-pane label="固化分组" name="2"></el-tab-pane>
<el-tab-pane label="金字塔客户分组" name="3"></el-tab-pane> <el-tab-pane label="金字塔客户分组" name="3"></el-tab-pane>
...@@ -316,7 +316,8 @@ ...@@ -316,7 +316,8 @@
<el-table-column prop="updateTime" min-width="110" label="最近编辑时间"> <el-table-column prop="updateTime" min-width="110" label="最近编辑时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.updateTime || '--' }} <p class="h-18">{{ scope.row.updateTime ? dateformat(new Date(scope.row.updateTime), 'yyyy-MM-dd') : '--' }}</p>
<p class="h-18">{{ scope.row.updateTime ? dateformat(new Date(scope.row.updateTime), 'hh:mm:ss') : '--' }}</p>
</template> </template>
</el-table-column> </el-table-column>
...@@ -688,7 +689,6 @@ export default { ...@@ -688,7 +689,6 @@ export default {
dateformat dateformat
}; };
}, },
watch: { watch: {
tagSearch(newval) { tagSearch(newval) {
this.params.groupName = newval; this.params.groupName = newval;
...@@ -958,7 +958,6 @@ export default { ...@@ -958,7 +958,6 @@ export default {
this.groupTableData = res.result.result.map(el => ({ this.groupTableData = res.result.result.map(el => ({
...el, ...el,
createTime: timeFormat.timeToDateTime(el.createTime), createTime: timeFormat.timeToDateTime(el.createTime),
updateTime: timeFormat.timeToDateTime(el.updateTime),
})); }));
} else { } else {
this.groupTableData = []; this.groupTableData = [];
...@@ -978,7 +977,6 @@ export default { ...@@ -978,7 +977,6 @@ export default {
this.groupTableData = res.result.result.map(el => ({ this.groupTableData = res.result.result.map(el => ({
...el, ...el,
createTime: timeFormat.timeToDateTime(el.createTime), createTime: timeFormat.timeToDateTime(el.createTime),
updateTime: timeFormat.timeToDateTime(el.updateTime),
})); }));
} else { } else {
this.groupTableData = []; this.groupTableData = [];
...@@ -1329,7 +1327,6 @@ export default { ...@@ -1329,7 +1327,6 @@ export default {
...el, ...el,
latestUpdateTime: !!el.latestUpdateTime ? el.latestUpdateTime : '--', latestUpdateTime: !!el.latestUpdateTime ? el.latestUpdateTime : '--',
createTime: timeFormat.timeToDateTime(el.createTime), createTime: timeFormat.timeToDateTime(el.createTime),
updateTime: timeFormat.timeToDateTime(el.updateTime),
})); }));
this.canEdit = (this.groupTableData[0] || {}).canEdit || false; this.canEdit = (this.groupTableData[0] || {}).canEdit || false;
} }
...@@ -1496,9 +1493,19 @@ export default { ...@@ -1496,9 +1493,19 @@ export default {
memberTagGroupClassifyId: '', memberTagGroupClassifyId: '',
fixedType: 0 fixedType: 0
}; };
this.getGroupList(); if (this.$route.query.type != 'fixed') {
this.getGroupList();
}
this._groupCount(); this._groupCount();
}, },
mounted() {
if (this.$route.query.type == 'fixed') {
this.loading = true;
this.$nextTick(() => {
this.$refs.fixedGroup.$el.querySelector('#tab-2').click();
})
}
},
computed: { computed: {
pileCounts() { pileCounts() {
let info = this.dialogFixedPile; let info = this.dialogFixedPile;
......
...@@ -495,7 +495,9 @@ export default { ...@@ -495,7 +495,9 @@ export default {
addNewGroup(param) addNewGroup(param)
.then(res => { .then(res => {
if (res.errorCode == 1) { if (res.errorCode == 1) {
this.$router.push({ path: 'memberGroupList' }); console.log(this.tagConfig.fixedType);
const type = this.tagConfig.fixedType ? 'fixed' : '';
this.$router.push({ path: 'memberGroupList', query: { type } });
} }
}) })
.catch(err => { .catch(err => {
...@@ -1029,7 +1031,7 @@ export default { ...@@ -1029,7 +1031,7 @@ export default {
.group-right-list { .group-right-list {
position: fixed; position: fixed;
width: 600px; width: 600px;
top: 0px; top: 50px;
right: -600px; right: -600px;
bottom: 0px; bottom: 0px;
box-shadow: 0 0 5px #bbb; box-shadow: 0 0 5px #bbb;
...@@ -1058,7 +1060,6 @@ export default { ...@@ -1058,7 +1060,6 @@ export default {
margin-bottom: 17px; margin-bottom: 17px;
.desc { .desc {
display: inline-block; display: inline-block;
width: 400px;
font-size: 12px; font-size: 12px;
color: #606266; color: #606266;
line-height: 17px; line-height: 17px;
......
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