|
|
|
|
@ -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" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="primary" @click="moldAddFn(null, true)">新增</el-button> |
|
|
|
|
<!-- <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="danger" @click="handleBatchDelete">删 除 </el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu-right> |
|
|
|
|
<el-button type="primary" @click="handleImport">导入 </el-button> |
|
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
|
@closeDialog="closeImportDialog" |
|
|
|
|
:basicImportSearch="search" |
|
|
|
|
></basic-import> |
|
|
|
|
<!-- 新增 --> |
|
|
|
|
<!-- 新增弹窗 --> |
|
|
|
|
<addEditDialogDosingRecord |
|
|
|
|
v-if="addOpen" |
|
|
|
|
:showDialog="addOpen" |
|
|
|
|
@ -64,7 +64,6 @@ export default { |
|
|
|
|
basicImport, |
|
|
|
|
addEditDialogDosingRecord, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
dosingManList: [], |
|
|
|
|
@ -91,7 +90,7 @@ export default { |
|
|
|
|
index: true, |
|
|
|
|
selection: true, |
|
|
|
|
viewBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
delBtn: true, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
addBtnIcon: ' ', |
|
|
|
|
viewBtnIcon: ' ', |
|
|
|
|
@ -99,7 +98,7 @@ export default { |
|
|
|
|
editBtnIcon: ' ', |
|
|
|
|
viewBtnText: '详情', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menuWidth: 80, |
|
|
|
|
menuWidth: 100, |
|
|
|
|
dialogWidth: 1040, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -125,8 +124,9 @@ export default { |
|
|
|
|
prop: 'device', |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
width: 210, |
|
|
|
|
span: 12, |
|
|
|
|
search: true, |
|
|
|
|
searchLabelWidth: 50, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -134,7 +134,6 @@ export default { |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
searchLabelWidth: 50, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '药品', |
|
|
|
|
@ -142,7 +141,8 @@ export default { |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
width: 210, |
|
|
|
|
span: 12, |
|
|
|
|
searchLabelWidth: 50, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -150,7 +150,6 @@ export default { |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
searchLabelWidth: 50, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '剂量(kg)', |
|
|
|
|
@ -158,25 +157,27 @@ export default { |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
width: 210, |
|
|
|
|
span: 12, |
|
|
|
|
searchLabelWidth: 70, |
|
|
|
|
type: 'number', |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请输入剂量(kg)', |
|
|
|
|
message: '请输入剂量', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
searchLabelWidth: 70, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '加药时间', |
|
|
|
|
prop: 'queryDosingTime', |
|
|
|
|
search: true, |
|
|
|
|
width: 210, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
hide: true, |
|
|
|
|
display: false, |
|
|
|
|
editDisplay: false, |
|
|
|
|
hide: true, |
|
|
|
|
span: 12, |
|
|
|
|
type: 'datetime', |
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
@ -188,14 +189,15 @@ export default { |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
searchRange: true, |
|
|
|
|
searchLabelWidth: 80, |
|
|
|
|
startPlaceholder: '开始时间', |
|
|
|
|
endPlaceholder: '结束时间', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '加药时间', |
|
|
|
|
prop: 'dosingTime', |
|
|
|
|
// search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 12, |
|
|
|
|
type: 'datetime', |
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
@ -211,7 +213,7 @@ export default { |
|
|
|
|
label: '加药人', |
|
|
|
|
prop: 'dosingMan', |
|
|
|
|
search: true, |
|
|
|
|
width: 210, |
|
|
|
|
span: 12, |
|
|
|
|
searchLabelWidth: 60, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
@ -235,6 +237,7 @@ export default { |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
@ -277,10 +280,9 @@ export default { |
|
|
|
|
this.addOpen = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 关闭导入弹窗 |
|
|
|
|
closeImportDialog() { |
|
|
|
|
this.isShowImport = false; |
|
|
|
|
this.isShowImport = false; // 关闭导入弹窗 |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
//更新 |
|
|
|
|
@ -326,33 +328,34 @@ export default { |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
//删除 |
|
|
|
|
handleDelete() { |
|
|
|
|
// 批量删除 |
|
|
|
|
handleBatchDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
this.$message.error('请至少选择一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
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; |
|
|
|
|
|