chore(banner管理页面-->编辑组件): 整理代码
This commit is contained in:
parent
384ccb8c27
commit
e463bde708
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user