上传代码

李进才 2 years ago
parent 677af90f97
commit 16fa6bb8b9
  1. 94
      health-auth.html
  2. 6
      src/config/axios-config.js
  3. 10
      src/config/copy/wx-config-29-芒市妇幼.js
  4. 277
      src/config/vue-config copy.js
  5. 272
      src/config/wx-config.js
  6. 5
      src/models/health-card.vue
  7. 2
      src/models/online-dept.vue
  8. 2
      src/models/online-doctor.vue
  9. 3
      src/models/online-order-manage.vue
  10. 17
      src/views/body-checkup/pdf-view.vue
  11. 20
      src/views/chronic/chronic-apply.vue
  12. 142
      src/views/complaint/complaint-base.vue
  13. 82
      src/views/health-card/health-auth.vue
  14. 2
      src/views/medical-record/medical-record-apply.vue
  15. 731
      src/views/online/online-patient/components/footer-tool.vue
  16. 52
      src/views/online/online-patient/components/nav-bar.vue
  17. 10
      src/views/online/online-patient/consultation.vue
  18. 6
      src/views/online/online-patient/doctor-home.vue
  19. 167
      src/views/online/online-patient/ol-dept-list.vue
  20. 665
      src/views/online/online-patient/ol-doct-list.vue
  21. 72
      src/views/recipe/components/recipe-group.vue
  22. 36
      src/views/reg/components/dept-list-left.vue

@ -14,98 +14,8 @@
</head>
<body>
<div id="app"
v-cloak>
<div v-if="show">
<van-form class="card__box"
label-width="80px"
@submit="onSubmit">
<van-field class="input"
v-model="patient.idCardNo"
label="身份证号"
name="idCardNo"
autofocus
maxLength="18"
placeholder="请填写身份证号码"
:border="false"
:rules="[{ required: true, message: '必填' }]">
</van-field>
<van-field class="input"
v-model="patient.name"
label="姓&emsp;&emsp;名"
name="name"
maxLength="18"
placeholder="请填写真实姓名"
:border="false"
:rules="[{ required: true, message: '必填' }]">
</van-field>
<div style="margin: 16px 0; width:100%;text-align:center;">
<span @click="onClick()"
style="color:var(--color-primary)">{{text}}</span>
</div>
</van-form>
</div>
</div>
<script>
Vue.createApp({
data() {
return {
show: false,
text: !URLUtil.getQueryVar('registerOrderId') ? '前往验证' : '判断验证是否通过',
patient: {
idCardNo: '',
name: ''
}
}
},
created() {
if (Axios.runEnv !== 'development') {
if (!URLUtil.getQueryVar('wechatCode') && !URLUtil.getQueryVar('registerOrderId')) { // 获取授权码
if (vant) {
vant.Toast.loading({ duration: 0, forbidClick: true, message: '页面加载中...' })
}
return window.location.href = 'https://health.tengmed.com/open/getUserCode?redirect_uri=' + window.location.href
}
}
this.show = true
},
methods: {
onClick() {
const orderId = URLUtil.getQueryVar('orderId')
const registerOrderId = URLUtil.getQueryVar('registerOrderId')
if (!registerOrderId) {
this.$axios.post('/wx/healthCode/registerUniformVerifyOrder.do', {
idCardNo: this.patient.idCardNo,
name: this.patient.name,
wechatCode: URLUtil.getQueryVar('wechatCode')
}).then(resp => {
if (resp.code === 200) {
window.location.href = `https://health.tengmed.com/open/idAuth?order_id=${resp.data}&hospital_id=31737&redirect_uri=http://wx.hhzyy.com/wx/web/health-auth.html?orderId=${resp.data}`
} else {
window.location.reload()
}
})
} else {
this.$axios.post('/wx/healthCode/checkUniformVerifyResult.do', {
orderId: orderId,
registerOrderId: registerOrderId
}).then(resp => {
if (resp.code === 200) {
alert('成功')
} else {
window.location.reload()
}
})
}
}
},
}).use(VueConfig)
.use(store)
.mount('#app');
<script>
VueConfig.createApp('@/views/health-card/health-auth.vue')
</script>
</body>

@ -8,7 +8,7 @@ const Axios = (function (Axios, store) {
const RUN_ENV = HOST_NAME === '127.0.0.1' || HOST_NAME === 'localhost' ? 'development' : 'production'
// 请求路径配置
const baseUrl = RUN_ENV === 'development' ? 'http://localhost:9001/' : ''
const baseUrl = RUN_ENV === 'development' ? 'http://wx.mzsrmyy.net/' : ''
// 模板请求路径
console.warn('==========当前运行环境:' + RUN_ENV + '==========' + (RUN_ENV === 'development' ? '(注意测试数据的影响)' : ''))
@ -186,9 +186,9 @@ const Axios = (function (Axios, store) {
{
id: 0,
openid: 'oeso-t62kkoRwLVVkSkwmmjPfUXk',
patientId: '11218352', // 12 - 17
patientId: '60797836', // 12 - 17
// enPatientId: '0d5c3c6ac0124f9bbeace1805acfcfeaMTUzNjcx',
enPatientId: '0D3EBF23633DCA32F3A98BA1D1F9035B',
enPatientId: '98BF75D35652B7B439FB2A51013ED690',
name: '李进才',
sex: '男',
age: '10岁',

@ -29,6 +29,8 @@ WxConfig.doctor = {
WxConfig.recipe = {
isPrepay: false, // 目前仅蒙自和红河州医院使用(开通需联系HIS开发者,否则会产生风险)
isMedical: true,
isChronic: true,
isDisPieceMedical: true,
awaitSecond: 20, // 支付完成等待延时
isCheck: false, // 是否允许勾选,默认false
isCollapse: true, // 是否默认展开,默认true
@ -76,7 +78,7 @@ WxConfig.map = {
// @报告
WxConfig.report = {
flag: 3, // LIS类型 { 1:新八达LIS 2:瑞美LIS(需要加前缀M,红河不用加) 3:科华LIS }
flag: 6, // LIS类型 { 1:新八达LIS 2:瑞美LIS(需要加前缀M,红河不用加) 3:科华LIS } 6:新版瑞美lis7
isDown: false, // 瑞美报告是否可下载
treatNumPrefix: '', // 就诊号前缀
types: [
@ -84,7 +86,7 @@ WxConfig.report = {
{ show: true, icon: '', name: '检查报告', path: '/report-check' },
{ show: false, icon: '', name: '体检报告', path: '/report-peis' },
{ show: false, icon: '', name: '影像报告', path: '/report-pacs' },
{ show: true, icon: '', name: '化验结果(旧)', path: '/api-report-inspect' }
// { show: true, icon: '', name: '化验结果(旧)', path: '/api-report-inspect' }
]
}
@ -139,8 +141,8 @@ WxConfig.register = {
deptFilter: function (type = 'today', dept, date = new Date()) {
// false禁用
if (!dept || !dept.deptName) return false
if (dept.deptName === '两癌筛查门诊') return false
if(dept.deptName === '两癌筛查门诊') return false
let filters = []
if (type === 'today') {

@ -1,277 +0,0 @@
const VueConfig = (function (Vue, Vuex, VueRouter, Axios, NProgress) {
const global = {
app: null,
store: null,
route: null,
router: null
}
// 向外暴露通过use注册
function install(app, options) {
vantInstall(app)
app.config.globalProperties.$axios = Axios.server
if (!global.app) global.app = app
}
function createApp(path, attributes) {
const div = document.createElement('div')
div.setAttribute('v-cloak', '')
div.id = 'app'
const appView = document.createElement('app')
if (attributes instanceof Object) {
for (a in attributes) {
appView.setAttribute(a, attributes[a])
}
}
div.appendChild(appView)
document.body.appendChild(div)
Vue.createApp({
components: { app: vueLoader(path) }
}).use(VueConfig).use(store).use(VueRouter.createRouter({ history: VueRouter.createWebHashHistory(), routes: [] })).mount('#app')
}
const cacheComponentsPath = []
// 后期移除
function components(obj) {
if (obj instanceof Object) {
for (const name in obj) {
const path = obj[name]
if (!name || !path) {
return console.error('name or path is null')
}
const key = name + '|' + path
if (cacheComponentsPath.indexOf(key) === -1) {
global.app.component(name, vueLoader(path))
} else {
// console.log(`${name}已注册过`)
}
}
}
}
function scriptLoader(src) {
const jsFile = document.createElement('script');
jsFile.src = src;
document.head.appendChild(jsFile);
}
function addRoutes(pathObj, routes) {
if (routes.length > 0) {
routes.forEach(item => {
global.router.addRoute({
meta: item.meta,
name: item.name,
path: item.path,
children: item.children,
component: vueLoader(item.component)
})
})
// global.router.beforeEach((to, from, next) => {
// next()
// })
if (typeof pathObj === 'object') {
global.store.dispatch('setRoutePath', pathObj.path)
console.log(pathObj);
global.router.replace(pathObj)
} else { // string
global.store.dispatch('setRoutePath', pathObj)
if (global.route.path === '/') {
return global.router.replace(pathObj)
}
global.router.replace({ path: global.route.path, params: global.route.params, query: global.route.query })
}
}
}
const mjsCaches = {}
const vueCaches = {}
function vueLoader(path) {
if (path.length > 4 && path.substring(path.length - 4) !== '.vue') path += '.vue'
return Vue.defineAsyncComponent(function () {
var pathname = window.location.pathname
pathname = pathname.substring(0, pathname.lastIndexOf('/'))
if (!global.store) global.store = Vuex.useStore()
if (!global.route) global.route = VueRouter.useRoute()
if (!global.router) global.router = VueRouter.useRouter()
if (NProgress) NProgress.start()
return window['vue3-sfc-loader'].loadModule(path, {
moduleCache: {
'vue-helper': { components: components, scriptLoader: scriptLoader, addRoutes: addRoutes, route: VueRouter.useRoute(), router: VueRouter.useRouter(), store: Vuex.useStore() },
vue: Vue,
vuex: { useStore: Vuex.useStore },
'vue-router': { useRouter: VueRouter.useRouter, useRoute: VueRouter.useRoute },
axios: {
axios: Axios.server,
copyright: Axios.copyright,
RUN_ENV: Axios.RUN_ENV,
UPLOAD_URL: Axios.UPLOAD_URL,
BASE_URL: Axios.BASE_URL,
OL_WS_URL: Axios.OL_WS_URL,
},
},
getFile: function (url) {
var index = url.indexOf('@')
if (index === 0) url = pathname + '/src' + url.substring(index + 1)
var type = '.mjs'
var laIndex = url.lastIndexOf('.')
if (laIndex > -1) type = url.substring(laIndex)
if (type === '.vue') {
if (vueCaches[url]) {
if (NProgress) NProgress.done()
console.log('[' + type + ']' + url + '已注册');
return vueCaches[url]
}
}
if (type === '.mjs') {
if (mjsCaches[url]) {
if (NProgress) NProgress.done()
console.log('[' + type + ']' + url + '已注册');
return mjsCaches[url]
}
}
return fetch(url).then(function (res) {
if (NProgress) NProgress.done()
if (!res.ok) throw Object.assign(new Error(url + ' ' + res.statusText), { res: res })
return {
type: type,
getContentData: function (asBinary) {
var respData = asBinary ? res.arrayBuffer() : res.text()
if (type === '.vue') if (!vueCaches[url]) vueCaches[url] = respData
if (type === '.mjs') if (!mjsCaches[url]) mjsCaches[url] = respData
return respData
}
}
})
},
handleModule: function (type, getContentData, path, options) { },
addStyle: function (textContent) {
var style = Object.assign(document.createElement('style'), { textContent: textContent })
var ref = document.head.getElementsByTagName('style')[0] || null
document.head.insertBefore(style, ref)
},
log(type, ...args) {
console[type](...args)
},
compiledCache: {
set(key, str) {
for (; ;) {
try {
window.localStorage.setItem((key), str)
break
} catch (ex) {
window.localStorage.removeItem(window.localStorage.key(0))
}
}
},
get(key) {
return window.localStorage.getItem(key)
}
}
})
})
}
// vant组件注册
function vantInstall(app) {
if (!window.vant) return
// 空状态
app.use(vant.Empty)
app.use(vant.Button)
app.use(vant.Lazyload)
app.use(vant.Cell)
app.use(vant.CellGroup)
app.use(vant.Icon)
app.use(vant.Image)
// Layout 布局
app.use(vant.Col)
app.use(vant.Row)
// 弹出层
app.use(vant.Popup)
app.use(vant.Toast)
app.use(vant.Cascader)
app.use(vant.Checkbox)
app.use(vant.CheckboxGroup)
app.use(vant.DatetimePicker)
app.use(vant.Field)
app.use(vant.Form)
app.use(vant.NumberKeyboard)
app.use(vant.PasswordInput)
app.use(vant.Picker)
app.use(vant.Radio)
app.use(vant.RadioGroup)
app.use(vant.Rate)
app.use(vant.Search)
app.use(vant.Slider)
app.use(vant.Stepper)
app.use(vant.Switch)
app.use(vant.Uploader)
app.use(vant.ActionSheet)
app.use(vant.Dialog)
app.use(vant.DropdownMenu)
app.use(vant.DropdownItem)
app.use(vant.Loading)
app.use(vant.Notify)
app.use(vant.Overlay)
app.use(vant.Area)
app.use(vant.PullRefresh)
app.use(vant.Badge)
app.use(vant.Circle)
app.use(vant.Collapse)
app.use(vant.CollapseItem)
app.use(vant.CountDown)
app.use(vant.Divider)
app.use(vant.ImagePreview)
app.use(vant.List)
app.use(vant.NoticeBar)
app.use(vant.Popover)
app.use(vant.Progress)
app.use(vant.Skeleton)
app.use(vant.Step)
app.use(vant.Steps)
app.use(vant.Sticky)
app.use(vant.Swipe)
app.use(vant.SwipeItem)
app.use(vant.Tag)
app.use(vant.Grid)
app.use(vant.GridItem)
app.use(vant.IndexBar)
app.use(vant.IndexAnchor)
app.use(vant.NavBar)
app.use(vant.Pagination)
app.use(vant.Sidebar)
app.use(vant.SidebarItem)
app.use(vant.Tab)
app.use(vant.Tabs)
app.use(vant.Tabbar)
app.use(vant.TabbarItem)
app.use(vant.TreeSelect)
app.use(vant.SwipeCell);
app.use(vant.Card);
app.use(vant.Calendar)
}
return {
install: install,
vueLoader: vueLoader,
createApp: createApp
}
})(Vue, Vuex, VueRouter, Axios, NProgress)
Object.freeze(VueConfig)

File diff suppressed because one or more lines are too long

@ -56,6 +56,11 @@ export default {
name: 'health-card-code',
path: '/health-card-code',
component: '@/views/health-card/health-card-code.vue'
},
{
name: 'health-auth',
path: '/health-auth',
component: '@/views/health-card/health-auth.vue'
}
])

@ -21,7 +21,7 @@ export default {
const show = ref(false)
store.dispatch('setTitle', '在线咨询')
axios.verify(null, false).then((resp) => {
axios.verify(true, false, true).then((resp) => {
addRoutes('/ol-dept-list', [
{
title: '科室选择',

@ -25,7 +25,7 @@ export default {
console.log(params);
if (!params || !params.key) return vant.Dialog.alert({ title: '提示', message: '权限不足!密钥缺失。' }).then(() => { })
axios.verify(true, false).then(resp => {
axios.verify(true, false, true).then(resp => {
addRoutes('/ol-doctor', [
{
title: '医生问诊',

@ -14,9 +14,6 @@ import { addRoutes } from 'vue-helper'
import { axios } from 'axios'
import { ref } from 'vue'
export default {
components: {
'nav-bar': VueConfig.vueLoader('@/views/online/online-patient/components/nav-bar.vue'),
},
setup() {
const show = ref(false)
store.dispatch('setTitle', '咨询订单')

@ -44,25 +44,8 @@ export default {
const canvasList = []
state.base64 = []
state.numPages = pdf.numPages
// for (let pageNum = 1; pageNum <= pdf.numPages; pageNum++) {
// pdf.getPage(pageNum).then(function (page) {
// // canvasList.push(getCanvas(page))
// // state.base64.push(getCanvas(page))
// // getCanvas(page, i)
// console.log('pageNum', pageNum)
// state.base64.push(getCanvas(page))
// })
// }
getFor(pdf)
// setTimeout(() => {
// canvasList.forEach(i => {
// state.base64.push(i.toDataURL())
// })
// vant.Toast.clear(toast)
// }, 6000)
setTimeout(() => {
vant.Toast.clear(toast)
}, 1000);

@ -230,7 +230,7 @@
<van-uploader v-model="state.img.diagProve"
style="width: 100%;height: 100%;"
:max-count="1"
:after-read="(file) => afterRead(file, 'inHospProve')">
:after-read="(file) => afterRead(file, 'diagProve')">
<div style="height: 100%; display: flex;flex-direction: column;align-items: center;justify-content: center;">
<svg t="1686896283841"
class="icon"
@ -248,7 +248,7 @@
</div>
</van-uploader>
</div>
<div v-if="state.imgBlankError.inHospProve"
<div v-if="state.imgBlankError.diagProve"
class="img__blank_error">请上传诊断证明照片</div>
</div>
@ -394,7 +394,8 @@ export default {
// applicantIdcImg1: false,
// applicantIdcImg2: false,
// agreementLetterImg: false
inHospProve: false
inHospProve: false,
diagProve: false
},
img: {
idcardFont: [], //
@ -434,7 +435,11 @@ export default {
let checked = 0
Object.keys(state.imgBlankError).forEach(key => {
if (form[key] === '') {
checked++
if((state.currTreat.inOutState==='1'&&key==='inHospProve')||state.currTreat.inOutState==='2'&&key==='diagProve'){
state.imgBlankError[key] = false
return
}
checked++
state.imgBlankError[key] = true
} else if (form[key] !== '' && state.imgBlankError[key]) {
state.imgBlankError[key] = false
@ -498,6 +503,9 @@ export default {
if(res.code === 200){
state.treatRecord = res.data
}
else{
vant.Toast.fail(res.message)
}
})
}
@ -506,6 +514,9 @@ export default {
if(res.code === 200){
state.getWayColumns = res.data
}
else{
vant.Toast.fail(res.message)
}
})
}
@ -537,7 +548,6 @@ export default {
function afterRead(file, state) {
ImageUtil.compressBySize(file.file, { isQuality: true }).then(res => {
form[state] = res.base64.includes(',') ? res.base64.split(',')[1] : ''
console.log(form)
}).catch(error => {
console.log('error', error)
})

@ -165,7 +165,8 @@
</div>
<van-uploader v-model="fileList"
multiple
:max-count="5" />
:max-count="5"
@before-read="onBeforeRead" />
<div v-if="imgErrorMsg"
style="font-size: 12px;color: red;text-align: right;padding: 4px 0;">{{ imgErrorMsg }}</div>
</section>
@ -192,7 +193,7 @@ import ImageUtil from '@/utils/image-util.mjs'
import { store } from 'vue-helper'
import URLUtil from '../../utils/url-util.mjs'
import { GoBind } from '@/utils/common-util.mjs'
import { WxBack, Back } from '@/utils/common-util.mjs'
import { Back } from '@/utils/common-util.mjs'
export default {
name: 'complaint-base',
setup(props, context) {
@ -269,23 +270,27 @@ export default {
})
}
const form = reactive({
compBusinessCode: '', //
compBusinessCode2: '', // 2
compPsnName: '', //
issueOccurDatetime: '', //
demandTypeCode: '', // -1: ,12
demandTypeLabel: '',
compTypeCode: '', //
complaintTitle: '', //
complaintText: '', //
idcardTypeCode: '', //
idcardNo: '', //
name: '', //
tel: '', //
address: '', //
openid: ''
})
const initForm = () => {
return {
compBusinessCode: '', //
compBusinessCode2: '', // 2
compPsnName: '', //
issueOccurDatetime: '', //
demandTypeCode: '', // -1: ,12
demandTypeLabel: '',
compTypeCode: '', //
complaintTitle: '', //
complaintText: '', //
idcardTypeCode: '', //
idcardNo: '', //
name: '', //
tel: '', //
address: '', //
openid: ''
}
}
const form = reactive(initForm())
const fileList = ref([])
@ -341,49 +346,6 @@ export default {
})
}
console.log("shhsshsh")
console.log('sjjsjsj')
console.log('const')
console.log("let")
console.log("var")
const addPost = (images) => {
imgErrorMsg.value = null
axios.post('/micro/complaint/addComp', {
name: form.name,
tel: form.tel,
address: form.address,
compPsnName: form.compPsnName,
issueOccurDatetime: form.issueOccurDatetime,
demandTypeCode: form.demandTypeCode,
compTypeCode: form.compTypeCode,
complaintTitle: form.complaintTitle,
complaintText: form.complaintText,
openid: form.openid,
sourceType: isHosp ? 1 : 0,
images: images.join('|'),
bigType: state
}).then((response) => {
if (response.code === 200) {
vant.Toast.success({
message: '提交成功,等待处理!', onClose: () => {
form.compPsnName = ''
form.issueOccurDatetime = ''
form.demandTypeCode = ''
form.demandTypeLabel = ''
view.compTypeLabel = ''
form.compTypeCode = ''
form.complaintTitle = ''
form.complaintText = ''
fileList.value = []
router.push({ path: 'complaint-list' })
}
})
}
})
}
formRef.value.validate().then(() => {
if (state === 1 && fileList.value.length === 0) {
imgErrorMsg.value = '请选择上传图片'
@ -392,20 +354,45 @@ export default {
title: '提示',
message: '是否确定留言?',
}).then(() => {
form.openid = openid
const images = []
if (fileList.value.length > 0) {
if (fileList && fileList.value.length > 0) {
fileList.value.forEach(item => {
ImageUtil.compressBySize(item.file, { isQuality: true }).then(res => {
images.push(res.base64)
if (images.length === fileList.value.length) {
addPost(images)
}
})
images.push(item.content)
})
} else {
addPost(images)
}
imgErrorMsg.value = null
axios.post('/micro/complaint/addComp', {
name: form.name,
tel: form.tel,
address: form.address,
compPsnName: form.compPsnName,
issueOccurDatetime: form.issueOccurDatetime,
demandTypeCode: form.demandTypeCode,
compTypeCode: form.compTypeCode,
complaintTitle: form.complaintTitle,
complaintText: form.complaintText,
openid: openid,
sourceType: isHosp ? 1 : 0,
images: images.join('|'),
bigType: state
}).then((response) => {
if (response.code === 200) {
vant.Toast.success({
message: '提交成功,等待处理!', onClose: () => {
form.compPsnName = ''
form.issueOccurDatetime = ''
form.demandTypeCode = ''
form.demandTypeLabel = ''
view.compTypeLabel = ''
form.compTypeCode = ''
form.complaintTitle = ''
form.complaintText = ''
fileList.value = []
router.push({ path: 'complaint-list' })
}
})
}
})
}).catch(() => {
// on cancel
})
@ -488,6 +475,14 @@ export default {
return false
}
/**
* 图片压缩
* @param {*} file
*/
function onBeforeRead(file) {
return ImageUtil.compressImage(file)
}
return {
form,
formatter,
@ -507,7 +502,8 @@ export default {
isHosp,
validatorTel,
state,
imgErrorMsg
imgErrorMsg,
onBeforeRead
}
},
}

@ -0,0 +1,82 @@
<template>
<div id="app"
v-cloak>
<div v-if="show">
<van-form class="card__box"
label-width="80px"
@submit="onSubmit">
<van-field class="input"
v-model="patient.idCardNo"
label="身份证号"
name="idCardNo"
autofocus
maxLength="18"
placeholder="请填写身份证号码"
:border="false"
:rules="[{ required: true, message: '必填' }]">
</van-field>
<van-field class="input"
v-model="patient.name"
label="姓&emsp;&emsp;名"
name="name"
maxLength="18"
placeholder="请填写真实姓名"
:border="false"
:rules="[{ required: true, message: '必填' }]">
</van-field>
<div style="margin: 16px 0; width:100%;text-align:center;">
<span @click="onClick()"
style="color:var(--color-primary)">{{text}}</span>
</div>
</van-form>
</div>
</div>
</template>
<script>
import { Go } from '@/utils/common-util.mjs'
export default {
data() {
return {
show: false,
text: '人脸识别',
patient: {
idCardNo: '',
name: ''
},
redirect_uri: ''
}
},
created() {
if(URLUtil.getQueryVar('verifyInfo')){
this.patient.idCardNo = URLUtil.getQueryVar('verifyInfo').split('_')[0]
this.patient.name = decodeURIComponent(URLUtil.getQueryVar('verifyInfo').split('_')[1])
this.redirect_uri = decodeURIComponent(URLUtil.getQueryVar('verifyInfo').split('_')[2])
}
if (!URLUtil.getQueryVar('wechatCode') && !URLUtil.getQueryVar('registerOrderId')) { //
if (vant) {
vant.Toast.loading({ duration: 0, forbidClick: true, message: '页面加载中...' })
}
return window.location.href = 'https://health.tengmed.com/open/getUserCode?redirect_uri=' + window.location.href
}
this.show = true
},
methods: {
onClick() {
this.$axios.post('/wx/healthCode/registerUniformVerifyOrder.do', {
idCardNo: this.patient.idCardNo,
name: this.patient.name,
wechatCode: URLUtil.getQueryVar('wechatCode')
}).then(resp => {
if (resp.code === 200) {
window.location.href = `https://health.tengmed.com/open/idAuth?order_id=${resp.data}&hospital_id=31737&redirect_uri=${this.redirect_uri}?orderId=${resp.data}`
} else {
window.location.reload()
}
})
}
},
}
</script>

@ -427,7 +427,7 @@ export default {
const idCard = patient.value.idCardNo
patient.value.showCardNo = idCard.length === 18 ? idCard.substring(0, 3) + '********' + idCard.substring(idCard.length - 4) : idCard
if (!patient.value || (patient.value && !patient.value.patientId)) return vant.Toast.fail('患者参数缺失,无法查询住院记录!')
axios.RGet('wx/inHosp/getHospListByPatientId', {
axios.RGet('/wx/inHosp/getHospListByPatientId', {
patientId: patient.value.patientId
}).then(response => {
if (response.code === 200) {

@ -1,433 +1,436 @@
<template>
<div class="consultation-tool-bar">
<div class="send">
<div class="send__voice">
<van-icon name="arrow-up"
size="28"
color="#929292"
:class="{ 'arrowTransform': tool.show, 'arrowTransformReturn': !tool.show }"
@click.stop="tool.show = !tool.show; cancelRevoke()" />
</div>
<van-field v-show="false"
v-model="test"
style="width: 40px;"></van-field>
<van-field class="send__input"
ref="input"
type="textarea"
autosize
rows="1"
v-model="message"
placeholder="请输入"
enterkeyhint="send"
@focus="cancelRevoke"
@keyup.enter="handleSendMessage"
@update:model-value="resizeInput" />
<div class="send__btn"
@click="handleSendMessage"> </div>
</div>
<transition name="fade">
<div v-if="tool.show"
class="tool_box"
:style="{ 'bottom': `${bottomHeight}px` }">
<div class="tool_item">
<van-uploader multiple
:before-read="onBeforeRead"
@click-upload="tool.show = !tool.show">
<svg t="1663317574777"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="21868"
width="28"
height="28">
<path d="M841.71335 65.290005 182.285626 65.290005c-64.511269 0-116.995621 52.484352-116.995621 116.995621L65.290005 841.71335c0 64.511269 52.484352 116.995621 116.995621 116.995621l659.427724 0c64.511269 0 116.995621-52.484352 116.995621-116.995621L958.708971 182.285626C958.708971 117.774357 906.225643 65.290005 841.71335 65.290005zM182.285626 107.833961l659.427724 0c41.051975 0 74.451666 33.398668 74.451666 74.451666l0 136.557142c-150.09446 5.26184-290.370297 66.084091-396.978337 172.692131-49.960879 49.961902-89.841168 107.331517-118.694309 169.625282-83.496669-70.835302-204.372667-75.376735-292.65841-13.617136L107.833961 182.285626C107.833961 141.232628 141.232628 107.833961 182.285626 107.833961zM107.833961 841.71335 107.833961 702.627618c76.54228-74.311473 198.833511-74.234725 275.272437 0.24457-24.303522 65.298192-37.026288 135.112234-37.026288 206.91149 0 2.223644 0.343831 4.366448 0.977257 6.381337L182.285626 916.165016C141.232628 916.165016 107.833961 882.766348 107.833961 841.71335zM841.71335 916.165016 387.646807 916.165016c0.633427-2.01489 0.977257-4.157693 0.977257-6.381337 0-146.71755 57.053414-284.572244 160.647817-388.166647 98.570993-98.570993 228.166583-154.963351 366.894158-160.204725L916.166039 841.71335C916.165016 882.766348 882.766348 916.165016 841.71335 916.165016z"
p-id="21869"
fill="#707070"></path>
<path d="M312.397986 413.458683c60.8376 0 110.332874-49.494251 110.332874-110.332874s-49.494251-110.332874-110.332874-110.332874-110.332874 49.494251-110.332874 110.332874S251.559363 413.458683 312.397986 413.458683zM312.397986 235.337913c37.378306 0 67.788919 30.40959 67.788919 67.788919s-30.40959 67.788919-67.788919 67.788919-67.788919-30.40959-67.788919-67.788919S275.018657 235.337913 312.397986 235.337913z"
p-id="21870"
fill="#707070"></path>
</svg>
<div class="tool_item_title">图片</div>
</van-uploader>
</div>
<div class="tool_item"
@click="openTreat">
<van-icon name="records"
color="#929292"
size="30" />
<div class="tool_item_title">就诊记录</div>
</div>
<div class="tool_item"
@click="toRecipe">
<svg t="1681180334020"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3639"
width="28"
height="28">
<path d="M276.232215 0h569.367801a25.211231 25.211231 0 0 1 25.151228 25.151228v971.657444a25.221232 25.221232 0 0 1-25.151228 25.161229H74.952387A25.221232 25.221232 0 0 1 49.801159 996.808672v-770.637628a25.101226 25.101226 0 0 1 8.780428-19.000928L258.531351 7.310357A25.451243 25.451243 0 0 1 276.232215 0z m25.001221 50.17245l-0.270014 176.008594a25.001221 25.001221 0 0 1-25.00122 25.001221v0.130006h-176.008595v720.325172h720.395176V50.222452zM135.525344 201.009815h115.425636l0.130007-115.425636z m0 0"
fill="#656666"
p-id="3640"></path>
<path d="M175.467295 837.590898h569.217793v33.551638H175.467295z m0-314.015333h217.770633v33.551638H175.467295z m467.872845-157.767703l31.821554-49.782431a4.190205 4.190205 0 0 1 3.600176-2.000098h72.813555a4.070199 4.070199 0 0 1 3.720182 2.260111 3.810186 3.810186 0 0 1-0.250013 4.260208l-73.003564 108.225284a4.240207 4.240207 0 0 0 0 4.660228l79.003857 117.005713a4.180204 4.180204 0 0 1-3.460169 6.530319h-77.443781a4.370213 4.370213 0 0 1-3.600176-2.000098l-36.201767-54.172645a4.220206 4.220206 0 0 0-7.000342-0.130006l-36.801797 54.582665a4.000195 4.000195 0 0 1-3.460169 1.860091h-74.163621a4.120201 4.120201 0 0 1-3.730183-2.260111 3.810186 3.810186 0 0 1 0.270014-4.260208l77.343776-115.685649a4.260208 4.260208 0 0 0 0-4.670228l-90.654426-128.466272h-4.120202v88.004297a4.150203 4.150203 0 0 1-4.120201 4.120201h-62.843068a4.140202 4.140202 0 0 1-4.120201-4.120201V142.686967a4.140202 4.140202 0 0 1 4.120201-4.120201h106.275189c50.852483 0 88.514322 29.421437 88.514322 82.524029 0 29.69145-13.300649 55.91273-37.531833 70.293433a4.000195 4.000195 0 0 0-2.000097 2.66013 3.820187 3.820187 0 0 0 0.520025 3.200156l48.072347 69.093374c2.000098 2.270111 6.790332 2.130104 8.510416-0.530026zM497.883038 205.230021v33.541638a4.150203 4.150203 0 0 0 4.120201 4.120201h22.33109c7.050344 0 18.760916-0.540026 24.351189-5.32026 4.120201-3.600176 4.930241-11.720572 4.930241-16.900825s-0.670033-11.190546-4.790234-14.780722c-5.450266-4.660228-17.700864-4.92024-24.491196-4.92024h-22.33109a4.260208 4.260208 0 0 0-4.120201 4.260208z m-322.415743 422.92065h569.487807v33.541638H175.467295z m0.140006 104.63511h569.217794v33.541637H175.607301z m0 0"
fill="#656666"
p-id="3641"></path>
</svg>
<div class="tool_item_title">处方</div>
</div>
<div class="tool_item"
@click="toComment">
<svg t="1686299854270"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3239"
width="28"
height="28">
<path d="M512 64C264.533333 64 64 264.533333 64 512s200.533333 448 448 448 448-200.533333 448-448S759.466667 64 512 64z m0 853.333333C288 917.333333 106.666667 736 106.666667 512S288 106.666667 512 106.666667s405.333333 181.333333 405.333333 405.333333-181.333333 405.333333-405.333333 405.333333z"
fill="#666666"
p-id="3240"></path>
<path d="M627.2 622.933333c-29.866667 32-70.4 49.066667-115.2 49.066667-42.666667 0-83.2-17.066667-113.066667-46.933333-8.533333-8.533333-21.333333-8.533333-29.866666 0-8.533333 8.533333-8.533333 21.333333 0 29.866666 38.4 38.4 89.6 59.733333 142.933333 59.733334 55.466667 0 106.666667-21.333333 145.066667-61.866667 8.533333-8.533333 8.533333-21.333333 0-29.866667-8.533333-8.533333-21.333333-8.533333-29.866667 0z"
fill="#666666"
p-id="3241"></path>
<path d="M384 448m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z"
fill="#666666"
p-id="3242"></path>
<path d="M640 448m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z"
fill="#666666"
p-id="3243"></path>
</svg>
<div class="tool_item_title">评价医生</div>
</div>
</div>
</transition>
<van-popup v-model:show="tool.treat.show"
position="right"
:style="{ height: 'calc(100% - 0px)', 'width': '55%', 'box-sizing': 'border-box', 'padding-top': paddingTop }">
<div style="font-size: 15px;font-weight: bolder;color: #606266;padding: 10px;">就诊记录</div>
<section v-if="tool.treat.data.length > 0">
<van-cell v-for="(treat, k) of tool.treat.data"
:key="k">
<div class="treat_item_time">{{ treat.registerDate }}</div>
<div class="treat_item">
<div>主诉</div>
<div>{{ treat.complaint }}</div>
</div>
<div class="treat_item">
<div>症状</div>
<div>{{ treat.symptom }}</div>
</div>
<div class="treat_item">
<div>诊断</div>
<div>{{ treat.diagnose }}</div>
</div>
<div class="treat_item">
<div>门诊号</div>
<div>{{ treat.mzNum }}</div>
</div>
<div class="treat_item">
<div>医生</div>
<div>{{ treat.doctName }}</div>
</div>
</van-cell>
</section>
<van-empty v-else
:image-size="[60, 40]"
description="暂无就诊记录" />
</van-popup>
</div>
<div class="consultation-tool-bar">
<div class="send">
<div class="send__voice">
<van-icon name="arrow-up"
size="28"
color="#929292"
:class="{ 'arrowTransform': tool.show, 'arrowTransformReturn': !tool.show }"
@click.stop="tool.show = !tool.show; cancelRevoke()" />
</div>
<van-field v-show="false"
v-model="test"
style="width: 40px;"></van-field>
<van-field class="send__input"
ref="input"
type="textarea"
autosize
rows="1"
v-model="message"
placeholder="请输入"
enterkeyhint="send"
@focus="cancelRevoke"
@keyup.enter="handleSendMessage"
@update:model-value="resizeInput" />
<div class="send__btn"
@click="handleSendMessage"> </div>
</div>
<transition name="fade">
<div v-if="tool.show"
class="tool_box"
:style="{ 'bottom': `${bottomHeight}px` }">
<div class="tool_item">
<van-uploader multiple
:before-read="onBeforeRead"
@click-upload="tool.show = !tool.show">
<svg t="1663317574777"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="21868"
width="28"
height="28">
<path d="M841.71335 65.290005 182.285626 65.290005c-64.511269 0-116.995621 52.484352-116.995621 116.995621L65.290005 841.71335c0 64.511269 52.484352 116.995621 116.995621 116.995621l659.427724 0c64.511269 0 116.995621-52.484352 116.995621-116.995621L958.708971 182.285626C958.708971 117.774357 906.225643 65.290005 841.71335 65.290005zM182.285626 107.833961l659.427724 0c41.051975 0 74.451666 33.398668 74.451666 74.451666l0 136.557142c-150.09446 5.26184-290.370297 66.084091-396.978337 172.692131-49.960879 49.961902-89.841168 107.331517-118.694309 169.625282-83.496669-70.835302-204.372667-75.376735-292.65841-13.617136L107.833961 182.285626C107.833961 141.232628 141.232628 107.833961 182.285626 107.833961zM107.833961 841.71335 107.833961 702.627618c76.54228-74.311473 198.833511-74.234725 275.272437 0.24457-24.303522 65.298192-37.026288 135.112234-37.026288 206.91149 0 2.223644 0.343831 4.366448 0.977257 6.381337L182.285626 916.165016C141.232628 916.165016 107.833961 882.766348 107.833961 841.71335zM841.71335 916.165016 387.646807 916.165016c0.633427-2.01489 0.977257-4.157693 0.977257-6.381337 0-146.71755 57.053414-284.572244 160.647817-388.166647 98.570993-98.570993 228.166583-154.963351 366.894158-160.204725L916.166039 841.71335C916.165016 882.766348 882.766348 916.165016 841.71335 916.165016z"
p-id="21869"
fill="#707070"></path>
<path d="M312.397986 413.458683c60.8376 0 110.332874-49.494251 110.332874-110.332874s-49.494251-110.332874-110.332874-110.332874-110.332874 49.494251-110.332874 110.332874S251.559363 413.458683 312.397986 413.458683zM312.397986 235.337913c37.378306 0 67.788919 30.40959 67.788919 67.788919s-30.40959 67.788919-67.788919 67.788919-67.788919-30.40959-67.788919-67.788919S275.018657 235.337913 312.397986 235.337913z"
p-id="21870"
fill="#707070"></path>
</svg>
<div class="tool_item_title">图片</div>
</van-uploader>
</div>
<div class="tool_item"
@click="openTreat">
<van-icon name="records"
color="#929292"
size="30" />
<div class="tool_item_title">就诊记录</div>
</div>
<div class="tool_item"
@click="toRecipe">
<svg t="1681180334020"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3639"
width="28"
height="28">
<path d="M276.232215 0h569.367801a25.211231 25.211231 0 0 1 25.151228 25.151228v971.657444a25.221232 25.221232 0 0 1-25.151228 25.161229H74.952387A25.221232 25.221232 0 0 1 49.801159 996.808672v-770.637628a25.101226 25.101226 0 0 1 8.780428-19.000928L258.531351 7.310357A25.451243 25.451243 0 0 1 276.232215 0z m25.001221 50.17245l-0.270014 176.008594a25.001221 25.001221 0 0 1-25.00122 25.001221v0.130006h-176.008595v720.325172h720.395176V50.222452zM135.525344 201.009815h115.425636l0.130007-115.425636z m0 0"
fill="#656666"
p-id="3640"></path>
<path d="M175.467295 837.590898h569.217793v33.551638H175.467295z m0-314.015333h217.770633v33.551638H175.467295z m467.872845-157.767703l31.821554-49.782431a4.190205 4.190205 0 0 1 3.600176-2.000098h72.813555a4.070199 4.070199 0 0 1 3.720182 2.260111 3.810186 3.810186 0 0 1-0.250013 4.260208l-73.003564 108.225284a4.240207 4.240207 0 0 0 0 4.660228l79.003857 117.005713a4.180204 4.180204 0 0 1-3.460169 6.530319h-77.443781a4.370213 4.370213 0 0 1-3.600176-2.000098l-36.201767-54.172645a4.220206 4.220206 0 0 0-7.000342-0.130006l-36.801797 54.582665a4.000195 4.000195 0 0 1-3.460169 1.860091h-74.163621a4.120201 4.120201 0 0 1-3.730183-2.260111 3.810186 3.810186 0 0 1 0.270014-4.260208l77.343776-115.685649a4.260208 4.260208 0 0 0 0-4.670228l-90.654426-128.466272h-4.120202v88.004297a4.150203 4.150203 0 0 1-4.120201 4.120201h-62.843068a4.140202 4.140202 0 0 1-4.120201-4.120201V142.686967a4.140202 4.140202 0 0 1 4.120201-4.120201h106.275189c50.852483 0 88.514322 29.421437 88.514322 82.524029 0 29.69145-13.300649 55.91273-37.531833 70.293433a4.000195 4.000195 0 0 0-2.000097 2.66013 3.820187 3.820187 0 0 0 0.520025 3.200156l48.072347 69.093374c2.000098 2.270111 6.790332 2.130104 8.510416-0.530026zM497.883038 205.230021v33.541638a4.150203 4.150203 0 0 0 4.120201 4.120201h22.33109c7.050344 0 18.760916-0.540026 24.351189-5.32026 4.120201-3.600176 4.930241-11.720572 4.930241-16.900825s-0.670033-11.190546-4.790234-14.780722c-5.450266-4.660228-17.700864-4.92024-24.491196-4.92024h-22.33109a4.260208 4.260208 0 0 0-4.120201 4.260208z m-322.415743 422.92065h569.487807v33.541638H175.467295z m0.140006 104.63511h569.217794v33.541637H175.607301z m0 0"
fill="#656666"
p-id="3641"></path>
</svg>
<div class="tool_item_title">处方</div>
</div>
<div class="tool_item"
@click="toComment">
<svg t="1686299854270"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3239"
width="28"
height="28">
<path d="M512 64C264.533333 64 64 264.533333 64 512s200.533333 448 448 448 448-200.533333 448-448S759.466667 64 512 64z m0 853.333333C288 917.333333 106.666667 736 106.666667 512S288 106.666667 512 106.666667s405.333333 181.333333 405.333333 405.333333-181.333333 405.333333-405.333333 405.333333z"
fill="#666666"
p-id="3240"></path>
<path d="M627.2 622.933333c-29.866667 32-70.4 49.066667-115.2 49.066667-42.666667 0-83.2-17.066667-113.066667-46.933333-8.533333-8.533333-21.333333-8.533333-29.866666 0-8.533333 8.533333-8.533333 21.333333 0 29.866666 38.4 38.4 89.6 59.733333 142.933333 59.733334 55.466667 0 106.666667-21.333333 145.066667-61.866667 8.533333-8.533333 8.533333-21.333333 0-29.866667-8.533333-8.533333-21.333333-8.533333-29.866667 0z"
fill="#666666"
p-id="3241"></path>
<path d="M384 448m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z"
fill="#666666"
p-id="3242"></path>
<path d="M640 448m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z"
fill="#666666"
p-id="3243"></path>
</svg>
<div class="tool_item_title">评价医生</div>
</div>
</div>
</transition>
<van-popup v-model:show="tool.treat.show"
position="right"
:style="{ height: 'calc(100% - 0px)', 'width': '55%', 'box-sizing': 'border-box', 'padding-top': `${paddingTop}px` }">
<div style="font-size: 15px;font-weight: bolder;color: #606266;padding: 10px;">就诊记录</div>
<section v-if="tool.treat.data.length > 0">
<van-cell v-for="(treat, k) of tool.treat.data"
:key="k">
<div class="treat_item_time">{{ treat.registerDate }}</div>
<div class="treat_item">
<div>主诉</div>
<div>{{ treat.complaint }}</div>
</div>
<div class="treat_item">
<div>症状</div>
<div>{{ treat.symptom }}</div>
</div>
<div class="treat_item">
<div>诊断</div>
<div>{{ treat.diagnose }}</div>
</div>
<div class="treat_item">
<div>门诊号</div>
<div>{{ treat.mzNum }}</div>
</div>
<div class="treat_item">
<div>医生</div>
<div>{{ treat.doctName }}</div>
</div>
</van-cell>
</section>
<van-empty v-else
:image-size="[60, 40]"
description="暂无就诊记录" />
</van-popup>
</div>
</template>
<script>
import { reactive, toRefs, watch, ref, onUnmounted } from 'vue';
import { useRoute, useRouter } from 'vue-router';
export default {
props: {
clickBlur: {
type: Boolean,
default: false
},
blurTime: {
type: Number
},
order: {
type: Object,
default: () => { }
}
},
emits: ['toRecipe'],
setup(props, context) {
const route = useRoute();
const router = useRouter();
const input = ref(null)
const toRecipe = () => context.emit('toRecipe')
const state = reactive({
message: '',
test: '你',
paddingTop: '40px'
})
/**
* 将消息传给父组件
*/
function handleSendMessage() {
context.emit('cancelRevoke')
state.message = state.message.trim().replace(/[\r\n]/g, "")
context.emit('sendMessage', state.message)
state.message = ''
resizeInput()
}
/**
* 图片上传之前
* @param {Any} file 图片文件
*/
function onBeforeRead(file) {
context.emit('sendImage', Array.isArray(file) ? file : [file])
resizeInput()
}
/**
* 监听滚动失焦
*/
watch(() => props.clickBlur, (newVal, oldVal) => {
if (newVal) {
if (new Date().getTime() - props.blurTime > 300)
input.value.blur()
}
})
//
const tool = reactive({
show: false,
treat: {
show: false,
data: []
},
dom: null
})
/**
* 打开就诊记录
*/
function openTreat() {
tool.show = !tool.show
tool.treat.show = !tool.treat.show
getTreatRecord()
}
document.addEventListener('scroll', closeTool, false)
document.addEventListener('click', closeTool, false)
function closeTool(e) {
tool.show = false
document.onmousemove = null;
document.onmouseup = null;
document.onmousedown = null;
}
document.onmousemove = (e) => closeTool(e)
document.onmousedown = (e) => closeTool(e)
onUnmounted(() => {
document.removeEventListener('scroll', closeTool)
document.removeEventListener('click', closeTool)
})
/**
* 获取患者就诊记录
* @param {String} patientId 患者id115666
* @param {String} deptCode 科室代码0307
*/
function getTreatRecord(patientId, deptCode) {
axios.get(`/wx/treat/getTreatList.do?patientId=${patientId}&deptCode=${deptCode}`).then(response => {
if (response.code === 200) {
treat.data = resp.data
}
})
}
/**
* 工具标签高度变化
*/
const bottomHeight = ref(52)
const initBottomHeight = bottomHeight.value
function resizeInput() {
if (document.querySelector('.send').clientHeight > 52) {
setTimeout(() => {
context.emit('resizeInput', document.querySelector('.send').clientHeight - 52)
}, 100);
}
}
/**
* 监听工具箱打开重新计算工具箱bottom距离
*/
watch(() => tool.show, (newVal) => {
if (newVal) {
bottomHeight.value = initBottomHeight + (document.querySelector('.send').clientHeight - 52)
}
})
function toComment() {
if (!props.order.outTradeNo) return vant.Toast.fail('订单信息缺失,无法前往评价订单!')
router.push({ path: '/comment', query: { outTradeNo: props.order.outTradeNo } })
}
function cancelRevoke() {
context.emit('cancelRevoke')
}
return {
...toRefs(state),
onBeforeRead,
input,
handleSendMessage,
tool,
openTreat,
resizeInput,
bottomHeight,
toRecipe,
toComment,
cancelRevoke
}
},
props: {
clickBlur: {
type: Boolean,
default: false
},
blurTime: {
type: Number
},
order: {
type: Object,
default: () => { }
}
},
emits: ['toRecipe'],
setup(props, context) {
const route = useRoute();
const router = useRouter();
const input = ref(null)
const toRecipe = () => context.emit('toRecipe')
const state = reactive({
message: '',
test: '你',
paddingTop: 40
})
/**
* 将消息传给父组件
*/
function handleSendMessage() {
context.emit('cancelRevoke')
state.message = state.message.trim().replace(/[\r\n]/g, "")
context.emit('sendMessage', state.message)
state.message = ''
resizeInput()
}
/**
* 图片上传之前
* @param {Any} file 图片文件
*/
function onBeforeRead(file) {
context.emit('sendImage', Array.isArray(file) ? file : [file])
resizeInput()
}
/**
* 监听滚动失焦
*/
watch(() => props.clickBlur, (newVal, oldVal) => {
if (newVal) {
if (new Date().getTime() - props.blurTime > 300)
input.value.blur()
}
})
//
const tool = reactive({
show: false,
treat: {
show: false,
data: []
},
dom: null
})
/**
* 打开就诊记录
*/
function openTreat() {
tool.show = !tool.show
tool.treat.show = !tool.treat.show
if (document.getElementsByClassName('symp_container').length > 0) {
const height = document.getElementsByClassName('symp_container')[0].clientHeight
state.paddingTop = 40 + height
}
getTreatRecord()
}
document.addEventListener('scroll', closeTool, false)
document.addEventListener('click', closeTool, false)
function closeTool(e) {
tool.show = false
document.onmousemove = null;
document.onmouseup = null;
document.onmousedown = null;
}
document.onmousemove = (e) => closeTool(e)
document.onmousedown = (e) => closeTool(e)
onUnmounted(() => {
document.removeEventListener('scroll', closeTool)
document.removeEventListener('click', closeTool)
})
/**
* 获取患者就诊记录
* @param {String} patientId 患者id115666
* @param {String} deptCode 科室代码0307
*/
function getTreatRecord(patientId, deptCode) {
axios.get(`/wx/treat/getTreatList.do?patientId=${patientId}&deptCode=${deptCode}`).then(response => {
if (response.code === 200) {
treat.data = resp.data
}
})
}
/**
* 工具标签高度变化
*/
const bottomHeight = ref(52)
const initBottomHeight = bottomHeight.value
function resizeInput() {
if (document.querySelector('.send').clientHeight > 52) {
setTimeout(() => {
context.emit('resizeInput', document.querySelector('.send').clientHeight - 52)
}, 100);
}
}
/**
* 监听工具箱打开重新计算工具箱bottom距离
*/
watch(() => tool.show, (newVal) => {
if (newVal) {
bottomHeight.value = initBottomHeight + (document.querySelector('.send').clientHeight - 52)
}
})
function toComment() {
if (!props.order.outTradeNo) return vant.Toast.fail('订单信息缺失,无法前往评价订单!')
router.push({ path: '/comment', query: { outTradeNo: props.order.outTradeNo } })
}
function cancelRevoke() {
context.emit('cancelRevoke')
}
return {
...toRefs(state),
onBeforeRead,
input,
handleSendMessage,
tool,
openTreat,
resizeInput,
bottomHeight,
toRecipe,
toComment,
cancelRevoke
}
},
}
</script>
<style scoped>
.consultation-tool-bar {
width: 100%;
height: auto;
background: #f0efef;
width: 100%;
height: auto;
background: #f0efef;
}
.send {
width: calc(100% - 10px);
height: auto;
padding: 5px;
display: flex;
flex-direction: row;
justify-content: space-between;
position: relative;
border-top: 1px solid var(--border-a);
width: calc(100% - 10px);
height: auto;
padding: 5px;
display: flex;
flex-direction: row;
justify-content: space-between;
position: relative;
border-top: 1px solid var(--border-a);
}
.send__voice {
width: 34px;
height: 34px;
display: flex;
justify-content: center;
align-items: center;
padding: 4px;
margin: auto;
width: 34px;
height: 34px;
display: flex;
justify-content: center;
align-items: center;
padding: 4px;
margin: auto;
}
.send__input {
width: calc(100% - 120px);
height: auto;
max-height: 120px;
padding: 5px 10px;
margin: auto;
border-radius: 5px;
width: calc(100% - 120px);
height: auto;
max-height: 120px;
padding: 5px 10px;
margin: auto;
border-radius: 5px;
}
.send__btn {
width: 55px;
height: 35px;
text-align: center;
background: #6ecb94;
border-radius: 5px;
line-height: 35px;
margin: auto;
color: #ffffff;
width: 55px;
height: 35px;
text-align: center;
background: #6ecb94;
border-radius: 5px;
line-height: 35px;
margin: auto;
color: #ffffff;
}
.arrowTransform {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(180deg);
transition: 0.2s;
transform-origin: center;
transform: rotateZ(180deg);
}
.arrowTransformReturn {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(0deg);
transition: 0.2s;
transform-origin: center;
transform: rotateZ(0deg);
}
.tool_box {
width: 100%;
height: 60px;
background-color: #f1f1f1;
position: absolute;
left: 0;
display: flex;
flex-direction: row;
align-items: center;
text-align: center;
width: 100%;
height: 60px;
background-color: #f1f1f1;
position: absolute;
left: 0;
display: flex;
flex-direction: row;
align-items: center;
text-align: center;
}
.tool_item {
flex: 1;
padding: 10px;
flex: 1;
padding: 10px;
}
.tool_item .icon path {
fill: #929292;
fill: #929292;
}
.tool_item_title {
font-size: 12px;
color: #929292;
font-size: 12px;
color: #929292;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.4s;
transition: opacity 0.4s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
opacity: 0;
}
.treat .van-cell {
width: calc(100% - 8px);
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
border: 1px solid #ebeef5;
transition: 0.3 time;
margin: 5px 4px;
padding: 10px;
width: calc(100% - 8px);
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
border: 1px solid #ebeef5;
transition: 0.3 time;
margin: 5px 4px;
padding: 10px;
}
.treat_item_time {
text-align: left;
font-weight: bold;
text-align: left;
font-weight: bold;
}
.treat_item {
text-align: left;
text-align: left;
}
.treat_item div:nth-child(1) {
position: absolute;
color: #606266;
font-weight: bold;
width: 60px;
overflow-wrap: normal;
position: absolute;
color: #606266;
font-weight: bold;
width: 60px;
overflow-wrap: normal;
}
.treat_item div:nth-child(2) {
padding-left: 50px;
min-height: 24px;
padding-left: 50px;
min-height: 24px;
}
.treat_item:nth-child(5) div:nth-child(1) {
font-size: 12px;
font-size: 12px;
}
</style>

@ -1,42 +1,43 @@
<template>
<div class="consultation-nav-bar">
<van-nav-bar :left-arrow="true"
:placeholder="true"
@click-left="handleReturn"
style="background-color: var(--color-primary);margin: 0;">
:placeholder="true"
@click-left="handleReturn"
style="background-color: var(--color-primary);margin: 0;">
<template #left>
<div class="header__btn"
style="margin: 0 14px;">
style="margin: 0 14px;">
<svg t="1618975131673"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3215"
width="14"
height="14">
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3215"
width="14"
height="14">
<path d="M778.671 926.323a56.811 56.811 0 1 1-80.33 80.331L243.85 552.165a56.811 56.811 0 0 1 0-80.33l454.49-454.49a56.811 56.811 0 1 1 80.33 80.331L364.348 512 778.67 926.323z"
p-id="3216"
fill="#ffffff"></path>
p-id="3216"
fill="#ffffff"></path>
</svg>
</div>
</template>
<template #right>
<template #title>
<slot name="revoke"></slot>
</template>
<template #right>
<div class="header__btn">
<svg t="1663312873307"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="15872"
width="24"
height="24">
<path
d="M626.568192 981.999616l-23.379968 0-36.857856 0.283648L68.137984 982.283264l0-23.989248c0 0-10.815488-134.006784 186.535936-168.308736 0 0 150.230016-20.28032 160.748544-61.595648 0 0 5.732352-4.596736 1.502208-52.578304-9.017344-102.161408-75.86816-150.234112-102.909952-189.293568-27.041792-39.063552-29.293568-84.13184-29.293568-84.13184 0-11.264 4.716544-15.391744 12.560384-22.626304 9.696256-8.950784 6.786048-18.4576 4.934656-28.52864-7.04512-38.23616-7.666688-99.662848-0.970752-138.138624 1.502208-45.820928 43.56608-82.625536 43.56608-82.625536 7.892992-6.695936 15.803392-14.062592 21.343232-22.898688 1.547264-2.460672 2.970624-5.09952 3.8144-7.897088 3.16928-10.548224-7.560192-18.292736-5.407744-29.51168 1.942528-10.116096 19.280896-10.61376 29.766656-11.164672 23.614464-1.243136 47.347712-2.172928 70.925312-0.366592C641.71008 72.155136 699.725824 137.1136 699.725824 137.1136c13.73696 16.449536 22.787072 36.566016 28.23168 57.184256 1.630208 6.16448 3.028992 12.45696 3.785728 18.79552 5.501952 31.602688 5.481472 64.559104 3.770368 96.494592-0.815104 15.22688-2.584576 30.215168-4.819968 45.282304-1.17248 7.8848-0.571392 15.222784 4.70016 21.523456 4.4032 5.271552 9.44128 8.95488 11.60192 15.881216 1.011712 3.238912 1.275904 6.736896 1.275904 10.112 0 0-2.255872 45.068288-29.297664 84.13184-27.041792 39.059456-93.893632 87.13216-102.905856 189.293568-4.23424 47.981568 1.502208 52.578304 1.502208 52.578304 10.514432 41.314304 160.748544 61.595648 160.748544 61.595648 199.55712 37.010432 186.53184 168.308736 186.53184 168.308736l0 23.989248-131.3792 0 20.70016-0.283648L836.49536 982.00064l-36.64384 0L626.568192 982.00064 626.568192 981.999616z"
p-id="15873"
fill="#ffffff"></path>
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="15872"
width="24"
height="24">
<path d="M626.568192 981.999616l-23.379968 0-36.857856 0.283648L68.137984 982.283264l0-23.989248c0 0-10.815488-134.006784 186.535936-168.308736 0 0 150.230016-20.28032 160.748544-61.595648 0 0 5.732352-4.596736 1.502208-52.578304-9.017344-102.161408-75.86816-150.234112-102.909952-189.293568-27.041792-39.063552-29.293568-84.13184-29.293568-84.13184 0-11.264 4.716544-15.391744 12.560384-22.626304 9.696256-8.950784 6.786048-18.4576 4.934656-28.52864-7.04512-38.23616-7.666688-99.662848-0.970752-138.138624 1.502208-45.820928 43.56608-82.625536 43.56608-82.625536 7.892992-6.695936 15.803392-14.062592 21.343232-22.898688 1.547264-2.460672 2.970624-5.09952 3.8144-7.897088 3.16928-10.548224-7.560192-18.292736-5.407744-29.51168 1.942528-10.116096 19.280896-10.61376 29.766656-11.164672 23.614464-1.243136 47.347712-2.172928 70.925312-0.366592C641.71008 72.155136 699.725824 137.1136 699.725824 137.1136c13.73696 16.449536 22.787072 36.566016 28.23168 57.184256 1.630208 6.16448 3.028992 12.45696 3.785728 18.79552 5.501952 31.602688 5.481472 64.559104 3.770368 96.494592-0.815104 15.22688-2.584576 30.215168-4.819968 45.282304-1.17248 7.8848-0.571392 15.222784 4.70016 21.523456 4.4032 5.271552 9.44128 8.95488 11.60192 15.881216 1.011712 3.238912 1.275904 6.736896 1.275904 10.112 0 0-2.255872 45.068288-29.297664 84.13184-27.041792 39.059456-93.893632 87.13216-102.905856 189.293568-4.23424 47.981568 1.502208 52.578304 1.502208 52.578304 10.514432 41.314304 160.748544 61.595648 160.748544 61.595648 199.55712 37.010432 186.53184 168.308736 186.53184 168.308736l0 23.989248-131.3792 0 20.70016-0.283648L836.49536 982.00064l-36.64384 0L626.568192 982.00064 626.568192 981.999616z"
p-id="15873"
fill="#ffffff"></path>
</svg>
</div>
</template>
@ -80,6 +81,7 @@ export default {
}
.consultation-nav-bar >>> .van-nav-bar__title {
width: calc(100vw - 116px);
color: #fff;
font-size: 15px;
}

@ -4,14 +4,14 @@
<nav-header @back="onBack">
<template v-if="orderState === 0"
v-slot:revoke>
<div>
<div style="text-align: right;display: flex;align-items: center;justify-content: flex-end;">
<van-button v-if="showRevoke"
size="mini"
style="margin-right: 10px;border-radius: 5px;"
@click="cancelRevoke">取消</van-button>
<van-button type="warning"
size="mini"
style="margin-right: 10px;border-radius: 5px;"
style="border-radius: 5px;"
@click="confirmRevoke">撤销</van-button>
</div>
</template>
@ -62,7 +62,8 @@
<transition-group name="list"
appear>
<div class="scroll_dev"
style="height: calc(100vh - 130px); overflow-y: auto;">
style="overflow-y: auto;"
:style="{height: receptionState === 0 || receptionState === null || receptionState === undefined? 'calc(100vh - 170px)': 'calc(100vh - 130px)'}">
<div v-for="(item, index) of msgList"
:key="item.sendId"
:i="item.showTime = getTime(item.createTime, item)"
@ -220,6 +221,7 @@ export default {
state.patientId = orderInfo.patientId
state.isSymptom = orderInfo.isSymptom
state.receptionState = orderInfo.receptionState
console.log('state.receptionState', state.receptionState)
//
state.doctAvatar = orderInfo.headImg
state.doctName = orderInfo.doctName
@ -261,6 +263,8 @@ export default {
nextTick(() => {
if (state.receptionState === 0 || state.receptionState === null || state.receptionState === undefined) {
state.conHeight = state.conHeight + 30 + 20
} else {
state.conHeight = 80
}
state.initConHeight = state.conHeight
})

@ -1,7 +1,6 @@
<!-- 问诊医生主页 -->
<template>
<div class="doctor-detail"
style="height: calc(100vh - 0px);">
<div class="doctor-home">
<nav-header title="医生信息"
:showTab="false"></nav-header>
<van-list v-model:loading="listLoading"
@ -473,7 +472,8 @@ export default {
}
</script>
<style scoped>
.doctor-detail {
.doctor-home {
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
}

@ -1,81 +1,88 @@
<template>
<div style="height: 100vh;overflow-y: auto;">
<nav-header title="科室信息" :showTab="false"></nav-header>
<van-index-bar :index-list="indexList"
highlight-color="var(--color-primary)"
:sticky="false"
:sticky-offset-top="96"
z-index="1">
<section v-if="deptList.length === 0">
<van-empty image-size="10rem"
description="暂无可在线咨询科室信息" />
</section>
<section v-else>
<div v-for="(item, i) in deptList"
:key="i">
<van-index-anchor :index="item.type"
v-if="item.deptList.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()) || (data.children instanceof Array && data.children.some(sub => sub.deptName.toLowerCase().includes(search.toLowerCase())))).length > 0">
</van-index-anchor>
<section v-for="(dept, j) in item.deptList.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()) || (data.children instanceof Array && data.children.some(sub => sub.deptName.toLowerCase().includes(search.toLowerCase()))))"
:key="j"
style="border-top:none;"
:style="{ border: (item.deptList.length === 1 ? 'none' : (dept.children && dept.children.length > 0) ? '1px solid var(--border-c)' : '') }"
@click.stop="onClickDept(dept)">
<van-cell>
<template #title>
<div class="dept-item__box"
:style="{
<div class="dept-list__wrap">
<section class="header__box">
<nav-header title="科室信息"
:showTab="false"></nav-header>
</section>
<section>
<div style="height: 42px;"></div>
<van-index-bar :index-list="indexList"
highlight-color="var(--color-primary)"
:sticky="false"
:sticky-offset-top="96"
z-index="1">
<section v-if="deptList.length === 0">
<van-empty image-size="10rem"
description="暂无可在线咨询科室信息" />
</section>
<section v-else>
<div v-for="(item, i) in deptList"
:key="i">
<van-index-anchor :index="item.type"
v-if="item.deptList.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()) || (data.children instanceof Array && data.children.some(sub => sub.deptName.toLowerCase().includes(search.toLowerCase())))).length > 0">
</van-index-anchor>
<section v-for="(dept, j) in item.deptList.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()) || (data.children instanceof Array && data.children.some(sub => sub.deptName.toLowerCase().includes(search.toLowerCase()))))"
:key="j"
style="border-top:none;"
:style="{ border: (item.deptList.length === 1 ? 'none' : (dept.children && dept.children.length > 0) ? '1px solid var(--border-c)' : '') }"
@click.stop="onClickDept(dept)">
<van-cell>
<template #title>
<div class="dept-item__box"
:style="{
border:
(item.deptList.length === 1 ? 'none' : ((j + 1) === item.deptList.length) ? 'none' :
(dept.children && dept.children.length > 0) ? 'none' : ''
)
}">
<div class="dept-item-name">{{ !dept.deptAlias ? dept.deptName : dept.deptAlias }}</div>
<div class="dept-item-address">{{ !dept.address ? '暂无位置信息' : dept.address }}</div>
</div>
</template>
<template #label
v-if="dept.children && dept.children.length > 0">
<section style="display:flex;">
<div class="line-left"
style="border-top:1px solid var(--border-c);width:calc(50% - 16px);margin-top: 7px;margin-left: 16px;">
<div class="dept-item-name">{{ !dept.deptAlias ? dept.deptName : dept.deptAlias }}</div>
<div class="dept-item-address">{{ !dept.address ? '暂无位置信息' : dept.address }}</div>
</div>
<div style="width: 70px;text-align: center;color: var(--color-primary);margin:0 4px;">专病门诊</div>
<div style="border-top:1px solid var(--border-c);width:50%;margin-top: 7px;"></div>
</section>
</template>
</van-cell>
<transition-group v-if="dept.children && dept.children.length > 0"
name="list"
appear>
<section v-for="(sub, k) in dept.children.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()))"
:key="sub">
<van-cell @click.stop="onClickDept(dept, sub)">
<template #title>
<div style="display:flex;margin:0 16px;">
<div>
<div class="left-line-border"
style="border-right:none;border-top:none;"></div>
<div class="left-line-border"
v-if="(k + 1) !== dept.children.length"
style="border-right:none;border-bottom:none;border-top:none;"></div>
</div>
<div :style="{ 'margin-bottom': (k + 1) === dept.children.length ? '10px' : '' }"
class="sub-dept-item__box">
<div class="sub-dept-item-name">{{ !sub.deptAlias ? sub.deptName : sub.deptAlias }}</div>
</div>
</template>
<template #label
v-if="dept.children && dept.children.length > 0">
<section style="display:flex;">
<div class="line-left"
style="border-top:1px solid var(--border-c);width:calc(50% - 16px);margin-top: 7px;margin-left: 16px;">
</div>
</template>
</van-cell>
</section>
</transition-group>
</section>
</div>
</section>
</van-index-bar>
<div style="width: 70px;text-align: center;color: var(--color-primary);margin:0 4px;">专病门诊</div>
<div style="border-top:1px solid var(--border-c);width:50%;margin-top: 7px;"></div>
</section>
</template>
</van-cell>
<transition-group v-if="dept.children && dept.children.length > 0"
name="list"
appear>
<section v-for="(sub, k) in dept.children.filter(data => !search || data.deptName.toLowerCase().includes(search.toLowerCase()))"
:key="sub">
<van-cell @click.stop="onClickDept(dept, sub)">
<template #title>
<div style="display:flex;margin:0 16px;">
<div>
<div class="left-line-border"
style="border-right:none;border-top:none;"></div>
<div class="left-line-border"
v-if="(k + 1) !== dept.children.length"
style="border-right:none;border-bottom:none;border-top:none;"></div>
</div>
<div :style="{ 'margin-bottom': (k + 1) === dept.children.length ? '10px' : '' }"
class="sub-dept-item__box">
<div class="sub-dept-item-name">{{ !sub.deptAlias ? sub.deptName : sub.deptAlias }}</div>
</div>
</div>
</template>
</van-cell>
</section>
</transition-group>
</section>
</div>
</section>
</van-index-bar>
</section>
</div>
</template>
@ -85,7 +92,6 @@ import { useRoute, useRouter } from 'vue-router'
import { axios } from 'axios'
import PinyinUtil from '@/utils/cache/pinyin-util.mjs'
export default {
name: 'dept-list',
components: {
'nav-header': VueConfig.vueLoader('@/components/tab-router.vue'),
},
@ -178,6 +184,25 @@ export default {
}
</script>
<style scoped>
.app-copyright {
margin: 6px !important;
}
.dept-list__wrap {
height: calc(100vh - 30px);
overflow-y: auto;
}
.header__box {
background: #fff;
z-index: 2;
position: fixed;
width: 100%;
margin: 0 auto;
max-width: 767px;
box-shadow: 2px 2px 9px rgba(0, 0, 0, 0.15);
}
.van-cell {
padding: 0;
}

File diff suppressed because one or more lines are too long

@ -151,7 +151,7 @@
</template>
</van-cell>
<van-cell v-if="item.ybAttrib"
<van-cell v-if="getChronicMedicalShow(item)"
clickable
@click="payType = 'wx_medical_chronic'">
<template #title>
@ -205,9 +205,9 @@
v-if="way !== -1">
<div class="line-limit-length">
<span style="font-size:18px;color:var(--color-danger);font-weight:bold;">{{ item.payMoney }} </span>
<span v-if="item.ybAttrib&&item.ybBZName" style="margin-left:5px;font-size:10px;color:var(--color-primary-05);font-weight:bold;" >慢性病{{ item.ybBZName }} </span>
<span v-if="item.ybAttrib&&!item.ybBZName" style="margin-left:5px;font-size:10px;color:var(--color-danger);font-weight:bold;">慢性病需手动选择病种 </span>
<span v-if="item.ybJsFlag&&config.isDisPieceMedical" style="margin-left:5px;font-size:10px;color:var(--color-warning);font-weight:bold;" > 不允许医保支付处方 </span>
<span v-if="allPayType!=1&&item.ybAttrib&&item.ybBZName" style="margin-left:5px;font-size:10px;color:var(--color-primary-05);font-weight:bold;" >慢性病{{ item.ybBZName }} </span>
<span v-if="allPayType!=1&&item.ybAttrib&&!item.ybBZName" style="margin-left:5px;font-size:10px;color:var(--color-danger);font-weight:bold;">慢性病需手动选择病种 </span>
<span v-if="allPayType!=1&&item.ybJsFlag&&config.isDisPieceMedical" style="margin-left:5px;font-size:10px;color:var(--color-warning);font-weight:bold;" > 不允许医保支付处方 </span>
</div>
<van-button type="primary"
@click.prevent.stop="onPrepay(item)"
@ -386,6 +386,7 @@ export default {
const allPayType = ref(0)
const recipeData = ref([])
const allPayTypeShow = ref(false)
const cacheShow = ref(false)
const chronicItem = reactive({
ybBZName: '',
@ -497,10 +498,14 @@ export default {
info.cacheRecipe.ybJsFlag = params.ybJsFlag
allPayType.value = params.allPayType
allPayTypeShow.value = params.allPayTypeShow
if(params.allPayTypeShow===false) cacheShow.value = true
info.cacheRecipe.recipeJson = JSON.parse(params.recipeJson)
if (patient.noBind) { //
setCachePatient(patient.patientId)
}
@ -520,7 +525,7 @@ export default {
})
})
}
if(config.isDisPieceMedical&&allPayType.value === 1){ // allPayType
if(allPayType.value === 1){ // allPayType
return false
}
if(config.isDisPieceMedical&&item.ybJsFlag){
@ -534,6 +539,15 @@ export default {
}
return true
}
function getChronicMedicalShow(item){
if(allPayType.value === 1){
return false
}
if(item.ybAttrib){
return true
}
return false
}
function getData(patient, begDate, endDate) {
if (!patient.patientId) return console.log('patientId is null')
@ -585,7 +599,7 @@ export default {
let treatList = []
list.forEach(recipe => {
recipe.checked = true
if(recipe.ybJsFlag){
if(config.isDisPieceMedical&&recipe.ybJsFlag&&!cacheShow.value||(config.isChronic&&recipe.ybAttrib&&!cacheShow.value)){
allPayTypeShow.value = true
}
if(recipe.ybJsFlag === 2){ // 使
@ -593,22 +607,29 @@ export default {
}
//
isFlag = treatList.some(item => {
if(config.isChronic){ //
if (item.mzNum === recipe.mzNum&&item.ybAttrib === recipe.ybAttrib&& item.ybBZCode === recipe.ybBZCode && item.ybBZName === recipe.ybBZName) {
if(allPayType.value === 1||(!config.isChronic&&!config.isDisPieceMedical)) {
if (item.mzNum === recipe.mzNum) { //
item.payMoney = new Decimal(item.payMoney).add(new Decimal(recipe.payMoney)).toNumber()
item.children.push(recipe)
return true
}
}
else if(config.isDisPieceMedical&&allPayType.value === 0){ // allPayType = 1
if (item.mzNum === recipe.mzNum && item.ybJsFlag === recipe.ybJsFlag) {
else if(config.isChronic&&config.isDisPieceMedical){
if (item.mzNum === recipe.mzNum && item.ybJsFlag === recipe.ybJsFlag&&item.ybAttrib === recipe.ybAttrib&& item.ybBZCode === recipe.ybBZCode && item.ybBZName === recipe.ybBZName) {
item.payMoney = new Decimal(item.payMoney).add(new Decimal(recipe.payMoney)).toNumber()
item.children.push(recipe)
return true
}
}
else if(config.isChronic){
if (item.mzNum === recipe.mzNum&&item.ybAttrib === recipe.ybAttrib&& item.ybBZCode === recipe.ybBZCode && item.ybBZName === recipe.ybBZName) {
item.payMoney = new Decimal(item.payMoney).add(new Decimal(recipe.payMoney)).toNumber()
item.children.push(recipe)
return true
}
}
}
else {
if (item.mzNum === recipe.mzNum) { //
else if(config.isDisPieceMedical) {
if (item.mzNum === recipe.mzNum && item.ybJsFlag === recipe.ybJsFlag) {
item.payMoney = new Decimal(item.payMoney).add(new Decimal(recipe.payMoney)).toNumber()
item.children.push(recipe)
return true
@ -616,6 +637,7 @@ export default {
}
})
if (!isFlag) {
treatList.push({
checked: true,
@ -635,11 +657,20 @@ export default {
if (info.cacheRecipe.treatNum) { //
let treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum)
//
if(config.isChronic) treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum&&item.ybBZCode === info.cacheRecipe.ybBZCode&&item.ybAttrib === info.cacheRecipe.ybAttrib&&item.ybBZName === info.cacheRecipe.ybBZName)
//
if(config.isDisPieceMedical) treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum && item.ybJsFlag === info.cacheRecipe.ybJsFlag)
let treatItem = []
if(allPayType.value===1||(!config.isChronic&&!config.isDisPieceMedical)){
treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum)
}
else if(config.isChronic&&config.isDisPieceMedical){
treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum && item.mzNum === info.cacheRecipe.treatNum&&item.ybBZCode === info.cacheRecipe.ybBZCode&&item.ybAttrib === info.cacheRecipe.ybAttrib&&item.ybBZName === info.cacheRecipe.ybBZName && item.ybJsFlag === info.cacheRecipe.ybJsFlag)
}
else if(config.isChronic){
treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum&&item.ybBZCode === info.cacheRecipe.ybBZCode&&item.ybAttrib === info.cacheRecipe.ybAttrib&&item.ybBZName === info.cacheRecipe.ybBZName)
}
else if(config.isDisPieceMedical){
treatItem = treatList.find(item => item.mzNum === info.cacheRecipe.treatNum && item.ybJsFlag === info.cacheRecipe.ybJsFlag)
}
if (!treatItem) {
@ -662,6 +693,7 @@ export default {
treatList.sort((a, b) => { return Number(b.mzNum) - Number(a.mzNum) })
if(config.isChronic){
treatList.sort(function(a, b) {
return (!a.ybAttrib) - (!b.ybAttrib) || a.ybAttrib- b.ybAttrib
@ -777,7 +809,6 @@ export default {
}
async function onPay(item) { //
console.log(item)
const openid = store.getters.getOpenid
if (typeof item.payMoney !== 'number') {
return vant.Toast.fail('支付金额错误不能支付')
@ -816,7 +847,7 @@ export default {
}
let payCode = (!WxConfig.pay || !WxConfig.pay.payCode) ? 'wx' : WxConfig.pay.payCode
if (info.payType === 'wx_medical') {
if (info.payType === 'wx_medical'|| info.payType === 'wx_medical_chronic') {
payCode = info.payType
let isFlag = false
@ -988,6 +1019,7 @@ export default {
checkAll,
onToggle,
onPrepay,
getChronicMedicalShow,
onPay,
onCancel,
onBack,

@ -133,8 +133,8 @@
<van-cell >
<template #title>
<div class="dept-item__box" :class="dept.search?'search-show':''" @click="onClickDept(dept,sub)">
<div class="dept-item-name">{{ !dept.deptAlias ? dept.deptName : dept.deptAlias }} </div>
<div class="dept-item-address">{{ dept.note&&config.isShowDeptNote ?dept.note:'暂无备注信息'}}</div>
<div class="dept-item-name" :style="dept.note?'':'height:35px'">{{ !dept.deptAlias ? dept.deptName : dept.deptAlias }} </div>
<div class="dept-item-address">{{ dept.note&&config.isShowDeptNote ?dept.note:''}}</div>
</div>
</template>
</van-cell>
@ -283,12 +283,20 @@ export default {
},
clickLeftDept(item, i) {
if (this.activeDeptIndex === i) return
this.config.leftDeptSort.forEach((res)=> {
if(res.deptName!==item.deptName) return
item.children.sort((a,b)=>{
return res.children.indexOf(b.deptName)-res.children.indexOf(a.deptName)
})
})
let index = item.children.findIndex((s)=>s.deptName.includes('专家门诊'))
if(index > 0){
let expert = item.children[index]
console.log(expert)
item.children.splice(index , 1)
item.children.unshift(expert)
}
let nomalIndex = item.children.findIndex((s)=>s.deptName.includes('普通门诊')||s.deptName.includes('晋通门诊'))
if(nomalIndex > 0) {
let nomal = item.children[nomalIndex]
console.log(nomal)
item.children.splice(nomalIndex, 1)
item.children.unshift(nomal)
}
if(item.children){
item.children.forEach((res)=> {
if(res.search) item.children[item.children.indexOf(res)].search = undefined
@ -325,6 +333,18 @@ export default {
this.respDeptList = respData.sort((a, b)=> a.deptName.localeCompare(b.deptName, 'zh'))
this.show = this.respDeptList.length > 0
this.selectDept = this.respDeptList[0]
let index = this.selectDept.children.findIndex((s)=>s.deptName.includes('专家门诊'))
if(index > 0) {
let expert = this.selectDept.children[index]
this.selectDept.children.splice(index, 1)
this.selectDept.children.unshift(expert)
}
let nomalIndex = this.selectDept.children.findIndex((s)=>s.deptName.includes('普通门诊'))
if(nomalIndex) {
let nomal = this.selectDept.children[nomalIndex]
this.selectDept.children.splice(nomalIndex, 1)
this.selectDept.children.unshift(nomal)
}
}
})
},

Loading…
Cancel
Save