Commit d171408a authored by 张俊's avatar 张俊

应用管理

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