| | |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">数采配置</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="small" type="primary" @click="fileConfiguration">文件配置</el-button> |
| | | <el-button size="small" type="primary" @click="addItem">检验项新增</el-button> |
| | | <el-button size="small" @click="$parent.closeDataVue()"> |
| | | <span style="color: #3A7BFA;">返回</span> |
| | | </el-button> |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="添加检验项" :visible.sync="dialogVisible5" width="1000px"> |
| | | <lims-table :tableData="tableData5" :column="column5" |
| | | :isSelection="true" :handleSelectionChange="selectMethod" |
| | | height="540" :page="page5" :tableLoading="tableLoading5" |
| | | @pagination="pagination5"></lims-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible5 = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm5" :loading="loading5">保 存</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | queryDataAcquisitionConfiguration, |
| | | saveDataAcquisitionConfiguration, |
| | | deleteDataAcquisitionConfiguration, getDeviceById, saveDeviceFileConfiguration, queryProductConfiguration, |
| | | deleteDataAcquisitionConfiguration, |
| | | getDeviceById, |
| | | saveDeviceFileConfiguration, |
| | | queryProductConfiguration, |
| | | getNoConfigProduct, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | export default { |
| | | name: "dataAcquisitionConfig", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | components: {limsTable}, |
| | | props: { |
| | | deviceId: { |
| | | type: Number, |
| | |
| | | ] |
| | | } |
| | | }, |
| | | deleteList: [] |
| | | deleteList: [], |
| | | tableData5: [], |
| | | column5: [ |
| | | {label: '样品名称', prop: 'sample'}, |
| | | {label: '检验项分类', prop: 'inspectionItemClass'}, |
| | | {label: '检验项', prop: 'inspectionItem'}, |
| | | {label: '检验子项', prop: 'inspectionItemSubclass'}, |
| | | ], |
| | | page5: { |
| | | total:0, |
| | | size:20, |
| | | current:1 |
| | | }, |
| | | tableLoading5: false, |
| | | dialogVisible5: false, |
| | | loading5: false, |
| | | multipleSelection: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | const letterIndex = index % 26; |
| | | return alphabet.charAt(letterIndex) + (index + 1); |
| | | }, |
| | | // 打开新增检验项弹框 |
| | | addItem () { |
| | | this.dialogVisible5 = true; |
| | | this.getList5() |
| | | }, |
| | | getList5() { |
| | | this.tableLoading5 = true; |
| | | getNoConfigProduct({deviceId: this.deviceId, ...this.page5 }).then(res => { |
| | | this.tableLoading5 = false; |
| | | this.tableData5 = res.data.records |
| | | this.page5.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading5 = false; |
| | | }) |
| | | }, |
| | | pagination5 (page) { |
| | | this.page5.size = page.limit |
| | | this.getList5() |
| | | }, |
| | | // 表格选择方法 |
| | | selectMethod(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | // 提交新增检验项 |
| | | submitForm5 () { |
| | | this.loading5 = true; |
| | | saveDataAcquisitionConfiguration({ |
| | | deviceId: this.deviceId, |
| | | dataConfigList: this.multipleSelection, |
| | | }).then(res => { |
| | | this.loading5 = false; |
| | | this.dialogVisible5 = false; |
| | | this.init(); |
| | | this.$message.success("添加成功"); |
| | | }).catch(err => { |
| | | this.loading5 = false; |
| | | }) |
| | | }, |
| | | // 打开文件配置弹框 |
| | | fileConfiguration() { |
| | | this.dialogVisible4 = true; |
| | | this.getInfo() |