| | |
| | | <template v-if="selectArr?.length > 0" slot="prepend"> |
| | | <div style="display: flex"> |
| | | <div v-for="(val, i) in selectArr" :key="i" class="pre-views"> |
| | | <span style="margin-left: 5px">{{ val.title }}</span> |
| | | <span style="margin-left: 5px">{{ val?.title ?? val }}</span> |
| | | <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i> |
| | | </div> |
| | | </div> |
| | |
| | | trigger="click" |
| | | :hide-on-click="false" |
| | | placement="bottom" |
| | | @command="switchStatusKeywords($event, selList)" |
| | | @command="switchKeywords($event, selList)" |
| | | > |
| | | <div class="common yes-cursor"> |
| | | <img src="@/assets/img/shaixuan.png" style="width: 10px" /> |
| | |
| | | <el-dropdown-item |
| | | v-for="(item, key) in screenArray" |
| | | :key="key" |
| | | :command="{ command: item.title, ...item }" |
| | | :command="item.title" |
| | | :class="{ selected: status == item.title }" |
| | | > |
| | | <div class="dropdown-view"> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchTaskMap.forEach((ele) => { |
| | | this.selList.push(ele.title) |
| | | }) |
| | | this.selectArr = this.searchTaskMap |
| | | }, |
| | | methods: { |
| | |
| | | inspectionConfigClick() { |
| | | this.$emit("inspectionConfigClick") |
| | | }, |
| | | switchStatusKeywords(command, item) { |
| | | console.log("index", command) |
| | | switchKeywords(command, item) { |
| | | console.log("index", command, item) |
| | | this.status = command |
| | | const oldValue = item |
| | | console.log(oldValue) |
| | |
| | | } else { |
| | | oldValue.push(command) |
| | | } |
| | | this.$emit("switchKeywords", item) |
| | | }, |
| | | // 删除筛选内容 |
| | | delSelectClick(item) { |
| | |
| | | } |
| | | } |
| | | .selected { |
| | | color: #409eff; |
| | | color: #606266; |
| | | } |
| | | .dropdown-view { |
| | | position: relative; |