提交 6aedd336 编写于 作者: tao.wu's avatar tao.wu

no message

上级 707737a3
......@@ -17,6 +17,17 @@ export const checkRange = (rule, value, callback) => {
}
}
// 校验手机号
export const checkMobile = (rule, value, callback) => {
var reg = /^1[3|4|5|7|8][0-9]{9}$/; //验证规则
const flag = reg.test(value);
if(flag){
callback()
}else{
callback(new Error(`请输入正确的手机号码`))
}
}
// 校验是否是整数
export const checkIsInteger = (rule, value, callback) => {
const num = Number.isInteger(parseFloat(value));
......
......@@ -77,19 +77,6 @@
this.showBtn = this.$route.query.showBtn;
}
// 0003 脑卒中、0002 糖尿病、0001 高血压
// axios({
// method: 'get',
// url: 'https://dev-sc.yunqueyi.com/scale/1/SCALE0003/info',
// data: JSON.stringify(this.formData),
// }).then(res=>{
// console.log(res)
// this.formData = res.data.data
// res.data.code='111'
// if( res.data.code=='111'){
// this.showBtn = false;
// }
// })
}
}
</script>
......
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
......@@ -40,7 +42,7 @@ export default ($this) => {
maxlength: 11,
type: 'tel',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员联系电话', trigger: 'submit'}],
rules: [{required: true, message: '请输入随访人员联系电话', trigger: 'submit'},{ validator: checkMobile , trigger: 'submit' }],
},
{
formType: 'date-picker',
......
......@@ -35,7 +35,6 @@ export default ($this) => {
slots: [{name: 'cm', type: 'append'}],
rules: [{required: true, message: '请输入身高', trigger: 'submit'},{ validator: checkRange , trigger: 'submit' }, {validator: checkNumberIsToFixed , trigger: 'submit'}],
changeFun: (val)=>{
// console.log(val)
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'stroke_014'){
$this.addComponents[index].formObject.stature = val
......@@ -45,7 +44,6 @@ export default ($this) => {
blurFunc: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'stroke_014'){
// console.log($this.addComponents[index].formObject)
let weight = $this.addComponents[index].formObject.weight
let stature = $this.addComponents[index].formObject.stature
if(weight && stature){
......@@ -53,9 +51,6 @@ export default ($this) => {
stature = parseFloat(stature);
let bmi = (weight / Math.pow((stature/100),2)).toFixed(1);
$this.addComponents[index].formObject.bmi = bmi;
$this.addComponents[13].formObject.bmi = bmi;
$this.bmi = bmi;
item.formObject.bmi = bmi;
}
}
})
......@@ -76,7 +71,6 @@ export default ($this) => {
slots: [{name: 'kg', type: 'append'}],
rules: [{required: true, message: '请输入体重', trigger: 'submit'},{ validator: checkRange , trigger: 'submit' }, {validator: checkNumberIsToFixed , trigger: 'submit'}],
changeFun: (val)=>{
// console.log(val)
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'stroke_014'){
$this.addComponents[index].formObject.weight = val
......@@ -86,7 +80,6 @@ export default ($this) => {
blurFunc: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'stroke_014'){
// console.log($this.addComponents[index].formObject)
let weight = $this.addComponents[index].formObject.weight
let stature = $this.addComponents[index].formObject.stature
if(weight && stature){
......@@ -94,9 +87,6 @@ export default ($this) => {
stature = parseFloat(stature);
let bmi = (weight / Math.pow((stature/100),2)).toFixed(1);
$this.addComponents[index].formObject.bmi = bmi;
$this.addComponents[13].formObject.bmi = bmi;
$this.bmi = bmi;
item.formObject.bmi = bmi;
}
}
})
......
......@@ -52,7 +52,6 @@
data(){
return {
canRender: true,
bmi: 0,
planPatientsTimesId: '',
scaleNo: '',
doctorId: '',
......@@ -70,7 +69,7 @@
{name: 'TreatmentSituation',formObject: {},formName: 'stroke_011',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation(this), title: '四、本次随访期间血管病变的外科手术或介入治疗情况-颈动脉'},
{name: 'TreatmentSituation2',formObject: {},formName: 'stroke_012',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation2(this), hideTitle: true, title: '四、本次随访期间血管病变的外科手术或介入治疗情况-冠状动脉'},
{name: 'TreatmentSituation3',formObject: {},formName: 'stroke_013',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation3(this), hideTitle: true, title: '四、本次随访期间血管病变的外科手术或介入治疗情况-出血性卒中外科治疗'},
{name: 'CheckBody',formObject: {},formName: 'stroke_014',className: 'obj-form-title',dataSource: dataSourceCheckBody(this), title: '五、体格检查(高危人群12个月随访必做)'},
{name: 'CheckBody',formObject: {bmi: 0,},formName: 'stroke_014',className: 'obj-form-title',dataSource: dataSourceCheckBody(this), title: '五、体格检查(高危人群12个月随访必做)'},
{name: 'CheckLab',formObject: {},formName: 'stroke_015',className: 'obj-form-title',dataSource: dataSourceCheckLab(this), title: '六、实验室检查(高危人群12个月随访必填)'},
],
formData: {},//整个表单对象
......@@ -140,18 +139,6 @@
this.$emit('checkEnd',false);
}
},
bmi(val){
if(val>0){
this.addComponents.forEach((item,index)=>{
if(item.formName == 'stroke_014'){
console.log('watch==>>',val)
this.addComponents[index].formObject.bmi = val
item.formObject.bmi = val
this.$forceUpdate()
}
})
}
},
addComponents(val){
console.log(val)
},
......@@ -160,7 +147,6 @@
}
},
created(){
// /scale/{patientTimesId}/{scaleNo}/info
this.planPatientsTimesId = this.$route.query.planPatientsTimesId
this.scaleNo = this.$route.query.scaleNo
this.doctorId = this.$route.query.doctorId
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册