Commit e524705c by 李长胜

客户管理修改bug

1 parent 38f193b0
// module.exports = {
// presets: ["@vue/cli-plugin-babel/preset"]
// };
const plugins = ["@vue/babel-plugin-transform-vue-jsx"]
// 生产环境移除console
if(process.env.NODE_ENV === 'production' ) {
plugins.push("transform-remove-console")
}
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"] plugins: plugins,
}; presets: [
[
'@vue/app', {
modules: false,
targets: {
browsers: ["> 1%", "last 2 versions", "not ie <= 8", "Android >= 4", "iOS >= 8"]
},
useBuiltIns: 'entry',
}, "@vue/cli-plugin-babel/preset"
]
]
}
\ No newline at end of file \ No newline at end of file
...@@ -14,8 +14,9 @@ ...@@ -14,8 +14,9 @@
"echarts": "^5.2.0", "echarts": "^5.2.0",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.1.2", "glsx-components": "^1.1.8",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"jquery": "^3.6.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
"@vue/eslint-config-prettier": "^5.0.0", "@vue/eslint-config-prettier": "^5.0.0",
"babel-eslint": "^10.0.3", "babel-eslint": "^10.0.3",
"babel-plugin-component": "^1.1.1", "babel-plugin-component": "^1.1.1",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^5.16.0", "eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1", "eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0", "eslint-plugin-vue": "^5.0.0",
......
...@@ -26,10 +26,10 @@ export default { ...@@ -26,10 +26,10 @@ export default {
data() { data() {
return { return {
dateArray: [], dateArray: [],
customerCount: [], //全部客户 customerCount: [], //新增客户
customerRatio: [], //全部环比 customerRatio: [], //新增客户环比
entmicroCount: [], //企微客户 entmicroCount: [], //新增企微客户
entmicroRatio: [] //企微客户环比 entmicroRatio: [] //新增企微客户环比
} }
}, },
mounted() { mounted() {
...@@ -37,10 +37,10 @@ export default { ...@@ -37,10 +37,10 @@ export default {
if (this.totalData && this.totalData.length > 0) { if (this.totalData && this.totalData.length > 0) {
this.dateArray = this.totalData.map(item => item.dateTime) //日期 this.dateArray = this.totalData.map(item => item.dateTime) //日期
this.customerCount = this.totalData.map(item => item.newCustomerCount) this.customerCount = this.totalData.map(item => item.newCustomerCount)
this.customerRatio = this.totalData.map(item => item.customerRatio) this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount) this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio) this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart() this.initChart()
} }
...@@ -52,10 +52,10 @@ export default { ...@@ -52,10 +52,10 @@ export default {
handler(val) { handler(val) {
this.dateArray = this.totalData.map(item => item.dateTime) //日期 this.dateArray = this.totalData.map(item => item.dateTime) //日期
this.customerCount = this.totalData.map(item => item.newCustomerCount) this.customerCount = this.totalData.map(item => item.newCustomerCount)
this.customerRatio = this.totalData.map(item => item.customerRatio) this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount) this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio) this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart() this.initChart()
} }
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
formatter: function(datas) { formatter: function(datas) {
var res = datas[0].name + '<br/>' var res = datas[0].name + '<br/>'
for (var i = 0, length = datas.length; i < length; i++) { for (var i = 0, length = datas.length; i < length; i++) {
if (datas[i].seriesName == '全部客户' || datas[i].seriesName == '企微客户') { if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') {
res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>' res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
} else { } else {
res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>' res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
...@@ -111,7 +111,8 @@ export default { ...@@ -111,7 +111,8 @@ export default {
// show: true // show: true
// }, // },
itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。 // data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。
inactiveColor: '#ccc' //图例关闭时的颜色。 inactiveColor: '#ccc' //图例关闭时的颜色。
}, },
grid: { grid: {
...@@ -205,7 +206,7 @@ export default { ...@@ -205,7 +206,7 @@ export default {
], ],
series: [ series: [
{ {
name: '全部客户', name: '新增客户',
type: 'bar', type: 'bar',
data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600], data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label: { label: {
...@@ -219,7 +220,7 @@ export default { ...@@ -219,7 +220,7 @@ export default {
} }
}, },
{ {
name: '全部客户环比', name: '新增客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
data: this.customerRatio, //[2.0, 2.2, -3.3, 4.5, 6.3, -10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2], data: this.customerRatio, //[2.0, 2.2, -3.3, 4.5, 6.3, -10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2],
...@@ -228,7 +229,7 @@ export default { ...@@ -228,7 +229,7 @@ export default {
} }
}, },
{ {
name: '企微客户', name: '新增企微客户',
type: 'bar', type: 'bar',
data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000], data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000],
itemStyle: { itemStyle: {
...@@ -241,7 +242,7 @@ export default { ...@@ -241,7 +242,7 @@ export default {
} }
}, },
{ {
name: '企微客户环比', name: '新增企微客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
data: this.entmicroRatio, //[2.6, 2.2, 3.0, 3.8, 6.8, 10.9, 18.3, 23.0, 23.9, 16.0, 10.0, 8.2], data: this.entmicroRatio, //[2.6, 2.2, 3.0, 3.8, 6.8, 10.9, 18.3, 23.0, 23.9, 16.0, 10.0, 8.2],
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<div class="firstRowBtn" v-if="!expande && isShowBtns"> <div class="firstRowBtn" v-if="!expande && isShowBtns">
<el-button plain @click="resetTable" size="small">重置</el-button> <el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button> <el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="ploading" size="small" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
<el-button type="primary" @click="syncClick" :loading="ploading" size="small" >同步数据</el-button>
</div> </div>
<div class="itemWidth"> <div class="itemWidth">
<el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''"> <el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''">
......
...@@ -3,14 +3,16 @@ ...@@ -3,14 +3,16 @@
<template v-if="isShowModal"> <template v-if="isShowModal">
<div class="modalLayer"></div> <div class="modalLayer"></div>
<img class="tipPanel" src="@/assets/clientDataOverview/allPicture.png" alt="" /> <img class="tipPanel" src="@/assets/clientDataOverview/allPicture.png" alt="" />
<!-- <img class="arrow" src="@/assets/clientDataOverview/arrow.png" alt="" v-show="isShowModal" /> -->
<!-- <button class="knewBtn" v-show="isShowModal" @click="btnKnewClick">我知道啦</button> -->
<img class="knewBtn" src="@/assets/clientDataOverview/btnBg.png" @click="btnKnewClick" /> <img class="knewBtn" src="@/assets/clientDataOverview/btnBg.png" @click="btnKnewClick" />
</template> </template>
<!-- @click="goNextPage" -->
<div class="bannerWrapBox" @click="goNextPage" v-if="!isHasCustomerCountBanner"> <div class="bannerWrapBox" v-if="isHasCustomerCountBanner">
<!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> --> <!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> -->
<img class="bannerWrap" src="@/assets/clientDataOverview/companyBanner.png" alt="" /> <img class="bannerWrap" usemap="#planetmap" src="@/assets/clientDataOverview/companyBanner.png" alt="" />
<map name="planetmap" id="planetmap" style="cursor: pointer;">
<!-- 0-200m onclick="getCorePhoth('1')" -->
<area shape="rect" coords="849,97,933,121" href="https://www.baidu.com" target="_blank" />
</map>
</div> </div>
<h3 class="pageSubTitle">客户分层</h3> <h3 class="pageSubTitle">客户分层</h3>
<div class="topmsg"> <div class="topmsg">
...@@ -264,6 +266,12 @@ export default { ...@@ -264,6 +266,12 @@ export default {
mounted() { mounted() {
document.body.style.overflow = 'hidden' document.body.style.overflow = 'hidden'
// this.$nextTick(()=>{
// $(document).ready(function (e) {
// console.log('....')
// $('img[usemap]').rwdImageMaps();
// });
// })
}, },
computed: { computed: {
isEmptyObj() { isEmptyObj() {
...@@ -284,12 +292,12 @@ export default { ...@@ -284,12 +292,12 @@ export default {
return 0 return 0
} }
}, },
created() { async created() {
this.getLoginCountFun()
//引流过企微魔方的数据 //引流过企微魔方的数据
// if (!this.isHasCustomerCountBanner) { // if (!this.isHasCustomerCountBanner) {
// 掉两个数据接口 // 掉两个数据接口
this.getDataOverviewFun() await this.getDataOverviewFun()
await this.getLoginCountFun()
this.getDataOverviewBarMapFun() this.getDataOverviewBarMapFun()
// } // }
}, },
...@@ -376,14 +384,12 @@ export default { ...@@ -376,14 +384,12 @@ export default {
if (!res) { if (!res) {
return return
} }
this.isShowModal = res this.isShowModal = res
if (this.isShowModal) { // this.isShowModal = res
if (res) {
setTimeout(() => { setTimeout(() => {
// this.$nextTick(() => {
this.showModalLayer() this.showModalLayer()
// }) }, 1000)
}, 300)
} }
}) })
}, },
...@@ -392,6 +398,7 @@ export default { ...@@ -392,6 +398,7 @@ export default {
// const res = await getDataOverview() // const res = await getDataOverview()
getDataOverview({}).then(res => { getDataOverview({}).then(res => {
if (!res) { if (!res) {
this.isHasCustomerCountBanner = true
return return
} }
console.log('上面', res) console.log('上面', res)
...@@ -405,7 +412,10 @@ export default { ...@@ -405,7 +412,10 @@ export default {
console.log(res, '这是上面数据') console.log(res, '这是上面数据')
this.isNoBuyUp = res.purposeUp this.isNoBuyUp = res.purposeUp
this.isBuyUp = res.purchaseUp this.isBuyUp = res.purchaseUp
if (this.topDataObj.customerCount > 0) { if (this.topDataObj.customerCount > 0) {
this.isHasCustomerCountBanner = false
} else {
this.isHasCustomerCountBanner = true this.isHasCustomerCountBanner = true
} }
console.log(this.isHasCustomerCountBanner, 'true/fasle') console.log(this.isHasCustomerCountBanner, 'true/fasle')
......
/*
* rwdImageMaps jQuery plugin v1.6
*
* Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize
*
* Copyright (c) 2016 Matt Stow
* https://github.com/stowball/jQuery-rwdImageMaps
* http://mattstow.com
* Licensed under the MIT license
*/
;(function($) {
$.fn.rwdImageMaps = function() {
var $img = this;
var rwdImageMap = function() {
$img.each(function() {
if (typeof($(this).attr('usemap')) == 'undefined')
return;
var that = this,
$that = $(that);
// Since WebKit doesn't know the height until after the image has loaded, perform everything in an onload copy
$('<img />').on('load', function() {
var attrW = 'width',
attrH = 'height',
w = $that.attr(attrW),
h = $that.attr(attrH);
if (!w || !h) {
var temp = new Image();
temp.src = $that.attr('src');
if (!w)
w = temp.width;
if (!h)
h = temp.height;
}
var wPercent = $that.width()/100,
hPercent = $that.height()/100,
map = $that.attr('usemap').replace('#', ''),
c = 'coords';
$('map[name="' + map + '"]').find('area').each(function() {
var $this = $(this);
if (!$this.data(c))
$this.data(c, $this.attr(c));
var coords = $this.data(c).split(','),
coordsPercent = new Array(coords.length);
for (var i = 0; i < coordsPercent.length; ++i) {
if (i % 2 === 0)
coordsPercent[i] = parseInt(((coords[i]/w)*100)*wPercent);
else
coordsPercent[i] = parseInt(((coords[i]/h)*100)*hPercent);
}
$this.attr(c, coordsPercent.toString());
});
}).attr('src', $that.attr('src'));
});
};
$(window).resize(rwdImageMap).trigger('resize');
return this;
};
})(jQuery);
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<span>客户列表</span> <span>客户列表</span>
<span>{{ clientTableDataNum || 0 }}个</span> <span>{{ clientTableDataNum || 0 }}个</span>
</p> </p>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<!-- :size="btn_size" --> <!-- :size="btn_size" -->
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
...@@ -183,7 +183,8 @@ export default { ...@@ -183,7 +183,8 @@ export default {
} }
}, },
getListApi: getDetailTableList, getListApi: getDetailTableList,
clientTableDataNum: 0 clientTableDataNum: 0,
flushTime: false
} }
}, },
created() { created() {
...@@ -192,6 +193,11 @@ export default { ...@@ -192,6 +193,11 @@ export default {
id: this.$route.query.id id: this.$route.query.id
} }
}, },
mounted() {
// this.$nextTick(() => {
// this.searchTable()
// })
},
methods: { methods: {
async getTableDetail(id = this.$route.query.id) { async getTableDetail(id = this.$route.query.id) {
...@@ -205,6 +211,7 @@ export default { ...@@ -205,6 +211,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(this.searchForm) console.log(this.searchForm)
if (this.searchForm.daterange) { if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0] this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1] this.searchForm.endTime = this.searchForm.daterange[1]
...@@ -216,13 +223,18 @@ export default { ...@@ -216,13 +223,18 @@ export default {
}) })
}, },
setTableHeightEvent() { setTableHeightEvent() {
// this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
//content是第一页的数据 //content是第一页的数据
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
if (!this.flushTime) {
this.flushTime = true
// setTimeout(() => {
// this.searchTable()
// }, 3000)
}
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.clientGroupDetail.data.length) { if (!this.$refs.clientGroupDetail.data.length) {
this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.setTableHeightFun()
......
...@@ -7,14 +7,11 @@ ...@@ -7,14 +7,11 @@
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
<el-button type="primary" @click="syncClick" :loading="sloading" >同步数据</el-button>
</span> </span>
</search-form> </search-form>
<!-- <basic-table ref="clientGroupTable" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :hasNum="true">
<span slot="table-button" slot-scope="scope">
<el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
</span>
</basic-table> -->
<GLTable @setTableFinishFun="setTableFinishFun" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable @setTableFinishFun="setTableFinishFun" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> --> <!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
...@@ -38,7 +35,6 @@ export default { ...@@ -38,7 +35,6 @@ export default {
data() { data() {
return { return {
url: url, url: url,
sloading: false, sloading: false,
titles: [ titles: [
{ name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' }, { name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' },
...@@ -117,14 +113,6 @@ export default { ...@@ -117,14 +113,6 @@ export default {
tableOption: { tableOption: {
width: 170, width: 170,
btnList: [ btnList: [
// {
// name: "编辑",
// pType: "edit",
// },
// {
// name: "删除",
// pType: "delete",
// },
{ {
name: '详情', name: '详情',
pType: 'detail' pType: 'detail'
...@@ -133,7 +121,7 @@ export default { ...@@ -133,7 +121,7 @@ export default {
} }
}, },
getListApi: getTableList, getListApi: getTableList,
setHeight: '',
merchantModel: 1, merchantModel: 1,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
flushTime: false flushTime: false
...@@ -146,13 +134,7 @@ export default { ...@@ -146,13 +134,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
}, },
mounted() { mounted() {},
// setTimeout(() => {
// if (!this.$refs.clientGroupManage.data.length) {
// this.$refs.clientGroupManage.setTableHeightFun()
// }
// }, 400)
},
methods: { methods: {
syncClick() { syncClick() {
let _this = this let _this = this
...@@ -179,6 +161,7 @@ export default { ...@@ -179,6 +161,7 @@ export default {
this.flushTime = true this.flushTime = true
this.searchTable() this.searchTable()
} }
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.clientGroupManage.data.length) { if (!this.$refs.clientGroupManage.data.length) {
this.$refs.clientGroupManage.setTableHeightFun() this.$refs.clientGroupManage.setTableHeightFun()
...@@ -240,24 +223,6 @@ export default { ...@@ -240,24 +223,6 @@ export default {
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 20px;
} }
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// border: none;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// font-weight: 400;
// color: #666666;
// }
// .glsx-table {
// margin-top: 20px;
// }
} }
} }
</style> </style>
...@@ -260,7 +260,8 @@ export default { ...@@ -260,7 +260,8 @@ export default {
storeTagList: [], storeTagList: [],
merchantId: 10001001, merchantId: 10001001,
merchantModel: 1, //集团:1,门店:2 merchantModel: 1, //集团:1,门店:2
userType: 0 //1是商户,2是员工 userType: 0, //1是商户,2是员工
userid:0 //小龙需要用户id
} }
}, },
created() { created() {
...@@ -338,12 +339,13 @@ export default { ...@@ -338,12 +339,13 @@ export default {
if (!res) { if (!res) {
return false return false
} }
this.userid=res.userid;
this.leftPanelInfo = res.info this.leftPanelInfo = res.info
this.vehicleTableData = res.vehicleInfoList || [] this.vehicleTableData = res.vehicleInfoList || []
this.employTableList = res.staffFollows || [] this.employTableList = res.staffFollows || []
this.clientGroupTableList = res.customerBases || [] this.clientGroupTableList = res.customerBases || []
this.tagsList = res.labels || [] this.tagsList = res.labels || []
this.labelIdList = res.labels.map(item => item.labelId) this.labelIdList = (res.labels || []).map(item => item.labelId)
}, },
goNewTag() { goNewTag() {
this.$router.push({ path: '/tagsManage/index' }) this.$router.push({ path: '/tagsManage/index' })
...@@ -411,23 +413,15 @@ export default { ...@@ -411,23 +413,15 @@ export default {
this.handleClose() this.handleClose()
}, },
handleConfirm() { handleConfirm() {
// if (this.roleForm.tagsList.length <= 0) {
// this.$message.warning('至少要添加一个标签')
// return false
// }
//后台要求循环掉接口 //后台要求循环掉接口
//满足条件进行提交 //满足条件进行提交
// let param = {
// 'req.OneId': 14120314541863,
// 'req.labelGroupId':55555,
// 'req.labelIdList':[1,3,5]
// }
this.submitTagsList.forEach((item, index) => { this.submitTagsList.forEach((item, index) => {
let param = { let param = {
'req.OneId': this.$route.query.id, 'req.OneId': this.$route.query.id,
'req.labelGroupId': item.labelGroup.id, 'req.labelGroupId': item.labelGroup.id,
'req.edition': this.merchantModel 'req.edition': this.merchantModel,
'req.merchantId': this.merchantId,
'req.staffId':this.userid
// 'req.labelIdList': item.labelList.map(ele => ele.id) // 'req.labelIdList': item.labelList.map(ele => ele.id)
} }
var ids = item.labelList.map(ele => ele.id) var ids = item.labelList.map(ele => ele.id)
...@@ -440,7 +434,8 @@ export default { ...@@ -440,7 +434,8 @@ export default {
this.$message.success('添加成功') this.$message.success('添加成功')
this.handleClose() this.handleClose()
this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.$route.query.id, this.merchantId)
this.getPageDetail() //刷新当前页面
} }
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" 不做判定了, 允许所有人同步 -->
<el-button type="primary" @click="syncClick" :loading="sloading" >同步数据</el-button>
</span> </span>
</search-form> </search-form>
...@@ -250,7 +251,6 @@ export default { ...@@ -250,7 +251,6 @@ export default {
this.flushTime = true this.flushTime = true
this.searchTable() this.searchTable()
} }
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.clientManage.data.length) { if (!this.$refs.clientManage.data.length) {
this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.setTableHeightFun()
......
...@@ -538,7 +538,7 @@ export default { ...@@ -538,7 +538,7 @@ export default {
param['labelDTO.labelGroup.id'] = this.tagGroupId param['labelDTO.labelGroup.id'] = this.tagGroupId
param['labelDTO.labelGroup.name'] = this.tagForm.tagsName param['labelDTO.labelGroup.name'] = this.tagForm.tagsName
param['labelDTO.labelType'] = this.tagForm.initTagsGroup param['labelDTO.labelType'] = this.tagForm.initTagsGroup == 1 ? '企业标签' : '自店标签'
let editTagList = this.editTagList.map(item => { let editTagList = this.editTagList.map(item => {
return { return {
id: item.id, id: item.id,
......
const path = require('path') const path = require('path')
const webpack = require('webpack')
const packageName = require('./package.json').name const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL; // const baseUrl = process.env.VUE_APP_BASE_URL;
...@@ -30,9 +31,18 @@ module.exports = { ...@@ -30,9 +31,18 @@ module.exports = {
'@': resolve('src'), '@': resolve('src'),
assets: resolve('src/assets'), assets: resolve('src/assets'),
views: resolve('src/views'), views: resolve('src/views'),
components: resolve('src/components') components: resolve('src/components'),
// 'jquery': 'jquery'
} }
}, },
plugins: [
new webpack.ProvidePlugin({
$: 'jquery', // 创建 '$'、'jQuery'、'window.jQuery' 三个变量指向依赖jquery
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
],
output: { output: {
library: `${packageName}-[name]`, library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式 libraryTarget: 'umd', // 把微应用打包成 umd 库格式
...@@ -46,7 +56,10 @@ module.exports = { ...@@ -46,7 +56,10 @@ module.exports = {
'axios': 'axios', 'axios': 'axios',
'echarts': 'echarts' 'echarts': 'echarts'
} }
}, },
devServer: { devServer: {
hot: true, hot: true,
disableHostCheck: true, disableHostCheck: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!