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