Commit 06e97ac3 authored by miaojiale's avatar miaojiale

1.风险评估数据回显

2.增加校验文本提示规则
parent b080ebee
<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>
...@@ -53,8 +53,8 @@ export default { ...@@ -53,8 +53,8 @@ export default {
}, },
screeningAdvise: { screeningAdvise: {
1: "可定期随访", 1: "可定期随访",
2: "推荐胃镜精", 2: "推荐胶囊内镜或胃镜检",
3: "强烈推荐胃镜精", 3: "强烈推荐胶囊内镜或胃镜检",
}, },
} }
}, },
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
<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 { mapGetters } from "vuex"
import { getPatientPage } from "@/api/patient.js"
export default { export default {
// 数据概览 // 数据概览
name: "", name: "",
...@@ -31,8 +33,6 @@ export default { ...@@ -31,8 +33,6 @@ export default {
data() { data() {
return { return {
listLoading: false, listLoading: false,
selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
headList: ["社区筛查", "医院筛查", "体检筛查"],
columns: [ columns: [
{ {
label: "医联体", label: "医联体",
...@@ -129,6 +129,41 @@ export default { ...@@ -129,6 +129,41 @@ export default {
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)
}
})
},
},
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
}),
},
created() {
this.handleFormSearch()
},
watch: {
selectedIndex(v) {
this.handleFormSearch()
},
}, },
} }
</script> </script>
......
...@@ -145,10 +145,11 @@ export default { ...@@ -145,10 +145,11 @@ export default {
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
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ 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) {
return return
} else { } else {
this.activeName = "index" + i this.activeName = "index" + i
......
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