Commit 8f89bc89 authored by 刘予佳's avatar 刘予佳

Merge remote-tracking branch 'remotes/origin/dev_Miaojiale' into dev_lyj

parents fb634537 6c1b6427
import request from "@/utils/request"
/* 数据库管理 */
export function addMedicalunion(data = {}) {
return request({
url: "/cloud-upms/sys/union/addOrUpdate",
method: "post",
data,
})
}
export function medicalunionList(params = {}) {
return request({
url: "/cloud-upms/sys/union/list",
method: "get",
params,
})
}
<template>
<el-row :gutter="options.gutter" class="form-content">
<template v-for="(item, columnIndex) in columns.column || columns.children.column">
<template
v-for="(item, columnIndex) in columns.column || columns.children.column"
>
<div
v-if="item.type === 'dynamic'"
v-show="item.display"
......@@ -8,7 +10,11 @@
style="width: 100%"
class="dynamic-form-container"
>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
></el-form-item>
<div class="dynamic-form-container_lable">{{ item.label }}</div>
<form-dynamic
v-model="form[item.prop]"
......@@ -25,7 +31,11 @@
style="width: 100%"
>
<el-collapse :value="item.collapse ? item.prop : ''">
<el-collapse-item :title="item.label" :name="item.prop" :disabled="!item.arrow">
<el-collapse-item
:title="item.label"
:name="item.prop"
:disabled="!item.arrow"
>
<form-content
ref="form-content"
:form="form"
......@@ -43,7 +53,11 @@
:key="columnIndex"
style="width: 100%"
>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
></el-form-item>
<dental-tab-form
ref="dental"
v-model="form[item.prop]"
......@@ -59,7 +73,11 @@
:key="columnIndex"
style="width: 100%"
>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
></el-form-item>
<dental-tab-tj-form
ref="dental"
v-model="form[item.prop]"
......@@ -168,7 +186,7 @@ export default {
},
// 切换不符合筛查条件的显示
formChange() {
// 入选,排除标准
// 入选,排除标准,一个填写是就不符合筛查条件
console.log(this.form)
let arr = [
"is_one_year",
......@@ -181,7 +199,7 @@ export default {
]
let flag = 0
for (let i = 0; i < arr.length; i++) {
if (this.form[arr[i]] && this.form[arr[i]] == 0) {
if (this.form[arr[i]] && this.form[arr[i]] == 1) {
flag++
}
}
......
......@@ -2,13 +2,35 @@
<div class="form-item-text">
<template v-if="form[item.prop]">
<span v-if="item.prepend">{{ item.prepend }}</span>
<span style="margin: 0 5px">{{
form[item.prop] | getItemText(item.dicData, item.type)
}}</span>
<span>
<span
v-if="item.prop == 'risk_rank'"
:style="{
color:
form[item.prop] == '中危'
? '#FF9F33'
: form[item.prop] == '低危'
? 'green'
: '',
}"
>
{{ form[item.prop] }}
</span>
<span
v-else-if="item.prop == 'screening_advise'"
style="color: #4e68ff"
>
{{ form[item.prop] }}
</span>
<span v-else style="margin: 0 5px">{{
form[item.prop] | getItemText(item.dicData, item.type)
}}</span>
</span>
<span v-if="item.append && !item.toothBit" class="append">{{
item.append
}}</span>
</template>
<template v-else> -- </template>
</div>
</template>
......
......@@ -50,9 +50,7 @@
<template slot="title">
{{ g.label }}
<span v-if="g.label == '二、排除标准'" class="noCol">
{{
errorText
}}
{{ errorText }}
</span>
</template>
<form-content
......@@ -68,7 +66,7 @@
</template>
</el-collapse>
</template>
<div class="form-footer">
<div v-if="!options.closeBtn" class="form-footer">
<template v-if="options.menuBtn">
<template v-if="options.prevBtn">
<el-button
......@@ -77,7 +75,8 @@
size="large"
:disabled="disabled"
@click="onPrev"
>上一步</el-button>
>上一步</el-button
>
</template>
<template v-if="options.submitBtn">
<el-button
......@@ -87,7 +86,8 @@
size="large"
:disabled="disabled"
@click="handleConfirm"
>{{ options.submitText || "提交" }}</el-button>
>{{ options.submitText || "提交" }}</el-button
>
</template>
<template v-if="options.emptyBtn">
<el-button
......@@ -95,7 +95,8 @@
icon="el-icon-delete "
size="large"
@click="resetForm(true)"
>{{ options.emptyText || "清空" }}</el-button>
>{{ options.emptyText || "清空" }}</el-button
>
</template>
</template>
<template v-if="nextTabBtnShow">
......@@ -105,7 +106,8 @@
icon="el-icon-caret-right"
size="large"
@click="nextTab"
>{{ options.nextTabText || "下一页" }}</el-button>
>{{ options.nextTabText || "下一页" }}</el-button
>
</el-form>
</template>
</div>
......@@ -377,6 +379,7 @@ export default {
padding-bottom: 0px;
}
.el-collapse-item__header {
border-radius: 4px;
background: #fafafa;
padding-left: 20px;
border: 1px solid #cccccc;
......
......@@ -30,4 +30,9 @@ export default {
},
}
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
border-top: none;
text-align: center;
}
</style>
<template>
<div>
<el-container>
<el-main v-loading="pageLoading" class="transition-box">
<el-container v-loading="fromLoading">
<el-main class="transition-box">
<el-empty v-if="!isEmpty" description="暂无数据"></el-empty>
<template v-if="isEmpty">
<div ref="my-form" class="my-form">
<custom-form
ref="customForm"
class="mb-20"
:options="jsonList[1]"
:form-edit="form"
></custom-form>
<!-- <custom-form ref="form" :options="jsonList[1]"></custom-form>
<custom-form ref="form" :options="jsonList[2]"></custom-form>
<custom-form ref="form" :options="jsonList[3]"></custom-form>
<custom-form ref="form" :options="jsonList[4]"></custom-form> -->
<custom-form
ref="form"
:options="jsonList[2]"
class="mb-20"
:form-edit="form"
></custom-form>
<custom-form
ref="form"
:options="jsonList[3]"
class="mb-20"
:form-edit="form"
></custom-form>
<custom-form
ref="form"
class="mb-20"
:options="jsonList[4]"
:form-edit="form"
></custom-form>
</div>
</template>
</el-main>
......@@ -22,7 +37,15 @@
class="transition-box"
:class="{ hidden: !asideShow }"
>
<div class="side-content"></div>
<div class="side-content">
<ul class="list">
<li v-for="(item, index) in screenList" :key="index">
<div class="time">{{ item.time }}</div>
<div class="time">{{ item.code }}</div>
<div class="time">{{ item.name }}</div>
</li>
</ul>
</div>
</el-aside>
</el-container>
</div>
......@@ -36,16 +59,29 @@ export default {
components: { CustomForm },
data() {
return {
fromLoading: false,
fromLoading: true,
formTabs: [],
formTabsList: [],
jsonList: [],
form: {
name: "123",
phone: "18712412341",
min_age: "18",
age: "18",
is_continue_follow: "1",
},
asideShow: true,
screenList: [
{
time: "2020-12-12 11:11:11",
code: "UK102",
name: "修改第一次随访计划",
},
],
}
},
provide() {
return {
showIndex: true,
}
},
computed: {
......@@ -58,9 +94,6 @@ export default {
sideWidth() {
return this.asideShow ? "200px" : "0px"
},
pageLoading() {
return this.loading || this.formloading
},
},
watch: {},
created() {
......@@ -116,11 +149,12 @@ export default {
const formJson = res.data.formJson
const obj = eval("(" + formJson + ")")
obj.disabled = true
obj.closeBtn = true
obj.detail = true
this.jsonList.push(obj)
if (i == 4) {
console.log(this.jsonList)
this.formloading = false
this.fromLoading = false
}
}
})
......@@ -134,4 +168,33 @@ export default {
},
}
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.md-20 {
margin-bottom: 20px;
}
.el-aside {
padding: 20px 0 38.5px;
.side-content {
width: 100%;
height: 100%;
border: 1px solid #ccc;
border-radius: 4px;
.list {
li {
padding: 20px 30px;
border-bottom: 1px solid #ccc;
cursor: pointer;
.time {
font-size: 14px;
margin-bottom: 8px;
font-family: AlibabaPuHuiTiR;
text-align: left;
&:first-child {
color: #4e68ff;
}
}
}
}
}
}
</style>
<template>
<div id="audit-detail">
<div class="audit-detail_header p-24">
<div class="left">
<span>当前审核</span>
<span class="f-b">【无锡市人民医院医联体】【剩余7】</span>
</div>
<div class="right">
<el-button class="btn" @click="$router.go(-1)">返回</el-button>
<div class="top">
<div class="audit-detail_header p-24">
<div class="left">
<span>当前审核</span>
<span class="f-b">【无锡市人民医院医联体】【剩余7】</span>
</div>
<div class="right">
<el-button class="btn" @click="$router.go(-1)">返回</el-button>
</div>
</div>
</div>
<div class="choose-handle p-24">
<span v-if="!editStatus">请选择审核结果:</span>
<div class="btn_group">
<el-button
v-for="(item, index) in btnGroup"
:key="index"
type="primary"
class="p-btn"
size="medium"
@click="showDialog(item.value)"
>{{ item.text }}</el-button
>
<span v-if="editStatus" class="op">驳回修改建议:胃镜图片不合规</span>
<div class="choose-handle p-24">
<span v-if="!editStatus">请选择审核结果:</span>
<div class="btn_group">
<el-button
v-for="(item, index) in btnGroup"
:key="index"
type="primary"
class="p-btn"
size="medium"
@click="showDialog(item.value)"
>{{ item.text }}</el-button
>
<span v-if="editStatus" class="op">驳回修改建议:胃镜图片不合规</span>
</div>
</div>
</div>
<div class="table-content p-24">
......@@ -212,12 +214,8 @@ export default {
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
border-top: none;
text-align: center;
.tips {
font-size: 16px;
}
.tips {
font-size: 16px;
}
.p-24 {
padding: 0 24px;
......@@ -228,6 +226,8 @@ export default {
}
#audit-detail {
display: flex;
flex-direction: column;
// padding: 22px 24px;
.audit-detail_header {
height: 65px;
......@@ -301,6 +301,8 @@ export default {
margin-left: 20px;
}
.table-content {
height: calc(100vh - 260px);
overflow: auto;
padding-top: 20px;
padding-bottom: 20px;
}
......
<template>
<div id="publicContent" :class="activeName == 'index0' && formClass ? formClass : ''">
<div
id="publicContent"
:class="activeName == 'index0' && formClass ? formClass : ''"
>
<div v-if="formTabs && formTabs.length > 0">
<el-button class="draftButton">
{{
formType == 1 ? "临时保存" : "返回"
}}
<el-button
class="draftButton"
@click="onSubmit(formType)"
:loading="loading"
>
{{ formType == 1 ? "临时保存" : "返回" }}
</el-button>
<el-tabs
v-model="activeName"
......@@ -41,14 +46,59 @@
</el-tabs>
</div>
<el-empty v-else description="暂无数据"></el-empty>
<public-dialog
ref="showDialog"
@onSubmit="dialogSubmit"
@onCancel="dialogCancel"
>
<!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content">
<div class="title center">已保存至草稿箱!</div>
<div class="content center">
<div class="img">
<img src="~@/assets/img/DataCenter/draft.png" alt="" />
</div>
<div class="showTips">您可以在【草稿箱】页面找到该数据</div>
</div>
<div class="btn">
<el-button type="primary" :loading="loading" @click="continueSubmit"
>继续添加</el-button
>
</div>
</template>
<!-- 保存提交 -->
<template v-if="dialogType == 'submit'" slot="content">
<div class="title center">提交成功!</div>
<div class="content center">
<div class="img">
<img src="~@/assets/img/DataCenter/submit.png" alt="" />
</div>
<div class="showTips">您可以在【筛查查询】页面查询到该数据</div>
</div>
<div class="btn">
<el-button
type="primary"
:loading="loading"
@click="view"
class="textBtn"
>查看</el-button
>
<el-button type="primary" :loading="loading" @click="continueSubmit"
>继续添加</el-button
>
</div>
</template>
</public-dialog>
</div>
</template>
<script>
import mixin from "./mixin"
import CustomForm from "@/components/FormComponents/CustomForm/index"
import publicDialog from "../../audit-detail/components/publicDialog.vue"
export default {
components: { publicDialog },
name: "ConfigForms",
mixins: [mixin],
props: {
......@@ -61,15 +111,33 @@ export default {
return {
// showIndex:false,
// survivalFlag:false
dialogType: "",
loading: false,
}
},
methods: {
view() {},
handleConfirm(data, done, cb) {
this.addPatient(data, done, cb)
},
onPrev(done) {
this.prevTab(done)
},
onSubmit(type) {
this.loading = true
if (type == 1) {
// 临时保存草稿
this.dialogType = "draft"
this.$refs.showDialog.dialogVisible = true
this.loading = false
} else {
// 返回
}
},
dialogSubmit() {},
dialogCancel() {},
continueSubmit() {},
},
created() {
// 字典formType 1 筛查表单
......@@ -126,6 +194,32 @@ export default {
border: 1px solid #4e68ff;
color: #4e68ff;
}
.content {
img {
width: 248px;
height: 180px;
}
}
}
::v-deep .el-dialog__body {
.title {
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
margin-bottom: 20px;
}
.showTips {
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: rgba(0, 0, 0, 0.8);
margin-bottom: 20px;
}
.btn {
.el-button {
width: 100px;
height: 32px;
}
}
}
.publicTab {
// width: calc(100%);
......@@ -198,4 +292,11 @@ export default {
}
}
}
.textBtn {
width: 100px;
height: 32px;
background: #ffffff;
border: 1px solid #4e68ff;
color: #4e68ff;
}
</style>
......@@ -42,8 +42,16 @@
</el-switch>-->
</div>
</el-row>
<div class="my-form" ref="my-form" :class="externalScroll ? 'no-scroll' : ''">
<read-form ref="form" :options="survivalForm" v-if="survivalFlag"></read-form>
<div
class="my-form"
ref="my-form"
:class="externalScroll ? 'no-scroll' : ''"
>
<read-form
ref="form"
:options="survivalForm"
v-if="survivalFlag"
></read-form>
<custom-form
ref="form"
@scrollTop="scrollTop"
......@@ -81,9 +89,9 @@ export default {
patientId: String,
patientStandbyId: String,
getAll: Boolean, // 获取页面所有数据
survivalFlag:Boolean, //存活的显示
survivalFlag: Boolean, //存活的显示
},
components: { CustomForm, TagsScrollBar,ReadForm },
components: { CustomForm, TagsScrollBar, ReadForm },
provide() {
return {
formId: this.form.formId,
......@@ -99,7 +107,11 @@ export default {
asideShow: false,
widgetFormPreview: {},
formData: {
formEdit: {},
formEdit: {
risk_rank: "中危",
risk_score: "5分",
screening_advise: "立刻住院",
},
percent: {},
formRecordId: null,
},
......@@ -107,218 +119,232 @@ export default {
formloading: false,
repeatedlyList: [],
formCacheList: [],
survivalForm:{
survivalForm: {
column: [],
labelPosition: 'right',
labelSuffix: '',
labelPosition: "right",
labelSuffix: "",
labelWidth: 100,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: '提交',
submitText: "提交",
emptyBtn: true,
emptyText: '清空',
emptyText: "清空",
nextTabBtn: true,
nextTabText: '下一页',
menuPosition: 'center',
nextTabText: "下一页",
menuPosition: "center",
group: [
{
label: '个人信息',
prop: '1669858228269_22763',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'name',
label: '姓名',
fieldType: 'varchar',
fieldLength: '50',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'contact_phone',
label: '手机号',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'telephone',
label: '联系电话',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'sex',
label: '性别',
fieldType: 'tinyint',
fieldLength: '2',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'birthday',
label: '出生日期',
fieldType: 'date',
fieldLength: '',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
label: "个人信息",
prop: "1669858228269_22763",
arrow: true,
collapse: true,
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'age',
label: '年龄',
fieldType: 'int',
fieldLength: '4',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}]
},
{
label: '第一次随访计划',
prop: '1669858313508_15760',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'is_continue_follow',
label: '是否随访',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [],
dicType: 'd-sf',
props: {
label: 'label',
value: 'value'
},
fieldType: 'tinyint',
fieldLength: '2',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
value: '1',
span: 24,
autoRequired: 0,
personalRequired: 0
}, {
type: 'date',
display: true,
importantField: true,
styles: {},
prop: 'first_follow_time',
label: '随访时间',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dicType: '',
fieldType: 'date',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
span: 12,
autoRequired: 0,
personalRequired: 0,
width: 12
}, {
type: 'input',
labelWidth: 8,
column: [
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "name",
label: "姓名",
fieldType: "varchar",
fieldLength: "50",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "contact_phone",
label: "手机号",
fieldType: "varchar",
fieldLength: "20",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "telephone",
label: "联系电话",
fieldType: "varchar",
fieldLength: "20",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "sex",
label: "性别",
fieldType: "tinyint",
fieldLength: "2",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "birthday",
label: "出生日期",
fieldType: "date",
fieldLength: "",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "age",
label: "年龄",
fieldType: "int",
fieldLength: "4",
tableName: "存活情况",
tableCode: "gas_survival_situation",
tableId: "1598137567272861697",
notFilter: false,
cType: "",
subfield: false,
},
],
},
{
label: "第一次随访计划",
prop: "1669858313508_15760",
arrow: true,
collapse: true,
display: true,
importantField: true,
styles: {},
prop: 'follow_contents',
label: '随访内容',
fieldType: 'text',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 12,
width: 12
}]
},
]
}
labelWidth: 8,
column: [
{
type: "radio",
display: true,
importantField: true,
styles: {},
prop: "is_continue_follow",
label: "是否随访",
dicData: [
{
label: "",
value: "1",
id: "1595347527757000705",
parentId: "",
},
{
label: "",
value: "0",
id: "1595347502595371010",
parentId: "",
},
],
dynamicshSet: [],
dicType: "d-sf",
props: {
label: "label",
value: "value",
},
fieldType: "tinyint",
fieldLength: "2",
tableName: "随访计划",
tableCode: "gas_follow",
tableId: "1597491580053323777",
notFilter: false,
cType: "",
subfield: false,
value: "1",
span: 24,
autoRequired: 0,
personalRequired: 0,
},
{
type: "date",
display: true,
importantField: true,
styles: {},
prop: "first_follow_time",
label: "随访时间",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
dicType: "",
fieldType: "date",
tableName: "随访计划",
tableCode: "gas_follow",
tableId: "1597491580053323777",
notFilter: false,
cType: "",
subfield: false,
span: 12,
autoRequired: 0,
personalRequired: 0,
width: 12,
},
{
type: "input",
display: true,
importantField: true,
styles: {},
prop: "follow_contents",
label: "随访内容",
fieldType: "text",
tableName: "随访计划",
tableCode: "gas_follow",
tableId: "1597491580053323777",
notFilter: false,
cType: "",
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 12,
width: 12,
},
],
},
],
},
}
},
// mixins: [resizeMixin],
......@@ -400,6 +426,8 @@ export default {
obj.menuBtn = false
obj.disabled = true
obj.detail = true
} else if (res.data.name == "风险评估") {
obj.detail = true
}
this.widgetFormPreview = obj
}
......
......@@ -41,11 +41,13 @@ export default {
},
handleTabClick({ index, name }) {
const { formId, id, silent } = this.formTabs[index]
console.log('表单项', this.formTabs)
console.log("表单项", this.formTabs[index])
if (formId && silent) {
this.formTabs[index]["silent"] = false //控制是否获取接口数据
return
}
if (this.formTabs[index].formName == "风险评估") {
}
this.formTabs.splice(index, 1, {
...this.formTabsList.find((_) => _.id === id),
})
......
......@@ -200,7 +200,7 @@ export default {
},
},
created() {
this.handleFormSearch()
// this.handleFormSearch()
},
}
</script>
......
......@@ -18,9 +18,15 @@
@currentPageChange="handleCurrentChange"
/>
</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>
<el-form
ref="form"
:model="form"
:label-position="'right'"
label-width="110px"
......@@ -30,6 +36,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 +60,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 +68,11 @@
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import {
addMedicalunion,
medicalunionList,
} from "@/api/medicalunion-management"
export default {
components: {
CustomsTable,
......@@ -73,23 +86,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 +136,20 @@ export default {
],
tableData: [
{
groupName: "第一个",
unionName: "第一个",
id: 123,
},
],
formList: [
{
type: "input",
label: "医联体名称",
prop: "medicalName",
prop: "unionName",
},
{
type: "input",
label: "医联体编号",
prop: "medicalId",
prop: "unionNo",
},
{
type: "select",
......@@ -154,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
......@@ -163,14 +186,28 @@ export default {
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.form = data
this.addVisible = true
},
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
addMedicalunion(this.form).then((res) => {
if (res.code == 1) {
this.$message.success("添加成功")
this.addVisible = false
}
})
} else {
console.log("error submit!!")
return false
}
})
},
clearForm() {
this.form = {}
this.$refs["form"].resetFields()
},
},
}
</script>
......
......@@ -33,7 +33,7 @@
:show-close="true"
@closed="resetForm"
>
<div class="title">添加</div>
<div class="title">{{ readOnly ? "查看" : "添加" }}</div>
<el-form
ref="form"
:model="form"
......@@ -48,40 +48,45 @@
:label="item.label"
:prop="item.prop"
>
<!-- 输入框 -->
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<!-- 下拉选 -->
<el-select
v-else-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
<!-- 上传 -->
<el-upload-self
v-else-if="item.type === 'upload'"
v-model="form[item.prop]"
:btn-type="'text'"
v-bind="item"
></el-upload-self>
<!-- switch -->
<!-- switch切换 启用 -->
<el-switch
v-else-if="item.type === 'switch'"
v-model="form[item.prop]"
>
</el-switch>
<template v-if="!readOnly">
<!-- 输入框 -->
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<!-- 下拉选 -->
<el-select
v-else-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
<!-- 上传 -->
<el-upload-self
v-else-if="item.type === 'upload'"
v-model="form[item.prop]"
:btn-type="'text'"
v-bind="item"
></el-upload-self>
<!-- switch -->
<!-- switch切换 启用 -->
<el-switch
v-else-if="item.type === 'switch'"
v-model="form[item.prop]"
>
</el-switch>
</template>
<template v-else>
<span>{{ form[item.prop] || "--" }}</span>
</template>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -103,6 +108,7 @@ export default {
mixins: [paginationMixin],
data() {
return {
readOnly: true,
addVisible: false,
selectList: [
{
......@@ -169,7 +175,7 @@ export default {
operType: "button",
operations: [
{
func: this.editMedical,
func: this.viewMedical,
formatter(row) {
return {
label: "查看",
......@@ -266,8 +272,17 @@ export default {
addMedical() {
this.addVisible = true
},
// 查看
viewMedical() {
this.readOnly = true
this.form = {
title: "123",
}
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
this.readOnly = false
console.log(data)
this.form = {
medicalName: "黑乎乎",
......
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