Commit bf8d4f20 by 前端

Merge branch 'kuangyq_dev_v2.5.0' into 'v2.5.0'

Kuangyq dev v2.5.0

See merge request !66
2 parents 7bbc7c80 cbb65622
...@@ -58,7 +58,8 @@ const createRole = params => { ...@@ -58,7 +58,8 @@ const createRole = params => {
url: '/rop-merchants/router', url: '/rop-merchants/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true,
returnAll: true
}) })
} }
const updateRole = params => { const updateRole = params => {
......
...@@ -102,8 +102,8 @@ img { ...@@ -102,8 +102,8 @@ img {
} }
.scrm-box-f { .scrm-box-f {
background: #FFFFFF; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.10); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.scrm-flex { .scrm-flex {
...@@ -139,7 +139,7 @@ img { ...@@ -139,7 +139,7 @@ img {
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, .3); background-color: rgba(144, 147, 153, 0.3);
} }
.el-message--info { .el-message--info {
...@@ -186,19 +186,19 @@ img { ...@@ -186,19 +186,19 @@ img {
} }
.normal { .normal {
background-color: #2CCA74; background-color: #2cca74;
} }
.draft { .draft {
background-color: #FDB757; background-color: #fdb757;
} }
.dot1 { .dot1 {
background-color: #FDB757; background-color: #fdb757;
} }
.dot2 { .dot2 {
background-color: #2CCA74; background-color: #2cca74;
} }
.dot3 { .dot3 {
...@@ -206,14 +206,32 @@ img { ...@@ -206,14 +206,32 @@ img {
} }
.dot4 { .dot4 {
background-color: #EB4E4E; background-color: #eb4e4e;
} }
.dot5 { .dot5 {
background-color: #FDB757; background-color: #fdb757;
} }
} }
.m-r-md { .m-r-md {
margin-right: 20px; margin-right: 20px;
} }
// 顶部按钮
.top_widget {
padding-bottom: 16px;
.el-button {
span {
margin-left: 10px;
}
}
}
.role-border {
border: 1px solid #e5e5e5;
}
.role-border-b {
border-bottom: 1px solid #e5e5e5;
}
...@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = false) { ...@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = false) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
// return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') return new Http().get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting-kyq').then(res => res.data)
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -302,8 +302,8 @@ export default { ...@@ -302,8 +302,8 @@ export default {
if (this.$refs.mapForm.geocoderAddress.addressComponent) { if (this.$refs.mapForm.geocoderAddress.addressComponent) {
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
provincecode = this.$refs.mapForm.geocoderAddress.adcode provincecode = this.$refs.mapForm.geocoderAddress.adcode
this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent this.addressData.fullAddress = fullAddress
this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode this.addressData.provincecode = provincecode
} else { } else {
fullAddress = this.addressData.fullAddress fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode provincecode = this.addressData.provincecode
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
} }
// 判断省市是否匹配 // 判断省市是否匹配
if (this.accountAddForm.provinceName) { if (this.accountAddForm.provinceName) {
if (this.accountAddForm.provinceName !== province || this.accountAddForm.cityName !== city) { if (this.accountAddForm.provinceName !== province && this.accountAddForm.cityName !== city) {
this.$message.error('您选择的地址错误,请重新选择') this.$message.error('您选择的地址错误,请重新选择')
this.accountAddForm.merchantAddress = '' this.accountAddForm.merchantAddress = ''
return return
......
...@@ -187,8 +187,10 @@ export default { ...@@ -187,8 +187,10 @@ export default {
if (this.$refs.mapForm.geocoderAddress.addressComponent) { if (this.$refs.mapForm.geocoderAddress.addressComponent) {
fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
provincecode = this.$refs.mapForm.geocoderAddress.adcode provincecode = this.$refs.mapForm.geocoderAddress.adcode
this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent this.addressData.fullAddress = fullAddress
this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode this.addressData.provincecode = provincecode
// this.addressData.fullAddress = this.$refs.mapForm.geocoderAddress.addressComponent
// this.addressData.provincecode = this.$refs.mapForm.geocoderAddress.adcode
} else { } else {
fullAddress = this.addressData.fullAddress fullAddress = this.addressData.fullAddress
provincecode = this.addressData.provincecode provincecode = this.addressData.provincecode
...@@ -215,7 +217,7 @@ export default { ...@@ -215,7 +217,7 @@ export default {
} }
// 判断省市是否匹配 // 判断省市是否匹配
if (this.infoForm.provinceName) { if (this.infoForm.provinceName) {
if (this.infoForm.provinceName !== province || this.infoForm.cityName !== city) { if (this.infoForm.provinceName !== province && this.infoForm.cityName !== city) {
this.$message.error('您选择的地址错误,请重新选择') this.$message.error('您选择的地址错误,请重新选择')
this.infoForm.merchantAddress = '' this.infoForm.merchantAddress = ''
return return
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
merchantId: '', merchantId: '',
roleName: '', roleName: '',
roleDesc: '', roleDesc: '',
roleAuth: '' roleAuth: []
}, },
rules: { rules: {
roleName: [{ required: true, message: '请输入角色名称', trigger: 'blur' }], roleName: [{ required: true, message: '请输入角色名称', trigger: 'blur' }],
...@@ -95,7 +95,6 @@ export default { ...@@ -95,7 +95,6 @@ export default {
}, },
// 选择商户权限 // 选择商户权限
selectCurAccount(item, index) { selectCurAccount(item, index) {
console.log(item, index)
this.isChangeEdit = true this.isChangeEdit = true
this.roleRootRules = false this.roleRootRules = false
this.accountListSelect[index].select = !item.select this.accountListSelect[index].select = !item.select
...@@ -112,12 +111,10 @@ export default { ...@@ -112,12 +111,10 @@ export default {
this.rootList.forEach(item => { this.rootList.forEach(item => {
accounttypeId.push(item.accounttypeId) accounttypeId.push(item.accounttypeId)
}) })
console.log(this.rootList, accounttypeId, '99999')
this.accounttypeIds = accounttypeId this.accounttypeIds = accounttypeId
this.$refs.productFrom.findMenuFunTree(item.accounttypeId, item.select) this.$refs.productFrom.findMenuFunTree(item.accounttypeId, item.select)
}, },
toCreateRole() { toCreateRole() {
console.log(this.ruleForm, this.$refs.productFrom.getSelectInfo())
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let { merchantId, roleDesc, roleName } = this.ruleForm let { merchantId, roleDesc, roleName } = this.ruleForm
...@@ -138,9 +135,12 @@ export default { ...@@ -138,9 +135,12 @@ export default {
delFlag: 0, delFlag: 0,
requestList: accountTypes requestList: accountTypes
} }
console.log(para)
this.$apis.role.createRole(para).then(res => { this.$apis.role.createRole(para).then(res => {
res ? this.$message.success('操作成功') : this.$message.error('操作失败') if (res.code == -1) {
this.$message.error(res.message)
return
}
this.$message.success('操作成功')
this.$emit('updataRole', true) this.$emit('updataRole', true)
this.roleVisible = !res this.roleVisible = !res
this.ruleForm = { this.ruleForm = {
......
<template> <template>
<div class="account-body" v-loading="loading" v-if="tabMenuStatus"> <div class="account-body" v-loading="loading" v-if="tabMenuStatus">
<!-- <div class="account-title">{{ title }}</div> --> <!-- <div class="account-title">{{ title }}</div> -->
<el-tabs v-if="tabMenu.length != 0" v-model="tabName" type="card" @tab-click="handleClik"> <el-tabs v-if="tabMenu.length != 0" v-model="tabName" @tab-click="handleClik">
<template v-for="(item, index) in tabMenu"> <template v-for="(item, index) in tabMenu">
<el-tab-pane v-show="item && item.accounttypeId" :label="item.accounttypeName" :name="item.accounttypeId" v-if="item" :key="index"></el-tab-pane> <el-tab-pane :label="item.accounttypeName" :name="item.accounttypeId + ''" v-if="item && item.accounttypeId" :key="index"></el-tab-pane>
</template> </template>
</el-tabs> </el-tabs>
<div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId"> <div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId">
...@@ -131,11 +131,11 @@ export default { ...@@ -131,11 +131,11 @@ export default {
}) })
if (status) { if (status) {
this.$set(this.tabMenu, idx, menuSelect[0]) this.$set(this.tabMenu, idx, menuSelect[0])
this.tabName = this.tabMenu[idx] ? this.tabMenu[idx].accounttypeId : '' this.tabName = this.tabMenu[idx] ? this.tabMenu[idx].accounttypeId + '' : ''
} else { } else {
this.$set(this.tabMenu, idx, '') this.$set(this.tabMenu, idx, '')
let accounttypeId = this.tabMenu.find(item => item) let accounttypeId = this.tabMenu.find(item => item)
this.tabName = accounttypeId ? accounttypeId.accounttypeId : '' this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : ''
} }
console.log(this.tabMenu) console.log(this.tabMenu)
this.tabMenuStatus = this.tabMenu.some(item => item) this.tabMenuStatus = this.tabMenu.some(item => item)
...@@ -451,34 +451,45 @@ export default { ...@@ -451,34 +451,45 @@ export default {
.el-checkbox:last-of-type { .el-checkbox:last-of-type {
margin-right: 8px; margin-right: 8px;
} }
.el-tabs--card > .el-tabs__header .el-tabs__nav { .el-tabs {
border: 0;
}
.el-tabs--card > .el-tabs__header {
border: 0;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
// background-color: #f4f6fc; margin-bottom: 20px;
}
.el-tabs--card > .el-tabs__header .el-tabs__item {
position: relative;
border: none;
// width: 180px;
margin: 2px;
text-align: center;
&::after {
content: '';
display: inline-block;
width: calc(100% - 40px);
height: 2px;
background-color: #5850ff;
position: absolute;
bottom: -2px;
left: 20px;
} }
.el-tabs__header {
margin: 0;
padding: 0 30px;
} }
.el-tabs__item.is-active { .el-tabs__nav-wrap::after {
background-color: #fff; content: none;
} }
// .el-tabs--card > .el-tabs__header .el-tabs__nav {
// border: 0;
// }
// .el-tabs--card > .el-tabs__header {
// border: 0;
// border-bottom: 1px solid #e5e5e5;
// // background-color: #f4f6fc;
// }
// .el-tabs--card > .el-tabs__header .el-tabs__item {
// position: relative;
// border: none;
// // width: 180px;
// margin: 2px;
// text-align: center;
// &::after {
// content: '';
// display: inline-block;
// width: calc(100% - 40px);
// height: 2px;
// background-color: #5850ff;
// position: absolute;
// bottom: -2px;
// left: 20px;
// }
// }
// .el-tabs__item.is-active {
// background-color: #fff;
// }
.el-form-item { .el-form-item {
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
......
...@@ -113,12 +113,15 @@ export default { ...@@ -113,12 +113,15 @@ export default {
required: false, required: false,
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/ var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
console.log(reg.test(value)) if (value) {
if (!reg.test(value)) { if (!reg.test(value)) {
return callback(new Error('请输入正确格式的邮箱')) return callback(new Error('请输入正确格式的邮箱'))
} else { } else {
return callback() return callback()
} }
} else {
return callback()
}
}, },
trigger: 'change' trigger: 'change'
} }
......
<!-- 员工管理 --> <!-- 员工管理 -->
<template> <template>
<div class="config-employee employee-list"> <div class="config-employee employee-list">
<div style="margin-bottom: 10px"> <div class="top_widget">
<GLButton @click="handleEdit(1)" :size="size" class="el-icon-plus" fn="创建员工" type="primary" mode="el-button">创建员工</GLButton> <GLButton @click="handleEdit(1)" :size="size" icon="el-icon-plus" fn="创建员工" type="primary" mode="el-button">创建员工</GLButton>
<!-- <el-button :size="size" type="primary" class="el-icon-plus" >创建员工</el-button> --> <!-- <el-button :size="size" type="primary" class="el-icon-plus" >创建员工</el-button> -->
</div> </div>
<div class="container"> <div class="container">
...@@ -555,7 +555,8 @@ export default { ...@@ -555,7 +555,8 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { })
.then(() => {
const list = selectArr.map(item => { const list = selectArr.map(item => {
return { return {
staffId: item.id, staffId: item.id,
...@@ -566,23 +567,23 @@ export default { ...@@ -566,23 +567,23 @@ export default {
list list
} }
this.$apis.employee.updateStatusBatch(param).then(res => { this.$apis.employee.updateStatusBatch(param).then(res => {
if(res) { if (res) {
this.$message.success('操作成功') this.$message.success('操作成功')
this.$refs.employeeRef.refreshTable(false) this.$refs.employeeRef.refreshTable(false)
} else { } else {
this.$message.error('操作失败') this.$message.error('操作失败')
} }
}) })
}).catch(() => { })
.catch(() => {
console.log('点击了取消') console.log('点击了取消')
}) })
} }
} }
}, },
// 批量分配角色,确定按钮 // 批量分配角色,确定按钮
handleAssign() { handleAssign() {
this.$refs.roleForm.validate((valid) => { this.$refs.roleForm.validate(valid => {
if (valid) { if (valid) {
const { roleId } = this.roleForm const { roleId } = this.roleForm
let staffIds = this.$refs.employeeRef.mutiSelectArr[this.tableParams1.mutiSelectName] let staffIds = this.$refs.employeeRef.mutiSelectArr[this.tableParams1.mutiSelectName]
......
<template> <template>
<div class="account-body scrm-box-f" v-loading="loading" v-if="tabMenuStatus"> <div class="account-body scrm-box-f role-border" v-loading="loading" v-if="tabMenuStatus">
<div class="account-title">{{ title }}</div> <!-- <div class="account-title">{{ title }}</div> -->
<el-tabs v-if="tabMenu.length != 0" v-model="tabName" type="card" @tab-click="handleClik"> <el-tabs v-if="tabMenu.length != 0" v-model="tabName" @tab-click="handleClik">
<template v-for="(item, index) in tabMenu"> <template v-for="(item, index) in tabMenu">
<el-tab-pane v-show="item && item.accounttypeId" :label="item.accounttypeName" :name="item.accounttypeId" v-if="item" :key="index"></el-tab-pane> <el-tab-pane :label="item.accounttypeName" :name="item.accounttypeId + ''" v-if="item && item.accounttypeId" :key="index"></el-tab-pane>
</template> </template>
</el-tabs> </el-tabs>
<div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId"> <div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId">
<label>选择产品</label> <label>产品权限:</label>
<el-checkbox-group v-model="item.productsArr" @change="selectPro"> <el-checkbox-group v-model="item.productsArr" @change="selectPro">
<el-checkbox v-for="(itm, idx) in item.products" :label="itm" :key="idx">{{ itm.productName }}</el-checkbox> <el-checkbox v-for="(itm, idx) in item.products" :label="itm" :key="idx">{{ itm.productName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<div class="account-select-menu">请选择产品权限</div> <!-- <div class="account-select-menu">请选择产品权限</div> -->
<div class="menu-box"> <div class="menu-box">
<div class="menu-box-panel"> <div class="menu-box-panel">
<div :key="index" v-for="(item, index) in tabMenu"> <div :key="index" v-for="(item, index) in tabMenu">
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
}, },
methods: { methods: {
handleClik(tab, event) { handleClik(tab, event) {
console.log(tab, event) console.log(tab)
const tabId = tab.name const tabId = tab.name
const productTab = this.tabMenu.find(i => i.accounttypeId == tabId) const productTab = this.tabMenu.find(i => i.accounttypeId == tabId)
this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : '' this.productTab = productTab.productsArr[0] ? productTab.productsArr[0].productId : ''
...@@ -131,11 +131,11 @@ export default { ...@@ -131,11 +131,11 @@ export default {
}) })
if (status) { if (status) {
this.$set(this.tabMenu, idx, menuSelect[0]) this.$set(this.tabMenu, idx, menuSelect[0])
this.tabName = this.tabMenu[idx] ? this.tabMenu[idx].accounttypeId : '' this.tabName = this.tabMenu[idx] ? this.tabMenu[idx].accounttypeId + '' : ''
} else { } else {
this.$set(this.tabMenu, idx, '') this.$set(this.tabMenu, idx, '')
let accounttypeId = this.tabMenu.find(item => item) let accounttypeId = this.tabMenu.find(item => item)
this.tabName = accounttypeId ? accounttypeId.accounttypeId : '' this.tabName = accounttypeId ? accounttypeId.accounttypeId + '' : ''
} }
console.log(this.tabMenu) console.log(this.tabMenu)
this.tabMenuStatus = this.tabMenu.some(item => item) this.tabMenuStatus = this.tabMenu.some(item => item)
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
}) })
this.tabMenuStatus = this.tabMenu.some(item => item) this.tabMenuStatus = this.tabMenu.some(item => item)
let tabMenu = this.tabMenu.filter((item, index) => { let tabMenu = this.tabMenu.filter((item, index) => {
return item && item.accounttypeId && this.tabMenu[index].productsArr.length>0 return item && item.accounttypeId && this.tabMenu[index].productsArr.length > 0
}) })
setTimeout(() => { setTimeout(() => {
this.tabName = tabMenu[0].accounttypeId this.tabName = tabMenu[0].accounttypeId
...@@ -445,36 +445,22 @@ export default { ...@@ -445,36 +445,22 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.account-body { .account-body {
padding: 20px; // border: 1px solid #e5e5e5;
margin-bottom: 50px; border-radius: 2px;
/deep/ { /deep/ {
.el-checkbox:last-of-type { .el-tabs {
margin-right: 8px; border-bottom: 1px solid #e5e5e5;
}
.el-tabs--card > .el-tabs__header .el-tabs__nav {
border: 0;
}
.el-tabs--card > .el-tabs__header {
border: 0;
background-color: #f4f6fc;
} }
.el-tabs--card > .el-tabs__header .el-tabs__item { .el-tabs__header {
border: none; margin: 0;
width: 180px; padding: 0 30px;
margin: 2px;
text-align: center;
} }
.el-tabs__item.is-active { .el-checkbox:last-of-type {
background-color: #fff; margin-right: 8px;
} }
.el-tabs__nav-wrap::after {
content: none;
} }
.account-title {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 16px;
letter-spacing: 1px;
margin-bottom: 30px;
} }
.account-select-pro { .account-select-pro {
padding-left: 30px; padding-left: 30px;
...@@ -489,35 +475,26 @@ export default { ...@@ -489,35 +475,26 @@ export default {
margin-right: 20px; margin-right: 20px;
} }
} }
.account-select-menu {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
margin-top: 20px;
}
.menu-box { .menu-box {
position: relative; position: relative;
margin-top: 10px; padding: 20px;
background: #f4f6fc; border-radius: 0px 4px 4px 4px;
border-radius: 4px;
padding: 10px;
.tab-item { .tab-item {
width: 180px; background: #fafafa;
background: #ffffff; border-radius: 4px 4px 0px 0px;
border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc; border: 1px solid #f4f6fc;
margin-right: 2px;
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
font-weight: 400; font-weight: 400;
color: #37383a; color: #37383a;
text-align: center; text-align: center;
padding: 12px 0px; padding: 12px 20px;
border-bottom: none;
cursor: pointer; cursor: pointer;
&.select-checked { &.select-checked {
background: #ffffff;
color: #322ad9; color: #322ad9;
// font-weight: 700;
border-bottom: none;
} }
} }
.menu-box-tab { .menu-box-tab {
...@@ -525,6 +502,7 @@ export default { ...@@ -525,6 +502,7 @@ export default {
} }
.menu-box-tree { .menu-box-tree {
background: #ffffff; background: #ffffff;
border: 1px solid #f4f6fc;
} }
} }
} }
......
...@@ -32,9 +32,16 @@ ...@@ -32,9 +32,16 @@
</template> </template>
</div> </div>
</el-form-item> --> </el-form-item> -->
</el-form>
</div>
</div>
<div class="role_widget">
<div class="top_title_widget">
<span class="title">角色权限</span>
</div>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<div data-v-995a4ff0="" class="el-form-item is-required"> <div data-v-995a4ff0="" class="role-list">
<label for="roleName" class="el-form-item__label" style="width: 100px">角色权限</label> <label for="roleName" class="el-form-item__label" style="width: 100px">角色权限</label>
<div class="el-form-item__content" style="margin-left: 100px"> <div class="el-form-item__content" style="margin-left: 100px">
<!-- <div data-v-995a4ff0="" class="el-input el-input--small"> <!-- <div data-v-995a4ff0="" class="el-input el-input--small">
...@@ -52,19 +59,16 @@ ...@@ -52,19 +59,16 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</el-form> <!-- <div > -->
<SelectProduct class="role-detail" ref="productFrom" :roleType="true"></SelectProduct>
<!-- </div> -->
</div> </div>
</div>
<div class="scrm-box-f" style="margin-top: 10px">
<SelectProduct ref="productFrom" :roleType="true" title="角色权限"></SelectProduct>
<!-- <div style="height: 84px"></div> -->
<GLFooter style="z-index: 1"> <GLFooter style="z-index: 1">
<el-button v-if="pageType == 'create'" type="primary" plain @click="toCreateRole(1)">草稿</el-button>
<el-button type="primary" @click="toCreateRole(0)">确定</el-button>
<el-button @click="toBack">取消</el-button> <el-button @click="toBack">取消</el-button>
<el-button v-if="pageType == 'create'" type="primary" plain @click="toCreateRole(1)">存为草稿</el-button>
<el-button type="primary" @click="toCreateRole(0)">提交</el-button>
</GLFooter> </GLFooter>
</div> <!-- </div> -->
</div> </div>
</template> </template>
<script> <script>
...@@ -351,11 +355,24 @@ export default { ...@@ -351,11 +355,24 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.role_widget {
margin-top: 16px;
background: #ffffff;
margin-bottom: 80px;
// padding-bottom: 32px;
overflow: hidden;
}
.role-detail {
margin: 0 20px 32px 20px;
}
.role-create-page { .role-create-page {
height: 100%; height: 100%;
width: 100%; width: 100%;
background: #ffffff; background: #ffffff;
} }
.role-list {
padding: 40px 0 20px 104px;
}
.top_title_widget { .top_title_widget {
width: 100%; width: 100%;
height: 58px; height: 58px;
......
<template> <template>
<div class="role-home-page"> <div class="role-home-page">
<div class="top_widget"> <div class="top_widget">
<GLButton size="small" fn="创建角色" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</GLButton> <!-- <GLButton :size="size" fn="创建角色" icon="el-icon-plus" type="primary" @click="toCreatePage" mode="el-button">创建角色</GLButton> -->
<!-- <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button> --> <el-button size="small" icon="el-icon-plus" type="primary" @click="toCreatePage">创建角色</el-button>
</div> </div>
<div class="table_widget"> <div class="table_widget">
<div> <div>
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
{{ scope.scope.statusName }} {{ scope.scope.statusName }}
</div> </div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton> <!-- <GLTableButton :buttonList="buttonList" :buttonItem="scope.scope"></GLTableButton> -->
<!-- <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button> <el-button type="text" @click="toLookPage(scope.scope)">查看</el-button>
<el-button v-if="scope.scope.roleName != '超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button> <el-button v-if="scope.scope.roleName != '超级管理员'" type="text" @click="toEditPage(scope.scope)">修改</el-button>
<el-button v-if="scope.scope.delFlag" type="text" @click="todelete(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>
...@@ -318,13 +318,7 @@ export default { ...@@ -318,13 +318,7 @@ export default {
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
} }
.top_widget {
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 0 20px 10px 0;
}
.table_widget { .table_widget {
width: 100%; width: 100%;
// height: calc(100% - 138px); // height: calc(100% - 138px);
......
...@@ -19,18 +19,19 @@ ...@@ -19,18 +19,19 @@
</div> </div>
</div> </div>
<div class="main_widget"> <div class="main_widget">
<div class="main_title">角色权限</div> <div class="main_title role-border-b">角色权限</div>
<div class="wrapper"> <div class="wrapper role-border">
<div class="menu_line_one" :style="rootList.length ? '' : 'padding:0'"> <div class="menu_line_one role-border-b" :style="rootList.length ? '' : 'padding:0'">
<div v-for="(item, index) in rootList" :key="index" class="line_element" :class="curRootIndex == index ? 'line_element_active' : ''" @click="selectRootItem(index)">{{ item.accounttypeName }}</div> <div v-for="(item, index) in rootList" :key="index" class="line_element" :class="curRootIndex == index ? 'line_element_active' : ''" @click="selectRootItem(index)">
{{ item.accounttypeName }}
<div class="tab_line" v-show="curRootIndex == index"></div>
</div> </div>
</div> </div>
<div class="wrapper">
<div class="main_body"> <div class="main_body">
<div class="menu_line_two"> <div class="menu_line_two">
<div v-for="(item, index) in productList" :key="index" class="line_element_two" :class="curProductIndex == index ? 'line_element_two_active' : ''" @click="selectProductItem(index)">{{ item.productName }}</div> <div v-for="(item, index) in productList" :key="index" class="line_element_two role-border" :class="curProductIndex == index ? 'line_element_two_active' : ''" @click="selectProductItem(index)">{{ item.productName }}</div>
</div> </div>
<div class="tree_widget"> <div class="tree_widget role-border">
<el-tree :render-content="renderContent" v-if="productList.length" default-expand-all :data="newTreeList" :props="defaultProps"></el-tree> <el-tree :render-content="renderContent" v-if="productList.length" default-expand-all :data="newTreeList" :props="defaultProps"></el-tree>
<div v-if="productList.length == 0" class="no_data_icon"> <div v-if="productList.length == 0" class="no_data_icon">
<div class="nodata_wrap"> <div class="nodata_wrap">
...@@ -188,6 +189,16 @@ export default { ...@@ -188,6 +189,16 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tab_line {
width: 100%;
height: 2px;
background: #5850ff;
border-radius: 4px;
position: absolute;
left: 50%;
top: 38px;
transform: translate(-50%, 0);
}
.role-create-page { .role-create-page {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -243,6 +254,7 @@ export default { ...@@ -243,6 +254,7 @@ export default {
min-height: calc(100% - 300px); min-height: calc(100% - 300px);
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);
padding-bottom: 20px;
.main_title { .main_title {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
...@@ -250,23 +262,22 @@ export default { ...@@ -250,23 +262,22 @@ export default {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
// border-bottom: 1px solid #e5e5e5;
} }
.wrapper { .wrapper {
// border: 1px solid #e5e5e5;
box-sizing: border-box; box-sizing: border-box;
padding: 0 20px; margin: 20px 20px;
padding-bottom: 20px;
.menu_line_one { .menu_line_one {
width: 100%; width: 100%;
// height: 36px; height: 48px;
background: #f4f6fc;
border-radius: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: 2px; padding: 0px 32px;
// border-bottom: 1px solid #e5e5e5;
.line_element { .line_element {
// width: 180px; position: relative;
padding: 0 55px;
height: 32px; height: 32px;
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
...@@ -282,12 +293,9 @@ export default { ...@@ -282,12 +293,9 @@ export default {
} }
} }
.main_body { .main_body {
width: 100%; border-radius: 0 0 4px 4px;
// height: calc(100% - 36px);
background: #f4f6fc;
border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px; margin: 20px;
.menu_line_two { .menu_line_two {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -298,9 +306,11 @@ export default { ...@@ -298,9 +306,11 @@ export default {
height: 40px; height: 40px;
text-align: center; text-align: center;
line-height: 40px; line-height: 40px;
background: #ffffff; background: #fafafa;
border-radius: 4px 0px 0px 0px; border-radius: 4px 4px 0px 0px;
border: 1px solid #f4f6fc; // border: 1px solid #e5e5e5;
border-bottom: none;
margin-right: 2px;
color: #37383a; color: #37383a;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
...@@ -308,12 +318,14 @@ export default { ...@@ -308,12 +318,14 @@ export default {
} }
.line_element_two_active { .line_element_two_active {
color: #322ad9; color: #322ad9;
background-color: #ffffff;
} }
} }
.tree_widget { .tree_widget {
width: 100%; width: 100%;
// height: calc(100% - 40px); // height: calc(100% - 40px);
background: #ffffff; background: #ffffff;
// border: 1px solid #e5e5e5;
border-radius: 0px 4px 4px 4px; border-radius: 0px 4px 4px 4px;
// height: 200px; // height: 200px;
// overflow: auto; // overflow: auto;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!