Files
dvcp_v2_webapp/ui/dv/model/PartyOrg.js
2024-04-12 10:22:47 +08:00

27 lines
548 B
JavaScript

import http from "dui/lib/js/request";
import Vue from "vue"
export default class PartyOrg {
constructor(id) {
this.id = id
this.loaded = false
this.init().finally(() => this.loaded = true)
}
init() {
return PartyOrg.getInfo(this.id).then(data => {
Object.entries(data).map(([k, v]) => Vue.set(this, k, v))
})
}
static getInfo(id) {
return http.post("/app/partyOrganization/queryOrgById", null, {
params: {id}
}).then(res => {
if (res?.data) {
return res.data
}
})
}
}