From 7db60363e487d96483e9ceccd9c3aa5768008ac1 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 13 Oct 2023 17:51:08 +0800 Subject: [PATCH] custerOrg SEO --- src/components/customerOrg/ContactPerson.vue | 8 ++-- .../customerOrg/customerOrgEdit.vue | 18 ++++++--- .../customerOrg/customerOrgRegister.vue | 2 +- .../customerOrg/customerOrgTree.vue | 2 + src/components/patientRegister/Camera.vue | 2 +- .../patientRegister/PatientRegisterEdit.vue | 38 ++++++++++++------- .../patientRegister/PatientRegisterList.vue | 2 +- src/store/index.js | 1 + src/utlis/proFunc.js | 12 +++--- 9 files changed, 52 insertions(+), 33 deletions(-) diff --git a/src/components/customerOrg/ContactPerson.vue b/src/components/customerOrg/ContactPerson.vue index b75653b..11ae9b6 100644 --- a/src/components/customerOrg/ContactPerson.vue +++ b/src/components/customerOrg/ContactPerson.vue @@ -202,7 +202,7 @@ export default { add() { //this.$message.success("新增 addContactPerson"); if (!this.customerOrg.customerOrgId) { - alert("没有体检单位信息"); + this.$message.warning("没有体检单位信息"); return; } this.form = { customerOrgId: this.customerOrg.customerOrgId }; @@ -215,10 +215,10 @@ export default { edit() { //this.$message.success("编辑 editContactPerson"); if (!this.customerOrg.customerOrgId) { - alert("没有体检单位信息"); + this.$message.warning("没有体检单位信息"); return; } else if (!this.personId) { - alert("请先选择要编辑的联系人"); + this.$message.warning("请先选择要编辑的联系人"); return; } this.dialogContactPerson = true; @@ -229,7 +229,7 @@ export default { del() { //this.$message.success("删除 delContactPerson"); if (!this.personId) { - alert("请先选择要编辑的联系人"); + this.$message.warning("请先选择要编辑的联系人"); return; } diff --git a/src/components/customerOrg/customerOrgEdit.vue b/src/components/customerOrg/customerOrgEdit.vue index 31e1147..bb8c097 100644 --- a/src/components/customerOrg/customerOrgEdit.vue +++ b/src/components/customerOrg/customerOrgEdit.vue @@ -15,12 +15,12 @@ - + - + @@ -190,7 +190,7 @@ >
- 保存
@@ -406,7 +406,7 @@ export default { }, //提交 - onSubmit(formName) { + btnSubmit(formName) { let body = {}; console.log("vuex data", this.customerOrg.customerOrgRd); this.$refs[formName].validate((valid, fields) => { @@ -446,6 +446,7 @@ export default { this.customerOrg.customerOrgId = res.data.id; this.customerOrg.customerOrgRd = res.data; this.getCustomerOrgTree("insert", res.data); + this.customerOrg.oprStatus = 'edit' } }); } else { @@ -456,6 +457,7 @@ export default { this.$message.success("更新 操作成功"); let lbody = { id: this.customerOrg.customerOrgRd.id, ...body }; this.getCustomerOrgTree("update", lbody); + this.customerOrg.oprStatus = 'edit' } } ); @@ -468,7 +470,8 @@ export default { if (child) { if (!this.customerOrg.customerOrgId) { - this.$message.info("请先选择单位"); + this.$message.warning("请先选择上级单位"); + this.customerOrg.oprStatus = '' return; } this.customerOrg.customerOrgRd.id = ""; @@ -486,6 +489,7 @@ export default { parentId: null, }; } + this.customerOrg.oprStatus = 'add' objCopy(this.customerOrg.customerOrgRd, this.form); this.customerOrg.customerOrgId = ""; @@ -516,8 +520,10 @@ export default { this.customerOrg.customerOrgRegisterList = [] this.customerOrg.contactPersonList = [] this.customerOrg.contactMethodList = [] - this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } }); + this.setData({ key: "customerOrg.customerOrgRd", value: { id: "" } }); this.$refs[formName].resetFields(); + this.customerOrg.oprStatus = '' + this.customerOrg.customerOrgId = '' } }) .catch((err) => { diff --git a/src/components/customerOrg/customerOrgRegister.vue b/src/components/customerOrg/customerOrgRegister.vue index d445a78..e52424e 100644 --- a/src/components/customerOrg/customerOrgRegister.vue +++ b/src/components/customerOrg/customerOrgRegister.vue @@ -98,7 +98,7 @@ export default { setOrgRegisterState(IsComplete) { if (!this.customerOrg.customerOrgId || !this.customerOrgRegisterId) { console.log(this.customerOrg.customerOrgId, this.customerOrgRegisterId); - alert("请选中要操作的体检次数"); + this.$message.warning("请选中要操作的体检次数"); return; } //console.log(`/api/app/customer-org-register/${this.customerOrgRegisterId}/state`) diff --git a/src/components/customerOrg/customerOrgTree.vue b/src/components/customerOrg/customerOrgTree.vue index 702ef17..e9e5ecb 100644 --- a/src/components/customerOrg/customerOrgTree.vue +++ b/src/components/customerOrg/customerOrgTree.vue @@ -119,9 +119,11 @@ export default { //点击树节点 treeclick(data) { //this.$message.success(data.id + " 查询单位详情、体检次数、联系人等信息 " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1 + this.customerOrg.oprStatus = 'edit' this.customerOrg.customerOrgId = data.id; this.getCustomerOrgRd(data.id); + //只有单位才有体检次数登记,部门无 let firstId = data.id //一级单位ID if(data.parentId){ diff --git a/src/components/patientRegister/Camera.vue b/src/components/patientRegister/Camera.vue index b6327c6..eee055a 100644 --- a/src/components/patientRegister/Camera.vue +++ b/src/components/patientRegister/Camera.vue @@ -165,7 +165,7 @@ export default { this.videoHeight ); // 获取图片base64链接,展示到界面中的也是这个url地址 - this.imgSrc = this.thisCancas.toDataURL("image/png"); + this.imgSrc = this.thisCancas.toDataURL("image/jpeg"); // jpeg 格式比 png 要小一些 console.log('this.imgSrc',this.imgSrc); }, // 上传照相机图片 diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 6846d7c..70e78d2 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -336,7 +336,7 @@ 复制新增
- 保存 + 保存
检验单申请 @@ -375,22 +375,22 @@
- 查找:  条码号 + 查找:  条码号
- 档案号 + 档案号
- 姓名 + 姓名
- 手机号 + 手机号
@@ -623,7 +623,7 @@ import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter, parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; import LisRequest from "./LisRequest.vue"; @@ -913,13 +913,13 @@ export default { //分组改变时触发 changeCustomerOrgGroupId() { this.patientRegister.customerOrgGroupChange++; - if (this.form.id) this.Onsubmit('form', false); + if (this.form.id) this.btnSubmit('form', false); }, //套餐改变时触发 changeMedicalPackageId() { this.patientRegister.medicalPackageChange++; - if (this.form.id) this.Onsubmit('form', false); + if (this.form.id) this.btnSubmit('form', false); }, //根据姓名,身份证号 查询档案信息,用于判断人员多次体检 @@ -1045,7 +1045,7 @@ export default { }, //提交 - Onsubmit(formName, msgTip) { + btnSubmit(formName, msgTip) { this.$refs[formName].validate((valid) => { if (valid) { //赋值 @@ -1095,14 +1095,17 @@ export default { objCopy(res.data, this.form); // this.patientRegister.prList.push(res.data); //列表添加记录 - this.patientRegister.patientRegisterId = res.data.id; + this.patientRegister.patientRegisterId = res.data.id; + this.patientRegister.patientRegisterRd = res.data; + + //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) + this.patientRegister.prList.push(res.data) + + //触发已选组合项目保存 this.patientRegister.patientRegisterAbs.forEach(e => { e.patientRegisterId = res.data.id; return e; }); - this.patientRegister.patientRegisterRd = res.data; - - this.patientRegister.query.times++; this.patientRegister.saveTimes++; } } @@ -1115,7 +1118,11 @@ export default { if (msgTip) this.$message.success("更新 操作成功"); //一般读身份证照片时,会出现这种情况 if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo); - this.patientRegister.query.times++; + //this.patientRegister.query.times++; 不在触发列表查询(换成局部刷新) + let lfind = arrayExistObj(this.patientRegister.prList, 'id', this.form.id) + if(lfind > - 1) objCopy(this.form,this.patientRegister.prList[lfind]) + + //this.patientRegister.saveTimes++; //更新保存时,无需触发组合项目保存 } }); @@ -1485,4 +1492,7 @@ export default { .query { margin-left: 10px; } +.querySpan { + margin-right: 2px; +} diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index a9fa2c3..b5e9bbc 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -896,7 +896,7 @@ export default { //查询 async Query() { this.patientRegister.prList = []; - let body = {}; + let body = {maxResultCount:500}; console.log(`this.patientRegister.query`, this.patientRegister.query); if (this.patientRegister.query.customerOrgFlag) { diff --git a/src/store/index.js b/src/store/index.js index 606749f..1c3bbc4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -29,6 +29,7 @@ export default new Vuex.Store({ }, customerOrg: { //体检单位设置 + oprStatus:'',//空,add,edit 三种状态 customerOrgTree: [], //体检单位列表 defaultExpandedKeys:[], //当前选中树的节点 treeCurrentNodekey:'', //当前选中树的节点 diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js index d41563e..7202ca1 100644 --- a/src/utlis/proFunc.js +++ b/src/utlis/proFunc.js @@ -15,13 +15,13 @@ function tcdate(date) { }; exports.tcdate = tcdate; -//json 对像赋值 只从 from 对象 赋值 to 中有的 key 项 add by pengjun -function objCopy(from, to) { - if (from && to) { - let keys = Object.keys(to); +//json 对像赋值 只从 provide/提供 对象 赋值到 receive/接收 中有的 key 项 add by pengjun receive provide +function objCopy(provide, receive) { + if (provide && receive) { + let keys = Object.keys(receive); for (let key in keys) { - if (from[keys[key]] !== undefined) { - to[keys[key]] = from[keys[key]]; + if (provide[keys[key]] !== undefined) { + receive[keys[key]] = provide[keys[key]]; } } }