Commit 06e97ac3 authored by miaojiale's avatar miaojiale

1.风险评估数据回显

2.增加校验文本提示规则
parent b080ebee
<template>
<div>
<el-form-item v-if="data.type == 'select'" label="占位内容">
<el-input
v-model="data.placeholder"
......@@ -235,6 +234,9 @@
<el-form-item label="是否必填">
<el-switch v-model="data.required"></el-switch>
</el-form-item>
<el-form-item label="必填提示文本">
<el-input v-model="data.pattern"></el-input>
</el-form-item>
</div>
</template>
......@@ -315,7 +317,16 @@ export default {
this.generateRule()
},
"data.pattern": function (val) {
if (val)
this.validator.required = {
required: true,
message: val,
}
else this.validator.required = null
this.generateRule()
},
},
}
</script>
......@@ -53,8 +53,8 @@ export default {
},
screeningAdvise: {
1: "可定期随访",
2: "推荐胃镜精",
3: "强烈推荐胃镜精",
2: "推荐胶囊内镜或胃镜检",
3: "强烈推荐胶囊内镜或胃镜检",
},
}
},
......
......@@ -21,6 +21,8 @@
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import { mapGetters } from "vuex"
import { getPatientPage } from "@/api/patient.js"
export default {
// 数据概览
name: "",
......@@ -31,8 +33,6 @@ export default {
data() {
return {
listLoading: false,
selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
headList: ["社区筛查", "医院筛查", "体检筛查"],
columns: [
{
label: "医联体",
......@@ -129,6 +129,41 @@ export default {
this.selectedIndex = i
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>
......
......@@ -145,10 +145,11 @@ export default {
getPatientDetail({
formId: this.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
formRecordId: this.newformRecordId,
// formRecordId: this.newformRecordId,
})
.then((res) => {
console.log(res)
const data = res.data.data
this.formInitial = data
})
.finally(() => {
this.loading = false
......
......@@ -27,7 +27,7 @@ export default {
nextTab() {
let i = this.activeName.split("index")[1] - 0
i++
if (i == 5) {
if (i == 6) {
return
} else {
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