diff --git a/src/components/table-um.vue b/src/components/table-um.vue
index 6233b70d6db5360b1ed41a5c565125203c389eb2..4d885eeddefd33b63eee7c37a6e3850e55bbbd86 100644
--- a/src/components/table-um.vue
+++ b/src/components/table-um.vue
@@ -40,7 +40,7 @@
@@ -159,7 +178,9 @@
trigger="hover"
:content="scope.row[item.prop]"
>
- {{scope.row[item.prop]}}
+
+ {{ scope.row[item.prop] }}
+
{{ scope.row[item.prop] }}
@@ -342,8 +363,8 @@ export default {
},
showHeader: {
type: Boolean,
- default: true
- }
+ default: true,
+ },
},
data() {
return {
@@ -374,7 +395,9 @@ export default {
search: "",
times: null,
showFliterList: false,
- filterData: null,
+ filterData: null, // 筛选条件
+ filterToggle: null, // 控制筛选条件的展开和收起
+ filterLength: 0, // 每行最多可容纳多少个过滤条件
};
},
mounted() {
@@ -540,16 +563,24 @@ export default {
this.$refs.filterContainer.getBoundingClientRect().width -
20 * 2 - // 两侧padding
100 - // 左侧标题
- 20; // 距左侧标题的边距
- console.log("每行最多可容纳" + Math.floor(width / 110) + "个filter");
+ 20 - // 距左侧标题的边距
+ 110; // 折叠按钮的宽度
+
+ this.filterLength = Math.floor(width / 110) - 1;
+ console.log("每行最多可容纳" + this.filterLength + "个filter");
});
}
},
+ filterToggleAction(prop) {
+ this.$set(this.filterToggle, prop, !this.filterToggle[prop]);
+ },
initFilterData() {
if (this.filterList && this.filterList.length) {
this.filterData = {};
+ this.filterToggle = {};
this.filterList.forEach((item) => {
this.$set(this.filterData, item.prop, []);
+ this.$set(this.filterToggle, item.prop, false);
});
}
},
@@ -759,13 +790,16 @@ em {
}
.ces_filter_data {
width: calc(100% - 120px);
+ padding-right: 110px;
+ box-sizing: border-box;
margin-left: 20px;
flex-grow: 1;
- flex-wrap: wrap;
display: inline-flex;
+ flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
padding-bottom: 11px;
+ position: relative;
}
.ces_filter_container > li:not(:last-child) > .ces_filter_data {
border-bottom: 1px solid #e9ecf3;
@@ -774,6 +808,16 @@ em {
flex-shrink: 0;
padding-right: 20px;
}
+.ces_filter_data > .toggle_bar {
+ height: 30px;
+ position: absolute;
+ top: 0;
+ right: 0;
+ font-size: 14px;
+ line-height: 30px;
+ color: #0f2683;
+ cursor: pointer;
+}
.ces_filter_data > li > a {
display: block;
height: 30px;
diff --git a/src/pages/fwglList.vue b/src/pages/fwglList.vue
index e36f27bc21e9f89377fb280614d36b998fb50486..b608f68380bfbcec9464e94cb274cb7581b482c9 100644
--- a/src/pages/fwglList.vue
+++ b/src/pages/fwglList.vue
@@ -15,7 +15,7 @@
:autoAdd="false"
:isDialog="true"
:confirmOptions="confirmOptions"
- :detailsUrl="detailsUrl"
+ detailsUrl="/servicedetail/"
@primary-edit="editItem"
@sold-out="soldOutItem"
:emptyText="emptyText"
@@ -82,7 +82,7 @@ export default {
},
methods: {
editItem(item) {
- console.log(item);
+ this.$router.push("/serviceEdit");
},
soldOutItem(item) {
console.log(item);