Commit 674a77d4 authored by miaojiale's avatar miaojiale

修改部分功能

parent e1d250d8
...@@ -50,9 +50,7 @@ ...@@ -50,9 +50,7 @@
<template slot="title"> <template slot="title">
{{ g.label }} {{ g.label }}
<span v-if="g.label == '二、排除标准'" class="noCol"> <span v-if="g.label == '二、排除标准'" class="noCol">
{{ {{ errorText }}
errorText
}}
</span> </span>
</template> </template>
<form-content <form-content
...@@ -77,7 +75,8 @@ ...@@ -77,7 +75,8 @@
size="large" size="large"
:disabled="disabled" :disabled="disabled"
@click="onPrev" @click="onPrev"
>上一步</el-button> >上一步</el-button
>
</template> </template>
<template v-if="options.submitBtn"> <template v-if="options.submitBtn">
<el-button <el-button
...@@ -87,7 +86,8 @@ ...@@ -87,7 +86,8 @@
size="large" size="large"
:disabled="disabled" :disabled="disabled"
@click="handleConfirm" @click="handleConfirm"
>{{ options.submitText || "提交" }}</el-button> >{{ options.submitText || "提交" }}</el-button
>
</template> </template>
<template v-if="options.emptyBtn"> <template v-if="options.emptyBtn">
<el-button <el-button
...@@ -95,7 +95,8 @@ ...@@ -95,7 +95,8 @@
icon="el-icon-delete " icon="el-icon-delete "
size="large" size="large"
@click="resetForm(true)" @click="resetForm(true)"
>{{ options.emptyText || "清空" }}</el-button> >{{ options.emptyText || "清空" }}</el-button
>
</template> </template>
</template> </template>
<template v-if="nextTabBtnShow"> <template v-if="nextTabBtnShow">
...@@ -105,7 +106,8 @@ ...@@ -105,7 +106,8 @@
icon="el-icon-caret-right" icon="el-icon-caret-right"
size="large" size="large"
@click="nextTab" @click="nextTab"
>{{ options.nextTabText || "下一页" }}</el-button> >{{ options.nextTabText || "下一页" }}</el-button
>
</el-form> </el-form>
</template> </template>
</div> </div>
......
...@@ -30,4 +30,9 @@ export default { ...@@ -30,4 +30,9 @@ export default {
}, },
} }
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
::v-deep .el-dialog__body {
border-top: none;
text-align: center;
}
</style>
...@@ -214,12 +214,8 @@ export default { ...@@ -214,12 +214,8 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-dialog__body { .tips {
border-top: none; font-size: 16px;
text-align: center;
.tips {
font-size: 16px;
}
} }
.p-24 { .p-24 {
padding: 0 24px; padding: 0 24px;
......
<template> <template>
<div id="publicContent" :class="activeName == 'index0' && formClass ? formClass : ''"> <div
id="publicContent"
:class="activeName == 'index0' && formClass ? formClass : ''"
>
<div v-if="formTabs && formTabs.length > 0"> <div v-if="formTabs && formTabs.length > 0">
<el-button class="draftButton"> <el-button
{{ class="draftButton"
formType == 1 ? "临时保存" : "返回" @click="onSubmit(formType)"
}} :loading="loading"
>
{{ formType == 1 ? "临时保存" : "返回" }}
</el-button> </el-button>
<el-tabs <el-tabs
v-model="activeName" v-model="activeName"
...@@ -41,14 +46,59 @@ ...@@ -41,14 +46,59 @@
</el-tabs> </el-tabs>
</div> </div>
<el-empty v-else description="暂无数据"></el-empty> <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> </div>
</template> </template>
<script> <script>
import mixin from "./mixin" import mixin from "./mixin"
import CustomForm from "@/components/FormComponents/CustomForm/index" import CustomForm from "@/components/FormComponents/CustomForm/index"
import publicDialog from "../../audit-detail/components/publicDialog.vue"
export default { export default {
components: { publicDialog },
name: "ConfigForms", name: "ConfigForms",
mixins: [mixin], mixins: [mixin],
props: { props: {
...@@ -61,15 +111,33 @@ export default { ...@@ -61,15 +111,33 @@ export default {
return { return {
// showIndex:false, // showIndex:false,
// survivalFlag:false // survivalFlag:false
dialogType: "",
loading: false,
} }
}, },
methods: { methods: {
view() {},
handleConfirm(data, done, cb) { handleConfirm(data, done, cb) {
this.addPatient(data, done, cb) this.addPatient(data, done, cb)
}, },
onPrev(done) { onPrev(done) {
this.prevTab(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() { created() {
// 字典formType 1 筛查表单 // 字典formType 1 筛查表单
...@@ -126,6 +194,32 @@ export default { ...@@ -126,6 +194,32 @@ export default {
border: 1px solid #4e68ff; border: 1px solid #4e68ff;
color: #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 { .publicTab {
// width: calc(100%); // width: calc(100%);
...@@ -198,4 +292,11 @@ export default { ...@@ -198,4 +292,11 @@ export default {
} }
} }
} }
.textBtn {
width: 100px;
height: 32px;
background: #ffffff;
border: 1px solid #4e68ff;
color: #4e68ff;
}
</style> </style>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
:show-close="true" :show-close="true"
@closed="resetForm" @closed="resetForm"
> >
<div class="title">添加</div> <div class="title">{{ readOnly ? "查看" : "添加" }}</div>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
...@@ -48,40 +48,45 @@ ...@@ -48,40 +48,45 @@
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
> >
<!-- 输入框 --> <template v-if="!readOnly">
<el-input <!-- 输入框 -->
v-if="item.type == 'input'" <el-input
v-model="form[item.prop]" v-if="item.type == 'input'"
autocomplete="off" v-model="form[item.prop]"
:placeholder="'请填写' + item.label" autocomplete="off"
></el-input> :placeholder="'请填写' + item.label"
<!-- 下拉选 --> ></el-input>
<el-select <!-- 下拉选 -->
v-else-if="item.type == 'select'" <el-select
v-model="form[item.prop]" v-else-if="item.type == 'select'"
:placeholder="'请选择' + item.label" v-model="form[item.prop]"
> :placeholder="'请选择' + item.label"
<el-option >
v-for="e in item.selectGroup" <el-option
:key="e.value" v-for="e in item.selectGroup"
:label="e.label" :key="e.value"
:value="e.value" :label="e.label"
></el-option> :value="e.value"
</el-select> ></el-option>
<!-- 上传 --> </el-select>
<el-upload-self <!-- 上传 -->
v-else-if="item.type === 'upload'" <el-upload-self
v-model="form[item.prop]" v-else-if="item.type === 'upload'"
:btn-type="'text'" v-model="form[item.prop]"
v-bind="item" :btn-type="'text'"
></el-upload-self> v-bind="item"
<!-- switch --> ></el-upload-self>
<!-- switch切换 启用 --> <!-- switch -->
<el-switch <!-- switch切换 启用 -->
v-else-if="item.type === 'switch'" <el-switch
v-model="form[item.prop]" v-else-if="item.type === 'switch'"
> v-model="form[item.prop]"
</el-switch> >
</el-switch>
</template>
<template v-else>
<span>{{ form[item.prop] || "--" }}</span>
</template>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -103,6 +108,7 @@ export default { ...@@ -103,6 +108,7 @@ export default {
mixins: [paginationMixin], mixins: [paginationMixin],
data() { data() {
return { return {
readOnly: true,
addVisible: false, addVisible: false,
selectList: [ selectList: [
{ {
...@@ -169,7 +175,7 @@ export default { ...@@ -169,7 +175,7 @@ export default {
operType: "button", operType: "button",
operations: [ operations: [
{ {
func: this.editMedical, func: this.viewMedical,
formatter(row) { formatter(row) {
return { return {
label: "查看", label: "查看",
...@@ -266,8 +272,17 @@ export default { ...@@ -266,8 +272,17 @@ export default {
addMedical() { addMedical() {
this.addVisible = true this.addVisible = true
}, },
// 查看
viewMedical() {
this.readOnly = true
this.form = {
title: "123",
}
this.addVisible = true
},
// 编辑医联体 // 编辑医联体
editMedical(data) { editMedical(data) {
this.readOnly = false
console.log(data) console.log(data)
this.form = { this.form = {
medicalName: "黑乎乎", 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