中航光电热表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.

529 lines
14 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"
>
<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>
<!-- 导入 -->
<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>
<!-- 新增 -->
<addEditDialogTestRecord
v-if="addOpen"
:showDialog="addOpen"
@closeDialog="closeDialog"
:moldAddMore="moldAddMore"
@submitData="handleSubmitData">
</addEditDialogTestRecord>
5 months ago
</div>
</template>
<script>
5 months ago
import basicImport from '@/components/basic-import/main.vue';
import addEditDialogTestRecord from './addEditDialogTestRecord.vue';
export default {
5 months ago
components: {
basicImport,
addEditDialogTestRecord
5 months ago
},
5 months ago
data() {
return {
addOpen: false, //新增弹窗
moldAddMore: false,
5 months ago
isShowImport: false,
loading: false,
5 months ago
selectionList: [],
option: {
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,
addBtn: 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: 'dosingTime',
5 months ago
search: true,
sortable: true,
filter: true,
span: 12,
type: "datetime",
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
5 months ago
rules: [
{
required: true,
message: '请选择化验时间',
5 months ago
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,
searchLabelWidth: 140,
type: 'select',
dicData: [
{ label: '测试', value: '测试' },
{ label: '测试1', value: '测试1' },
],
5 months ago
rules: [
{
required: true,
message: '请选择化验人',
5 months ago
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '镍',
prop: 'itNi',
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: '铜',
prop: 'itCu',
5 months ago
search: false,
sortable: true,
filter: true,
span: 12,
rules: [
{
required: true,
message: '请输入铜',
5 months ago
trigger: 'blur',
5 months ago
},
],
},
{
label: '六价铬',
5 months ago
prop: 'itCr',
5 months ago
search: false,
sortable: true,
filter: true,
span: 12,
rules: [
{
required: true,
message: '请输入六价铬',
5 months ago
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: '氰化物',
prop: 'itCn2',
5 months ago
search: false,
sortable: true,
filter: true,
span: 12,
rules: [
{
required: true,
message: '请输入氰化物',
5 months ago
trigger: 'blur',
5 months ago
},
],
},
{
5 months ago
label: 'PH',
prop: 'itPh',
5 months ago
search: false,
sortable: true,
filter: true,
span: 12,
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.addOpen = true
this.moldAddMore = flag
},
//关闭弹窗
closeDialog() {
this.addOpen = false
},
// 处理子组件提交的数据
handleSubmitData(data) {
this.$message.success("数据提交成功!");
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',
5 months ago
}).then(() => {});
},
// 多选
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true;
this.data = [
{
5 months ago
device: '12',
5 months ago
dorType: 2,
dosingMan: {
accountId: null,
card: null,
5 months ago
createTime: '2023-02-08',
5 months ago
curStatus: 1,
deleted: false,
deptName: null,
dimissionTime: null,
factoryId: 41,
head: 0,
5 months ago
jobName: '主任',
5 months ago
keyValue: 453,
5 months ago
ldapName: '00075',
5 months ago
mail: null,
mobile: null,
pfDepartment: {
appLink: null,
5 months ago
createTime: '2023-02-08',
5 months ago
deleted: false,
5 months ago
deptCode: '26',
5 months ago
deptId: 57,
5 months ago
deptName: '外协业务中心',
5 months ago
deptType: 1,
5 months ago
deptTypeTitle: '厂',
5 months ago
keyValue: 57,
memo: null,
5 months ago
orders: '26',
5 months ago
parentDeptId: 41,
parentPath: null,
ucDeptId: null,
5 months ago
updateTime: '2023-02-08 16:38:31',
},
5 months ago
pinyinIndex: '00075,00075',
5 months ago
ucUserId: null,
5 months ago
updateTime: '2023-02-08 17:25:13',
userCode: '00075',
5 months ago
userId: 453,
5 months ago
userName: '测试1',
5 months ago
userSex: 1,
5 months ago
userSources: '测试1',
userString: '453:A:测试1',
userType: 'A',
5 months ago
},
5 months ago
dosingTime: '2023-11-22 00:00:00',
itCn2: '3',
itCr: '3',
itCu: '2',
5 months ago
itId: 21,
5 months ago
itNi: '1',
itPh: '10',
5 months ago
keyValue: 21,
memo: null,
},
{
5 months ago
device: 'qq',
5 months ago
dorType: 2,
dosingMan: {
accountId: null,
card: null,
5 months ago
createTime: '2023-04-06',
5 months ago
curStatus: 1,
deleted: false,
deptName: null,
dimissionTime: null,
factoryId: 41,
head: 0,
5 months ago
jobName: '软件工程师',
5 months ago
keyValue: 521,
ldapName: null,
mail: null,
mobile: null,
pfDepartment: {
appLink: null,
5 months ago
createTime: '2022-08-31',
5 months ago
deleted: false,
5 months ago
deptCode: '001',
5 months ago
deptId: 1,
5 months ago
deptName: 'MES开发部',
5 months ago
deptType: 1,
5 months ago
deptTypeTitle: '厂',
5 months ago
keyValue: 1,
memo: null,
5 months ago
orders: '00',
5 months ago
parentDeptId: null,
parentPath: null,
ucDeptId: null,
5 months ago
updateTime: '2022-08-31 16:32:46',
},
5 months ago
pinyinIndex: '0001,0001',
5 months ago
ucUserId: null,
5 months ago
updateTime: '2023-04-06 16:23:38',
userCode: '0001',
5 months ago
userId: 521,
5 months ago
userName: '测试',
5 months ago
userSex: 1,
5 months ago
userSources: '测试',
userString: '521:A:测试',
userType: 'A',
5 months ago
},
5 months ago
dosingTime: '2024-02-28 03:03:03',
5 months ago
itCn2: null,
5 months ago
itCr: '2',
5 months ago
itCu: null,
itId: 41,
5 months ago
itNi: '1',
5 months ago
itPh: null,
keyValue: 41,
memo: null,
},
{
5 months ago
device: '12',
5 months ago
dorType: 2,
dosingMan: {
accountId: null,
card: null,
5 months ago
createTime: '2023-02-08',
5 months ago
curStatus: 1,
deleted: false,
deptName: null,
dimissionTime: null,
factoryId: 41,
head: 0,
5 months ago
jobName: '主任',
5 months ago
keyValue: 453,
5 months ago
ldapName: '00075',
5 months ago
mail: null,
mobile: null,
pfDepartment: {
appLink: null,
5 months ago
createTime: '2023-02-08',
5 months ago
deleted: false,
5 months ago
deptCode: '26',
5 months ago
deptId: 57,
5 months ago
deptName: '外协业务中心',
5 months ago
deptType: 1,
5 months ago
deptTypeTitle: '厂',
5 months ago
keyValue: 57,
memo: null,
5 months ago
orders: '26',
5 months ago
parentDeptId: 41,
parentPath: null,
ucDeptId: null,
5 months ago
updateTime: '2023-02-08 16:38:31',
},
5 months ago
pinyinIndex: '00075,00075',
5 months ago
ucUserId: null,
5 months ago
updateTime: '2023-02-08 17:25:13',
userCode: '00075',
5 months ago
userId: 453,
5 months ago
userName: '测试1',
5 months ago
userSex: 1,
5 months ago
userSources: '测试1',
userString: '453:A:测试1',
userType: 'A',
5 months ago
},
5 months ago
dosingTime: '2023-11-24 00:00:00',
itCn2: '9',
itCr: '3',
itCu: '12',
5 months ago
itId: 42,
5 months ago
itNi: '12',
itPh: '8',
5 months ago
keyValue: 42,
memo: null,
},
5 months ago
{
5 months ago
device: '12',
5 months ago
dorType: 2,
dosingMan: {
accountId: null,
card: null,
5 months ago
createTime: '2023-02-08',
5 months ago
curStatus: 1,
deleted: false,
deptName: null,
dimissionTime: null,
factoryId: 41,
head: 0,
5 months ago
jobName: '主任',
5 months ago
keyValue: 453,
5 months ago
ldapName: '00075',
5 months ago
mail: null,
mobile: null,
pfDepartment: {
appLink: null,
5 months ago
createTime: '2023-02-08',
5 months ago
deleted: false,
5 months ago
deptCode: '26',
5 months ago
deptId: 57,
5 months ago
deptName: '外协业务中心',
5 months ago
deptType: 1,
5 months ago
deptTypeTitle: '厂',
5 months ago
keyValue: 57,
memo: null,
5 months ago
orders: '26',
5 months ago
parentDeptId: 41,
parentPath: null,
ucDeptId: null,
5 months ago
updateTime: '2023-02-08 16:38:31',
5 months ago
},
5 months ago
pinyinIndex: '00075,00075',
5 months ago
ucUserId: null,
5 months ago
updateTime: '2023-02-08 17:25:13',
userCode: '00075',
5 months ago
userId: 453,
5 months ago
userName: '测试1',
5 months ago
userSex: 1,
5 months ago
userSources: '测试1',
userString: '453:A:测试1',
userType: 'A',
5 months ago
},
5 months ago
dosingTime: '2024-03-24 00:00:00',
itCn2: '9',
itCr: '3',
itCu: '12',
5 months ago
itId: 43,
5 months ago
itNi: '12',
5 months ago
itPh: null,
keyValue: 43,
memo: null,
},
5 months ago
];
this.page.total = this.data.length;
this.loading = false;
setTimeout(() => {
this.selectionClear();
}, 500);
},
},
};
</script>
5 months ago
<style lang="scss" scoped></style>