Commit 27c2fa22 authored by 张俊's avatar 张俊

购物车申请服务

parent 2d5d518d
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
backgroundColor: 'rgba(255, 239, 239, 1)', backgroundColor: 'rgba(255, 239, 239, 1)',
border: 'solid 1px rgba(215, 164, 169, 1)', border: 'solid 1px rgba(215, 164, 169, 1)',
} }
: {} : {
color: '#ef9433',
backgroundColor: '#fffee8',
border: 'solid 1px #e4c884',
}
" "
>{{ item.tip }}</span >{{ item.tip }}</span
> >
...@@ -58,16 +62,17 @@ ...@@ -58,16 +62,17 @@
placeholder="请填写申请服务的应用场景" placeholder="请填写申请服务的应用场景"
></el-input> ></el-input>
</div> </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 <i :class="showtable ? 'el-icon-caret-bottom' : 'el-icon-caret-right'"></i
>选择需要申请的数据项: >选择需要申请的数据项:
</p> </p>
<table-um <table-um
v-if="!data.isapp"
v-show="showtable" v-show="showtable"
:isSelection="true" :isSelection="true"
:headers="headers" :headers="headers"
:stripe="true" :stripe="true"
:url="data.tableurl" :datas="data.data"
class="table" class="table"
></table-um> ></table-um>
</div> </div>
...@@ -116,9 +121,13 @@ export default { ...@@ -116,9 +121,13 @@ export default {
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created() {}, created() {
},
mounted() {}, mounted() {},
methods: {}, methods: {
},
}; };
</script> </script>
......
...@@ -2,10 +2,21 @@ ...@@ -2,10 +2,21 @@
<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 v-if="service_header_arr.url" :data="service_header_arr"></service-header> <service-header
v-if="service_header_arr.url"
:data="service_header_arr"
></service-header>
</div> </div>
<div class="organtable"> <div class="organtable">
<p class="setwidth"><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>
<apass-table :header="header_arr" :data="datas"></apass-table> <apass-table :header="header_arr" :data="datas"></apass-table>
<list-pagination <list-pagination
:total="listTotal" :total="listTotal"
...@@ -24,8 +35,8 @@ ...@@ -24,8 +35,8 @@
</template> </template>
<script> <script>
import serviceHeader from '@/components/service-header' import serviceHeader from "@/components/service-header";
import apassTable from '@/components/apass-table' import apassTable from "@/components/apass-table";
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import ListPagination from "@/components/comments-pagination"; import ListPagination from "@/components/comments-pagination";
export default { export default {
...@@ -34,110 +45,65 @@ export default { ...@@ -34,110 +45,65 @@ export default {
serviceHeader, serviceHeader,
apassTable, apassTable,
dialogAction, dialogAction,
ListPagination ListPagination,
}, },
data() { data() {
return { return {
table_url:'', table_url: "",
listTotal:0, listTotal: 0,
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
pageSizes: [10, 50, 100], pageSizes: [10, 50, 100],
service_header_arr:{ service_header_arr: {
name:'', name: "",
url:'', url: "",
first:[ first: [
{ {
name:'业务系统数', name: "业务系统数",
text:'', text: "",
}, },
{ {
name:'组织管理员', name: "组织管理员",
text:'', text: "",
}, },
], ],
second:[ second: [
{ {
name:'组织创建时间', name: "组织创建时间",
text:'', text: "",
}, },
], ],
fixed:true, fixed: true,
}, },
input:'', input: "",
tipsOptions: { tipsOptions: {
title:'', title: "",
message:"", message: "",
btnSubmitText: "", btnSubmitText: "",
btnCancelText: "", btnCancelText: "",
position: "", position: "",
}, },
datas:[], datas: [],
header_arr:[], header_arr: [],
now_timeout:'', now_timeout: "",
admin_arr:['','超管','组织管理员','普通用户','开发者'], admin_arr: ["", "超管", "组织管理员", "普通用户", "开发者"],
}; };
}, },
watch: { watch: {
input(n,o){ input(n, o) {
clearTimeout(this.now_timeout) clearTimeout(this.now_timeout);
this.now_timeout = setTimeout(()=>{ this.now_timeout = setTimeout(() => {
console.log(n); console.log(n);
this.get_list(); this.get_list();
},1000) }, 1000);
}
}, },
computed: {
}, },
computed: {},
created() { created() {
this.get_user() this.get_user();
this.get_list() this.get_list();
},
mounted() {
this.header_arr = [
{
prop:'user_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:'operat_time',
label:'上次操作修改时间',
minWidth:'25%',
align:'center',
},
{
label: "操作",
type: "buttons",
width:'120px',
align: "center",
width: 140,
actionList: [
{
label: "删除",
callback: this.adelete,
},
],
},
]
}, },
mounted() {},
methods: { methods: {
changePageSize(value) { changePageSize(value) {
this.pageSize = value; this.pageSize = value;
...@@ -148,129 +114,167 @@ export default { ...@@ -148,129 +114,167 @@ export default {
this.currentPage = value; this.currentPage = value;
this.get_list(); this.get_list();
}, },
get_user(){ get_user() {
this.$http this.$http
.get(`/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`) .get(
.then(response => { `/apaas/backmgt/department/detail?department_id=${this.$route.params.id}`
)
.then((response) => {
console.log(response); console.log(response);
let data = response.data.data let data = response.data.data;
this.service_header_arr={ this.service_header_arr = {
name:data.department_name, name: data.department_name,
first:[ first: [
{ {
name:'业务系统数', name: "业务系统数",
text:data.systemUser, text: data.systemUser,
}, },
{ {
name:'组织管理员', name: "组织管理员",
text:data.orgAdmin+'', text: data.orgAdmin + "",
}, },
], ],
second:[ second: [
{ {
name:'组织创建时间', name: "组织创建时间",
text:data.create_date, text: data.create_date,
}, },
], ],
fixed:true, fixed: true,
url:data.picture_path, url: data.picture_path,
fixedurl:'/authority/organization/edit/'+this.$route.params.id fixedurl: "/authority/organization/edit/" + this.$route.params.id,
} };
}) })
.catch((response)=> { .catch((response) => {});
});
}, },
get_list(){ get_list() {
this.$http this.$http
.get(`/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}`) .get(
.then(response => { `/apaas/backmgt/user/list?limit=${this.pageSize}&page=${this.currentPage}&department_id=${this.$route.params.id}&search=${this.input}`
)
.then((response) => {
console.log(response); console.log(response);
let data = response.data.data let data = response.data.data;
this.listTotal = response.data.total this.listTotal = response.data.total;
this.datas = data this.datas = data;
var _this = this
setTimeout(()=>{
this.header_arr = [
{
prop: "user_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||0];
},
},
{
prop: "operat_time",
label: "上次操作修改时间",
minWidth: "25%",
align: "center",
},
{
label: "操作",
type: "buttons",
width: "120px",
align: "center",
width: 140,
actionList: [
{
label: "删除",
callback: this.adelete,
},
],
},
];
}) })
.catch((response)=> { })
.catch((response) => {});
});
}, },
adelete(val){ adelete(val) {
this.tipsOptions= { this.tipsOptions = {
title:'', title: "",
message:"", message: "",
btnSubmitText: "", btnSubmitText: "",
btnCancelText: "", btnCancelText: "",
position: "", position: "",
} };
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.delete_data(val);
this.$refs.myConfirm.hideModel(); this.$refs.myConfirm.hideModel();
}; };
this.$refs.myConfirm.showModel(); this.$refs.myConfirm.showModel();
}, },
delete_data(val){ delete_data(val) {
this.$http this.$http
.post(`/apaas/backmgt/user/delete`,{ .post(`/apaas/backmgt/user/delete`, {
id:[val.user_id] id: [val.user_id],
}) })
.then(response => { .then((response) => {
console.log(response); console.log(response);
let data = response.data.data this.get_list()
this.listTotal = response.data.total
this.datas = data
}) })
.catch((response)=> { .catch((response) => {});
},
});
}
}, },
}; };
</script> </script>
<style> <style>
.setwidth .el-input__inner{ .setwidth .el-input__inner {
width: 240px; width: 240px;
} }
.setwidth .el-input{ .setwidth .el-input {
width: 240px; width: 240px;
} }
</style> </style>
<style scoped> <style scoped>
.detail_contain{ .detail_contain {
width: 100%; width: 100%;
padding: 0 20px; padding: 0 20px;
height: calc(100% - 84px); height: calc(100% - 84px);
margin-bottom: 20px; margin-bottom: 20px;
} }
.info_contain{ .info_contain {
padding: 25px 20px; padding: 25px 20px;
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;
box-shadow: 0px 3px 6px 0px box-shadow: 0px 3px 6px 0px #f4f7fc;
#f4f7fc;
border-radius: 12px; border-radius: 12px;
} }
.now_page_title{ .now_page_title {
margin: 15px 0; margin: 15px 0;
color: #898d9e; color: #898d9e;
} }
.now_page_title span{ .now_page_title span {
color: #242c43; color: #242c43;
} }
.organtable{ .organtable {
margin-top: 20px; margin-top: 20px;
width: 100%; width: 100%;
height: calc(100% - 210px); height: calc(100% - 210px);
background-color: #fff; background-color: #fff;
box-shadow: 0px 3px 6px 0px box-shadow: 0px 3px 6px 0px #f4f7fc;
#f4f7fc;
border-radius: 12px; border-radius: 12px;
padding: 20px; padding: 20px;
} }
.organtable p{ .organtable p {
font-size: 16px; font-size: 16px;
color: #58617a; color: #58617a;
height: 60px; height: 60px;
...@@ -278,7 +282,7 @@ export default { ...@@ -278,7 +282,7 @@ export default {
border-bottom: 2px solid #f4f7fc; border-bottom: 2px solid #f4f7fc;
margin-bottom: 10px; margin-bottom: 10px;
} }
.organtable p span{ .organtable p span {
display: inline-block; display: inline-block;
width: 4px; width: 4px;
height: 16px; height: 16px;
...@@ -287,7 +291,7 @@ export default { ...@@ -287,7 +291,7 @@ export default {
margin-right: 15px; margin-right: 15px;
vertical-align: -3px; vertical-align: -3px;
} }
.organtable .elinput{ .organtable .elinput {
float: right; float: right;
} }
</style> </style>
...@@ -257,9 +257,7 @@ export default { ...@@ -257,9 +257,7 @@ export default {
desc:data.description, desc:data.description,
person:data.create_user, person:data.create_user,
date:data.create_date, date:data.create_date,
ip:data.ip_whitelist.map((v,k)=>{ ip:data.ip_whitelist,
return v
}).join(';'),
domain:data.domain_name domain:data.domain_name
} }
}) })
......
...@@ -84,6 +84,21 @@ export default { ...@@ -84,6 +84,21 @@ export default {
tableurl:'applydata', tableurl:'applydata',
}, },
], ],
share_arr:[
'',
{
name:'共享',
val:'share'
},
{
name:'受限',
val:'limit'
},
{
name:'敏感',
val:'mg'
}
],
}; };
}, },
...@@ -94,12 +109,63 @@ export default { ...@@ -94,12 +109,63 @@ export default {
}, },
created() { created() {
this.get_car_list()
}, },
mounted() { mounted() {
}, },
methods: { 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)=> {
});
},
}, },
}; };
......
...@@ -256,7 +256,9 @@ export default { ...@@ -256,7 +256,9 @@ export default {
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created() {}, created() {
this.get_service_info()
},
mounted() {}, mounted() {},
methods: { methods: {
onSubmit(formName){ onSubmit(formName){
...@@ -271,7 +273,18 @@ export default { ...@@ -271,7 +273,18 @@ export default {
}, },
download(val){ download(val){
console.log(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> </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