| | |
| | | style="height: 45px" |
| | | @submit.native.prevent |
| | | > |
| | | <el-form-item label="项目名称" prop="proName"> |
| | | <el-form-item label="项目名称" prop="bz"> |
| | | <el-input |
| | | ref="inputName" |
| | | v-model="queryParams1.proName" |
| | | v-model="queryParams1.bz" |
| | | placeholder="请输入项目名称" |
| | | clearable |
| | | @keyup.enter.native="handleSearchFor" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import { searchBiaoben, delBiaoben, editBiaoben } from "@/api/hosp/biaoben"; |
| | | import { getProByBz, delProByBz, editBiaoben } from "@/api/hosp/diseastyoes"; |
| | | import { debounce } from 'lodash'; |
| | | |
| | | export default { |
| | |
| | | tjCategory: null, |
| | | }, |
| | | queryParams1: { |
| | | proName: '', |
| | | bz: "", |
| | | }, |
| | | form: { |
| | | price: '', |
| | |
| | | this.filteredSpecimenData = []; |
| | | } |
| | | }, |
| | | handleSearchFor() { |
| | | const searchText = this.queryParams1.proName?.trim().toLowerCase() || ''; |
| | | handleSearchFor() { |
| | | const searchText = this.queryParams1.bz?.trim().toLowerCase() || ''; |
| | | if (searchText) { |
| | | this.Treedata = this.originalTreedata.filter(item => |
| | | item.proName.toLowerCase().includes(searchText) |
| | |
| | | return; |
| | | } |
| | | const proIds = this.OnenewpacName.map(item => item.proId); |
| | | const bblx = this.queryParams.tjCategory; |
| | | const bz = this.queryParams.tjCategory; |
| | | this.loading = true; |
| | | editBiaoben({ proIds, bblx }) |
| | | editBiaoben({ proIds, bz }) |
| | | .then(() => { |
| | | this.$message.success('保存成功'); |
| | | this.OnenewpacName = []; |
| | |
| | | }, |
| | | handledbelete(row) { |
| | | this.loading = true; |
| | | delBiaoben({ proId: row.proId }) |
| | | delProByBz({ proId: row.proId }) |
| | | .then(() => { |
| | | this.OnenewpacName = this.OnenewpacName.filter(item => item.proId !== row.proId); |
| | | this.$message.success('删除成功'); |
| | |
| | | fetchBiaobenData(bblx) { |
| | | console.log('调用 searchBiaoben(中间表格),参数:', { bblx }); |
| | | this.loading = true; |
| | | searchBiaoben({ bblx }) |
| | | let bz = bblx |
| | | getProByBz(bz) |
| | | .then(response => { |
| | | this.OnenewpacName = response.data || []; |
| | | this.loading = false; |
| | |
| | | fetchInitialBiaobenData() { |
| | | console.log('调用 searchBiaoben(初始加载,右侧表格),参数: {}'); |
| | | this.loading = true; |
| | | searchBiaoben({}) |
| | | let bz = "" |
| | | getProByBz(bz) |
| | | .then(response => { |
| | | this.originalTreedata = response.data || []; |
| | | this.Treedata = [...this.originalTreedata]; |