Commit 1d2cb4fe authored by 刘予佳's avatar 刘予佳

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

parents a65fd2a1 040a8a9c
......@@ -43,7 +43,7 @@
:disabled="item.disabled"
></el-upload-self>
<!-- 表单改文本 -->
<template v-else-if="vwForm.detail">
<template v-else-if="getVwForm.detail">
<form-item-text :item="item" :form="form"></form-item-text>
</template>
<!-- 可输入 -->
......@@ -357,7 +357,7 @@
</template>
</div>
<span
v-if="item.importantField && !vwForm.detail"
v-if="item.importantField && !getVwForm.detail"
class="important_field"
>{{ item.importantFieldDesc || "*" }}</span
>
......@@ -392,9 +392,7 @@ export default {
showIndex: {
default: false,
},
vwForm: {
default: {},
},
vwForm: {},
formId: {},
getPatientId: {
type: Function,
......@@ -432,10 +430,13 @@ export default {
}
},
computed: {
getVwForm() {
return this.vwForm()
},
//重要字段空数据且填写表单时添加重点
isEmpty() {
const { importantField, prop } = this.item
if (!importantField || this.vwForm.detail) return ""
if (!importantField || this.getVwForm.detail) return ""
const value = this.form[prop] // []
let empty = !value
......@@ -638,6 +639,7 @@ export default {
const values = dyMap[key]
let display = false
if (Array.isArray(val)) {
// 胃癌和进展性胃癌单独控制
if (
prop == "early_gastric_cancer" ||
prop == "period_gastric_cancer"
......
......@@ -144,15 +144,17 @@ export default {
},
},
provide() {
const vwForm = {}
for (const k in this.options) {
if (k !== "column" && k !== "group") {
vwForm[k] = this.options[k]
}
}
return {
vwForm,
vwForm: () => {
const vwForm = {}
for (const k in this.options) {
if (k !== "column" && k !== "group") {
vwForm[k] = this.options[k]
}
}
return vwForm
},
formId: "",
}
},
data() {
......@@ -355,9 +357,9 @@ export default {
// 绑定部分值(此时表单已渲染)
initfields(obj) {
for (let k in obj) {
if (this.form.hasOwnProperty(k)) {
this.form[k] = obj[k]
}
// if (this.form.hasOwnProperty(k)) {
this.form[k] = obj[k]
// }
}
},
},
......
......@@ -8,7 +8,7 @@
<custom-form
ref="customForm"
:options="jsonList[1]"
:formEdit="form"
:form-edit="form"
></custom-form>
<!-- <custom-form ref="form" :options="jsonList[1]"></custom-form>
<custom-form ref="form" :options="jsonList[2]"></custom-form>
......@@ -17,14 +17,13 @@
</div>
</template>
</el-main>
<!-- <el-aside
<el-aside
:width="sideWidth"
class="transition-box"
:class="{ hidden: !asideShow }"
v-if="contrast"
>
<div class="side-content"></div>
</el-aside> -->
</el-aside>
</el-container>
</div>
</template>
......@@ -44,7 +43,9 @@ export default {
form: {
name: "123",
phone: "18712412341",
min_age: "18",
},
asideShow: true,
}
},
computed: {
......@@ -66,7 +67,6 @@ export default {
this.getCurrentFormByType()
},
mounted() {},
methods: {
getCurrentFormByType(type = 1) {
this.fromLoading = true
......
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