src/components/makepager/SearchCommonView.vue
@@ -54,7 +54,7 @@
            <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 }}</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>
@@ -80,7 +80,7 @@
            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" />
@@ -88,7 +88,7 @@
            </div>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                v-for="(item, key) in taskStatusMap"
                v-for="(item, key) in screenArray"
                :key="key"
                :command="item.title"
                :class="{ selected: status == item.title }"
@@ -224,6 +224,14 @@
    showSreen: {
      type: Boolean,
      default: true
    },
    searchTaskMap: {
      type: Array,
      default: () => []
    },
    screenArray: {
      type: Array,
      default: () => []
    }
  },
  watch: {
@@ -243,13 +251,16 @@
      searchInput: "",
      searchSelValue: this.searchSel,
      status: "",
      taskStatusMap: [
        { value: "0", type: "default", title: "完成" },
        { value: "1", type: "default", title: "就緒" }
      ],
      selList: [],
      selectArr: []
    }
  },
  mounted() {
    this.searchTaskMap.forEach((ele) => {
      this.selList.push(ele.title)
    })
    this.selectArr = this.searchTaskMap
    this.searchInput = this.inputName
  },
  methods: {
    // 搜索
@@ -280,8 +291,8 @@
    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)
@@ -294,6 +305,7 @@
      } else {
        oldValue.push(command)
      }
      this.$emit("switchKeywords", item)
    },
    // 删除筛选内容
    delSelectClick(item) {
@@ -302,6 +314,7 @@
        this.selectArr.findIndex((e) => e === item),
        1
      )
      this.$emit("delSelectClick", item)
    }
  }
}
@@ -400,7 +413,7 @@
        }
      }
      .pre-views {
        border: 1px solid #ccc;
        border: 1px solid #c0c0c0;
        font-size: 12px;
        margin-right: 5px;
        border-radius: 3px;
@@ -419,7 +432,7 @@
  }
}
.selected {
  color: #409eff;
  color: #606266;
}
.dropdown-view {
  position: relative;