md
This commit is contained in:
parent
8e72ef6a6f
commit
b8cf368cce
@ -63,6 +63,8 @@
|
|||||||
|
|
||||||
storageName="sysDataAuditRecordList_main"
|
storageName="sysDataAuditRecordList_main"
|
||||||
|
|
||||||
|
ref="refTable"
|
||||||
|
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
border
|
border
|
||||||
size="small"
|
size="small"
|
||||||
@ -146,6 +148,7 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 数据修改记录表表格数据
|
// 数据修改记录表表格数据
|
||||||
sysDataAuditRecordList: [],
|
sysDataAuditRecordList: [],
|
||||||
|
selectionList:[],
|
||||||
|
|
||||||
currentId:null,
|
currentId:null,
|
||||||
openForm: false,
|
openForm: false,
|
||||||
@ -155,6 +158,7 @@ export default {
|
|||||||
id:null,
|
id:null,
|
||||||
titleView:"",
|
titleView:"",
|
||||||
openView: false,
|
openView: false,
|
||||||
|
|
||||||
// 更新网点时间范围
|
// 更新网点时间范围
|
||||||
daterangeCreateTime: [],
|
daterangeCreateTime: [],
|
||||||
// 更新网点时间范围
|
// 更新网点时间范围
|
||||||
@ -207,6 +211,7 @@ export default {
|
|||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
this.single = selection.length!==1
|
this.single = selection.length!==1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
|
this.selectionList=selection;
|
||||||
},
|
},
|
||||||
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
@ -254,47 +259,63 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// this.download('system/sysDataAuditRecord/export', {
|
const loadingInstance = this.$loading({
|
||||||
// ...this.queryParams
|
|
||||||
// }, `sysDataAuditRecord_${new Date().getTime()}.xlsx`)
|
|
||||||
const loadingInstance = this.$loading({
|
|
||||||
text: '正在导出...'
|
text: '正在导出...'
|
||||||
})
|
})
|
||||||
var qParam = {...this.queryParams};
|
|
||||||
qParam.pageNum=1;
|
|
||||||
qParam.pageSize=50000;
|
|
||||||
|
|
||||||
listSysDataAuditRecord(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
|
||||||
this.downloadLoading = false
|
if(this.selectionList&&this.selectionList.length>0){
|
||||||
if (response.code === 200) {
|
this.exportData(this.selectionList,loadingInstance);
|
||||||
const curList = response.rows
|
}
|
||||||
import('@/vendor/Export2Excel').then(excel => {
|
else{
|
||||||
const tHeader = ['id','主键值','运单号','表名称','表描述','字段名称','字段描述','旧值','新值','操作类型','转义代码','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',];
|
let qExportParam={...this.queryParams};
|
||||||
const filterVal = ['id','pkValue','billCode','tableName','tableComment','fieldName','fieldComment','oldValue','newValue','operationType','transferCode','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
qExportParam.pageNum=1;
|
||||||
const data = this.formatJson(filterVal, curList, response.rows)
|
qExportParam.pageSize=20000;
|
||||||
excel.export_json_to_excel({
|
|
||||||
header: tHeader,
|
qExportParam=this.addDateRange(qExportParam, this.dateTimeRange,"createTime")
|
||||||
data,
|
|
||||||
filename: '数据修改记录表',
|
listSysDataAuditRecord(qExportParam).then(response => {
|
||||||
autoWidth: true
|
if (response.code === 200) {
|
||||||
})
|
this.exportData(response.rows,loadingInstance);
|
||||||
loadingInstance.close()
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
exportData(selData,loadingInstance){
|
||||||
|
const curList =selData
|
||||||
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const exportParam=this.$refs.refTable.getExportParam();
|
||||||
|
const tHeader = exportParam.header;
|
||||||
|
const filterVal = exportParam.filter;
|
||||||
|
const data = this.formatJson(filterVal, curList, selData)
|
||||||
|
excel.export_json_to_excel({
|
||||||
|
header: tHeader,
|
||||||
|
data,
|
||||||
|
filename: '数据修改记录',
|
||||||
|
autoWidth: true
|
||||||
|
})
|
||||||
|
loadingInstance.close()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
formatJson(filterVal, jsonData, resData) {
|
formatJson(filterVal, jsonData, resData) {
|
||||||
let index = 0
|
let index = 0
|
||||||
return jsonData.map(v => filterVal.map(j => {
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
|
|
||||||
if (j === 'index') {
|
if (j === 'index') {
|
||||||
return ++index
|
return ++index
|
||||||
}
|
}
|
||||||
if (j === 'status') {
|
|
||||||
var statusStr='xxx'
|
|
||||||
if(v[j] == 10){
|
if (j === 'operationType') {
|
||||||
statusStr='xxx'
|
if(v[j] == 1){
|
||||||
|
return '修改';
|
||||||
|
}else{
|
||||||
|
return '删除';
|
||||||
}
|
}
|
||||||
return statusStr;
|
}
|
||||||
|
|
||||||
|
if (j === 'paymentType') {
|
||||||
|
return this.selectDictLabel(this.dict.type.emis_payment_type,v[j]);
|
||||||
}
|
}
|
||||||
return v[j]
|
return v[j]
|
||||||
}))
|
}))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user