From 1498b38f9574ae33edcc8318cfd55d07912f0497 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 3 May 2024 18:04:30 +0800 Subject: [PATCH] seo --- .../customerOrg/customerOrgEdit.vue | 67 ++++++++++++++----- .../customerOrg/customerOrgRegister.vue | 4 +- .../customerOrg/customerOrgTree.vue | 10 ++- .../doctorCheck/PatientRegisterBase.vue | 9 ++- .../patientRegister/PatientRegisterList.vue | 37 +--------- .../patientRegister/patientRegisterQuery.vue | 5 ++ src/components/sumDoctorCheck/SumItems.vue | 46 ++----------- 7 files changed, 76 insertions(+), 102 deletions(-) diff --git a/src/components/customerOrg/customerOrgEdit.vue b/src/components/customerOrg/customerOrgEdit.vue index a6d0f2a..46fe8b1 100644 --- a/src/components/customerOrg/customerOrgEdit.vue +++ b/src/components/customerOrg/customerOrgEdit.vue @@ -10,7 +10,7 @@ :props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="false" clearable filterable disabled :style="'width:' + Math.floor((window.pageWidth - 585) / 3) + 'px;'"> - + @@ -124,6 +124,18 @@ + + + + + + + + + + + + @@ -147,13 +159,6 @@ - - - - - - - @@ -210,6 +215,7 @@ export default { postalCode: "", address: "", bank: "", + countryOrgCode: "", accounts: "", orgTypeId: null, remark: "", @@ -403,7 +409,7 @@ export default { console.log("vuex data", this.customerOrg.customerOrgRd); this.$refs[formName].validate((valid, fields) => { if (!valid) { - this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message}); + this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); return false; } @@ -431,16 +437,20 @@ export default { if (!this.form.id) { //id为空则新增 - postapi(`/api/app/customerorg/create`, body).then((res) => { + postapi(`/api/app/customerorg/create`, body).then(async (res) => { if (res.code == 1) { console.log("创健 操作成功"); //this.setData({ key: "customerOrg.customerOrgRd", value: res }); this.form = res.data - this.dataTransOpts.tableS.customer_org.id = res.data.id - // this.customerOrg.customerOrgId = res.data.id; + this.dataTransOpts.tableS.customer_org = res.data + // this.customerOrg.customerOrgId = res.data.id; this.customerOrg.customerOrgRd = res.data; this.getCustomerOrgTree("insert", res.data); this.customerOrg.oprStatus = 'edit' + this.dataTransOpts.tableS.customer_org.parent_id = await this.getParentCustomerOrgId(res.data.id) + this.dataTransOpts.refresh.customer_org.S++ + this.dataTransOpts.refresh.customer_org_register.M++ + this.dataTransOpts.refresh.contact_person.M++ } }); } else { @@ -449,29 +459,50 @@ export default { (res) => { if (res.code == 1) { console.log("更新 操作成功"); - let lbody = { id: this.form.id, ...body }; + let lbody = { ...deepCopy(body), id: this.form.id }; this.getCustomerOrgTree("update", lbody); this.customerOrg.oprStatus = 'edit' + + this.dataTransOpts.refresh.customer_org.S++ + this.dataTransOpts.refresh.customer_org_register.M++ + this.dataTransOpts.refresh.contact_person.M++ } } ); } }); }, + + // 获取顶级单位ID + async getParentCustomerOrgId(customerOrgId) { + let customerOrgParentId = null + if (!customerOrgId) return customerOrgParentId + if (typeof customerOrgId == 'string') { + try { + let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`) + if (res.code != -1) customerOrgParentId = res.data + } catch (error) { + console.log('获取顶级单位ID出错:', error) + } + } else if (customerOrgId.length > 0) { + customerOrgParentId = customerOrgId[0] + } + return customerOrgParentId + }, //新增弹框 async btnAdd(formName, child) { await this.$refs[formName].resetFields(); //console.log('this.peisid',this.peisid) if (!this.peisid || this.peisid == 'null') { - this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!"}); + this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!" }); return } this.form = deepCopy(this.formInit) if (child) { if (!this.dataTransOpts.tableS.customer_org.id) { - this.$message.warning({ showClose: true, message: "请先选择上级单位"}); + this.$message.warning({ showClose: true, message: "请先选择上级单位" }); this.customerOrg.oprStatus = '' return; } @@ -494,7 +525,7 @@ export default { //删除 btnDel(formName) { if (!this.dataTransOpts.tableS.customer_org.id) { - this.$message.warning({ showClose: true, message: "请先选中要删除的节点"}) + this.$message.warning({ showClose: true, message: "请先选中要删除的节点" }) return } //复制待删除的节点 @@ -522,9 +553,9 @@ export default { } }).catch((err) => { if (err == "cancel") { - this.$message.info({ showClose: true, message: "已取消删除"}); + this.$message.info({ showClose: true, message: "已取消删除" }); } else { - this.$message.error({ showClose: true, message: "操作失败,原因:" + err}); + this.$message.error({ showClose: true, message: "操作失败,原因:" + err }); } }); }, diff --git a/src/components/customerOrg/customerOrgRegister.vue b/src/components/customerOrg/customerOrgRegister.vue index b2b291b..ffdc3c2 100644 --- a/src/components/customerOrg/customerOrgRegister.vue +++ b/src/components/customerOrg/customerOrgRegister.vue @@ -8,12 +8,12 @@ diff --git a/src/components/customerOrg/customerOrgTree.vue b/src/components/customerOrg/customerOrgTree.vue index 9b3c34f..f3f6df6 100644 --- a/src/components/customerOrg/customerOrgTree.vue +++ b/src/components/customerOrg/customerOrgTree.vue @@ -104,12 +104,10 @@ export default { if(data.parentId){ let pids = getTreePids(this.customerOrg.customerOrgTree,"treeChildren", 'parentId', 'id', data.id) this.dataTransOpts.tableS.customer_org.parent_id = pids[pids.length - 2] - } - setTimeout(() => { - this.dataTransOpts.refresh.customer_org.S++ - this.dataTransOpts.refresh.customer_org_register.M++ - this.dataTransOpts.refresh.contact_person.M++ - }, 10); + } + this.dataTransOpts.refresh.customer_org.S++ + this.dataTransOpts.refresh.customer_org_register.M++ + this.dataTransOpts.refresh.contact_person.M++ }, diff --git a/src/components/doctorCheck/PatientRegisterBase.vue b/src/components/doctorCheck/PatientRegisterBase.vue index 6165e28..ea96fbe 100644 --- a/src/components/doctorCheck/PatientRegisterBase.vue +++ b/src/components/doctorCheck/PatientRegisterBase.vue @@ -286,11 +286,10 @@ export default { // 为每个输入框添加键盘事件监听器 inputs.forEach((input, i) => { // console.log('input',input); - input.addEventListener('keydown', (event) => { + input.addEventListener('keydown', (event) => { if (event.keyCode === 13) { // 阻止回车键的默认行为(换行) event.preventDefault(); - // 如果按下的是回车查询 console.log(input.getAttribute('placeholder'), input.value) let placeholder = input.getAttribute('placeholder') @@ -305,8 +304,14 @@ export default { if (input.value) this.getlistinfilterByName(input.value) break; } + input.select() } }); + + input.addEventListener('click', (event) => { + input.select() + }); + }); }); }, diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 94269c3..e694f19 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -6,7 +6,7 @@
+ @row-click="rowClick" ref="registerCheckList">