Commit c4040f36 authored by songrui's avatar songrui

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

parents 003691f3 69976bfe
...@@ -35,7 +35,8 @@ export default { ...@@ -35,7 +35,8 @@ export default {
cellVerticalPadding: '.15rem', cellVerticalPadding: '.15rem',
cellTextColor: '#262626', cellTextColor: '#262626',
cellBorderColor: '#d9d9d9', cellBorderColor: '#d9d9d9',
navBarIconColor: '#262626' navBarIconColor: '#262626',
} }
} }
}, },
...@@ -52,7 +53,7 @@ export default { ...@@ -52,7 +53,7 @@ export default {
if (!token) { if (!token) {
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
token = 'b939e81a-6998-4bf4-978e-80ee691a564e' token = '7224fb00-e997-4c6e-b448-7341d5e5478a'
} }
} }
if (token) { if (token) {
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}, },
props: { props: {
// 上传描述 // 上传描述
description: { default: '温馨提示:请上传JPG、PNG格式图片,文件大小不超过5M' }, description: { default: '温馨提示:请上传JPG、PNG格式图片,文件大小不超过10M' },
// 传入的img数据 { id, trueDownloadUrl } // 传入的img数据 { id, trueDownloadUrl }
imageData: { default: () => [] }, imageData: { default: () => [] },
// 上传按键的文字 // 上传按键的文字
...@@ -125,8 +125,8 @@ export default { ...@@ -125,8 +125,8 @@ export default {
showToast('未选中文件,请尝试重新选择') showToast('未选中文件,请尝试重新选择')
return return
} }
if (files[0].size / 1024 / 1024 > 5) { if (files[0].size / 1024 / 1024 > 10) {
showToast('图片大小不能超过5M') showToast('图片大小不能超过10M')
return return
} }
this.file = files[0] this.file = files[0]
......
...@@ -259,8 +259,6 @@ ...@@ -259,8 +259,6 @@
</div> </div>
</van-popup> </van-popup>
<div class='mt-5 mb-3'>文件上传测试(不用管)</div>
<van-uploader v-model="fileList" multiple />
</van-form> </van-form>
</div> </div>
</template> </template>
...@@ -351,7 +349,6 @@ export default { ...@@ -351,7 +349,6 @@ export default {
}, },
data() { data() {
return { return {
fileList: [],
store: useStore(), store: useStore(),
// 民族 // 民族
showNational: false, showNational: false,
......
...@@ -9,22 +9,36 @@ ...@@ -9,22 +9,36 @@
> >
<template #input> <template #input>
<div class='w-full'> <div class='w-full'>
<checkBtn class='mt-3' <div>
column-1 <checkBtn class='mt-3'
text-align='left' column-1
:options='vxList' text-align='left'
v-model:value='checkVx' :options='vxList'
:fieldNames="{text: 'name', value: 'value'}" v-model:value='checkVx'
></checkBtn> :fieldNames="{text: 'name', value: 'value'}"
<div class='push-lab'>随访信息将通过小程序消息推送给居民</div> >
<checkBtn class='mt-3'
column-1 </checkBtn>
text-align='left' <div class='vx-cb'>
:options='messageList' <van-checkbox-group v-model='checkVxCb' shape='square' icon-size='18px'>
v-model:value='checkMessage' <van-checkbox :name='1' />
:fieldNames="{text: 'name', value: 'value'}" </van-checkbox-group>
></checkBtn> </div>
<div class='push-lab'>随访信息将通过短信方式发送给居民</div> </div>
<div class='push-lab'>随访信息将通过小程序消息推送给居民</div>
<checkBtn class='mt-3'
column-1
text-align='left'
:options='messageList'
v-model:value='checkMessage'
:fieldNames="{text: 'name', value: 'value'}"
></checkBtn>
<div class='ms-cb'>
<van-checkbox-group v-model='checkMessageCb' shape='square' icon-size='18px'>
<van-checkbox :name='1' />
</van-checkbox-group>
</div>
<div class='push-lab'>随访信息将通过短信方式发送给居民</div>
</div> </div>
</template> </template>
</van-field> </van-field>
...@@ -106,18 +120,20 @@ export default { ...@@ -106,18 +120,20 @@ export default {
show1: false, show1: false,
show2: false, show2: false,
show3: false, show3: false,
vxList:[], vxList: [],
checkVx: undefined, checkVx: 1,
checkVxCb: [1],
messageList: [], messageList: [],
checkMessage: undefined, checkMessage: undefined,
checkMessageCb: [],
form: { form: {
isSmsIsWx: [] isSmsIsWx: [1]
}, },
rules: { rules: {
isSmsIsWxStr: [{ required: false, message: '请选择' }], isSmsIsWxStr: [{ required: false, message: '请选择' }],
visitUnitName: [{ required: true, message: '请选择' }], visitUnitName: [{ required: true, message: '请选择' }],
visitOfficeName: [{ required: true, message: '请选择' }], visitOfficeName: [{ required: true, message: '请选择' }],
visitDoctorName: [{ required: true, message: '请选择' }], visitDoctorName: [{ required: true, message: '请选择' }]
} }
} }
}, },
...@@ -134,22 +150,24 @@ export default { ...@@ -134,22 +150,24 @@ export default {
this.messageList = this.getMessageEnum(this.firstForm.residentsRecord) this.messageList = this.getMessageEnum(this.firstForm.residentsRecord)
}, },
immediate: true, immediate: true,
deep:true deep: true
}, },
'checkMessage': { 'checkMessage': {
handler() { handler() {
this.form.isSms = 2 this.form.isSms = 2
if (this.checkMessage) { if (this.checkMessage) {
this.form.isSms = 1 this.form.isSms = 1
this.form.isSmsIsWx.push(1) this.form.isSmsIsWx.push(2)
this.form.isSmsIsWxStr = 1 this.form.isSmsIsWxStr = 2
} else { this.checkMessageCb = [1]
this.form.isSmsIsWx = this.form.isSmsIsWx.filter(item => item !=1) } else {
//判断推送渠道是否存在值 this.form.isSmsIsWx = this.form.isSmsIsWx.filter(item => item != 2)
if (!this.checkVx) { this.checkMessageCb = []
this.form.isSmsIsWxStr = '' //判断推送渠道是否存在值
} if (!this.checkVx) {
} this.form.isSmsIsWxStr = ''
}
}
} }
}, },
'checkVx': { 'checkVx': {
...@@ -157,10 +175,12 @@ export default { ...@@ -157,10 +175,12 @@ export default {
this.form.isWx = 2 this.form.isWx = 2
if (this.checkVx) { if (this.checkVx) {
this.form.isWx = 1 this.form.isWx = 1
this.form.isSmsIsWx.push(2) this.form.isSmsIsWx.push(1)
this.form.isSmsIsWxStr = 2 this.form.isSmsIsWxStr = 1
this.checkVxCb = [1]
} else { } else {
this.form.isSmsIsWx = this.form.isSmsIsWx.filter(item => item !=2) this.form.isSmsIsWx = this.form.isSmsIsWx.filter(item => item != 1)
this.checkVxCb = []
//判断推送渠道是否存在值 //判断推送渠道是否存在值
if (!this.checkMessage) { if (!this.checkMessage) {
this.form.isSmsIsWxStr = '' this.form.isSmsIsWxStr = ''
...@@ -168,6 +188,24 @@ export default { ...@@ -168,6 +188,24 @@ export default {
} }
} }
}, },
'checkVxCb': {
handler() {
if (this.checkVxCb && this.checkVxCb.length) {
this.checkVx = 1
} else {
this.checkVx = undefined
}
}
},
'checkMessageCb': {
handler() {
if (this.checkMessageCb && this.checkMessageCb.length) {
this.checkMessage = 2
} else {
this.checkMessage = undefined
}
}
}
}, },
computed: { computed: {
authInfo() { authInfo() {
...@@ -189,10 +227,16 @@ export default { ...@@ -189,10 +227,16 @@ export default {
methods: { methods: {
//微信 //微信
getVxEnum(patientInfo = {}) { getVxEnum(patientInfo = {}) {
return [{ name: `微信 ${patientInfo.sendNumber ? `(${this.$phoneHide(patientInfo.sendNumber)}已注册小程序)` : `(未注册小程序)`}`, value:2 }] return [{
name: `微信 ${patientInfo.sendNumber ? `(${this.$phoneHide(patientInfo.sendNumber)}已注册小程序)` : `(未注册小程序)`}`,
value: 1
}]
}, },
getMessageEnum(patientInfo = {}) { getMessageEnum(patientInfo = {}) {
return [{ name: `短信 ${patientInfo.telephone ? `(手机号 ${this.$phoneHide(patientInfo.telephone)})` : `(手机号 不存在)`}`, value: 1 }] return [{
name: `短信 ${patientInfo.telephone ? `(手机号 ${this.$phoneHide(patientInfo.telephone)})` : `(手机号 不存在)`}`,
value: 2
}]
}, },
setForm(info) { setForm(info) {
const form = { const form = {
...@@ -217,8 +261,8 @@ export default { ...@@ -217,8 +261,8 @@ export default {
createDoctorId: this.authInfo.relationId, createDoctorId: this.authInfo.relationId,
createDoctorName: this.authInfo.nickName, createDoctorName: this.authInfo.nickName,
isSms: 2, isSms: 2,
isWx: 2, isWx: 1,
isSmsIsWx: [], isSmsIsWx: [1]
} }
Reflect.ownKeys(form).forEach(key => { Reflect.ownKeys(form).forEach(key => {
if (info[key] != undefined) { if (info[key] != undefined) {
...@@ -251,7 +295,7 @@ export default { ...@@ -251,7 +295,7 @@ export default {
onSubmit() { onSubmit() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.form.validate().then(() => { this.$refs.form.validate().then(() => {
const { isSmsIsWx = [], ...others} = this.form const { isSmsIsWx = [], ...others } = this.form
let isSms = 2 let isSms = 2
let isWx = 2 let isWx = 2
let wxTel = '' let wxTel = ''
...@@ -269,7 +313,7 @@ export default { ...@@ -269,7 +313,7 @@ export default {
isSms, isSms,
isWx, isWx,
isSmsIsWx, isSmsIsWx,
sendNumber: wxTel, sendNumber: wxTel
} }
resolve(par) resolve(par)
}).catch((e) => { }).catch((e) => {
...@@ -342,6 +386,18 @@ export default { ...@@ -342,6 +386,18 @@ export default {
padding: 12px 0px; padding: 12px 0px;
} }
.vx-cb {
position: absolute;
right: 10px;
top: 23px;
}
.ms-cb {
position: absolute;
right: 10px;
top: 97px;
}
:deep(.van-cell-group--inset) { :deep(.van-cell-group--inset) {
overflow: visible; overflow: visible;
} }
...@@ -357,4 +413,5 @@ export default { ...@@ -357,4 +413,5 @@ export default {
:deep(.van-cell:after) { :deep(.van-cell:after) {
border-bottom: 0px; border-bottom: 0px;
} }
</style> </style>
\ No newline at end of file
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