Commit 6c1b6427 authored by miaojiale's avatar miaojiale

新增的医联体管理接口

parent 33740995
...@@ -9,3 +9,10 @@ export function addMedicalunion(data = {}) { ...@@ -9,3 +9,10 @@ export function addMedicalunion(data = {}) {
data, data,
}) })
} }
export function medicalunionList(params = {}) {
return request({
url: "/cloud-upms/sys/union/list",
method: "get",
params,
})
}
...@@ -18,7 +18,12 @@ ...@@ -18,7 +18,12 @@
@currentPageChange="handleCurrentChange" @currentPageChange="handleCurrentChange"
/> />
</div> </div>
<el-dialog :visible.sync="addVisible" width="520px" :show-close="true"> <el-dialog
:visible.sync="addVisible"
width="520px"
:show-close="true"
@closed="clearForm"
>
<div class="title">添加医联体</div> <div class="title">添加医联体</div>
<el-form <el-form
ref="form" ref="form"
...@@ -63,7 +68,10 @@ ...@@ -63,7 +68,10 @@
<script> <script>
import CustomsTable from "@/components/CustomsTable" import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin" import paginationMixin from "@/components/TabComponents/mixin"
import { addMedicalunion } from "@/api/medicalunion-management" import {
addMedicalunion,
medicalunionList,
} from "@/api/medicalunion-management"
export default { export default {
components: { components: {
...@@ -129,6 +137,7 @@ export default { ...@@ -129,6 +137,7 @@ export default {
tableData: [ tableData: [
{ {
unionName: "第一个", unionName: "第一个",
id: 123,
}, },
], ],
formList: [ formList: [
...@@ -159,8 +168,17 @@ export default { ...@@ -159,8 +168,17 @@ export default {
} }
}, },
watch: {}, watch: {},
mounted() {}, mounted() {
this.getMedicalunionList()
},
methods: { methods: {
// 获取list
getMedicalunionList() {
medicalunionList({
size: this.pageSize,
current: this.pageIndex,
}).then((res) => {})
},
// 添加医联体 // 添加医联体
addMedical() { addMedical() {
this.addVisible = true this.addVisible = true
...@@ -168,12 +186,7 @@ export default { ...@@ -168,12 +186,7 @@ export default {
// 编辑医联体 // 编辑医联体
editMedical(data) { editMedical(data) {
console.log(data) console.log(data)
this.form = { this.form = data
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true this.addVisible = true
}, },
submit() { submit() {
...@@ -182,6 +195,7 @@ export default { ...@@ -182,6 +195,7 @@ export default {
addMedicalunion(this.form).then((res) => { addMedicalunion(this.form).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.$message.success("添加成功") this.$message.success("添加成功")
this.addVisible = false
} }
}) })
} else { } else {
...@@ -190,6 +204,10 @@ export default { ...@@ -190,6 +204,10 @@ export default {
} }
}) })
}, },
clearForm() {
this.form = {}
this.$refs["form"].resetFields()
},
}, },
} }
</script> </script>
......
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