Commit 92e5d88e authored by 张俊's avatar 张俊

Merge branch 'dev' of cloud.wodcloud.com:apaas/apaas-v3-ui into dev

parents 38e9e084 27269620
<template> <template>
<div class="side_nav_bar"> <div class="side_nav_bar">
<h3 class="side_nav_bar_title"> <h3 class="side_nav_bar_title" @click="titleAction">
<img :src="require('../assets/imgs/tool_fuwu.png')" width="20" style="margin-right: 10px;" /> <img
: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">
...@@ -25,6 +29,10 @@ export default { ...@@ -25,6 +29,10 @@ export default {
type: String, type: String,
default: () => "我的服务", default: () => "我的服务",
}, },
titlePath: {
type: String,
default: () => "",
},
navList: { navList: {
type: Array, type: Array,
default: () => [], default: () => [],
...@@ -34,6 +42,11 @@ export default { ...@@ -34,6 +42,11 @@ export default {
navAction(nav) { navAction(nav) {
this.$router.push(nav.path); this.$router.push(nav.path);
}, },
titleAction() {
if (this.titlePath) {
this.$router.push(this.titlePath);
}
},
}, },
}; };
</script> </script>
...@@ -51,6 +64,7 @@ export default { ...@@ -51,6 +64,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer;
} }
.side_nav_bar_title > span { .side_nav_bar_title > span {
font-size: 16px; font-size: 16px;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<li <li
v-for="(v, i) in item.data" v-for="(v, i) in item.data"
:key="'f_l_d_' + index + '_' + i" :key="'f_l_d_' + index + '_' + i"
v-show="filterToggle[item.prop] || i <= filterLength" v-show="filterToggle[item.prop] || i < filterLength"
> >
<a <a
:class="{ current: isCurrentFilter(item.prop, v) }" :class="{ current: isCurrentFilter(item.prop, v) }"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
v-if="item.data.length > filterLength" v-if="item.data.length > filterLength"
@click="filterToggleAction(item.prop)" @click="filterToggleAction(item.prop)"
> >
<span>{{ filterToggle[item.prop] ? "收起" : "展开" }} {{item.data.length + "-" + filterLength}}</span> <span>{{ filterToggle[item.prop] ? "收起" : "展开" }}</span>
<i <i
:class=" :class="
filterToggle[item.prop] filterToggle[item.prop]
...@@ -403,6 +403,11 @@ export default { ...@@ -403,6 +403,11 @@ export default {
mounted() { mounted() {
this.getDataFromApiSync(); this.getDataFromApiSync();
this.initFilterData(); this.initFilterData();
window.addEventListener("resize", this.getFilterLength);
},
destroyed() {
window.removeEventListener("resize", this.getFilterLength);
}, },
watch: { watch: {
refreshInit: { refreshInit: {
...@@ -556,7 +561,9 @@ export default { ...@@ -556,7 +561,9 @@ export default {
}, },
filterAction() { filterAction() {
this.showFliterList = !this.showFliterList; this.showFliterList = !this.showFliterList;
this.getFilterLength();
},
getFilterLength() {
if (this.showFliterList) { if (this.showFliterList) {
this.$nextTick(() => { this.$nextTick(() => {
let width = let width =
...@@ -566,8 +573,8 @@ export default { ...@@ -566,8 +573,8 @@ export default {
20 - // 距左侧标题的边距 20 - // 距左侧标题的边距
110; // 折叠按钮的宽度 110; // 折叠按钮的宽度
this.filterLength = Math.floor(width / 110) - 1; this.filterLength = Math.floor(width / 110);
console.log("每行最多可容纳" + this.filterLength + "个filter"); // console.log("每行最多可容纳" + this.filterLength + "个filter");
}); });
} }
}, },
...@@ -758,7 +765,7 @@ em { ...@@ -758,7 +765,7 @@ em {
width: 66px; width: 66px;
} }
.table_radius { .table_radius {
border-radius: 10px; border-radius: 8px;
} }
.overlit { .overlit {
overflow: hidden; overflow: hidden;
......
<template> <template>
<div> <div>
<div v-if="type != 'copper'"> <div v-if="type != 'cropper'">
<el-upload <el-upload
action="ssurl" action="ssurl"
:file-list="fileArray" :file-list="fileArray"
......
<template> <template>
<div class="fwgl_container"> <div class="fwgl_container">
<side-nav-bar :nav-list="navList"></side-nav-bar> <side-nav-bar :nav-list="navList" title-path="/fwgl"></side-nav-bar>
<div class="main_container"> <div class="main_container">
<router-view <router-view
:key="'type_' + $route.params && $route.params.type" :key="'type_' + $route.params && $route.params.type"
...@@ -20,8 +20,6 @@ export default { ...@@ -20,8 +20,6 @@ export default {
navList: [], navList: [],
userLevel: 0, userLevel: 0,
}), }),
computed: {},
methods: {},
mounted() { mounted() {
this.navList = [ this.navList = [
// 普通用户 // 普通用户
...@@ -81,11 +79,6 @@ export default { ...@@ -81,11 +79,6 @@ export default {
this.$router.push(this.navList[0].path); this.$router.push(this.navList[0].path);
}, },
/* updated() {
if (this.$route.params && this.$route.params.type === undefined) {
this.$router.push(this.navList[0].path);
}
}, */
}; };
</script> </script>
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
}, },
methods: { methods: {
editItem(item) { editItem(item) {
this.$router.push("/serviceEdit"); this.$router.push("/fwgl/serviceedit/" + item.id);
}, },
soldOutItem(item) { soldOutItem(item) {
console.log(item); console.log(item);
......
This diff is collapsed.
<template> <template>
<div class="index_container"> <div class="index_container">
<div class="decor" v-if="$route.fullPath == '/workplace'"></div> <div class="decor" v-if="$route.fullPath == '/workplace' || $route.fullPath == '/fwzc/fwcs'"></div>
<router-view/> <router-view/>
</div> </div>
</template> </template>
......
...@@ -59,7 +59,7 @@ export default new Router({ ...@@ -59,7 +59,7 @@ export default new Router({
component: () => import("@/pages/serviceDetail"), component: () => import("@/pages/serviceDetail"),
}, },
{ {
path: "/fwgl/serviceedit", path: "/fwgl/serviceedit/:id",
name: "serviceedit", name: "serviceedit",
component: () => import("@/pages/serviceEdit"), component: () => import("@/pages/serviceEdit"),
}, },
......
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