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