编辑药品tab页面可以不显示数据了 新增之后勾选框还存在

This commit is contained in:
2025-11-18 10:36:15 +08:00
parent afa904bd83
commit 5bf7ab481f
2 changed files with 8 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ public class GenController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo genList(GenTable genTable) { public TableDataInfo genList(GenTable genTable) {
startPage(); startPage();
List<GenTable> list = genTableService.selectGenTableList(genTable); List<GenTable> list = genTableService.selectGenTableList(genTable);
return getDataTable(list); return getDataTable(list);
} }

View File

@@ -854,8 +854,10 @@ function edit() {
statusRestrictedOptions.value = props.statusRestrictedOptions; statusRestrictedOptions.value = props.statusRestrictedOptions;
partAttributeEnumOptions.value = props.partAttributeEnumOptions; partAttributeEnumOptions.value = props.partAttributeEnumOptions;
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions; tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
antibioticForm.value.antibioticCode = form.value.antibioticCode; // 当后端返回null或'3'时设置为undefined使select显示为空
antibioticForm.value.restrictedEnum = form.value.restrictedEnum; antibioticForm.value.antibioticCode = form.value.antibioticCode === null || form.value.antibioticCode === '3' ? undefined : form.value.antibioticCode;
// 当后端返回null、'4'或4时设置为undefined使select显示为空
antibioticForm.value.restrictedEnum = form.value.restrictedEnum === null || form.value.restrictedEnum === '4' || form.value.restrictedEnum === 4 ? undefined : form.value.restrictedEnum;
antibioticForm.value.dose = form.value.dose; antibioticForm.value.dose = form.value.dose;
antibioticForm.value.maxUnit = form.value.maxUnit; antibioticForm.value.maxUnit = form.value.maxUnit;
antibioticForm.value.minRateCode = form.value.maxRateCode; antibioticForm.value.minRateCode = form.value.maxRateCode;
@@ -970,8 +972,9 @@ function submitForm() {
proxy.$refs['medicationRef'].validate((valid) => { proxy.$refs['medicationRef'].validate((valid) => {
if (valid) { if (valid) {
if (form.value.activeFlag == true) { if (form.value.activeFlag == true) {
form.value.antibioticCode = antibioticForm.value.antibioticCode; // 当用户清空选择时,抗生素分类设置为'3',权限级别设置为'4'
form.value.restrictedEnum = antibioticForm.value.restrictedEnum; form.value.antibioticCode = antibioticForm.value.antibioticCode === undefined ? '3' : antibioticForm.value.antibioticCode;
form.value.restrictedEnum = antibioticForm.value.restrictedEnum === undefined ? '4' : antibioticForm.value.restrictedEnum;
// form.value.dose = antibioticForm.value.dose; // form.value.dose = antibioticForm.value.dose;
// form.value.maxUnit = antibioticForm.value.maxUnit; // form.value.maxUnit = antibioticForm.value.maxUnit;
form.value.minRateCode = antibioticForm.value.minRateCode; form.value.minRateCode = antibioticForm.value.minRateCode;