Commit da7aeedd authored by 高滢's avatar 高滢

Merge remote-tracking branch 'origin/master'

parents 327c4814 b6281309
......@@ -83,3 +83,11 @@ export function editRecord(data) {
data
})
}
// 编辑病例
export function getRecordPayment(id) {
return request({
url: '/business/record/paymentDetailForMedical/' + id,
method: 'get'
})
}
......@@ -30,6 +30,15 @@ export function register(data) {
})
}
// 获取站点配置信息
export function getSiteInfo(params) {
return request({
url: '/system/baseConfig/list',
method: 'get',
params
})
}
// 获取用户详细信息
export function getInfo() {
return request({
......
......@@ -96,6 +96,7 @@ function render(props = {}) {
store.commit('SET_CHANGE', props.setGlobalState)
store.commit('SET_GOLBALSTATE', props.getGlobalState())
store.commit('SET_USER_TYPE', temp.type)
store.commit('SET_SITE_CONFIG', temp.siteConfig)
}
instance = new Vue({
......
......@@ -18,6 +18,7 @@ const getters = {
defaultRoutes: state => state.permission.defaultRoutes,
sidebarRouters: state => state.permission.sidebarRouters,
setGlobalState: state => state.user.setGlobalState,
getGlobalState: state => state.user.getGlobalState
getGlobalState: state => state.user.getGlobalState,
siteConfig: state => state.user.siteConfig
}
export default getters
import { login, logout, getInfo } from '@/api/login'
import { login, logout, getInfo, getSiteInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
const user = {
......@@ -11,7 +11,8 @@ const user = {
setGlobalState: null,
getGlobalState: null,
deptId: '',
userType: ''
userType: '',
siteConfig: {}
},
mutations: {
......@@ -41,6 +42,9 @@ const user = {
},
SET_USER_TYPE: (state, userType) => {
state.userType = userType
},
SET_SITE_CONFIG: (state, microChange) => {
state.siteConfig = microChange
}
},
......@@ -78,6 +82,27 @@ const user = {
commit('SET_DEPTID', user.deptId)
commit('SET_USER_TYPE', user.userType)
commit('SET_AVATAR', avatar)
// 获取站点基础配置 dept.level是1代表平台 平台type传2 hospitalId是医院传的
const temp = {
type: user.dept.level === '1' ? '2' : null,
hospitalId: user.dept.level === '1' ? null : user.deptId
}
getSiteInfo(temp).then(siteInfo => {
// user.dept.level = 1 为平台; 2 为医院
let siteConfig = {}
if (user.dept.level === '2') {
if (siteInfo.rows.length !== 0) {
siteInfo.rows.forEach(item => {
siteConfig[item.key] = JSON.parse(item.content)
})
}
} else if (user.dept.level === '1') {
if (siteInfo.rows.length !== 0) {
siteConfig = JSON.parse(siteInfo.rows[0].content)
}
}
commit('SET_SITE_CONFIG', siteConfig)
})
resolve(res)
}).catch(error => {
reject(error)
......
......@@ -588,7 +588,9 @@ export default {
'medicalRecordNo': this.registerForm.medicalRecordNo,
'registId': this.registerForm.registId,
'doctorName': this.registerForm.doctorName,
'inHospitalBo': inHospitalBo
'inHospitalBo': inHospitalBo,
'petNickname': this.registerForm.petNickname,
'hospitalId': this.registerForm.hospitalId
}
if (prescrib.inspect.length > 0) {
temp['checkManageBos'] = [...prescrib.inspect]
......
......@@ -294,7 +294,8 @@ export default {
hosAddress: this.singleDoctor.hosAddress,
doctorSignatureUrl: this.singleDoctor.doctorSignatureUrl,
visitLocation: this.singleDoctor.visitLocation,
doctorTitleLabel: this.singleDoctor.doctorTitleValue
doctorTitleLabel: this.singleDoctor.doctorTitleValue,
way: this.registrationType
}
console.log('终极大表', temp)
// 进入挂号页面先获取是否有重复的宠物数据--选择宠物不需要
......
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