Commit 90d1bbf3 by 李长胜

修改重置方法,客户数据概览做权限控制

1 parent f9a02d95
......@@ -81,7 +81,7 @@
<span class="person-text">人</span>
</span>
<span>未加企微的潜在(意向)客户</span>
<button class="btn" @click="toGuideCompanyWechat">引流企微&nbsp;&nbsp;&gt;&gt;</button>
<button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel==4">引流企微&nbsp;&nbsp;&gt;&gt;</button>
</div>
</div>
</div>
......@@ -123,7 +123,7 @@
<span class="person-text">人</span>
</span>
<span>未加企微的购买(存档)客户</span>
<button class="btn" @click="toGuideCompanyWechat">引流企微&nbsp;&nbsp;&gt;&gt;</button>
<button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel==4">引流企微&nbsp;&nbsp;&gt;&gt;</button>
</div>
</div>
</div>
......@@ -259,7 +259,9 @@ export default {
timeGap: 7,
sevenDayStorage: {},
thirtyDayStorage: {},
dialogVisible: false
dialogVisible: false,
//只有门店可以引流企微
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
}
},
......@@ -286,15 +288,18 @@ export default {
}
},
async created() {
//引流过企微魔方的数据
// if (!this.isHasCustomerCountBanner) {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.accountLevel = this.$globalState.session.accountLevel
}
// 掉两个数据接口
// await this.getDataOverviewFun()
await this.getLoginCountFun()
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于0,继续显示banner;
this.getDataOverviewBarMapFun()
// }
},
methods: {
......@@ -318,14 +323,15 @@ export default {
toGuideCompanyWechat() {
// window.open('https://www.baidu.com', '_blank')
// $('.subtitle').hide()
this.dialogVisible = true
let timer = 3
setInterval(() => {
timer--
if (timer == 0) {
this.dialogVisible = false
}
}, 1000)
this.$history.push('/drainage/square/drainage')
// this.dialogVisible = true
// let timer = 3
// setInterval(() => {
// timer--
// if (timer == 0) {
// this.dialogVisible = false
// }
// }, 1000)
},
showModalLayer() {
var baseNavEle = document.querySelector('.scrm-base-nav')
......@@ -408,8 +414,8 @@ export default {
this.isBuyUp = res.purchaseUp
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于0,继续显示banner;
console.log(this.isShowModal,this.topDataObj.customerCount,'myData')
if (this.isShowModal) {
console.log(this.accountLevel,this.isShowModal,this.topDataObj.customerCount,'myData')
if (this.isShowModal && this.accountLevel==4) {
this.isHasCustomerCountBanner = true
this.$nextTick(() => {
$('img[usemap]').rwdImageMaps()
......@@ -420,7 +426,7 @@ export default {
}, 1000)
} else if (!this.isShowModal && this.topDataObj.customerCount > 0) {
this.isHasCustomerCountBanner = false
} else if (!this.isShowModal && this.topDataObj.customerCount <= 0) {
} else if (!this.isShowModal && this.topDataObj.customerCount <= 0 && this.accountLevel==4) {
this.isHasCustomerCountBanner = true
this.$nextTick(() => {
$('img[usemap]').rwdImageMaps()
......
......@@ -8,11 +8,11 @@
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
<el-button type="primary" @click="syncClick" :loading="sloading" >同步数据</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button>
</span>
</search-form>
<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" v-if="isReload" 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 class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span>
......@@ -35,6 +35,7 @@ export default {
// inject: ['reload'],
data() {
return {
isReload: true,
url: url,
sloading: false,
titles: [
......@@ -84,22 +85,22 @@ export default {
{
label: '客户群名称',
prop: 'custGroupName',
width:180
width: 180
},
{
label: '当前客户数',
prop: 'totalCount',
width:100
width: 100
},
{
label: '新增入群客户数',
prop: 'newCustomerCount',
width:120
width: 120
},
{
label: '新增退群客户数',
prop: 'delCustomerCount',
width:120
width: 120
},
{
label: '群主',
......@@ -145,7 +146,7 @@ export default {
// handler(val) {
// console.log('val值:',val)
// if(val){
// this.searchTable()
// this.searchTable()
// }
// }
// }
......@@ -192,7 +193,7 @@ export default {
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
......@@ -201,8 +202,12 @@ export default {
},
resetTable() {
this.isReload = false
this.searchForm = {}
this.$refs.clientGroupManage.refreshTable()
this.$nextTick(() => {
this.isReload = true
})
// this.$refs.clientGroupManage.refreshTable()
},
btnClick(ptype, scope) {},
goDetail(id, name) {
......
......@@ -12,7 +12,7 @@
</span>
</search-form>
<GLTable @setTableFinishFun="setTableFinishFun" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="customerName" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
......@@ -58,6 +58,7 @@ export default {
// inject: ['reload'],
data() {
return {
isReload: true,
url: url,
sloading: false,
CLIENTSTATUS: this.$Constants.CLIENT_STATUS,
......@@ -335,10 +336,14 @@ export default {
},
//重置表格
resetTable() {
this.isReload = false
this.searchForm = {}
this.$refs.clientManage.refreshTable()
this.$nextTick(() => {
this.isReload = true
})
// this.$refs.clientManage.refreshTable()
// 点击之后强制页面刷新
// this.reload()
// this.reload()
// this.$forceUpdate() // 没用
// this.$router.go(0)//没有预期效果,会出现一段空白页,用户体验不好
// location.reload() //没有预期效果,会出现一段空白页,用户体验不好
......
......@@ -29,7 +29,7 @@
</span>
</search-form>
<!-- noDataText="你当前还没有添加的标签" -->
<GLTable @setTableFinishFun="setTableFinishFun" ref="tagsManage" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="tagsManage" :hasNum="false" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span>
</span>
......@@ -149,6 +149,7 @@ export default {
}
}
return {
isReload:true,
isAllowCloseDialog: false,
isHasSameTag: false,
tagNameRules: false,
......@@ -338,9 +339,10 @@ export default {
},
closeInitPanel() {
this.isFirstShow = false
setTimeout(() => {
this.$refs.tagsManage.setTableHeightFun()
}, 200)
//不用算高度
// setTimeout(() => {
// this.$refs.tagsManage.setTableHeightFun()
// }, 200)
},
setTableHeightEvent() {
this.$refs.tagsManage.setTableHeightFun()
......@@ -352,24 +354,9 @@ export default {
item.expande = true
item.needShowExpande = false
})
// this.$refs.tagsManage.tableHeightValues = null
} else {
this.$refs.tagsManage.setTableHeightFun()
}
// this.$nextTick(() => {
// let lineHeight = 65
// console.log('6666')
// if (document.getElementById('allTagsWrap').offsetHeight > lineHeight * 2) {
// console.log('gg')
// console.log('包含该行标签的div的高度:', document.getElementById('allTagsWrap').offsetHeight)
// this.expande = false
// this.needShowExpande = true
// } else {
// this.needShowExpande = false
// this.expande = true
// }
// })
},
getLoginCountFun() {
//loginType:3是查客户数据概览浏览次数
......@@ -393,8 +380,12 @@ export default {
},
//重置表格
resetTable() {
this.isReload=false
this.searchForm = { 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel }
this.$refs.tagsManage.refreshTable()
// this.$refs.tagsManage.refreshTable()
this.$nextTick(()=>{
this.isReload=true
})
},
btnClick(pType, rowData) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!