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

我的服务列表优化

parent 23bbf898
......@@ -9,9 +9,9 @@
<span v-text="title"></span>
</h3>
<ul class="side_nav_bar_list">
<!-- active-class="current" -->
<router-link
tag="li"
active-class="current"
v-for="(nav, index) in navList"
:class="{ current: $route.path.indexOf(nav.path) > -1 }"
:key="'nav' + index"
......
......@@ -39,7 +39,7 @@ export default {
this.navList = this.fwglNav[level].map((item, index) => ({
name: item,
path: `/fwgl/list/${level}/${index}`,
path: `/fwgl/${level}/${index}`,
}));
},
},
......
......@@ -9,7 +9,7 @@
class="r_yhgl_table"
size="mini"
url="tableData"
:detailsUrl="`/fwgl/servicedetail/${level}/`"
:detailsUrl="detailsUrl"
:border="false"
:headers="headers"
:searchShow="true"
......@@ -24,7 +24,7 @@
@action-sold-out="soldOutItem"
@action-sold-out-2="soldOutItem2"
@action-cancel="cancelItem"
@action-examine="examineItem"
@action-approval="approvalItem"
@action-detail="detailItem"
@action-allot="allotItem"
></ces-table>
......@@ -47,7 +47,6 @@ export default {
type: 0, // 访问的页面
headers: [],
url: "",
detailsUrl: "ss/",
confirmOptions: {
title: "",
message: "",
......@@ -99,6 +98,17 @@ export default {
pathName() {
return this.fwglNav[this.level][this.type];
},
detailsUrl() {
let url = "";
if (this.level == 0 && this.type == 0) {
url = `/fwgl/${this.level}/${this.type}/servicedetail/`;
} else if (this.level == 0 && this.type == 1) {
url = `/fwgl/${this.level}/${this.type}/applyserviceedit/`;
}
return url;
},
},
components: {
cesTable,
......@@ -173,7 +183,7 @@ export default {
// 普通用户 --- 审批的服务
else if (level == 0 && type == 2) {
this.headers = [
{ label: "服务名称", prop: "name", type: "href", align: "left" },
{ label: "服务名称", prop: "name", type: "", align: "left" },
{ label: "服务领域", prop: "address", type: "", align: "center" },
{ label: "开放程度", prop: "address", type: "", align: "center" },
{ label: "请求方式", prop: "address", type: "", align: "center" },
......@@ -188,7 +198,7 @@ export default {
width: 160,
btnList: [
{
type: "action-examine",
type: "action-approval",
label: "审批",
line: "|",
},
......@@ -203,7 +213,7 @@ export default {
// 普通用户 --- 云资源服务
else if (level == 0 && type == 3) {
this.headers = [
{ label: "工作区域", prop: "name", type: "href", align: "center" },
{ label: "工作区域", prop: "name", type: "", align: "center" },
{ label: "网络环境", prop: "name", type: "", align: "center" },
{ label: "CPU(核)", prop: "name", type: "", align: "center" },
{ label: "内存(GB)", prop: "name", type: "", align: "center" },
......@@ -257,7 +267,7 @@ export default {
width: 160,
btnList: [
{
type: "action-examine",
type: "action-approval",
label: "审批",
line: "|",
},
......@@ -347,7 +357,7 @@ export default {
width: 160,
btnList: [
{
type: "action-examine",
type: "action-approval",
label: "审批",
line: "|",
},
......@@ -400,7 +410,7 @@ export default {
},
editItem(item) {
this.$router.push(
`/fwgl/serviceedit/${this.$route.params.level}/${item.id}`
`/fwgl/${this.level}/${this.type}/serviceedit/${item.id}`
);
},
soldOutItem(item) {
......@@ -429,8 +439,10 @@ export default {
cancelItem(item) {
console.log("cancelItem - " + item.name);
},
examineItem(item) {
console.log("examineItem - " + item.name);
approvalItem(item) {
this.$router.push(
`/fwgl/${this.level}/${this.type}/approvalserviceedit/${item.id}`
);
},
detailItem(item) {
console.log("detailItem - " + item.name);
......
......@@ -40,34 +40,34 @@ export default new Router({
{
path: "/fwgl/:level", // 服务管理 level:用户等级
name: "fwgl",
redirect: "/fwgl/list/:level/0",
redirect: "/fwgl/:level/0",
component: () => import("@/pages/fwgl"),
children: [
{
path: "/fwgl/list/:level/:type", // 服务管理/我的服务
path: "/fwgl/:level/:type", // 服务管理列表页
name: "fwglList",
component: () => import("@/pages/fwglList"),
},
{
path: "/fwgl/servicedetail/:level/:id",
path: "/fwgl/:level/:type/servicedetail/:id",
name: "servicedetail",
component: () => import("@/pages/serviceDetail"),
},
}, // 注册发布的服务 - 详情
{
path: "/fwgl/serviceedit/:level/:id",
path: "/fwgl/:level/:type/serviceedit/:id",
name: "serviceedit",
component: () => import("@/pages/serviceEdit"),
},
}, // 注册发布的服务 - 编辑
{
path: "/fwgl/applyserviceedit/:id",
path: "/fwgl/:level/:type/applyserviceedit/:id",
name: "applyserviceedit",
component: () => import("@/pages/apply_service_detail"),
},
}, // 申请的服务 - 详情
{
path: "/fwgl/approvalserviceedit/:id",
path: "/fwgl/:level/:type/approvalserviceedit/:id",
name: "approvalserviceedit",
component: () => import("@/pages/approval_service_detail"),
},
}, // 审批的服务 - 详情
],
},
{
......
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