Commit 2e4dbfb5 authored by gengchunlei's avatar gengchunlei

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

parent 30276122
......@@ -41,7 +41,7 @@ export function fetchBase({
}
baseAxios({
method: method,
url: `${url}`,
url: `/chronic-admin${url}`,
params: params,
data: body,
headers: {
......
import {fetchBase} from '@/api/doctor/doctorFetch'
//获取登录信息
export function getAuthInfo() {
return fetchBase({ url: '/v1/base-info/user/login' })
}
//查询居民信息
export function getChronicResidentsId(residentInfoId) {
return fetchBase({ url: `/v1/chronic-residents-record/resident-info`,body:{"residentInfoId":residentInfoId},loading: true})
......@@ -12,10 +17,10 @@ export function fetchCurrencyById(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) {
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 @@
import { getDict } from '@/api/base.js'
import { useStore } from './store/index.js'
import { callMobile, getQueryVariable } from '@/utils/common'
import { getAuthInfo } from '@/api/doctor/generalFU'
export default {
data() {
......@@ -44,12 +45,15 @@ export default {
let token = getQueryVariable('token')
if (!token) {
// token = sessionStorage.getItem('token')
token = '25ad0e70-c2a1-40e4-a121-45d139f4d7d2'
token = '842c7b77-9f98-43b7-bfe4-909d22472904'
}
if (token) {
sessionStorage.setItem('token', token)
const res = await getDict()
this.store.$patch({ dict: res.data || {} })
const user = await getAuthInfo()
this.store.$patch(user.data)
this.visible = true
} else {
callMobile("goIndex", {})
......
......@@ -4,7 +4,9 @@ export const useStore = defineStore('chronic', {
state: () => {
return {
// 字典
dict: []
dict: [],
//登录医生相关基本信息
authInfo: {}
}
},
getters: {},
......@@ -13,6 +15,11 @@ export const useStore = defineStore('chronic', {
if (!dict) return []
return this.dict[dict] || []
},
setAuthInfo(authInfo) {
if (!authInfo) return {}
this.authInfo = authInfo
return
},
getDictValue(dict, value) {
let array = []
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