| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="app-container" v-loading="pageLoading"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4" :xs="24"> |
| | | <div class="head-container"> |
| | |
| | | style="margin-bottom: 15px" |
| | | /> |
| | | </div> |
| | | <div class="scrollable-container"> |
| | | <div class="scrollable-container" v-loading="loadings"> |
| | | <div class="content"> |
| | | <el-tree |
| | | :data="deptOptions" |
| | |
| | | highlight-current |
| | | @node-click="handleNodeClick" |
| | | :render-content="renderContent" |
| | | v-loading="loadings" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleUpdate1" |
| | | :loading="updateLoading" |
| | | v-hasPermi="['hosp:project:add']" |
| | | >修改</el-button |
| | | > |
| | |
| | | <el-table |
| | | v-if="refreshTable" |
| | | v-loading="loading" |
| | | style="width: 100%" |
| | | :data="projectList" |
| | | ref="tableRef" |
| | | height="580" |
| | |
| | | width="1200px" |
| | | append-to-body |
| | | :before-close="handleClose" |
| | | v-loading="loading" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="样本类型" prop="yb"> |
| | | <el-select |
| | | v-model="form.yb" |
| | | placeholder="请选择样本类型" |
| | | style="width: 200px" |
| | | filterable |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.yblx" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检查部位" prop="checkBw"> |
| | | <el-select |
| | | v-model="form.checkBw" |
| | | placeholder="请选择检查部位" |
| | | style="width: 200px" |
| | | style="width: 260px" |
| | | filterable |
| | | clearable |
| | | > |
| | |
| | | <el-input |
| | | v-model="form.proMetering" |
| | | placeholder="请输入单位" |
| | | style="width: 260px" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="参考范围" prop="proScope"> |
| | |
| | | <el-input |
| | | v-model="form.sl" |
| | | placeholder="请输入数量" |
| | | style="width: 200px" |
| | | style="width: 260px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="组合标志" prop="sfzhfy"> |
| | | <el-select |
| | | v-model="form.sfzhfy" |
| | | placeholder="请选择是否组合标志" |
| | | style="width: 260px" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_yes_no" |
| | |
| | | <el-input |
| | | v-model="form.hisXmmc" |
| | | placeholder="his项目名称" |
| | | style="width: 200px" |
| | | style="width: 260px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="his项目名称" prop="hisXmmc" v-if="key == 'N'"> |
| | |
| | | <el-input |
| | | v-model="form.hisXmbm" |
| | | placeholder="请输入his编码" |
| | | style="width: 260px" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="his单价" prop="hisdj"> |
| | |
| | | <el-input |
| | | v-model="form.lisXmmc" |
| | | placeholder="请输入LIS项目" |
| | | style="width: 200px" |
| | | style="width: 260px" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="LIS编码" prop="lisXmbm"> |
| | | <el-input |
| | | v-model="form.lisXmbm" |
| | | placeholder="请输入his编码" |
| | | style="width: 260px" |
| | | style="width: 200px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="proRemark"> |
| | |
| | | <el-input |
| | | v-model="form.xh" |
| | | placeholder="请输入排序" |
| | | style="width: 200px" |
| | | style="width: 260px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="是否参与异常" prop="sfcyyc"> |
| | | <el-select v-model="form.sfcyyc" placeholder="请选择是否参与异常" style="width: 260px"> |
| | | <el-option v-for="dict in dictTypesy" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | <el-select |
| | | v-model="form.sfcyyc" |
| | | placeholder="请选择是否参与异常" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="dict in dictTypesy" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否外送" prop="proDelivery"> |
| | | <el-select |
| | | v-model="form.proDelivery" |
| | | placeholder="请选择是否外送" |
| | | style="width: 200px" |
| | | > |
| | | <el-option |
| | | v-for="dict in wsTypesy" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | "sys_dict_position", |
| | | "tj_result_type", |
| | | "sys_yes_no", |
| | | "yblx", |
| | | ], |
| | | components: { Treeselect, IconSelect, Packagese }, |
| | | data() { |
| | |
| | | deptOptions: [], |
| | | dialogTableVisible: false, |
| | | isPriceDisabled: false, |
| | | pageLoading: true, |
| | | sfxmList: [], |
| | | deptOptionstree: [], |
| | | defaultPropstree: { |
| | |
| | | }, |
| | | dictTypesy: [ |
| | | { |
| | | value:"0", |
| | | label:"是" |
| | | value: "0", |
| | | label: "是", |
| | | }, |
| | | { |
| | | value:"1", |
| | | label:"否" |
| | | } |
| | | value: "1", |
| | | label: "否", |
| | | }, |
| | | ], |
| | | wsTypesy: [ |
| | | { |
| | | value: "1", |
| | | label: "是", |
| | | }, |
| | | { |
| | | value: "0", |
| | | label: "否", |
| | | }, |
| | | ], |
| | | xmmc: "", |
| | | chargeId: [], |
| | |
| | | ChangeList: [], |
| | | loading: true, |
| | | loadings: false, |
| | | addLoading: false, |
| | | updateLoading: false, |
| | | key: "", |
| | | ids: [], |
| | | single: true, |
| | |
| | | this.debounceFilter(val); |
| | | }, |
| | | treeId(newVal) { |
| | | console.log(newVal,8989) |
| | | console.log(newVal, 8989); |
| | | if (newVal && newVal.length > 0) { |
| | | this.$nextTick(() => { |
| | | const lastId = newVal[newVal.length - 1] || "532"; |
| | | const node = this.findNodeById(this.deptOptions, lastId); |
| | | this.queryParams.proId = lastId; |
| | | this.getList(); |
| | | if (node) { |
| | | this.$refs.tree1.setCurrentKey(lastId); |
| | | const nodeElement = document.querySelector( |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getConsumables(); |
| | | this.getDeptList(); |
| | | // this.getConsumables(); |
| | | // this.getDeptList(); |
| | | // this.getDeptTree().then(() => { |
| | | // this.precomputePinyin(); |
| | | // }); |
| | | }, |
| | | mounted() { |
| | | this.getDeptTree().then(() => { |
| | | this.precomputePinyin(); |
| | | }); |
| | | // this.getDeptTree().then(() => { |
| | | // this.precomputePinyin(); |
| | | // }); |
| | | // this.precomputePinyin(); |
| | | this.loadPage(); |
| | | }, |
| | | methods: { |
| | | debounceFilter: debounce(function (val) { |
| | |
| | | }; |
| | | traverse(this.deptOptions); |
| | | }, |
| | | |
| | | async loadPage() { |
| | | this.pageLoading = true; |
| | | try { |
| | | await Promise.all([ |
| | | this.getDeptTree(), // 获取左侧树 |
| | | //this.getList(), 获取右侧表格 |
| | | ]); |
| | | } catch (error) { |
| | | console.error("加载页面出错", error); |
| | | } finally { |
| | | this.pageLoading = false; // 两个都加载完再关闭 loading |
| | | } |
| | | }, |
| | | |
| | | async getDeptTree() { |
| | | this.loadings = true; |
| | | try { |
| | | const response = await deptTree111(); |
| | | this.deptOptions = response.data; |
| | | |
| | | // 保证 treeId 是数组格式 |
| | | this.treeId = []; |
| | | |
| | | if (this.treeDate?.id) { |
| | | this.treeId.push(this.treeDate.id); |
| | | } else { |
| | | this.treeId.push("532"); |
| | | } |
| | | } catch (error) { |
| | | console.error("加载部门树失败:", error); |
| | | } finally { |
| | | this.loadings = false; // loading 状态结束 |
| | | } |
| | | }, |
| | | |
| | | async getList() { |
| | | this.loading = true; |
| | | let data = { |
| | | proName: this.queryParams.proName, |
| | | checkType: this.queryParams.checkType, |
| | | deptId: this.queryParams.deptId, |
| | | proId: this.queryParams.proId, |
| | | }; |
| | | try { |
| | | const res = await getAllChildListById(data); // 替换成你实际的接口 |
| | | this.projectList = res.data.list; |
| | | } finally { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | const cached = this.pinyinCache.get(data.id); |
| | |
| | | this.dialogTableVisible = true; |
| | | if (this.deptOptionstree.length != 0) { |
| | | this.$nextTick(() => { |
| | | this.chargeId.push(this.deptOptionstree[0].id); |
| | | // this.chargeId.push(this.deptOptionstree[0].id); |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | }, |
| | | getlistSfxm() { |
| | | console.log(2222); |
| | | this.loading = true; |
| | | this.List = true; |
| | | listSfxm(this.querycharge).then((response) => { |
| | | this.sfxmList = response.rows; |
| | | this.sfxmList = response.rows || []; |
| | | console.log(response.rows, 111222); |
| | | |
| | | response.rows.forEach((item, index) => { |
| | | item.newID = |
| | | (this.querycharge.pageNum - 1) * this.querycharge.pageSize + |
| | |
| | | this.queryParam.id = data.id; |
| | | this.List = false; |
| | | this.getListByXmId(); |
| | | this.total = 0; |
| | | }, |
| | | getListByXmId() { |
| | | console.log(this.sfxmList); |
| | | this.loading = true; |
| | | |
| | | getListByXmId(this.queryParam).then((response) => { |
| | | this.sfxmList = response.data.date; |
| | | response.data.date.forEach((item, index) => { |
| | | item.newID = |
| | | (this.queryParam.page - 1) * this.queryParam.pageSize + index + 1; |
| | | }); |
| | | this.sfxmList = response.data.date || []; |
| | | if (response.data.date == null) { |
| | | return; |
| | | } else { |
| | | response.data.date.forEach((item, index) => { |
| | | item.newID = |
| | | (this.queryParam.page - 1) * this.queryParam.pageSize + index + 1; |
| | | }); |
| | | } |
| | | |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | normalizer(node) { |
| | | if (node.children && !node.children.length) { |
| | |
| | | }); |
| | | }, |
| | | getDeptTree() { |
| | | return deptTree111().then((response) => { |
| | | this.deptOptions = response.data; |
| | | this.treeId = [] |
| | | if(this.treeDate.id){ |
| | | this.treeId.push( this.treeDate.id) |
| | | }else{ |
| | | this.treeId.push("532") |
| | | } |
| | | |
| | | }); |
| | | this.loadings = true; |
| | | return deptTree111() |
| | | .then((response) => { |
| | | this.deptOptions = response.data; |
| | | this.treeId = []; |
| | | if (this.treeDate.id) { |
| | | this.treeId.push(this.treeDate.id); |
| | | } else { |
| | | this.treeId.push("532"); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.error("加载部门树失败:", err); |
| | | }) |
| | | .finally(() => { |
| | | this.loadings = false; // 无论成功或失败,结束加载 |
| | | }); |
| | | }, |
| | | handleNodeClick(date) { |
| | | this.treeDate = date; |
| | | this.xiugaiList ={} |
| | | this.xiugaiList = {}; |
| | | this.xiugais = date.qf === "0"; |
| | | let proId = date.id; |
| | | getInfoByProId(proId).then((response) => { |
| | |
| | | } |
| | | }, |
| | | handleUpdate1() { |
| | | this.form={} |
| | | this.updateLoading = true; |
| | | this.form = {}; |
| | | this.form = this.xiugaiList; |
| | | this.form.proStatus = this.form.proStatus.toString(); |
| | | this.form.sfcyyc = this.form.sfcyyc.toString(); |
| | | this.proParent = true; |
| | | this.isPriceDisabled = true; |
| | | getlist().then((response) => { |
| | | if (response.code == 200) { |
| | | this.loading = false; |
| | | this.projectOptions = []; |
| | | const project = { proId: 0, proName: "主类目", children: [] }; |
| | | project.children = this.handleTree(response.data.list, "proId"); |
| | | this.key = response.data.key; |
| | | this.projectOptions.push(project); |
| | | } |
| | | }); |
| | | getlist() |
| | | .then((response) => { |
| | | if (response.code == 200) { |
| | | this.loading = false; |
| | | this.projectOptions = []; |
| | | const project = { proId: 0, proName: "主类目", children: [] }; |
| | | project.children = this.handleTree(response.data.list, "proId"); |
| | | this.key = response.data.key; |
| | | this.projectOptions.push(project); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | this.updateLoading = false; |
| | | }); |
| | | this.open = true; |
| | | }, |
| | | handleUpdate(row) { |
| | |
| | | } |
| | | getlist().then((response) => { |
| | | if (response.code == 200) { |
| | | this.loading = false; |
| | | // this.loading = false; |
| | | this.projectOptions = []; |
| | | const project = { proId: 0, proName: "主类目", children: [] }; |
| | | project.children = this.handleTree(response.data.list, "proId"); |
| | |
| | | this.projectOptions.push(project); |
| | | } |
| | | }); |
| | | // this.loadPage(); |
| | | this.open = true; |
| | | this.title = "体检项目信息维护"; |
| | | }); |
| | |
| | | }, |
| | | submitForm() { |
| | | this.noclick = true; |
| | | this.pageLoading = true; |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | const isUpdate = this.form.proId != null; |
| | |
| | | this.form.lisXmbm = this.form.lisXmbm; |
| | | if (this.key === "N") { |
| | | this.processSubmission(isUpdate, false); |
| | | this.open = false; |
| | | // this.pageLoading = false; |
| | | } else if (this.key === "Y") { |
| | | this.form.sfxmId = this.sfxmId; |
| | | this.processSubmission(isUpdate, true); |
| | | this.open = false; |
| | | // this.pageLoading = false; |
| | | } |
| | | } |
| | | }); |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleSuccess(isY) { |
| | | /* handleSuccess(isY) { |
| | | this.cancel(); |
| | | this.getList(); |
| | | // this.getList(); |
| | | if (this.proParent || isY) { |
| | | this.getDeptTree().then(() => { |
| | | this.precomputePinyin(); |
| | | }); |
| | | } |
| | | console.log(this.treeId) |
| | | console.log(this.treeId); |
| | | }, */ |
| | | async handleSuccess(isY) { |
| | | this.cancel(); |
| | | |
| | | if (this.proParent || isY) { |
| | | // 等待左侧树加载和拼音处理 |
| | | await this.getDeptTree(); |
| | | this.precomputePinyin(); |
| | | } |
| | | |
| | | // 等待右侧表格刷新 |
| | | await this.getList(); |
| | | |
| | | this.pageLoading = false; // ✅ 统一加载状态控制 |
| | | }, |
| | | submit() { |
| | | this.ChangeList.forEach((item) => { |