|
|
|
|
@ -7,7 +7,7 @@ |
|
|
|
|
v-model="form" |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@row-del="handleDelete" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@ -18,9 +18,10 @@ |
|
|
|
|
@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> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="moldAddFn(null, true)" |
|
|
|
|
>新增</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleBatchDelete">删 除 </el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu-right> |
|
|
|
|
<el-button type="primary" @click="handleImport">导入 </el-button> |
|
|
|
|
@ -48,7 +49,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getList , update , getUserList } from '@/api/safetyManagement/testRecord.js'; |
|
|
|
|
import { getList , update , getUserList , remove } from '@/api/safetyManagement/testRecord.js'; |
|
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
|
import addEditDialogTestRecord from './addEditDialogTestRecord.vue'; |
|
|
|
|
export default { |
|
|
|
|
@ -81,16 +82,16 @@ export default { |
|
|
|
|
index: true, |
|
|
|
|
selection: true, |
|
|
|
|
viewBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
delBtn: true, |
|
|
|
|
addBtn: false, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
addBtnIcon: ' ', |
|
|
|
|
viewBtnIcon: ' ', |
|
|
|
|
delBtnIcon: ' ', |
|
|
|
|
editBtnIcon: ' ', |
|
|
|
|
addBtnIcon: 'el-icon-plus', |
|
|
|
|
viewBtnIcon: 'el-icon-view', |
|
|
|
|
delBtnIcon: 'el-icon-delete', |
|
|
|
|
editBtnIcon: 'el-icon-edit', |
|
|
|
|
viewBtnText: '详情', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menuWidth: 80, |
|
|
|
|
menuWidth: 200, |
|
|
|
|
dialogWidth: 1040, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -150,13 +151,12 @@ export default { |
|
|
|
|
label: '化验时间', |
|
|
|
|
prop: 'dosingTime', |
|
|
|
|
search: false, |
|
|
|
|
|
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 12, |
|
|
|
|
type: "datetime", |
|
|
|
|
// format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
// valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -197,8 +197,8 @@ export default { |
|
|
|
|
searchLabelWidth: 40, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入报警阙值', |
|
|
|
|
required: false, |
|
|
|
|
message: '请输入镍', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
@ -212,7 +212,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
required: false, |
|
|
|
|
message: '请输入铜', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
@ -227,7 +227,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
required: false, |
|
|
|
|
message: '请输入六价铬', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
@ -242,7 +242,7 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
required: false, |
|
|
|
|
message: '请输入氰化物', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
@ -257,8 +257,8 @@ export default { |
|
|
|
|
span: 12, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入PH报警点位', |
|
|
|
|
required: false, |
|
|
|
|
message: '请输入PH', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
@ -324,16 +324,34 @@ export default { |
|
|
|
|
handleImport() { |
|
|
|
|
this.isShowImport = true |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
// 批量删除 |
|
|
|
|
handleBatchDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
this.$message.error('请至少选择一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => {}); |
|
|
|
|
}).then(() => { |
|
|
|
|
remove(this.selectionList.map(item => item.id).join(',')).then(res => { |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
this.refreshChange(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete(row) { |
|
|
|
|
this.$confirm('确定删除数据吗?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
remove(row.id).then(res => { |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
this.refreshChange(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 多选 |
|
|
|
|
selectionChange(list) { |
|
|
|
|
|