diff --git a/src/api/medicalunion-management.js b/src/api/medicalunion-management.js index 96963aa11527fb885a2cd27f81c8a8e37f006fb1..a89bf03fe8e62a6712661fd9c7e67fa84ea75c71 100644 --- a/src/api/medicalunion-management.js +++ b/src/api/medicalunion-management.js @@ -9,3 +9,10 @@ export function addMedicalunion(data = {}) { data, }) } +export function medicalunionList(params = {}) { + return request({ + url: "/cloud-upms/sys/union/list", + method: "get", + params, + }) +} diff --git a/src/views/systems/medicalunion-management/index.vue b/src/views/systems/medicalunion-management/index.vue index 21244bb9583f241e438f3a369036fbdb4ccac2ff..52162b211c99f9c98af7cb0e82f4bf2c12bb5580 100644 --- a/src/views/systems/medicalunion-management/index.vue +++ b/src/views/systems/medicalunion-management/index.vue @@ -18,7 +18,12 @@ @currentPageChange="handleCurrentChange" /> - +
添加医联体
import CustomsTable from "@/components/CustomsTable" import paginationMixin from "@/components/TabComponents/mixin" -import { addMedicalunion } from "@/api/medicalunion-management" +import { + addMedicalunion, + medicalunionList, +} from "@/api/medicalunion-management" export default { components: { @@ -129,6 +137,7 @@ export default { tableData: [ { unionName: "第一个", + id: 123, }, ], formList: [ @@ -159,8 +168,17 @@ export default { } }, watch: {}, - mounted() {}, + mounted() { + this.getMedicalunionList() + }, methods: { + // 获取list + getMedicalunionList() { + medicalunionList({ + size: this.pageSize, + current: this.pageIndex, + }).then((res) => {}) + }, // 添加医联体 addMedical() { this.addVisible = true @@ -168,12 +186,7 @@ export default { // 编辑医联体 editMedical(data) { console.log(data) - this.form = { - medicalName: "黑乎乎", - medicalId: "123", - province: "001", - city: "001", - } + this.form = data this.addVisible = true }, submit() { @@ -182,6 +195,7 @@ export default { addMedicalunion(this.form).then((res) => { if (res.code == 1) { this.$message.success("添加成功") + this.addVisible = false } }) } else { @@ -190,6 +204,10 @@ export default { } }) }, + clearForm() { + this.form = {} + this.$refs["form"].resetFields() + }, }, }