From 6d4705c0d40a6aabfeeef9a408aadf905a508af7 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Fri, 21 Mar 2025 15:12:53 +0800 Subject: [PATCH] =?UTF-8?q?Admin=E5=8F=AF=E4=BB=A5=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E5=8C=BB=E9=99=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin.js | 32 +++ src/views/login/index.vue | 193 ++++++++------- src/views/system/hospital/components/form.vue | 197 +++++++++++++++ src/views/system/hospital/components/list.vue | 224 ++++++++++++++++++ .../hospital/{ => components}/uploadLogo.vue | 0 src/views/system/hospital/index.vue | 196 +-------------- 6 files changed, 572 insertions(+), 270 deletions(-) create mode 100644 src/views/system/hospital/components/form.vue create mode 100644 src/views/system/hospital/components/list.vue rename src/views/system/hospital/{ => components}/uploadLogo.vue (100%) diff --git a/src/api/admin.js b/src/api/admin.js index 7a525e8..3c10bb1 100644 --- a/src/api/admin.js +++ b/src/api/admin.js @@ -278,3 +278,35 @@ export function batchAddInternationalization(param) { data: param }) } +// 获取医院列表 +export function getHIRHospitalList(param) { + return request({ + url: `/Patient/getHIRHospitalList`, + method: 'post', + data: param + }) +} +// 删除医院 +export function deleteHIRHospital(id) { + return request({ + url: `/Patient/deleteHIRHospital/${id}`, + method: 'delete', + }) +} +// 新增或修改医院 +export function addOrUpdateHIRHospital(data) { + return request({ + url: `/Patient/addOrUpdateHIRHospital`, + method: 'post', + data + }) +} +// 设置默认医院 +export function updateDefaultHospital(params) { + return request({ + url: `/Patient/updateDefaultHospital`, + method: 'put', + params + }) +} + diff --git a/src/views/login/index.vue b/src/views/login/index.vue index dcb89e9..047c0ff 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -6,12 +6,8 @@
- - +
- {{ $t('login:copyright:title:construct') - }}{{ config.hospitalEN }} + {{ $t('login:copyright:title:construct') + }}{{ hospital.HospitalName }} | - {{ $t('login:copyright:title:support') }}{{ config.companyEN }} + {{ $t('login:copyright:title:support') }}{{ config.companyEN }}
- + + + + + + + + + + + + {{ $t("common:button:cancel") }} + {{ $t("system:hospital:save") }} + + @@ -159,6 +121,7 @@ import Vcode from 'vue-puzzle-vcode' import Img1 from '@/assets/pic-1.png' import logoImg from '@/assets/zzlogo2.png' import { getHospital } from '@/api/hospital.js' +import { getHIRHospitalList, updateDefaultHospital } from '@/api/admin' // import config from '/public/config.js' export default { name: 'Login', @@ -166,6 +129,7 @@ export default { data() { return { config: WINDOW_CONFIG, + visible: false, logoImg, VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION, loginForm: { @@ -204,7 +168,12 @@ export default { hospital: { HospitalLogoPath: null, HospitalName: null, + Id: null }, + hospitalList: [], + form: { + Id: null + } } }, computed: { @@ -212,7 +181,7 @@ export default { }, created() { this.getInfo() - console.log(this.config) + this.getList() }, mounted() { this.loginType = this.$route.query.loginType @@ -237,6 +206,41 @@ export default { }, methods: { ...mapMutations({ setLanguage: 'lang/setLanguage' }), + async saveHospital() { + if (this.form.Id === this.hospital.Id) return this.visible = false + let res = await updateDefaultHospital({ + HirHospitalId: this.form.Id + }) + if (res.IsSuccess) { + this.visible = false + this.getInfo() + this.getList() + } + }, + openHospital() { + this.form.Id = this.hospital.Id + this.visible = true + }, + // 获取医院列表 + getList() { + getHIRHospitalList({ + HospitalName: null, + Country: null, + City: null, + Province: null, + Address: null, + Phone: null, + Asc: false, + SortField: 'CreateTime', + PageIndex: 1, + PageSize: 1000, + }) + .then((res) => { + this.hospitalList = res.Result.CurrentPageData + }) + .catch(() => { + }) + }, // 获取医院信息 async getInfo() { try { @@ -379,20 +383,24 @@ $cursor: #fff; $bg: #2d3a4b; $dark_gray: #889aa4; $light_gray: #606266; + .login-container { position: relative; width: 100%; height: 100%; overflow: auto; background: rgb(249, 249, 249); + .login-header { margin: 10px 0px 20px 10px; height: 3rem; width: 720px; + .login-logo { height: 100%; } } + .login-body { position: absolute; left: 50%; @@ -406,30 +414,36 @@ $light_gray: #606266; box-sizing: border-box; background: rgb(255, 255, 255); border-radius: 10px 0px 0px 10px; + .login-l { position: relative; float: left; width: 50%; height: 100%; + .login-logo { position: absolute; top: 35px; left: 50px; + img { height: 40px; } } + .login-image { position: absolute; top: 10px; left: 0px; // transform: translateY(-50%); height: 100%; + img { height: 100%; } } } + .login-r { position: relative; float: left; @@ -447,9 +461,11 @@ $light_gray: #606266; margin: 0 auto; overflow: hidden; } + .title-container { // margin-bottom: 50px; margin-top: 15%; + .title { font-size: 35px; color: $light_gray; @@ -489,6 +505,7 @@ $light_gray: #606266; } } } + .login-footer { position: absolute; bottom: 50px; @@ -502,6 +519,7 @@ $light_gray: #606266; align-items: center; // color: rgb(180, 190, 199); color: #909399; + a { display: inline-block; text-decoration: none; @@ -510,13 +528,16 @@ $light_gray: #606266; display: flex; justify-content: center; } + span { margin: 0 2px; } + img { height: 20px; line-height: 20px; } + // p{ // display: inline-block; // height:20px; diff --git a/src/views/system/hospital/components/form.vue b/src/views/system/hospital/components/form.vue new file mode 100644 index 0000000..41c7c9c --- /dev/null +++ b/src/views/system/hospital/components/form.vue @@ -0,0 +1,197 @@ + + + \ No newline at end of file diff --git a/src/views/system/hospital/components/list.vue b/src/views/system/hospital/components/list.vue new file mode 100644 index 0000000..9007912 --- /dev/null +++ b/src/views/system/hospital/components/list.vue @@ -0,0 +1,224 @@ + + + \ No newline at end of file diff --git a/src/views/system/hospital/uploadLogo.vue b/src/views/system/hospital/components/uploadLogo.vue similarity index 100% rename from src/views/system/hospital/uploadLogo.vue rename to src/views/system/hospital/components/uploadLogo.vue diff --git a/src/views/system/hospital/index.vue b/src/views/system/hospital/index.vue index e3c98ab..0ef1827 100644 --- a/src/views/system/hospital/index.vue +++ b/src/views/system/hospital/index.vue @@ -1,199 +1,27 @@ @@ -201,10 +29,10 @@ export default { ::v-deep .is-error.my_new_pwd { margin-bottom: 40px; } + .hospital { width: 100%; height: 100%; overflow-y: auto; } -