From ffb95166c2f65efc41acefc217e558191a41ed8f Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 18 四月 2024 17:32:55 +0800
Subject: [PATCH] 纤度登记表 编辑的时候纤度值和数量赋值的逻辑调整
---
src/components/makepager/CommonSearch.vue | 179 +++++++++++++++++++++++++----------------------------------
1 files changed, 77 insertions(+), 102 deletions(-)
diff --git a/src/components/makepager/CommonSearch.vue b/src/components/makepager/CommonSearch.vue
index 7e83725..3381b56 100644
--- a/src/components/makepager/CommonSearch.vue
+++ b/src/components/makepager/CommonSearch.vue
@@ -2,51 +2,48 @@
<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
+ 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>
</dl>
</div>
- <div class="top_left" style="width: 10%">
+ <div class="top_left" style="width: 20%">
<dl>
<dd class="font_weight">{{ totalObject.value }}</dd>
<dd class="top_right_bottom">{{ totalObject.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, 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 +53,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 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,14 +80,7 @@
</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>
@@ -112,32 +93,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,
@@ -145,98 +126,98 @@
{
value: 2,
label: "瀹夊叏搴撳瓨",
- status: "success",
+ status: "success"
},
{
value: 12,
label: "娆犳枡",
- status: "error",
+ status: "error"
},
{
value: 2,
label: "瀹夊叏搴撳瓨",
- status: "success",
+ status: "warning-radio"
},
{
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 -->
@@ -251,7 +232,7 @@
align-items: center;
.left {
display: flex;
- width: 150px;
+ width: 300px;
.download {
width: 30px;
height: 30px;
@@ -267,7 +248,7 @@
display: flex;
justify-content: right;
.top_left {
- width: 10%;
+ width: 20%;
border-right: 1px solid #ccc;
display: flex;
padding-right: 2%;
@@ -280,7 +261,7 @@
.font_weight {
font-weight: 500;
font-size: 18px;
- font-family: "DIN Alternate",serif;
+ font-family: "DIN Alternate", serif;
}
.top_right_bottom {
font-size: 12px;
@@ -300,7 +281,7 @@
.font_weight {
font-weight: 500;
font-size: 18px;
- font-family: "DIN Alternate",serif;
+ font-family: "DIN Alternate", serif;
}
.top_right_bottom {
font-size: 12px;
@@ -332,12 +313,6 @@
}
}
}
- }
- .success {
- background: #06c062;
- }
- .yellow {
- background: #e6a23c;
}
}
--
Gitblit v1.8.0