Commit 2e4dbfb5 authored by gengchunlei's avatar gengchunlei

慢综 医生端 新增通用随访表单

parent 30276122
...@@ -41,7 +41,7 @@ export function fetchBase({ ...@@ -41,7 +41,7 @@ export function fetchBase({
} }
baseAxios({ baseAxios({
method: method, method: method,
url: `${url}`, url: `/chronic-admin${url}`,
params: params, params: params,
data: body, data: body,
headers: { headers: {
......
import {fetchBase} from '@/api/doctor/doctorFetch' import {fetchBase} from '@/api/doctor/doctorFetch'
//获取登录信息
export function getAuthInfo() {
return fetchBase({ url: '/v1/base-info/user/login' })
}
//查询居民信息 //查询居民信息
export function getChronicResidentsId(residentInfoId) { export function getChronicResidentsId(residentInfoId) {
return fetchBase({ url: `/v1/chronic-residents-record/resident-info`,body:{"residentInfoId":residentInfoId},loading: true}) return fetchBase({ url: `/v1/chronic-residents-record/resident-info`,body:{"residentInfoId":residentInfoId},loading: true})
...@@ -12,10 +17,10 @@ export function fetchCurrencyById(params) { ...@@ -12,10 +17,10 @@ export function fetchCurrencyById(params) {
// 慢性病管理列表查询 // 慢性病管理列表查询
export function getResidentByPage(params) { export function getResidentByPage(params) {
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/page`, body: params, loading: true }) return fetchBase({ url: `/v1/chronic-residents-record/page`, body: params, loading: true })
} }
// 查询待随访列表 // 查询待随访列表
export function getVisitAll(params, loading = true) { export function getVisitAll(params, loading = true) {
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-task/query-all-list`, body: params, loading }) return fetchBase({ url: `/v1/chronic-visit-task/query-all-list`, body: params, loading })
} }
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
import { getDict } from '@/api/base.js' import { getDict } from '@/api/base.js'
import { useStore } from './store/index.js' import { useStore } from './store/index.js'
import { callMobile, getQueryVariable } from '@/utils/common' import { callMobile, getQueryVariable } from '@/utils/common'
import { getAuthInfo } from '@/api/doctor/generalFU'
export default { export default {
data() { data() {
...@@ -44,12 +45,15 @@ export default { ...@@ -44,12 +45,15 @@ export default {
let token = getQueryVariable('token') let token = getQueryVariable('token')
if (!token) { if (!token) {
// token = sessionStorage.getItem('token') // token = sessionStorage.getItem('token')
token = '25ad0e70-c2a1-40e4-a121-45d139f4d7d2' token = '842c7b77-9f98-43b7-bfe4-909d22472904'
} }
if (token) { if (token) {
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
const res = await getDict() const res = await getDict()
this.store.$patch({ dict: res.data || {} }) this.store.$patch({ dict: res.data || {} })
const user = await getAuthInfo()
this.store.$patch(user.data)
this.visible = true this.visible = true
} else { } else {
callMobile("goIndex", {}) callMobile("goIndex", {})
......
...@@ -4,7 +4,9 @@ export const useStore = defineStore('chronic', { ...@@ -4,7 +4,9 @@ export const useStore = defineStore('chronic', {
state: () => { state: () => {
return { return {
// 字典 // 字典
dict: [] dict: [],
//登录医生相关基本信息
authInfo: {}
} }
}, },
getters: {}, getters: {},
...@@ -13,6 +15,11 @@ export const useStore = defineStore('chronic', { ...@@ -13,6 +15,11 @@ export const useStore = defineStore('chronic', {
if (!dict) return [] if (!dict) return []
return this.dict[dict] || [] return this.dict[dict] || []
}, },
setAuthInfo(authInfo) {
if (!authInfo) return {}
this.authInfo = authInfo
return
},
getDictValue(dict, value) { getDictValue(dict, value) {
let array = [] let array = []
if (typeof dict === 'string') { if (typeof dict === 'string') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment