Commit 28984823 authored by 张俊's avatar 张俊

Merge branch 'zj' into dev

parents c29528a9 27c2fa22
......@@ -53,6 +53,8 @@ export default {
default: 0,
},
},
created(){
},
methods: {
deleteAction() {
this.$emit("delete-action", this.data);
......
......@@ -27,7 +27,11 @@
backgroundColor: 'rgba(255, 239, 239, 1)',
border: 'solid 1px rgba(215, 164, 169, 1)',
}
: {}
: {
color: '#ef9433',
backgroundColor: '#fffee8',
border: 'solid 1px #e4c884',
}
"
>{{ item.tip }}</span
>
......@@ -58,16 +62,17 @@
placeholder="请填写申请服务的应用场景"
></el-input>
</div>
<p class="inputtitle degr" @click="showtable = !showtable">
<p class="inputtitle degr" v-if="!data.isapp" @click="showtable = !showtable">
<i :class="showtable ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"></i
>选择需要申请的数据项:
</p>
<table-um
v-if="!data.isapp"
v-show="showtable"
:isSelection="true"
:headers="headers"
:stripe="true"
:url="data.tableurl"
:datas="data.data"
class="table"
></table-um>
</div>
......@@ -116,9 +121,13 @@ export default {
},
watch: {},
computed: {},
created() {},
created() {
},
mounted() {},
methods: {},
methods: {
},
};
</script>
......
<template>
<div class="detail_contain">
<p class="now_page_title">权限管理 / 组织用户 / <span>用户管理</span></p>
<div class="info_contain">
<service-header v-if="service_header_arr.url" :data="service_header_arr"></service-header>
</div>
<div class="organtable">
<p class="setwidth"><span></span>组织用户管理 <el-input class="elinput" v-model="input" prefix-icon="el-icon-search" placeholder="请输入关键字"></el-input></p>
<apass-table :header="header_arr" :data="datas"></apass-table>
<list-pagination
:total="listTotal"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="currentPage"
@size-change="changePageSize"
@current-change="changeCurrentPage"
></list-pagination>
</div>
<dialog-action
ref="myConfirm"
:confirmOptions="tipsOptions"
></dialog-action>
<div class="detail_contain">
<p class="now_page_title">权限管理 / 组织用户 / <span>用户管理</span></p>
<div class="info_contain">
<service-header
v-if="service_header_arr.url"
:data="service_header_arr"
></service-header>
</div>
<div class="organtable">
<p class="setwidth">
<span></span>组织用户管理
<el-input
class="elinput"
v-model="input"
prefix-icon="el-icon-search"
placeholder="请输入关键字"
></el-input>
</p>
<apass-table :header="header_arr" :data="datas"></apass-table>
<list-pagination
:total="listTotal"
:page-sizes="pageSizes"
:page-size="pageSize"
:current-page="currentPage"
@size-change="changePageSize"
@current-change="changeCurrentPage"
></list-pagination>
</div>
<dialog-action
ref="myConfirm"
:confirmOptions="tipsOptions"
></dialog-action>
</div>
</template>
<script>
import serviceHeader from '@/components/service-header'
import apassTable from '@/components/apass-table'
import serviceHeader from "@/components/service-header";
import apassTable from "@/components/apass-table";
import dialogAction from "@/components/dialog-action";
import ListPagination from "@/components/comments-pagination";
export default {
props: [],
components: {
serviceHeader,
apassTable,
dialogAction,
ListPagination
},
data() {
return {
table_url:'',
listTotal:0,
currentPage: 1,
pageSize: 10,
pageSizes: [10, 50, 100],
service_header_arr:{
name:'',
url:'',
first:[
{
name:'业务系统数',
text:'',
},
{
name:'组织管理员',
text:'',
},
],
second:[
{
name:'组织创建时间',
text:'',
},
],
fixed:true,
},
input:'',
tipsOptions: {
title:'',
message:"",
btnSubmitText: "",
btnCancelText: "",
position: "",
},
datas:[],
header_arr:[],
now_timeout:'',
admin_arr:['','超管','组织管理员','普通用户','开发者'],
};
props: [],
components: {
serviceHeader,
apassTable,
dialogAction,
ListPagination,
},
data() {
return {
table_url: "",
listTotal: 0,
currentPage: 1,
pageSize: 10,
pageSizes: [10, 50, 100],
service_header_arr: {
name: "",
url: "",
first: [
{
name: "业务系统数",
text: "",
},
{
name: "组织管理员",
text: "",
},
],
second: [
{
name: "组织创建时间",
text: "",
},
],
fixed: true,
},
input: "",
tipsOptions: {
title: "",
message: "",
btnSubmitText: "",
btnCancelText: "",
position: "",
},
datas: [],
header_arr: [],
now_timeout: "",
admin_arr: ["", "超管", "组织管理员", "普通用户", "开发者"],
};
},
watch: {
input(n, o) {
clearTimeout(this.now_timeout);
this.now_timeout = setTimeout(() => {
console.log(n);
this.get_list();
}, 1000);
},
watch: {
input(n,o){
clearTimeout(this.now_timeout)
this.now_timeout = setTimeout(()=>{
console.log(n);
this.get_list();
},1000)
}
},
computed: {},
created() {
this.get_user();
this.get_list();
},
mounted() {},
methods: {
changePageSize(value) {
this.pageSize = value;
this.currentPage = 1;
this.get_list();
},
computed: {
changeCurrentPage(value) {
this.currentPage = value;
this.get_list();
},
created() {
this.get_user()
this.get_list()
get_user() {
this.$http
.get(
`/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`
)
.then((response) => {
console.log(response);
let data = response.data.data;
this.service_header_arr = {
name: data.department_name,
first: [
{
name: "业务系统数",
text: data.systemUser,
},
{
name: "组织管理员",
text: data.orgAdmin + "",
},
],
second: [
{
name: "组织创建时间",
text: data.create_date,
},
],
fixed: true,
url: data.picture_path,
fixedurl: "/authority/organization/edit/" + this.$route.params.id,
};
})
.catch((response) => {});
},
mounted() {
this.header_arr = [
get_list() {
this.$http
.get(
`/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}`
)
.then((response) => {
console.log(response);
let data = response.data.data;
this.listTotal = response.data.total;
this.datas = data;
var _this = this
setTimeout(()=>{
this.header_arr = [
{
prop:'user_name',
label:'账号',
minWidth:'25%',
align:'left',
prop: "user_name",
label: "账号",
minWidth: "25%",
align: "left",
},
{
prop:'system_name',
label:'业务系统名称',
minWidth:'25%',
align:'left',
prop: "system_name",
label: "业务系统名称",
minWidth: "25%",
align: "left",
},
{
prop:'is_admin',
label:'用户类型',
minWidth:'25%',
align:'center',
getText(item){
return this.admin_arr[item.is_admin]
}
prop: "is_admin",
label: "用户类型",
minWidth: "25%",
align: "center",
getText(item) {
return _this.admin_arr[item.is_admin||0];
},
},
{
prop:'operat_time',
label:'上次操作修改时间',
minWidth:'25%',
align:'center',
prop: "operat_time",
label: "上次操作修改时间",
minWidth: "25%",
align: "center",
},
{
label: "操作",
type: "buttons",
width:'120px',
align: "center",
width: 140,
actionList: [
{
label: "删除",
callback: this.adelete,
},
],
label: "操作",
type: "buttons",
width: "120px",
align: "center",
width: 140,
actionList: [
{
label: "删除",
callback: this.adelete,
},
],
},
]
];
})
})
.catch((response) => {});
},
adelete(val) {
this.tipsOptions = {
title: "",
message: "",
btnSubmitText: "",
btnCancelText: "",
position: "",
};
this.tipsOptions.message = "是否删除该数据";
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - " + JSON.stringify(val));
this.delete_data(val);
this.$refs.myConfirm.hideModel();
};
this.$refs.myConfirm.showModel();
},
methods: {
changePageSize(value) {
this.pageSize = value;
this.currentPage = 1;
this.get_list();
},
changeCurrentPage(value) {
this.currentPage = value;
this.get_list();
},
get_user(){
this.$http
.get(`/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`)
.then(response => {
console.log(response);
let data = response.data.data
this.service_header_arr={
name:data.department_name,
first:[
{
name:'业务系统数',
text:data.systemUser,
},
{
name:'组织管理员',
text:data.orgAdmin+'',
},
],
second:[
{
name:'组织创建时间',
text:data.create_date,
},
],
fixed:true,
url:data.picture_path,
fixedurl:'/authority/organization/edit/'+this.$route.params.id
}
})
.catch((response)=> {
});
},
get_list(){
this.$http
.get(`/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}`)
.then(response => {
console.log(response);
let data = response.data.data
this.listTotal = response.data.total
this.datas = data
})
.catch((response)=> {
});
},
adelete(val){
this.tipsOptions= {
title:'',
message:"",
btnSubmitText: "",
btnCancelText: "",
position: "",
}
this.tipsOptions.message="是否删除该数据"
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - "+JSON.stringify(val));
this.delete_data(val)
this.$refs.myConfirm.hideModel();
};
this.$refs.myConfirm.showModel();
},
delete_data(val){
this.$http
.post(`/apaas/backmgt/user/delete`,{
id:[val.user_id]
})
.then(response => {
console.log(response);
let data = response.data.data
this.listTotal = response.data.total
this.datas = data
})
.catch((response)=> {
});
}
delete_data(val) {
this.$http
.post(`/apaas/backmgt/user/delete`, {
id: [val.user_id],
})
.then((response) => {
console.log(response);
this.get_list()
})
.catch((response) => {});
},
},
};
</script>
<style>
.setwidth .el-input__inner{
width: 240px;
.setwidth .el-input__inner {
width: 240px;
}
.setwidth .el-input{
width: 240px;
.setwidth .el-input {
width: 240px;
}
</style>
<style scoped>
.detail_contain{
width: 100%;
padding: 0 20px;
height: calc(100% - 84px);
margin-bottom: 20px;
.detail_contain {
width: 100%;
padding: 0 20px;
height: calc(100% - 84px);
margin-bottom: 20px;
}
.info_contain{
padding: 25px 20px;
background-color: #fff;
width: 100%;
box-shadow: 0px 3px 6px 0px
#f4f7fc;
border-radius: 12px;
.info_contain {
padding: 25px 20px;
background-color: #fff;
width: 100%;
box-shadow: 0px 3px 6px 0px #f4f7fc;
border-radius: 12px;
}
.now_page_title{
margin: 15px 0;
color: #898d9e;
.now_page_title {
margin: 15px 0;
color: #898d9e;
}
.now_page_title span{
color: #242c43;
.now_page_title span {
color: #242c43;
}
.organtable{
margin-top: 20px;
width: 100%;
height: calc(100% - 210px);
background-color: #fff;
box-shadow: 0px 3px 6px 0px
#f4f7fc;
border-radius: 12px;
padding: 20px;
.organtable {
margin-top: 20px;
width: 100%;
height: calc(100% - 210px);
background-color: #fff;
box-shadow: 0px 3px 6px 0px #f4f7fc;
border-radius: 12px;
padding: 20px;
}
.organtable p{
font-size: 16px;
color: #58617a;
height: 60px;
line-height: 60px;
border-bottom: 2px solid #f4f7fc;
margin-bottom: 10px;
.organtable p {
font-size: 16px;
color: #58617a;
height: 60px;
line-height: 60px;
border-bottom: 2px solid #f4f7fc;
margin-bottom: 10px;
}
.organtable p span{
display: inline-block;
width: 4px;
height: 16px;
background-color: #515fe7;
border-radius: 2px;
margin-right: 15px;
vertical-align: -3px;
.organtable p span {
display: inline-block;
width: 4px;
height: 16px;
background-color: #515fe7;
border-radius: 2px;
margin-right: 15px;
vertical-align: -3px;
}
.organtable .elinput{
float: right;
.organtable .elinput {
float: right;
}
</style>
......@@ -155,6 +155,7 @@ export default {
console.log(this.$route);
if(this.$route.path.indexOf('add')!==-1){
this.edit_flag = 0
this.get_now_user()
}
if(this.$route.path.indexOf('edit')!==-1){
this.edit_flag = 1
......@@ -165,6 +166,21 @@ export default {
this.get_user()
}
},
get_now_user(){
this.$http
.get(`/apaas/backmgt/user/getCurrentUser`)
.then(response => {
console.log(response);
let data = response.data.data
this.form={
person:data.user_name,
date:data.create_date.replace('T',' ').replace('Z',' '),
}
})
.catch((response)=> {
});
},
get_user(){
this.$http
.get(`/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`)
......
......@@ -257,9 +257,7 @@ export default {
desc:data.description,
person:data.create_user,
date:data.create_date,
ip:data.ip_whitelist.map((v,k)=>{
return v
}).join(';'),
ip:data.ip_whitelist,
domain:data.domain_name
}
})
......
......@@ -84,6 +84,21 @@ export default {
tableurl:'applydata',
},
],
share_arr:[
'',
{
name:'共享',
val:'share'
},
{
name:'受限',
val:'limit'
},
{
name:'敏感',
val:'mg'
}
],
};
},
......@@ -94,13 +109,64 @@ export default {
},
created() {
this.get_car_list()
},
mounted() {
},
methods: {
get_car_list(){
this.service_arr = []
this.$http
.get(`/apaas/serviceapp/v3/shopcart/list`)
.then(response => {
console.log(response);
let data = response.data.data.valid
data.forEach(e => {
this.service_arr.push({})
let l = this.service_arr.length -1
if(e.app_id){
//应用
this.service_arr[l]['img'] = e.application.logo
this.service_arr[l]['title'] = e.application.app_name
this.service_arr[l]['type'] = e.application.type_name
this.service_arr[l]['auth'] = e.application.org_name
this.service_arr[l]['size'] = e.app_apply.apply_type==0?'部署':'开发'
this.service_arr[l]['applytype'] = '申请方式:'+e.app_apply.duration_unit==1?'':''
this.service_arr[l]['num'] = e.app_apply.duration
this.service_arr[l]['isMg'] = false
this.service_arr[l]['isapp'] = true
}else{
//服务
this.service_arr[l]['img'] = e.service.cover
this.service_arr[l]['title'] = e.service.name
this.service_arr[l]['type'] = e.service.data_service_type1_name
this.service_arr[l]['tips'] = [
{
tip:this.share_arr[e.service.openness].name,
type:this.share_arr[e.service.openness].val
}
]
this.service_arr[l]['auth'] = e.service.organization_name
this.service_arr[l]['size'] = '规格:'
e.service.request_spcs_info.forEach(el => {
this.service_arr[l]['size'] = this.service_arr[l]['size'] + '访问次数:'+el.count+',访问量:'+el.pv+','
});
this.service_arr[l]['applytype'] = '申请方式:'+(e.service_apply.duration_unit==1?'':'')
this.service_arr[l]['num'] = e.service_apply.duration
this.service_arr[l]['isMg'] = e.service.openness == 3
this.service_arr[l]['data'] = JSON.parse(e.service.res_fields)
console.log(this.service_arr[l]['data']);
this.service_arr[l]['isapp'] = false
}
});
// this.service_arr =
})
.catch((response)=> {
});
},
},
};
</script>
......
......@@ -256,7 +256,9 @@ export default {
},
watch: {},
computed: {},
created() {},
created() {
this.get_service_info()
},
mounted() {},
methods: {
onSubmit(formName){
......@@ -271,7 +273,18 @@ export default {
},
download(val){
console.log(val);
}
},
get_service_info(){
this.$http
.get(`/apaas/service/v3/service/apply/service?apply_id=${this.$route.params.id}`)
.then((response) => {
console.log(response);
})
.catch(function(response) {
});
},
}
};
</script>
......
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