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

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

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