修改表格右下角配置
This commit is contained in:
parent
e3b1d2c9c8
commit
277eac69f2
@ -262,12 +262,12 @@
|
|||||||
async columnSettingSave(userColumn){
|
async columnSettingSave(userColumn){
|
||||||
this.$refs.columnSetting.isSave = true
|
this.$refs.columnSetting.isSave = true
|
||||||
try {
|
try {
|
||||||
await config.columnSettingSave(this.tableName, userColumn,this.apiObj)
|
await config.columnSettingSave(this.tableName, userColumn,this.apiObj);
|
||||||
|
this.$message.success('保存成功')
|
||||||
}catch(error){
|
}catch(error){
|
||||||
this.$message.error('保存失败')
|
this.$message.error('保存失败')
|
||||||
this.$refs.columnSetting.isSave = false
|
this.$refs.columnSetting.isSave = false
|
||||||
}
|
}
|
||||||
this.$message.success('保存成功')
|
|
||||||
this.$refs.columnSetting.isSave = false
|
this.$refs.columnSetting.isSave = false
|
||||||
},
|
},
|
||||||
//自定义列重置
|
//自定义列重置
|
||||||
@ -330,8 +330,14 @@
|
|||||||
})
|
})
|
||||||
return sums
|
return sums
|
||||||
},
|
},
|
||||||
configSizeChange(){
|
async configSizeChange() {
|
||||||
this.$refs.scTable.doLayout()
|
try {
|
||||||
|
await config.columnSettingConfigSave(this.tableName, this.config, this.apiObj);
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
} catch (error) {
|
||||||
|
this.$message.error('保存失败')
|
||||||
|
}
|
||||||
|
// this.$refs.scTable.doLayout()
|
||||||
},
|
},
|
||||||
//插入行 unshiftRow
|
//插入行 unshiftRow
|
||||||
unshiftRow(row){
|
unshiftRow(row){
|
||||||
|
|||||||
@ -28,7 +28,7 @@ export default {
|
|||||||
* @tableName scTable组件的props->tableName
|
* @tableName scTable组件的props->tableName
|
||||||
* @column 用户配置好的列
|
* @column 用户配置好的列
|
||||||
*/
|
*/
|
||||||
columnSettingSave: function (tableName, column,params) {
|
columnSettingSave: function (tableName, column ,params) {
|
||||||
column.forEach((item,index)=>{
|
column.forEach((item,index)=>{
|
||||||
item.sort = index+1;
|
item.sort = index+1;
|
||||||
})
|
})
|
||||||
@ -51,19 +51,26 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 获取自定义列
|
* 保存表格列表配置
|
||||||
* @tableName scTable组件的props->tableName
|
* @tableName scTable组件的props->tableName
|
||||||
* @column 组件接受到的props->column
|
* @column 组件接受到的props->column
|
||||||
*/
|
*/
|
||||||
columnSettingGet: function (tableName, column) {
|
columnSettingConfigSave: function (tableName, config, params) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
//这里为了演示使用了session和setTimeout演示,开发时应用数据请求
|
if(!params.url || params.url==''){
|
||||||
const userColumn = tool.session.get(tableName)
|
resolve(false)
|
||||||
if(userColumn){
|
return
|
||||||
resolve(userColumn)
|
|
||||||
}else{
|
|
||||||
resolve(column)
|
|
||||||
}
|
}
|
||||||
|
let data = {
|
||||||
|
table_config:config,
|
||||||
|
}
|
||||||
|
http.post(params.url, data).then(res=>{
|
||||||
|
if(res.code == 200 && res.data.column){
|
||||||
|
resolve(true)
|
||||||
|
}else{
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -95,7 +95,10 @@ export default {
|
|||||||
},
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
params: {
|
params: {
|
||||||
activation_date: '',
|
activation_date: {
|
||||||
|
operator:'in',
|
||||||
|
value:[]
|
||||||
|
},
|
||||||
id:'',
|
id:'',
|
||||||
active_status:'',
|
active_status:'',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<el-image style="height: 80px;width: 80px;border-radius: 2px;" fit="cover" :src="form.logo"></el-image>
|
<el-image style="height: 80px;width: 80px;border-radius: 2px;" fit="cover" :src="form.logo"></el-image>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="证件照" prop="doc_attach">
|
<el-form-item label="证件照" prop="doc_attach">
|
||||||
<el-image v-for="item in form.doc_attach" :key="item" style="height: 80px;width: 80px;border-radius: 2px;" fit="cover" :src="item.doc_url"></el-image>
|
<el-image v-for="item in form.doc_attach" :key="item" style="height: 80px;width: 80px;border-radius: 2px;margin: 0 5px 5px 0" fit="cover" :src="item.doc_url"></el-image>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|||||||
@ -4,11 +4,29 @@
|
|||||||
<div class="searchMain">
|
<div class="searchMain">
|
||||||
<div class="searchItem">
|
<div class="searchItem">
|
||||||
<label class="name">时间</label>
|
<label class="name">时间</label>
|
||||||
<el-date-picker class="input" type="datetimerange" :size="size" v-model="date" :popper-options="{ placement: 'bottom-start' }" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" clearable></el-date-picker>
|
<el-date-picker class="input" type="daterange" :size="size" v-model="params.date" :popper-options="{ placement: 'bottom-start' }" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" clearable></el-date-picker>
|
||||||
|
</div>
|
||||||
|
<div class="searchItem">
|
||||||
|
<label class="name">业务端</label>
|
||||||
|
<el-select class="input" :size="size" v-model="params.id" @visible-change="getCompanyList" placeholder="请选择业务" filterable clearable>
|
||||||
|
<el-option v-for="item in setMap.name" :key="item" :label="item.full_name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="searchItem">
|
||||||
|
<label class="name">操作功能</label>
|
||||||
|
<el-select class="input" :size="size" v-model="params.id" @visible-change="getCompanyList" placeholder="请选择功能" filterable clearable>
|
||||||
|
<el-option v-for="item in setMap.name" :key="item" :label="item.full_name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div class="searchItem">
|
||||||
|
<label class="name">操作日志</label>
|
||||||
|
<el-select class="input" :size="size" v-model="params.id" @visible-change="getCompanyList" placeholder="请选择日志" filterable clearable>
|
||||||
|
<el-option v-for="item in setMap.name" :key="item" :label="item.full_name" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="searchItem searchBtn">
|
<div class="searchItem searchBtn">
|
||||||
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</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">重置</el-button>
|
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe :size="size" highlightCurrentRow @row-click="rowClick">
|
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" stripe :size="size" highlightCurrentRow @row-click="rowClick">
|
||||||
@ -33,6 +51,9 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
size:"small",
|
size:"small",
|
||||||
|
setMap:{
|
||||||
|
name:[]
|
||||||
|
},
|
||||||
|
|
||||||
infoDrawer: false,
|
infoDrawer: false,
|
||||||
date: [],
|
date: [],
|
||||||
@ -40,14 +61,21 @@
|
|||||||
apiObj: this.$API.system.log.list,
|
apiObj: this.$API.system.log.list,
|
||||||
column:[]
|
column:[]
|
||||||
},
|
},
|
||||||
search: {
|
params: {
|
||||||
keyword: ""
|
date:"",
|
||||||
|
id: "",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCompanyList(e){
|
||||||
|
if(!e) return
|
||||||
|
},
|
||||||
upSearch(){
|
upSearch(){
|
||||||
|
this.$refs.table.upData(this.params);
|
||||||
|
},
|
||||||
|
reset(){
|
||||||
|
this.$refs.table.reload();
|
||||||
},
|
},
|
||||||
rowClick(row){
|
rowClick(row){
|
||||||
this.infoDrawer = true
|
this.infoDrawer = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user