Commit 36842732 authored by 刘予佳's avatar 刘予佳

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

parents 035686e0 3dfa2583
<template> <template>
<div> <div>
<el-form-item v-if="data.type == 'select'" label="占位内容"> <el-form-item v-if="data.type == 'select'" label="占位内容">
<el-input <el-input
v-model="data.placeholder" v-model="data.placeholder"
...@@ -235,6 +234,9 @@ ...@@ -235,6 +234,9 @@
<el-form-item label="是否必填"> <el-form-item label="是否必填">
<el-switch v-model="data.required"></el-switch> <el-switch v-model="data.required"></el-switch>
</el-form-item> </el-form-item>
<el-form-item label="必填提示文本">
<el-input v-model="data.pattern"></el-input>
</el-form-item>
</div> </div>
</template> </template>
...@@ -315,7 +317,16 @@ export default { ...@@ -315,7 +317,16 @@ export default {
this.generateRule() this.generateRule()
}, },
"data.pattern": function (val) {
if (val)
this.validator.required = {
required: true,
message: val,
}
else this.validator.required = null
this.generateRule()
},
}, },
} }
</script> </script>
...@@ -43,6 +43,14 @@ export function addPatient(data = {}, type = "") { ...@@ -43,6 +43,14 @@ export function addPatient(data = {}, type = "") {
}) })
} }
// 删除草稿
export function deletePatient(data) {
return request({
url: `/disease-data/data/patient/${data}`,
method: "delete",
})
}
/* 患者数据详情 */ /* 患者数据详情 */
export function getPatientDetail(params = {}) { export function getPatientDetail(params = {}) {
return request({ return request({
...@@ -137,10 +145,6 @@ export function getZsyzyPatientInfo(params = {}) { ...@@ -137,10 +145,6 @@ export function getZsyzyPatientInfo(params = {}) {
}) })
} }
// 急性胰腺炎-评分表 // 急性胰腺炎-评分表
// 评分表新增修改 // 评分表新增修改
......
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
:xl="item.span || 12" :xl="item.span || 12"
> >
<form-item-self <form-item-self
ref="formSelf"
:form="form" :form="form"
:column-index="columnIndex" :column-index="columnIndex"
:item="item" :item="item"
...@@ -180,6 +181,11 @@ export default { ...@@ -180,6 +181,11 @@ export default {
}, },
}, },
methods: { methods: {
clearAge() {
for (let i = 0; i < this.$refs.formSelf.length; i++) {
this.$refs.formSelf[i].age = ""
}
},
handleChange(key, val) { handleChange(key, val) {
if (this.form.hasOwnProperty(key)) this.form[key] = val if (this.form.hasOwnProperty(key)) this.form[key] = val
}, },
......
...@@ -53,8 +53,8 @@ export default { ...@@ -53,8 +53,8 @@ export default {
}, },
screeningAdvise: { screeningAdvise: {
1: "可定期随访", 1: "可定期随访",
2: "推荐胃镜精", 2: "推荐胶囊内镜或胃镜检",
3: "强烈推荐胃镜精", 3: "强烈推荐胶囊内镜或胃镜检",
}, },
} }
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
> >
<template v-if="options.column && options.column.length > 0"> <template v-if="options.column && options.column.length > 0">
<form-content <form-content
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="{ column: options.column }" :columns="{ column: options.column }"
:options="options" :options="options"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
:name="`${gIndex}`" :name="`${gIndex}`"
> >
<form-content <form-content
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="g" :columns="g"
:options="options" :options="options"
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</template> </template>
<form-content <form-content
v-if="collapseNames.includes(g.prop)" v-if="collapseNames.includes(g.prop)"
ref="form-content" ref="formContent"
:form="form" :form="form"
:columns="g" :columns="g"
:options="options" :options="options"
...@@ -202,6 +202,12 @@ export default { ...@@ -202,6 +202,12 @@ export default {
} }
}, },
methods: { methods: {
clearAge() {
// 去除年龄文本
for (let i = 0; i < this.$refs.formContent.length; i++) {
this.$refs.formContent[i].clearAge()
}
},
// 显示不符合筛查条件 // 显示不符合筛查条件
showError(data) { showError(data) {
if (data) { if (data) {
...@@ -263,6 +269,48 @@ export default { ...@@ -263,6 +269,48 @@ export default {
this.loading = false this.loading = false
}) })
}, },
// 临时保存
temporarySave() {
//? 只传数据 获取当前步数,如果个人信息已经提交可以临时保存
// this.$refs.form.validate((valid) => {
// if (valid) {
const data = {}
const form = this.deepClone(this.form)
Object.keys(form).forEach((k) => {
if (form[k] === undefined) {
data[k] = ""
return false
}
if (k === "YZZKJC") {
// 牙周表格
data[k] = JSON.stringify(form[k])
} else if (
Array.isArray(form[k]) &&
form[k][0] &&
isObject(form[k][0])
) {
// 子表单 去除前端添加的显隐辅助数据($_)和 删除按钮辅助数据(showDelBtn)
data[k] = form[k].map((item) => {
for (let key in item) {
if (["$_keyField", "$_hidden", "showDelBtn"].includes(key))
delete item[key]
}
return item
})
} else {
data[k] = form[k]
}
})
this.$emit("temporaryConfirm", data, () => {
// 完成之后的回调
this.loading = false
})
// } else {
// this.loading = false
// }
// })
},
handleConfirm() { handleConfirm() {
this.loading = true this.loading = true
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
...@@ -414,6 +462,7 @@ export default { ...@@ -414,6 +462,7 @@ export default {
} }
.form-footer { .form-footer {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px;
text-align: center; text-align: center;
} }
} }
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
:columns="g" :columns="g"
:options="options" :options="options"
:is-show-important="isShowImportant" :is-show-important="isShowImportant"
@showError="showError"
:showIndex="g.showIndex" :showIndex="g.showIndex"
:class="g.showIndex ? 'simple-form' : 'index-form'" :class="g.showIndex ? 'simple-form' : 'index-form'"
></form-content> ></form-content>
...@@ -175,16 +174,6 @@ export default { ...@@ -175,16 +174,6 @@ export default {
}, },
methods: { methods: {
// 显示不符合筛查条件
showError(data) {
if (data) {
this.disabled = true
this.errorText = "不符合筛查条件"
} else {
this.disabled = false
this.errorText = ""
}
},
nextTab() { nextTab() {
const tabsLen = this.options.group.length const tabsLen = this.options.group.length
let active = Number(this.activeName) let active = Number(this.activeName)
......
...@@ -569,12 +569,18 @@ export default { ...@@ -569,12 +569,18 @@ export default {
} }
.right { .right {
flex: 1; flex: 1;
.r_col_item:nth-child(4) {
img {
align-self: flex-start;
}
}
.r_col_item { .r_col_item {
min-height: 72px; min-height: 72px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
padding: 20px 0 20px 20px; padding: 20px 0 20px 20px;
img { img {
width: 26px; width: 26px;
height: 26px; height: 26px;
......
...@@ -213,19 +213,21 @@ html { ...@@ -213,19 +213,21 @@ html {
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.is-background{ .is-background {
button,.el-pager li{ button,
.el-pager li {
border-radius: 6px !important; border-radius: 6px !important;
} }
button,.el-pager li:not(.active){ button,
border: 1px solid #D9D9D9; .el-pager li:not(.active) {
border: 1px solid #d9d9d9;
background: transparent !important; background: transparent !important;
} }
.el-input__inner{ .el-input__inner {
border-radius: 6px !important; border-radius: 6px !important;
} }
} }
/* 分页结束 */ /* 分页结束 */
/* 菜单开始 */ /* 菜单开始 */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
width="40%" width="40%"
show-close show-close
@closed="cancelSubmit" @closed="cancelSubmit"
:close-on-click-modal="false"
:show-close="showClose"
> >
<slot name="content"></slot> <slot name="content"></slot>
<slot name="footer"></slot> <slot name="footer"></slot>
...@@ -17,6 +19,11 @@ export default { ...@@ -17,6 +19,11 @@ export default {
data() { data() {
return { dialogVisible: false, loading: false } return { dialogVisible: false, loading: false }
}, },
props: {
showClose: {
default: false,
},
},
watch: {}, watch: {},
mounted() {}, mounted() {},
methods: { methods: {
......
<template> <template>
<div class="dataCenter"> <div class="container" style="max-height: 89vh">
<div class="header">草稿箱</div> <div v-show="!isDetail">
<div class="content"> <div class="header">草稿箱</div>
<customs-table <div class="content">
ref="table" <customs-table
:table-data="tableData" ref="table"
:columns="columns" :table-data="tableData"
:header-class="'newHeader'" :columns="columns"
:list-loading="listLoading" :header-class="'newHeader'"
:current-page="pageIndex" :list-loading="listLoading"
:total-count="total" :current-page="pageIndex"
:page-sizes="pageSizes" :total-count="total"
:page-size="pageSize" :page-sizes="pageSizes"
@pageSizeChange="handleSizeChange" :page-size="pageSize"
@currentPageChange="handleCurrentChange" @pageSizeChange="handleSizeChange"
/> @currentPageChange="handleCurrentChange"
/>
</div>
</div>
<div v-if="isDetail">
<div>
<el-button icon="el-icon-back" @click="isDetail = false"
>返 回</el-button
>
</div>
<div class="form_content">
<ConfigForms
form-type="1"
:patient-id="patientId"
:disabled="disabled"
></ConfigForms>
</div>
</div> </div>
</div> </div>
</template> </template>
<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 ConfigForms from "./components/ConfigForms.vue"
import { mapGetters } from "vuex"
import { getPatientPage, deletePatient } from "@/api/patient.js"
export default { export default {
// 数据概览 // 数据概览
name: "", name: "",
components: { components: {
CustomsTable, CustomsTable,
ConfigForms,
}, },
mixins: [paginationMixin], mixins: [paginationMixin],
data() { data() {
return { return {
isDetail: false, //! 控制详情显隐
listLoading: false, listLoading: false,
selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
headList: ["社区筛查", "医院筛查", "体检筛查"],
columns: [ columns: [
{ {
label: "医联体", label: "医联体",
...@@ -90,7 +109,7 @@ export default { ...@@ -90,7 +109,7 @@ export default {
operType: "button", operType: "button",
operations: [ operations: [
{ {
func: this.rowOpration, func: this.handleAdd,
formatter(row) { formatter(row) {
return { return {
label: "编辑", label: "编辑",
...@@ -99,7 +118,7 @@ export default { ...@@ -99,7 +118,7 @@ export default {
}, },
}, },
{ {
func: this.rowOpration, func: this.deletePatient,
formatter(row) { formatter(row) {
return { return {
label: "删除", label: "删除",
...@@ -124,17 +143,77 @@ export default { ...@@ -124,17 +143,77 @@ export default {
watch: {}, watch: {},
mounted() {}, mounted() {},
methods: { methods: {
handleAdd({ patientId, name }, index, disabled = false) {
this.disabled = disabled
this.patientId = patientId || null
this.name = name
this.isDetail = true
},
setSelectedIndex(i) { setSelectedIndex(i) {
console.log(this.selectedIndex) console.log(this.selectedIndex)
this.selectedIndex = i this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex) sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
}, },
// 查询
handleFormSearch(form) {
this.searchForm = form
this.pageIndex = 1
this.handleSearch(form)
},
handleSearch() {
this.listLoading = true
const data = {}
data.current = this.pageIndex
data.size = this.pageSize
data.isDraft = 1
data.patientFrom = this.selectedIndex
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
})
},
deletePatient(row) {
this.$confirm(`是否删除【${row.name}】?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deletePatient(row.patientId).then((res) => {
if (res.code === 1) {
this.$message({
type: "success",
message: "删除成功!",
})
this.handleSearch()
}
})
})
.catch(() => {})
},
},
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
}),
},
created() {
this.handleFormSearch()
},
watch: {
selectedIndex(v) {
this.handleFormSearch()
},
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dataCenter { .container {
padding: 24px 0; padding: 24px;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -152,5 +231,8 @@ export default { ...@@ -152,5 +231,8 @@ export default {
.content { .content {
padding: 0 24px; padding: 0 24px;
} }
.form_content {
height: calc(100% - 50px);
}
} }
</style> </style>
<template> <template>
<div <div
id="publicContent" id="publicContent"
:class="activeName == 'index0' && formClass ? formClass : ''" :class="[
activeName == 'index0' && formClass ? formClass : '',
$route.path === '/screening/draft' ? 'p_padding' : '',
]"
> >
<div v-if="formTabs && formTabs.length > 0"> <div v-if="formTabs && formTabs.length > 0" style="position: relative">
<el-button <el-button
v-if="!disabled" v-if="!disabled"
class="draftButton" class="draftButton"
:loading="loading" :loading="loading"
:disabled="!infoCompelete"
@click="onSubmit(formType)" @click="onSubmit(formType)"
>{{ formType == 1 ? "临时保存" : "返回" }}</el-button >{{ formType == 1 ? "临时保存" : "返回" }}</el-button
> >
...@@ -24,7 +28,9 @@ ...@@ -24,7 +28,9 @@
:key="form.id" :key="form.id"
:label="form.label" :label="form.label"
:name="'index' + index" :name="'index' + index"
disabled
> >
<!-- disabled -->
<transition mode="out-in" name="fade-transform"> <transition mode="out-in" name="fade-transform">
<div v-show="activeName === 'index' + index"> <div v-show="activeName === 'index' + index">
<template v-if="form.formId"> <template v-if="form.formId">
...@@ -41,6 +47,7 @@ ...@@ -41,6 +47,7 @@
@setFormJson="setFormJson" @setFormJson="setFormJson"
@handleConfirm="handleConfirm" @handleConfirm="handleConfirm"
@onPrev="onPrev" @onPrev="onPrev"
@temporaryConfirm="temporaryConfirm"
></form-tab> ></form-tab>
</template> </template>
</div> </div>
...@@ -51,8 +58,7 @@ ...@@ -51,8 +58,7 @@
<el-empty v-else description="暂无数据"></el-empty> <el-empty v-else description="暂无数据"></el-empty>
<public-dialog <public-dialog
ref="showDialog" ref="showDialog"
@onSubmit="dialogSubmit" :showClose="dialogType == 'draft' ? true : false"
@onCancel="dialogCancel"
> >
<!-- 保存草稿 --> <!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content"> <template v-if="dialogType == 'draft'" slot="content">
...@@ -83,7 +89,7 @@ ...@@ -83,7 +89,7 @@
type="primary" type="primary"
:loading="loading" :loading="loading"
class="textBtn" class="textBtn"
@click="view" @click="viewJump"
>查看</el-button >查看</el-button
> >
<el-button type="primary" :loading="loading" @click="continueSubmit" <el-button type="primary" :loading="loading" @click="continueSubmit"
...@@ -117,6 +123,7 @@ export default { ...@@ -117,6 +123,7 @@ export default {
// survivalFlag:false // survivalFlag:false
dialogType: "", dialogType: "",
loading: false, loading: false,
infoCompelete: false,
formInitial: {}, // 第四步的数据 formInitial: {}, // 第四步的数据
} }
}, },
...@@ -138,17 +145,47 @@ export default { ...@@ -138,17 +145,47 @@ export default {
}, },
watch: { watch: {
activeName(val) { activeName(val) {
console.log(this.formId) if (!this.disabled) {
if (!["index0", "index1"].includes(val)) {
this.infoCompelete = true
} else {
this.infoCompelete = false
}
}
if (val == "index1") {
// 第二步问卷调查
this.$nextTick(() => {
let { birthday } = JSON.parse(sessionStorage.getItem("index1Data"))
let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date()
let age =
d.getFullYear() -
date.getFullYear() -
(d.getMonth() < date.getMonth() ||
(d.getMonth() == date.getMonth() && d.getDate() < date.getDate())
? 1
: 0)
//!
this.formInitial = {
birthday,
age,
}
})
} else {
this.formInitial = false
}
if (val == "index3") { if (val == "index3") {
// 第四步风险评估 // 第四步风险评估
this.$nextTick(() => { this.$nextTick(() => {
getPatientDetail({ getPatientDetail({
formId: this.formId, // 每个大表单的id formId: this.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId, patientId: this.patientId || this.patientStandbyId,
formRecordId: this.newformRecordId, // formRecordId: this.newformRecordId,
}) })
.then((res) => { .then((res) => {
console.log(res) const data = res.data.data
this.formInitial = data
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
...@@ -163,27 +200,6 @@ export default { ...@@ -163,27 +200,6 @@ export default {
// } // }
}) })
}) })
} else if (val == "index1") {
// 第二步问卷调查
this.$nextTick(() => {
let { birthday } = JSON.parse(sessionStorage.getItem("index1Data"))
let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date()
let age =
d.getFullYear() -
date.getFullYear() -
(d.getMonth() < date.getMonth() ||
(d.getMonth() == date.getMonth() && d.getDate() < date.getDate())
? 1
: 0)
//!
this.formInitial = {
birthday,
age,
}
})
} else {
this.formInitial = false
} }
}, },
}, },
...@@ -200,25 +216,53 @@ export default { ...@@ -200,25 +216,53 @@ export default {
form: data.data, form: data.data,
}) })
}, },
temporaryConfirm(data, done, cb) {
this.addPatient(data, done, cb, () => {
console.log("倒了")
this.$refs.showDialog.dialogVisible = true
this.loading = false
})
},
onPrev(done) { onPrev(done) {
this.prevTab(done) this.prevTab(done)
}, },
onSubmit(type) { onSubmit(type) {
this.loading = true // this.loading = true
if (type == 1) { if (type == 1) {
// 临时保存草稿 // 临时保存草稿
this.dialogType = "draft" this.dialogType = "draft"
// 保存逻辑处理
// !获取当前tab的formTab
let formTab = this.$refs.formTabs.filter(
(e) => e.form.formId == this.formId
)[0]
formTab.temporarySave()
// console.log(formTab)
} else if (type == 2) {
//提交
this.dialogType = "submit"
this.$refs.showDialog.dialogVisible = true this.$refs.showDialog.dialogVisible = true
this.loading = false this.loading = false
} else { } else {
// 返回 // 返回
this.$router.back() this.$router.back()
} }
}, },
dialogSubmit() {}, continueSubmit() {
dialogCancel() {}, sessionStorage.removeItem("index1Data")
continueSubmit() {}, this.activeName = "index0"
// 清空表单
for (let i = 0; i < this.$refs.formTabs.length; i++) {
this.$refs.formTabs[i].resetForm()
this.$refs.formTabs[i].initForm()
}
// 清空红字:不符合筛查条件
this.$refs.showDialog.dialogVisible = false
},
viewJump() {
// this.$router.push('/')
alert("跳转")
},
}, },
provide() { provide() {
return { return {
...@@ -230,11 +274,11 @@ export default { ...@@ -230,11 +274,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
#publicContent { #publicContent {
padding: 32px 24px;
position: relative; position: relative;
padding: 32px 24px 32px;
.draftButton { .draftButton {
position: absolute; position: absolute;
top: 46px; top: 0px;
right: 40px; right: 40px;
z-index: 999; z-index: 999;
border-radius: 4px; border-radius: 4px;
...@@ -248,6 +292,9 @@ export default { ...@@ -248,6 +292,9 @@ export default {
} }
} }
} }
#publicContent.p_padding {
padding: 10px 24px 32px;
}
::v-deep .el-dialog__body { ::v-deep .el-dialog__body {
.title { .title {
font-size: 22px; font-size: 22px;
...@@ -273,6 +320,16 @@ export default { ...@@ -273,6 +320,16 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
::v-deep { ::v-deep {
.el-button.is-disabled {
color: #c0c4cc !important;
cursor: not-allowed;
background-image: none;
background-color: #fff;
border-color: #ebeef5 !important;
}
.el-tabs__item.is-disabled {
color: #252c49;
}
.el-tabs--card > .el-tabs__header { .el-tabs--card > .el-tabs__header {
width: calc(100% - 100px); width: calc(100% - 100px);
border-bottom: none; border-bottom: none;
......
...@@ -42,7 +42,11 @@ ...@@ -42,7 +42,11 @@
</el-switch>--> </el-switch>-->
</div> </div>
</el-row> </el-row>
<div ref="my-form" class="my-form" :class="externalScroll ? 'no-scroll' : ''"> <div
ref="my-form"
class="my-form"
:class="externalScroll ? 'no-scroll' : ''"
>
<!-- <read-form <!-- <read-form
ref="form" ref="form"
:options="survivalForm" :options="survivalForm"
...@@ -55,6 +59,7 @@ ...@@ -55,6 +59,7 @@
@scrollTop="scrollTop" @scrollTop="scrollTop"
@handleConfirm="handleConfirm" @handleConfirm="handleConfirm"
@onPrev="onPrev" @onPrev="onPrev"
@temporaryConfirm="temporaryConfirm"
></custom-form> ></custom-form>
</div> </div>
</template> </template>
...@@ -146,6 +151,12 @@ export default { ...@@ -146,6 +151,12 @@ export default {
}, },
}, },
methods: { methods: {
resetForm() {
this.$refs.form.resetForm(false)
this.$refs.form.showError(false)
// 清理年龄的回显
this.$refs.form.clearAge()
},
initData() { initData() {
this.formData.formRecordId = null this.formData.formRecordId = null
this.formCacheList = [] this.formCacheList = []
...@@ -157,6 +168,62 @@ export default { ...@@ -157,6 +168,62 @@ export default {
this.getRecordList() this.getRecordList()
} }
}, },
// 临时保存
temporarySave() {
this.$refs.form.temporarySave()
},
// 临时保存确定
temporaryConfirm(data, done) {
this.$emit(
"temporaryConfirm",
{
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
)
},
handleConfirm(data, done) {
this.$emit(
"handleConfirm",
{
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 0, //是否为草稿
check_status: 1, // 审核状态
},
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
)
},
onPrev(done) {
this.$emit("onPrev", done)
},
scrollTop() { scrollTop() {
this.$refs["my-form"].scrollTop = 0 this.$refs["my-form"].scrollTop = 0
}, },
...@@ -223,34 +290,6 @@ export default { ...@@ -223,34 +290,6 @@ export default {
}) })
}, },
handleConfirm(data, done) {
this.$emit(
"handleConfirm",
{
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patientFrom: this.$store.getters["table/selectedIndex"],
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
)
},
onPrev(done) {
this.$emit("onPrev", done)
},
getPatientDetail() { getPatientDetail() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetForm() this.$refs.form && this.$refs.form.resetForm()
...@@ -382,18 +421,19 @@ export default { ...@@ -382,18 +421,19 @@ export default {
z-index: 9; z-index: 9;
} }
.header { .header {
height: 20px; height: 5px;
// box-shadow: 0 1px 4px rgb(0 21 41 / 8%); box-shadow: 0 5px 4px rgb(0 21 41 / 8%);
padding-right: 20px; padding-right: 20px;
position: relative; position: relative;
font-size: 15px; font-size: 15px;
z-index: 999;
} }
} }
.el-aside { .el-aside {
padding-left: 10px; padding-left: 10px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
.side-content { .side-content {
// height: calc(100vh - #{"272px"}); height: calc(100vh - #{"272px"});
// overflow: auto; // overflow: auto;
} }
} }
......
...@@ -27,7 +27,8 @@ export default { ...@@ -27,7 +27,8 @@ export default {
nextTab() { nextTab() {
let i = this.activeName.split("index")[1] - 0 let i = this.activeName.split("index")[1] - 0
i++ i++
if (i == 5) { if (i == 6) {
this.onSubmit(2)
return return
} else { } else {
this.activeName = "index" + i this.activeName = "index" + i
...@@ -55,8 +56,8 @@ export default { ...@@ -55,8 +56,8 @@ export default {
...this.formTabsList.find((_) => _.id === id), ...this.formTabsList.find((_) => _.id === id),
}) })
}, },
async addPatient(data, done, cb, type) { async addPatient(data, done, cb, ConfigFormsCallback) {
addPatient(data, type) addPatient(data, "")
.then((res) => { .then((res) => {
// this.$message.success("操作成功") // this.$message.success("操作成功")
if (res.data) { if (res.data) {
...@@ -73,7 +74,16 @@ export default { ...@@ -73,7 +74,16 @@ export default {
}) })
.finally((e) => { .finally((e) => {
done() done()
this.nextTab() console.log("走了", ConfigFormsCallback)
if (
ConfigFormsCallback &&
Object.prototype.toString.call(ConfigFormsCallback) ===
"[object Function]"
) {
ConfigFormsCallback()
} else {
this.nextTab()
}
}) })
}, },
......
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