|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud"
|
|
|
|
|
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
|
|
|
|
|
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
|
|
|
|
|
<template #menu-left>
|
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete">删 除
|
|
|
|
|
</el-button> -->
|
|
|
|
|
<el-button type="primary" @click="moldAddFn(null, true)">新增</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
<template #menu-right>
|
|
|
|
|
<el-button type="success" icon="el-icon-upload" @click="handleImport">导入 </el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</avue-crud>
|
|
|
|
|
<!-- 新增弹窗 -->
|
|
|
|
|
<addEditDialogDosingRecord ref="addEditDialogDosingRecord"
|
|
|
|
|
:moldAddMore="moldAddMore" @submitData="onLoad()">
|
|
|
|
|
</addEditDialogDosingRecord>
|
|
|
|
|
<!-- 导入 -->
|
|
|
|
|
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport"
|
|
|
|
|
templateUrl="/blade-safety/wasteWaterDosingRecord/download-excel-template" templateName="废水加药记录模板.xlsx"
|
|
|
|
|
importUrl="/blade-safety/wasteWaterDosingRecord/import-excel" @closeDialog="closeDialog"></basic-import>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import basicImport from '@/components/basic-import/main.vue';
|
|
|
|
|
import addEditDialogDosingRecord from './addEditDialogDosingRecord.vue';
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
basicImport,
|
|
|
|
|
addEditDialogDosingRecord
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
moldAddMore: false,
|
|
|
|
|
isShowImport: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
selectionList: [],
|
|
|
|
|
option: {
|
|
|
|
|
addBtn: false,
|
|
|
|
|
height: 'auto',
|
|
|
|
|
calcHeight: 32,
|
|
|
|
|
tip: false,
|
|
|
|
|
size: 'medium',
|
|
|
|
|
simplePage: true,
|
|
|
|
|
searchShow: true,
|
|
|
|
|
searchMenuSpan: 6,
|
|
|
|
|
searchIcon: true,
|
|
|
|
|
searchIndex: 3,
|
|
|
|
|
tree: false,
|
|
|
|
|
border: true,
|
|
|
|
|
index: true,
|
|
|
|
|
selection: true,
|
|
|
|
|
viewBtn: false,
|
|
|
|
|
delBtn: false,
|
|
|
|
|
editBtnText: '修改',
|
|
|
|
|
addBtnIcon: ' ',
|
|
|
|
|
viewBtnIcon: ' ',
|
|
|
|
|
delBtnIcon: ' ',
|
|
|
|
|
editBtnIcon: ' ',
|
|
|
|
|
viewBtnText: '详情',
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
menuWidth: 120,
|
|
|
|
|
dialogWidth: 1040,
|
|
|
|
|
dialogClickModal: false,
|
|
|
|
|
searchEnter: true,
|
|
|
|
|
excelBtn: false,
|
|
|
|
|
filterBtn: true,
|
|
|
|
|
searchShowBtn: false,
|
|
|
|
|
columnSort: true,
|
|
|
|
|
excelBtn: true,
|
|
|
|
|
columnSort: true,
|
|
|
|
|
index: false,
|
|
|
|
|
showOverflowTooltip: true,
|
|
|
|
|
searchLabelPosition: 'left',
|
|
|
|
|
searchLabelPosition: 'left',
|
|
|
|
|
searchGutter: 24,
|
|
|
|
|
searchSpan: 6,
|
|
|
|
|
menuAlign: 'left',
|
|
|
|
|
gridBtn: false,
|
|
|
|
|
searchMenuPosition: 'right',
|
|
|
|
|
align: 'center',
|
|
|
|
|
column: [
|
|
|
|
|
{
|
|
|
|
|
label: '设施',
|
|
|
|
|
prop: 'device',
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
search: true,
|
|
|
|
|
searchLabelWidth: 140,
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入设施',
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '药品',
|
|
|
|
|
prop: 'drug',
|
|
|
|
|
search: true,
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入名称',
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '剂量(kg)',
|
|
|
|
|
prop: 'dose',
|
|
|
|
|
search: true,
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
searchLabelWidth: 140,
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入药品名称',
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '加药时间',
|
|
|
|
|
prop: 'dosingTime',
|
|
|
|
|
search: true,
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
type: 'datetime',
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入报警阙值',
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '加药人',
|
|
|
|
|
prop: 'dosingMan.userId',
|
|
|
|
|
bind: 'dosingMan.userName',
|
|
|
|
|
search: true,
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
type: "select",
|
|
|
|
|
dicData: [
|
|
|
|
|
{ label: '崔殿龙', value: '541' },
|
|
|
|
|
],
|
|
|
|
|
rules: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入PH报警点位',
|
|
|
|
|
trigger: 'blur',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '备注',
|
|
|
|
|
prop: 'memo',
|
|
|
|
|
search: false,
|
|
|
|
|
sortable: true,
|
|
|
|
|
filter: true,
|
|
|
|
|
span: 12,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
form: {},
|
|
|
|
|
page: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
total: 0,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 新增
|
|
|
|
|
moldAddFn(row, flag) {
|
|
|
|
|
this.$refs.addEditDialogDosingRecord.show()
|
|
|
|
|
this.moldAddMore = flag
|
|
|
|
|
},
|
|
|
|
|
//关闭弹窗
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.addOpen = false
|
|
|
|
|
},
|
|
|
|
|
// 点击导入按钮
|
|
|
|
|
handleImport() {
|
|
|
|
|
this.isShowImport = true
|
|
|
|
|
},
|
|
|
|
|
handleDelete() {
|
|
|
|
|
if (this.selectionList.length === 0) {
|
|
|
|
|
this.$message.warning('请选择至少一条数据');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.$confirm('确定将选择数据删除?', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
}).then(() => { });
|
|
|
|
|
},
|
|
|
|
|
// 多选
|
|
|
|
|
selectionChange(list) {
|
|
|
|
|
this.selectionList = list;
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.data = [
|
|
|
|
|
{
|
|
|
|
|
bsTower: null,
|
|
|
|
|
device: '111',
|
|
|
|
|
dorId: 162,
|
|
|
|
|
dorType: 2,
|
|
|
|
|
dose: 3.0,
|
|
|
|
|
dosingMan: {
|
|
|
|
|
userId: 541,
|
|
|
|
|
userName: '崔殿龙',
|
|
|
|
|
},
|
|
|
|
|
dosingTime: '2023-05-23 00:00:00',
|
|
|
|
|
drug: '111',
|
|
|
|
|
handleResult: 1,
|
|
|
|
|
handleResultTitle: '手动新增',
|
|
|
|
|
keyValue: 162,
|
|
|
|
|
memo: '111',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
bsTower: null,
|
|
|
|
|
device: '111',
|
|
|
|
|
dorId: 161,
|
|
|
|
|
dorType: 2,
|
|
|
|
|
dose: 3.0,
|
|
|
|
|
dosingMan: {
|
|
|
|
|
userId: 541,
|
|
|
|
|
userName: '崔殿龙',
|
|
|
|
|
},
|
|
|
|
|
dosingTime: '2023-05-23 00:00:00',
|
|
|
|
|
drug: '111',
|
|
|
|
|
handleResult: 1,
|
|
|
|
|
handleResultTitle: '手动新增',
|
|
|
|
|
keyValue: 161,
|
|
|
|
|
memo: '111',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
bsTower: null,
|
|
|
|
|
device: '111',
|
|
|
|
|
dorId: 146,
|
|
|
|
|
dorType: 2,
|
|
|
|
|
dose: 3.0,
|
|
|
|
|
dosingMan: {
|
|
|
|
|
userId: 541,
|
|
|
|
|
userName: '崔殿龙',
|
|
|
|
|
},
|
|
|
|
|
dosingTime: '2023-05-23 00:00:00',
|
|
|
|
|
drug: '111',
|
|
|
|
|
handleResult: 1,
|
|
|
|
|
handleResultTitle: '手动新增',
|
|
|
|
|
keyValue: 146,
|
|
|
|
|
memo: '111',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
bsTower: {
|
|
|
|
|
btCode: 'S02',
|
|
|
|
|
btId: 8,
|
|
|
|
|
btName: 'S02',
|
|
|
|
|
drug: '药品02',
|
|
|
|
|
fanPoint: 'e',
|
|
|
|
|
fanRunPoint: 'dd',
|
|
|
|
|
keyValue: 8,
|
|
|
|
|
phPoint: 'd',
|
|
|
|
|
pumpPoint: 'f',
|
|
|
|
|
threshold: 12.0,
|
|
|
|
|
updateMan: {
|
|
|
|
|
userId: 541,
|
|
|
|
|
userName: '崔殿龙',
|
|
|
|
|
},
|
|
|
|
|
updateTime: '2023-07-03 09:06:25',
|
|
|
|
|
},
|
|
|
|
|
device: 'S02',
|
|
|
|
|
dorId: 123,
|
|
|
|
|
dorType: 2,
|
|
|
|
|
dose: 0.0,
|
|
|
|
|
dosingMan: null,
|
|
|
|
|
dosingTime: null,
|
|
|
|
|
drug: '药品02',
|
|
|
|
|
handleResult: 2,
|
|
|
|
|
handleResultTitle: '待处理',
|
|
|
|
|
keyValue: 123,
|
|
|
|
|
memo: null,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
this.page.total = this.data.length;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped></style>
|