Commit 30b25ccf by liuchenxi

Merge branch 'feature/9月迭代'

parents 6540da7f 0d161f77
......@@ -29,7 +29,7 @@
<script src="//web-1251519181.file.myqcloud.com/components/area-ab.2.0.00.js"></script>
<!-- <script src="//web-1251519181.file.myqcloud.com/components/card.2.0.18.js"></script> --><!-- 卡券选择器其实并没有用到 -->
<script src="//web-1251519181.file.myqcloud.com/components/selector.1.2.27.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.13.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.24.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js"></script>
</body>
</html>
......@@ -299,6 +299,36 @@
"integrity": "sha1-9PoX/F7hgxfsAadj01V4LHs5Xq8=",
"dev": true
},
"@gic-test/vue-gic-datepicker": {
"version": "1.3.8",
"resolved": "http://www.gicdev.com:7001/@gic-test/vue-gic-datepicker/download/@gic-test/vue-gic-datepicker-1.3.8.tgz",
"integrity": "sha1-LabzRGc8Gk74VT5axW3wY9rXs18=",
"dev": true,
"requires": {
"@riophae/vue-treeselect": "0.0.35",
"axios": "^0.18.0",
"element-ui": "^2.4.8",
"localforage": "^1.7.2",
"vue": "^2.5.11"
},
"dependencies": {
"@riophae/vue-treeselect": {
"version": "0.0.35",
"resolved": "https://registry.npmjs.org/@riophae/vue-treeselect/-/vue-treeselect-0.0.35.tgz",
"integrity": "sha512-MluY8JRx7yD3AE39g54HnYtcD9cxVTUsqXo6Tjs4+gq41XzlTJhyUJLsSSMtT49qonKbL6gOjK7F/wm+Y9LFQA==",
"dev": true,
"requires": {
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"easings-css": "^1.0.0",
"fuzzysearch": "^1.0.3",
"google-material-color": "^1.3.1",
"is-promise": "^2.1.0",
"lodash": "^4.0.0",
"watch-size": "^2.0.0"
}
}
}
},
"@riophae/vue-treeselect": {
"version": "0.0.29",
"resolved": "https://registry.npm.taobao.org/@riophae/vue-treeselect/download/@riophae/vue-treeselect-0.0.29.tgz",
......@@ -5738,6 +5768,23 @@
"delegate": "^3.1.2"
}
},
"google-material-color": {
"version": "1.3.1",
"resolved": "https://registry.npm.taobao.org/google-material-color/download/google-material-color-1.3.1.tgz",
"integrity": "sha1-mAgtTthq9DuzqxHEmoHrmcrKEFY=",
"dev": true,
"requires": {
"lodash": "^2.4.1"
},
"dependencies": {
"lodash": {
"version": "2.4.2",
"resolved": "https://registry.nlark.com/lodash/download/lodash-2.4.2.tgz?cache=0&sync_timestamp=1618847150612&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flodash%2Fdownload%2Flodash-2.4.2.tgz",
"integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=",
"dev": true
}
}
},
"graceful-fs": {
"version": "4.2.6",
"resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.6.tgz",
......@@ -6251,6 +6298,12 @@
"dev": true,
"optional": true
},
"immediate": {
"version": "3.0.6",
"resolved": "https://registry.nlark.com/immediate/download/immediate-3.0.6.tgz",
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=",
"dev": true
},
"import-cwd": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/import-cwd/download/import-cwd-2.1.0.tgz",
......@@ -6662,6 +6715,12 @@
"isobject": "^3.0.1"
}
},
"is-promise": {
"version": "2.2.2",
"resolved": "https://registry.npm.taobao.org/is-promise/download/is-promise-2.2.2.tgz",
"integrity": "sha1-OauVnMv5p3TPB597QMeib3YxNfE=",
"dev": true
},
"is-regex": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/is-regex/download/is-regex-1.0.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-regex%2Fdownload%2Fis-regex-1.0.5.tgz",
......@@ -6971,6 +7030,15 @@
"type-check": "~0.3.2"
}
},
"lie": {
"version": "3.1.1",
"resolved": "https://registry.npm.taobao.org/lie/download/lie-3.1.1.tgz",
"integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
"dev": true,
"requires": {
"immediate": "~3.0.5"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz",
......@@ -7059,6 +7127,15 @@
"json5": "^1.0.1"
}
},
"localforage": {
"version": "1.10.0",
"resolved": "https://registry.nlark.com/localforage/download/localforage-1.10.0.tgz",
"integrity": "sha1-XEZdxfYrKAfDqEwMahsbMhJ4HdQ=",
"dev": true,
"requires": {
"lie": "3.1.1"
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz",
......@@ -7404,6 +7481,11 @@
"minimist": "^1.2.5"
}
},
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.29.1.tgz",
"integrity": "sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M="
},
"move-concurrently": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz",
......@@ -13440,6 +13522,12 @@
"integrity": "sha1-I2vAhqhww655lG8QfxbeWdWJXnE=",
"dev": true
},
"watch-size": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/watch-size/download/watch-size-2.0.0.tgz",
"integrity": "sha1-CW7ijQNlvX6gPZyL8fL1CnO+FHQ=",
"dev": true
},
"watchpack": {
"version": "1.7.5",
"resolved": "https://registry.npm.taobao.org/watchpack/download/watchpack-1.7.5.tgz",
......
......@@ -13,6 +13,7 @@
"dependencies": {
"element-ui": "^2.8.2",
"file-saver": "^1.3.8",
"moment": "^2.29.1",
"tinymce": "^4.8.3",
"vue": "^2.5.2",
"vue-clipboard2": "^0.2.0",
......
......@@ -35,6 +35,8 @@ export default {
this.axios.get(`${this.baseUrl}/api-auth/get-login-user-info?requestProject=gic-member-tag-web`).then((res) => {
if (res.data.errorCode == 0) {
const uId = res.data.result && res.data.result.userId;
const isSuperAdmin = res.data.result && res.data.result.superAdmin;
this.$store.commit('changeSuperAdmin', isSuperAdmin);
if (this.uniqueId === '') {
this.$store.commit('changeUniqueId', uId);
}
......
......@@ -460,7 +460,12 @@ export default {
this.templateData[0].checkeditems = itemArr;
tagValue.val[0].data.value = itemArr.join(' ');
}
if (code === 'tag025' && that.templateData.length === 1) {
that.postTemplateData.selectedVal [0] = that.templateData[0].isAgree?'是':'否';
tagValue.val[0].data.key =that.templateData[0].ids.length?'consentPrivacyProtocolConfigId': 'consentPrivacyProtocol';
tagValue.val[0].data.compute = that.templateData[0].ids.length?'in':'=';
tagValue.val[0].data.value = that.templateData[0].ids.length?that.templateData[0].ids.join(' '):that.templateData[0].isAgree;
}
/**
* 商品选择必选
*/
......@@ -472,7 +477,6 @@ export default {
this.$message.warning('商品选择器未选择条件!')
return false;
}
console.log(this.com022.conditionsList);
tagValue.val[0].data.compute = this[code].postCompute;
tagValue.val[0].data.key = this.currentKey;
tagValue.val[0].data.dealKey = 'goodsSeletor';
......@@ -1066,9 +1070,9 @@ export default {
if (code === 'com023' || code === 'com024') {
tagValue.val[0].data.compute = code === 'com024' ? 'in' : this[code].postCompute;
tagValue.val[0].data.dealKey = "card";
tagValue.val[0].data.key = this.currentKey;
tagValue.val[0].data.key = this.currentKey;
tagValue.val[0].data.value = this.cardListData.map(el => el.coupCardId).join(' ');
this.postTemplateData.selectedVal = this.cardListData.map(el => el.cardName).join(' ');
this.postTemplateData.selectedVal = this.cardListData.map(el => el.cardName).join('$^');
}
code === 'com024' &&
(tagValue = {
......@@ -1253,12 +1257,18 @@ export default {
}
item[tag] = newNum;
},
/**
* 选择相对时段
*/
timeRadioChange(e,parent){
if(this.currentKey==='haobanWechatRelatedTime')parent.timeAfterChecked=parent.timeRadio==='1'?true:false
},
/**
* 天/月/年 RadioChange
*/
timeRadioChange(e, parent) {
// 每次改变选择,清空原有的值
if(this.currentKey==='haobanWechatRelatedTime')parent.timeAfterChecked=parent.timeRadio==='1'?true:false
parent.timeInput = '';
},
......@@ -1286,10 +1296,10 @@ export default {
}
// 月
if (newNum > 24 && radio == 2) {
newNum = 12;
newNum = 24;
}
// 年
if (newNum > 3 && radio == 3) {
if (newNum >= 3 && radio == 3) {
newNum = 2;
}
parent.timeInput = newNum;
......
......@@ -317,3 +317,38 @@ export const delTrashList = (params = {}) =>
...params
}
});
// 是否开启自动同步开关
export const isAutomaticSync = (params = {}) =>
request({
url: '/memberTag/isAutoSyncWm',
method: 'get',
params: {
requestProject: 'gic-member-tag-web',
...params
}
});
// 手工标签同步标签
export const getSyncTag = (params = {}) =>
request({
url: '/tagLevel/findGroupLevelPage',
method: 'get',
params: {
requestProject: 'gic-member-tag-web',
...params
}
// data: qs.stringify(params)
})
// 手工标签更新同步标签
export const updateSyncTag = (params = {}) =>
request({
url: '/tagLevel/updateSyncWmFlag',
method: 'get',
params: {
requestProject: 'gic-member-tag-web',
...params
}
// data: qs.stringify(params)
})
......@@ -65,6 +65,14 @@ export const constantRouterMap = [
}
},
{
path: '/syncTagHistory',
component: _import('manualTag', 'syncTagHistory'),
name: '同步标签',
meta: {
title: '会员标签-同步标签'
}
},
{
path: '/manualTagDetail',
component: _import('manualTag', 'manualTagDetail'),
name: '手工标签详情',
......@@ -170,4 +178,4 @@ export const constantRouterMap = [
export default new Router({
routes: constantRouterMap,
scrollBehavior: () => ({ y: 0 })
});
\ No newline at end of file
});
......@@ -10,7 +10,8 @@ export default new Vuex.Store({
title: '',
show: false,
tagRealName: '',
uniqueId: ''
uniqueId: '',
isSuperAdmin: 0
},
mutations: {
[types.LOGIN]: (state, data) => {
......@@ -32,6 +33,9 @@ export default new Vuex.Store({
},
['changeUniqueId'](state, id) {
state.uniqueId = id || '';
},
['changeSuperAdmin'](state, data) {
state.isSuperAdmin = data;
}
}
});
<template>
<div class="common-wrap syncTag">
<nav-crumb :navpath="navpath"></nav-crumb>
<div class="right-content" v-loading="loading">
<div class="right-box">
<div class="title">
<el-input class="w220" @change="onSearch" v-model="searchVal" placeholder="请输入标签分类名称" prefix-icon="el-icon-search" />
<el-button type="primary" class="add-btn" @click="dialogData.dialogVisible = true">添加标签分类</el-button>
<span>添加标签分类后,分类下面所有会员标签均会同步至微盟</span>
</div>
<div class="sync-content">
<el-table :data="tableData">
<el-table-column label="标签分类" prop="levelName"></el-table-column>
<el-table-column label="标签分组" prop="">
<template slot-scope="{ row }"> {{ row.parentLevelGroupId ? groupName(row.parentLevelGroupId) : "--" }} </template>
</el-table-column>
<el-table-column label="添加时间" prop="flagUpdateTime">
<template slot-scope="{ row }">{{ row.flagUpdateTime ? dateformat(new Date(row.flagUpdateTime), 'yyyy-MM-dd hh:mm:ss') : '--' }}</template>
</el-table-column>
<el-table-column label="操作" v-if="false">
<template slot-scope="{ row }"><el-button type="text" @click="cancelSync(row)">取消同步</el-button></template>
</el-table-column>
</el-table>
<el-pagination
style="text-align: right;padding: 28px 0"
background
hide-on-single-page
@size-change="onSizeChange"
@current-change="onCurrentChange"
:current-page="currentPage"
:page-sizes="[20, 40, 60, 80]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</div>
</div>
</div>
<el-dialog :visible.sync="dialogData.dialogVisible" width="1000px">
<template slot="title">
<p class="el-dialog__title">添加分类标签<span class="tip">仅查询未同步的标签</span></p>
</template>
<div class="dialog_contetn" v-loading="dialogData.loading">
<el-input class="w220 mb20" prefix-icon="el-icon-search" @change="onDialogSearch" v-model="dialogData.searchTagVal" placeholder="请输入标签分类名称" />
<el-table :data="dialogData.tagTableData">
<el-table-column label="序号" prop="index"></el-table-column>
<el-table-column label="标签分类" prop="levelName"></el-table-column>
<el-table-column label="标签分组" prop="">
<template slot-scope="{ row }"> {{ row.parentLevelGroupId ? groupName(row.parentLevelGroupId) : "--" }} </template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="{ row }">
<el-button type="text" @click="addSyncTag(row)">添加</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
hide-on-single-page
style="text-align: right;margin: 28px 0 8px"
layout="prev, pager, next"
:current-page="dialogData.currentPage"
:page-size="5"
@current-change="onDialogPageChange"
:total="dialogData.total">
</el-pagination>
</div>
<template slot="footer">
<el-button type="primary" @click="dialogData.dialogVisible = false">关闭</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav.vue';
import { dateformat } from '@/utils/formatTime';
import { getSyncTag, updateSyncTag } from '@/request/api';
export default {
name: 'syncTagHistory',
data() {
return {
navpath: [
{
name: '首页',
path: `${window.location.origin}/report/#/memberSummary`,
relocation: true
},
{
name: '会员管理',
path: ''
},
{
name: '会员标签',
path: `/member-tag`
},
{
name: '同步标签',
path: ''
}
],
// -----------------pageData---------------------
tableData: [],
currentPage: 1,
pageSize: 20,
total: 0,
searchVal: '',
loading: false,
dateformat,
// -----------------dialogData---------------------
dialogData: {
dialogVisible: false,
tagTableData: [],
total: 0,
currentPage: 1,
searchTagVal: '',
loading: false
}
};
},
components: {
navCrumb
},
mounted() {
this.getTableData();
},
methods: {
// ----------------------Page-----------------------
cancelSync(row) {
this.$confirm('取消同步后,该分类下的标签将不会再同步至微盟,并且该分类下已同步至微盟侧的会员标签将同步从微盟侧删除,是否继续取消?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(_ => {
const para = {
tagLevelGroupId: row.tagLevelGroupId,
syncWmFlag: 0
};
updateSyncTag(para).then(res => {
this.$message.success('取消同步成功');
if(this.tableData.length == 1) {
this.currentPage = this.currentPage - 1 || 1;
};
this.getTableData();
})
}).catch(_ => {});
},
getTableData() {
this.loading = true;
const para = {
search: this.searchVal,
syncWmFlag: 1,
pageNum: this.currentPage,
pageSize: this.pageSize
};
getSyncTag(para).then(res => {
const resData = res.result;
this.tableData = resData.result || [];
this.total = resData.totalCount;
}).finally(() => this.loading = false);
},
onCurrentChange(val) {
this.currentPage = val;
this.getTableData();
},
onSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
this.getTableData();
},
onSearch() {
this.currentPage = 1;
this.getTableData();
},
// ----------------------dialog---------------------
// 获取dialog表格数据
getDiaglogTableData() {
this.dialogData.loading = true;
const para = {
search: this.dialogData.searchTagVal,
syncWmFlag: 0,
pageSize: 5,
pageNum: this.dialogData.currentPage
};
getSyncTag(para).then(res => {
const resData = res.result;
const listData = resData.result || [];
this.dialogData.tagTableData = listData.map((el, index) => {
el.index = this.sortIndex(index + 1);
return el;
});
this.dialogData.total = resData.totalCount;
}).finally(() => this.dialogData.loading = false);
},
onDialogPageChange(val) {
this.dialogData.currentPage = val;
this.getDiaglogTableData();
},
addSyncTag(row) {
const para = {
tagLevelGroupId: row.tagLevelGroupId,
syncWmFlag: 1
};
updateSyncTag(para).then(res => {
this.$message.success('同步成功');
if(this.dialogData.tagTableData.length == 1) {
this.dialogData.currentPage = this.dialogData.currentPage - 1 || 1;
};
this.getDiaglogTableData();
})
},
onDialogSearch() {
this.dialogData.currentPage = 1;
this.getDiaglogTableData();
}
},
computed: {
sortIndex() {
return index => ((this.dialogData.currentPage - 1) * 5 + index);
},
groupName() {
return id => (id == "3d11ac15963b4c0790762e6147ea9312" ? '导购标签' : id == "a3a4ed179ed3435fab33f5952d021b6d" ? "其他" : "--");
}
},
watch: {
'dialogData.dialogVisible' (newVal) {
if(newVal) {
this.dialogData.searchTagVal = '';
this.dialogData.currentPage = 1;
this.getDiaglogTableData();
} else {
this.getTableData();
}
}
}
};
</script>
<style lang="scss" scoped>
.syncTag {
.w220 {
width: 220px;
}
.mb20 {
margin-bottom: 20px;
}
span {
font-size: 14px;
}
.right-box {
padding: 0 !important;
}
.title {
padding: 22px 24px 18px;
border-bottom: 2px solid #edeff2;
.add-btn {
margin: 0 6px;
}
}
.sync-content {
padding: 24px;
}
.tip {
color: #909399;
margin-left: 10px;
}
}
</style>
......@@ -10,10 +10,11 @@
</p>
<p class="tag-desc">{{ tagDataAssgin.tagDescribe }}</p>
</div>
<p v-if="tagId" class="m-t-20 m-b-20 tag-config">标签值设置</p>
<p v-if="tagId" class="m-t-20 m-b-20 tag-config">标签值设置<el-tooltip v-if="tagDataAssgin.columnKey==='haobanWechatRelatedTime'||(Object.keys(tagDataAssgin).length&&tagDataAssgin.tagValue&&JSON.parse(tagDataAssgin.tagValue).val[0].data.key==='haobanWechatRelatedTime')" popper-class="edit-tag-tooltip" placement="top" open-delay="100" effect="light"
><div slot="content"><span style="font-weight:600">固定时段:</span>在所选时间段内首次添加导购企微好友的;<br/><span style="font-weight:600">相对时段:</span>相对于“标签统计时间”(每天凌晨计算统计一次)的前X天/月/年内首次添加导购企微好友的,例:选择相对时段为“最近2天”,那么系统在5号凌晨进行统计时,统计的是在3号、4号首次添加导购企微好友的顾客;系统在6号凌晨统计时,统计的是4号、5号首次添加导购企微好友的顾客。</div><i class="iconfont icon-tishi"></i></el-tooltip></p>
<!-- 所有标签的配置项 -->
<div class="tag-config-options">
<tag-config-options v-if="isAddFlag" :creatorId="creatorId" :tagId="tagDataAssgin.tagId" ref="tagConfig" :templateDataList="templateObj" @returnTagData="returnTagData"></tag-config-options>
<tag-config-options v-if="isAddFlag" :creatorId="creatorId" :tagId="tagDataAssgin.tagId" :columnKey="tagDataAssgin.columnKey" ref="tagConfig" :templateDataList="templateObj" @returnTagData="returnTagData"></tag-config-options>
</div>
</div>
<span slot="footer" class="dialog-footer">
......@@ -130,6 +131,10 @@ export default {
.tag-config {
font-size: 14px;
color: #606266;
.iconfont.icon-tishi{
margin-left: 5px;
color: #909399;
}
}
.tag-config-options {
max-height: 50vh;
......@@ -143,3 +148,20 @@ export default {
}
}
</style>
<style>
/* tooltip */
.edit-tag-tooltip.el-tooltip__popper.is-light{
max-width: 400px;
padding: 16px;
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 20px;
border: none;
border-radius: 2px;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
}
.edit-tag-tooltip.el-tooltip__popper.is-light .popper__arrow{
border: none;
}
</style>
......@@ -118,6 +118,9 @@ export default {
// 处理分层
handleChangeLevel(i, list) {
this.currentLevelIndex = i;
// 重置其他组的选项
this.currentIndex = -2;
this.currentFixedIndex = -2;
this.$emit('second-list', { list: list, isTag: true });
},
// 分层
......@@ -147,6 +150,9 @@ export default {
this.classTagName = 'tag-name';
this.active = false;
this.currentIndex = i;
// 重置其他组的选项
this.currentLevelIndex = -2;
this.currentFixedIndex = -2;
// 第二级的分组数据
this.$emit('second-list', list);
},
......@@ -154,6 +160,9 @@ export default {
this.classTagName = 'tag-name';
this.active = false;
this.currentFixedIndex = i;
// 重置其他组的选项
this.currentLevelIndex = -2;
this.currentIndex = -2;
this.$emit('second-list', { isFixed: true, list });
},
/**
......@@ -314,12 +323,14 @@ export default {
handleExpend() {
this.currentIndex = -1;
this.currentLevelIndex = -2;
this.currentFixedIndex = -2;
this.expendTxt = this.expendTxt === '展开' ? '收起' : '展开';
this.$emit('second-list', 'all');
},
handleExpendTag() {
this.currentLevelIndex = -1;
this.currentIndex = -2;
this.currentFixedIndex = -2;
this.expendTxtTag = this.expendTxtTag === '展开' ? '收起' : '展开';
this.$emit('second-list', 'allLevel');
},
......
......@@ -8,9 +8,9 @@
</div> -->
<transition name="fade" mode="out-in">
<!-- 缓存已经填好内容的页面 -->
<!-- <keep-alive include="editGroupGrade"> -->
<keep-alive include="memberGroupList">
<router-view></router-view>
<!-- </keep-alive > -->
</keep-alive >
</transition>
</div>
</div>
......
......@@ -649,6 +649,17 @@ export default {
this.dialogFixedPile.proportions = proportions;
this.dialogFixedPile.proportion = proportions[0] || '';
this.dialogFixedPile.groupNames = names;
},
// 该页面用keeyalive缓存 通过路由判断调用哪个列表接口
'$route'(to,from) {
if(to.path.indexOf('memberGroupList') > -1) {
if(from.path.indexOf('memberLevelDetail') > -1) {
this._gradeList(this.memberTagGradeId);
} else {
this.getGroupList();
this._groupCount();
}
}
}
},
filters: {
......@@ -660,10 +671,10 @@ export default {
return '';
},
formatTimeYMD(data) {
return data && data != '- -' ? data.split(' ')[0] : '--';
return data && data != '- -' ? String(data).split(' ')[0] : '--';
},
formatTimeHMS(data) {
return data && data != '- -' ? data.split(' ')[1] : '--';
return data && data != '- -' ? String(data).split(' ')[1] : '--';
},
formatNum(data) {
const reg = /\d{1,3}(?=(\d{3})+$)/g;
......@@ -1396,8 +1407,6 @@ export default {
memberTagGroupClassifyId: '',
fixedType: 0
};
},
mounted() {
this.getGroupList();
this._groupCount();
},
......
......@@ -21,8 +21,8 @@
<draggable v-model="tagsData" group="article" style="height: 100%" @end="dragTag" :move="checkMove" :sort="false" :data-index="tagsGroupIndex">
<div class="tags-group__tag" v-for="(item, index) in tagsData" :key="item.tagId">
<el-tooltip>
<span>{{ item.tagName }} 【选择:{{ item.newTagVal }}</span>
<div style="max-width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ item.newTagVal }}</div>
<span>{{ item.tagName }} 【选择:{{ item.newTagVal.replace(/\$\^/g,' ') }}</span>
<div style="max-width: 400px;font-size: 14px" slot="content">{{ item.tagName }} 【选择:{{ item.newTagVal.replace(/\$\^/g,' ') }}</div>
</el-tooltip>
<i class="iconfont icon-bianji1 edit" @click="editTags(index)"></i>
<i class="iconfont icon-guanbi" @click="delTags(index)"></i>
......
......@@ -22,6 +22,7 @@
<!--{{ tagName }}-->
{{showSearchResult ? `【${tagName}】搜索结果` : tagName}}
<el-button type="primary" class="add-newtag" @click="editHandTag()" v-show="handTag == 1 && !weimId.includes(groupId || params.id)">新增标签</el-button>
<el-button type="primary" class="add-newtag" @click="$router.push('/syncTagHistory')" v-if="handTag == 1 && $store.state.isSuperAdmin && !isSync">同步标签</el-button>
<!-- <a href="http://demogic.udesk.cn/hc/articles/221271?api_name=&preview=true&preview_as_role=admin&theme_id=18093" target="_blank" class="help-doc">查看帮助文档</a> -->
<a href="https://www.yuque.com/exnmlu/hpbb1c/cz27hs" target="_blank" class="help-doc">查看帮助文档</a>
</p>
......@@ -153,7 +154,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, memberGroupList, groupCount, getMemberTagGradeEnsure } from '@/request/api';
import { getMemberTag, getMemberTagList, addNewGroup, memberGroupList, groupCount, getMemberTagGradeEnsure, isAutomaticSync } from '@/request/api';
import EditTag from '../memberGroup/edit-tag';
import { mapState } from 'vuex';
import Trash from '@/components/Trash.vue';
......@@ -303,7 +304,8 @@ export default {
tagTwoLevelGroupId: ''
},
memberTagGradeEnsure: true, // 是否开启会员分层
weimId: [ '3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf' ]
weimId: [ '3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf' ],
isSync: false // 是否开启自动同步开关
};
},
......@@ -636,7 +638,15 @@ export default {
.catch(err => {
console.log(err);
});
}
},
// 是否开启自动同步
getSyncFlag() {
isAutomaticSync({}).then(res => {
if(res.errorCode === 1) {
this.isSync = res.result;
}
})
},
// onLoadV() {
// localStorage.setItem('jumpThirdTag', '');
// }
......@@ -744,6 +754,7 @@ export default {
this.defaultDate();
this.getMemberGroupList();
this.getMemberTagGradeEnsure();
this.getSyncFlag();
// if (localStorage.getItem('jumpThirdTag')) {
// console.log(1);
// let tagList = JSON.parse(localStorage.getItem('jumpThirdTag'));
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
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