Commit 33740995 authored by miaojiale's avatar miaojiale

医联体管理接口

parent 674a77d4
import request from "@/utils/request"
/* 数据库管理 */
export function addMedicalunion(data = {}) {
return request({
url: "/cloud-upms/sys/union/addOrUpdate",
method: "post",
data,
})
}
......@@ -21,6 +21,7 @@
<el-dialog :visible.sync="addVisible" width="520px" :show-close="true">
<div class="title">添加医联体</div>
<el-form
ref="form"
:model="form"
:label-position="'right'"
label-width="110px"
......@@ -30,6 +31,8 @@
v-for="(item, index) in formList"
:key="index"
:label="item.label"
:rules="[{ required: true, message: item.label + '不能为空' }]"
:prop="item.prop"
>
<el-input
v-if="item.type == 'input'"
......@@ -52,7 +55,7 @@
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addVisible = false">保存</el-button>
<el-button type="primary" @click="submit()">保存</el-button>
</span>
</el-dialog>
</div>
......@@ -60,6 +63,8 @@
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import { addMedicalunion } from "@/api/medicalunion-management"
export default {
components: {
CustomsTable,
......@@ -73,23 +78,23 @@ export default {
{
label: "医联体名称",
minWidth: 120,
value: "groupName",
value: "unionName",
},
{
label: "医联体编号",
minWidth: 120,
value: "name",
value: "unionNo",
},
{
label: "",
minWidth: 120,
value: "sex",
value: "province",
},
{
label: "",
minWidth: 120,
value: "idCard",
value: "city",
},
{
label: "操作",
......@@ -123,19 +128,19 @@ export default {
],
tableData: [
{
groupName: "第一个",
unionName: "第一个",
},
],
formList: [
{
type: "input",
label: "医联体名称",
prop: "medicalName",
prop: "unionName",
},
{
type: "input",
label: "医联体编号",
prop: "medicalId",
prop: "unionNo",
},
{
type: "select",
......@@ -171,6 +176,20 @@ export default {
}
this.addVisible = true
},
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
addMedicalunion(this.form).then((res) => {
if (res.code == 1) {
this.$message.success("添加成功")
}
})
} else {
console.log("error submit!!")
return false
}
})
},
},
}
</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