武田基因病B开发环境
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.4 KiB

2 months ago
const app = getApp<IAppOption>()
2 months ago
Component({
properties: {
show: {
type: Boolean,
value: false,
},
type: String,
params: {
type: Object,
value() {
return {}
},
},
},
2 months ago
data: {
popup1Check1: false,
2 months ago
TCenterId: '',
2 weeks ago
inhibitorsId: '',
inhibitorsName: '',
inhibitorsContent: '',
2 months ago
imageUrl: app.globalData.imageUrl,
2 months ago
Timestamp: app.globalData.Timestamp,
2 months ago
},
2 months ago
methods: {
handleOk() {
2 weeks ago
const { type, inhibitorsId, inhibitorsName, inhibitorsContent } = this.data
2 months ago
if (type === 'argument' && !this.data.popup1Check1) {
wx.showToast({
title: '请同意隐私政策',
icon: 'none',
})
return
}
if (type === 'TCenter') {
if (!this.data.TCenterId) {
wx.showToast({
title: '请选择诊疗中心',
icon: 'none',
})
return
}
this.triggerEvent('ok', { id: this.data.TCenterId })
return
}
2 weeks ago
if (type === 'inhibitors') {
if (!inhibitorsId) {
wx.showToast({
title: '请选择抑制剂',
icon: 'none',
})
return
}
if (inhibitorsName === '其他' && !inhibitorsContent) {
wx.showToast({
title: '请填写其他抑制剂',
icon: 'none',
})
return
}
this.triggerEvent('ok', { id: inhibitorsId, name: inhibitorsName, content: inhibitorsContent })
return
}
2 months ago
this.triggerEvent('ok')
},
handleCancel() {
this.triggerEvent('cancel')
},
2 months ago
routerTo(e: any) {
const { url } = e.currentTarget.dataset
wx.navigateTo({
url,
})
},
2 months ago
handlePopup1Check1() {
if (this.data.popup1Check1) {
app.mpBehavior({ PageName: 'BTN_PATIENTPRIVACY' })
}
},
handleSelectStatus(e) {
const { status } = e.currentTarget.dataset
this.triggerEvent('ok', { type: 'selectStatusComplete', status })
},
handleSelectTCenter(e) {
const { id } = e.currentTarget.dataset
this.setData({
TCenterId: id,
})
},
2 weeks ago
handleSelectInhibitors(e) {
const { id, name } = e.currentTarget.dataset
console.log(11111)
this.setData({
inhibitorsId: id,
inhibitorsName: name,
})
},
2 months ago
},
})