病人信息修改

This commit is contained in:
菲菲
2025-02-28 09:58:37 +08:00
parent 1d533d1199
commit feceb40b0a
3 changed files with 20 additions and 6 deletions

View File

@@ -62,4 +62,13 @@ export function listPatient(query) {
})
}
// 修改
export function updatePatient(data) {
return request({
url: '/patientmanage/information/patient-information',
method: 'put',
data: data
})
}

View File

@@ -79,7 +79,7 @@
<el-col :span="8">
<el-form-item label="性别" prop="genderEnum">
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
<el-radio v-for="item in administrativegenderList" :key="item.value" :label="item.value" >
<el-radio v-for="item in administrativegenderList" :key="item.value" :label="item.value" @change="radiochange">
{{ item.info }}
</el-radio>
</el-radio-group>
@@ -223,10 +223,8 @@
<script setup name="patientManagement">
import pcas from 'china-division/dist/pcas-code.json';
import { ref, computed } from 'vue';
import familyRelationships from "./component/familyRelationships"
import {listmaritalstatus,listoccupationtype,lisadministrativegender,listbloodtypeabo,listbloodtypearh,listfamilyrelationshiptype,
addPatient,listPatient} from "./component/api"
import { RegionFullGroup } from 'v-region'
addPatient,listPatient,updatePatient} from "./component/api"
const showSearch = ref(true);
const open = ref(false);
@@ -306,6 +304,7 @@ function getList() {
});
lisadministrativegender().then(response => {
administrativegenderList.value = response.data
console.log("administrativegenderList.value",administrativegenderList.value)
});
listbloodtypeabo().then(response => {
bloodtypeaboList.value = response.data
@@ -325,7 +324,7 @@ function reset() {
nameJson: undefined,
menuName: undefined,
age: undefined,
genderEnum: undefined,
genderEnum: 0,
idType: undefined,
idCard: undefined,
phone: undefined,
@@ -384,6 +383,7 @@ function handleUpdate(row) {
const codes = convertAddressToCodes(selectedOptions1.value);
selectedOptions.value = codes.filter(code => code !== null);
isViewMode.value = false;
console.log("form.value12",form.value)
open.value = true;
title.value = "修改菜单";
}
@@ -414,12 +414,16 @@ function cancel() {
open.value = false;
reset();
}
function radiochange(){
console.log("form.value.eadio",form.value.genderEnum)
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["patientRef"].validate(valid => {
if (valid) {
if (form.value.busNo != undefined) {
updateMenu(form.value).then(response => {
console.log("form.value.up",form.value)
updatePatient(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();

View File

@@ -32,6 +32,7 @@ export default defineConfig (({mode, command}) => {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://localhost:18080/openhis',
// target: 'http://192.168.31.221:18080/openhis',
changeOrigin: true,
rewrite: p => p.replace (/^\/dev-api/, ''),
},