From c6ac0b4197a39a7e00867c49aaf614d676016531 Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Mon, 6 Feb 2023 15:05:53 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=A2=9E=E5=8A=A0=E4=B8=B4=E6=97=B6?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E6=8F=90=E4=BA=A4=E9=80=BB?= =?UTF-8?q?=E8=BE=91=202.=20=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3=203.=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=BC=96=E8=BE=91=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/patient.js | 12 +- .../FormComponents/CustomForm/index.vue | 41 ++ ...45\215\267\350\260\203\346\237\245JSON.js" | 462 +++++++++++++++++- src/styles/vab.scss | 14 +- .../audit-detail/components/publicDialog.vue | 7 +- src/views/screening/DraftBox.vue | 89 +++- .../screening/components/ConfigForms.vue | 95 ++-- src/views/screening/components/FormTab.vue | 98 ++-- src/views/screening/components/mixin.js | 15 +- 9 files changed, 735 insertions(+), 98 deletions(-) diff --git a/src/api/patient.js b/src/api/patient.js index 90b6f6c..b12697e 100644 --- a/src/api/patient.js +++ b/src/api/patient.js @@ -43,6 +43,14 @@ export function addPatient(data = {}, type = "") { }) } +// 删除草稿 +export function deletePatient(data) { + return request({ + url: `/disease-data/data/patient/${data}`, + method: "delete", + }) +} + /* 患者数据详情 */ export function getPatientDetail(params = {}) { return request({ @@ -137,10 +145,6 @@ export function getZsyzyPatientInfo(params = {}) { }) } - - - - // 急性胰腺炎-评分表 // 评分表新增修改 diff --git a/src/components/FormComponents/CustomForm/index.vue b/src/components/FormComponents/CustomForm/index.vue index b4a254d..c360c6d 100644 --- a/src/components/FormComponents/CustomForm/index.vue +++ b/src/components/FormComponents/CustomForm/index.vue @@ -269,6 +269,47 @@ export default { this.loading = false }) }, + // 临时保存 + temporarySave() { + //? 只传数据 + this.$refs.form.validate((valid) => { + if (valid) { + const data = {} + const form = this.deepClone(this.form) + Object.keys(form).forEach((k) => { + if (form[k] === undefined) { + data[k] = "" + return false + } + if (k === "YZZKJC") { + // 牙周表格 + data[k] = JSON.stringify(form[k]) + } else if ( + Array.isArray(form[k]) && + form[k][0] && + isObject(form[k][0]) + ) { + // 子表单 去除前端添加的显隐辅助数据($_)和 删除按钮辅助数据(showDelBtn) + data[k] = form[k].map((item) => { + for (let key in item) { + if (["$_keyField", "$_hidden", "showDelBtn"].includes(key)) + delete item[key] + } + return item + }) + } else { + data[k] = form[k] + } + }) + this.$emit("temporaryConfirm", data, () => { + // 完成之后的回调 + this.loading = false + }) + } else { + this.loading = false + } + }) + }, handleConfirm() { this.loading = true this.$refs.form.validate((valid) => { diff --git "a/src/components/FormComponents/CustomForm/\351\227\256\345\215\267\350\260\203\346\237\245JSON.js" "b/src/components/FormComponents/CustomForm/\351\227\256\345\215\267\350\260\203\346\237\245JSON.js" index 0cb8ded..014866c 100644 --- "a/src/components/FormComponents/CustomForm/\351\227\256\345\215\267\350\260\203\346\237\245JSON.js" +++ "b/src/components/FormComponents/CustomForm/\351\227\256\345\215\267\350\260\203\346\237\245JSON.js" @@ -1,2 +1,460 @@ -let formJson = -{column:[],labelPosition:'left',labelSuffix:':',labelWidth:180,gutter:0,menuBtn:true,submitBtn:true,submitText:'下一步',emptyBtn:false,emptyText:'上一步',nextTabBtn:true,nextTabText:'下一页',menuPosition:'center',prevBtn:true,group:[{label:'个人信息',prop:'1669708504829_2651',arrow:true,collapse:true,display:true,labelWidth:8,column:[{type:'input',display:true,importantField:false,styles:{},prop:'name',label:'姓名',fieldType:'varchar',fieldLength:'15',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,lg:12,span:12,width:24,xs:12,sm:12,md:12,readonly:false,required:true,rules:[{required:true,message:'姓名必须填写'}]},{type:'date',display:true,importantField:false,styles:{},format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',prop:'survey_time',dicType:'',label:'调查时间',fieldType:'datetime',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'调查时间必须填写'}],personalRequired:0},{type:'input',display:true,importantField:false,styles:{},prop:'phone',label:'手机号',fieldType:'varchar',fieldLength:'15',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'手机号必须填写'},{validator:function checkTel(rule, value, callback) {\n if (!value) {\n return callback(new Error(\"请输入手机号\"));\n }\n\n var reg = /^1[3,4,5,6,7,8,9][0-9]{9}$/;\n reg.test(value);\n\n if (!reg.test(value)) {\n callback(new Error(\"请输入正确的手机号\"));\n } else {\n callback();\n }\n},trigger:'change'}],pattern:'checkTel'},{type:'input',display:true,importantField:false,styles:{},prop:'link_phone',label:'联系号码',fieldType:'varchar',fieldLength:'128',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,width:24,rules:[{required:true,message:'联系号码必须填写'}],required:true},{type:'date',display:true,importantField:false,styles:{},prop:'birthday',label:'出生日期',fieldType:'date',fieldLength:'',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd',dicType:'',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'出生日期必须填写'}],disabled:true,value:' '},{type:'input',display:true,importantField:false,styles:{},prop:'age',label:'年龄',fieldType:'int',fieldLength:'11',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:12,xs:12,sm:12,md:12,lg:12,required:true,rules:[{required:true,message:'年龄必须填写'}],readonly:false,disabled:true},{type:'radio',display:true,importantField:false,styles:{},autoRequired:0,personalRequired:0,prop:'sex',dicData:[{label:'女',value:'2',id:'1595351964546281474',parentId:''},{label:'男',value:'1',id:'1595351940139626497',parentId:''}],dynamicshSet:[],dicType:'d-sex',props:{label:'label',value:'value'},label:'性别',fieldType:'varchar',fieldLength:'20',tableName:'患者信息',tableCode:'gas_patient_info',tableId:'1595347991491833857',notFilter:false,cType:'',subfield:false,span:24,xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'请选择性别'}]}]},{label:'家族史',prop:'1669708827460_97007',arrow:true,collapse:true,display:true,labelWidth:8,column:[{type:'radio',display:true,importantField:false,styles:{},prop:'is_first_degree',label:'一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[{value:'1',target:'family_count'},{value:'1',target:'min_age'}],dicType:'d-sf',props:{label:'label',value:'value'},fieldType:'tinyint',fieldLength:'2',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'请选择一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况'}]},{type:'input',display:true,importantField:false,styles:{},prop:'family_count',label:'数量',fieldType:'int',fieldLength:'11',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,span:24,labelSuffix:'(1)',xs:24,sm:24,md:24,lg:24,required:true,rules:[{required:true,message:'数量必须填写'}]},{type:'input',display:true,importantField:false,styles:{},prop:'min_age',label:'诊断时最小年龄',fieldType:'int',fieldLength:'11',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,labelSuffix:'(2)',xs:24,sm:24,md:24,lg:24,width:24,rules:[{required:true,message:'诊断时最小年龄必须填写'}],required:true},{type:'radio',display:true,importantField:false,styles:{},prop:'is_other_sickness',label:'一级亲属罹患其他恶性肿瘤情况',fieldType:'tinyint',fieldLength:'2',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[{value:'1',target:'family_other_count'},{value:'1',target:'other_sickness'}],dicType:'d-sf',props:{label:'label',value:'value'},tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,xs:24,sm:24,md:24,lg:24,span:24,width:24,rules:[{required:true,message:'请选择一级亲属罹患其他恶性肿瘤情况'}],required:true,autoRequired:0,personalRequired:0,labelSuffix:'2'},{type:'input',display:true,importantField:false,styles:{},prop:'family_other_count',label:'一级亲属罹患其他恶性肿瘤数量',fieldType:'int',fieldLength:'11',dicData:[{label:'是',value:'1',id:'1595347527757000705',parentId:''},{label:'否',value:'0',id:'1595347502595371010',parentId:''}],dynamicshSet:[],dicOption:'static',dicType:'',props:{label:'label',value:'value'},tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,lg:24,xs:24,sm:24,md:24,autoRequired:0,personalRequired:0,span:24,width:24,labelSuffix:'(1)',required:true,rules:[{required:true,message:'一级亲属罹患其他恶性肿瘤数量必须填写'}]},{type:'input',display:true,importantField:false,styles:{},prop:'other_sickness',label:'一级亲属罹患其它恶性肿瘤名称',fieldType:'varchar',fieldLength:'255',tableName:'问卷调查',tableCode:'gas_question',tableId:'1597462007689347074',notFilter:false,cType:'',subfield:false,autoRequired:0,personalRequired:0,span:24,labelSuffix:'(2)',xs:24,sm:24,md:24,lg:24,width:24,rules:[{required:true,message:'一级亲属罹患其它恶性肿瘤名称必须填写'}],required:true}]}]} +let formJson = { + column: [], + labelPosition: "left", + labelSuffix: ":", + labelWidth: 180, + gutter: 0, + menuBtn: true, + submitBtn: true, + submitText: "下一步", + emptyBtn: false, + emptyText: "上一步", + nextTabBtn: true, + nextTabText: "下一页", + menuPosition: "center", + prevBtn: true, + group: [ + { + label: "个人信息", + prop: "1669708504829_2651", + arrow: true, + collapse: true, + display: true, + labelWidth: 8, + column: [ + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "name", + label: "姓名", + fieldType: "varchar", + fieldLength: "15", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + autoRequired: 0, + personalRequired: 0, + lg: 12, + span: 12, + width: 24, + xs: 12, + sm: 12, + md: 12, + readonly: false, + required: true, + rules: [{ required: true, message: "姓名必须填写" }], + }, + { + type: "date", + display: true, + importantField: false, + styles: {}, + format: "yyyy-MM-dd", + valueFormat: "yyyy-MM-dd", + prop: "survey_time", + dicType: "", + label: "调查时间", + fieldType: "datetime", + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + span: 12, + xs: 12, + sm: 12, + md: 12, + lg: 12, + required: true, + rules: [{ required: true, message: "调查时间必须填写" }], + personalRequired: 0, + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "phone", + label: "手机号", + fieldType: "varchar", + fieldLength: "15", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + span: 12, + xs: 12, + sm: 12, + md: 12, + lg: 12, + required: true, + rules: [], + pattern: "checkTel", + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "link_phone", + label: "联系号码", + fieldType: "varchar", + fieldLength: "128", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + span: 12, + xs: 12, + sm: 12, + md: 12, + lg: 12, + width: 24, + rules: [{ required: true, message: "联系号码必须填写" }], + required: true, + }, + { + type: "date", + display: true, + importantField: false, + styles: {}, + prop: "birthday", + label: "出生日期", + fieldType: "date", + fieldLength: "", + format: "yyyy-MM-dd", + valueFormat: "yyyy-MM-dd", + dicType: "", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + span: 12, + xs: 12, + sm: 12, + md: 12, + lg: 12, + required: true, + rules: [{ required: true, message: "出生日期必须填写" }], + disabled: true, + value: " ", + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "age", + label: "年龄", + fieldType: "int", + fieldLength: "11", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + span: 12, + xs: 12, + sm: 12, + md: 12, + lg: 12, + required: true, + rules: [{ required: true, message: "年龄必须填写" }], + readonly: false, + disabled: true, + }, + { + type: "radio", + display: true, + importantField: false, + styles: {}, + autoRequired: 0, + personalRequired: 0, + prop: "sex", + dicData: [ + { + label: "女", + value: "2", + id: "1595351964546281474", + parentId: "", + }, + { + label: "男", + value: "1", + id: "1595351940139626497", + parentId: "", + }, + ], + dynamicshSet: [], + dicType: "d-sex", + props: { label: "label", value: "value" }, + label: "性别", + fieldType: "varchar", + fieldLength: "20", + tableName: "患者信息", + tableCode: "gas_patient_info", + tableId: "1595347991491833857", + notFilter: false, + cType: "", + subfield: false, + span: 24, + xs: 24, + sm: 24, + md: 24, + lg: 24, + required: true, + rules: [{ required: true, message: "请选择性别" }], + }, + ], + }, + { + label: "家族史", + prop: "1669708827460_97007", + arrow: true, + collapse: true, + display: true, + labelWidth: 8, + column: [ + { + type: "radio", + display: true, + importantField: false, + styles: {}, + prop: "is_first_degree", + label: "一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况", + dicData: [ + { + label: "是", + value: "1", + id: "1595347527757000705", + parentId: "", + }, + { + label: "否", + value: "0", + id: "1595347502595371010", + parentId: "", + }, + ], + dynamicshSet: [ + { value: "1", target: "family_count" }, + { value: "1", target: "min_age" }, + ], + dicType: "d-sf", + props: { label: "label", value: "value" }, + fieldType: "tinyint", + fieldLength: "2", + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + autoRequired: 0, + personalRequired: 0, + span: 24, + xs: 24, + sm: 24, + md: 24, + lg: 24, + required: true, + rules: [ + { + required: true, + message: "请选择一级亲属(父母、子女、兄弟姐妹)罹患胃癌情况", + }, + ], + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "family_count", + label: "数量", + fieldType: "int", + fieldLength: "11", + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + span: 24, + labelSuffix: "(1)", + xs: 24, + sm: 24, + md: 24, + lg: 24, + required: true, + rules: [{ required: true, message: "数量必须填写" }], + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "min_age", + label: "诊断时最小年龄", + fieldType: "int", + fieldLength: "11", + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + autoRequired: 0, + personalRequired: 0, + span: 24, + labelSuffix: "(2)", + xs: 24, + sm: 24, + md: 24, + lg: 24, + width: 24, + rules: [{ required: true, message: "诊断时最小年龄必须填写" }], + required: true, + }, + { + type: "radio", + display: true, + importantField: false, + styles: {}, + prop: "is_other_sickness", + label: "一级亲属罹患其他恶性肿瘤情况", + fieldType: "tinyint", + fieldLength: "2", + dicData: [ + { + label: "是", + value: "1", + id: "1595347527757000705", + parentId: "", + }, + { + label: "否", + value: "0", + id: "1595347502595371010", + parentId: "", + }, + ], + dynamicshSet: [ + { value: "1", target: "family_other_count" }, + { value: "1", target: "other_sickness" }, + ], + dicType: "d-sf", + props: { label: "label", value: "value" }, + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + xs: 24, + sm: 24, + md: 24, + lg: 24, + span: 24, + width: 24, + rules: [ + { required: true, message: "请选择一级亲属罹患其他恶性肿瘤情况" }, + ], + required: true, + autoRequired: 0, + personalRequired: 0, + labelSuffix: "2", + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "family_other_count", + label: "一级亲属罹患其他恶性肿瘤数量", + fieldType: "int", + fieldLength: "11", + dicData: [ + { + label: "是", + value: "1", + id: "1595347527757000705", + parentId: "", + }, + { + label: "否", + value: "0", + id: "1595347502595371010", + parentId: "", + }, + ], + dynamicshSet: [], + dicOption: "static", + dicType: "", + props: { label: "label", value: "value" }, + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + lg: 24, + xs: 24, + sm: 24, + md: 24, + autoRequired: 0, + personalRequired: 0, + span: 24, + width: 24, + labelSuffix: "(1)", + required: true, + rules: [ + { required: true, message: "一级亲属罹患其他恶性肿瘤数量必须填写" }, + ], + }, + { + type: "input", + display: true, + importantField: false, + styles: {}, + prop: "other_sickness", + label: "一级亲属罹患其它恶性肿瘤名称", + fieldType: "varchar", + fieldLength: "255", + tableName: "问卷调查", + tableCode: "gas_question", + tableId: "1597462007689347074", + notFilter: false, + cType: "", + subfield: false, + autoRequired: 0, + personalRequired: 0, + span: 24, + labelSuffix: "(2)", + xs: 24, + sm: 24, + md: 24, + lg: 24, + width: 24, + rules: [ + { required: true, message: "一级亲属罹患其它恶性肿瘤名称必须填写" }, + ], + required: true, + }, + ], + }, + ], +} diff --git a/src/styles/vab.scss b/src/styles/vab.scss index a4ff921..6449d60 100644 --- a/src/styles/vab.scss +++ b/src/styles/vab.scss @@ -213,19 +213,21 @@ html { text-align: center; white-space: nowrap; } - .is-background{ - button,.el-pager li{ + .is-background { + button, + .el-pager li { border-radius: 6px !important; } - button,.el-pager li:not(.active){ - border: 1px solid #D9D9D9; + button, + .el-pager li:not(.active) { + border: 1px solid #d9d9d9; background: transparent !important; } - .el-input__inner{ + .el-input__inner { border-radius: 6px !important; } } - + /* 分页结束 */ /* 菜单开始 */ diff --git a/src/views/audit-detail/components/publicDialog.vue b/src/views/audit-detail/components/publicDialog.vue index bb3090d..6cd73ac 100644 --- a/src/views/audit-detail/components/publicDialog.vue +++ b/src/views/audit-detail/components/publicDialog.vue @@ -7,7 +7,7 @@ show-close @closed="cancelSubmit" :close-on-click-modal="false" - :show-close="false" + :show-close="showClose" > @@ -19,6 +19,11 @@ export default { data() { return { dialogVisible: false, loading: false } }, + props: { + showClose: { + default: false, + }, + }, watch: {}, mounted() {}, methods: { diff --git a/src/views/screening/DraftBox.vue b/src/views/screening/DraftBox.vue index 08e7ca8..40f55ef 100644 --- a/src/views/screening/DraftBox.vue +++ b/src/views/screening/DraftBox.vue @@ -1,37 +1,56 @@ diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue index 983f837..403ebdc 100644 --- a/src/views/screening/components/ConfigForms.vue +++ b/src/views/screening/components/ConfigForms.vue @@ -1,6 +1,12 @@