中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

306 lines
8.0 KiB

<template>
5 months ago
<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">
5 months ago
<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>
5 months ago
</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>
5 months ago
<!-- 导入 -->
<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>
5 months ago
</div>
</template>
<script>
5 months ago
import basicImport from '@/components/basic-import/main.vue';
import addEditDialogDosingRecord from './addEditDialogDosingRecord.vue';
export default {
5 months ago
components: {
basicImport,
addEditDialogDosingRecord
5 months ago
},
5 months ago
data() {
return {
moldAddMore: false,
5 months ago
isShowImport: false,
loading: false,
5 months ago
selectionList: [],
option: {
addBtn: false,
5 months ago
height: 'auto',
5 months ago
calcHeight: 32,
tip: false,
5 months ago
size: 'medium',
5 months ago
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: true,
selection: true,
viewBtn: false,
delBtn: false,
5 months ago
editBtnText: '修改',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
5 months ago
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,
5 months ago
searchLabelPosition: 'left',
searchLabelPosition: 'left',
5 months ago
searchGutter: 24,
searchSpan: 6,
5 months ago
menuAlign: 'left',
5 months ago
gridBtn: false,
5 months ago
searchMenuPosition: 'right',
align: 'center',
5 months ago
column: [
{
5 months ago
label: '设施',
prop: 'device',
5 months ago
sortable: true,
filter: true,
span: 12,
search: true,
searchLabelWidth: 140,
rules: [
{
required: true,
message: '请输入设施',
5 months ago
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '药品',
prop: 'drug',
5 months ago
search: true,
sortable: true,
filter: true,
span: 12,
rules: [
{
required: true,
5 months ago
message: '请输入名称',
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '剂量(kg)',
prop: 'dose',
5 months ago
search: true,
sortable: true,
filter: true,
span: 12,
searchLabelWidth: 140,
rules: [
{
required: true,
5 months ago
message: '请输入药品名称',
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '加药时间',
prop: 'dosingTime',
5 months ago
search: true,
sortable: true,
filter: true,
span: 12,
type: 'datetime',
5 months ago
rules: [
{
required: true,
5 months ago
message: '请输入报警阙值',
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '加药人',
prop: 'dosingMan.userId',
5 months ago
bind: 'dosingMan.userName',
5 months ago
search: true,
sortable: true,
filter: true,
span: 12,
type: "select",
dicData: [
{ label: '崔殿龙', value: '541' },
],
5 months ago
rules: [
{
required: true,
5 months ago
message: '请输入PH报警点位',
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '备注',
prop: 'memo',
5 months ago
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
},
5 months ago
// 点击导入按钮
handleImport() {
this.isShowImport = true
},
5 months ago
handleDelete() {
if (this.selectionList.length === 0) {
5 months ago
this.$message.warning('请选择至少一条数据');
5 months ago
return;
}
5 months ago
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => { });
5 months ago
},
// 多选
selectionChange(list) {
this.selectionList = list;
},
5 months ago
onLoad() {
this.loading = true;
this.data = [
{
bsTower: null,
5 months ago
device: '111',
5 months ago
dorId: 162,
dorType: 2,
dose: 3.0,
dosingMan: {
userId: 541,
5 months ago
userName: '崔殿龙',
5 months ago
},
5 months ago
dosingTime: '2023-05-23 00:00:00',
drug: '111',
5 months ago
handleResult: 1,
5 months ago
handleResultTitle: '手动新增',
5 months ago
keyValue: 162,
5 months ago
memo: '111',
},
5 months ago
{
bsTower: null,
5 months ago
device: '111',
5 months ago
dorId: 161,
dorType: 2,
dose: 3.0,
dosingMan: {
userId: 541,
5 months ago
userName: '崔殿龙',
5 months ago
},
5 months ago
dosingTime: '2023-05-23 00:00:00',
drug: '111',
5 months ago
handleResult: 1,
5 months ago
handleResultTitle: '手动新增',
5 months ago
keyValue: 161,
5 months ago
memo: '111',
},
5 months ago
{
bsTower: null,
5 months ago
device: '111',
5 months ago
dorId: 146,
dorType: 2,
dose: 3.0,
dosingMan: {
userId: 541,
5 months ago
userName: '崔殿龙',
5 months ago
},
5 months ago
dosingTime: '2023-05-23 00:00:00',
drug: '111',
5 months ago
handleResult: 1,
5 months ago
handleResultTitle: '手动新增',
5 months ago
keyValue: 146,
5 months ago
memo: '111',
5 months ago
},
{
bsTower: {
5 months ago
btCode: 'S02',
5 months ago
btId: 8,
5 months ago
btName: 'S02',
drug: '药品02',
fanPoint: 'e',
fanRunPoint: 'dd',
5 months ago
keyValue: 8,
5 months ago
phPoint: 'd',
pumpPoint: 'f',
5 months ago
threshold: 12.0,
updateMan: {
userId: 541,
5 months ago
userName: '崔殿龙',
5 months ago
},
5 months ago
updateTime: '2023-07-03 09:06:25',
5 months ago
},
5 months ago
device: 'S02',
5 months ago
dorId: 123,
dorType: 2,
dose: 0.0,
dosingMan: null,
dosingTime: null,
5 months ago
drug: '药品02',
5 months ago
handleResult: 2,
5 months ago
handleResultTitle: '待处理',
5 months ago
keyValue: 123,
memo: null,
},
];
this.page.total = this.data.length;
this.loading = false;
},
},
};
</script>
5 months ago
<style lang="scss" scoped></style>