安环管理-安全管理-安全巡检点配置-新增排序

dev-scheduling
ysn 1 month ago
parent 3d4c8ac2a4
commit e8ef721ddd
  1. 31
      src/views/safetyManagement/safetyInspectionPoint/index.vue

@ -16,6 +16,7 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@sort-change="sortChange"
> >
<template #menu-left> <template #menu-left>
<el-button type="primary" @click="handleAdd">新增 </el-button> <el-button type="primary" @click="handleAdd">新增 </el-button>
@ -50,12 +51,11 @@
<script> <script>
import basicImport from '@/components/basic-import/main.vue'; import basicImport from '@/components/basic-import/main.vue';
import { getList, add, remove, update } from '@/api/safetyManagement/safetyInspectionPoint.js'; import { getList, add, remove, update } from '@/api/safetyManagement/safetyInspectionPoint.js';
import addInspectDailog from './addInspectDailog.vue' import addInspectDailog from './addInspectDailog.vue';
export default { export default {
components: { components: {
basicImport, basicImport,
addInspectDailog addInspectDailog,
}, },
data() { data() {
return { return {
@ -206,7 +206,7 @@ export default {
methods: { methods: {
// //
handleImport() { handleImport() {
this.isShowImport = true this.isShowImport = true;
}, },
// //
rowSave(row, done, loading) { rowSave(row, done, loading) {
@ -297,13 +297,27 @@ export default {
}, },
// //
searchReset() { searchReset() {
this.query = {} this.query = {};
this.onLoad(this.page) this.onLoad(this.page);
}, },
selectionClear() { selectionClear() {
this.selectionList = []; this.selectionList = [];
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
}, },
//
sortChange({ prop, order }) {
if (!prop) {
//
this.query.orderByField = undefined;
this.query.isAsc = undefined;
} else {
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
this.query.orderByField = orderByField;
this.query.isAsc = order === 'ascending' ? true : false;
}
// //
this.onLoad(this.page, this.query);
},
// //
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
@ -326,9 +340,8 @@ export default {
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page, params) this.onLoad(this.page, params);
done() done();
}, },
// //
closeDialog() { closeDialog() {

Loading…
Cancel
Save