增加导入
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-container class="mainHeaderNoBorderPadding">
|
||||
<el-header style="padding-left: 10px;">
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" :size="size" icon="el-icon-plus" @click="add">新增用户</el-button>
|
||||
<el-button type="danger" plain :size="size" icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
@@ -20,12 +20,20 @@
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="params.name" :size="size" placeholder="关键字" clearable></el-input>
|
||||
<el-button type="primary" :size="size" icon="el-icon-search" @click="upSearch"></el-button>
|
||||
<scExport :size="size" @exportData="exportData"></scExport>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<div class="searchMain searchMainNoTop" style="padding-left: 10px;">
|
||||
<scSearch ref="scSearch" :searchList="searchList" @fetchSelectData="getSelectData"></scSearch>
|
||||
|
||||
<div class="searchItem searchBtn">
|
||||
<el-button :size="size" :icon="searchShow?'el-icon-ArrowUpBold':'el-icon-ArrowDownBold'" @click="searchShowClick">{{searchShow?'收起':'更多'}}</el-button>
|
||||
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
||||
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" @selection-change="selectionChange" stripe :size="size">
|
||||
<el-table-column type="selection" align="center" width="45"></el-table-column>
|
||||
<sc-table-column label="序号" align="center" type="index"></sc-table-column>
|
||||
@@ -97,9 +105,16 @@
|
||||
column:[]
|
||||
},
|
||||
selection: [],
|
||||
params: {
|
||||
name: null
|
||||
}
|
||||
|
||||
searchShow:false,
|
||||
searchList:[
|
||||
{name:'创建日期',type:'date',code:'activation_date'},
|
||||
{name:'状态',type:'select',code:'active_status', data:[], placeholder:"请选择状态",show:true},
|
||||
{name:'联系方式',type:'text',code:['mobile'],placeholder:"请输入手机号",isOpen:true,show:false},
|
||||
{name:'姓名',type:'text',code:['name'],placeholder:"请输入姓名",isOpen:true,show:false},
|
||||
{name:'关键字',type:'text',code:['login_name','roles','department'],keyword:true,show:true},
|
||||
],
|
||||
params: {},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -111,6 +126,32 @@
|
||||
this.getGroup()
|
||||
},
|
||||
methods: {
|
||||
searchShowClick(){
|
||||
this.searchShow = !this.searchShow;
|
||||
this.searchList.forEach(item=>{
|
||||
if(item.isOpen){
|
||||
item.show = this.searchShow
|
||||
}
|
||||
})
|
||||
},
|
||||
getSelectData(item){
|
||||
let {data,params} = item;
|
||||
this.params = params;
|
||||
if(data.code == "active_status"){
|
||||
this.getStatusList(data,params);
|
||||
}
|
||||
},
|
||||
async getStatusList(data,params) {
|
||||
const res = await this.$API.oss.status.post(params);
|
||||
if(res.code == 200){
|
||||
this.searchList.forEach(item=>{
|
||||
if(item.code == data.code){
|
||||
item.data = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
rePwd() {
|
||||
this.dialog.rePwdD = true
|
||||
this.$nextTick(() => {
|
||||
@@ -237,10 +278,21 @@
|
||||
delete row.$switch_yx;
|
||||
}, 500);
|
||||
},
|
||||
async exportData() {
|
||||
const res = await this.$API.system.user.export.post();
|
||||
if(res.code == 200){
|
||||
this.$message.success('开始导出');
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
upSearch(){
|
||||
this.$refs.table.upData(this.params)
|
||||
},
|
||||
reset(){
|
||||
this.params = {};
|
||||
this.$refs.scSearch.reload();
|
||||
this.$refs.table.reload();
|
||||
},
|
||||
//本地更新数据
|
||||
handleSuccess(data, mode){
|
||||
if(mode=='add'){
|
||||
|
||||
Reference in New Issue
Block a user