Commit 26472f8f authored by 芮自成's avatar 芮自成

问题修改

parent 809d8906
...@@ -414,10 +414,18 @@ export default { ...@@ -414,10 +414,18 @@ export default {
handler() { handler() {
let { currentMedicateCase, addMedicateCase, noComplianceReason } = this.form let { currentMedicateCase, addMedicateCase, noComplianceReason } = this.form
if (currentMedicateCase) { if (currentMedicateCase) {
this.currentMedicateCase = JSON.parse(currentMedicateCase) this.currentMedicateCase = JSON.parse(currentMedicateCase) || {}
this.currentMedicateCase.unitName = this.currentMedicateCase.unitName || this.store.getDictValue('CP00081', this.currentMedicateCase.unit)
this.currentMedicateCase.frequencyName = this.currentMedicateCase.frequencyName || this.store.getDictValue('CP00084', this.currentMedicateCase.frequency)
this.currentMedicateCase.usageName = this.currentMedicateCase.usageName || this.store.getDictValue('CP00083', this.currentMedicateCase.usage)
} }
if (addMedicateCase) { if (addMedicateCase) {
this.addMedicateCase = JSON.parse(addMedicateCase) this.addMedicateCase = JSON.parse(addMedicateCase) || []
this.addMedicateCase.map(item => {
item.unitName = item.unitName || this.store.getDictValue('CP00081', item.unit)
item.frequencyName = item.frequencyName || this.store.getDictValue('CP00084', item.frequency)
item.usageName = item.usageName || this.store.getDictValue('CP00083', item.usage)
})
} }
if (noComplianceReason) { if (noComplianceReason) {
this.form.noComplianceReason = noComplianceReason.split(',').map(e => +e) this.form.noComplianceReason = noComplianceReason.split(',').map(e => +e)
......
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