Commit 417f673e authored by songrui's avatar songrui

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

parents c4feea49 7d8aa95e
......@@ -7,6 +7,7 @@
label='药品名称:'
placeholder='请选择'
class='input-back mt-2 form-input w-full'
:rules="[{required: true, message:'请选择'}]"
@click='showDrug= true'
/>
<van-popup v-model:show='showDrug' position='bottom'>
......
......@@ -58,14 +58,14 @@
<div class='px-4 py-3 grow overflow-y-auto' style=''>
<van-field v-model='form.templateName' placeholder='请输入要查询的模板名称' maxlength='100'
class='doc-input' />
<div class='my-3'>模板分类</div>
<div class='my-3'>模板分类(仅单选)</div>
<CheckBtn :options="store.getDict('DC00082')" v-model:value='form.templateClassify' column-3
class='check-btn-workbench' />
<div class='my-3'>文件类型</div>
<CheckBtn :options="store.getDict('DC00093')" v-model:value='form.fileType' column-3
<div class='my-3'>文件类型(可多选)</div>
<CheckBtn multiple :options="store.getDict('DC00093')" v-model:value='form.fileType' column-3
class='check-btn-workbench' />
<div class='my-3'>共享类型</div>
<div class='my-3'>共享类型(仅单选)</div>
<CheckBtn :options="store.getDict('DC00053')" v-model:value='form.templateType' column-3
class='check-btn-workbench' />
</div>
......@@ -97,22 +97,25 @@ import { getTemplateByPage } from '@/api/doctor/workbench'
import { useStore } from '@/doctor/store'
import TemDetail from '@/doctor/components/template/temDetail'
const DefaultForm = {
const DefaultForm = () => {
return {
templateName: undefined,
templateClassify: undefined,
//慢病
businessType: 1,
//文件类型
fileType: undefined,
fileType: [],
//共享类型
templateType: 1
}
}
export default {
name: 'temList',
components: { TemDetail, CheckBtn },
props: {
show: { default: false }
show: { default: false },
templateClassify: Number,
},
data() {
return {
......@@ -129,7 +132,7 @@ export default {
isRefreshDisable: false,
// 搜索弹出框
searchVisible: false,
form: { ...DefaultForm },
form: DefaultForm(),
//是否展示详情弹窗
detailShow: false,
//选中项
......@@ -145,6 +148,7 @@ export default {
}
},
created() {
this.form.templateClassify = this.templateClassify
this.load()
},
mounted() {
......@@ -161,10 +165,12 @@ export default {
},
methods: {
load(loading = true) {
const {fileType = [], ...others} = this.form
const query = {
pageIndex: this.pagination.pageIndex,
pageSize: this.pagination.pageSize,
...this.form
fileType: fileType&&fileType.length ? fileType.join(): '',
...others
}
getTemplateByPage(query, loading).then(res => {
if (this.pagination.pageIndex === 1) {
......@@ -184,7 +190,8 @@ export default {
this.searchVisible = false
},
reset() {
this.form = { ...DefaultForm }
this.form = DefaultForm()
this.form.templateClassify = this.templateClassify
this.search()
},
onMore() {
......
......@@ -515,17 +515,25 @@ export default {
if (this.checkGroupsArrays && this.checkGroupsArrays.length) {
this.form.groupsArrays = this.checkGroupsArrays.join()
this.form.groupsArraysName = res.join()
} else {
this.form.groupsArrays = ''
this.form.groupsArraysName = ''
}
this.showGroupsArrays = false
},
//随访方式
visitWayConfirm() {
if (this.checkVisitWay) {
this.store.getDict('CP00179').forEach(item => {
if (item.value == this.checkVisitWay) {
this.form.visitWay = item.value
this.form.visitWayName = item.name
}
})
} else {
this.form.visitWay = ''
this.form.visitWayName = ''
}
this.showVisitWay = false
},
//随访类型
......@@ -540,6 +548,9 @@ export default {
if (this.checkVisitWayRules && this.checkVisitWayRules.length) {
this.form.visitWayRules = this.checkVisitWayRules.join()
this.form.visitWayRulesName = res.join()
} else {
this.form.visitWayRules = ''
this.form.visitWayRulesName = ''
}
this.showVisitWayRules = false
},
......@@ -665,10 +676,10 @@ export default {
overflow: visible;
}
:deep(.van-field__error-message) {
/*:deep(.van-field__error-message) {
position: absolute;
margin-top: 3px;
}
}*/
:deep(.van-cell:after) {
border-bottom: 0px;
......
......@@ -406,10 +406,10 @@ export default {
overflow: visible;
}
:deep(.van-field__error-message) {
/*:deep(.van-field__error-message) {
position: absolute;
margin-top: 3px;
}
}*/
:deep(.van-cell:after) {
border-bottom: 0px;
......
......@@ -6,6 +6,7 @@
<div class='label-title'>随访内容</div>
<van-field
v-model='form.visitContent'
name='visitContent'
placeholder='随访内容'
class='input-back mt-2 form-input'
rows='2'
......@@ -29,21 +30,23 @@
<div v-if='showTwo'>
<div class='flex justify-between items-center mt-5'>
<div class='label-title '>健康指导</div>
<van-button class='doc-btn-p' @click='toShowTem(1)'>选择内容</van-button>
<!-- <van-button class='doc-btn-p' @click='toShowTem(1)'>选择内容</van-button>-->
</div>
<div class='health mt-2'>
<GuideTextVideo :file-type='[1]'
:info='form.guide'
:content-title="'指导内容'"
:classify='1'
ref='guideRef'></GuideTextVideo>
@changeSelect='toShowTem'
ref='guideRef'
></GuideTextVideo>
</div>
</div>
<!-- 宣教内容-->
<div v-if='showThree'>
<div class='flex justify-between items-center mt-5'>
<div class='label-title '>宣教内容</div>
<van-button class='doc-btn-p' @click='toShowTem(2)'>选择内容</van-button>
<!-- <van-button class='doc-btn-p' @click='toShowTem(2)'>选择内容</van-button>-->
</div>
<div class='health mt-2'>
<div class='health-cell mt-2'>
......@@ -64,7 +67,9 @@
<van-popup v-model:show='showPublicizeType' position='bottom'>
<div class='p-4'>
<div class='flex justify-between mb-4 items-center pop-title'>
<div class='greyColor' @click='showPublicizeType = false' style='font-weight: 400'>取消</div>
<div class='greyColor' @click='showPublicizeType = false' style='font-weight: 400'>
取消
</div>
<div>健康宣教(可多选)</div>
<div class='blueColor' @click='publicizeTypeConfirm'>确定</div>
</div>
......@@ -76,12 +81,15 @@
</div>
</van-popup>
</div>
<div class='mt-2' v-if='form.publicizeTypeName &&!form?.publicizeType?.includes(1)'>
<van-button type='primary' plain class='w-full' @click='toShowTem(2)' size='small'>选择内容</van-button>
</div>
<div v-if='form?.publicizeType?.includes(1)'>
<GuideTextVideo :file-type='[1]'
:info='form.publicize'
:content-title="'文本内容'"
:classify='2'
@changeSelect='toShowTem'
ref='contentOne'></GuideTextVideo>
</div>
<div v-if='form?.publicizeType?.includes(2)'>
......@@ -153,7 +161,6 @@
/>
</div>
<div>
<div class='label-title mt-5'>下次随访日期</div>
<van-field
......@@ -175,7 +182,7 @@
</van-form>
<div v-if='showTem'>
<temList :show='showTem' @closed='closedTem' @selectRecord='getSelectTem'></temList>
<temList :show='showTem' @closed='closedTem' @selectRecord='getSelectTem' :templateClassify='citeInfo'></temList>
</div>
</div>
</template>
......@@ -376,7 +383,7 @@ export default {
obj.drugsList = data.drugsList
}
if (selectType.includes(2)) {//是否返回音频选中
obj.annexList = [...obj.annexList ,...mp3List]
obj.annexList = [...obj.annexList, ...mp3List]
}
if (selectType.includes(3)) {//是否返回视频选中
obj.annexList = [...obj.annexList, ...mp4List]
......@@ -402,6 +409,9 @@ export default {
if (this.checkPublicizeType && this.checkPublicizeType.length) {
this.form.publicizeType = this.checkPublicizeType.join()
this.form.publicizeTypeName = res.join()
} else {
this.form.publicizeType = ''
this.form.publicizeTypeName = ''
}
this.showPublicizeType = false
},
......@@ -623,17 +633,36 @@ export default {
resObj.annexList = uniqueArr(resObj.annexList, 'relativeUrl')
this.form.publicize = resObj
},
onSubmit() {
async onSubmit() {
try {
if (this.showTwo) {
await this.$refs.guideRef.submit()
}
if (this.showThree) {
//文本
if (this.form?.publicizeType?.includes(1)) {
await this.$refs.contentOne.submit()
}
//音频
if (this.form?.publicizeType?.includes(2)) {
await this.$refs.contentTwo.submit()
}
//视频
if (this.form?.publicizeType?.includes(3)) {
await this.$refs.contentThree.submit()
}
}
}catch (e) {}
return new Promise((resolve, reject) => {
this.$refs.form.validate().then(async () => {
let time = dayjs(this.form.screenTime).format('YYYY-MM-DD HH:00:00')
let content = `${this.modeEnumList?.urgeResidentShow ? `${this.firstForm?.residentsRecord?.residentName}先生/女士,` : `您好,`}请您于${time}${this.authInfo.unitName}进行专病高危筛查/慢病复查,祝早日恢复健康!`
const {publicizeType, ...others} = this.form
const { publicizeType, ...others } = this.form
let publicizeTypeInfo = ''
if (publicizeType && publicizeType instanceof Array) {
publicizeTypeInfo = publicizeType.join()
}
if (publicizeType && typeof publicizeType === "string") {
if (publicizeType && typeof publicizeType === 'string') {
publicizeTypeInfo = publicizeType
}
let res = {
......@@ -841,10 +870,10 @@ export default {
overflow: visible;
}
:deep(.van-field__error-message) {
position: absolute;
margin-top: 3px;
}
//:deep(.van-field__error-message) {
// position: absolute;
// margin-top: 3px;
//}
:deep(.van-cell:after) {
border-bottom: 0px;
......@@ -871,6 +900,7 @@ export default {
line-height: 24px;
font-weight: bold;
}
:deep(.van-popup) {
min-height: 30% !important;
}
......
......@@ -13,6 +13,7 @@
type='textarea'
placeholder='请输入'
class='input-back mt-2 form-input'
:rules='rules.templateContent'
/>
</div>
<!-- 更多选项-->
......@@ -24,6 +25,7 @@
is-link
placeholder='请选择'
class='input-back mt-2 form-input'
name='contentSelectName'
:rules='rules.contentSelectName'
@click='showContentSelect= true'
>
......@@ -35,8 +37,9 @@
<van-popup v-model:show='showContentSelect' position='bottom'>
<div class='p-4'>
<div class='flex justify-between mb-4 items-center pop-title'>
<div class='greyColor' @click='showContentSelect = false' style='font-weight: 400'>取消</div>
<div>{{contentTitle}}(可多选)</div>
<div class='greyColor' @click='showContentSelect = false' style='font-weight: 400'>取消
</div>
<div>{{ contentTitle }}(可多选)</div>
<div class='blueColor' @click='contentSelectConfirm'>确定</div>
</div>
<CheckBtn multiple column-2 :options='contentArray' v-model:value='checkContentSelect'
......@@ -45,6 +48,10 @@
</van-popup>
</div>
<div v-if='form.contentSelectName' class='mt-2'>
<van-button type='primary' plain class='w-full' @click='choiceTel' size='small'>选择内容</van-button>
</div>
<div class='health-cell mt-2' v-for="item in form.contentList.filter(e => e.templateModeTrans != '无')">
<template v-if='item.templateMode === 5'>
<div class='no-req-label'>药物指导</div>
......@@ -53,7 +60,8 @@
<div class='text-driver' v-if='index'></div>
<DocDrug v-model:value='item.drugsCode' placeholder='拼音码查询药品'
:valueName="selectData.drugsList ? selectData.drugsList[index]?.helpCode : ''"
@change='drugChange($event, item)' />
@change='drugChange($event, item)'
/>
<div class='flex items-center justify-between w-full mt-2'>
<van-field
v-model='item.dose'
......@@ -62,6 +70,7 @@
type='digit'
class='input-back form-input'
style='flex: 1'
:rules='rules.dose'
/>
<van-field
v-model='item.doseUnitName'
......@@ -70,6 +79,7 @@
class='input-back ml-2 form-input'
style='width: .8rem'
@click='showDoseUnit= true'
:rules='rules.doseUnitName'
/>
</div>
<van-popup v-model:show='showDoseUnit' position='bottom'>
......@@ -90,6 +100,7 @@
placeholder='请选择'
class='input-back mt-2 form-input'
@click='showFrequency= true'
:rules='rules.frequencyName'
/>
<van-popup v-model:show='showFrequency' position='bottom'>
<div class='p-4'>
......@@ -109,6 +120,7 @@
placeholder='请选择'
class='input-back mt-2 form-input'
@click='showUsageMethod= true'
:rules='rules.usageMethodName'
/>
<van-popup v-model:show='showUsageMethod' position='bottom'>
<div class='p-4'>
......@@ -141,6 +153,8 @@
autosize
type='textarea'
placeholder='请输入'
:name='item.templateContent'
:rules='rules.templateContent'
class='input-back mt-2 form-input'
/>
</div>
......@@ -216,7 +230,13 @@ export default {
form: {},
selectData: {},
activeMediaUrl: '',
rules: {}
rules: {
templateContent: [{ required: true, message: '请输入' }],
dose: [{ required: true, message: '请输入' }],
doseUnitName: [{ required: true, message: '请选择' }],
frequencyName: [{ required: true, message: '请选择' }],
usageMethodName: [{ required: true, message: '请选择' }]
}
}
},
computed: {
......@@ -277,7 +297,7 @@ export default {
handler() {
this.contentSelectChange()
}
},
}
},
methods: {
//指导和宣教赋值
......@@ -295,7 +315,7 @@ export default {
//判断父组件的数据里是否存在 无 的选项
let resList = infoC.filter(item => item.templateMode == 1)
if (!resList.length) { //不存在无选项
contentList = [ ...initC, ...infoC]
contentList = [...initC, ...infoC]
} else {
contentList = [...infoC]
}
......@@ -314,7 +334,7 @@ export default {
let contentSelectNameList = []
this.checkContentSelect = []
contentList.forEach(item => {
if (item.templateMode !=1) {
if (item.templateMode != 1) {
this.checkContentSelect.push(item.templateMode)
contentSelectNameList.push(item.templateModeTrans)
}
......@@ -339,7 +359,7 @@ export default {
_video: JSON.parse(JSON.stringify(info._video || [])),
_audio: JSON.parse(JSON.stringify(info._audio || [])),
drugSelect: 1,
contentSelectName: contentSelectName,
contentSelectName: contentSelectName
}
return form
},
......@@ -347,7 +367,12 @@ export default {
contentSelectChange() {
const cont = this.form.contentList || []
let val = this.checkContentSelect
const delValue = cont.filter(i => !val.includes(i.templateMode)).map(e => e.templateMode)
let delValue = []
cont.forEach(i => {
if (!val.includes(i.templateMode) && i.templateMode != 1) {
delValue.push(i.templateMode)
}
})
if (delValue.length) {
this.form.contentList = this.form.contentList.filter(e => !delValue.includes(e.templateMode))
// 药物指导处理
......@@ -408,6 +433,9 @@ export default {
getRef() {
return this.$refs.form
},
choiceTel() {
this.$emit('changeSelect', this.classify)
},
contentSelectConfirm() {
let res = []
this.contentArray.forEach(item => {
......@@ -419,8 +447,12 @@ export default {
if (this.checkContentSelect && this.checkContentSelect.length) {
this.form.contentSelect = this.checkContentSelect.join()
this.form.contentSelectName = res.join()
} else {
this.form.contentSelect = ''
this.form.contentSelectName = ''
}
this.showContentSelect = false
},
doseUnitConfirm({ selectedValues, selectedOptions }, item) {
item.doseUnit = selectedValues[0]
......@@ -539,6 +571,8 @@ export default {
item.templateContent = str
}
resolve(query)
}).catch(e => {
console.log( 'GuideTextVideo',e)
})
}
}
......@@ -618,4 +652,7 @@ export default {
line-height: 24px;
font-weight: bold;
}
//:deep(.van-field__error-message) {
// position: relative!important;
//}
</style>
\ No newline at end of file
......@@ -182,7 +182,7 @@ export default {
this.info = {
personId: id,
...others,
sendNumber: weixinInfo?.data?.telephone
sendNumber: weixinInfo?.data?.isWx ? weixinInfo?.data?.telephone : ''
}
this.info.diseaseType = this.routerDetail.diseaseType
}
......
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