【bug】解决撤回按钮弹出多余信息
This commit is contained in:
@@ -198,9 +198,41 @@ const handleSave = async () => {
|
||||
await formRef.value.validate();
|
||||
}
|
||||
|
||||
// 模拟保存操作
|
||||
// 实际项目中应该调用API保存数据
|
||||
console.log('保存配置:', formData);
|
||||
// 将表单数据转换为系统配置格式
|
||||
const configData = [
|
||||
{ configKey: 'medicalRecordFee', configValue: formData.medicalRecordFee, configName: '病历本费用' },
|
||||
{ configKey: 'patientCardFee', configValue: formData.patientCardFee, configName: '就诊卡费' },
|
||||
{ configKey: 'medicalRecordFlag', configValue: formData.medicalRecordFlag ? '1' : '0', configName: '病历费入账标志' },
|
||||
{ configKey: 'isNightShift', configValue: formData.isNightShift ? '1' : '0', configName: '是否启用晚班' },
|
||||
{ configKey: 'patientCardFlag', configValue: formData.patientCardFlag ? '1' : '0', configName: '就诊卡记账标志' },
|
||||
{ configKey: 'morningStartTime', configValue: formData.morningStartTime, configName: '上午接诊起始时间' },
|
||||
{ configKey: 'autoGenerateOutpatientNo', configValue: formData.autoGenerateOutpatientNo ? '1' : '0', configName: '自动产生门诊号' },
|
||||
{ configKey: 'allowModifyOutpatientNo', configValue: formData.allowModifyOutpatientNo ? '1' : '0', configName: '建档时是否允许修改门诊号' },
|
||||
{ configKey: 'afternoonStartTime', configValue: formData.afternoonStartTime, configName: '下午起始时间' },
|
||||
{ configKey: 'eveningStartTime', configValue: formData.eveningStartTime, configName: '晚上起始时间' },
|
||||
{ configKey: 'registrationValidity', configValue: formData.registrationValidity, configName: '挂号有效期' },
|
||||
{ configKey: 'registrationDocumentMode', configValue: formData.registrationDocumentMode, configName: '挂号单据模式' },
|
||||
{ configKey: 'exemptFlag', configValue: formData.exemptFlag ? '1' : '0', configName: '减免标志' },
|
||||
{ configKey: 'consultationFlag', configValue: formData.consultationFlag ? '1' : '0', configName: '义诊标志' },
|
||||
{ configKey: 'enableHolidayFeeFloat', configValue: formData.enableHolidayFeeFloat ? '1' : '0', configName: '启用法定节假日挂号费浮动' },
|
||||
{ configKey: 'guardianAge', configValue: formData.guardianAge, configName: '监护人规定年龄' },
|
||||
{ configKey: 'enableDoubleScreen', configValue: formData.enableDoubleScreen ? '1' : '0', configName: '门诊挂号启用双屏' },
|
||||
{ configKey: 'optionalRegistrationType', configValue: formData.optionalRegistrationType ? '1' : '0', configName: '挂号类型可选择' },
|
||||
{ configKey: 'isPrint', configValue: formData.isPrint ? '1' : '0', configName: '是否打印挂号单' },
|
||||
];
|
||||
|
||||
// 调用系统配置API保存每个参数
|
||||
for (const config of configData) {
|
||||
// 先查询是否存在该配置
|
||||
const existingConfig = await getConfigKey(config.configKey);
|
||||
if (existingConfig.data) {
|
||||
// 如果存在则更新
|
||||
await updateConfig({ ...config, configId: existingConfig.data.configId });
|
||||
} else {
|
||||
// 如果不存在则新增
|
||||
await addConfig(config);
|
||||
}
|
||||
}
|
||||
|
||||
ElMessage.success('保存成功');
|
||||
} catch (error) {
|
||||
@@ -217,11 +249,11 @@ const handleClose = () => {
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.config-header {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.config-header .el-button {
|
||||
@@ -229,11 +261,11 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
.config-tabs {
|
||||
margin-top: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.config-form {
|
||||
padding: 20px;
|
||||
padding: 10px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@@ -241,7 +273,7 @@ const handleClose = () => {
|
||||
.form-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -257,14 +289,14 @@ const handleClose = () => {
|
||||
}
|
||||
|
||||
.config-form .el-form-item--medium .el-form-item__content {
|
||||
line-height: 32px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
padding: 20px;
|
||||
padding: 10px;
|
||||
color: #606266;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
line-height: 60px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user