Commit 90747d51 by member

Merge branch 'dev' of 115.159.76.241:memberTag/memberTag-web into dev

parents 8ea6a569 c7450120
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -80,6 +80,11 @@ export default {
delTagsGroup(data) {
this.tagsGroupRelation.splice(data.tagsGroupIndex === this.selectedTagsData.length - 1 ? data.tagsGroupIndex - 1 : data.tagsGroupIndex, 1);
this.selectedTagsData.splice(data.tagsGroupIndex, 1);
// 删除一个标签组,会导致之后标签组中标签的level不再等于当前标签组的索引,即level !== index
// 所以这里重置标签的level为index,即tag.level = index
this.selectedTagsData.forEach((group, index) => {
group.forEach(tag => tag.level = index);
});
this.checkTagsGroup({ tagsGroupIndex: 0 });
},
// 添加标签
......
......@@ -22,7 +22,7 @@
<div class="tags-group__tag" v-for="(item, index) in tagsData" :key="item.tagId">
<el-tooltip>
<span>{{ item.tagName }} 【选择:{{ item.newTagVal }}</span>
<div style="width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ item.newTagVal }}</div>
<div style="max-width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ item.newTagVal }}</div>
</el-tooltip>
<i class="iconfont icon-bianji1 edit" @click="editTags(index)"></i>
<i class="iconfont icon-guanbi" @click="delTags(index)"></i>
......
......@@ -87,6 +87,17 @@
</label>
<el-date-picker class="w-220" v-model="tagConfig.date" :picker-options="pickerOptions" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期"> </el-date-picker>
</div>
<div :class="['form-item', {'margin-60': marginSixty}]">
<label for="">分组所属分类</label>
<el-select v-model="tagConfig.memberTagGroupClassifyId">
<el-option
v-for="item in memberGroupList"
:key="item.memberTagGroupClassifyId"
:value="item.memberTagGroupClassifyId"
:label="item.classifyName"
/>
</el-select>
</div>
<div class="form-item" :class="{ 'margin-60': marginSixty }">
<label for="">分组描述</label>
<el-input type="textarea" v-model="tagConfig.textarea" :maxlength="200" rows="4" placeholder="请输入内容"></el-input>
......@@ -121,7 +132,7 @@ import TagsGroupList from '../memberGroup/tags-group-list';
import TagType from './tag-type';
import TagContainer from './tag-container';
import ManualTagEdit from '../manualTag/manualTagEdit';
import { getMemberTag, getMemberTagList, addNewGroup } from '@/request/api';
import { getMemberTag, getMemberTagList, addNewGroup, memberGroupList } from '@/request/api';
import EditTag from '../memberGroup/edit-tag';
import { mapState } from 'vuex';
......@@ -147,6 +158,8 @@ export default {
refershList: {},
tagConfig: {
groupName: '',
// 会员分组分类id
memberTagGroupClassifyId: '',
textarea: '', // 描述
date: '', // 有效期
updateType: '', // 更新类型频率
......@@ -193,6 +206,8 @@ export default {
pageNum: 1,
total: 0,
// 分组分类
memberGroupList: [],
// 更新频率
rateData: [
{
......@@ -316,6 +331,7 @@ export default {
});
const param = {
groupName: this.tagConfig.groupName,
memberTagGroupClassifyId: this.tagConfig.memberTagGroupClassifyId,
isRealTime: this.tagConfig.isRealTime,
describle: this.tagConfig.textarea,
updateType: this.tagConfig.updateType,
......@@ -546,6 +562,22 @@ export default {
saveHandTagData(list) {
localStorage.setItem('middleHandtag', JSON.stringify(list));
},
getMemberGroupList() {
memberGroupList({ requestProject: 'gic-member-tag-web' })
.then(res => {
let { errorCode, message, result } = res;
if (errorCode !== 1) {
this.$message.error(message);
return;
}
result = result || [];
this.memberGroupList = result.slice(0);
this.tagConfig.memberTagGroupClassifyId = '0';
})
.catch(err => {
console.log(err);
});
}
// onLoadV() {
// localStorage.setItem('jumpThirdTag', '');
// }
......@@ -648,6 +680,7 @@ export default {
this.changeTagTitle(list.name);
});
this.defaultDate();
this.getMemberGroupList();
// if (localStorage.getItem('jumpThirdTag')) {
// console.log(1);
// let tagList = JSON.parse(localStorage.getItem('jumpThirdTag'));
......
......@@ -5,9 +5,11 @@
<el-table-column label="标签名称" prop="tagName" min-width="150">
<template slot-scope="scope">
<span class="tag-name">{{ scope.row.tagName }}</span>
<el-tooltip class="item" effect="dark" :content="scope.row.refersh ? '更新标签' : '添加标签'" placement="bottom">
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.refersh ? '更新标签' : '添加标签'" placement="bottom">-->
<el-tooltip class="item" effect="dark" content="添加标签" placement="bottom">
<!-- :class="{ 'icon-shoudonggengxin': scope.row.refersh }" -->
<i class="iconfont icon-tag-name" :class="scope.row.refersh ? 'icon-shoudonggengxin' : 'icon-jia'" @click="addTag(scope.row)"></i>
<!-- <i class="iconfont icon-tag-name" :class="scope.row.refersh ? 'icon-shoudonggengxin' : 'icon-jia'" @click="addTag(scope.row)"></i>-->
<i class="iconfont icon-tag-name icon-jia" @click="addTag(scope.row)"></i>
</el-tooltip>
</template>
</el-table-column>
......
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