Commit fb818580 by 杨北旺

角色

1 parent b0ee8f5e
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getMerchantTree = params => {
params.method = 'org.ore.api.common.findMerchantTreeByMerchantNo.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getDepartment = params => {
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const toGL = params => {
params.method = 'org.ore.api.common.relevanceEntmicro.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const merchantInfo = params => {
params.method = 'org.ore.api.common.findMerchantInfoByMerchantNo.list'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMerchantTree,
getDepartment,
toGL,
merchantInfo
}
\ No newline at end of file \ No newline at end of file
...@@ -61,11 +61,31 @@ const createRole = params => { ...@@ -61,11 +61,31 @@ const createRole = params => {
sign: true sign: true
}) })
} }
const updateRole = params => {
params.method = 'org.ore.api.role.update'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
const deleteRole = params => {
params.method = 'org.ore.api.role.deleteById'
return http({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
roleDataList, roleDataList,
merchantDataList, merchantDataList,
roleInfoData, roleInfoData,
roleTreeDataById, roleTreeDataById,
merchantRootById, merchantRootById,
createRole createRole,
updateRole,
deleteRole
} }
\ No newline at end of file \ No newline at end of file
...@@ -33,6 +33,18 @@ const staticRoutes = Object.freeze([{ ...@@ -33,6 +33,18 @@ const staticRoutes = Object.freeze([{
path: '/role/index/look', path: '/role/index/look',
component: resolve => require([`@/views/role/index/look.vue`], resolve), component: resolve => require([`@/views/role/index/look.vue`], resolve),
meta: {} meta: {}
} },
{
name: 'baseInfo',
path: '/baseInfo/index',
component: resolve => require([`@/views/baseInfo/index.vue`], resolve),
meta: {}
},
{
name: 'baseInfo',
path: '/baseInfo/relevance',
component: resolve => require([`@/views/baseInfo/relevance.vue`], resolve),
meta: {}
},
]) ])
export default staticRoutes export default staticRoutes
\ No newline at end of file \ No newline at end of file
<template>
<div class="bloc-info-module">
<div class="wrapper">
<div class="wrap_left">
<div class="out_box_wrap">
<div class="fixed_widget">
<div class="label_text">版本:{{ bloc.merchantModelName || '--'}}</div>
<div class="label_text dr_top">
开通门店数:
<span v-if="bloc.numberStores" class="num_text">{{ bloc.numberStores }}家</span>
<span v-else class="num_text">--</span>
</div>
<div class="label_text dr_top">门店详情</div>
</div>
<div :class="isOpen ? 'table_wrapper_open' : 'table_wrapper_close'">
<!-- <GLTable v-if="isOpen" :hasPage="false" :tableParams="tableParams" :tableData="list" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"></GLTable> -->
<template v-if="isOpen">
<div class="line_wrapper wrap_header">
<div class="tittle text_w">序号</div>
<div class="tittle1 text_w">门店名称</div>
<div class="tittle2 text_w">有效期</div>
</div>
<div class="line_body">
<template v-if="list.length">
<div v-for="(item, index) in list" :key="index" class="line_wrapper">
<div class="tittle">{{ index + 1 }}</div>
<div class="tittle1">{{ item.merchantName }}</div>
<div class="tittle2">{{ item.date }}</div>
</div>
</template>
<template v-if="!list.length">
<div class="line_wrapper">暂无数据</div>
</template>
</div>
</template>
</div>
<div class="fixed_footer" @click="changeRightOpenStatus(isOpen)">
<i :class="isOpen ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"></i>
<span class="dr_left">{{ isOpen ? '隐藏门店详情' : '展开门店详情' }}</span>
</div>
</div>
</div>
<!-- <div class="wrap_right">
<div v-for="(item, index) in rightData" :key="index" class="out_box_wrap">
<div class="fixed_widget">
<div class="label_text">版本:{{ item.name }}</div>
<div class="label_text dr_top">
开通门店数:
<span class="num_text">{{ item.num }}家</span>
</div>
<div class="label_text dr_top">门店详情</div>
</div>
<div :class="item.open ? 'table_wrapper_open' : 'table_wrapper_close'">
<glsx-table v-if="item.open" :hasPage="false" :tableParams="tableParams" :tableData="item.list" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"></glsx-table>
</div>
<div class="fixed_footer" @click="changeRightOpenStatus(item, index)">
<i :class="item.open ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"></i>
<span class="dr_left">{{ item.open ? '隐藏门店详情' : '展开门店详情' }}</span>
</div>
</div>
</div> -->
</div>
</div>
</template>
<script>
export default {
name: '',
data() {
return {
curOpenIndex: 0,
dataList: [],
leftData: [],
rightData: [],
tableParams: {
listName: 'list',
tableColumns: [
{
label: '门店名称',
prop: 'merchantName'
},
{
label: '有效期',
prop: 'date'
}
]
},
isOpen: false
}
},
props: {
list: Array,
bloc: null
},
methods: {
// changeLeftOpenStatus(item, index) {
// this.leftData[index].open = !item.open
// },
changeRightOpenStatus(isOpen) {
this.isOpen = !isOpen
},
// handlerData() {
// let arr = this.dataList
// let left = []
// let right = []
// arr.forEach((item, index) => {
// if (index % 2 == 0) {
// left.push(item)
// } else {
// right.push(item)
// }
// })
// this.leftData = left
// this.rightData = right
// console.log(left)
// console.log(right)
// }
},
mounted() {}
}
</script>
<style lang="scss" scoped>
.bloc-info-module {
box-sizing: border-box;
padding: 20px 0 0 40px;
}
.wrapper {
display: flex;
flex-wrap: wrap;
.wrap_left,
.wrap_right {
// min-width: 44.8%;
min-width: 520px;
min-height: 176px;
}
.wrap_left {
margin-right: 40px;
}
}
.out_box_wrap {
width: 100%;
min-height: 176px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
border-radius: 10px;
border: 1px solid #e5e4ff;
margin: 0 40px 40px 0;
.fixed_widget {
width: 100%;
height: 140px;
box-sizing: border-box;
padding: 20px 0 0 20px;
.label_text {
color: #333333;
font-size: 14px;
font-weight: 400;
}
.num_text {
font-size: 14px;
font-weight: 400;
color: #5850ff;
}
.dr_top {
margin-top: 20px;
}
}
.table_wrapper_close {
height: 0;
// transition: height 0.1s ease-in-out;
}
.table_wrapper_open {
height: 378px;
// transition: height 0.1s ease-in-out;
}
.line_wrapper {
width: 100%;
min-height: 54px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
color: #909399;
font-size: 14px;
border-bottom: 1px solid #dcdfe6;
.tittle {
width: 20%;
text-align: center;
color: #333333;
font-size: 14px;
}
.tittle1 {
width: 40%;
text-align: center;
color: #333333;
font-size: 14px;
word-wrap: break-word;
word-break: break-all;
overflow: hidden;
}
.tittle2 {
width: 40%;
text-align: center;
color: #333333;
font-size: 14px;
}
}
.wrap_header {
background: #f4f6fc;
}
.text_w {
font-weight: bold;
}
.line_body {
width: 100%;
height: 324px;
overflow-y: auto;
overflow-x: hidden;
}
.line_body::-webkit-scrollbar {
height: 1px;
width: 8px;
}
.line_body::-webkit-scrollbar-thumb {
background: #e9e8ff;
border-radius: 7px;
}
.fixed_footer {
width: 100%;
height: 36px;
background: #f4f6fc;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 400;
color: #b9b8c7;
border-radius: 0px 0px 10px 10px;
cursor: pointer;
.dr_left {
margin-left: 12px;
}
}
}
// .bloc-info-module /deep/ .el-table__body-wrapper {
// height: 352px;
// overflow-y: auto;
// overflow-x: hidden;
// }
// .bloc-info-module /deep/ .el-table__body-wrapper::-webkit-scrollbar {
// height: 1px;
// width: 8px;
// }
// .bloc-info-module /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
// background: #e9e8ff;
// border-radius: 7px;
// }
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="out_main">
<!-- <div class="base-info-index"> -->
<div class="top_widget">
<img class="sign_icon" src="../../assets/scrm_base_info_icon_one.png" />
<div class="info_widget">
<div class="title_text">
{{ blocInfo.merchantName }}
<span class="min_text">(商户号:{{ blocInfo.merchantNo }})</span>
</div>
<div class="sec_title_text dr_top_1">
<span>关联企微:{{ blocInfo.entmicroName || '--' }}</span>
<div v-if="blocInfo.entmicroName" class="auth_btn" :class="accountLevel != 4 ? 'auth_btn_cp' : ''">已授权</div>
</div>
<div v-if="accountLevel==1" class="min_text dr_top_1">所属企业:--</div>
<div v-if="accountLevel!=1" class="min_text dr_top_1">所属企业:{{ blocInfo.parentName }}</div>
<div v-if="accountLevel==4" class="min_text">企微员工:{{ blocInfo.entMicroEmployeeCount }}人</div>
</div>
</div>
<blocModule :bloc="blocInfo" :list.sync="storesList" v-if="accountLevel != 4"></blocModule>
<shopModule v-if="accountLevel == 4"></shopModule>
<!-- </div> -->
</div>
</template>
<script>
import shopModule from './shop.vue'
import blocModule from './bloc.vue'
// import { merchantInfo } from '../../api/modules/baseinfoApi'
export default {
name: 'index',
components: {
shopModule,
blocModule
},
data() {
return {
platform: 1, //1 集团 2 门店
accountLevel:1,//1-工厂;2-省代;3-市代;4-门店
blocInfo: {
merchantName: ''
},
storesList: []
}
},
created() {
//this.$globalState.accountLevel
// const { session } = this.$globalState
// this.platform = session.merchantModel
// this.loginInfo = session
// this.accountLevel = session.accountLevel
this.getBlocData()
},
methods: {
getBlocData() {
// let para = {
// merchantId: this.loginInfo.merchantId,
// sessionId: this.loginInfo.sessionId
// }
this.$apis.baseInfo.merchantInfo({}).then(res => {
this.blocInfo = res
this.storesList = res.stores.map(item => {
item.date = `${this.dateFormat(item.starttime, 'YYYY.MM.DD')}--${this.dateFormat(item.endtime, 'YYYY.MM.DD')}`
return item
})
})
},
dateFormat: function (dateTime, format = 'yyyy-MM-dd') {
const date = new Date(dateTime)
const config = {
YYYY: date.getFullYear(),
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(),
HH: date.getHours(),
mm: date.getMinutes(),
ss: date.getSeconds()
}
for (const key in config) {
format = format.replace(key, config[key])
}
return format
}
}
}
</script>
<style lang="scss" scoped>
.out_main {
box-sizing: border-box;
height: 100%;
// margin: 0 20px 64px 40px;
background: #fff;
// box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// min-height: calc(100vh - 144px);
}
.base-info-index {
width: 100%;
height: calc(100vh - 144px);
background: #fff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
overflow: hidden;
overflow-y: scroll;
}
.out_main::-webkit-scrollbar {
height: 1px;
width: 8px;
}
.out_main::-webkit-scrollbar-thumb {
background: #e9e8ff;
border-radius: 7px;
}
.top_widget {
width: 100%;
box-sizing: border-box;
padding: 40px 0 0 40px;
display: flex;
.sign_icon {
width: 64px;
height: 64px;
border-radius: 50%;
}
.info_widget {
margin-left: 15px;
.title_text {
color: #333333;
font-size: 16px;
font-weight: 500;
}
.min_text {
color: #999999;
font-size: 12px;
line-height: 20px;
}
.sec_title_text {
color: #333333;
font-size: 14px;
font-weight: 400;
.auth_btn {
width: 48px;
height: 20px;
text-align: center;
line-height: 20px;
border-radius: 1px;
border: 1px solid #ff6d00;
font-size: 12px;
font-weight: 400;
color: #ff6d00;
display: inline-block;
margin-left: 16px;
}
.auth_btn_cp {
border: 1px solid #5850ff;
color: #5850ff;
}
}
.dr_top_1 {
margin-top: 8px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="shop-info-module">
<div class="wrapper">
<div class="out_wrap dr_right">
<div class="elment_widget">
<div class="top_bg_wrap">
<div class="title_text">已购产品信息</div>
<div class="desc_text">
<span>标准版有效期:</span>
<span class="spc_text">2021年1月1日-2022年1月1日</span>
</div>
</div>
<div class="bottom_wrap">
<div class="info_text">已购版本:嘀加智慧门店SCRM标准版</div>
<div class="info_text dr_top">短信总条数:10000条</div>
<div class="info_text dr_top">外呼电话总数:5000个</div>
</div>
</div>
<div class="element_btn dr_top">续费</div>
</div>
<div class="out_wrap dr_right">
<div class="elment_widget dr_right">
<div class="top_bg_wrap">
<div class="title_text">智能语音电话套餐信息</div>
<div class="desc_text">
<span>剩余外呼电话数:</span>
<span class="spc_text max_text">3000</span>
<span class="unit_text">个</span>
</div>
</div>
<div class="bottom_wrap">
<div class="info_text">已呼电话个数:2000个</div>
<div class="info_text dr_top">已购版本:嘀加智慧门店SCRM标准版-智能语音…</div>
<div class="info_text dr_top">外呼电话总数:5000个</div>
</div>
</div>
<div class="element_btn dr_top disableBtn">续费</div>
</div>
<div class="out_wrap">
<div class="elment_widget">
<div class="top_bg_wrap">
<div class="title_text">短信套餐信息</div>
<div class="desc_text">
<span>剩余短信条数:</span>
<span class="spc_text max_text">8000</span>
<span class="unit_text">条</span>
</div>
</div>
<div class="bottom_wrap">
<div class="info_text">剩余短信条数:2000条</div>
<div class="dr_top min_text">
<span>营销短信:1000条</span>
<span class="dr_left">通知:1000条</span>
</div>
<div class="info_text dr_top">已购版本:嘀加智慧门店SCRM标准版-短信套餐</div>
<div class="info_text dr_top">短信总条数:10000条-短信套餐</div>
</div>
</div>
<div class="element_btn dr_top disableBtn">续费</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: '',
data() {
return {}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.shop-info-module {
box-sizing: border-box;
padding: 60px 0 0 40px;
}
.wrapper {
display: flex;
.dr_right {
margin-right: 30px;
}
.out_wrap {
width: 29%;
height: 298px;
.elment_widget {
width: 100%;
height: 250px;
border: 1px solid #e5e4ff;
border-radius: 10px;
.top_bg_wrap {
width: 100%;
height: 108px;
background-image: url('../../assets/scrm_base_info_icon_two.png');
background-size: 100% 108px;
box-sizing: border-box;
padding: 20px 0 0 20px;
.title_text {
color: #333;
font-size: 18px;
font-weight: 600;
}
.desc_text {
font-size: 14px;
font-weight: 400;
color: #333333;
margin-top: 28px;
.spc_text {
font-weight: 600;
color: #5850ff;
}
.max_text {
font-size: 22px;
}
.unit_text {
margin-left: 4px;
}
}
}
.bottom_wrap {
width: 100%;
height: 142px;
box-sizing: border-box;
padding: 20px 0 0 20px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.info_text {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.min_text {
font-size: 12px;
color: #666666;
}
.dr_left {
margin-left: 30px;
}
}
}
.element_btn {
width: 72px;
height: 36px;
text-align: center;
line-height: 36px;
background: #5850ff;
border-radius: 4px;
color: #fff;
font-size: 16px;
font-weight: 600;
margin: 0 auto;
cursor: pointer;
}
.disableBtn {
background: #CCC;
}
}
}
.dr_top {
margin-top: 10px !important;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
this.curMenuIndex = index this.curMenuIndex = index
this.treeDataList = this.storeList[index].merchantProTreeResponses this.treeDataList = this.storeList[index].merchantProTreeResponses
}, },
// 创建角色 // 确定按钮---处理参数---提交数据
toCreateRole() { toCreateRole() {
let { merchantId, roleDesc, roleName } = this.ruleForm let { merchantId, roleDesc, roleName } = this.ruleForm
let para = { let para = {
...@@ -225,11 +225,25 @@ export default { ...@@ -225,11 +225,25 @@ export default {
} }
console.log(this.ruleForm) console.log(this.ruleForm)
console.log(para) console.log(para)
// this.$apis.role.roleInfoData(para).then(res => { // if(this.pageType=='edit'){
// if (res) { // this.updateRole(para)
// history.go(-1) // }else{
// this.insertRole(para)
// } // }
// }) },
insertRole(para) {
this.$apis.role.roleInfoData(para).then(res => {
if (res) {
history.go(-1)
}
})
},
updateRole(para) {
this.$apis.role.updateRole(para).then(res => {
if (res) {
history.go(-1)
}
})
}, },
toBack() { toBack() {
history.go(-1) history.go(-1)
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button type="text" @click="toEditPage(scope.scope)">修改</el-button> <el-button type="text" @click="toEditPage(scope.scope)">修改</el-button>
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(scope.scope)">删除</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -173,7 +174,11 @@ export default { ...@@ -173,7 +174,11 @@ export default {
// 去修改角色页面 // 去修改角色页面
toEditPage(row) { toEditPage(row) {
this.$router.push({ path: '/role/create/index', query: { page: 'edit', row } }) this.$router.push({ path: '/role/create/index', query: { page: 'edit', row } })
} },
// 去删除草稿
todelete(row){
console.log(row);
},
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!