72.系统管理--》基础数据-》科室管理
This commit is contained in:
27
add_organization_fields.sql
Normal file
27
add_organization_fields.sql
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-- 向adm_organization表添加缺失字段的SQL脚本
|
||||||
|
|
||||||
|
-- 添加register_flag字段(对应registerFlag属性)
|
||||||
|
ALTER TABLE "adm_organization"
|
||||||
|
ADD COLUMN "register_flag" int4;
|
||||||
|
|
||||||
|
-- 添加location字段
|
||||||
|
ALTER TABLE "adm_organization"
|
||||||
|
ADD COLUMN "location" varchar(255);
|
||||||
|
|
||||||
|
-- 添加intro字段
|
||||||
|
ALTER TABLE "adm_organization"
|
||||||
|
ADD COLUMN "intro" varchar(1000);
|
||||||
|
|
||||||
|
-- 添加remark字段
|
||||||
|
ALTER TABLE "adm_organization"
|
||||||
|
ADD COLUMN "remark" varchar(1000);
|
||||||
|
|
||||||
|
-- 添加字段注释
|
||||||
|
COMMENT ON COLUMN "adm_organization"."register_flag" IS '挂号标志';
|
||||||
|
COMMENT ON COLUMN "adm_organization"."location" IS '科室位置';
|
||||||
|
COMMENT ON COLUMN "adm_organization"."intro" IS '科室简介';
|
||||||
|
COMMENT ON COLUMN "adm_organization"."remark" IS '备注';
|
||||||
|
|
||||||
|
-- 设置register_flag默认值为0(不允许挂号)
|
||||||
|
ALTER TABLE "adm_organization"
|
||||||
|
ALTER COLUMN "register_flag" SET DEFAULT 0;
|
||||||
@@ -100,7 +100,18 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
|||||||
@Override
|
@Override
|
||||||
public R<?> getOrgInfo(Long orgId) {
|
public R<?> getOrgInfo(Long orgId) {
|
||||||
Organization organization = organizationService.getById(orgId);
|
Organization organization = organizationService.getById(orgId);
|
||||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
|
if (organization == null) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息"}));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为DTO对象,确保数据格式一致
|
||||||
|
OrganizationDto organizationDto = new OrganizationDto();
|
||||||
|
BeanUtils.copyProperties(organization, organizationDto);
|
||||||
|
organizationDto.setTypeEnum_dictText(EnumUtils.getInfoByValue(OrganizationType.class, organizationDto.getTypeEnum()));
|
||||||
|
organizationDto.setClassEnum_dictText(EnumUtils.getInfoByValue(OrganizationClass.class, organizationDto.getClassEnum()));
|
||||||
|
organizationDto.setActiveFlag_dictText(EnumUtils.getInfoByValue(AccountStatus.class, organizationDto.getActiveFlag()));
|
||||||
|
|
||||||
|
return R.ok(organizationDto, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -60,4 +60,16 @@ public class OrganizationDto {
|
|||||||
|
|
||||||
/** 子集合 */
|
/** 子集合 */
|
||||||
private List<OrganizationDto> children = new ArrayList<>();
|
private List<OrganizationDto> children = new ArrayList<>();
|
||||||
|
|
||||||
|
/** 挂号科室标记 */
|
||||||
|
private Integer registerFlag;
|
||||||
|
|
||||||
|
/** 科室位置 */
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
/** 科室简介 */
|
||||||
|
private String intro;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,4 +77,16 @@ public class Organization extends HisBaseEntity {
|
|||||||
|
|
||||||
/** 默认挂号医生 */
|
/** 默认挂号医生 */
|
||||||
private Long defDoctorId;
|
private Long defDoctorId;
|
||||||
|
|
||||||
|
/** 挂号科室标记 */
|
||||||
|
private Integer registerFlag;
|
||||||
|
|
||||||
|
/** 科室位置 */
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
/** 科室简介 */
|
||||||
|
private String intro;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,14 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.openhis.administration.mapper.OrganizationMapper">
|
<mapper namespace="com.openhis.administration.mapper.OrganizationMapper">
|
||||||
|
|
||||||
|
<!-- 自定义selectById方法,确保包含所有字段,包括新增字段 -->
|
||||||
|
<select id="selectById" parameterType="java.lang.Long" resultType="com.openhis.administration.domain.Organization">
|
||||||
|
SELECT id, bus_no, name, active_flag, type_enum, class_enum, py_str, wb_str,
|
||||||
|
yb_no, yb_name, caty, display_order, medins_id, medins_admdvs,
|
||||||
|
medins_type, medins_lv, def_doctor_id, create_by, create_time,
|
||||||
|
update_by, update_time, tenant_id, delete_flag,
|
||||||
|
register_flag, location, intro, remark
|
||||||
|
FROM adm_organization
|
||||||
|
WHERE id = #{id} AND delete_flag = '0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
38
openhis-ui-vue3/package-lock.json
generated
38
openhis-ui-vue3/package-lock.json
generated
@@ -910,7 +910,6 @@
|
|||||||
"version": "4.17.12",
|
"version": "4.17.12",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "*"
|
"@types/lodash": "*"
|
||||||
}
|
}
|
||||||
@@ -920,7 +919,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
|
||||||
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.20.0"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
@@ -2326,7 +2324,6 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
||||||
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
|
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
@@ -4218,8 +4215,7 @@
|
|||||||
"node_modules/jquery": {
|
"node_modules/jquery": {
|
||||||
"version": "3.7.1",
|
"version": "3.7.1",
|
||||||
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
|
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
|
||||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/js-base64": {
|
"node_modules/js-base64": {
|
||||||
"version": "2.6.4",
|
"version": "2.6.4",
|
||||||
@@ -4349,14 +4345,12 @@
|
|||||||
"node_modules/lodash": {
|
"node_modules/lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/lodash-es": {
|
"node_modules/lodash-es": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
|
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/lodash-unified": {
|
"node_modules/lodash-unified": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -5085,7 +5079,6 @@
|
|||||||
"url": "https://github.com/sponsors/ai"
|
"url": "https://github.com/sponsors/ai"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.8",
|
"nanoid": "^3.3.8",
|
||||||
"picocolors": "^1.1.1",
|
"picocolors": "^1.1.1",
|
||||||
@@ -5487,7 +5480,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
|
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
|
||||||
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
|
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "1.0.6"
|
"@types/estree": "1.0.6"
|
||||||
},
|
},
|
||||||
@@ -5652,7 +5644,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
|
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
|
||||||
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": ">=3.0.0 <4.0.0",
|
"chokidar": ">=3.0.0 <4.0.0",
|
||||||
"immutable": "^4.0.0",
|
"immutable": "^4.0.0",
|
||||||
@@ -5675,7 +5666,6 @@
|
|||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
|
||||||
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
|
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"preval.macro": "^4.0.0"
|
"preval.macro": "^4.0.0"
|
||||||
}
|
}
|
||||||
@@ -7033,7 +7023,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
|
||||||
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
|
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.19.3",
|
"esbuild": "^0.19.3",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
@@ -7127,7 +7116,6 @@
|
|||||||
"version": "3.5.13",
|
"version": "3.5.13",
|
||||||
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
|
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
|
||||||
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
|
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vue/compiler-dom": "3.5.13",
|
"@vue/compiler-dom": "3.5.13",
|
||||||
"@vue/compiler-sfc": "3.5.13",
|
"@vue/compiler-sfc": "3.5.13",
|
||||||
@@ -7906,7 +7894,6 @@
|
|||||||
"version": "4.17.12",
|
"version": "4.17.12",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/lodash": "*"
|
"@types/lodash": "*"
|
||||||
}
|
}
|
||||||
@@ -7916,7 +7903,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
|
||||||
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"undici-types": "~6.20.0"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
@@ -8971,8 +8957,7 @@
|
|||||||
"d3-selection": {
|
"d3-selection": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
|
||||||
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
|
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"d3-shape": {
|
"d3-shape": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.0",
|
||||||
@@ -10331,8 +10316,7 @@
|
|||||||
"jquery": {
|
"jquery": {
|
||||||
"version": "3.7.1",
|
"version": "3.7.1",
|
||||||
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
|
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
|
||||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"js-base64": {
|
"js-base64": {
|
||||||
"version": "2.6.4",
|
"version": "2.6.4",
|
||||||
@@ -10440,14 +10424,12 @@
|
|||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"lodash-es": {
|
"lodash-es": {
|
||||||
"version": "4.17.21",
|
"version": "4.17.21",
|
||||||
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
|
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"lodash-unified": {
|
"lodash-unified": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
@@ -10952,7 +10934,6 @@
|
|||||||
"version": "8.5.3",
|
"version": "8.5.3",
|
||||||
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz",
|
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz",
|
||||||
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
|
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"nanoid": "^3.3.8",
|
"nanoid": "^3.3.8",
|
||||||
"picocolors": "^1.1.1",
|
"picocolors": "^1.1.1",
|
||||||
@@ -11257,7 +11238,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
|
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
|
||||||
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
|
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@rollup/rollup-android-arm-eabi": "4.35.0",
|
"@rollup/rollup-android-arm-eabi": "4.35.0",
|
||||||
"@rollup/rollup-android-arm64": "4.35.0",
|
"@rollup/rollup-android-arm64": "4.35.0",
|
||||||
@@ -11371,7 +11351,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
|
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
|
||||||
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"chokidar": ">=3.0.0 <4.0.0",
|
"chokidar": ">=3.0.0 <4.0.0",
|
||||||
"immutable": "^4.0.0",
|
"immutable": "^4.0.0",
|
||||||
@@ -11388,7 +11367,6 @@
|
|||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
|
||||||
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
|
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"preval.macro": "^4.0.0"
|
"preval.macro": "^4.0.0"
|
||||||
}
|
}
|
||||||
@@ -12444,7 +12422,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
|
||||||
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
|
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"esbuild": "^0.19.3",
|
"esbuild": "^0.19.3",
|
||||||
"fsevents": "~2.3.3",
|
"fsevents": "~2.3.3",
|
||||||
@@ -12491,7 +12468,6 @@
|
|||||||
"version": "3.5.13",
|
"version": "3.5.13",
|
||||||
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
|
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
|
||||||
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
|
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
|
||||||
"peer": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"@vue/compiler-dom": "3.5.13",
|
"@vue/compiler-dom": "3.5.13",
|
||||||
"@vue/compiler-sfc": "3.5.13",
|
"@vue/compiler-sfc": "3.5.13",
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ export function deleteOrganization(orgIds) {
|
|||||||
|
|
||||||
export function getOrgDetail(id) {
|
export function getOrgDetail(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base-data-manage/organization/organization?orgId=' + id,
|
url: '/base-data-manage/organization/organization-getById',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: { orgId: id }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,14 @@
|
|||||||
<el-table-column label="科室分类" align="center" prop="classEnum_dictText" />
|
<el-table-column label="科室分类" align="center" prop="classEnum_dictText" />
|
||||||
<el-table-column label="医保码" align="center" prop="ybNo" />
|
<el-table-column label="医保码" align="center" prop="ybNo" />
|
||||||
<el-table-column label="医保名称" align="center" prop="ybName" />
|
<el-table-column label="医保名称" align="center" prop="ybName" />
|
||||||
|
<el-table-column label="挂号科室" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.registerFlag ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="科室位置" align="center" prop="location" show-overflow-tooltip />
|
||||||
|
<el-table-column label="科室简介" align="center" prop="intro" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="状态" align="center" prop="activeFlag_dictText" />
|
<el-table-column label="状态" align="center" prop="activeFlag_dictText" />
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -129,6 +137,35 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-form-item label="挂号科室" prop="registerFlag">
|
||||||
|
<el-radio-group v-model="form.registerFlag" size="large">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科室位置" prop="location">
|
||||||
|
<el-input v-model="form.location" placeholder="请输入科室位置" maxlength="100" show-word-limit />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科室简介" prop="intro">
|
||||||
|
<el-input
|
||||||
|
v-model="form.intro"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入科室简介"
|
||||||
|
maxlength="500"
|
||||||
|
show-word-limit
|
||||||
|
:rows="4"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入备注信息"
|
||||||
|
maxlength="1000"
|
||||||
|
show-word-limit
|
||||||
|
:rows="3"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@@ -141,7 +178,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Organization">
|
<script setup name="Organization">
|
||||||
import { getList, deleteOrganization, addOrganization, updateOrganization, disableOrg, initOrgTypeOption, enableOrg } from './components/api';
|
import { getList, deleteOrganization, addOrganization, updateOrganization, disableOrg, initOrgTypeOption, enableOrg, getOrgDetail } from './components/api';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
@@ -154,6 +191,10 @@ const form = ref({
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
typeEnum: undefined,
|
typeEnum: undefined,
|
||||||
busNoParent: undefined,
|
busNoParent: undefined,
|
||||||
|
registerFlag: false, // 挂号科室标记
|
||||||
|
location: undefined, // 科室位置
|
||||||
|
intro: undefined, // 科室简介
|
||||||
|
remark: undefined, // 备注
|
||||||
});
|
});
|
||||||
const orgTableRef = ref();
|
const orgTableRef = ref();
|
||||||
const orgRef = ref();
|
const orgRef = ref();
|
||||||
@@ -169,6 +210,10 @@ const rules = ref({
|
|||||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
||||||
],
|
],
|
||||||
typeEnum: [{ required: true, message: '请选择科室类型', trigger: 'change' }],
|
typeEnum: [{ required: true, message: '请选择科室类型', trigger: 'change' }],
|
||||||
|
// 新增字段验证规则
|
||||||
|
location: [{ required: false, message: '请输入科室位置', trigger: 'blur' }],
|
||||||
|
intro: [{ required: false, message: '请输入科室简介', trigger: 'blur' }],
|
||||||
|
remark: [{ required: false, message: '请输入备注信息', trigger: 'blur' }],
|
||||||
});
|
});
|
||||||
|
|
||||||
getPageList();
|
getPageList();
|
||||||
@@ -230,6 +275,10 @@ function initOption() {
|
|||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
form.value.id = undefined;
|
form.value.id = undefined;
|
||||||
|
form.value.registerFlag = false;
|
||||||
|
form.value.location = undefined;
|
||||||
|
form.value.intro = undefined;
|
||||||
|
form.value.remark = undefined;
|
||||||
orgRef.value.resetFields();
|
orgRef.value.resetFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +297,7 @@ function getDictLabel(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getPageList() {
|
function getPageList() {
|
||||||
loading.value = false;
|
loading.value = true;
|
||||||
getList(queryParams.value).then((res) => {
|
getList(queryParams.value).then((res) => {
|
||||||
// 处理返回的科室数据,确保科室分类显示与系统标准字典一致
|
// 处理返回的科室数据,确保科室分类显示与系统标准字典一致
|
||||||
const processedData = res.data.records.map(item => {
|
const processedData = res.data.records.map(item => {
|
||||||
@@ -269,6 +318,12 @@ function getPageList() {
|
|||||||
|
|
||||||
organization.value = processedData;
|
organization.value = processedData;
|
||||||
total.value = res.data.total;
|
total.value = res.data.total;
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('获取科室列表失败:', error);
|
||||||
|
proxy.$modal.msgError('获取科室列表失败,请稍后重试');
|
||||||
|
organization.value = [];
|
||||||
|
total.value = 0;
|
||||||
|
}).finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -285,17 +340,29 @@ function handelEdit(row) {
|
|||||||
|
|
||||||
title.value = '编辑科室';
|
title.value = '编辑科室';
|
||||||
open.value = true;
|
open.value = true;
|
||||||
setTimeout(() => {
|
|
||||||
form.value.id = row.id;
|
// 调用后端API获取完整的科室信息,确保包含所有字段
|
||||||
form.value.busNo = row.busNo;
|
getOrgDetail(row.id).then(res => {
|
||||||
form.value.name = row.name;
|
if (res.code === 200) {
|
||||||
form.value.ybNo = row.ybNo;
|
const orgInfo = res.data;
|
||||||
form.value.ybName = row.ybName;
|
form.value.id = orgInfo.id;
|
||||||
form.value.typeEnum = row.typeEnum;
|
form.value.busNo = orgInfo.busNo;
|
||||||
// 确保科室分类值的类型正确,使其能正确匹配下拉选项中的值
|
form.value.name = orgInfo.name;
|
||||||
form.value.classEnum = row.classEnum !== undefined ? String(row.classEnum) : undefined;
|
form.value.ybNo = orgInfo.ybNo;
|
||||||
form.value.busNoParent = row.busNo.split('.').length > 1 ? row.busNo.split('.')[0] : undefined;
|
form.value.ybName = orgInfo.ybName;
|
||||||
}, 50);
|
form.value.typeEnum = orgInfo.typeEnum;
|
||||||
|
// 确保科室分类值的类型正确,使其能正确匹配下拉选项中的值
|
||||||
|
form.value.classEnum = orgInfo.classEnum !== undefined ? String(orgInfo.classEnum) : undefined;
|
||||||
|
form.value.busNoParent = orgInfo.busNo.split('.').length > 1 ? orgInfo.busNo.split('.')[0] : undefined;
|
||||||
|
form.value.registerFlag = !!orgInfo.registerFlag;
|
||||||
|
form.value.location = orgInfo.location;
|
||||||
|
form.value.intro = orgInfo.intro;
|
||||||
|
form.value.remark = orgInfo.remark;
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('获取科室信息失败:', error);
|
||||||
|
proxy.$modal.msgError('获取科室信息失败');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
@@ -308,20 +375,43 @@ function cancel() {
|
|||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs['orgRef'].validate((valid) => {
|
proxy.$refs['orgRef'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
// 创建表单数据副本,避免直接修改原始form对象
|
||||||
|
const formData = { ...form.value };
|
||||||
|
// 确保registerFlag从布尔值转换为整数(true=1, false=0)
|
||||||
|
formData.registerFlag = Number(formData.registerFlag ? 1 : 0);
|
||||||
|
|
||||||
|
// 确保classEnum字段有值(数据库必填)
|
||||||
|
// 如果未定义,设置默认值1
|
||||||
|
if (formData.classEnum === undefined || formData.classEnum === null || formData.classEnum === '') {
|
||||||
|
formData.classEnum = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保classEnum为数字类型
|
||||||
|
formData.classEnum = Number(formData.classEnum);
|
||||||
|
|
||||||
|
// 验证提交数据
|
||||||
|
console.log('提交的数据:', formData);
|
||||||
|
|
||||||
if (form.value.id == undefined) {
|
if (form.value.id == undefined) {
|
||||||
if (form.value.busNoParent) {
|
if (form.value.busNoParent) {
|
||||||
form.value.busNo = form.value.busNoParent;
|
formData.busNo = form.value.busNoParent;
|
||||||
}
|
}
|
||||||
addOrganization(form.value).then((res) => {
|
addOrganization(formData).then((res) => {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getPageList();
|
getPageList();
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('添加科室失败:', error);
|
||||||
|
proxy.$modal.msgError('添加科室失败,请稍后重试');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
updateOrganization(form.value).then((res) => {
|
updateOrganization(formData).then((res) => {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getPageList();
|
getPageList();
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('更新科室失败:', error);
|
||||||
|
proxy.$modal.msgError('更新科室失败,请稍后重试');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,8 +430,12 @@ function handleDelete() {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
deleteOrganization(selectRowIds.value.join(',')).then((res) => {
|
deleteOrganization(selectRowIds.value.join(',')).then((res) => {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
loading.value = false;
|
|
||||||
getPageList();
|
getPageList();
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('删除科室失败:', error);
|
||||||
|
proxy.$modal.msgError('删除科室失败,请稍后重试');
|
||||||
|
}).finally(() => {
|
||||||
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 停用
|
// 停用
|
||||||
@@ -349,6 +443,9 @@ function handleDisabled(id) {
|
|||||||
disableOrg(id).then((res) => {
|
disableOrg(id).then((res) => {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
getPageList();
|
getPageList();
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('停用科室失败:', error);
|
||||||
|
proxy.$modal.msgError('停用科室失败,请稍后重试');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,6 +454,9 @@ function handelEnable(id) {
|
|||||||
enableOrg(id).then((res) => {
|
enableOrg(id).then((res) => {
|
||||||
proxy.$modal.msgSuccess('操作成功');
|
proxy.$modal.msgSuccess('操作成功');
|
||||||
getPageList();
|
getPageList();
|
||||||
|
}).catch(error => {
|
||||||
|
console.error('启用科室失败:', error);
|
||||||
|
proxy.$modal.msgError('启用科室失败,请稍后重试');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,7 @@
|
|||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
import { getConfigKey, addConfig, updateConfig } from '@/api/system/config';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
@@ -198,46 +199,72 @@ const handleSave = async () => {
|
|||||||
await formRef.value.validate();
|
await formRef.value.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将表单数据转换为系统配置格式
|
// 将表单数据转换为系统配置格式,并添加必要的默认值
|
||||||
const configData = [
|
const configData = [
|
||||||
{ configKey: 'medicalRecordFee', configValue: formData.medicalRecordFee, configName: '病历本费用' },
|
{ configKey: 'medicalRecordFee', configValue: formData.medicalRecordFee, configName: '病历本费用', configType: 'Y' },
|
||||||
{ configKey: 'patientCardFee', configValue: formData.patientCardFee, configName: '就诊卡费' },
|
{ configKey: 'patientCardFee', configValue: formData.patientCardFee, configName: '就诊卡费', configType: 'Y' },
|
||||||
{ configKey: 'medicalRecordFlag', configValue: formData.medicalRecordFlag ? '1' : '0', configName: '病历费入账标志' },
|
{ configKey: 'medicalRecordFlag', configValue: formData.medicalRecordFlag ? '1' : '0', configName: '病历费入账标志', configType: 'Y' },
|
||||||
{ configKey: 'isNightShift', configValue: formData.isNightShift ? '1' : '0', configName: '是否启用晚班' },
|
{ configKey: 'isNightShift', configValue: formData.isNightShift ? '1' : '0', configName: '是否启用晚班', configType: 'Y' },
|
||||||
{ configKey: 'patientCardFlag', configValue: formData.patientCardFlag ? '1' : '0', configName: '就诊卡记账标志' },
|
{ configKey: 'patientCardFlag', configValue: formData.patientCardFlag ? '1' : '0', configName: '就诊卡记账标志', configType: 'Y' },
|
||||||
{ configKey: 'morningStartTime', configValue: formData.morningStartTime, configName: '上午接诊起始时间' },
|
{ configKey: 'morningStartTime', configValue: formData.morningStartTime, configName: '上午接诊起始时间', configType: 'Y' },
|
||||||
{ configKey: 'autoGenerateOutpatientNo', configValue: formData.autoGenerateOutpatientNo ? '1' : '0', configName: '自动产生门诊号' },
|
{ configKey: 'autoGenerateOutpatientNo', configValue: formData.autoGenerateOutpatientNo ? '1' : '0', configName: '自动产生门诊号', configType: 'Y' },
|
||||||
{ configKey: 'allowModifyOutpatientNo', configValue: formData.allowModifyOutpatientNo ? '1' : '0', configName: '建档时是否允许修改门诊号' },
|
{ configKey: 'allowModifyOutpatientNo', configValue: formData.allowModifyOutpatientNo ? '1' : '0', configName: '建档时是否允许修改门诊号', configType: 'Y' },
|
||||||
{ configKey: 'afternoonStartTime', configValue: formData.afternoonStartTime, configName: '下午起始时间' },
|
{ configKey: 'afternoonStartTime', configValue: formData.afternoonStartTime, configName: '下午起始时间', configType: 'Y' },
|
||||||
{ configKey: 'eveningStartTime', configValue: formData.eveningStartTime, configName: '晚上起始时间' },
|
{ configKey: 'eveningStartTime', configValue: formData.eveningStartTime, configName: '晚上起始时间', configType: 'Y' },
|
||||||
{ configKey: 'registrationValidity', configValue: formData.registrationValidity, configName: '挂号有效期' },
|
{ configKey: 'registrationValidity', configValue: formData.registrationValidity, configName: '挂号有效期', configType: 'Y' },
|
||||||
{ configKey: 'registrationDocumentMode', configValue: formData.registrationDocumentMode, configName: '挂号单据模式' },
|
{ configKey: 'registrationDocumentMode', configValue: formData.registrationDocumentMode, configName: '挂号单据模式', configType: 'Y' },
|
||||||
{ configKey: 'exemptFlag', configValue: formData.exemptFlag ? '1' : '0', configName: '减免标志' },
|
{ configKey: 'exemptFlag', configValue: formData.exemptFlag ? '1' : '0', configName: '减免标志', configType: 'Y' },
|
||||||
{ configKey: 'consultationFlag', configValue: formData.consultationFlag ? '1' : '0', configName: '义诊标志' },
|
{ configKey: 'consultationFlag', configValue: formData.consultationFlag ? '1' : '0', configName: '义诊标志', configType: 'Y' },
|
||||||
{ configKey: 'enableHolidayFeeFloat', configValue: formData.enableHolidayFeeFloat ? '1' : '0', configName: '启用法定节假日挂号费浮动' },
|
{ configKey: 'enableHolidayFeeFloat', configValue: formData.enableHolidayFeeFloat ? '1' : '0', configName: '启用法定节假日挂号费浮动', configType: 'Y' },
|
||||||
{ configKey: 'guardianAge', configValue: formData.guardianAge, configName: '监护人规定年龄' },
|
{ configKey: 'guardianAge', configValue: formData.guardianAge, configName: '监护人规定年龄', configType: 'Y' },
|
||||||
{ configKey: 'enableDoubleScreen', configValue: formData.enableDoubleScreen ? '1' : '0', configName: '门诊挂号启用双屏' },
|
{ configKey: 'enableDoubleScreen', configValue: formData.enableDoubleScreen ? '1' : '0', configName: '门诊挂号启用双屏', configType: 'Y' },
|
||||||
{ configKey: 'optionalRegistrationType', configValue: formData.optionalRegistrationType ? '1' : '0', configName: '挂号类型可选择' },
|
{ configKey: 'optionalRegistrationType', configValue: formData.optionalRegistrationType ? '1' : '0', configName: '挂号类型可选择', configType: 'Y' },
|
||||||
{ configKey: 'isPrint', configValue: formData.isPrint ? '1' : '0', configName: '是否打印挂号单' },
|
{ configKey: 'isPrint', configValue: formData.isPrint ? '1' : '0', configName: '是否打印挂号单', configType: 'Y' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let successCount = 0;
|
||||||
|
let failedParams = [];
|
||||||
|
|
||||||
// 调用系统配置API保存每个参数
|
// 调用系统配置API保存每个参数
|
||||||
for (const config of configData) {
|
for (const config of configData) {
|
||||||
// 先查询是否存在该配置
|
try {
|
||||||
const existingConfig = await getConfigKey(config.configKey);
|
// 先查询是否存在该配置
|
||||||
if (existingConfig.data) {
|
const existingConfig = await getConfigKey(config.configKey, { skipErrorMsg: true });
|
||||||
// 如果存在则更新
|
|
||||||
await updateConfig({ ...config, configId: existingConfig.data.configId });
|
if (existingConfig.data && existingConfig.data.configId) {
|
||||||
} else {
|
// 如果存在则更新,保留原有数据的configId
|
||||||
// 如果不存在则新增
|
await updateConfig({
|
||||||
await addConfig(config);
|
...config,
|
||||||
|
configId: existingConfig.data.configId,
|
||||||
|
createTime: existingConfig.data.createTime, // 保留创建时间
|
||||||
|
remark: existingConfig.data.remark || '收费系统配置参数' // 保留或设置默认备注
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 如果不存在则新增,添加默认备注
|
||||||
|
await addConfig({
|
||||||
|
...config,
|
||||||
|
remark: '收费系统配置参数'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
successCount++;
|
||||||
|
} catch (paramError) {
|
||||||
|
console.error(`保存参数 ${config.configName} (${config.configKey}) 失败:`, paramError);
|
||||||
|
failedParams.push(config.configName);
|
||||||
|
// 继续处理下一个参数,不中断整体流程
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ElMessage.success('保存成功');
|
// 根据保存结果显示相应消息
|
||||||
|
if (failedParams.length === 0) {
|
||||||
|
ElMessage.success(`所有 ${successCount} 个参数保存成功`);
|
||||||
|
} else if (successCount > 0) {
|
||||||
|
ElMessage.warning(`${successCount} 个参数保存成功,但以下 ${failedParams.length} 个参数保存失败: ${failedParams.join(', ')}`);
|
||||||
|
} else {
|
||||||
|
ElMessage.error(`所有参数保存失败,请检查系统配置`);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('保存失败:', error);
|
console.error('保存过程中发生错误:', error);
|
||||||
ElMessage.error('保存失败,请重试');
|
ElMessage.error('保存操作异常,请重试');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user