修改导出的禁用状态和增加用户日志导出

This commit is contained in:
龙运模 2024-11-05 11:27:50 +08:00
parent a2ed86263c
commit 5cc28dc32e
18 changed files with 51 additions and 19 deletions

View File

@ -93,6 +93,13 @@ export default {
return await http.post(this.url, params);
},
},
export:{
url: `${config.API_URL}/user.log.export`,
name: "用户日志导出",
post: async function (params) {
return await http.post(this.url,params);
}
},
subscribe:{
list:{
url: `${config.API_URL}/messages.subscribe.list`,

View File

@ -47,7 +47,7 @@ export default {
},
methods:{
getWsResult(res){
if(res.data && (res.data.type == 6 || res.data.type == 7 || res.data.type == 8 || res.data.type == 11 || res.data.type == 19 || res.data.type == 20 || res.data.type == 29 || res.data.type == 30 || res.data.type == 32 || res.data.type == 33)){
if(res.data && (res.data.type == 6 || res.data.type == 7 || res.data.type == 8 || res.data.type == 11 || res.data.type == 19 || res.data.type == 20 || res.data.type == 29 || res.data.type == 30 || res.data.type == 32 || res.data.type == 33 || res.data.type == 34)){
let item = {
type:res.data.type,
type_desc:res.data.type_desc,
@ -83,9 +83,12 @@ export default {
case 32:
this.list[8] = item;
break;
default:
case 33:
this.list[9] = item;
break;
default:
this.list[10] = item;
break;
}
if(res.data && res.data.status == 1100){

View File

@ -16,7 +16,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="19">
<el-button v-auth="'costFlowExport'" :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button v-auth="'costFlowExport'" :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -24,7 +24,7 @@
</div>
<div class="exportBtn">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="20">
<el-button :size="size" v-auth="'costSummaryDownload'" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" v-auth="'costSummaryDownload'" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</div>

View File

@ -55,7 +55,7 @@
</div>
<div class="right-panel">
<scExportList :size="size" @updateShow="exportChangeShow" :exportList="exportList" :show="exportShow" type="14">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExportList>
</div>
</el-header>

View File

@ -8,7 +8,7 @@
<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>
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</div>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -17,7 +17,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" v-auth="'maintenanceOrderExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" v-auth="'maintenanceOrderExport'" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -162,7 +162,6 @@ export default {
if(params.type == 33){
this.exportShow = params.status==0?true:false
}
console.log('我接受的消息:',params.type, params.status,this.exportShow)
},
async exportData() {
if(this.exportShow) return

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="6">
<el-button :size="size" v-auth="'organizationExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" v-auth="'organizationExport'" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -15,7 +15,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="30">
<el-button :size="size" v-auth="'sparePartsInfoExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" v-auth="'sparePartsInfoExport'" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -15,7 +15,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="29">
<el-button :size="size" v-auth="'sparePartsExport'" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" v-auth="'sparePartsExport'" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -14,7 +14,7 @@
</div>
<div class="right-panel">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="11">
<el-button :size="size" icon="sc-icon-Download" @click="exportData">下载</el-button>
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</el-header>

View File

@ -8,6 +8,11 @@
<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 class="exportBtn">
<scExport :size="size" @exportData="exportData" @updateShow="exportChangeShow" :show="exportShow" type="34">
<el-button :size="size" icon="sc-icon-Download" :disabled="exportShow" @click="exportData">下载</el-button>
</scExport>
</div>
</div>
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" row-key="id" stripe :size="size" @row-click="rowClick">
<sc-table-column label="序号" type="index"></sc-table-column>
@ -34,6 +39,7 @@
column: [],
},
infoDrawer: false,
exportShow:false,
searchList:[
{name:'操作日期',type:'date',code:'created_at'},
@ -55,7 +61,12 @@
}
},
async getTypeList(data,params) {
const res = await this.$API.system.log.operation.post(params);
let objData = this.$TOOL.objCopy(params);
objData.creator_id = {
operator:"in",
value:[this.$TOOL.data.get('USER_INFO').id]
};
const res = await this.$API.system.log.operation.post(objData);
if(res.code == 200){
res.data.forEach(item=>{
item.id = item.type;
@ -68,7 +79,19 @@
})
}
},
//
exportChangeShow(params){
if(params.type == 34){
this.exportShow = params.status==0?true:false
}
},
async exportData() {
if(this.exportShow) return
const res = await this.$API.user.export.post(this.params);
if(res.code == 200){
this.$message.success('开始导出');
}
},
upSearch(){
this.$refs.table.upData(this.params);
},