Merge branch 'dev-scheduling' of http://42.192.7.176:3000/suojin/jonhon-mes-web into dev-scheduling

dev-scheduling
zhangdi 1 month ago
commit fdc86fe7e7
  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" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@sort-change="sortChange"
:permission="permissionList"
:search.sync="search" :search.sync="search"
> >
<template #menu-left> <template #menu-left>
<el-button type="primary" @click="moldAddFn(null, true)"> 新增 </el-button> <el-button
<el-button type="danger" @click="handleBatchDelete"> </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>
<template #menu-right> <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> </template>
</avue-crud> </avue-crud>
<!-- 导入 --> <!-- 导入 -->
@ -59,6 +71,7 @@ import {
update, update,
getDosingManList, getDosingManList,
} from '@/api/safetyManagement/dosingRecord.js'; } from '@/api/safetyManagement/dosingRecord.js';
import { mapGetters } from 'vuex';
export default { export default {
components: { components: {
basicImport, 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() { mounted() {
this.fetchDosingManList(); this.fetchDosingManList();
}, },
@ -373,6 +395,20 @@ export default {
this.query = {}; this.query = {};
this.onLoad(this.page); 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 = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;

@ -16,6 +16,8 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@sort-change="sortChange"
:permission="permissionList"
> >
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> <template #menu-right>
@ -58,6 +60,7 @@
</template> </template>
<script> <script>
import { getList, remove, update, getdutyManList } from '@/api/safetyManagement/wasteGasRunRec.js'; import { getList, remove, update, getdutyManList } from '@/api/safetyManagement/wasteGasRunRec.js';
import { mapGetters } from 'vuex';
export default { export default {
data() { data() {
return { return {
@ -391,8 +394,18 @@ export default {
currentPage: 1, currentPage: 1,
total: 0, 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() { mounted() {
this.fetchdutyManList(); this.fetchdutyManList();
}, },
@ -513,60 +526,20 @@ export default {
this.query = {}; this.query = {};
this.onLoad(this.page); this.onLoad(this.page);
}, },
// onLoad() { //
// this.loading = true; sortChange({ prop, order }) {
// this.data = [ if (!prop) {
// { //
// alarm: false, this.query.orderByField = undefined;
// code: "28", this.query.isAsc = undefined;
// endTime: "2023-03-23 16:50:50", } else {
// errorPoint: "D", const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
// key: "DPHL", this.query.orderByField = orderByField;
// keyValue: 1, this.query.isAsc = order === 'ascending' ? true : false;
// messText: "pH", }
// startTime: "2023-03-23 16:50:40", //
// torId: 1, this.onLoad(this.page, this.query);
// }, },
// {
// 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);
// },
// //
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;

Loading…
Cancel
Save