chore(banner管理页面-->编辑组件): 整理代码
This commit is contained in:
parent
384ccb8c27
commit
e463bde708
@ -1,3 +1,4 @@
|
||||
<!-- 搜索房间ID组件 -->
|
||||
<template>
|
||||
<div class="search-room-input">
|
||||
<el-tooltip
|
||||
@ -104,12 +105,12 @@ export default {
|
||||
if (val.length > 15) {
|
||||
this.selectType = "LONG_ID";
|
||||
this.content = val;
|
||||
this.clickSearch();
|
||||
return;
|
||||
}
|
||||
if (val.length < 15) {
|
||||
this.selectType = "SHORT_ID";
|
||||
this.content = val;
|
||||
this.clickSearch();
|
||||
return;
|
||||
}
|
||||
},
|
||||
@ -117,25 +118,34 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 关闭对话窗
|
||||
handleClose() {
|
||||
this.$emit("closeSelectDialog");
|
||||
this.visibleSelecteDialog = false;
|
||||
},
|
||||
|
||||
// 选择房间
|
||||
clickSelected(item) {
|
||||
this.visibleSelecteDialog = false;
|
||||
this.$emit("success", item);
|
||||
},
|
||||
|
||||
// 失败提示
|
||||
emitFail() {
|
||||
this.roomProfiles = [];
|
||||
this.roomProfile = {};
|
||||
this.failShow = true;
|
||||
this.$emit("fail");
|
||||
},
|
||||
|
||||
// 失败信息提示
|
||||
failTipsContent(content) {
|
||||
this.emitFail();
|
||||
this.showTips = true;
|
||||
this.tipsContent = content;
|
||||
},
|
||||
|
||||
// 搜索房间
|
||||
clickSearch() {
|
||||
const that = this;
|
||||
that.$emit("load");
|
||||
@ -202,6 +212,8 @@ export default {
|
||||
that.failTipsContent("请求数据错误!");
|
||||
});
|
||||
},
|
||||
|
||||
// 调用搜索接口
|
||||
search(type, id) {
|
||||
if (type === "LONG_ID") {
|
||||
// return getRoomProfileByRoomId(id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user