Commit befffd23 authored by songrui's avatar songrui

Merge branch 'chronic-dev' of http://gitlab.yiboshi.com/nightkis1995/frontend-h5 into chronic-dev

parents cabe326a 3bd2ead7
......@@ -52,7 +52,7 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = '3a247da4-e163-4e68-80da-4ed81f088ca5'
token = 'c05b4361-deec-4a64-92d5-b6f4b54ec89b'
}
}
if (token) {
......
......@@ -104,6 +104,7 @@ export default {
border: 1px solid transparent;
background-color: #FAFAFA;
border-radius: 8px;
text-align: center;
transition: all .2s;
}
.check-btn-item-active {
......
<template>
<div>
<van-form ref='form'>
<div class='no-req-label'>随访单位</div>
<van-field
v-model='form.visitUnitName'
is-link
readonly
placeholder='随访单位'
class='input-back mt-2 form-input'
@click="show1 = true"
/>
<DocUnit v-model:show="show1" v-model:value="form.visitUnitId" @change="changeUnit"/>
<div class='no-req-label mt-5'>随访科室</div>
<van-field
v-model='form.visitOfficeName'
is-link
readonly
placeholder='随访科室'
class='input-back mt-2 form-input'
@click='show2 = true'
/>
<DocOffice v-model:show="show2" v-model:value="form.visitOfficeId" @change="changeOffice" :unitId="form.visitUnitId"/>
<div class='no-req-label mt-5'>随访医生</div>
<van-field
v-model='form.visitDoctorName'
is-link
readonly
placeholder='随访医生'
class='input-back mt-2 form-input'
@click='show3 = true'
/>
<DocOfficeDoctor v-model:show="show3" v-model:value="form.visitDoctorId" @change="changeDoctor" :unitId="form.visitUnitId" :officeId="form.visitOfficeId"/>
<div class='label-title' v-if='showPush'>请选择推送渠道</div>
<checkBtn column-1 :options='vxList' v-model:value='checkVx' :fieldNames="{text: 'name', value: 'value'}"></checkBtn>
<div class='push-lab'>随访信息将通过小程序消息推送给居民</div>
<checkBtn column-1 :options='messageList' v-model:value='checkMessage' :fieldNames="{text: 'name', value: 'value'}"></checkBtn>
<div class='push-lab'>随访信息将通过短信方式发送给居民</div>
<div :class="['label-title', {'mt-5': showPush}]">随访单位</div>
<van-field
v-model='form.visitUnitName'
is-link
readonly
placeholder='随访单位'
class='input-back mt-2 form-input'
@click='show1 = true'
/>
<DocUnit v-model:show='show1' v-model:value='form.visitUnitId' @change='changeUnit' />
<div class='label-title mt-5'>随访科室</div>
<van-field
v-model='form.visitOfficeName'
is-link
readonly
placeholder='随访科室'
class='input-back mt-2 form-input'
@click='show2 = true'
/>
<DocOffice v-model:show='show2' v-model:value='form.visitOfficeId' @change='changeOffice'
:unitId='form.visitUnitId' />
<div class='label-title mt-5'>随访医生</div>
<van-field
v-model='form.visitDoctorName'
is-link
readonly
placeholder='随访医生'
class='input-back mt-2 form-input'
@click='show3 = true'
/>
<DocOfficeDoctor v-model:show='show3' v-model:value='form.visitDoctorId' @change='changeDoctor'
:unitId='form.visitUnitId' :officeId='form.visitOfficeId' />
</van-form>
</div>
</template>
......@@ -44,15 +52,27 @@ import { useStore } from '@/doctor/store'
import DocUnit from '@/doctor/components/docUnit/DocUnit'
import DocOffice from '@/doctor/components/docOffice/DocOffice'
import DocOfficeDoctor from '@/doctor/components/docOfficeDoctor/DocOfficeDoctor'
import CheckBtn from '@/doctor/components/checkBtn/CheckBtn'
export default {
name: 'CommonBottom',
components: { DocOfficeDoctor, DocOffice, DocUnit },
components: { CheckBtn, DocOfficeDoctor, DocOffice, DocUnit },
props: {
info: {
default: () => {
return {}
}
},
firstForm: {
default: () => {
return {}
}
},
modeEnumList: {
default: () => {
return {}
}
}
},
data() {
......@@ -61,6 +81,10 @@ export default {
show1: false,
show2: false,
show3: false,
vxList:[],
checkVx: undefined,
messageList: [],
checkMessage: undefined,
form: {},
rules: {}
}
......@@ -76,9 +100,32 @@ export default {
computed: {
authInfo() {
return this.store.$state.authInfo
},
//是否显示推送渠道
showPush() {
let res = false
let list = []
if (this.firstForm.visitWayRules) {
list = this.firstForm.visitWayRules.split(',').map(item => Number(item))
}
if (list && list.length && (list.includes(2) || list.includes(3) || list.includes(4))) {
res = true
}
return res
}
},
mounted() {
this.vxList = this.getVxEnum(this.firstForm.residentsRecord)
this.messageList = this.getMessageEnum(this.firstForm.residentsRecord)
},
methods: {
//微信
getVxEnum(patientInfo = {}) {
return [{ name: `${patientInfo.weixinTel ? `(${this.$phoneHide(patientInfo.weixinTel)}已注册小程序)` : `(未注册小程序)`}`, value:1 }]
},
getMessageEnum(patientInfo = {}) {
return [{ name: `${patientInfo.telephone ? `(手机号 ${this.$phoneHide(patientInfo.telephone)})` : `(手机号 不存在)`}`, value: 2 }]
},
setForm(info) {
const form = {
visitDate: new dayjs(),
......@@ -134,7 +181,7 @@ export default {
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => {
let par = {
...this.form,
...this.form
}
resolve(par)
}).catch((e) => {
......@@ -166,6 +213,12 @@ export default {
}
}
.push-lab {
line-height: 20px;
color: #8C8C8C;
font-size: 12px
}
.no-req-label {
font-size: 13px;
color: #595959;
......
<template>
<div>
<van-nav-bar :title="routerDetail.id ? '修改通用随访': '新增通用随访'" left-text='' left-arrow @click-left='toBack'></van-nav-bar>
<van-nav-bar :title="routerDetail.id ? '修改通用随访': '新增通用随访'" left-text='' left-arrow
@click-left='toBack'></van-nav-bar>
<div class='p-4 h-overflow'>
<base-info :info='info'
:modeEnumList="modeEnumList"
:modeEnumList='modeEnumList'
v-show='step == 1'
ref='baseInfo'
@changeVisitSituation='changeVisitSituation'
></base-info>
<general-f-u-form :info='info'
:first-form='firstForm'
:modeEnumList='modeEnumList'
v-show='step == 2'
ref='generalFUForm'
></general-f-u-form>
<common-bottom :info='info'
:first-form='firstForm'
:modeEnumList='modeEnumList'
v-show='step == 3'
ref='commonBottom'
></common-bottom>
</div>
<div class='pt-2 pb-2'>
<div class='px-5 grow flex flex-col justify-end' v-if='step == 1'>
<van-button type='primary' block round v-if='visitSituation == 1'
<van-button type='primary' block round
@click='toNext(2)'>下一步
</van-button>
<van-button type='primary' block round v-if='visitSituation == 2'
@click='toNext(3)'>下一步
</van-button>
</div>
<div class='px-5 flex align-center justify-around' v-if='step == 2'>
......@@ -63,65 +63,66 @@ const getModeEnum = (patientInfo = {}) => {
{
value: '1', name: `门诊`,
children: [
{value: 1, name: `复检`, disabled: false},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: false},
{value: 4, name: `催检`, disabled: true}
{ value: 1, name: `复检`, disabled: false },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: false },
{ value: 4, name: `催检`, disabled: true }
]
},
{
value: '2', name: `住院`,
children: [
{value: 1, name: `复检`, disabled: false},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: false},
{value: 4, name: `催检`, disabled: true}
{ value: 1, name: `复检`, disabled: false },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: false },
{ value: 4, name: `催检`, disabled: true }
]
},
{
value: '3', name: `入户`,
children: [
{value: 1, name: `复检`, disabled: false},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: false},
{value: 4, name: `催检`, disabled: true}
],
{ value: 1, name: `复检`, disabled: false },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: false },
{ value: 4, name: `催检`, disabled: true }
]
},
{
value: '4', name: `电话`,
children: [
{value: 1, name: `复检`, disabled: false},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: true},
{value: 4, name: `催检`, disabled: false}
],
{ value: 1, name: `复检`, disabled: false },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: true },
{ value: 4, name: `催检`, disabled: false }
]
},
{
value: '5', name: `短信`,
children: [
{value: 1, name: `复检`, disabled: true},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: false},
{value: 4, name: `催检`, disabled: false}
],
{ value: 1, name: `复检`, disabled: true },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: false },
{ value: 4, name: `催检`, disabled: false }
]
},
{
value: '6', name: `微信`,
children: [
{value: 1, name: `复检`, disabled: true},
{value: 2, name: `指导`, disabled: false},
{value: 3, name: `宣教`, disabled: false},
{value: 4, name: `催检`, disabled: false}
],
},
{ value: 1, name: `复检`, disabled: true },
{ value: 2, name: `指导`, disabled: false },
{ value: 3, name: `宣教`, disabled: false },
{ value: 4, name: `催检`, disabled: false }
]
}
],
tel:`(本人电话:${patientInfo.telephone || ''})`,
tel: `(本人电话:${patientInfo.telephone || ''})`,
weixi: `(绑定电话:${patientInfo.weixin || '未绑定'})`,
telephone: patientInfo.telephone,
weixinTel: patientInfo.weixin,
//是否下次随访日期必填
nextVisitDateReq: true,
//催检内容是否显示患者姓名
urgeResidentShow: true,
urgeResidentShow: true
}
}
export default {
......@@ -131,7 +132,6 @@ export default {
return {
info: {},
resident: {},
visitSituation: 1,
step: 1,
//第一步提交的表单
firstForm: {},
......@@ -154,8 +154,8 @@ export default {
if (this.routerDetail.id) {
const res = await fetchCurrencyById({ id: this.routerDetail.id })
let result = res.data || {}
const {residentsRecord = {}} = result
const {id, ...others} = residentsRecord
const { residentsRecord = {} } = result
const { id, ...others } = residentsRecord
this.info = {
...others,
personId: id,
......@@ -192,9 +192,6 @@ export default {
}
this.step = val
},
changeVisitSituation(val) {
this.visitSituation = val
},
//图片上传
async upload(imgList = []) {
let list = []
......@@ -257,9 +254,6 @@ export default {
if (this.info.id) {
params.visitRecordId = this.info.visitRecordId
}
if (params.visitSituation == 2) {
params.visitWay = 14
}
let fun = this.info.id ? updateCurrency : addCurrency
fun(params, true).then(({ code }) => {
if (code == 'SUCCESS') {
......@@ -268,17 +262,9 @@ export default {
})
},
toBack() {
if (this.visitSituation == 1) {
if (this.step != 1) {
this.step--
return
}
}
if (this.visitSituation == 2) {
if (this.step != 1) {
this.step = 1
return
}
if (this.step != 1) {
this.step--
return
}
this.$router.back()
}
......
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