fix:分页问题修复

dev
zhushengzhe 2023-09-06 15:50:49 +08:00
parent a2ccbb14d0
commit 40c79296aa
15 changed files with 67 additions and 26 deletions

View File

@ -8,7 +8,7 @@ export default class EmergencyCardService extends BaseService<any>{
// 查询列表 // 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/handle/getList'; const url = this.prefix.prevention+'/card/handle/getList';
return this.post(url,params) return this.get(url,params,true)
} }
// 批量删除 // 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -43,4 +43,10 @@ export default class ProgrammeService extends BaseService<any>{
const url = this.prefix.file+'/getSysFiles'; const url = this.prefix.file+'/getSysFiles';
return this.get(url,params,false) return this.get(url,params,false)
} }
//获取适用年度
public getSuitListData(params:any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/process/plan/suitList';
return this.get(url,params)
}
} }

View File

@ -8,7 +8,7 @@ export default class RewardsRecordService extends BaseService<any>{
// 查询列表 // 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/incentive/record/getList'; const url = this.prefix.prevention+'/incentive/record/getList';
return this.post(url,params) return this.get(url,params,true)
} }
// 批量删除 // 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -8,7 +8,7 @@ export default class RiskCardService extends BaseService<any>{
// 查询列表 // 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/notify/getList'; const url = this.prefix.prevention+'/card/notify/getList';
return this.post(url,params) return this.get(url,params,true)
} }
// 批量删除 // 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -8,7 +8,7 @@ export default class SafeCardService extends BaseService<any>{
// 查询列表 // 查询列表
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/card/promise/getList'; const url = this.prefix.prevention+'/card/promise/getList';
return this.post(url,params) return this.get(url,params,true)
} }
// 批量删除 // 批量删除
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{

View File

@ -7,7 +7,7 @@ export default class WorkService extends BaseService<any>{
} }
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/inventory/getList'; const url = this.prefix.prevention+'/job/inventory/getList';
return this.post(url,params,{},true) return this.get(url,params,true)
} }
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/inventory'; const url = this.prefix.prevention+'/job/inventory';

View File

@ -282,8 +282,16 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
public buildTable(){ public buildTable(){
this.tableColumn = []; this.tableColumn = [];
this.tableColumn.push({name:'检查表名称',key:"name"}); this.tableColumn.push({name:'检查表名称',key:"name"});
this.tableColumn.push({name:'区域名称',key:"areas"}); this.tableColumn.push({name:'区域名称',key:"areas", render: (data) => {
this.tableColumn.push({name:'单元名称',key:"units"}); return data.areaIds.split(',').map(item => {
return (this.areaList.find((e: any) => e.value === +item) as any)?.name ?? ""
}).join(",")
}});
this.tableColumn.push({name:'单元名称',key:"units", render: (data) => {
return data.unitIds.split(',').map(item => {
return (this.unitList.find((e: any) => e.value === +item) as any)?.name ?? ""
}).join(",")
}});
this.tableColumn.push({name:'对象名称',key:"targets"}); this.tableColumn.push({name:'对象名称',key:"targets"});
this.tableColumn.push({name:'适用部门',key:"depts"}); this.tableColumn.push({name:'适用部门',key:"depts"});
this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{ this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{
@ -293,6 +301,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
} }
}),filterMethod:(data,row)=>{ }),filterMethod:(data,row)=>{
return row.types.indexOf(data)>=0; return row.types.indexOf(data)>=0;
}, render: (data) => {
return data.types.split(',').map(item => {
return this.$store.getters.prevention_dangrous_type_map[item]
}).join(",")
}}); }});
this.tableColumn.push({name:'编制人',key:"createName"}); this.tableColumn.push({name:'编制人',key:"createName"});
this.tableColumn.push({name:'编制时间',key:"createTime"}); this.tableColumn.push({name:'编制时间',key:"createTime"});
@ -499,7 +511,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功"); this.$message.success(this.currentId===-1?"新增成功!":"编辑成功");
this.getTableData(); this.getTableData();
this.showUpdate = !!goOn; this.showUpdate = !!goOn;
this.updateParams = {areas:[],depts:[],units:[],types:[],targets:[],number:null} as any; this.updateParams = {areas:[],depts:[],units:[],types:[],targets:[],number:null,tableItems:[]} as any;
if(!!goOn){
this.getNumber();
}
}).catch(()=>{ }).catch(()=>{
this.updateParams.depts = this.updateParams.depts.map(item=>item.id) this.updateParams.depts = this.updateParams.depts.map(item=>item.id)

View File

@ -2,7 +2,7 @@
<div class="common-content-box dis-flex flex-col flex-1"> <div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box"> <div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions" <FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="callback($event)" btn-position="end"></FormComponent> :full-btn="false" @change="callback" btn-position="end"></FormComponent>
</div> </div>
<div class="table-box flex-1"> <div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)" <TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"

View File

@ -101,8 +101,10 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
datas: this.$store.state.userList datas: this.$store.state.userList
}, { }, {
name: "岗位", name: "岗位",
type: "select",
key: "postName", key: "postName",
type: "text", datas: this.$store.state.postList,
width: "270px",
}]; }];
public subActions = [{ public subActions = [{

View File

@ -159,7 +159,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public buildUpdateForm() { public buildUpdateForm() {
this.updateOptions = [{ this.updateOptions = [{
name: "区域名称", name: "选择区域",
key: "areaId", key: "areaId",
format: "areaName", format: "areaName",
type: "select", type: "select",
@ -169,7 +169,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
datas: this.areaList, datas: this.areaList,
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
}, { }, {
name: "单元名称", name: "选择单元",
key: "unitId", key: "unitId",
format: "unitName", format: "unitName",
type: "select", type: "select",

View File

@ -131,7 +131,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
name: "单元名称", name: "单元名称",
key: "unitName", key: "unitName",
type: "text", type: "text",
},]; },{
name: "作业活动",
key: "jobInventoryName",
type: "text",
}];
public showUpdate = false; public showUpdate = false;
@ -165,7 +169,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
console.log(this.updateParams.id && this.updateParams.status !== 1,); console.log(this.updateParams.id && this.updateParams.status !== 1,);
this.updateOptions = [{ this.updateOptions = [{
name: "区域名称", name: "选择区域",
key: "areaId", key: "areaId",
format: "areaName", format: "areaName",
type: "select", type: "select",
@ -175,7 +179,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
datas: this.areaList, datas: this.areaList,
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
}, { }, {
name: "单元名称", name: "选择单元",
key: "unitId", key: "unitId",
format: "unitName", format: "unitName",
type: "select", type: "select",

View File

@ -99,9 +99,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
public formOptions: FormOption<BtnOption>[] = [{ public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称", name: "区域名称",
key: "areaId", key: "areaName",
type: "select", type: "text",
datas: this.areaList
}, { }, {
name: "承诺人", name: "承诺人",
key: "promiserId", key: "promiserId",

View File

@ -105,7 +105,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
expandLevel: Infinity, expandLevel: Infinity,
width:"280px" width:"280px"
}, { }, {
name: "实施日期", name: "发布时间",
key: "publishTime", key: "publishTime",
type: "date", type: "date",
format: "yyyy-MM-dd" format: "yyyy-MM-dd"

View File

@ -57,7 +57,10 @@ export default class Programme extends BaseRecordComponent<any> {
public fileList = [] as any; public fileList = [] as any;
public suitList = [] as any;
public showFile = false; public showFile = false;
public currentUrl = null; public currentUrl = null;
public subShowUpdate = false; public subShowUpdate = false;
@ -96,7 +99,7 @@ export default class Programme extends BaseRecordComponent<any> {
}]; }];
public formOptions: FormOption<BtnOption>[] = [{ public formOptions: FormOption<BtnOption>[] = [{
name: "制度名称", name: "方案名称",
key: "name", key: "name",
type: "text", type: "text",
}, { }, {
@ -107,10 +110,10 @@ export default class Programme extends BaseRecordComponent<any> {
expandLevel: Infinity, expandLevel: Infinity,
width: "280px" width: "280px"
}, { }, {
name: "实施日期", name: "适用年度",
key: "publishTime", key: "suitYear",
type: "date", type: "select",
format: "yyyy-MM-dd" datas: this.suitList,
}]; }];
public subActions = [{ public subActions = [{
@ -259,9 +262,20 @@ export default class Programme extends BaseRecordComponent<any> {
created() { created() {
// this.getSuitListData();
} }
//
public getSuitListData() {
this.tableService.getSuitListData({}).then((res: any) => {
res.data.forEach((item) => {
let itemList = {} as any;
itemList.name = item;
itemList.value = item === '永久'?'1': item;
this.suitList.push(itemList)
})
})
}
public buildTable() { public buildTable() {
this.tableColumn.push({ name: '方案名称', key: "name", width: "200px" }); this.tableColumn.push({ name: '方案名称', key: "name", width: "200px" });

View File

@ -114,8 +114,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
datas: this.typeList datas: this.typeList
}, { }, {
name: "培训时间", name: "培训时间",
key: "analName", key: "startTime",
type: "date", type: "date",
format: "yyyy-MM-dd",
}]; }];
public subActions = [{ public subActions = [{