no message

This commit is contained in:
小陌 2023-07-20 21:56:21 +08:00
parent 5108d419f2
commit e7170d9fec

View File

@ -10,7 +10,7 @@
</el-aside> </el-aside>
<el-container> <el-container>
<el-header class="header-tabs" v-if="tabs.length>0"> <el-header class="header-tabs" v-if="tabs.length>0">
<el-tabs type="card" v-model="search.status" @tab-change="tabChange"> <el-tabs type="card" v-model="search[tabskey]" @tab-change="tabChange">
<el-tab-pane v-for="item in tabs" :key="item.value" :label="item.label" :name="item.value"> </el-tab-pane> <el-tab-pane v-for="item in tabs" :key="item.value" :label="item.label" :name="item.value"> </el-tab-pane>
</el-tabs> </el-tabs>
</el-header> </el-header>
@ -40,8 +40,8 @@
:row-key="key" :row-key="key"
@selection-change="selectionChange" @selection-change="selectionChange"
:remoteSort="true" :remoteSort="true"
:remoteFilter="true" stripe :remoteFilter="true"
> stripe>
<el-table-column v-if="isselection" type="selection" width="50"></el-table-column> <el-table-column v-if="isselection" type="selection" width="50"></el-table-column>
<el-table-column :label="operation.label || '操作'" :width="operation.width || 124" :fixed="operation.fixed || 'right'" :align="operation.align || 'left'" v-if="operation.edit || operation.delete"> <el-table-column :label="operation.label || '操作'" :width="operation.width || 124" :fixed="operation.fixed || 'right'" :align="operation.align || 'left'" v-if="operation.edit || operation.delete">
<template #default="scope"> <template #default="scope">
@ -93,29 +93,32 @@
api: '', api: '',
operation:{}, operation:{},
key:'id', key:'id',
search: { search: {},
status: 0,
key : 'keyword'
},
tabs: [ tabs: [
// {label:'', value:0}, // {label:'', value:0},
], ],
stat:[], stat:[],
chartoption: {}, chartoption: {},
tablename: this.$route.meta.tablename, tablename: this.$route.meta.tablename,
groupFilterText:'' groupFilterText:'',
tabskey:'',
tabsdefaultvalue:''
} }
}, },
mounted() { mounted() {
if (this.name) { if (this.name) {
this.tablename = this.name || this.$route.meta.tablename; this.tablename = this.name || this.$route.meta.tablename;
} }
// //
if(this.tablename) { if(this.tablename) {
this.$api.system.table.get(this.tablename, { cache: this.$route.meta.tablecache || 0 }).then((res) => { this.$api.system.table.get(this.tablename, { cache: this.$route.meta.tablecache || 0 }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
Object.assign(this.$data, res.data); Object.assign(this.$data, res.data);
if (res.data.tabsdefaultvalue && res.data.tabskey) {
this.search[res.data.tabskey] = res.data.tabsdefaultvalue
}
} }
}); });
} }