chore(banner管理页面-->编辑组件): 整理代码

This commit is contained in:
hzj 2026-02-02 14:29:11 +08:00
parent 384ccb8c27
commit e463bde708

View File

@ -1,3 +1,4 @@
<!-- 搜索房间ID组件 -->
<template> <template>
<div class="search-room-input"> <div class="search-room-input">
<el-tooltip <el-tooltip
@ -104,12 +105,12 @@ export default {
if (val.length > 15) { if (val.length > 15) {
this.selectType = "LONG_ID"; this.selectType = "LONG_ID";
this.content = val; this.content = val;
this.clickSearch();
return; return;
} }
if (val.length < 15) { if (val.length < 15) {
this.selectType = "SHORT_ID"; this.selectType = "SHORT_ID";
this.content = val; this.content = val;
this.clickSearch();
return; return;
} }
}, },
@ -117,25 +118,34 @@ export default {
} }
}, },
methods: { methods: {
//
handleClose() { handleClose() {
this.$emit("closeSelectDialog"); this.$emit("closeSelectDialog");
this.visibleSelecteDialog = false; this.visibleSelecteDialog = false;
}, },
//
clickSelected(item) { clickSelected(item) {
this.visibleSelecteDialog = false; this.visibleSelecteDialog = false;
this.$emit("success", item); this.$emit("success", item);
}, },
//
emitFail() { emitFail() {
this.roomProfiles = []; this.roomProfiles = [];
this.roomProfile = {}; this.roomProfile = {};
this.failShow = true; this.failShow = true;
this.$emit("fail"); this.$emit("fail");
}, },
//
failTipsContent(content) { failTipsContent(content) {
this.emitFail(); this.emitFail();
this.showTips = true; this.showTips = true;
this.tipsContent = content; this.tipsContent = content;
}, },
//
clickSearch() { clickSearch() {
const that = this; const that = this;
that.$emit("load"); that.$emit("load");
@ -202,6 +212,8 @@ export default {
that.failTipsContent("请求数据错误!"); that.failTipsContent("请求数据错误!");
}); });
}, },
//
search(type, id) { search(type, id) {
if (type === "LONG_ID") { if (type === "LONG_ID") {
// return getRoomProfileByRoomId(id) // return getRoomProfileByRoomId(id)