no message

This commit is contained in:
小陌 2023-06-12 23:07:24 +08:00
parent 21c72f6082
commit c571931375
3 changed files with 35 additions and 6 deletions

View File

@ -1,9 +1,23 @@
<template>
<el-container>
<el-header class="header-tabs">
<el-tabs type="card" v-model="search.status" @tab-change="tabChange">
<el-tab-pane label="所有" name="0"></el-tab-pane>
<el-tab-pane label="开启" name="1"></el-tab-pane>
<el-tab-pane label="下架" name="2"></el-tab-pane>
<el-tab-pane label="短租" name="3"></el-tab-pane>
</el-tabs>
</el-header>
<el-header>
<div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
</div>
<div class="right-panel">
<div class="right-panel-search">
<el-input v-model="search.keyword" placeholder="关键词" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
</div>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" :hideSetting="true" remoteSort remoteFilter stripe>
@ -99,13 +113,26 @@
lives: false,
},
apiObj: api.list,
selection: []
selection: [],
search: {
keyword: "",
status:'0',
}
}
},
mounted() {
},
methods: {
//
tabChange(status){
this.search.status = status;
this.$refs.table.reload(this.search)
},
//
upsearch(){
this.$refs.table.reload(this.search)
},
//
add(){
this.dialog.update = true

View File

@ -107,6 +107,7 @@
},
data() {
return {
token: null,
loading: false,
mode: "add",
titleMap: {
@ -150,7 +151,7 @@
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await api.room.submit(this.form);
var res = await api.room.submit({room:this.form.room, token:this.token});
this.isSaveing = false;
if(res.code == 200){
// this.$emit('success', this.form, this)
@ -175,7 +176,8 @@
setTimeout(async ()=>{
var res = await api.room.get(params)
this.loading = false
this.form.room = res.data;
this.form.room = res.data.data;
this.token = res.data.token;
},400)
},

View File

@ -23,13 +23,13 @@
visible: false,
mode: "add",
titleMap: {
add: '新增',
edit: '编辑'
add: '新增公寓',
edit: '编辑公寓'
},
info:{},
id:0,
token:null,
config:{}
config:{},
}
},
mounted() {