diff --git a/src/views/safetyManagement/wasteGasSet/components/dosingRecord.vue b/src/views/safetyManagement/wasteGasSet/components/dosingRecord.vue
index cbbfd52..17f40d1 100644
--- a/src/views/safetyManagement/wasteGasSet/components/dosingRecord.vue
+++ b/src/views/safetyManagement/wasteGasSet/components/dosingRecord.vue
@@ -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"
@@ -16,11 +16,11 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
+ :search.sync="search"
>
- 新增
-
+ 新增
+ 删 除
导入
@@ -37,7 +37,7 @@
@closeDialog="closeImportDialog"
:basicImportSearch="search"
>
-
+
{
- return remove(this.ids);
- })
- .then(() => {
- // 刷新表格数据并重载
- this.data = [];
- this.parentId = 0;
- this.$refs.crud.refreshTable();
- this.$refs.crud.toggleSelection();
- // 表格数据重载
- this.onLoad(this.page);
- this.$message({
- type: 'success',
- message: '操作成功!',
- });
+ }).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) {
@@ -379,27 +382,8 @@ export default {
if (requestParams.queryDosingTime && Array.isArray(requestParams.queryDosingTime)) {
requestParams.queryDosingTime = requestParams.queryDosingTime.join(',');
}
- getList(page.currentPage, page.pageSize, requestParams)
+ getList(page.currentPage, page.pageSize, Object.assign(params, requestParams))
.then(res => {
- // this.data = [
- // {
- // bsTower: null,
- // device: '121',
- // dorId: 141,
- // dorType: 1,
- // dose: 121.0,
- // dosingMan: {
- // userId: 521,
- // userName: '测试',
- // },
- // dosingTime: '2023-09-13 00:00:00',
- // drug: '212',
- // handleResult: 1,
- // handleResultTitle: '手动新增',
- // keyValue: 141,
- // memo: '11',
- // },
- // ];
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;