From ef47f5e4541490b2939719f1dba1b6cc9b5b0c3c Mon Sep 17 00:00:00 2001
From: pengjun <158915633@qq.com>
Date: Thu, 23 May 2024 12:16:57 +0800
Subject: [PATCH] occ
---
src/components/occDisease/OccDisease.vue | 31 ++--
.../occDisease/OccDiseaseConclusion.vue | 167 +-----------------
2 files changed, 26 insertions(+), 172 deletions(-)
diff --git a/src/components/occDisease/OccDisease.vue b/src/components/occDisease/OccDisease.vue
index 3d0cbee..610acec 100644
--- a/src/components/occDisease/OccDisease.vue
+++ b/src/components/occDisease/OccDisease.vue
@@ -111,7 +111,7 @@ export default {
postapi('/api/app/OccupationalDisease/GetOccupationalDiseaseWithDetailByPatientRegisterId', { patientRegisterId })
.then(res => {
if (res.code > -1) {
- this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease'])||{patientRegisterId}
+ this.dataTransOpts.tableS.patient_occupational_disease = deepCopy(res.data['patientOccupationalDisease']) || { patientRegisterId }
this.dataTransOpts.tableM.patient_poison = deepCopy(res.data['patientPoisonDtos'])
this.dataTransOpts.tableM.patient_occupational_history = deepCopy(res.data['patientOccupationalHistoryDtos'])
this.dataTransOpts.tableM.patient_symptom = deepCopy(res.data['patientSymptomDtos'])
@@ -132,10 +132,10 @@ export default {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
- }).then(() => {
+ }).then(() => {
return postapi('/api/app/OccupationalDisease/DeleteOccupationalDiseaseWithDetail', { patientRegisterId: this.dataTransOpts.tableS.patient_register.id })
}).then(res => {
- if(res && res.code > -1){
+ if (res && res.code > -1) {
this.dialogWin.OccDisease = false
}
}).catch((err) => {
@@ -146,7 +146,7 @@ export default {
},
// 点击确定
- btnOk() {
+ btnOk() {
let body = {
patientRegisterId: this.dataTransOpts.tableS.patient_register.id,
patientOccupationalDisease: this.dataTransOpts.tableS.patient_occupational_disease,
@@ -155,15 +155,20 @@ export default {
patientSymptoms: this.dataTransOpts.tableM.patient_symptom
}
- postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body).then(res => {
- if (res.code > -1) {
- this.$message.success({ showClose: true, message: "操作成功!" })
- this.dataTransOpts.plus.OccDisease++
- } else {
- this.$message.warning({ showClose: true, message: res.message })
- }
- })
-
+ postapi('/api/app/OccupationalDisease/CreateOccupationalDiseaseWithDetail', body)
+ .then(res => {
+ if (res.code > -1) {
+ this.$message.success({ showClose: true, message: "操作成功!" })
+ this.dataTransOpts.tableS.patient_occupational_disease.patientRegisterId = this.dataTransOpts.tableS.patient_register.id
+ return postapi('/api/app/OccupationalDisease/UpdateOccupationalDiseaseInspectionConclusion', this.dataTransOpts.tableS.patient_occupational_disease)
+ } else {
+ this.$message.warning({ showClose: true, message: res.message })
+ }
+ }).then(res => {
+ if(res && res.code > -1){
+ this.dataTransOpts.plus.OccDisease++
+ }
+ })
},
// 点击确定
diff --git a/src/components/occDisease/OccDiseaseConclusion.vue b/src/components/occDisease/OccDiseaseConclusion.vue
index 0221ad0..05dd55b 100644
--- a/src/components/occDisease/OccDiseaseConclusion.vue
+++ b/src/components/occDisease/OccDiseaseConclusion.vue
@@ -6,21 +6,21 @@
建议: |
- |
- |
+ |
+ |
| 非职业性异常: |
建议: |
- |
- |
+ |
+ |
处理意见:
-
+
@@ -39,45 +39,18 @@ export default {
privs: [] // 页面权限
},
- form: { //联系人表单信息
- id: "",
- customerOrgId: '',
- creationTime: null,
- lastModificationTime: null,
- creatorName: "",
- lastModifierName: "",
- displayName: "",
- title: "",
- remark: "",
- },
- formInit: {},
- contactMethodList: [], //联系方式(可修改)
-
-
- Methodtypes: [
- //{ value: '',label: '所有订单状态' },
- { value: "0", label: "电话" },
- { value: "1", label: "邮箱" },
- ],
-
- rules: {
- displayName: [
- { required: true, message: "请输入名称", trigger: "blur" },
- ],
- },
};
},
created() {
//获取用户当前页面的权限
let userPriv = window.sessionStorage.getItem('userPriv')
- if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
- this.formInit = deepCopy(this.form)
+ if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
},
//挂载完成
mounted() {
- this.getFormData(this.dataTransOpts.tableS.contact_person.id)
+
},
computed: {
@@ -86,125 +59,7 @@ export default {
methods: {
moment, checkPagePriv,
-
- // 获取表单数据
- getFormData(id) {
- if (!id) {
- this.form = deepCopy(this.formInit)
- this.form.customerOrgId = this.dataTransOpts.tableS.customer_org.id
- this.contactMethodList = []
- return
- }
- getapi(`/api/app/contact-person/${id}`)
- .then(res => {
- if (res.code != -1) {
- this.form = deepCopy(res.data)
- this.getContactMethodList(res.data.id)
- }
- })
-
- },
-
- //获取联系方式列表
- //api/app/contact-method/in-contact-person-id?ContactPersonId=3a0c08ad-4304-138b-d9e6-a7338739dfc4' \
- getContactMethodList(ContactPersonId) {
- if (!ContactPersonId) {
- this.contactMethodList = []
- return
- }
- getapi("/api/app/contact-method/in-contact-person-id", {
- ContactPersonId,
- }).then(res => {
- //console.log('res.data',res.data)
- if (res.code != -1) this.contactMethodList = res.data;
- });
- },
-
- //删除联系方式行
- deleteRow(index) {
- this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", {
- confirmButtonText: "是",
- cancelButtonText: "否",
- type: "warning",
- }).then(() => {
- this.contactMethodList.splice(index, 1);
- //this.submit('form');
- }).catch((err) => {
- if (err == 'cancel') {
- this.$message.info({ showClose: true, message: "已取消删除" });
- }
- });
- },
-
- //联系人信息提交
- submit(formName) {
- let body = {
- customerOrgId: "",
- displayName: "",
- title: "",
- remark: "",
- };
- this.$refs[formName].validate((valid, fields) => {
- if (!valid) {
- this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
- return false;
- }
-
- objCopy(this.form, body);
- let contactMethod = {
- contactPersonId: this.form.id,
- details: this.contactMethodList
- }
-
- console.log("body,contactMethod", body, contactMethod);
-
- if (!this.form.id) {
- postapi("/api/app/contact-person", body)
- .then((res) => {
- //console.log('api/app/contact-person')
- if (res.code != -1) {
- this.form = res.data
- this.dataTransOpts.tableS.contact_person.id = res.data.id
- this.refFunc(['curChooseRow'], res.data)
- contactMethod.contactPersonId = res.data.id
- return postapi('/api/app/contactmethod/createmany', contactMethod);
- }
- })
- .then((res) => {
- //console.log('api/app/contact-method/many')
- if (res && res.code != -1) {
- console.log("操作成功!");
- this.dialogWin.ContactPersonEdit = false
- }
- });
- } else {
- putapi(`/api/app/contact-person/${this.form.id}`, body)
- .then((res) => {
- if (res.code != -1) {
- this.refFunc(['curChooseRow'], this.form)
- return postapi('/api/app/contactmethod/createmany', contactMethod);
- }
- })
- .then((res) => {
- //console.log('api/app/contact-method/many')
- //this.getContactPersonList(this.customerOrgId); //改成局部刷新
- if (res && res.code != -1) {
- console.log("操作成功!");
- this.dialogWin.ContactPersonEdit = false
- }
- });
- }
- })
- },
-
- //新增联系方式
- addMethod() {
- this.contactMethodList.push({
- contactMethodValue: "",
- contactMethodType: "0",
- contactPersonId: this.form.id,
- });
- },
+
},
@@ -218,12 +73,6 @@ export default {
}
},
- // 'customerOrgId' (newVal,oldVal){
- // console.log('watch customerOrgId',newVal,oldVal)
- // if(newVal != oldVal){
- // this.personId = ''
- // }
- // }
},
};