Commit d394f721 by 匡雅琴

第一轮测试bug修复,样式修改

1 parent 64782f23
......@@ -58,7 +58,8 @@ const createRole = params => {
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
sign: true,
returnAll: true
})
}
const updateRole = params => {
......@@ -88,4 +89,4 @@ export default {
createRole,
updateRole,
deleteRole
}
\ No newline at end of file
}
......@@ -227,3 +227,11 @@ img {
}
}
}
.role-border {
border: 1px solid #e5e5e5;
}
.role-border-b {
border-bottom: 1px solid #e5e5e5;
}
......@@ -52,7 +52,7 @@ export default {
merchantId: '',
roleName: '',
roleDesc: '',
roleAuth: ''
roleAuth: []
},
rules: {
roleName: [{ required: true, message: '请输入角色名称', trigger: 'blur' }],
......@@ -136,8 +136,11 @@ export default {
requestList: accountTypes
}
this.$apis.role.createRole(para).then(res => {
console.log(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.roleVisible = !res
this.ruleForm = {
......
<template>
<div class="account-body" v-loading="loading" v-if="tabMenuStatus">
<!-- <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">
<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>
</el-tabs>
<div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId">
......@@ -451,34 +451,45 @@ export default {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs--card > .el-tabs__header .el-tabs__nav {
border: 0;
}
.el-tabs--card > .el-tabs__header {
border: 0;
.el-tabs {
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 {
background-color: #fff;
.el-tabs__nav-wrap::after {
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 {
margin-bottom: 0 !important;
}
......
<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> -->
<el-tabs v-if="tabMenu.length != 0" v-model="tabName" @tab-click="handleClik">
<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">{{ item.accounttypeId }}</el-tab-pane>
</template>
</el-tabs>
<div class="account-select-pro" v-for="(item, index) in tabMenu" :key="index" v-show="tabName == item.accounttypeId">
......@@ -107,6 +107,8 @@ export default {
this.productTab = productId
},
findMenuFunTree(id, status) {
console.log(id, status)
// this.tabName = id + ''
let menu = util.deepClone(this.tabMenu)
let tabMenu = util.deepClone(this.tabMenu_r)
let menuSelect = tabMenu.filter(item => item.accounttypeId == id)
......@@ -445,7 +447,7 @@ export default {
<style scoped lang="scss">
.account-body {
border: 1px solid #e5e5e5;
// border: 1px solid #e5e5e5;
border-radius: 2px;
/deep/ {
.el-tabs {
......@@ -461,9 +463,6 @@ export default {
.el-tabs__nav-wrap::after {
content: none;
}
.el-tabs__active-bar {
width: 100%;
}
}
.account-select-pro {
padding-left: 30px;
......
......@@ -59,9 +59,9 @@
</div>
</el-col>
</el-row>
<div class="role-detail">
<SelectProduct ref="productFrom" :roleType="true"></SelectProduct>
</div>
<!-- <div > -->
<SelectProduct class="role-detail" ref="productFrom" :roleType="true"></SelectProduct>
<!-- </div> -->
</div>
<GLFooter style="z-index: 1">
<el-button @click="toBack">取消</el-button>
......@@ -359,10 +359,11 @@ export default {
margin-top: 16px;
background: #ffffff;
margin-bottom: 80px;
padding-bottom: 32px;
// padding-bottom: 32px;
overflow: hidden;
}
.role-detail {
padding: 0 20px;
margin: 0 20px 32px 20px;
}
.role-create-page {
height: 100%;
......@@ -370,7 +371,7 @@ export default {
background: #ffffff;
}
.role-list {
padding: 40px 0 0 104px;
padding: 40px 0 20px 104px;
}
.top_title_widget {
width: 100%;
......
......@@ -19,9 +19,9 @@
</div>
</div>
<div class="main_widget">
<div class="main_title">角色权限</div>
<div class="wrapper">
<div class="menu_line_one" :style="rootList.length ? '' : 'padding:0'">
<div class="main_title role-border-b">角色权限</div>
<div class="wrapper role-border">
<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 class="tab_line" v-show="curRootIndex == index"></div>
......@@ -29,9 +29,9 @@
</div>
<div class="main_body">
<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 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>
<div v-if="productList.length == 0" class="no_data_icon">
<div class="nodata_wrap">
......@@ -196,6 +196,7 @@ export default {
border-radius: 4px;
position: absolute;
left: 50%;
top: 38px;
transform: translate(-50%, 0);
}
.role-create-page {
......@@ -253,6 +254,7 @@ export default {
min-height: calc(100% - 300px);
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding-bottom: 20px;
.main_title {
width: 100%;
box-sizing: border-box;
......@@ -260,12 +262,12 @@ export default {
font-size: 16px;
font-weight: 600;
color: #333333;
border-bottom: 1px solid #e5e5e5;
// border-bottom: 1px solid #e5e5e5;
}
.wrapper {
// border: 1px solid #e5e5e5;
box-sizing: border-box;
padding: 20px 20px;
padding-bottom: 20px;
margin: 20px 20px;
.menu_line_one {
width: 100%;
height: 48px;
......@@ -273,6 +275,7 @@ export default {
align-items: center;
box-sizing: border-box;
padding: 0px 32px;
// border-bottom: 1px solid #e5e5e5;
.line_element {
position: relative;
height: 32px;
......@@ -290,11 +293,9 @@ export default {
}
}
.main_body {
width: 100%;
border-radius: 4px;
border-radius: 0 0 4px 4px;
box-sizing: border-box;
border: 1px solid #e5e5e5;
margin: 10px;
margin: 20px;
.menu_line_two {
display: flex;
flex-wrap: wrap;
......@@ -305,9 +306,11 @@ export default {
height: 40px;
text-align: center;
line-height: 40px;
background: #ffffff;
border-radius: 4px 0px 0px 0px;
border: 1px solid #f4f6fc;
background: #fafafa;
border-radius: 4px 4px 0px 0px;
// border: 1px solid #e5e5e5;
border-bottom: none;
margin-right: 2px;
color: #37383a;
font-size: 14px;
font-weight: 400;
......@@ -315,12 +318,14 @@ export default {
}
.line_element_two_active {
color: #322ad9;
background-color: #ffffff;
}
}
.tree_widget {
width: 100%;
// height: calc(100% - 40px);
background: #ffffff;
// border: 1px solid #e5e5e5;
border-radius: 0px 4px 4px 4px;
// height: 200px;
// overflow: auto;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!