Commit 5cc0018a authored by miaojiale's avatar miaojiale

增加病理诊断独显

parent cfb85b08
......@@ -95,17 +95,12 @@
slot="append"
class="toothBit"
@click="openToothBit"
>{{ item.append || "牙位" }}</el-button>
<template
v-else-if="item.append"
slot="append"
>{{ item.append || "牙位" }}</el-button
>
<template v-else-if="item.append" slot="append">
{{ item.append }}
</template>
<template
v-if="item.prepend"
slot="prepend"
>
<template v-if="item.prepend" slot="prepend">
{{ item.prepend }}
</template>
</el-input>
......@@ -130,16 +125,10 @@
"
@blur="handleBlur"
>
<template
v-if="item.append"
slot="append"
>
<template v-if="item.append" slot="append">
{{ item.append }}
</template>
<template
v-if="item.prepend"
slot="prepend"
>
<template v-if="item.prepend" slot="prepend">
{{ item.prepend }}
</template>
</el-input>
......@@ -168,10 +157,7 @@
</template>
<!-- 计数器 -->
<div
v-if="item.type === 'number'"
style="display: inline-table"
>
<div v-if="item.type === 'number'" style="display: inline-table">
<el-input-number
v-model="form[item.prop]"
:readonly="item.readonly"
......@@ -190,7 +176,8 @@
v-if="item.append"
class="el-input-group__append"
style="line-height: 28px"
>{{ item.append }}</span>
>{{ item.append }}</span
>
</div>
<!-- 单选框 -->
......@@ -204,7 +191,8 @@
v-for="(opt, optIndex) in item.dicData"
:key="optIndex"
:label="opt.value"
>{{ opt.label }}</el-radio>
>{{ opt.label }}</el-radio
>
</el-radio-group>
<!-- 单选框只读 -->
<!-- <div
......@@ -233,7 +221,8 @@
v-for="(opt, optIndex) in item.dicData"
:key="optIndex"
:label="opt.value"
>{{ opt.label }}</el-checkbox>
>{{ opt.label }}</el-checkbox
>
</el-checkbox-group>
</template>
......@@ -344,7 +333,8 @@
$route.path != '/followupresearch'
"
style="margin-left: 12px"
>{{ form['age'] + (form['age'] ? "岁" : "") }}</span>
>{{ age + (age ? "岁" : "") }}</span
>
</div>
<!-- 年 -->
<el-date-picker
......@@ -443,7 +433,8 @@
<span
v-if="item.importantField && !getVwForm.detail"
class="important_field"
>{{ item.importantFieldDesc || "*" }}</span>
>{{ item.importantFieldDesc || "*" }}</span
>
</div>
</el-form-item>
</el-col>
......@@ -482,15 +473,15 @@ export default {
},
getPatientId: {
type: Function,
default: () => { },
default: () => {},
},
getDefectsSet: {
type: Function,
default: () => { },
default: () => {},
},
configForms: {
type: Function,
default: () => { },
default: () => {},
},
},
props: {
......@@ -509,7 +500,7 @@ export default {
columnIndex: Number,
group: Array,
},
data () {
data() {
return {
// age: "",
pickerOptions,
......@@ -522,11 +513,11 @@ export default {
...mapGetters({
age: ["table/age"],
}),
getVwForm () {
getVwForm() {
return this.vwForm()
},
//重要字段空数据且填写表单时添加重点
isEmpty () {
isEmpty() {
const { importantField, prop } = this.item
if (!importantField || this.getVwForm.detail) return ""
......@@ -538,14 +529,14 @@ export default {
}
return empty ? "empty-tip" : ""
},
defectsSet () {
defectsSet() {
return this.getDefectsSet ? this.getDefectsSet() : []
},
patientId () {
patientId() {
return this.getPatientId ? this.getPatientId() : ""
},
},
created () {
created() {
this.timerangeReset()
this.numberReset()
this.checkboxReset()
......@@ -556,7 +547,6 @@ export default {
// this.getMedicalunionList()
if (
this.$route.path == "/screening/add" ||
this.$route.path == "/screening/draft" ||
this.$route.path == "/screening/index"
) {
this.getMedicalunionList()
......@@ -572,19 +562,19 @@ export default {
}
}
},
mounted () {
mounted() {
this.showFormItem()
console.log(this.activeName)
// console.log(this.activeName)
},
beforeDestroy () {
beforeDestroy() {
this.$watch(
() => this.form[this.item.prop],
(newVal, oldVal) => { }
(newVal, oldVal) => {}
)
},
methods: {
// 获取医联体列表
getMedicalunionList () {
getMedicalunionList() {
getMedicalunionList().then((res) => {
if (res.code == 1) {
this.unionList = [...res.data]
......@@ -593,17 +583,17 @@ export default {
}
})
},
scrollToView () {
scrollToView() {
if (this.$refs["JY_LCYY"]) {
this.$refs["JY_LCYY"].$el.scrollIntoView({ behavior: "smooth" })
}
},
openToothBit () {
openToothBit() {
this.$refs.dialog.open()
},
// 处理timerange 重置后不能选择的问题
timerangeReset () {
timerangeReset() {
if (this.item.type === "timerange") {
this.$watch(`form.${this.item.prop}`, (val) => {
if (val && val.length === 1) {
......@@ -613,7 +603,7 @@ export default {
}
},
// 处理number 默认为0的问题
numberReset () {
numberReset() {
if (this.item.type === "number") {
this.$watch(
`form.${this.item.prop}`,
......@@ -628,7 +618,7 @@ export default {
},
// 处理数组 默认值的问题
checkboxReset () {
checkboxReset() {
const { type, multiple, value } = this.item
if (
type === "checkbox" ||
......@@ -651,7 +641,7 @@ export default {
},
// 处理复选框排斥
checkboxRepel (val) {
checkboxRepel(val) {
const { repelValue, repel } = this.item
if (repel && repelValue) {
const len = val.length
......@@ -668,7 +658,7 @@ export default {
}
},
// 处理运算规则
handleAlgorithm () {
handleAlgorithm() {
const { algorithm } = this.item
if (algorithm) {
const algorithmArr = algorithm.split(";") //多个规则数组集合
......@@ -685,13 +675,13 @@ export default {
if (process.includes("stop")) return
try {
this.$set(this.form, target, eval(process))
} catch { }
} catch {}
}
})
}
},
// 自定义方法规则
handleSelfProcess (algorithmValue) {
handleSelfProcess(algorithmValue) {
const type = algorithmValue[0]
const ruleTarget = algorithmValue[1]
const ruleArgs = algorithmValue[2]
......@@ -729,7 +719,7 @@ export default {
val && this.$set(this.form, ruleTarget, val)
},
// 根据生日设置年龄回显
getAge () {
getAge() {
if (this.form.birthday && this.form.survey_time) {
var birthday = new Date(this.form.birthday.replace(/-/g, "/"))
let d = new Date(this.form.survey_time.replace(/-/g, "/"))
......@@ -737,37 +727,36 @@ export default {
d.getFullYear() -
birthday.getFullYear() -
(d.getMonth() < birthday.getMonth() ||
(d.getMonth() == birthday.getMonth() &&
d.getDate() < birthday.getDate())
(d.getMonth() == birthday.getMonth() &&
d.getDate() < birthday.getDate())
? 1
: 0)
this.$store.commit("table/setAge", age)
this.form.age = this.age
console.log('年龄有问题', this.form);
console.log(this.form.age, "---", age)
// console.log(this.form.age, "---", age)
} else {
let age = ""
this.$store.commit("table/setAge", age)
this.form.age = this.age
console.log(this.form.age, "---", age)
// console.log(this.form.age, "---", age)
}
},
// 获取prop prop 以{}包裹
getProp (value) {
getProp(value) {
if (!value) return ""
return value.replace(/[{][\w]*[}]/g, (word) => {
return word.replace(/{|}/g, "")
})
},
// 获取运算过程
getProcess (value) {
getProcess(value) {
return value.replace(/[{][\w]*[}]/g, (word) => {
const actualValue = this.form[word.replace(/{|}/g, "")]
return actualValue ? actualValue : "stop"
})
},
// 表单子项控制显隐
showFormItem () {
showFormItem() {
const { dynamicshSet, prop, noImmediate } = this.item
if (dynamicshSet && dynamicshSet.length > 0) {
this.$watch(
......@@ -871,8 +860,8 @@ export default {
const newVal = Array.isArray(this.form[targetItem.prop])
? []
: targetItem.type === "number"
? undefined
: ""
? undefined
: ""
this.$set(this.form, targetItem.prop, newVal)
}
if (this.type === "form") {
......@@ -916,7 +905,7 @@ export default {
// !设置大表单里的每个小表单rules
if (targetItem.prop == "1669874397313_56690") {
console.log(display)
// console.log(display)
// !只能写死,当前情况下,定义一个字段用来缓存是否回显,根据val
// if (val == 0) {
// this.showChildren = false
......@@ -962,7 +951,15 @@ export default {
}
})
}
this.$set(targetItem, "display", Boolean(display))
if (
prop == "early_gastric_cancer" ||
prop == "period_gastric_cancer" ||
prop == "inogm_level"
) {
this.$set(targetItem, "display", true)
} else {
this.$set(targetItem, "display", Boolean(display))
}
}
})
},
......@@ -973,11 +970,11 @@ export default {
}
},
//
handleBlur () {
handleBlur() {
this.handleAlgorithm()
},
// 每个表单值改变的方法
handleChange (val) {
handleChange(val) {
this.checkboxRepel(val)
this.handleAlgorithm()
// !设置年龄
......@@ -998,7 +995,7 @@ export default {
this.$emit("formChange")
// ['is_one_year','is_subtotal_history','is_ppi','is_symptom','is_subtotal_history','is_disease','is_tumour']
},
validUpload (prop) {
validUpload(prop) {
this.$emit("validUpload", prop)
},
},
......
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