@@ -18,6 +11,7 @@
import { mapState, mapActions, mapMutations } from 'vuex';
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
import BtnCon from 'components/BtnCom/BtnCon.vue';
+import { getHId } from 'config/api';
export default {
name: 'App',
@@ -38,9 +32,13 @@ export default {
},
created() {
- // const userId = '1218763410024566784';
- // const params = { userId };
- // this.getUserId(params);
+ const userId = '1218763410024566784';
+ const params = { userId };
+ this.getUserId(params);
+ this.getHospitalId();
+ if (sessionStorage.getItem('patientId')) {
+ this.setPatientId(sessionStorage.getItem('patientId'));
+ }
const that = this;
window.plugin = window.TallPlugin.init();
// 调用created方法 向主窗体发送created消息,以便来接受、存储主窗体传递来的参数
@@ -54,7 +52,21 @@ export default {
methods: {
...mapActions('home', ['getUserId']),
- ...mapMutations('home', ['setPtProps']),
+ ...mapMutations('home', ['setPtProps', 'setHospitalId', 'setPatientId']),
+
+ async getHospitalId() {
+ try {
+ const res = await getHId(1);
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ this.setHospitalId(data.id);
+ } else {
+ this.$message.error('医院查询失败');
+ }
+ } catch (error) {
+ this.$message.error(error);
+ }
+ },
},
};
diff --git a/src/common/portrait.styl b/src/common/portrait.styl
index 8ed1191..c523727 100644
--- a/src/common/portrait.styl
+++ b/src/common/portrait.styl
@@ -183,6 +183,8 @@
.white--text{
color: #fff;
+ width: 200px;
+ margin: 0 auto
}
diff --git a/src/components/BiologicalSampleSearch/Search.vue b/src/components/BiologicalSampleSearch/Search.vue
index 79cd84c..d856d86 100644
--- a/src/components/BiologicalSampleSearch/Search.vue
+++ b/src/components/BiologicalSampleSearch/Search.vue
@@ -5,7 +5,7 @@
- {{ item.title }}
+ {{ item.name }}
@@ -29,29 +29,13 @@
diff --git a/src/components/Echarts/Categorymap.vue b/src/components/Echarts/Categorymap.vue
index 4fc23b7..deeb8ef 100644
--- a/src/components/Echarts/Categorymap.vue
+++ b/src/components/Echarts/Categorymap.vue
@@ -12,7 +12,7 @@