Commit b9c6ee44 authored by 何小勇's avatar 何小勇

对接登录

parent 85413e94
...@@ -78,9 +78,9 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -78,9 +78,9 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
image: registry.cn-qingdao.aliyuncs.com/wod/devops-kubernetes:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-kubernetes:1.0
settings: settings:
namespace: apaas-v5 namespace: apaas-v5
deployment: apaas-system-ui deployment: apaas-manage-ui
container: apaas-system-ui container: apaas-manage-ui
image: registry.cn-qingdao.aliyuncs.com/wod/apaas-ui:5.0.1-alpha image: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1-alpha
environment: environment:
KUBERNETES_SERVER: KUBERNETES_SERVER:
from_secret: KUBERNETES_SERVER from_secret: KUBERNETES_SERVER
......
...@@ -60,9 +60,12 @@ export default { ...@@ -60,9 +60,12 @@ export default {
}, },
nowParent(){ nowParent(){
if(this.pageShow&&this.$store.state.userInfo){ if(this.pageShow&&this.$store.state.userInfo){
console.log(2222222)
console.log(this.navMenu)
// return this.navMenu[this.rowPath.slice(1,4)] // return this.navMenu[this.rowPath.slice(1,4)]
// return this.pathToData(this.navMenu,this.rowPath) // return this.pathToData(this.navMenu,this.rowPath)
return this.navMenu[1] return this.navMenu[1]
}else{ }else{
return '' return ''
} }
......
...@@ -326,7 +326,7 @@ div { ...@@ -326,7 +326,7 @@ div {
} }
/* 设置tree的样式 */ /* 设置tree的样式 */
.el-tree { /* .el-tree {
position: static!important; position: static!important;
} }
.el-tree-node__content{ .el-tree-node__content{
...@@ -336,7 +336,7 @@ div { ...@@ -336,7 +336,7 @@ div {
background-image: linear-gradient(90deg, background-image: linear-gradient(90deg,
rgba(255, 255, 255, 0.05) 83%, rgba(255, 255, 255, 0.05) 83%,
rgba(0, 0, 0, 0.05) 86%); rgba(0, 0, 0, 0.05) 86%);
} } */
/* .usrrole .el-tree-node:focus>.el-tree-node__content{ /* .usrrole .el-tree-node:focus>.el-tree-node__content{
background: rgb(248, 249, 253) !important; background: rgb(248, 249, 253) !important;
} }
...@@ -1473,24 +1473,14 @@ border-radius:8px; ...@@ -1473,24 +1473,14 @@ border-radius:8px;
} }
.flex_left { .flex_left {
<<<<<<< HEAD
height: calc(100% - 20px); height: calc(100% - 20px);
=======
background-color: #fff;
height: calc(100% - 16px);
>>>>>>> 133893b61e0b75788c7111d07959c747c7a0fa2d
width: 320px; width: 320px;
margin-right: 10px; margin-right: 10px;
overflow: hidden; overflow: hidden;
} }
.flex_right { .flex_right {
<<<<<<< HEAD
height: calc(100% - 20px); height: calc(100% - 20px);
=======
background-color: #fff;
height: calc(100% - 16px);
>>>>>>> 133893b61e0b75788c7111d07959c747c7a0fa2d
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
......
...@@ -71,9 +71,10 @@ export default { ...@@ -71,9 +71,10 @@ export default {
return this.now_index == 0 return this.now_index == 0
? { ? {
left: this.gap + "px", left: this.gap + "px",
} }
: { : {
right: this.gap + "px", left: 'calc(100% - 15px)',
}; };
}, },
}, },
......
...@@ -2061,6 +2061,7 @@ a { ...@@ -2061,6 +2061,7 @@ a {
position: absolute; position: absolute;
// top: 2px; // top: 2px;
background-color: #fff; background-color: #fff;
transition: all .3s,
} }
&.disabled { &.disabled {
......
...@@ -62,7 +62,7 @@ Promise.all([getUser()]).then(res => { ...@@ -62,7 +62,7 @@ Promise.all([getUser()]).then(res => {
store.commit('setUserInfo', res[0].data.data) store.commit('setUserInfo', res[0].data.data)
if (res[0].data.data.userType == 1) {//超管 // if (res[0].data.data.userType == 1) {//超管
store.commit('setMenu', menu.adminMenu) store.commit('setMenu', menu.adminMenu)
menu.menuToRouter(menu.adminMenu) menu.menuToRouter(menu.adminMenu)
console.log(menu); console.log(menu);
...@@ -74,7 +74,7 @@ Promise.all([getUser()]).then(res => { ...@@ -74,7 +74,7 @@ Promise.all([getUser()]).then(res => {
store.commit('setMenuObj',menuObj) store.commit('setMenuObj',menuObj)
console.log(menuObj); console.log(menuObj);
} // }
} }
generateRoutes() generateRoutes()
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
this.$axios.get(`/apaas/system/v5/user/getUserInfo`).then((res) => { this.$axios.get(`/apaas/system/v5/user/getUserInfo`).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$store.commit("setUserInfo", res.data.data); this.$store.commit("setUserInfo", res.data.data);
if (res.data.data.userType == 1) { // if (res.data.data.userType == 1) {
//超管 //超管
this.$store.commit("setMenu", menu.adminMenu); this.$store.commit("setMenu", menu.adminMenu);
...@@ -88,7 +88,7 @@ export default { ...@@ -88,7 +88,7 @@ export default {
let menuObj = {} let menuObj = {}
this.getMenuObj(menu.adminMenu,'',menuObj) this.getMenuObj(menu.adminMenu,'',menuObj)
this.$store.commit('setMenuObj',menuObj) this.$store.commit('setMenuObj',menuObj)
} // }
generateRoutes() generateRoutes()
this.$router.push("/"); this.$router.push("/");
} }
...@@ -124,8 +124,8 @@ export default { ...@@ -124,8 +124,8 @@ export default {
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
let data = res.data.data; let data = res.data.data;
console.log(data); // console.log(data);
setCookie("bgToken", data.name); // setCookie("bgToken", data.name);
this.getUser(); this.getUser();
} else { } else {
......
...@@ -20,7 +20,17 @@ ...@@ -20,7 +20,17 @@
/> />
</div> </div>
<div class="tree"> <div class="tree">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" :default-expand-all="true" /> <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" :default-expand-all="true">
<template #default="{ node, data }">
<div class="custom_tree_node">
<span
class="label-text "
:title="node.label"
>{{ node.label }}
</span>
</div>
</template>
</el-tree>
</div> </div>
</div> </div>
</div> </div>
...@@ -31,11 +41,14 @@ ...@@ -31,11 +41,14 @@
</div> </div>
<div class="table_container apaas_scroll"> <div class="table_container apaas_scroll">
<bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true"> <bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true">
<template v-slot:name="{ row }"> <template v-slot:business_name="{ row }">
<span @click="goDetail(row)" class="name_btn"> <span @click="goDetail(row)" class="name_btn">
{{ row.name }} {{ row.business_name }}
</span> </span>
</template> </template>
<template v-slot:state="{ row }">
<bg-switch @click="stateChange(row)" :labels="['否','是']" :values="[0,1]" v-model="row.state"></bg-switch>
</template>
<template v-slot:action="{ row }"> <template v-slot:action="{ row }">
<bg-table-btn class="btn"> <bg-table-btn class="btn">
编辑 编辑
...@@ -73,36 +86,38 @@ import { reactive, toRefs, ref, } from '@vue/reactivity' ...@@ -73,36 +86,38 @@ import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue' import { getCurrentInstance } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core' import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const headers = ref([ const headers = ref([
{ {
label: "业务系统编码", label: "业务系统编码",
prop: "code", prop: "business_code",
width: 180 width: 180
}, },
{ {
label: "业务系统名称", label: "业务系统名称",
prop: "name", prop: "business_name",
minWidth: 180 minWidth: 180
}, },
{ {
label: "账号", label: "账号",
prop: "account", prop: "system_account",
width: 150 width: 150
}, },
{ {
label: "所属机构", label: "所属机构",
prop: "org", prop: "organization_name",
width: 240 width: 240
}, },
{ {
label: "创建时间", label: "创建时间",
prop: "create_time", prop: "created_time",
width: 150 width: 150
}, },
{ {
label: "是否启用", label: "是否启用",
prop: "is_use", prop: "state",
width: 80 width: 80
}, },
{ {
...@@ -112,33 +127,36 @@ import { useRouter } from 'vue-router'; ...@@ -112,33 +127,36 @@ import { useRouter } from 'vue-router';
fixed: "right", fixed: "right",
}, },
]) ])
const tableRows = ref([ const tableRows = ref([])
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
{code: "YWXT0000001",name: "大数据处理系统",account: "admin",org: "大数据局",create_time: "2022-01-01 00:00",is_use: ""},
])
const search=ref(""); const search=ref("");
const filter = reactive({
keyword: "",
page: 1,
size: 10,
});
const tableTotal = ref(0);
const router = useRouter(); const router = useRouter();
const getTableRows = () => {
let params = {...filter.value}
$axios
.get(
`/apaas/system/v5/user/list`,
{
params,
}
)
.then((res) => {
if (res.data.code == 200) {
tableRows.value = res.data.data || []
tableTotal.value = res.data.total
}else {
$message.error(res.data.msg)
}
})
}
const addAccount = (params) => { const addAccount = (params) => {
router.push({ router.push({
path: "/develop/account/add", path: "/develop/account/add",
...@@ -242,6 +260,21 @@ import { useRouter } from 'vue-router'; ...@@ -242,6 +260,21 @@ import { useRouter } from 'vue-router';
label: 'label', label: 'label',
} }
const stateChange = (row) => {
const state = row.state.toString();
$axios
.post(
`/apaas/system/v5/user/state/${row.organization_id}/${state}`,
)
.then((res) => {
if (res.data.code == 200) {
getTableRows()
}else {
$message.error(res.data.msg)
}
})
}
const changeSize = (size) => { const changeSize = (size) => {
} }
...@@ -261,7 +294,7 @@ import { useRouter } from 'vue-router'; ...@@ -261,7 +294,7 @@ import { useRouter } from 'vue-router';
onBeforeMount(() => { onBeforeMount(() => {
getTableRows()
}) })
...@@ -293,6 +326,16 @@ import { useRouter } from 'vue-router'; ...@@ -293,6 +326,16 @@ import { useRouter } from 'vue-router';
.tree :deep() .el-tree-node>.el-tree-node__children { .tree :deep() .el-tree-node>.el-tree-node__children {
overflow: unset; overflow: unset;
} }
.custom_tree_node {
width: 100%;
font-size: 14px;
color: #202531;
padding-right: 16px;
}
.label-text:hover {
padding: 3px 0;
background-color: var(--el-tree-node-hover-bg-color);
}
.main_container { .main_container {
padding: 15px; padding: 15px;
height: 100%; height: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment