Browse Source

详情页面外链免登录

x-emr
bianyaqi 2 years ago
parent
commit
c7d42aaa77
  1. 5
      src/components/360View/index.vue
  2. 6
      src/components/360View/medicalRecord/callMedical/index.vue
  3. 62
      src/components/360View/medicalRecord/outPatientRecord/historyForm.vue
  4. 1
      src/components/hm-crf/tinymce/themes/silver/theme.js
  5. 17
      src/page-subspecialty/router/index.js

5
src/components/360View/index.vue

@ -318,10 +318,10 @@ export default {
this.isDev = window.SITE_CONFIG['apiURL'].includes('47') this.isDev = window.SITE_CONFIG['apiURL'].includes('47')
this.jzNumber = window.sessionStorage.getItem('jzNumber') this.jzNumber = window.sessionStorage.getItem('jzNumber')
this.infoHidden = this.$route.query.infoHidden && JSON.parse(this.$route.query.infoHidden) this.infoHidden = this.$route.query.infoHidden && JSON.parse(this.$route.query.infoHidden)
this.getPatientData()
this.getTimeAxisData()
}, },
mounted() { mounted() {
this.getPatientData()
this.getTimeAxisData()
this.computerData() this.computerData()
if (this.isSearch === '3') { if (this.isSearch === '3') {
this.timeAxisType = '视光档案' this.timeAxisType = '视光档案'
@ -408,7 +408,6 @@ export default {
this.$router.push('/outpatientManagement-call') this.$router.push('/outpatientManagement-call')
} else { } else {
this.$parent.detailViewVisible = false this.$parent.detailViewVisible = false
console.log(this.$parent)
this.$parent.reFresh() this.$parent.reFresh()
} }
}, },

6
src/components/360View/medicalRecord/callMedical/index.vue

@ -69,7 +69,11 @@ export default {
default: '' default: ''
} }
}, },
inject: ['refresh'],
inject: {
refresh: {
default: 'refresh'
}
},
data() { data() {
return { return {
id: '', id: '',

62
src/components/360View/medicalRecord/outPatientRecord/historyForm.vue

@ -1,9 +1,10 @@
<template> <template>
<div style="height: 100%;overflow-y: auto;display: flex">
<div>
<el-form id="medHistory" ref="form" :model="formData" label-width="140px" style="margin-top: 32px">
<el-form-item label="主诉:" style="width: 540px" prop="zhuSu">
<el-input v-model="formData.zhuSu" type="textarea" auto-complete="off" :rows="4" @focus="setCurWord('主诉')" />
<!-- <div style="height: 100%;display: flex">-->
<div style="height: 100%;overflow-y: auto">
<div class="historyTaking" style="margin-top: 32px">
<el-form id="medHistory" ref="form" style="width: 540px" :model="formData" label-width="130px">
<el-form-item label="主诉:" prop="zhuSu">
<el-input v-model="formData.zhuSu" type="textarea" auto-complete="off" :rows="4" @blur="getIndex" @focus="setCurWord('主诉')" />
</el-form-item> </el-form-item>
<el-form-item label="现病史:" style="width: 540px" prop="xbs"> <el-form-item label="现病史:" style="width: 540px" prop="xbs">
<el-input v-model="formData.xbs" type="textarea" auto-complete="off" :rows="4" @focus="setCurWord('现病史')" /> <el-input v-model="formData.xbs" type="textarea" auto-complete="off" :rows="4" @focus="setCurWord('现病史')" />
@ -19,15 +20,27 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div v-if="curWord" style="margin: 32px 0 0 16px;display: flex">
{{ curWord }}关键词
<div>
<el-button @click="combineWord('aaaa')">aaaa</el-button>
<el-button @click="combineWord('bbbb')">bbbb</el-button>
<el-button @click="combineWord('cccc')">cccc</el-button>
<el-button @click="combineWord('dddd')">dddd</el-button>
</div>
</div>
<!-- <div v-if="curWord" class="rightText">-->
<!-- {{ curWord }}关键词-->
<!-- <div>-->
<!-- <el-button @click="combineWord('aaaa')">aaaa</el-button>-->
<!-- <el-button @click="combineWord('bbbb')">bbbb</el-button>-->
<!-- <el-button @click="combineWord('cccc')">cccc</el-button>-->
<!-- <el-button @click="combineWord('dddd')">dddd</el-button>-->
<!-- <el-button type="primary" @click="openTextTemplate">更多</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-drawer-->
<!-- direction="ltr"-->
<!-- size="40%"-->
<!-- title="我是标题"-->
<!-- :visible.sync="drawer"-->
<!-- :with-header="false"-->
<!-- >-->
<!-- <span>我来啦!</span>-->
<!-- </el-drawer>-->
<!-- </div>-->
</div> </div>
</template> </template>
@ -42,7 +55,8 @@ export default {
data() { data() {
return { return {
curWord: '', curWord: '',
textArray: []
textArray: [],
drawer: false
} }
}, },
mounted() { mounted() {
@ -53,9 +67,15 @@ export default {
this.$refs.form.resetFields() this.$refs.form.resetFields()
}) })
}, },
getIndex(e) {
console.log(e.srcElement.selectionStart)
},
setCurWord(word) { setCurWord(word) {
this.curWord = word this.curWord = word
}, },
openTextTemplate() {
this.drawer = true
},
combineWord(text) { combineWord(text) {
switch (this.curWord) { switch (this.curWord) {
case '主诉': case '主诉':
@ -94,10 +114,20 @@ export default {
} }
</script> </script>
<style lang="scss">
<style scoped lang="scss">
#medHistory{ #medHistory{
.el-textarea__inner{ .el-textarea__inner{
font-size: 16px; font-size: 16px;
} }
} }
.rightText{
display: flex;
padding: 16px;
}
.historyTaking{
height: 100%;
padding: 16px 16px 0 0;
overflow: hidden;
overflow-y: scroll;
}
</style> </style>

1
src/components/hm-crf/tinymce/themes/silver/theme.js

@ -3058,7 +3058,6 @@
set$3(subject, value); set$3(subject, value);
}); });
if (!definition.uid) { if (!definition.uid) {
debugger;
} }
writeOnly(subject, definition.uid); writeOnly(subject, definition.uid);
return subject; return subject;

17
src/page-subspecialty/router/index.js

@ -151,8 +151,12 @@ router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由 // 添加动态(菜单)路由
// 已添加或者当前路由为页面路由, 可直接访问 // 已添加或者当前路由为页面路由, 可直接访问
if (window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] || fnCurrentRouteIsPageRoute(to, pageRoutes)) { if (window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] || fnCurrentRouteIsPageRoute(to, pageRoutes)) {
if (to.name === 'detail' && to.query.doctorId) {
loginByDocId(to.query.doctorId, next, to)
} else {
return next() return next()
} }
}
if (to.path === from.path) { if (to.path === from.path) {
return return
} }
@ -161,6 +165,7 @@ router.beforeEach((to, from, next) => {
} else if (to.name === '360view' && to.query.doctorId) { } else if (to.name === '360view' && to.query.doctorId) {
loginByDocId(to.query.doctorId, next, to.fullPath) loginByDocId(to.query.doctorId, next, to.fullPath)
} else { } else {
if (to.name === 'detail') return
// 获取字典列表, 添加并全局变量保存 // 获取字典列表, 添加并全局变量保存
// http.get('/sys/dict/type/all').then(({ data: res }) => { // http.get('/sys/dict/type/all').then(({ data: res }) => {
// if (res.code !== 0) { // if (res.code !== 0) {
@ -178,7 +183,6 @@ router.beforeEach((to, from, next) => {
}).catch(() => { }).catch(() => {
return next({ name: 'login' }) return next({ name: 'login' })
}) })
// 获取菜单管理菜单列表,并添加动态路由 // 获取菜单管理菜单列表,并添加动态路由
http.get('/sys/menu/nav', { http.get('/sys/menu/nav', {
params: { params: {
@ -195,7 +199,6 @@ router.beforeEach((to, from, next) => {
next({ ...to, replace: true }) next({ ...to, replace: true })
}).catch(() => { }).catch(() => {
// console.log(123)
return next({ name: 'login' }) return next({ name: 'login' })
}) })
} }
@ -228,7 +231,7 @@ function muneList(next) {
return next({ name: 'login' }) return next({ name: 'login' })
}) })
} }
function loginByDocId(doctorId, next) {
function loginByDocId(doctorId, next, to) {
const params = { const params = {
doctorId: doctorId doctorId: doctorId
} }
@ -236,13 +239,14 @@ function loginByDocId(doctorId, next) {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
console.log(res)
// Cookies.set('xa-token', res.data.token) // Cookies.set('xa-token', res.data.token)
debugger
window.sessionStorage.setItem('xa-token', res.data.token) window.sessionStorage.setItem('xa-token', res.data.token)
window.sessionStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser)) window.sessionStorage.setItem('qg-userData', JSON.stringify(res.data.currentUser))
if (to.name !== 'detail') {
getNavList(next) getNavList(next)
muneList(next) muneList(next)
}
return next() return next()
}).catch(() => { }) }).catch(() => { })
} }
@ -287,7 +291,6 @@ function fnAddDynamicMenuRoutes(menuList = [], menuListChildLength, routes = [])
iframeURL: URL iframeURL: URL
}) })
} else { } else {
// console.log(URL)
URL = URL.replace(/^\//, '').replace(/_/g, '-') URL = URL.replace(/^\//, '').replace(/_/g, '-')
item['path'] = '/' + URL.replace(/\//g, '-') item['path'] = '/' + URL.replace(/\//g, '-')
item['name'] = URL.replace(/\//g, '-') item['name'] = URL.replace(/\//g, '-')
@ -297,7 +300,6 @@ function fnAddDynamicMenuRoutes(menuList = [], menuListChildLength, routes = [])
item['component'] = () => Promise.resolve(require(`@/page-subspecialty/views/modules/${URL}`).default) item['component'] = () => Promise.resolve(require(`@/page-subspecialty/views/modules/${URL}`).default)
// 如果是父级给父级添加重定向到子菜单第一项 // 如果是父级给父级添加重定向到子菜单第一项
if (item.children.length > 0 && item.children[0].url) { if (item.children.length > 0 && item.children[0].url) {
// console.log(item)
// isShow:0显示不菜单 1显示菜单 // isShow:0显示不菜单 1显示菜单
item.children[0].isShow === 0 ? '' : item['redirect'] = '/' + item.children[0].url.replace(/\//g, '-') item.children[0].isShow === 0 ? '' : item['redirect'] = '/' + item.children[0].url.replace(/\//g, '-')
} }
@ -321,7 +323,6 @@ function fnAddDynamicMenuRoutes(menuList = [], menuListChildLength, routes = [])
}, },
{ path: '*', redirect: { name: '404' }} { path: '*', redirect: { name: '404' }}
]) ])
// console.log('----------------------')
window.SITE_CONFIG['dynamicMenuRoutes'] = routes window.SITE_CONFIG['dynamicMenuRoutes'] = routes
window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = true window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = true
} }

Loading…
Cancel
Save