Commit c36cbf93 authored by 徐一鸣's avatar 徐一鸣

应用管理列表调试

parent 374eb2e1
......@@ -48,7 +48,7 @@
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
镜像文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
......@@ -120,7 +120,7 @@
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
部署文件拖到此处,或<em>点击上传</em>
</div>
</el-upload>
</el-form-item>
......@@ -412,16 +412,16 @@ export default {
this.app_info.logo = response.data;
},
beforeLogoUpload(file) {
/* const isJPG = file.type === "image/jpeg";
const isLt2M = file.size / 1024 / 1024 < 2;
const isPic = file.type === "image/jpeg" || file.type === "image/png";
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isJPG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
if (!isPic) {
this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
}
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
if (!isLt10M) {
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isJPG && isLt2M; */
return isPic && isLt10M;
},
getYwlys() {
this.$http
......
......@@ -16,7 +16,7 @@
</el-breadcrumb>
<app-list
v-if="listType"
v-if="listType === 'card'"
slot="list"
:data="listData"
:card-type="cardType"
......@@ -93,6 +93,7 @@ export default {
initHeader() {
let level = this.level;
let type = this.type;
let _self = this;
// 普通用户 --- 应用仓库 card列表形式
if (level === 0 && type === 0) {
......@@ -204,14 +205,51 @@ export default {
else if (level === 0 && type === 2) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线区域", prop: "address", type: "", align: "center" },
{ label: "申请类型", prop: "address", type: "", align: "center" },
{ label: "申请时间", prop: "address", type: "", align: "center" },
{ label: "申请状态", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "在线区域",
prop: "online_state_name",
align: "center",
},
{
label: "申请类型",
prop: "apply_type_name",
align: "center",
},
{
label: "申请时间",
prop: "time",
getText(item) {
let time = item.time || "";
return time.substring(0, 10);
},
align: "center",
},
{
label: "申请状态",
prop: "apply_status",
align: "center",
},
];
this.otherFilter1 = [
{
......@@ -282,14 +320,22 @@ export default {
else if (level === 0 && type === 3) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线区域", prop: "address", type: "", align: "center" },
{ label: "申请类型", prop: "address", type: "", align: "center" },
{ label: "审批时间", prop: "address", type: "", align: "center" },
{ label: "审批状态", prop: "address", type: "", align: "center" },
{
label: "应用名称", prop: "name", type: "href", align: "left" },
{
label: "应用版本", prop: "date", align: "center" },
{
label: "应用类型", prop: "address", align: "center" },
{
label: "业务领域", prop: "address", align: "center" },
{
label: "在线区域", prop: "address", align: "center" },
{
label: "申请类型", prop: "address", align: "center" },
{
label: "审批时间", prop: "address", align: "center" },
{
label: "审批状态", prop: "address", align: "center" },
{
label: "操作",
type: "Button",
......@@ -314,20 +360,59 @@ export default {
else if (level === 1 && type === 0) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线状态", prop: "address", type: "", align: "center" },
{ label: "创建时间", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "在线状态",
prop: "online_state",
align: "center",
},
{
label: "创建时间",
prop: "create_date",
getText(item) {
let time = item.create_date || "";
return time.substring(0, 10);
},
align: "center",
},
{
label: "操作",
type: "Button",
type: "buttons",
align: "center",
width: 160,
btnList: [
actionList: [
{
type: "goods-shelf",
getLabel(item) {
return item.online_state == 0 ? "上架" : "下架";
},
callback(item) {
item.online_state == 0
? _self.soldUpItem(item)
: _self.soldOutItem(item);
},
disabledRule(item) {
return item.online_state == 2;
},
},
],
},
......@@ -337,41 +422,103 @@ export default {
else if (level === 1 && type === 1) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "上架区域", prop: "address", type: "", align: "center" },
{ label: "部署时间", prop: "address", type: "", align: "center" },
{ label: "部署区域", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "上架区域",
prop: "address",
align: "center",
},
{
label: "部署时间",
prop: "address",
align: "center",
},
{
label: "部署区域",
prop: "address",
align: "center",
},
];
}
// 组织管理员 --- 应用审批管理
else if (level === 1 && type === 2) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线区域", prop: "address", type: "", align: "center" },
{ label: "申请类型", prop: "address", type: "", align: "center" },
{ label: "审批时间", prop: "address", type: "", align: "center" },
{ label: "申请状态", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "在线区域",
prop: "online_state_name",
align: "center",
},
{
label: "申请类型",
prop: "apply_type_name",
align: "center",
},
{
label: "审批时间",
prop: "apply_date",
align: "center",
},
{
label: "申请状态",
prop: "apply_status",
align: "center",
},
{
label: "操作",
type: "Button",
type: "buttons",
align: "center",
width: 160,
btnList: [
actionList: [
{
type: "action-approval",
label: "审批",
line: "|",
callback: this.approvalItem,
},
{
type: "action-delete",
label: "删除",
class: "warn",
callback: this.deleteItem,
},
],
},
......@@ -382,31 +529,54 @@ export default {
else if (level === 2 && type === 0) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线状态", prop: "address", type: "", align: "center" },
{ label: "所属组织", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "在线状态",
prop: "online_state",
align: "center",
},
{
label: "所属组织",
prop: "address",
align: "center",
},
{
label: "操作",
type: "Button",
type: "buttons",
align: "center",
width: 240,
btnList: [
actionList: [
{
type: "action-edit",
label: "编辑",
line: "|",
callback: _self.editItem
},
{
type: "off-line",
label: "下线",
line: "|",
callback: _self.offLine
},
{
type: "action-delete",
label: "删除",
callback: _self.deleteItem
},
],
},
......@@ -416,42 +586,108 @@ export default {
else if (level === 2 && type === 1) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "href", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "上架区域", prop: "address", type: "", align: "center" },
{ label: "所属组织", prop: "address", type: "", align: "center" },
{ label: "部署时间", prop: "address", type: "", align: "center" },
{ label: "部署区域", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "上架区域",
prop: "address",
align: "center",
},
{
label: "所属组织",
prop: "address",
align: "center",
},
{
label: "部署时间",
prop: "address",
align: "center",
},
{
label: "部署区域",
prop: "address",
align: "center",
},
];
}
// 超级管理员 --- 应用审批管理
else if (level === 2 && type === 2) {
this.listType = "table";
this.listHeader = [
{ label: "应用名称", prop: "name", type: "", align: "left" },
{ label: "应用版本", prop: "date", type: "", align: "center" },
{ label: "应用类型", prop: "address", type: "", align: "center" },
{ label: "业务领域", prop: "address", type: "", align: "center" },
{ label: "在线区域", prop: "address", type: "", align: "center" },
{ label: "申请类型", prop: "address", type: "", align: "center" },
{ label: "审批时间", prop: "address", type: "", align: "center" },
{ label: "申请状态", prop: "address", type: "", align: "center" },
{
label: "应用名称",
prop: "app_name",
type: "button",
callback: this.detailItem,
},
{
label: "应用版本",
prop: "version",
align: "center",
},
{
label: "应用类型",
prop: "type_name",
align: "center",
},
{
label: "业务领域",
prop: "ywly_name",
align: "center",
},
{
label: "在线区域",
prop: "online_state_name",
align: "center",
},
{
label: "申请类型",
prop: "apply_type_name",
align: "center",
},
{
label: "审批时间",
prop: "apply_date",
align: "center",
},
{
label: "申请状态",
prop: "apply_status",
align: "center",
},
{
label: "操作",
type: "Button",
type: "buttons",
align: "center",
width: 160,
btnList: [
actionList: [
{
type: "action-approval",
label: "审批",
line: "|",
callback: this.approvalItem,
},
{
type: "action-delete",
label: "删除",
class: "warn",
callback: this.deleteItem,
},
],
},
......@@ -523,7 +759,7 @@ export default {
let listUrl = [
"/apaas/hubApi/market/list",
"/apaas/hubApi/market/deployList",
"/apaas/hubApi/market/deployList",
"/apaas/hubApi/market/applyList",
];
let params = {};
......@@ -706,6 +942,15 @@ export default {
deleteItem(item) {
console.log("delete --- " + item.id);
},
detailItem(item) {
this.$router.push(`${this.detailsUrl + item.app_id}`);
},
soldUpItem(item) {
console.log(`上架${item.app_name}`);
},
soldOutItem(item) {
console.log(`下架${item.app_name}`);
},
editItem(item) {
this.$router.push(`/yygl/${this.level}/${this.type}/edit/${item.id}`);
},
......
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