Commit 82ac0f6a authored by 张俊's avatar 张俊

组织管理详情

parent 142627e5
...@@ -372,7 +372,7 @@ export default { ...@@ -372,7 +372,7 @@ export default {
}, },
data() { data() {
return { return {
all_url: "", // all_url: "",
pagination: { pagination: {
rowsPerPage: 10, rowsPerPage: 10,
page: 1, page: 1,
......
<template> <template>
<div class="detail_contain"> <div class="detail_contain">
<p class="now_page_title">我的服务 / 申请的服务 / <span>服务详情</span></p> <p class="now_page_title">权限管理 / 组织用户 / <span>用户管理</span></p>
<div class="info_contain"> <div class="info_contain">
<service-header :data="service_header_arr"></service-header> <service-header :data="service_header_arr"></service-header>
</div> </div>
<div class="organtable"> <div class="organtable">
<p><span></span>组织用户管理 <el-input class="elinput" v-model="input" prefix-icon="el-icon-search" placeholder="请输入关键字"></el-input></p> <p class="setwidth"><span></span>组织用户管理 <el-input class="elinput" v-model="input" prefix-icon="el-icon-search" placeholder="请输入关键字"></el-input></p>
<table-um @adelete="adelete" :headers="header_arr" :paginationShow="true" :stripe="true" :datas="datas"></table-um> <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> </div>
<dialog-action <dialog-action
ref="myConfirm" ref="myConfirm"
...@@ -17,33 +25,40 @@ ...@@ -17,33 +25,40 @@
<script> <script>
import serviceHeader from '@/components/service-header' import serviceHeader from '@/components/service-header'
import tableUm from '@/components/table-um' import apassTable from '@/components/apass-table'
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import ListPagination from "@/components/comments-pagination";
export default { export default {
props: [], props: [],
components: { components: {
serviceHeader, serviceHeader,
tableUm, apassTable,
dialogAction dialogAction,
ListPagination
}, },
data() { data() {
return { return {
table_url:'',
listTotal:0,
currentPage: 1,
pageSize: 10,
pageSizes: [10, 50, 100],
service_header_arr:{ service_header_arr:{
name:'apaas-mapvideos', name:'',
first:[ first:[
{ {
name:'业务系统数', name:'业务系统数',
text:3, text:'',
}, },
{ {
name:'组织管理员', name:'组织管理员',
text:'2人', text:'',
}, },
], ],
second:[ second:[
{ {
name:'组织创建时间', name:'组织创建时间',
text:'2020-06-08 17:34:12', text:'',
}, },
], ],
fixed:true, fixed:true,
...@@ -56,97 +71,127 @@ export default { ...@@ -56,97 +71,127 @@ export default {
btnCancelText: "", btnCancelText: "",
position: "", position: "",
}, },
datas:[ datas:[],
{ header_arr:[],
id:1, now_timeout:'',
account:'qwwww', admin_arr:['','超管','组织管理员','普通用户','开发者'],
name:'wwwww', };
type:'eeeee', },
time:"qwewewewrwe" watch: {
}, input(n,o){
{ clearTimeout(this.now_timeout)
id:2, this.now_timeout = setTimeout(()=>{
account:'qwwww', console.log(n);
name:'wwwww', this.get_list();
type:'eeeee', },1000)
time:"qwewewewrwe" }
}, },
{ computed: {
id:3,
account:'qwwww', },
name:'wwwww', created() {
type:'eeeee', this.get_user()
time:"qwewewewrwe" this.get_list()
}, },
{ mounted() {
id:4, this.header_arr = [
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
},
{
id:5,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
},
],
header_arr:[
{ {
prop:'account', prop:'user_name',
label:'账号', label:'账号',
minWidth:'25%', minWidth:'25%',
align:'left', align:'left',
}, },
{ {
prop:'name', prop:'system_name',
label:'业务系统名称', label:'业务系统名称',
minWidth:'25%', minWidth:'25%',
align:'left', align:'left',
}, },
{ {
prop:'type', prop:'is_admin',
label:'用户类型', label:'用户类型',
minWidth:'25%', minWidth:'25%',
align:'center', align:'center',
getText(item){
return this.admin_arr[item.is_admin]
}
}, },
{ {
prop:'time', prop:'operat_time',
label:'上次操作修改时间', label:'上次操作修改时间',
minWidth:'25%', minWidth:'25%',
align:'center', align:'center',
}, },
{ {
label: "操作", label: "操作",
type: "Button", type: "buttons",
width:'120px', width:'120px',
align: "center", align: "center",
width: 140, width: 140,
btnList: [ actionList: [
{ {
type: "adelete",
label: "删除", label: "删除",
callback: this.adelete,
}, },
], ],
}, },
] ]
};
},
watch: {
},
computed: {
},
created() {
},
mounted() {
}, },
methods: { 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,
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){ adelete(val){
this.tipsOptions= { this.tipsOptions= {
title:'', title:'',
...@@ -158,19 +203,35 @@ export default { ...@@ -158,19 +203,35 @@ export default {
this.tipsOptions.message="是否删除该数据" this.tipsOptions.message="是否删除该数据"
this.tipsOptions.confirmSubmit = () => { this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - "+JSON.stringify(val)); console.log("deleteItem - "+JSON.stringify(val));
this.delete_data(val)
this.$refs.myConfirm.hideModel(); this.$refs.myConfirm.hideModel();
}; };
this.$refs.myConfirm.showModel(); 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)=> {
});
}
}, },
}; };
</script> </script>
<style> <style>
.organtable .el-input__inner{ .setwidth .el-input__inner{
width: 240px; width: 240px;
} }
.organtable .el-input{ .setwidth .el-input{
width: 240px; width: 240px;
} }
</style> </style>
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit('form')" class="right">保存</el-button> <el-button type="primary" @click="onSubmit('form')" class="right">保存</el-button>
<el-button class="right">取消</el-button> <el-button class="right" @click="backPage()">取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -152,16 +152,62 @@ export default { ...@@ -152,16 +152,62 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
get_now_page(){ get_now_page(){
console.log(this.$route);
if(this.$route.path.indexOf('add')!==-1){ if(this.$route.path.indexOf('add')!==-1){
this.edit_flag = 0 this.edit_flag = 0
} }
if(this.$route.path.indexOf('edit')!==-1){ if(this.$route.path.indexOf('edit')!==-1){
this.edit_flag = 1 this.edit_flag = 1
this.get_user()
} }
if(this.$route.path.indexOf('detail')!==-1){ if(this.$route.path.indexOf('detail')!==-1){
this.edit_flag = 2 this.edit_flag = 2
this.get_user()
} }
}, },
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.form={
name: data.department_name,
shortname:data.department_display,
code:this.$route.params.id,
desc:data.description,
person:data.create_user,
date:data.create_date,
fileList:data.picture_path
}
this.imgList = data.picture_path.split(';')
})
.catch((response)=> {
});
},
set_user(){
var temp = {
"department_id":this.form.code,
"department_name":this.form.name,
"description":this.form.desc,
"department_display":this.form.shortname,
"picture_path":this.form.fileList,
}
this.$http
.put('/apaas/backmgt/department',temp)
.then(response => {
console.log(response);
this.$message.success('保存成功')
this.$router.back(-1)
})
.catch((response)=> {
});
},
backPage(){
this.$router.back(-1)
},
add_user(){ add_user(){
var temp = { var temp = {
"department_name":this.form.name, "department_name":this.form.name,
...@@ -198,7 +244,12 @@ export default { ...@@ -198,7 +244,12 @@ export default {
console.log('submit!'); console.log('submit!');
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.add_user() if(this.edit_flag == 0){
this.add_user()
}
if(this.edit_flag == 1){
this.set_user()
}
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
return false; return false;
......
...@@ -302,7 +302,7 @@ export default { ...@@ -302,7 +302,7 @@ export default {
this.$set(this.form,'phone',data.register_user_info?data.register_user_info.phone:data.register_user_info) this.$set(this.form,'phone',data.register_user_info?data.register_user_info.phone:data.register_user_info)
this.$set(this.form,'resource',data.openness) this.$set(this.form,'resource',data.openness)
this.$set(this.form,'fileList',data.cover) this.$set(this.form,'fileList',data.cover)
this.imgList.push(data.cover) this.imgList = data.cover.split(';')
this.open = data.service_safe_config?data.service_safe_config.fusing:data.service_safe_config this.open = data.service_safe_config?data.service_safe_config.fusing:data.service_safe_config
this.open1 = data.service_safe_config?data.service_safe_config.req_intervals:data.service_safe_config this.open1 = data.service_safe_config?data.service_safe_config.req_intervals:data.service_safe_config
this.maxline = data.service_safe_config?data.service_safe_config.max_connections:data.service_safe_config this.maxline = data.service_safe_config?data.service_safe_config.max_connections:data.service_safe_config
......
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