From c1d2051abc8ca88cd07f0d7c56c0dbf8165d5c33 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 18 九月 2025 17:02:22 +0800 Subject: [PATCH] 2025.9.18 数据产品(待完成) --- src/views/fysp/config/components/CompInfoSearch.vue | 37 ++++++++++++++++++++++++++++--------- 1 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/views/fysp/config/device/CompInfoSearch.vue b/src/views/fysp/config/components/CompInfoSearch.vue similarity index 80% rename from src/views/fysp/config/device/CompInfoSearch.vue rename to src/views/fysp/config/components/CompInfoSearch.vue index bee891b..fc88f63 100644 --- a/src/views/fysp/config/device/CompInfoSearch.vue +++ b/src/views/fysp/config/components/CompInfoSearch.vue @@ -1,12 +1,12 @@ <template> <!-- <div v-if="modelValue"> --> - <el-divider content-position="left">閫夋嫨{{ label }}</el-divider> - <div class="select-box"> - <div> - <el-text size="small" type="info">褰撳墠閫夋嫨</el-text> - </div> - <slot name="selected" :row="modelValue"></slot> + <el-divider content-position="left">閫夋嫨{{ label }}</el-divider> + <div class="select-box"> + <div> + <el-text size="small" type="info">褰撳墠閫夋嫨</el-text> </div> + <slot name="selected" :row="modelValue"></slot> + </div> <!-- </div> --> <el-divider content-position="left">{{ label }}妫�绱�</el-divider> <FYSearchBar @search="search" :loading="loading"> @@ -15,7 +15,7 @@ label="" :placeholder="placeholder" v-model:value="searchText" - width="200px" + :width="searchTextWidth" ></FYOptionText> </template> </FYSearchBar> @@ -27,6 +27,7 @@ </div> </el-space> </el-scrollbar> + <el-empty v-else description="鏃犺褰�" /> </div> <el-pagination v-if="pageShow && dataList.length > 0" @@ -64,6 +65,10 @@ type: String, default: '杈撳叆鍏抽敭瀛楁绱�' }, + searchTextWidth: { + type: String, + default: '200px' + }, // 鏄惁鏄剧ず鍒嗛〉 pageShow: { type: Boolean, @@ -75,7 +80,9 @@ default: () => { return [10, 20, 50, 100]; } - } + }, + // 榛樿鎼滅储鏂囨湰 + defaultText: String }, emits: ['search', 'update:modelValue'], data() { @@ -86,7 +93,19 @@ loading: false }; }, - watch: {}, + watch: { + defaultText: { + handler(newVal) { + if (newVal) { + this.searchText = newVal; + setTimeout(() => { + this.search(); + }, 500); + } + }, + immediate: true + } + }, methods: { search() { this.loading = true; -- Gitblit v1.9.3