Commit f06d8ef2 authored by songrui's avatar songrui

Merge branch 'chronic-master' of…

Merge branch 'chronic-master' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-master
parents 412b204e 2e4dbfb5
......@@ -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: '/chronic-admin/v1/base-info/user/login' })
}
//查询居民信息
export function getChronicResidentsId(residentInfoId) {
return fetchBase({ url: `/v1/chronic-residents-record/resident-info`,body:{"residentInfoId":residentInfoId},loading: true})
return fetchBase({ url: `/chronic-admin/v1/chronic-residents-record/resident-info`,body:{"residentInfoId":residentInfoId},loading: true})
}
// 主键查询
export function fetchCurrencyById(params) {
return fetchBase({ url: `/v1/chronic-visit-currency/record`, body: params, loading: true })
return fetchBase({ url: `/chronic-admin/v1/chronic-visit-currency/record`, body: params, loading: true })
}
// 慢性病管理列表查询
......
......@@ -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() {
......@@ -45,12 +46,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", {})
......
<template>
<div>底部</div>
<div>
<van-form ref='form'>
<van-cell-group inset>
<div class='no-req-label'>随访单位</div>
<van-field
v-model='form.visitUnitName'
is-link
readonly
placeholder='随访单位'
class='input-back mt-2 form-input'
@click="showPopup = true"
/>
<van-popup v-model:show="showPopup" position="bottom" :style="{ height: '40%' }">
<van-search
v-model="searchText"
:show-action="false"
placeholder="搜索"
@search="onSearch"
/>
<van-cell-group>
<van-cell v-for="item in searchResults" :key="item" :title="item" />
</van-cell-group>
</van-popup>
<div class='no-req-label mt-5'>随访科室</div>
<van-field
v-model='form.visitOfficeName'
is-link
disabled
placeholder='随访科室'
class='input-back mt-2 form-input'
/>
<div class='no-req-label mt-5'>随访医生</div>
<van-field
v-model='form.visitDoctorName'
is-link
disabled
placeholder='随访医生'
class='input-back mt-2 form-input'
/>
</van-cell-group>
</van-form>
</div>
</template>
<script>
import dayjs from 'dayjs'
import { useStore } from '@/doctor/store'
export default {
name: 'CommonBottom'
name: 'CommonBottom',
props: {
info: {
default: () => {
return {}
}
}
},
data() {
return {
store: useStore(),
authInfo: {},
showPopup: false,
searchText: undefined,
searchResults: [],
form: {},
rules: {}
}
},
watch: {
'info': {
handler() {
this.form = this.setForm(this.info)
},
immediate: true
}
},
// computed: {
// authInfo() {
// return store.state.authInfo
// }
// },
methods: {
setForm(info) {
const form = {
visitDate: new dayjs(),
createDate: new dayjs(),
// 随访单位
visitUnitId: this.authInfo.unitId,
visitUnitName: this.authInfo.unitName,
// 随访科室
visitOfficeId: this.authInfo.officeId,
visitOfficeName: this.authInfo.officeName,
// 随访医生
visitDoctorId: this.authInfo.relationId,
visitDoctorName: this.authInfo.nickName,
// 录入单位
createUnitId: this.authInfo.unitId,
createUnitName: this.authInfo.unitName,
// 录入科室
createOfficeId: this.authInfo.officeId,
createOfficeName: this.authInfo.officeName,
// 录入医生
createDoctorId: this.authInfo.relationId,
createDoctorName: this.authInfo.nickName
}
Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) {
form[key] = info[key]
}
})
return form
},
onSearch() {
debugger
}
}
}
</script>
<style scoped>
<style scoped lang='less'>
.title {
font-weight: bold;
margin-bottom: 20px;
}
.label-title {
font-size: 13px;
color: #595959;
font-weight: 500;
&::after {
content: "*";
color: red;
font-weight: bold;
margin-left: 4px;
}
}
.no-req-label {
font-size: 13px;
color: #595959;
font-weight: 500;
}
.form-input {
padding: 8px 12px;
border-radius: 8px;
}
.input-back {
background: #FAFAFA;
}
.tel-back {
background: #F5F5F5;
padding: 8px;
border-radius: 0px 0px 8px 8px;
}
.tel {
background: #FFFFFF;
padding: 8px;
border-radius: 8px;
}
.tel-label {
color: #607FF0;
font-weight: bold;
}
.p-12-0 {
padding: 12px 0px;
}
:deep(.van-cell-group--inset) {
overflow: visible;
}
:deep(.van-cell) {
overflow: visible;
}
:deep(.van-field__error-message) {
position: absolute;
}
:deep(.van-cell:after) {
border-bottom: 0px;
}
</style>
\ No newline at end of file
......@@ -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