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

组织管理详情

parent 142627e5
......@@ -372,7 +372,7 @@ export default {
},
data() {
return {
all_url: "",
// all_url: "",
pagination: {
rowsPerPage: 10,
page: 1,
......
<template>
<div class="detail_contain">
<p class="now_page_title">我的服务 / 申请的服务 / <span>服务详情</span></p>
<p class="now_page_title">权限管理 / 组织用户 / <span>用户管理</span></p>
<div class="info_contain">
<service-header :data="service_header_arr"></service-header>
</div>
<div class="organtable">
<p><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>
<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"
......@@ -17,33 +25,40 @@
<script>
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 ListPagination from "@/components/comments-pagination";
export default {
props: [],
components: {
serviceHeader,
tableUm,
dialogAction
apassTable,
dialogAction,
ListPagination
},
data() {
return {
table_url:'',
listTotal:0,
currentPage: 1,
pageSize: 10,
pageSizes: [10, 50, 100],
service_header_arr:{
name:'apaas-mapvideos',
name:'',
first:[
{
name:'业务系统数',
text:3,
text:'',
},
{
name:'组织管理员',
text:'2人',
text:'',
},
],
second:[
{
name:'组织创建时间',
text:'2020-06-08 17:34:12',
text:'',
},
],
fixed:true,
......@@ -56,97 +71,127 @@ export default {
btnCancelText: "",
position: "",
},
datas:[
{
id:1,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
},
{
id:2,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
datas:[],
header_arr:[],
now_timeout:'',
admin_arr:['','超管','组织管理员','普通用户','开发者'],
};
},
{
id:3,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
watch: {
input(n,o){
clearTimeout(this.now_timeout)
this.now_timeout = setTimeout(()=>{
console.log(n);
this.get_list();
},1000)
}
},
{
id:4,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
computed: {
},
{
id:5,
account:'qwwww',
name:'wwwww',
type:'eeeee',
time:"qwewewewrwe"
created() {
this.get_user()
this.get_list()
},
],
header_arr:[
mounted() {
this.header_arr = [
{
prop:'account',
prop:'user_name',
label:'账号',
minWidth:'25%',
align:'left',
},
{
prop:'name',
prop:'system_name',
label:'业务系统名称',
minWidth:'25%',
align:'left',
},
{
prop:'type',
prop:'is_admin',
label:'用户类型',
minWidth:'25%',
align:'center',
getText(item){
return this.admin_arr[item.is_admin]
}
},
{
prop:'time',
prop:'operat_time',
label:'上次操作修改时间',
minWidth:'25%',
align:'center',
},
{
label: "操作",
type: "Button",
type: "buttons",
width:'120px',
align: "center",
width: 140,
btnList: [
actionList: [
{
type: "adelete",
label: "删除",
callback: this.adelete,
},
],
},
]
};
},
watch: {
methods: {
changePageSize(value) {
this.pageSize = value;
this.currentPage = 1;
this.get_list();
},
computed: {
changeCurrentPage(value) {
this.currentPage = value;
this.get_list();
},
created() {
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)=> {
});
},
mounted() {
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)=> {
});
},
methods: {
adelete(val){
this.tipsOptions= {
title:'',
......@@ -158,19 +203,35 @@ export default {
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)=> {
});
}
},
};
</script>
<style>
.organtable .el-input__inner{
.setwidth .el-input__inner{
width: 240px;
}
.organtable .el-input{
.setwidth .el-input{
width: 240px;
}
</style>
......
......@@ -52,7 +52,7 @@
<el-form-item>
<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>
......@@ -152,16 +152,62 @@ export default {
mounted() {},
methods: {
get_now_page(){
console.log(this.$route);
if(this.$route.path.indexOf('add')!==-1){
this.edit_flag = 0
}
if(this.$route.path.indexOf('edit')!==-1){
this.edit_flag = 1
this.get_user()
}
if(this.$route.path.indexOf('detail')!==-1){
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(){
var temp = {
"department_name":this.form.name,
......@@ -198,7 +244,12 @@ export default {
console.log('submit!');
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.edit_flag == 0){
this.add_user()
}
if(this.edit_flag == 1){
this.set_user()
}
} else {
console.log('error submit!!');
return false;
......
......@@ -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,'resource',data.openness)
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.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
......
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