Commit 3fb1c3c9 authored by 徐一鸣's avatar 徐一鸣

我的应用列表页

parent cd14bd33
<template> <template>
<div class="app_card"> <div class="app_card">
<a class="remove_btn" @click.prevent="deleteApp"> <a class="remove_btn" @click.prevent="deleteAction">
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</a> </a>
<div class="app_card-icon"> <div class="app_card-icon">
...@@ -10,18 +10,18 @@ ...@@ -10,18 +10,18 @@
<p class="app_card-name text_clip" v-text="data.name"></p> <p class="app_card-name text_clip" v-text="data.name"></p>
<p class="app_card-version text_clip" v-text="data.version"></p> <p class="app_card-version text_clip" v-text="data.version"></p>
</div> </div>
<div class="app_card-action"> <div class="app_card-action" v-if="cardType == 0">
<el-button type="primary" plain @click="deploymentAction"> <el-button type="primary" plain @click="deploymentAction">
一键部署 一键部署
</el-button> </el-button>
</div> </div>
<!-- <p class="app_card-text"> <p class="app_card-text" v-if="cardType == 1">
<span> <span>
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<span>上线时间:</span> <span>上线时间:</span>
</span> </span>
<span class="text_clip" v-text="data.time"></span> <span class="text_clip" v-text="data.time"></span>
</p> --> </p>
</div> </div>
</template> </template>
...@@ -32,13 +32,17 @@ export default { ...@@ -32,13 +32,17 @@ export default {
type: Object, type: Object,
default: {}, default: {},
}, },
cardType: {
type: [String, Number],
default: 0,
},
}, },
methods: { methods: {
deploymentAction() { deploymentAction() {
console.log("一键部署 --- " + this.data.id); this.$emit("deployment-action", this.data);
}, },
deleteApp() { deleteAction() {
console.log("删除应用 --- " + this.data.id); this.$emit("delete-action", this.data);
}, },
}, },
}; };
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
v-for="(item, index) in data" v-for="(item, index) in data"
:key="'app_card_' + index" :key="'app_card_' + index"
:data="item" :data="item"
:card-type="cardType"
@deployment-action="deploymentAction"
@delete-action="deleteAction"
></app-card> ></app-card>
</div> </div>
</template> </template>
...@@ -20,6 +23,18 @@ export default { ...@@ -20,6 +23,18 @@ export default {
type: Array, type: Array,
default: [], default: [],
}, },
cardType: {
type: [String, Number],
default: 0,
},
},
methods: {
deploymentAction(item) {
this.$emit("deployment-action", item);
},
deleteAction(item) {
this.$emit("delete-action", item);
},
}, },
}; };
</script> </script>
......
<template> <template>
<div class="side_nav_bar"> <div class="side_nav_bar">
<h3 class="side_nav_bar_title" @click="titleAction"> <h3 class="side_nav_bar_title" @click="titleAction">
<img <img :src="titleIcon" width="20" style="margin-right: 10px;" />
:src="require('../assets/imgs/tool_fuwu.png')"
width="20"
style="margin-right: 10px;"
/>
<span v-text="title"></span> <span v-text="title"></span>
</h3> </h3>
<ul class="side_nav_bar_list"> <ul class="side_nav_bar_list">
...@@ -31,6 +27,10 @@ export default { ...@@ -31,6 +27,10 @@ export default {
type: String, type: String,
default: () => "我的服务", default: () => "我的服务",
}, },
titleIcon: {
type: String,
default: () => require("../assets/imgs/tool_fuwu.png"),
},
titlePath: { titlePath: {
type: String, type: String,
default: () => "", default: () => "",
......
...@@ -30,18 +30,17 @@ ...@@ -30,18 +30,17 @@
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-if="searchShow" v-if="searchShow"
v-model="search" v-model="search"
placeholder="请输入账号、中文名" :placeholder="inputPlaceholder"
style="max-width:220px;" style="width:180px;"
size="mini"
@input="searchVal" @input="searchVal"
class="ces_toolbar_inp" class="ces_toolbar_inp"
></el-input> ></el-input>
</div> </div>
<v-apaas-table-filter <v-apaas-table-filter
:show="showFliterList" :show="showFliterList"
:filter-list="filterList" :filter-list="filterList"
@filter-change="filterChange" @filter-change="filterChange"
></v-apaas-table-filter> ></v-apaas-table-filter>
<el-table <el-table
:data="selectedTabsPage" :data="selectedTabsPage"
:size="size" :size="size"
...@@ -104,6 +103,28 @@ ...@@ -104,6 +103,28 @@
</em> </em>
</em> </em>
<em v-if="btn.type == 'goods-shelf'">
<em
v-if="scope.row.state == 0"
class="cur_pointer"
style="color: #0f2683"
@click="handleClick(btn.type, scope.row)"
>
上架
</em>
<em
v-if="scope.row.state == 1"
class="cur_pointer"
style="color: #0f2683"
@click="handleClick(btn.type, scope.row)"
>
下架
</em>
<em v-if="scope.row.state == 2">
下架
</em>
</em>
<em <em
class="cur_pointer" class="cur_pointer"
v-else-if="btn.label == '删除' && btn.local" v-else-if="btn.label == '删除' && btn.local"
...@@ -237,7 +258,7 @@ export default { ...@@ -237,7 +258,7 @@ export default {
"v-apaas-table-select": tableSelect, "v-apaas-table-select": tableSelect,
"v-apaas-table-umhref": tableUmhref, "v-apaas-table-umhref": tableUmhref,
"d-confirm": DConfirm, "d-confirm": DConfirm,
"v-apaas-table-filter": tableFilter "v-apaas-table-filter": tableFilter,
}, },
props: { props: {
// 表格型号:mini,medium,small // 表格型号:mini,medium,small
...@@ -264,6 +285,10 @@ export default { ...@@ -264,6 +285,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
inputPlaceholder: {
type: String,
default: "请输入账号、中文名",
},
url: { url: {
type: String, type: String,
default: "", default: "",
...@@ -515,7 +540,7 @@ export default { ...@@ -515,7 +540,7 @@ export default {
}, },
filterChange(filter) { filterChange(filter) {
console.log(filter); console.log(filter);
} },
}, },
}; };
</script> </script>
...@@ -669,9 +694,6 @@ em { ...@@ -669,9 +694,6 @@ em {
.ces_toolbar .ces_toolbar_btn { .ces_toolbar .ces_toolbar_btn {
margin-right: 10px; margin-right: 10px;
} }
.ces_toolbar .ces_toolbar_inp {
margin-right: 10px;
}
.ces-pagination { .ces-pagination {
margin-top: 20px; margin-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
......
...@@ -392,10 +392,9 @@ export default { ...@@ -392,10 +392,9 @@ export default {
}, },
]; ];
} }
// Error // Error
else { else {
this.headers = [];
throw Error("The page doesn't exist"); throw Error("The page doesn't exist");
} }
}, },
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<div class="yygl_container"> <div class="yygl_container">
<side-nav-bar <side-nav-bar
:nav-list="navList" :nav-list="navList"
title="我的应用"
:title-icon="require('../assets/imgs/tool_yingyong.png')"
:title-path="navList[0] && navList[0].path" :title-path="navList[0] && navList[0].path"
></side-nav-bar> ></side-nav-bar>
<div class="main_container"> <div class="main_container">
......
This diff is collapsed.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"name": "王小虎", "name": "王小虎",
"address": "0", "address": "0",
"id": "ssss22", "id": "ssss22",
"state": 0 "state": 2
} }
], ],
"tableData1": [ "tableData1": [
......
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