Commit 96b3f575 by 杨北旺

修改关联页面的样式

1 parent 1cf5cd62
...@@ -5,6 +5,58 @@ ...@@ -5,6 +5,58 @@
<span class="min-title">关联之后不允许修改,请谨慎操作!</span> <span class="min-title">关联之后不允许修改,请谨慎操作!</span>
</div> </div>
<div class="page-wrapper"> <div class="page-wrapper">
<div class="box_wrap">
<div class="title">
<span>选择你要绑定的商户账户</span>
<img @mouseenter="showTip1 = true" @mouseleave="showTip1 = false" src="../../assets/img/question.png" />
</div>
<div class="select_wrapper">
<div class="label">商户账户</div>
<el-cascader ref="cascaderRef1" placeholder="请选择商户/门店" @change="getCurMerchant" :show-all-levels="false" v-model="shopName" :props="mypropParam1" :options="shopList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.label.length > 18 ? false : true" class="item" effect="light" :content="data.label" placement="top-end">
<div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.label }}</div>
</el-tooltip>
</template>
</el-cascader>
</div>
<div v-if="showTip1" class="tipContentClass">
<div class="title">说明</div>
<p class="h20_title">只有账户状态正常的门店和商户才允许关联,如未开通,请联系您的专属顾问</p>
<div class="single"></div>
<div class="single1"></div>
</div>
</div>
<div class="icon_wrap">
<img src="../../assets/scrm_jh_icon.png" />
</div>
<div class="box_wrap">
<div class="title">
<span>选择你要绑定的企微门店</span>
<img @mouseenter="showTip2 = true" @mouseleave="showTip2 = false" src="../../assets/img/question.png" />
</div>
<div class="select_wrapper">
<div class="label">企业微信</div>
<el-cascader ref="cascaderRef" @change="getCurDepartment" placeholder="请选择企微门店" :show-all-levels="false" v-model="selectedDepartment" :props="mypropsParam" :options="departmentList" size="small" style="width: 320px" separator=" " filterable>
<template slot-scope="{ data }">
<el-tooltip popper-class="myToolTipClass" style="border: none" :disabled="data.departmentName.length > 18 ? false : true" class="item" effect="light" :content="data.departmentName" placement="top-end">
<div class="limitText" style="width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">{{ data.departmentName }}</div>
</el-tooltip>
</template>
</el-cascader>
</div>
<div v-if="showTip2" class="tipContentClass">
<div class="title">说明</div>
<p class="h20_title">企业微信授权成功后,企业微信相关内容才会显示</p>
<div class="single"></div>
<div class="single1"></div>
</div>
</div>
<div class="icon_wrap">
<el-button type="purple" size="small" icon="el-icon-link" @click="handlerGL">关联</el-button>
</div>
</div>
<!-- <div class="page-wrapper">
<div class="wrap-title"> <div class="wrap-title">
<span>选择你要绑定的商户/门店</span> <span>选择你要绑定的商户/门店</span>
<span class="wrap-min-title">(只有账户状态正常的门店和商户才允许关联,如未开通,请联系您的专属顾问)</span> <span class="wrap-min-title">(只有账户状态正常的门店和商户才允许关联,如未开通,请联系您的专属顾问)</span>
...@@ -25,7 +77,7 @@ ...@@ -25,7 +77,7 @@
<div class="btn-wrap"> <div class="btn-wrap">
<el-button type="purple" size="small" icon="el-icon-link" @click="handlerGL">关联</el-button> <el-button type="purple" size="small" icon="el-icon-link" @click="handlerGL">关联</el-button>
</div> </div>
</div> </div> -->
<div class="tbale-wrapper"> <div class="tbale-wrapper">
<div class="wrap-title"> <div class="wrap-title">
<span>绑定的商户/门店</span> <span>绑定的商户/门店</span>
...@@ -40,10 +92,13 @@ ...@@ -40,10 +92,13 @@
</div> </div>
</div> </div>
<div style="height: 64px"></div> <div style="height: 64px"></div>
<div class="fixed-footer" :style="{ <div
class="fixed-footer"
:style="{
left: footerLeft + 'px', left: footerLeft + 'px',
width: footerWidth + 'px', width: footerWidth + 'px'
}"> }"
>
<div :style="{ width: customWidth + 'px' }" class="btn-custom" @click="closeCurRouter">取消</div> <div :style="{ width: customWidth + 'px' }" class="btn-custom" @click="closeCurRouter">取消</div>
<div style="width: 20px"></div> <div style="width: 20px"></div>
<div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div> <div :style="{ width: customWidth + 'px' }" ref="btnWidth" class="btn-custom pruple" @click="handleMutiGL">确定关联({{ dataList.length }})</div>
...@@ -90,7 +145,9 @@ export default { ...@@ -90,7 +145,9 @@ export default {
dataList: [], dataList: [],
customWidth: 113, customWidth: 113,
shopName: '', shopName: '',
selectedDepartment: '' selectedDepartment: '',
showTip1: false,
showTip2: false
} }
}, },
...@@ -125,13 +182,13 @@ export default { ...@@ -125,13 +182,13 @@ export default {
this.$refs.cascaderRef.dropDownVisible = false this.$refs.cascaderRef.dropDownVisible = false
}, },
getDepartmentList() { getDepartmentList() {
this.$apis.baseInfo.getDepartment({ id: 1,flag:true }).then(res => { this.$apis.baseInfo.getDepartment({ id: 1, flag: true }).then(res => {
this.departmentList = this.traverse(1,res, 'relevanceMerchant') this.departmentList = this.traverse(1, res, 'relevanceMerchant')
}) })
}, },
getMerchantList() { getMerchantList() {
this.$apis.baseInfo.getMerchantTree({}).then(res => { this.$apis.baseInfo.getMerchantTree({}).then(res => {
this.shopList = this.traverse(2,res, 'entmicroName', 'merchantAccountLevel') this.shopList = this.traverse(2, res, 'entmicroName', 'merchantAccountLevel')
}) })
}, },
// 关联当前选择的 // 关联当前选择的
...@@ -216,7 +273,7 @@ export default { ...@@ -216,7 +273,7 @@ export default {
}) })
let all = [...arrpara1, ...arrpara2, ...arrpara3] let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all) let para = Object.assign({}, ...all)
this.$apis.baseInfo.toGL(para).then(res => { this.$apis.baseInfo.toGL(para).then(res => {
if (res) { if (res) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
...@@ -254,15 +311,15 @@ export default { ...@@ -254,15 +311,15 @@ export default {
}) })
}, },
// 递归:处理层级数组 // 递归:处理层级数组
traverse(type,arr, string1, string2, arr1 = []) { traverse(type, arr, string1, string2, arr1 = []) {
arr.map(item => { arr.map(item => {
if (item[string1] || (item[string2] != 4&&type==2)) { if (item[string1] || (item[string2] != 4 && type == 2)) {
item.disabled = true item.disabled = true
} else { } else {
item.disabled = false item.disabled = false
} }
if (item.children && item.children instanceof Array) { if (item.children && item.children instanceof Array) {
this.traverse(type,item.children, string1, string2, (arr1 = [])) this.traverse(type, item.children, string1, string2, (arr1 = []))
} }
return item return item
}) })
...@@ -277,10 +334,10 @@ export default { ...@@ -277,10 +334,10 @@ export default {
}, },
mounted() { mounted() {
this.footerLeft = document.querySelector(".base-container-right").offsetLeft; this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft; this.footerWidth = document.documentElement.clientWidth - this.footerLeft
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -302,12 +359,110 @@ export default { ...@@ -302,12 +359,110 @@ export default {
} }
.page-wrapper { .page-wrapper {
width: 100%; width: 100%;
height: 320px; // height: 320px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
box-sizing: border-box; box-sizing: border-box;
padding: 32px 0 0 20px; // padding: 32px 0 0 20px;
padding: 20px 0 40px 40px;
margin-top: 20px; margin-top: 20px;
display: flex;
.box_wrap {
width: 35%;
height: 100%;
position: relative;
.title {
font-size: 16px;
font-weight: 400;
color: #666666;
margin-bottom: 16px;
display: flex;
align-items: center;
> img {
cursor: pointer;
width: 14px;
height: 14px;
margin-left: 4px;
}
}
.select_wrapper {
display: flex;
align-items: center;
.label {
box-sizing: border-box;
padding-right: 10px;
font-size: 14px;
font-weight: 400;
color: #333333;
text-align: right;
}
}
.tipContentClass {
position: absolute;
right: -50px;
top: -15px;
width: 236px;
// height: 94px;
background: #ffffff;
box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 3px 6px -4px rgba(0, 0, 0, 0.12);
border: 1px solid #e4e7ed;
z-index: 999;
box-sizing: border-box;
padding: 10px 9px;
.h20_title {
font-size: 12px;
font-weight: 400;
color: #666666;
}
.title {
font-size: 12px;
font-weight: bold;
color: #333333;
z-index: 999;
position: relative;
}
> p {
z-index: 999;
position: relative;
margin-top: 10px;
line-height: 18px;
}
.single {
position: absolute;
left: -5px;
top: 15px;
// transform: translate(0, -50%);
width: 10px;
height: 10px;
background: #ffffff;
transform: rotate(-60deg);
border: 1px solid #e4e7ed;
z-index: -1;
}
.single1 {
position: absolute;
left: 0px;
top: 50%;
transform: translate(0, -50%);
width: 20px;
height: 100%;
background: #ffffff;
z-index: 22;
}
}
}
.icon_wrap {
display: flex;
align-items: flex-end;
justify-content: center;
height: 65.09px;
padding: 0 52px;
> img {
width: 24px;
height: 24px;
margin-bottom: 6px;
}
}
.sel-wrap { .sel-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -323,7 +478,7 @@ export default { ...@@ -323,7 +478,7 @@ export default {
} }
} }
.sel-wrap /deep/ .el-cascader-node { .sel-wrap /deep/ .el-cascader-node {
max-width: 250px!important; max-width: 250px !important;
} }
.btn-wrap { .btn-wrap {
padding-left: 20px; padding-left: 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!