no message
This commit is contained in:
parent
21c72f6082
commit
c571931375
@ -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
|
||||
|
@ -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)
|
||||
|
||||
},
|
||||
|
@ -23,13 +23,13 @@
|
||||
visible: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: '新增',
|
||||
edit: '编辑'
|
||||
add: '新增公寓',
|
||||
edit: '编辑公寓'
|
||||
},
|
||||
info:{},
|
||||
id:0,
|
||||
token:null,
|
||||
config:{}
|
||||
config:{},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
Loading…
Reference in New Issue
Block a user