Commit 99e32f8e authored by 徐一鸣's avatar 徐一鸣

消息管理服务筛选fixed

parent 275d8f3d
......@@ -2,8 +2,9 @@
<div class="select_service">
<screen-type
class="service_fliter"
:data="filterList"
:top_data="serviceTypes"
:data="filterList"
:openflag="true"
@topselect="changeType"
@getselect="getFilters"
></screen-type>
......
......@@ -16,7 +16,7 @@
</el-input>
</div>
<div class="type_select" v-show="openflag">
<div class="line_data" style="overflow:hidden;">
<div class="line_data" style="overflow:hidden;" v-if="top_data">
<div class="select_name">{{ top_data.name }}</div>
<div
ref="select_arr_box_top"
......@@ -107,12 +107,15 @@ export default {
type: Array,
default: () => [],
},
openflag: {
type: Boolean,
default: false,
},
},
components: {},
data() {
return {
input2: "",
openflag: false,
selected_arr: [],
show_selected: [],
show_open: [],
......@@ -203,12 +206,23 @@ export default {
});
},
set_select(index, id) {
if (this.selected_arr[index].indexOf(id) == -1) {
this.selected_arr[index].push(id);
if (id === "") {
this.$set(this.selected_arr, index, [""]);
} else {
let selectIds = this.selected_arr[index];
selectIds = selectIds.filter((id) => id !== "");
if (selectIds.indexOf(id) == -1) {
selectIds.push(id);
} else {
this.selected_arr[index].splice(
this.selected_arr[index].indexOf(id),
1
selectIds.splice(selectIds.indexOf(id), 1);
}
this.$set(
this.selected_arr,
index,
selectIds.length > 0 ? selectIds : [""]
);
}
this.post_value();
......
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