Commit d171408a authored by 张俊's avatar 张俊

应用管理

parent 2a193e6a
......@@ -334,7 +334,9 @@ export default {
tag:this.form.taps
}
console.log(this.anotherData);
this.$refs['upload'].submit()
setTimeout(()=>{
this.$refs['upload'].submit()
})
} else {
console.log('error submit!!');
return false;
......@@ -346,7 +348,9 @@ export default {
app_id:this.$route.params.id
}
console.log(this.anotherData1);
this.$refs['upload1'].submit()
setTimeout(()=>{
this.$refs['upload1'].submit()
})
},
upload_success(response, file, fileList){
if(response.success == 1){
......@@ -368,6 +372,7 @@ export default {
}
},
get_image_list(){
this.image_arr = []
this.$http.get(`/apaas/hubApi/image/imageUpList?page=${this.now_page}&size=5`)
.then((response)=>{
if(response.data.success==1){
......@@ -387,7 +392,21 @@ export default {
}
})
},
actiondelete(){
delete_data(name){
this.$http.delete(`/apaas/hubApi/image/del/${name}`)
.then((response)=>{
if(response.data.success==1){
this.$message.success('删除成功')
this.get_image_list()
}else{
this.$message.error('删除失败')
}
}).catch(()=>{
this.$message.error('删除失败')
})
},
actiondelete(n){
console.log(n);
this.tipsOptions= {
title:'',
message:"",
......@@ -398,6 +417,7 @@ export default {
this.tipsOptions.message="是否删除该数据"
this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - ");
this.delete_data(n.name)
this.$refs.myConfirm.hideModel();
};
this.$refs.myConfirm.showModel();
......
<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"
......@@ -22,12 +22,11 @@
</div>
</div>
<div class="type_box_select">
<mavon-editor v-model="list_arr" :boxShadow="false" :toolbarsFlag="false" :subfield="false" defaultOpen="preview" :editable="false" v-if="now_service == 0"/>
<info-list
v-if=" now_service == 1"
@download="download"
:list_arr="
now_service == 0
? list_arr
: servicead_arr
:list_arr="servicead_arr
"
>
<div class="appcode" v-html="appcode" slot="app_code"></div>
......@@ -182,39 +181,68 @@ export default {
service_header_arr: {
id:"",
name: "",
first: [],
second: [],
url: "",
first: [
{
"name": "应用类型",
"text": "数据服务"
},
{
"name": "业务领域",
"text": "应急领域"
},
{
"name": "在线区域",
"text": "平台应用"
}
],
second: [
{
"name": "审批状态",
"text": "审批通过",
"color":"#515fe7"
},
{
"name": "所属组织",
"text": "北京比格大数据有限公司"
},
{
"name": "申请时间",
"text": "2020-02-28 17:59:30"
}
],
aqdetail: true,
},
now_service: 0,
list_arr: [
{
title: "应用简介:",
info: "",
},
{
title: "功能简介:",
info: "",
},
{
title: "应用场景:",
info: "",
},
{
title: "应用参数:",
info: "",
type: "solt",
solt_name: "app_code",
},
{
title: "联系人:",
info: "",
},
{
title: "联系电话:",
info: "",
},
],
list_arr: '',
// [
// {
// title: "应用简介:",
// info: "",
// },
// {
// title: "功能简介:",
// info: "",
// },
// {
// title: "应用场景:",
// info: "",
// },
// {
// title: "应用参数:",
// info: "",
// type: "solt",
// solt_name: "app_code",
// },
// {
// title: "联系人:",
// info: "",
// },
// {
// title: "联系电话:",
// info: "",
// },
// ],
servicead_arr: [
{
title: "申请信息",
......@@ -250,18 +278,22 @@ export default {
watch: {},
computed: {},
created() {
this.now_user = this.$store.state.role;
getRole().then((data) => {
this.now_user = data;
this.$store.commit("rolefun", data);
this.getServiceInfo();
this.getServiceBaseInfo();
this.getServiceapplyInfo();
});
this.getServiceInfo();
this.getreadme();
// this.getServiceBaseInfo();
this.getServiceapplyInfo();
},
mounted() {},
methods: {
getreadme(){
this.$http
.get("/apaas/hubApi/market/readme/"+this.$route.params.app_id)
.then((response) => {
let data = response.data.data;
this.list_arr = data
})
.catch(function(response) {});
},
download(val){
console.log(val);
},
......@@ -277,33 +309,38 @@ export default {
})
.catch(function(response) {});
},
getServiceBaseInfo() {
this.$http
.get("./static/applyappdetail.json")
.then((response) => {
let data = response.data.data;
this.$set(this.list_arr[0], "info", data.appbaseinfo.intorduce);
this.$set(this.list_arr[1], "info", data.appbaseinfo.action);
this.$set(this.list_arr[2], "info", data.appbaseinfo.use);
this.$set(this.list_arr[4], "info", data.appbaseinfo.person);
this.$set(this.list_arr[5], "info", data.appbaseinfo.phone);
// getServiceBaseInfo() {
// this.$http
// .get("/apaas/hubApi/market/applyDetailInfo/"+this.$route.params.id)
// .then((response) => {
// let data = response.data.data;
// this.$set(this.list_arr[0], "info", data.appbaseinfo.intorduce);
// this.$set(this.list_arr[1], "info", data.appbaseinfo.action);
// this.$set(this.list_arr[2], "info", data.scene);
// this.$set(this.list_arr[4], "info", data.contact_person);
// this.$set(this.list_arr[5], "info", data.contact_number);
this.appcode = data.appbaseinfo.appcode;
})
.catch(function(response) {});
},
// this.appcode = data.appbaseinfo.appcode;
// })
// .catch(function(response) {});
// },
deploy(val){
console.log(val);
},
getServiceInfo() {
this.$http
.get("./static/applyappdetail.json")
.get("/apaas/hubApi/market/applyInfo/"+this.$route.params.id)
.then((response) => {
let data = response.data.data;
this.$set(this.service_header_arr, "id", data.appInfo.id);
this.$set(this.service_header_arr, "name", data.appInfo.name);
this.$set(this.service_header_arr, "first", data.appInfo.first);
this.$set(this.service_header_arr, "second", data.appInfo.second);
this.$set(this.service_header_arr, "id", data.app_id);
this.$set(this.service_header_arr, "name", data.app_name+' '+'V'+data.version);
this.$set(this.service_header_arr, "url", data.logo);
this.$set(this.service_header_arr.first[0], "text", data.type_name);
this.$set(this.service_header_arr.first[1], "text", data.ywly_name);
this.$set(this.service_header_arr.first[2], "text", data.online_state_name);
this.$set(this.service_header_arr.second[0], "text", data.apply_status);
this.$set(this.service_header_arr.second[1], "text", data.department_name);
this.$set(this.service_header_arr.second[2], "text", data.time);
})
.catch(function(response) {
});
......
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