|  |  |  | 
|---|
|  |  |  | <div class="search-list"> | 
|---|
|  |  |  | <div class="search-top"> | 
|---|
|  |  |  | <div class="left"> | 
|---|
|  |  |  | <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn">{{ | 
|---|
|  |  |  | addTitle | 
|---|
|  |  |  | }}</el-button> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | class="download" | 
|---|
|  |  |  | v-if="showDownload" | 
|---|
|  |  |  | @click="downloadClick" | 
|---|
|  |  |  | :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <img | 
|---|
|  |  |  | src="../../../public/images/download.png" | 
|---|
|  |  |  | style="width: 13px" | 
|---|
|  |  |  | alt="下载" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-button v-if="showAdd" type="primary" size="mini" @click="addBtn"> | 
|---|
|  |  |  | <div style="display: flex"> | 
|---|
|  |  |  | <!-- <img | 
|---|
|  |  |  | v-if="ishumanResource" | 
|---|
|  |  |  | src="../../../assets/DingDing/index.png" | 
|---|
|  |  |  | style="width: 15px; height: 15px; margin-right: 5px; background-color: #ffffff; border-radius: 50%" | 
|---|
|  |  |  | alt="" | 
|---|
|  |  |  | /> --> | 
|---|
|  |  |  | <slot name="buttonIcon" /> | 
|---|
|  |  |  | <p style="margin-top: 1px; line-height: 15px">{{ addTitle }}</p> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | <slot name="leftButton" /> | 
|---|
|  |  |  | <div class="download" @click="downloadClick" :style="{ cursor: showDownload ? 'pointer' : 'no-drop' }"> | 
|---|
|  |  |  | <img src="@/assets/img/xiazai.png" style="width: 13px" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-if="amountView" class="amount"> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | v-if="twoTotalAmount" | 
|---|
|  |  |  | class="top_left" | 
|---|
|  |  |  | style="width: 8%; border: 0" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <div v-if="twoTotalAmount" class="top_left" style="width: 8%; border: 0px"> | 
|---|
|  |  |  | <dl> | 
|---|
|  |  |  | <dd class="font_weight">{{ twoObject.value }}</dd> | 
|---|
|  |  |  | <dd class="top_right_bottom">{{ twoObject.label }}</dd> | 
|---|
|  |  |  | 
|---|
|  |  |  | </dl> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="top_right" style="width: 50%; margin-right: 15px"> | 
|---|
|  |  |  | <dl v-for="item in otherOptions" :key="item.label"> | 
|---|
|  |  |  | <dl v-for="item in otherOptions" :key="item.value"> | 
|---|
|  |  |  | <dd class="font_weight"> | 
|---|
|  |  |  | {{ item.value }} | 
|---|
|  |  |  | </dd> | 
|---|
|  |  |  | <dd class="top_right_bottom"> | 
|---|
|  |  |  | <span | 
|---|
|  |  |  | v-if="item.status" | 
|---|
|  |  |  | class="Badge" | 
|---|
|  |  |  | :class="item.status" | 
|---|
|  |  |  | ></span> | 
|---|
|  |  |  | <span v-if="item.status" class="Badge" :class="item.status"></span> | 
|---|
|  |  |  | <span>{{ item.label }}</span> | 
|---|
|  |  |  | </dd> | 
|---|
|  |  |  | </dl> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="search"> | 
|---|
|  |  |  | <template v-if="isSearchForm"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | :placeholder="placeholder" | 
|---|
|  |  |  | v-model.trim="searchInput" | 
|---|
|  |  |  | class="input-with-select" | 
|---|
|  |  |  | style="width: 410px" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | @change="searchClick" | 
|---|
|  |  |  | @clear="clearClick" | 
|---|
|  |  |  | :placeholder="placeholder" | 
|---|
|  |  |  | v-model.trim="searchInput" | 
|---|
|  |  |  | class="input-with-select" | 
|---|
|  |  |  | style="width: 410px" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | @change="searchClick" | 
|---|
|  |  |  | @clear="clearClick" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <i | 
|---|
|  |  |  | slot="suffix" | 
|---|
|  |  |  | class="el-icon-search" | 
|---|
|  |  |  | style="cursor: pointer" | 
|---|
|  |  |  | @click="searchClick" | 
|---|
|  |  |  | ></i> | 
|---|
|  |  |  | <i slot="suffix" class="el-icon-search" style="cursor: pointer" @click="searchClick"></i> | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <div class="search-Btn" v-if="showActionBtn"> | 
|---|
|  |  |  | <div class="search-Btn"> | 
|---|
|  |  |  | <div class="common"> | 
|---|
|  |  |  | <img | 
|---|
|  |  |  | src="../../../public/images/filter.png" | 
|---|
|  |  |  | style="width: 10px" | 
|---|
|  |  |  | alt="筛选" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <img src="@/assets/img/shaixuan.png" style="width: 10px" /> | 
|---|
|  |  |  | <span>筛选</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="common"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div v-if="showSet"> | 
|---|
|  |  |  | <i | 
|---|
|  |  |  | class="el-icon-setting cursor_pointer font_size_30" | 
|---|
|  |  |  | style="color: rgb(128,128,128)" | 
|---|
|  |  |  | @click="inspectionConfigClick" | 
|---|
|  |  |  | ></i> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="right"> | 
|---|
|  |  |  | <slot name="rightButton"></slot> | 
|---|
|  |  |  | <i class="el-icon-setting cursor_pointer font_size_30" style="color: gray" @click="inspectionConfigClick"></i> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | props: { | 
|---|
|  |  |  | showAdd: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | default: true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | showDownload: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: false, | 
|---|
|  |  |  | default: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | showActionBtn: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | default: true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | placeholder: { | 
|---|
|  |  |  | type: String, | 
|---|
|  |  |  | default: "请输入内容", | 
|---|
|  |  |  | default: "请输入内容" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | addTitle: { | 
|---|
|  |  |  | type: String, | 
|---|
|  |  |  | default: "添加", | 
|---|
|  |  |  | default: "添加" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | totalObject: { | 
|---|
|  |  |  | type: Object, | 
|---|
|  |  |  | default: () => { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | value: 0, | 
|---|
|  |  |  | label: "全部物料", | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | label: "全部物料" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | otherOptions: { | 
|---|
|  |  |  | type: Array, | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: 2, | 
|---|
|  |  |  | label: "安全库存", | 
|---|
|  |  |  | status: "success", | 
|---|
|  |  |  | status: "success" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: 12, | 
|---|
|  |  |  | label: "欠料", | 
|---|
|  |  |  | status: "error", | 
|---|
|  |  |  | status: "error" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: 2, | 
|---|
|  |  |  | label: "安全库存", | 
|---|
|  |  |  | status: "success", | 
|---|
|  |  |  | status: "success" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: 12, | 
|---|
|  |  |  | label: "欠料", | 
|---|
|  |  |  | status: "error", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | status: "error" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | searchSel: { | 
|---|
|  |  |  | type: Object, | 
|---|
|  |  |  | default: () => { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | value: "name", | 
|---|
|  |  |  | label: "", | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | label: "" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | twoTotalAmount: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: false, | 
|---|
|  |  |  | default: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | twoObject: { | 
|---|
|  |  |  | type: Object, | 
|---|
|  |  |  | default: () => { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | value: 0, | 
|---|
|  |  |  | label: "车间总量", | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | label: "车间总量" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | amountView: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | default: true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | isSearchForm: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: true, | 
|---|
|  |  |  | default: true | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | showSet: { | 
|---|
|  |  |  | type: Boolean, | 
|---|
|  |  |  | default: false, | 
|---|
|  |  |  | default: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | inputName: { | 
|---|
|  |  |  | type: String, | 
|---|
|  |  |  | default: "", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | default: "" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | watch: { | 
|---|
|  |  |  | inputName(val) { | 
|---|
|  |  |  | this.searchInput = val; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | this.searchInput = val | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | searchInput: "", | 
|---|
|  |  |  | searchSelValue: this.searchSel, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | searchSelValue: this.searchSel | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | searchClick() { | 
|---|
|  |  |  | this.$emit("searchClick", this.searchInput); | 
|---|
|  |  |  | this.$emit("searchClick", this.searchInput) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 清除 | 
|---|
|  |  |  | clearClick() { | 
|---|
|  |  |  | this.$emit("clearClick", 1); | 
|---|
|  |  |  | this.$emit("clearClick", 1) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 添加 | 
|---|
|  |  |  | addBtn() { | 
|---|
|  |  |  | this.$emit("addCommonClick"); | 
|---|
|  |  |  | this.$emit("addCommonClick") | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 下载 | 
|---|
|  |  |  | downloadClick() { | 
|---|
|  |  |  | this.$emit("downloadClick"); | 
|---|
|  |  |  | this.$emit("downloadClick") | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 模具-检查配置 | 
|---|
|  |  |  | inspectionConfigClick() { | 
|---|
|  |  |  | this.$emit("inspectionConfigClick"); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | this.$emit("inspectionConfigClick") | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- Add "scoped" attribute to limit CSS to this component only --> | 
|---|
|  |  |  | 
|---|
|  |  |  | .font_weight { | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | font-size: 18px; | 
|---|
|  |  |  | font-family: "DIN Alternate",serif; | 
|---|
|  |  |  | font-family: "DIN Alternate", serif; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .top_right_bottom { | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | 
|---|
|  |  |  | .font_weight { | 
|---|
|  |  |  | font-weight: 500; | 
|---|
|  |  |  | font-size: 18px; | 
|---|
|  |  |  | font-family: "DIN Alternate",serif; | 
|---|
|  |  |  | font-family: "DIN Alternate", serif; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .top_right_bottom { | 
|---|
|  |  |  | font-size: 12px; | 
|---|