"src/pages/user.vue" did not exist on "8a26a769a75c18374a68bb9264359da600b8a00d"
Commit c36cbf93 authored by 徐一鸣's avatar 徐一鸣

应用管理列表调试

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