|
|
|
|
@ -7,8 +7,8 @@ |
|
|
|
|
v-model="form" |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="handleDelete" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@row-del="handleDelete" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@ -18,13 +18,11 @@ |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<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> |
|
|
|
|
<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> |
|
|
|
|
<el-button type="primary" @click="handleImport">导入 </el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<!-- 导入 --> |
|
|
|
|
@ -37,32 +35,33 @@ |
|
|
|
|
importUrl="/blade-desk/bsInsTest/importExcel" |
|
|
|
|
@closeDialog="closeImportDialog" |
|
|
|
|
></basic-import> |
|
|
|
|
<!-- 新增 --> |
|
|
|
|
<addEditDialogTestRecord |
|
|
|
|
v-if="addOpen" |
|
|
|
|
:showDialog="addOpen" |
|
|
|
|
@closeDialog="closeDialog" |
|
|
|
|
:moldAddMore="moldAddMore" |
|
|
|
|
:dosingManList="dosingManList" |
|
|
|
|
@submitData="handleSubmitData"> |
|
|
|
|
<!-- 新增 --> |
|
|
|
|
<addEditDialogTestRecord |
|
|
|
|
v-if="addOpen" |
|
|
|
|
:showDialog="addOpen" |
|
|
|
|
@closeDialog="closeDialog" |
|
|
|
|
:moldAddMore="moldAddMore" |
|
|
|
|
:dosingManList="dosingManList" |
|
|
|
|
@submitData="handleSubmitData" |
|
|
|
|
> |
|
|
|
|
</addEditDialogTestRecord> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getList , update , getUserList , remove } 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 { |
|
|
|
|
components: { |
|
|
|
|
basicImport, |
|
|
|
|
addEditDialogTestRecord |
|
|
|
|
addEditDialogTestRecord, |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.fetchUserList() |
|
|
|
|
this.fetchUserList(); |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
dosingManList:[], |
|
|
|
|
dosingManList: [], |
|
|
|
|
addOpen: false, //新增弹窗 |
|
|
|
|
moldAddMore: false, |
|
|
|
|
isShowImport: false, |
|
|
|
|
@ -85,13 +84,13 @@ export default { |
|
|
|
|
delBtn: true, |
|
|
|
|
addBtn: false, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
addBtnIcon: 'el-icon-plus', |
|
|
|
|
viewBtnIcon: 'el-icon-view', |
|
|
|
|
delBtnIcon: 'el-icon-delete', |
|
|
|
|
editBtnIcon: 'el-icon-edit', |
|
|
|
|
addBtnIcon: ' ', |
|
|
|
|
viewBtnIcon: ' ', |
|
|
|
|
delBtnIcon: ' ', |
|
|
|
|
editBtnIcon: ' ', |
|
|
|
|
viewBtnText: '详情', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
menuWidth: 200, |
|
|
|
|
menuWidth: 100, |
|
|
|
|
dialogWidth: 1040, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -104,7 +103,6 @@ export default { |
|
|
|
|
index: false, |
|
|
|
|
showOverflowTooltip: true, |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchGutter: 24, |
|
|
|
|
searchSpan: 6, |
|
|
|
|
menuAlign: 'center', |
|
|
|
|
@ -133,20 +131,20 @@ export default { |
|
|
|
|
prop: 'queryDosingTime', |
|
|
|
|
search: true, |
|
|
|
|
searchLabelWidth: 80, |
|
|
|
|
hide:true, |
|
|
|
|
hide: true, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
filter: true, |
|
|
|
|
editDisplay: false, |
|
|
|
|
display: false, |
|
|
|
|
span: 12, |
|
|
|
|
type: 'datetime', |
|
|
|
|
searchRange: true, |
|
|
|
|
startPlaceholder: "开始时间", |
|
|
|
|
endPlaceholder: "结束时间", |
|
|
|
|
startPlaceholder: '开始时间', |
|
|
|
|
endPlaceholder: '结束时间', |
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
label: '化验时间', |
|
|
|
|
prop: 'dosingTime', |
|
|
|
|
@ -154,7 +152,7 @@ export default { |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 12, |
|
|
|
|
type: "datetime", |
|
|
|
|
type: 'datetime', |
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
rules: [ |
|
|
|
|
@ -287,42 +285,41 @@ export default { |
|
|
|
|
getUserList({ |
|
|
|
|
current: 1, |
|
|
|
|
size: 10000000, |
|
|
|
|
roleId: '2008473492483850242' |
|
|
|
|
roleId: '2008473492483850242', |
|
|
|
|
}).then(res => { |
|
|
|
|
const result = res.data.data.records |
|
|
|
|
this.dosingManList = result |
|
|
|
|
console.log("化验人", result) |
|
|
|
|
const result = res.data.data.records; |
|
|
|
|
this.dosingManList = result; |
|
|
|
|
console.log('化验人', result); |
|
|
|
|
this.option.column.forEach(col => { |
|
|
|
|
if (col.prop === 'dosingMan') { |
|
|
|
|
col.dicData = this.dosingManList; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 新增 |
|
|
|
|
moldAddFn(row, flag) { |
|
|
|
|
this.addOpen = true |
|
|
|
|
this.moldAddMore = flag |
|
|
|
|
}, |
|
|
|
|
//关闭弹窗 |
|
|
|
|
closeDialog() { |
|
|
|
|
this.addOpen = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
|
|
// 新增 |
|
|
|
|
moldAddFn(row, flag) { |
|
|
|
|
this.addOpen = true; |
|
|
|
|
this.moldAddMore = flag; |
|
|
|
|
}, |
|
|
|
|
//关闭弹窗 |
|
|
|
|
closeImportDialog() { |
|
|
|
|
//关闭弹窗 |
|
|
|
|
closeDialog() { |
|
|
|
|
this.addOpen = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
//关闭弹窗 |
|
|
|
|
closeImportDialog() { |
|
|
|
|
this.isShowImport = false; // 关闭导入弹窗 |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
// 处理子组件提交的数据 |
|
|
|
|
handleSubmitData(data) { |
|
|
|
|
this.$message.success("数据提交成功!"); |
|
|
|
|
this.addOpen = false; |
|
|
|
|
}, |
|
|
|
|
// 处理子组件提交的数据 |
|
|
|
|
handleSubmitData(data) { |
|
|
|
|
this.$message.success('数据提交成功!'); |
|
|
|
|
this.addOpen = false; |
|
|
|
|
}, |
|
|
|
|
// 点击导入按钮 |
|
|
|
|
handleImport() { |
|
|
|
|
this.isShowImport = true |
|
|
|
|
this.isShowImport = true; |
|
|
|
|
}, |
|
|
|
|
// 批量删除 |
|
|
|
|
handleBatchDelete() { |
|
|
|
|
@ -359,10 +356,10 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 搜索重置 |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {} |
|
|
|
|
this.onLoad(this.page) |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
//刷新 |
|
|
|
|
//刷新 |
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
@ -370,9 +367,8 @@ export default { |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params) |
|
|
|
|
done() |
|
|
|
|
|
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
//更新 |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
@ -409,7 +405,7 @@ export default { |
|
|
|
|
.catch(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|