Commit a7e0ee4d authored by 张俊's avatar 张俊

普通用户显示tabs

parent 911999d4
...@@ -27,12 +27,25 @@ ...@@ -27,12 +27,25 @@
<!-- <mavon-editor v-model="list_arr" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false" v-if="now_service == 0"/> --> <!-- <mavon-editor v-model="list_arr" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false" v-if="now_service == 0"/> -->
<info-list <info-list
:list_arr="list_arr" :list_arr="list_arr"
v-if="now_service == 0" v-if="service_arr[now_user][now_service] == '基本信息'"
> >
<mavon-editor slot="app_code" v-model="appcode" :boxShadow="false" :toolbarsFlag="false" :subfield="subfield" :defaultOpen="preview" :editable="false"/> <mavon-editor
slot="app_code"
v-model="appcode"
:boxShadow="false"
:toolbarsFlag="false"
:subfield="subfield"
:defaultOpen="preview"
:editable="false"
/>
</info-list> </info-list>
<div v-if="now_service == 1&&now_user == 0"> <div
v-if="
service_arr[now_user][now_service] == '镜像文件管理' &&
now_user == 0
"
>
<p style="color:#8890a7;">镜像列表:</p> <p style="color:#8890a7;">镜像列表:</p>
<div <div
v-if="image_arr" v-if="image_arr"
...@@ -56,7 +69,12 @@ ...@@ -56,7 +69,12 @@
<span class="addimage" @click="addImage">新增镜像</span> <span class="addimage" @click="addImage">新增镜像</span>
</p> </p>
<div v-if="addImageFlag"> <div v-if="addImageFlag">
<el-form ref="form" :rules="rules" :model="form" label-width="0px"> <el-form
ref="form"
:rules="rules"
:model="form"
label-width="0px"
>
<el-form-item prop="name"> <el-form-item prop="name">
<p class="formname">镜像名称:</p> <p class="formname">镜像名称:</p>
<el-input v-model="form.name"></el-input> <el-input v-model="form.name"></el-input>
...@@ -78,9 +96,12 @@ ...@@ -78,9 +96,12 @@
:on-success="upload_success" :on-success="upload_success"
:on-error="upload_error" :on-error="upload_error"
:data="anotherData" :data="anotherData"
:multiple="false"> :multiple="false"
>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -91,20 +112,46 @@ ...@@ -91,20 +112,46 @@
</div> </div>
</div> </div>
<div v-if="now_service == 2&&now_user == 0"> <div
v-if="
service_arr[now_user][now_service] == '部署文件管理' &&
now_user == 0
"
>
<p style="color:#8890a7;">压缩包:</p> <p style="color:#8890a7;">压缩包:</p>
<p><img src="@/assets/imgs/ic_olddata.png" alt="" style="margin-right: 10px;">{{oldpag_name}} <span class="download" @click="down_load_zip">下载原压缩包</span> </p> <p>
<img
src="@/assets/imgs/ic_olddata.png"
alt=""
style="margin-right: 10px;"
/>{{ oldpag_name }}
<span class="download" @click="down_load_zip">下载原压缩包</span>
</p>
<p style="color:#8890a7;margin:20px 0;">上传新的压缩包:</p> <p style="color:#8890a7;margin:20px 0;">上传新的压缩包:</p>
<div class="uploadtips"> <div class="uploadtips">
<p style="margin-left:-11px;"><i class="el-icon-warning-outline"></i>压缩包上传提示:</p> <p style="margin-left:-11px;">
<p>1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png,templates/NOTES.txt;</p> <i class="el-icon-warning-outline"></i>压缩包上传提示:
</p>
<p>
1.必须包含以下文件:Chart.yaml,README.md,step.yaml,values.yaml,logo.png,templates/NOTES.txt;
</p>
<p>2.上述文件必须按照上述名称进行命名;</p> <p>2.上述文件必须按照上述名称进行命名;</p>
<p>3.step.yaml文件为values.yaml中的可配置参数,templates/NOTES.txt文件为应用的部署信息;</p> <p>
<p>4.templates/NOTES.txt主要用于用户部署后的访问,可以按照如下示例进行编写:</p> 3.step.yaml文件为values.yaml中的可配置参数,templates/NOTES.txt文件为应用的部署信息;
</p>
<p>
4.templates/NOTES.txt主要用于用户部署后的访问,可以按照如下示例进行编写:
</p>
<p>&nbsp;&nbsp;&nbsp;this is a postgresql.</p> <p>&nbsp;&nbsp;&nbsp;this is a postgresql.</p>
<p>&nbsp;&nbsp;&nbsp;author : Tom</p> <p>&nbsp;&nbsp;&nbsp;author : Tom</p>
<p v-html="'&nbsp;&nbsp;&nbsp;内部地址: {{ .Release.Name }}.{{ .Release.Namespace }}:5432'"></p> <p
<p>5.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。</p> v-html="
'&nbsp;&nbsp;&nbsp;内部地址: {{ .Release.Name }}.{{ .Release.Namespace }}:5432'
"
></p>
<p>
5.请将文件夹压缩为“.zip”、“.tgz”、“.tar.gz”格式,如:名称为redis-ha的文件夹压缩为redis-ha.zip。
</p>
</div> </div>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
...@@ -116,9 +163,12 @@ ...@@ -116,9 +163,12 @@
:on-success="upload_success" :on-success="upload_success"
:on-error="upload_error" :on-error="upload_error"
:data="anotherData1" :data="anotherData1"
:multiple="false"> :multiple="false"
>
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</el-upload> </el-upload>
<div class="savebtn"> <div class="savebtn">
<el-button @click="save_zip">保存</el-button> <el-button @click="save_zip">保存</el-button>
...@@ -126,14 +176,21 @@ ...@@ -126,14 +176,21 @@
</div> </div>
</div> </div>
<div v-if="(now_service == 3&&now_user == 0)||(now_service == 1&&now_user !== 0)"> <div
v-if="
(service_arr[now_user][now_service] == '评分及评论' &&
now_user == 0) ||
(service_arr[now_user][now_service] == '评分及评论' &&
now_user !== 0)
"
>
<service-tab-comments <service-tab-comments
:is_app_detail="is_app_detail" :is_app_detail="is_app_detail"
:data="commentsData" :data="commentsData"
:url="commentsUrl"> :url="commentsUrl"
>
</service-tab-comments> </service-tab-comments>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -150,10 +207,10 @@ import infoList from "@/components/infoList"; ...@@ -150,10 +207,10 @@ import infoList from "@/components/infoList";
import tableUm from "@/components/table/table-um"; import tableUm from "@/components/table/table-um";
import serviceHeader from "@/components/service-header"; import serviceHeader from "@/components/service-header";
import dialogAction from "@/components/dialog-action"; import dialogAction from "@/components/dialog-action";
import uploadFile from '@/components/general/upload_file' import uploadFile from "@/components/general/upload_file";
import serviceTabComments from '@/components/service-tabs/service-tab-comments' import serviceTabComments from "@/components/service-tabs/service-tab-comments";
import { getRole } from "@/utils/common"; import { getRole } from "@/utils/common";
import { mapGetters,mapState } from 'vuex' import { mapGetters, mapState } from "vuex";
import apassTable from "@/components/apass-table"; import apassTable from "@/components/apass-table";
import imageDetail from "@/components/image-detail"; import imageDetail from "@/components/image-detail";
export default { export default {
...@@ -165,7 +222,7 @@ export default { ...@@ -165,7 +222,7 @@ export default {
uploadFile, uploadFile,
serviceTabComments, serviceTabComments,
apassTable, apassTable,
imageDetail imageDetail,
}, },
data() { data() {
return { return {
...@@ -173,40 +230,36 @@ export default { ...@@ -173,40 +230,36 @@ export default {
buy_style: 0, buy_style: 0,
image_loading: false, image_loading: false,
image_noMore: false, image_noMore: false,
preview:'preview', preview: "preview",
subfield:false, subfield: false,
image_arr:[], image_arr: [],
now_page:1, now_page: 1,
total:0, total: 0,
anotherData:{}, anotherData: {},
anotherData1:{}, anotherData1: {},
asynLoad:false, asynLoad: false,
oldpag_name:'', oldpag_name: "",
imgList: [], imgList: [],
imgList1: [], imgList1: [],
is_app_detail:true, is_app_detail: true,
commentsData:{ commentsData: {
avgScore:0, avgScore: 0,
scoreStatic:{}, scoreStatic: {},
}, },
commentsUrl:'', commentsUrl: "",
form:{ form: {
name: '', name: "",
fileList:[], fileList: [],
taps:'' taps: "",
}, },
fileList:[], fileList: [],
rules:{ rules: {
name:[ name: [{ required: true, message: "请输入镜像名称", trigger: "blur" }],
{required: true, message: '请输入镜像名称', trigger: 'blur'} taps: [{ required: true, message: "请输入镜像标签", trigger: "blur" }],
],
taps:[
{required: true, message: '请输入镜像标签', trigger: 'blur'}
]
}, },
tipsOptions: { tipsOptions: {
title:'', title: "",
message:"", message: "",
btnSubmitText: "", btnSubmitText: "",
btnCancelText: "", btnCancelText: "",
position: "", position: "",
...@@ -220,41 +273,41 @@ export default { ...@@ -220,41 +273,41 @@ export default {
name: "", name: "",
first: [ first: [
{ {
"name": "在线状态", name: "在线状态",
"text": "" text: "",
}, },
{ {
"name": "应用类型", name: "应用类型",
"text": "" text: "",
}, },
{ {
"name": "业务领域", name: "业务领域",
"text": "" text: "",
} },
], ],
second: [ second: [
{ {
"name": "申请类型", name: "申请类型",
"text": "" text: "",
}, },
{ {
"name": "申请开发次数", name: "申请开发次数",
"text": "" text: "",
}, },
{ {
"name": "申请部署次数", name: "申请部署次数",
"text": "" text: "",
}, },
{ {
"name":"创建时间", name: "创建时间",
"text":"" text: "",
} },
], ],
yydetail: '', yydetail: "",
xxdetail:'', xxdetail: "",
aqdetail: true, aqdetail: true,
fxdetail:false, fxdetail: false,
url:'', url: "",
}, },
now_service: 0, now_service: 0,
header_arr: [], header_arr: [],
...@@ -277,36 +330,32 @@ export default { ...@@ -277,36 +330,32 @@ export default {
info: "", info: "",
type: "solt", type: "solt",
solt_name: "app_code", solt_name: "app_code",
}], },
],
appcode: "", appcode: "",
addImageFlag:false addImageFlag: false,
}; };
}, },
computed:{ computed: {
...mapGetters([ ...mapGetters(["level"]),
'level', ...mapState(["userInfo"]),
]),
...mapState(['userInfo']),
},
watch: {
}, },
watch: {},
created() { created() {
console.log(this.$route); console.log(this.$route);
if(this.userInfo){ if (this.userInfo) {
this.now_user = this.level this.now_user = this.level;
this.getServiceInfo(); this.getServiceInfo();
}else{ } else {
this.getCurrentUser() this.getCurrentUser();
} }
this.asynLoad=false this.asynLoad = false;
this.commentsUrl = `/apaas/hubApi/market/comments/${this.$route.params.id}` this.commentsUrl = `/apaas/hubApi/market/comments/${this.$route.params.id}`;
this.getServiceBaseInfo(); this.getServiceBaseInfo();
this.get_image_list() this.get_image_list();
this.get_options() this.get_options();
this.get_file_name() this.get_file_name();
this.get_app_code() this.get_app_code();
}, },
mounted() { mounted() {
this.header_arr = [ this.header_arr = [
...@@ -337,11 +386,11 @@ export default { ...@@ -337,11 +386,11 @@ export default {
}, },
], ],
}, },
] ];
}, },
methods: { methods: {
showImageDetail(item) { showImageDetail(item) {
this.$refs.imageDetail.showDialog(item,this.$route.params.id); this.$refs.imageDetail.showDialog(item, this.$route.params.id);
}, },
getCurrentUser() { getCurrentUser() {
this.$api.user.getNowUser().then(({ data }) => { this.$api.user.getNowUser().then(({ data }) => {
...@@ -350,7 +399,7 @@ export default { ...@@ -350,7 +399,7 @@ export default {
console.log(data.data); console.log(data.data);
console.log("--- user info ---"); console.log("--- user info ---");
this.$store.commit("userInfofun", data.data); this.$store.commit("userInfofun", data.data);
this.now_user = this.level this.now_user = this.level;
this.getServiceInfo(); this.getServiceInfo();
console.log(this.level); console.log(this.level);
} else { } else {
...@@ -358,220 +407,241 @@ export default { ...@@ -358,220 +407,241 @@ export default {
} }
}); });
}, },
addImage(){ addImage() {
this.addImageFlag = true this.addImageFlag = true;
}, },
down_load_zip(){ down_load_zip() {
const a = document.createElement('a'); // 创建a标签 const a = document.createElement("a"); // 创建a标签
a.setAttribute('download', '');// download属性 a.setAttribute("download", ""); // download属性
a.setAttribute('href', '/apaas/hubApi/market/download/'+this.$route.params.id);// href链接 a.setAttribute(
a.click();// 自执行点击事件 "href",
"/apaas/hubApi/market/download/" + this.$route.params.id
); // href链接
a.click(); // 自执行点击事件
}, },
get_options(){ get_options() {
this.$http.get(`/apaas/hubApi/market/comments/${this.$route.params.id}?limit=10&page=1`) this.$http
.then((response)=>{ .get(
if(response.data.success==1){ `/apaas/hubApi/market/comments/${this.$route.params.id}?limit=10&page=1`
)
.then((response) => {
if (response.data.success == 1) {
console.log(response); console.log(response);
var temp = {} var temp = {};
response.data.data.overview.detail_counts.forEach(e => { response.data.data.overview.detail_counts.forEach((e) => {
temp[e.score]=e.count temp[e.score] = e.count;
}); });
this.commentsData={ this.commentsData = {
avgScore:response.data.data.overview.ave, avgScore: response.data.data.overview.ave,
scoreStatic:temp, scoreStatic: temp,
} };
} }
}) });
}, },
submit_form(formName){ submit_form(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.anotherData = { this.anotherData = {
image_name:this.form.name, image_name: this.form.name,
tag:this.form.taps, tag: this.form.taps,
app_id:this.$route.params.id app_id: this.$route.params.id,
} };
console.log(this.anotherData); console.log(this.anotherData);
setTimeout(()=>{ setTimeout(() => {
this.$refs['upload'].submit() this.$refs["upload"].submit();
this.$message.success('开始上传') this.$message.success("开始上传");
this.$refs['form'].resetFields(); this.$refs["form"].resetFields();
// this.addImageFlag = false // this.addImageFlag = false
}) });
} else { } else {
console.log('error submit!!'); console.log("error submit!!");
return false; return false;
} }
}); });
}, },
close_up_image(){ close_up_image() {
this.$refs['form'].resetFields(); this.$refs["form"].resetFields();
this.addImageFlag = false this.addImageFlag = false;
}, },
save_zip(){ save_zip() {
this.anotherData1 = { this.anotherData1 = {
app_id:this.$route.params.id app_id: this.$route.params.id,
} };
console.log(this.anotherData1); console.log(this.anotherData1);
setTimeout(()=>{ setTimeout(() => {
this.$refs['upload1'].submit() this.$refs["upload1"].submit();
}) });
}, },
upload_success(response, file, fileList){ upload_success(response, file, fileList) {
if(response.success == 1){ if (response.success == 1) {
this.addImageFlag = false this.addImageFlag = false;
this.$message.success('上传成功') this.$message.success("上传成功");
this.get_image_list() this.get_image_list();
}else{ } else {
this.$message.error(response.errMsg) this.$message.error(response.errMsg);
} }
}, },
upload_error(){ upload_error() {
this.$message.error('上传失败') this.$message.error("上传失败");
}, },
load_data(){ load_data() {
console.log(2222); console.log(2222);
this.asynLoad=false this.asynLoad = false;
if(5*this.now_page<this.total){ if (5 * this.now_page < this.total) {
this.now_page = this.now_page + 1 this.now_page = this.now_page + 1;
this.get_image_list() this.get_image_list();
}else{ } else {
this.image_noMore = true; this.image_noMore = true;
} }
}, },
get_image_list(){ get_image_list() {
this.image_loading = true; this.image_loading = true;
this.$http.get(`/apaas/hubApi/image/imageUpList?page=${this.now_page}&size=5&app_id=${this.$route.params.id}`) this.$http
.then((response)=>{ .get(
if(response.data.success==1){ `/apaas/hubApi/image/imageUpList?page=${this.now_page}&size=5&app_id=${this.$route.params.id}`
)
.then((response) => {
if (response.data.success == 1) {
console.log(response); console.log(response);
this.asynLoad=true this.asynLoad = true;
if(response.data.data&&response.data.data.length){ if (response.data.data && response.data.data.length) {
this.image_arr.push(...response.data.data) this.image_arr.push(...response.data.data);
}else{ } else {
this.image_arr = [] this.image_arr = [];
} }
this.total = response.data.total this.total = response.data.total;
this.image_loading = false; this.image_loading = false;
this.image_noMore = false; this.image_noMore = false;
} }
}) });
}, },
get_file_name(){ get_file_name() {
this.$http.get(`/apaas/hubApi/market/chartsName/${this.$route.params.id}`) this.$http
.then((response)=>{ .get(`/apaas/hubApi/market/chartsName/${this.$route.params.id}`)
if(response.data.success==1){ .then((response) => {
if (response.data.success == 1) {
console.log(response); console.log(response);
this.oldpag_name = response.data.data this.oldpag_name = response.data.data;
} }
}) });
}, },
delete_data(name){ delete_data(name) {
this.$http.delete(`/apaas/hubApi/image/del/${name}`) this.$http
.then((response)=>{ .delete(`/apaas/hubApi/image/del/${name}`)
if(response.data.success==1){ .then((response) => {
this.$message.success('删除成功') if (response.data.success == 1) {
this.now_page = 1 this.$message.success("删除成功");
this.image_arr = [] this.now_page = 1;
this.get_image_list() this.image_arr = [];
}else{ this.get_image_list();
this.$message.error('删除失败') } else {
this.$message.error("删除失败");
} }
}).catch(()=>{
this.$message.error('删除失败')
}) })
.catch(() => {
this.$message.error("删除失败");
});
}, },
actiondelete(n){ actiondelete(n) {
console.log(n); console.log(n);
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 - "); console.log("deleteItem - ");
this.delete_data(n.name) this.delete_data(n.name);
this.$refs.myConfirm.hideModel(); this.$refs.myConfirm.hideModel();
}; };
this.$refs.myConfirm.showModel(); this.$refs.myConfirm.showModel();
}, },
change_up_state(url,state){ change_up_state(url, state) {
this.$http.put(`${url}/${this.$route.params.id}/${state}`).then((response)=>{ this.$http
if(response.data.success == 1){ .put(`${url}/${this.$route.params.id}/${state}`)
this.$message.success('申请成功') .then((response) => {
setTimeout(()=>{ if (response.data.success == 1) {
this.getServiceInfo() this.$message.success("申请成功");
},1000) setTimeout(() => {
}else{ this.getServiceInfo();
this.$message.error('申请失败') }, 1000);
} else {
this.$message.error("申请失败");
} }
}).catch((res)=>{
this.$message.error('申请失败')
}) })
.catch((res) => {
this.$message.error("申请失败");
});
}, },
deploy(){ deploy() {
console.log('0000'); console.log("0000");
}, },
editapp(){ editapp() {
this.$router.push(`${this.$route.path.split('detail')[0]}edit/${this.$route.params.id}`) this.$router.push(
`${this.$route.path.split("detail")[0]}edit/${this.$route.params.id}`
);
}, },
unline(val){ unline(val) {
console.log(val); console.log(val);
this.tipsOptions= { this.tipsOptions = {
title:'', title: "",
message:"", message: "",
btnSubmitText: "", btnSubmitText: "",
btnCancelText: "", btnCancelText: "",
position: "", position: "",
};
if (val.xxdetail == "申请下线" || val.xxdetail == "申请下线d") {
this.tipsOptions.message =
"该操作会将该应用从应用商店的平台应用区域下线至开发者应用区域,下线前需向超级管理员发送通知,超级管理员通过后此应用将下线至开发者应用区域。";
this.tipsOptions.btnSubmitText = "发送通知";
} }
if(val.xxdetail == '申请下线'||val.xxdetail == '申请下线d'){ if (val.xxdetail == "申请上线" || val.xxdetail == "申请上线d") {
this.tipsOptions.message="该操作会将该应用从应用商店的平台应用区域下线至开发者应用区域,下线前需向超级管理员发送通知,超级管理员通过后此应用将下线至开发者应用区域。" this.tipsOptions.message =
this.tipsOptions.btnSubmitText="发送通知" "该操作会将该应用从应用商店开发者应用上线至平台应用";
} this.tipsOptions.btnSubmitText = "确认";
if(val.xxdetail == '申请上线'||val.xxdetail == '申请上线d'){
this.tipsOptions.message="该操作会将该应用从应用商店开发者应用上线至平台应用"
this.tipsOptions.btnSubmitText="确认"
} }
this.tipsOptions.position="left" this.tipsOptions.position = "left";
this.tipsOptions.confirmSubmit = () => { this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - "); console.log("deleteItem - ");
if(val.xxdetail == '申请下线'||val.xxdetail == '申请下线d'){ if (val.xxdetail == "申请下线" || val.xxdetail == "申请下线d") {
this.change_up_state('/apaas/hubApi/market/platformStatus',3) this.change_up_state("/apaas/hubApi/market/platformStatus", 3);
} }
if(val.xxdetail == '申请上线'||val.xxdetail == '申请上线d'){ if (val.xxdetail == "申请上线" || val.xxdetail == "申请上线d") {
this.change_up_state('/apaas/hubApi/market/platformStatus',1) this.change_up_state("/apaas/hubApi/market/platformStatus", 1);
} }
this.$refs.myConfirm.hideModel(); this.$refs.myConfirm.hideModel();
}; };
this.$refs.myConfirm.showModel(); this.$refs.myConfirm.showModel();
}, },
unsell(val){ unsell(val) {
console.log(val); console.log(val);
this.tipsOptions= { this.tipsOptions = {
title:'', title: "",
message:"", message: "",
btnSubmitText: "", btnSubmitText: "",
btnCancelText: "", btnCancelText: "",
position: "", position: "",
};
if (val.yydetail == "申请下架" || val.yydetail == "申请下架d") {
this.tipsOptions.message =
"申请下架应用需要向组织管理员发送通知,组织管理员通过下架请求后该应用将从应用商店下架。";
this.tipsOptions.btnSubmitText = "发送通知";
} }
if(val.yydetail == '申请下架'||val.yydetail == '申请下架d'){ if (val.yydetail == "申请上架" || val.yydetail == "申请上架d") {
this.tipsOptions.message="申请下架应用需要向组织管理员发送通知,组织管理员通过下架请求后该应用将从应用商店下架。" this.tipsOptions.message =
this.tipsOptions.btnSubmitText="发送通知" "申请下架应用需要向组织管理员发送通知,组织管理员通过上架请求后该应用将在应用商店上架。";
} this.tipsOptions.btnSubmitText = "确认";
if(val.yydetail == '申请上架'||val.yydetail == '申请上架d'){
this.tipsOptions.message="申请下架应用需要向组织管理员发送通知,组织管理员通过上架请求后该应用将在应用商店上架。"
this.tipsOptions.btnSubmitText="确认"
} }
this.tipsOptions.confirmSubmit = () => { this.tipsOptions.confirmSubmit = () => {
console.log("deleteItem - "); console.log("deleteItem - ");
if(val.yydetail == '申请下架'||val.yydetail == '申请下架d'){ if (val.yydetail == "申请下架" || val.yydetail == "申请下架d") {
this.change_up_state('/apaas/hubApi/market/deployStatus',3) this.change_up_state("/apaas/hubApi/market/deployStatus", 3);
} }
if(val.yydetail == '申请上架'||val.yydetail == '申请上架d'){ if (val.yydetail == "申请上架" || val.yydetail == "申请上架d") {
this.change_up_state('/apaas/hubApi/market/deployStatus',1) this.change_up_state("/apaas/hubApi/market/deployStatus", 1);
} }
this.$refs.myConfirm.hideModel(); this.$refs.myConfirm.hideModel();
}; };
...@@ -579,135 +649,115 @@ export default { ...@@ -579,135 +649,115 @@ export default {
}, },
getServiceInfo() { getServiceInfo() {
this.$http this.$http
.get("/apaas/hubApi/market/baseInfo?id="+this.$route.params.id) .get("/apaas/hubApi/market/baseInfo?id=" + this.$route.params.id)
.then((response) => { .then((response) => {
if(response.data.success){ if (response.data.success) {
let data = response.data.data; let data = response.data.data;
var temp_info = { var temp_info = {
name: data.app_name+'V'+data.version, name: data.app_name + "V" + data.version,
first: [ first: [
{ {
"name": "在线状态", name: "在线状态",
"text": data.online_state_name text: data.online_state_name,
}, },
{ {
"name": "应用类型", name: "应用类型",
"text": data.type_name text: data.type_name,
}, },
{ {
"name": "业务领域", name: "业务领域",
"text": data.ywly_name text: data.ywly_name,
} },
], ],
second: [ second: [
{ {
"name": "申请类型", name: "申请类型",
"text": data.apply_type_name text: data.apply_type_name,
}, },
{ {
"name": "申请开发次数", name: "申请开发次数",
"text": data.apply_times+'' text: data.apply_times + "",
}, },
{ {
"name": "申请部署次数", name: "申请部署次数",
"text": data.deploy_times+'' text: data.deploy_times + "",
}, },
{ {
"name":"创建时间", name: "创建时间",
"text":data.create_date text: data.create_date,
} },
], ],
yydetail: '', yydetail: "",
xxdetail:'', xxdetail: "",
aqdetail: true, aqdetail: true,
fxdetail:false, fxdetail: false,
url:'', url: "",
} };
if(data.apply_type_name){ if (data.apply_type_name) {
} else {
}else{ temp_info["second"].splice(0, 1);
temp_info['second'].splice(0,1)
} }
var show_arr = [ var show_arr = [
[[["申请上架"]], [["申请上架d"]]],
[ [
[ "",
['申请上架'] "",
], [["申请下架", "申请上线"], ["申请上线d"]],
[ [["申请上架d"]],
['申请上架d']
],
],
[
'',
'',
[
[
'申请下架',
'申请上线'
],
[
'申请上线d',
]
],
[
[
'申请上架d'
]
],
],
[
'',
'',
[
'',
'',
[
'申请下线'
], ],
[ ["", "", ["", "", ["申请下线"], ["申请下线d"]]],
'申请下线d' ];
] var temp_str =
show_arr[data.online_state] &&
show_arr[data.online_state][data.up_deploy_status] &&
show_arr[data.online_state][data.up_deploy_status][
data.up_platform_status
] ]
? show_arr[data.online_state][data.up_deploy_status][
data.up_platform_status
] ]
] : "";
var temp_str = show_arr[data.online_state][data.up_deploy_status][data.up_platform_status] if (this.$route.query.source == "apply") {
if(this.$route.query.source=='apply'){ if (this.now_user == 0 || this.now_user == 4) {
if((this.now_user==0||this.now_user==4)){
this.service_arr[0].splice(1, 2); this.service_arr[0].splice(1, 2);
} }
}else{ } else {
if(temp_str&&temp_str[0]&&temp_str[0].indexOf('')!==-1){ if (temp_str && temp_str[0] && temp_str[0].indexOf("") !== -1) {
temp_info.yydetail = temp_str[0] temp_info.yydetail = temp_str[0];
} }
if(temp_str&&temp_str[1]&&temp_str[1].indexOf('')!==-1){ if (temp_str && temp_str[1] && temp_str[1].indexOf("") !== -1) {
temp_info.yydetail = temp_str[1] temp_info.yydetail = temp_str[1];
} }
if(temp_str&&temp_str[0]&&temp_str[0].indexOf('线')!==-1){ if (temp_str && temp_str[0] && temp_str[0].indexOf("线") !== -1) {
temp_info.xxdetail = temp_str[0] temp_info.xxdetail = temp_str[0];
} }
if(temp_str&&temp_str[1]&&temp_str[1].indexOf('线')!==-1){ if (temp_str && temp_str[1] && temp_str[1].indexOf("线") !== -1) {
temp_info.xxdetail = temp_str[1] temp_info.xxdetail = temp_str[1];
} }
} }
if(data.online_state==1&&data.up_deploy_status==2&&data.up_platform_status==0){ if (
this.service_arr[this.now_user].push('评分及评论') data.online_state == 1 &&
data.up_deploy_status == 2 &&
data.up_platform_status == 0
) {
this.service_arr[this.now_user].push("评分及评论");
} }
if(this.now_user == 0){ if (this.now_user == 0) {
temp_info.fxdetail = true temp_info.fxdetail = true;
} }
if(this.now_user == 1){ if (this.now_user == 1) {
temp_info.xxdetail = '' temp_info.xxdetail = "";
temp_info.yydetail = '' temp_info.yydetail = "";
temp_info.fxdetail = '' temp_info.fxdetail = "";
temp_info.aqdetail = false temp_info.aqdetail = false;
} }
if(this.now_user == 2){ if (this.now_user == 2) {
temp_info.xxdetail = '' temp_info.xxdetail = "";
temp_info.yydetail = '' temp_info.yydetail = "";
temp_info.aqdetail = true temp_info.aqdetail = true;
} }
temp_info.url = data.logo temp_info.url = data.logo;
this.service_header_arr = temp_info this.service_header_arr = temp_info;
} }
}) })
.catch(function(response) {}); .catch(function(response) {});
...@@ -715,7 +765,7 @@ export default { ...@@ -715,7 +765,7 @@ export default {
getServiceBaseInfo() { getServiceBaseInfo() {
this.$http this.$http
.get("/apaas/hubApi/market/app/detail/"+this.$route.params.id) .get("/apaas/hubApi/market/app/detail/" + 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.yyjj); this.$set(this.list_arr[0], "info", data.yyjj);
...@@ -724,16 +774,15 @@ export default { ...@@ -724,16 +774,15 @@ export default {
}) })
.catch(function(response) {}); .catch(function(response) {});
}, },
get_app_code(){ get_app_code() {
this.$http this.$http
.get("/apaas/hubApi/market/values/"+this.$route.params.id) .get("/apaas/hubApi/market/values/" + this.$route.params.id)
.then((response) => { .then((response) => {
let data = response.data.data; let data = response.data.data;
this.appcode = data this.appcode = data;
}) })
.catch(function(response) {}); .catch(function(response) {});
} },
}, },
}; };
</script> </script>
...@@ -808,7 +857,8 @@ export default { ...@@ -808,7 +857,8 @@ export default {
padding: 24px; padding: 24px;
color: #58617a; color: #58617a;
} }
.addimage,.download{ .addimage,
.download {
display: inline-block; display: inline-block;
color: #f8f9fd; color: #f8f9fd;
font-size: 16px; font-size: 16px;
...@@ -821,14 +871,14 @@ export default { ...@@ -821,14 +871,14 @@ export default {
margin-top: 20px; margin-top: 20px;
cursor: pointer; cursor: pointer;
} }
.download{ .download {
background-color: #495feb; background-color: #495feb;
margin-left: 10px; margin-left: 10px;
} }
.formname{ .formname {
color: #8890a7; color: #8890a7;
} }
.uploadtips{ .uploadtips {
width: 750px; width: 750px;
background-color: #f8f9fd; background-color: #f8f9fd;
border-radius: 8px; border-radius: 8px;
......
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