Commit 24bb0b28 authored by 刘予佳's avatar 刘予佳

表单配置序号显示控制 部分只读改造

parent 0a0d70aa
<template>
<el-row :gutter="options.gutter" class="form-content">
<template
v-for="(item, columnIndex) in columns.column || columns.children.column"
>
<template v-for="(item, columnIndex) in columns.column || columns.children.column">
<div
v-if="item.type === 'dynamic'"
v-show="item.display"
......@@ -10,12 +8,7 @@
style="width: 100%"
class="dynamic-form-container"
>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
>
</el-form-item>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<div class="dynamic-form-container_lable">{{ item.label }}</div>
<form-dynamic
v-model="form[item.prop]"
......@@ -32,11 +25,7 @@
style="width: 100%"
>
<el-collapse :value="item.collapse ? item.prop : ''">
<el-collapse-item
:title="item.label"
:name="item.prop"
:disabled="!item.arrow"
>
<el-collapse-item :title="item.label" :name="item.prop" :disabled="!item.arrow">
<form-content
ref="form-content"
:form="form"
......@@ -54,12 +43,7 @@
:key="columnIndex"
style="width: 100%"
>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
>
</el-form-item>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<dental-tab-form
ref="dental"
v-model="form[item.prop]"
......@@ -75,12 +59,7 @@
:key="columnIndex"
style="width: 100%"
>
<el-form-item
:prop="item.prop"
:label-width="'0px'"
style="display: none"
>
</el-form-item>
<el-form-item :prop="item.prop" :label-width="'0px'" style="display: none"></el-form-item>
<dental-tab-tj-form
ref="dental"
v-model="form[item.prop]"
......@@ -212,6 +191,11 @@ export default {
}
},
},
watch: {
showIndex(val){
console.log("组件内部",val)
}
},
}
</script>
......
......@@ -6,9 +6,7 @@
:class="{ isDefects: defectsSet.includes(item.prop) }"
>
<el-col :lg="item.width">
<div v-if="showIndex" class="formIndex">
{{ columnIndex + 1 }}
</div>
<div v-if="showIndex || configForms.showIndex" class="formIndex">{{ columnIndex + 1 }}</div>
<el-form-item
:label="
!hiddenLabel && item.label
......@@ -29,10 +27,15 @@
:upload-query="{ formId, patientId, prefix: item.prop }"
:disabled="item.disabled"
></el-upload-self>
<!-- 只显示 -->
<!-- <template>
</template>-->
<!-- 表单改文本 -->
<template v-else-if="vwForm.detail">
<form-item-text :item="item" :form="form"></form-item-text>
</template>
<!-- 可输入 -->
<template v-else>
<!-- 输入框 -->
<el-input
......@@ -61,14 +64,17 @@
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>
<template v-if="item.prepend" slot="prepend">
{{
item.prepend
}}</template>
}}
</template>
</el-input>
<!-- 密码框 -->
......@@ -91,12 +97,16 @@
"
@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>
<template v-if="item.prepend" slot="prepend">
{{
item.prepend
}}</template>
}}
</template>
</el-input>
<!-- 文本域 -->
......@@ -137,14 +147,12 @@
:max="item.maxRows"
style="display: table-cell"
@blur="handleBlur"
>
</el-input-number>
></el-input-number>
<span
v-if="item.append"
class="el-input-group__append"
style="line-height: 28px"
>{{ item.append }}</span
>
>{{ item.append }}</span>
</div>
<!-- 单选框 -->
......@@ -158,8 +166,7 @@
v-for="(opt, optIndex) in item.dicData"
:key="optIndex"
:label="opt.value"
>{{ opt.label }}
</el-radio>
>{{ opt.label }}</el-radio>
</el-radio-group>
<!-- 多选框 -->
......@@ -173,8 +180,7 @@
v-for="(opt, optIndex) in item.dicData"
:key="optIndex"
:label="opt.value"
>{{ opt.label }}
</el-checkbox>
>{{ opt.label }}</el-checkbox>
</el-checkbox-group>
</template>
......@@ -200,8 +206,7 @@
:key="optIndex"
:label="opt.label"
:value="opt.value"
>
</el-option>
></el-option>
</el-select>
</template>
<!-- 级联 -->
......@@ -230,8 +235,7 @@
style="width: 100%"
clearable
@change="handleChange"
>
</el-time-picker>
></el-time-picker>
<!-- 时间范围 -->
<el-time-picker
v-else-if="item.type === 'timerange'"
......@@ -246,8 +250,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-time-picker>
></el-time-picker>
<!-- 日期 -->
<el-date-picker
v-else-if="item.type === 'date'"
......@@ -258,8 +261,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 年 -->
<el-date-picker
v-else-if="item.type === 'year'"
......@@ -271,8 +273,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 月 -->
<el-date-picker
......@@ -285,8 +286,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 周 -->
<el-date-picker
......@@ -299,8 +299,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 日期范围 -->
<el-date-picker
......@@ -316,8 +315,7 @@
:disabled="item.disabled"
clearable
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 日期时间 -->
<el-date-picker
......@@ -331,8 +329,7 @@
:value-format="item.valueFormat"
:format="item.format"
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 日期时间范围 -->
<el-date-picker
......@@ -349,15 +346,16 @@
:format="item.format"
align="right"
@change="handleChange"
>
</el-date-picker>
></el-date-picker>
<!-- 文本显示 -->
<span>{{form[item.prop]}}</span>
</template>
</div>
<span
v-if="item.importantField && !vwForm.detail"
class="important_field"
>{{ item.importantFieldDesc || "*" }}</span
>
>{{ item.importantFieldDesc || "*" }}</span>
</div>
</el-form-item>
</el-col>
......@@ -401,6 +399,10 @@ export default {
type: Function,
default: () => {},
},
configForms: {
type: Function,
default: () => {},
},
},
props: {
item: {
......@@ -452,6 +454,11 @@ export default {
},
mounted() {
this.showFormItem()
console.log("组件内部2",this.configForms.showIndex)
// this.configForms.showIndex=this.showIndex
this.$nextTick(() => {
console.log("组件内部3",this.configForms.showIndex)
})
},
methods: {
scrollToView() {
......
......@@ -17,14 +17,10 @@
<div class="label">{{ item.label }}</div>
</div>
</div>
<div
v-show="curSelectedIndex != -1"
class="community"
@click="openModalFlag"
>
<div v-show="curSelectedIndex != -1" class="community" @click="openModalFlag">
<img src="~@/assets/img/DataCenter/shift.png" alt />
{{
curSelectedIndex != -1 ? screeningList[curSelectedIndex].title : ""
curSelectedIndex != -1 ? screeningList[curSelectedIndex].title : ""
}}
</div>
......@@ -284,6 +280,7 @@ export default {
<style lang="scss">
.message-pop {
padding: 40px 28px 12px;
z-index: 10;
.popper__arrow::after {
display: none;
......
......@@ -361,7 +361,7 @@ html {
.flex-end {
display: flex;
justify-content: end;
justify-content: flex-end;
}
.flex-wrap {
flex-wrap: wrap;
......
......@@ -13,7 +13,8 @@
<el-tab-pane label="已审核" name="1"></el-tab-pane>
</el-tabs>
<div v-show="auditStatus == 1" class="keyExplain">
字段说明<img src="~@/assets/img/DataCenter/question.png" alt="" />
字段说明
<img src="~@/assets/img/DataCenter/question.png" alt />
</div>
</div>
<div class="bot-table">
......@@ -103,7 +104,10 @@ export default {
}
},
auditHandle(data, i) {
console.log(data, i)
console.log(data,i)
if(this.type=="1"){
this.$router.push("/followupentry")
}
},
},
}
......
......@@ -13,15 +13,6 @@ export default {
data() {
return {}
},
// provide() {
// if(formClass && this.activeName=='index0'){
// const showIndex = true
// return {
// showIndex,
// }
// }
// },
created() {},
methods: {},
}
......
<template>
<div id="publicContent" :class="activeName=='index0' && formClass">
<div id="publicContent" :class="activeName=='index0' && formClass ? formClass :''">
<div v-if="formTabs && formTabs.length > 0">
<el-button class="draftButton">{{formType == 1 ? "临时保存" : "返回"}}</el-button>
<el-tabs
......@@ -51,7 +51,9 @@ export default {
formClass: String,
},
data() {
return {}
return {
showIndex:false
}
},
methods: {
handleConfirm(data, done, cb) {
......@@ -62,7 +64,24 @@ export default {
// 字典formType 1 筛查表单
this.getCurrentFormByType(this.formType)
},
watch: {},
watch: {
activeName(val){
if(val=="index0" && this.formClass){
this.showIndex = false
console.log(1)
}
else{
this.showIndex = true
console.log(2)
}
}
},
provide() {
return {
configForms: this
}
},
}
</script>
......@@ -74,7 +93,7 @@ export default {
position: absolute;
top: 46px;
right: 40px;
z-index: 999999;
z-index: 999;
border-radius: 4px;
border: 1px solid #4e68ff;
color: #4e68ff;
......
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