forked from xxhjsb/hbt-prevention-ui
feat:优化分页,修复安全检查表bug
parent
84cc2af114
commit
cf812d84e5
|
@ -30,4 +30,9 @@ export default class DeviceService extends BaseService<any>{
|
|||
const url = this.prefix.prevention +'/device/inventory/delete';
|
||||
return this.deleteBatch(url,params,{},true)
|
||||
}
|
||||
|
||||
public selectByPage2(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/device/inventory/getList';
|
||||
return this.post(url,params)
|
||||
}
|
||||
}
|
|
@ -372,7 +372,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
public doMutilAdd(){
|
||||
this.selectData.forEach((item:any)=>{
|
||||
if(!this.updateParams.tableItems.find(itm=>itm.id===item.id)){
|
||||
this.updateParams.tableItems.push(item)
|
||||
const data = JSON.parse(JSON.stringify(item))
|
||||
delete data.id;
|
||||
this.updateParams.tableItems.push(data)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</TableComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -405,7 +405,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
// 分页数据
|
||||
public getTableData() {
|
||||
this.tableService.selectByPage(this.params).then(res => {
|
||||
this.tableService.selectByPage2(this.params).then(res => {
|
||||
this.tableData = res.data as any;
|
||||
})
|
||||
}
|
||||
|
|
|
@ -324,7 +324,6 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
public buildTable() {
|
||||
console.log(template);
|
||||
|
||||
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
|
||||
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
|
||||
|
@ -550,7 +549,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public toggleAll() {
|
||||
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
this.tableData.datas.forEach((item, index) => {
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
})
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public toggleAll() {
|
||||
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
this.tableData.datas.forEach((item, index) => {
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
})
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
|||
// 分页数据
|
||||
public getTableData() {
|
||||
this.tableService.selectByPage2(this.params).then(res => {
|
||||
this.tableData.datas = res.data as any;
|
||||
this.tableData = res.data as any;
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue