record
parent
5fd56bd2bf
commit
a18e117b56
|
|
@ -248,19 +248,19 @@ export default {
|
|||
// if (res.status == 0) {
|
||||
// this.type.options = res.data.items
|
||||
// }
|
||||
res = await this.$ajax.get('/admin-api/api/keywords/list', { params: { type_key: 'illness_type' } })
|
||||
await this.loadData()
|
||||
res = await this.$ajax.get('/admin-api/api/keywords/list', { params: { type_key: 'illness_type', value: this.info?.type?.key } })
|
||||
if (res.status == 0) {
|
||||
this.illnessType.list = [res.data]
|
||||
}
|
||||
this.loadData()
|
||||
},
|
||||
loadData() {
|
||||
async loadData() {
|
||||
if (!this.id) {
|
||||
return
|
||||
}
|
||||
uni.showLoading()
|
||||
const params = { _action: 'getData' }
|
||||
this.$ajax.get(`/admin-api/record/${this.id}`, { params }).then(res => {
|
||||
let res = await this.$ajax.get(`/admin-api/record/${this.id}`, { params })
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.status == 0) {
|
||||
this.info = {
|
||||
|
|
@ -284,9 +284,7 @@ export default {
|
|||
this.illnessType.value = illness.id
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
|
||||
},
|
||||
update(key, value) {
|
||||
const params = {
|
||||
|
|
|
|||
|
|
@ -170,10 +170,7 @@ export default {
|
|||
methods: {
|
||||
async init() {
|
||||
let res
|
||||
res = await this.$ajax.get('/admin-api/api/keywords/list', { params: { type_key: 'illness_type' } })
|
||||
if (res.status == 0) {
|
||||
this.illnessType.list = [res.data]
|
||||
}
|
||||
|
||||
res = await this.$ajax.get('/admin-api/current-user')
|
||||
if (res.status == 0) {
|
||||
this.currentUser = res.data
|
||||
|
|
@ -227,6 +224,10 @@ export default {
|
|||
this.typeName = this.patient.type.name
|
||||
}
|
||||
}
|
||||
res = await this.$ajax.get('/admin-api/api/keywords/list', { params: { type_key: 'illness_type', value: this.patient?.type?.key} })
|
||||
if (res.status == 0) {
|
||||
this.illnessType.list = [res.data]
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.form.images = this.$refs['images'].getList().map(item => item.url)
|
||||
|
|
|
|||
Loading…
Reference in New Issue