安环管理-环保管理-废气处理-废气加药记录-新增排序/权限

安环管理-环保管理-废气处理-废气运行记录-新增排序/权限
dev-scheduling
ysn 1 month ago
parent 6c24f7ac5a
commit d5a5fc6f2c
  1. 42
      src/views/safetyManagement/wasteGasSet/components/dosingRecord.vue
  2. 81
      src/views/safetyManagement/wasteGasSet/components/wasteGasRunRec.vue

@ -16,14 +16,26 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
@sort-change="sortChange"
:permission="permissionList"
:search.sync="search"
>
<template #menu-left>
<el-button type="primary" @click="moldAddFn(null, true)"> 新增 </el-button>
<el-button type="danger" @click="handleBatchDelete"> </el-button>
<el-button
type="primary"
v-if="permission.processingRecord1_add"
@click="moldAddFn(null, true)"
>
新增
</el-button>
<el-button type="danger" v-if="permission.processingRecord1_del" @click="handleBatchDelete">
</el-button>
</template>
<template #menu-right>
<el-button type="primary" @click="handleImport">导入 </el-button>
<el-button type="primary" v-if="permission.processingRecord1_import" @click="handleImport">
导入
</el-button>
</template>
</avue-crud>
<!-- 导入 -->
@ -59,6 +71,7 @@ import {
update,
getDosingManList,
} from '@/api/safetyManagement/dosingRecord.js';
import { mapGetters } from 'vuex';
export default {
components: {
basicImport,
@ -249,6 +262,15 @@ export default {
},
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
editBtn: this.validData(this.permission.processingRecord1_edit, false),
delBtn: this.validData(this.permission.processingRecord1_del, false),
};
},
},
mounted() {
this.fetchDosingManList();
},
@ -373,6 +395,20 @@ export default {
this.query = {};
this.onLoad(this.page);
},
//
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 = {}) {
this.loading = true;

@ -16,6 +16,8 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
@sort-change="sortChange"
:permission="permissionList"
>
<template #menu-left> </template>
<template #menu-right>
@ -58,6 +60,7 @@
</template>
<script>
import { getList, remove, update, getdutyManList } from '@/api/safetyManagement/wasteGasRunRec.js';
import { mapGetters } from 'vuex';
export default {
data() {
return {
@ -391,8 +394,18 @@ export default {
currentPage: 1,
total: 0,
},
query:{}
};
},
computed: {
...mapGetters(['permission']),
permissionList() {
return {
editBtn: this.validData(this.permission.processingRecord2_edit, false),
delBtn: this.validData(this.permission.processingRecord2_del, false),
};
},
},
mounted() {
this.fetchdutyManList();
},
@ -513,60 +526,20 @@ export default {
this.query = {};
this.onLoad(this.page);
},
// onLoad() {
// this.loading = true;
// this.data = [
// {
// alarm: false,
// code: "28",
// endTime: "2023-03-23 16:50:50",
// errorPoint: "D",
// key: "DPHL",
// keyValue: 1,
// messText: "pH",
// startTime: "2023-03-23 16:50:40",
// torId: 1,
// },
// {
// alarm: false,
// code: "29",
// endTime: "2023-03-23 16:50:50",
// errorPoint: "E",
// key: "EPHL",
// keyValue: 2,
// messText: "pH",
// startTime: "2023-03-23 16:50:40",
// torId: 2,
// },
// {
// alarm: false,
// code: "25",
// endTime: "2023-03-23 16:50:45",
// errorPoint: "A",
// key: "APHL",
// keyValue: 3,
// messText: "pH",
// startTime: "2023-03-23 16:50:41",
// torId: 3,
// },
// {
// alarm: false,
// code: "48",
// endTime: "2023-03-24 08:54:11",
// errorPoint: "西h",
// key: "hhPHL",
// keyValue: 4,
// messText: "pH",
// startTime: "2023-03-24 08:54:01",
// torId: 4,
// },
// ];
// this.page.total = this.data.length;
// this.loading = false;
// setTimeout(() => {
// this.selectionClear();
// }, 500);
// },
//
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 = {}) {
this.loading = true;

Loading…
Cancel
Save