From 7045ca2f6b6bcbc3987e388bf0b25281c250ccf5 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 19 四月 2024 18:09:00 +0800 Subject: [PATCH] srm 新增编辑供应商,启用停用创建账号获取和保存企业/信用等级/供货范围 ,等大概7个接口的联调 --- src/components/makepager/CommonSearch.vue | 171 +++++++++++++++++++++++++++------------------------------ 1 files changed, 81 insertions(+), 90 deletions(-) diff --git a/src/components/makepager/CommonSearch.vue b/src/components/makepager/CommonSearch.vue index 5850cc3..d5fcac3 100644 --- a/src/components/makepager/CommonSearch.vue +++ b/src/components/makepager/CommonSearch.vue @@ -2,29 +2,24 @@ <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"> + <slot name="buttonIcon" /> + <span style="margin-top: 1px; line-height: 15px">{{ addTitle }}</span> + </div> + </el-button> <slot name="leftButton" /> + <div + v-if="showDownload" + 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> @@ -37,16 +32,12 @@ </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,index) in otherOptions" :key="index"> <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> @@ -56,29 +47,20 @@ <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 v-if="showScreen" 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"> @@ -92,11 +74,10 @@ </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> + <i class="el-icon-setting cursor_pointer font_size_30" style="color: gray" @click="inspectionConfigClick"></i> + </div> + <div class="right"> + <slot name="rightButton"></slot> </div> </div> </div> @@ -109,32 +90,32 @@ 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, @@ -142,98 +123,102 @@ { 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: "" }, + showScreen: { + type: Boolean, + default: true + } }, 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 --> @@ -263,6 +248,9 @@ flex: 1; display: flex; justify-content: right; + dd{ + margin-left:0; + } .top_left { width: 10%; border-right: 1px solid #ccc; @@ -274,13 +262,15 @@ justify-content: center; align-items: center; text-align: center; + .font_weight { font-weight: 500; font-size: 18px; - font-family: "DIN Alternate",serif; + font-family: "DIN Alternate", serif; } .top_right_bottom { font-size: 12px; + } } .top_right { @@ -297,10 +287,11 @@ .font_weight { font-weight: 500; font-size: 18px; - font-family: "DIN Alternate",serif; + font-family: "DIN Alternate", serif; } .top_right_bottom { font-size: 12px; + margin-left:0; } } } @@ -341,7 +332,7 @@ ::v-deep { .el-input__inner { height: 30px; - color: #2765e1; + //color: #2765e1; } .el-input__prefix, .el-input__suffix { -- Gitblit v1.8.0