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

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

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