Commit 021a4458 by Kyle_Li

update: 固化人群增加删除

parent 42fce16c
......@@ -104,6 +104,7 @@
编辑
</router-link> -->
<el-button type="text" v-if="!scope.row.fixedPile" @click="handleFixedPile(scope.row)">分堆</el-button>
<el-button type="text" @click="handleDeleteFixedPile(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......@@ -396,7 +397,10 @@
<p class="pile-info">
<span class="title">{{ dialogFixedPile.groupName }}</span>
<span class="fixed-count" v-if="dialogFixedPile.memberCount !== null">固化人数 {{ dialogFixedPile.memberCount }} 人</span>
<span class="fixed-count" v-else>暂未到达期初固化时间</span>
<el-tooltip class="item" effect="dark" placement="top" v-else>
<span slot="content">尚未达到期初固化时间的人群,不会展示分堆人数,但系统会保存您的分堆设置,当系统达到期初固化时间之后,刷新列表即可查看到分堆人数。</span>
<span class="fixed-count">暂未到达期初固化时间</span>
</el-tooltip>
<span>{{ dialogFixedPile.beginTime }} - {{ dialogFixedPile.endTime }}</span>
</p>
<el-form>
......@@ -1256,6 +1260,53 @@ export default {
name === undefined && (name = `${groupName}-${pileNames[k]}`)
return name;
});
},
handleDeleteFixedPile(row) {
if (this.reqLock) return;
this.reqLock = true;
const { fixedPile, memberTagGroupId } = row;
const { value } = fixedPile || {};
let ids = (value || []).map(item => item.groupId);
ids.unshift(memberTagGroupId);
const param = {
requestProject: 'gic-member-tag-web',
memberTagGroupIds: ids.join(',')
};
batchDeleteGroupVerify(param).then(res => {
if (res.errorCode != 1) return;
if ((res.result || []).length) return this.handleDelGroupMsg(res.result);
let html = !fixedPile
? '<span>确认删除此固化人群?</span>'
: '<div><i class="el-icon-warning" style="font-size:25px;margin-right:15px;color:#e6a23c"></i>确认删除以下分堆人群?</div>';
value && value.forEach(item => {
html += `
<div style="color:#909399;padding-top:10px">
<i class="iconfont icon-xuanze-" style="padding-left:40px"></i>
<span>${item.groupName}</span>
</div>
`
});
this.$confirm(html, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
type: !fixedPile ? 'warning' : ''
}).then(() => {
batchDeleteGroup(param).then(res => {
if (res.errorCode == 1) {
(res.result || []).length || this.$message.success({
message: '删除成功'
});
this.getGroupList();
this.handleDelGroupMsg(res.result);
}
});
})
}).finally(() => this.reqLock = false);
}
},
created() {
......
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