Commit 19175cfe authored by miaojiale's avatar miaojiale

Merge branch 'dev_lyj' into dev_Miaojiale

parents 48e43636 e734b407
<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]"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:style="{ height: item.type === 'upload' ? '116px' : '53px' }" :style="{ height: item.type === 'upload' ? '116px' : '53px' }"
> >
<div <div
v-if="showIndex" v-if="showIndex || (configForms && configForms.showIndex)"
:class="['formIndex', item.labelSuffix == '5' ? 'computeIndex' : '']" :class="['formIndex', item.labelSuffix == '5' ? 'computeIndex' : '']"
> >
{{ item.labelSuffix || columnIndex + 1 }} {{ item.labelSuffix || columnIndex + 1 }}
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<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
...@@ -76,12 +77,12 @@ ...@@ -76,12 +77,12 @@
@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>
<template v-if="item.prepend" slot="prepend">{{ <template v-if="item.prepend" slot="prepend">
item.prepend {{ item.prepend }}
}}</template> </template>
</el-input> </el-input>
<!-- 密码框 --> <!-- 密码框 -->
...@@ -104,12 +105,12 @@ ...@@ -104,12 +105,12 @@
" "
@blur="handleBlur" @blur="handleBlur"
> >
<template v-if="item.append" slot="append">{{ <template v-if="item.append" slot="append">
item.append {{ item.append }}
}}</template> </template>
<template v-if="item.prepend" slot="prepend">{{ <template v-if="item.prepend" slot="prepend">
item.prepend {{ item.prepend }}
}}</template> </template>
</el-input> </el-input>
<!-- 文本域 --> <!-- 文本域 -->
...@@ -150,8 +151,7 @@ ...@@ -150,8 +151,7 @@
: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"
...@@ -171,8 +171,8 @@ ...@@ -171,8 +171,8 @@
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>
<!-- 多选框 --> <!-- 多选框 -->
...@@ -186,8 +186,8 @@ ...@@ -186,8 +186,8 @@
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>
...@@ -213,8 +213,7 @@ ...@@ -213,8 +213,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>
<!-- 级联 --> <!-- 级联 -->
...@@ -243,8 +242,7 @@ ...@@ -243,8 +242,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'"
...@@ -259,8 +257,7 @@ ...@@ -259,8 +257,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'"
...@@ -271,8 +268,7 @@ ...@@ -271,8 +268,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'"
...@@ -284,8 +280,7 @@ ...@@ -284,8 +280,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
...@@ -298,8 +293,7 @@ ...@@ -298,8 +293,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
...@@ -312,8 +306,7 @@ ...@@ -312,8 +306,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
...@@ -329,8 +322,7 @@ ...@@ -329,8 +322,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
...@@ -344,8 +336,7 @@ ...@@ -344,8 +336,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
...@@ -362,8 +353,7 @@ ...@@ -362,8 +353,7 @@
:format="item.format" :format="item.format"
align="right" align="right"
@change="handleChange" @change="handleChange"
> ></el-date-picker>
</el-date-picker>
</template> </template>
</div> </div>
<span <span
...@@ -414,6 +404,10 @@ export default { ...@@ -414,6 +404,10 @@ export default {
type: Function, type: Function,
default: () => {}, default: () => {},
}, },
configForms: {
type: Function,
default: () => {},
},
}, },
props: { props: {
item: { item: {
......
<template>
<!-- 删除display isShowIm item.importantField item.style-->
<el-row :gutter="options.gutter" class="form-content">
<template v-for="(item, columnIndex) in columns.column || columns.children.column">
<el-col
v-if="item.type === 'title'"
:key="columnIndex"
class="row12"
:xs="item.xs || 24"
:sm="item.sm || 24"
:md="item.md || 24"
:lg="item.span || 12"
>
<div class="form_title">
<span>{{ item.value }}</span>
</div>
</el-col>
<el-col
v-else
:key="columnIndex"
class="row24"
:xs="item.xs || 24"
:sm="item.sm || 24"
:md="item.md || 24"
:lg="item.lg || item.span || 12"
:xl="item.span || 12"
>
<form-item-self
:form="form"
:column-index="columnIndex"
:item="item"
:columns="columns.column || columns.children.column"
:group="options.group"
@formChange="formChange"
></form-item-self>
</el-col>
</template>
</el-row>
</template>
<script>
/**
* @description 自定义表单
*/
import FormItemSelf from "./FormItemSelf2.vue"
export default {
name: "FormContent",
components: { FormItemSelf },
props: {
form: {
type: Object,
default: () => {
return {}
},
},
options: {
type: Object,
default: () => {
return {}
},
}, //配置 数据
columns: Object, //表单数据
size: { type: String, default: "small" },
formStyle: Object,
formEdit: {
type: Object,
default: () => {
return {}
},
},
isShowImportant: {
type: Boolean,
default: false,
},
},
data() {
return {}
},
computed: {
isShowIm() {
return function (val) {
return !this.isShowImportant ? true : val
}
},
paddingLeft() {
const columns = this.columns
return columns.labelWidth ? `${columns.labelWidth}px` : ""
},
},
methods: {
handleChange(key, val) {
if (this.form.hasOwnProperty(key)) this.form[key] = val
},
// 切换不符合筛查条件的显示
formChange() {
console.log(this.form)
let arr = [
"is_one_year",
"is_subtotal_history",
"is_ppi",
"is_symptom",
"is_subtotal_history",
"is_disease",
"is_tumour",
]
let flag = 0
for (let i = 0; i < arr.length; i++) {
if (this.form[arr[i]] && this.form[arr[i]] == 0) {
flag++
}
}
if (flag == 0) {
this.$emit("showError", false)
} else {
this.$emit("showError", true)
}
},
},
watch: {
},
mounted(){
}
}
</script>
<style lang="scss" scoped>
::v-deep {
.row24.el-col-lg-12 {
&:nth-child(2n) {
border-left: 1px solid #ccc;
}
}
}
.form-content ::v-deep {
display: flex;
flex-wrap: wrap;
.el-form-item {
display: flex;
align-items: center;
.el-form-item__label {
line-height: 1.2;
}
.el-form-item__content {
margin-left: 0 !important;
flex: 1;
display: flex;
align-items: center;
}
}
}
.form_title {
background-color: #fff;
padding: 10px 0px;
margin: 3px;
span {
height: 33px;
line-height: 33px;
}
}
.dynamic-form-container {
&_lable {
font-weight: bold;
font-size: 16px;
line-height: 40px;
}
}
</style>
This diff is collapsed.
This diff is collapsed.
...@@ -17,14 +17,10 @@ ...@@ -17,14 +17,10 @@
<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 : ""
}} }}
</div> </div>
...@@ -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;
......
...@@ -65,6 +65,18 @@ export const constantRoutes = [ ...@@ -65,6 +65,18 @@ export const constantRoutes = [
}, },
], ],
}, },
{
path: "/followaduit",
component: Layout,
children: [
{
path: "/followaduit",
component: () => import("@/views/followupentry/followaduit"),
hidden: true,
name: "followaduit",
},
],
},
{ {
path: "/401", path: "/401",
name: "401", name: "401",
......
...@@ -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("/followaduit")
}
}, },
}, },
} }
......
<template>
<!-- 随访调查录入 -->
<div>
<ConfigForms form-type="2" formClass="follow-form"></ConfigForms>
</div>
</template>
<script>
import ConfigForms from "@/views/screening/components/ConfigForms.vue"
export default {
name: "FollowupEntry",
components: {
ConfigForms,
},
data() {
return {
form:{
column: [],
labelPosition: 'right',
labelSuffix: '',
labelWidth: 100,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: '提交',
emptyBtn: true,
emptyText: '清空',
nextTabBtn: true,
nextTabText: '下一页',
menuPosition: 'center',
group: [
{
label: '个人信息',
prop: '1669858228269_22763',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'name',
label: '姓名',
fieldType: 'varchar',
fieldLength: '50',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'contact_phone',
label: '手机号',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'telephone',
label: '联系电话',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'sex',
label: '性别',
fieldType: 'tinyint',
fieldLength: '2',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'birthday',
label: '出生日期',
fieldType: 'date',
fieldLength: '',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'age',
label: '年龄',
fieldType: 'int',
fieldLength: '4',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}]
},
{
label: '第一次随访计划',
prop: '1669858313508_15760',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'is_continue_follow',
label: '是否随访',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [],
dicType: 'd-sf',
props: {
label: 'label',
value: 'value'
},
fieldType: 'tinyint',
fieldLength: '2',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
value: '1',
span: 24,
autoRequired: 0,
personalRequired: 0
}, {
type: 'date',
display: true,
importantField: true,
styles: {},
prop: 'first_follow_time',
label: '随访时间',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dicType: '',
fieldType: 'date',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
span: 12,
autoRequired: 0,
personalRequired: 0,
width: 12
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'follow_contents',
label: '随访内容',
fieldType: 'text',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 12,
width: 12
}]
},
]
}
}
},
created() {},
methods: {},
}
</script>
<style lang="scss">
</style>
<template> <template>
<!-- 随访调查录入 --> <!-- 随访调查录入 -->
<ConfigForms form-type="2" formClass="follow-form"></ConfigForms> <div>
<ConfigForms form-type="2" formClass="follow-form"></ConfigForms>
</div>
</template> </template>
<script> <script>
...@@ -11,17 +13,221 @@ export default { ...@@ -11,17 +13,221 @@ export default {
ConfigForms, ConfigForms,
}, },
data() { data() {
return {} return {
form:{
column: [],
labelPosition: 'right',
labelSuffix: '',
labelWidth: 100,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: '提交',
emptyBtn: true,
emptyText: '清空',
nextTabBtn: true,
nextTabText: '下一页',
menuPosition: 'center',
group: [
{
label: '个人信息',
prop: '1669858228269_22763',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'name',
label: '姓名',
fieldType: 'varchar',
fieldLength: '50',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'contact_phone',
label: '手机号',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'telephone',
label: '联系电话',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'sex',
label: '性别',
fieldType: 'tinyint',
fieldLength: '2',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'birthday',
label: '出生日期',
fieldType: 'date',
fieldLength: '',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'age',
label: '年龄',
fieldType: 'int',
fieldLength: '4',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}]
},
{
label: '第一次随访计划',
prop: '1669858313508_15760',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'is_continue_follow',
label: '是否随访',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [],
dicType: 'd-sf',
props: {
label: 'label',
value: 'value'
},
fieldType: 'tinyint',
fieldLength: '2',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
value: '1',
span: 24,
autoRequired: 0,
personalRequired: 0
}, {
type: 'date',
display: true,
importantField: true,
styles: {},
prop: 'first_follow_time',
label: '随访时间',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dicType: '',
fieldType: 'date',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
span: 12,
autoRequired: 0,
personalRequired: 0,
width: 12
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'follow_contents',
label: '随访内容',
fieldType: 'text',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 12,
width: 12
}]
},
]
}
}
}, },
// 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
v-model="activeName" v-model="activeName"
type="card" type="card"
...@@ -28,6 +33,7 @@ ...@@ -28,6 +33,7 @@
@setFormJson="setFormJson" @setFormJson="setFormJson"
@handleConfirm="handleConfirm" @handleConfirm="handleConfirm"
@onPrev="onPrev" @onPrev="onPrev"
:survivalFlag="survivalFlag"
></form-tab> ></form-tab>
</template> </template>
</div> </div>
...@@ -41,6 +47,7 @@ ...@@ -41,6 +47,7 @@
<script> <script>
import mixin from "./mixin" import mixin from "./mixin"
import CustomForm from "@/components/FormComponents/CustomForm/index"
export default { export default {
name: "ConfigForms", name: "ConfigForms",
...@@ -52,7 +59,10 @@ export default { ...@@ -52,7 +59,10 @@ export default {
formClass: String, formClass: String,
}, },
data() { data() {
return {} return {
// showIndex:false,
// survivalFlag:false
}
}, },
methods: { methods: {
handleConfirm(data, done, cb) { handleConfirm(data, done, cb) {
...@@ -66,7 +76,41 @@ export default { ...@@ -66,7 +76,41 @@ 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
// // this.survivalFlag = true
// console.log(1)
// }
// else{
// this.showIndex = true
// // this.survivalFlag = false
// console.log(2)
// }
// }
},
computed: {
survivalFlag() {
if (this.activeName == "index0" && this.formClass) {
return true
} else {
return false
}
},
showIndex() {
if (this.activeName == "index0" && this.formClass) {
return false
} else {
return true
}
},
},
provide() {
return {
configForms: this,
}
},
} }
</script> </script>
...@@ -78,7 +122,7 @@ export default { ...@@ -78,7 +122,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;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:title="asideShow ? '收起' : '展开'" :title="asideShow ? '收起' : '展开'"
class="arrow" class="arrow"
@click="asideShow = !asideShow" @click="asideShow = !asideShow"
></i> --> ></i>-->
<el-empty v-if="isEmpty" description="暂无数据"></el-empty> <el-empty v-if="isEmpty" description="暂无数据"></el-empty>
<template v-if="!isEmpty"> <template v-if="!isEmpty">
<!-- 多次记录 --> <!-- 多次记录 -->
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<span class="value" <span class="value"
>{{ formData.percent.personalPercent }}%</span >{{ formData.percent.personalPercent }}%</span
></template ></template
> --> >-->
<div class="label"> <div class="label">
<!-- 仅显示重要字段 : --> <!-- 仅显示重要字段 : -->
...@@ -42,11 +42,8 @@ ...@@ -42,11 +42,8 @@
</el-switch>--> </el-switch>-->
</div> </div>
</el-row> </el-row>
<div <div class="my-form" ref="my-form" :class="externalScroll ? 'no-scroll' : ''">
class="my-form" <read-form ref="form" :options="survivalForm" v-if="survivalFlag"></read-form>
ref="my-form"
:class="externalScroll ? 'no-scroll' : ''"
>
<custom-form <custom-form
ref="form" ref="form"
@scrollTop="scrollTop" @scrollTop="scrollTop"
...@@ -72,6 +69,7 @@ ...@@ -72,6 +69,7 @@
import { getPatientDetail, getRecordList } from "@/api/patient.js" import { getPatientDetail, getRecordList } from "@/api/patient.js"
import { getFormDetail } from "@/api/field" import { getFormDetail } from "@/api/field"
import CustomForm from "@/components/FormComponents/CustomForm/index" import CustomForm from "@/components/FormComponents/CustomForm/index"
import ReadForm from "@/components/FormComponents/ReadForm/index"
import TagsScrollBar from "@/components/TagsScrollBar/index" import TagsScrollBar from "@/components/TagsScrollBar/index"
export default { export default {
name: "FormTab", name: "FormTab",
...@@ -83,8 +81,9 @@ export default { ...@@ -83,8 +81,9 @@ export default {
patientId: String, patientId: String,
patientStandbyId: String, patientStandbyId: String,
getAll: Boolean, // 获取页面所有数据 getAll: Boolean, // 获取页面所有数据
survivalFlag:Boolean, //存活的显示
}, },
components: { CustomForm, TagsScrollBar }, components: { CustomForm, TagsScrollBar,ReadForm },
provide() { provide() {
return { return {
formId: this.form.formId, formId: this.form.formId,
...@@ -108,6 +107,218 @@ export default { ...@@ -108,6 +107,218 @@ export default {
formloading: false, formloading: false,
repeatedlyList: [], repeatedlyList: [],
formCacheList: [], formCacheList: [],
survivalForm:{
column: [],
labelPosition: 'right',
labelSuffix: '',
labelWidth: 100,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: '提交',
emptyBtn: true,
emptyText: '清空',
nextTabBtn: true,
nextTabText: '下一页',
menuPosition: 'center',
group: [
{
label: '个人信息',
prop: '1669858228269_22763',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'name',
label: '姓名',
fieldType: 'varchar',
fieldLength: '50',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'contact_phone',
label: '手机号',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'telephone',
label: '联系电话',
fieldType: 'varchar',
fieldLength: '20',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'sex',
label: '性别',
fieldType: 'tinyint',
fieldLength: '2',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'birthday',
label: '出生日期',
fieldType: 'date',
fieldLength: '',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'age',
label: '年龄',
fieldType: 'int',
fieldLength: '4',
tableName: '存活情况',
tableCode: 'gas_survival_situation',
tableId: '1598137567272861697',
notFilter: false,
cType: '',
subfield: false
}]
},
{
label: '第一次随访计划',
prop: '1669858313508_15760',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'is_continue_follow',
label: '是否随访',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [],
dicType: 'd-sf',
props: {
label: 'label',
value: 'value'
},
fieldType: 'tinyint',
fieldLength: '2',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
value: '1',
span: 24,
autoRequired: 0,
personalRequired: 0
}, {
type: 'date',
display: true,
importantField: true,
styles: {},
prop: 'first_follow_time',
label: '随访时间',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dicType: '',
fieldType: 'date',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
span: 12,
autoRequired: 0,
personalRequired: 0,
width: 12
}, {
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'follow_contents',
label: '随访内容',
fieldType: 'text',
tableName: '随访计划',
tableCode: 'gas_follow',
tableId: '1597491580053323777',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 12,
width: 12
}]
},
]
}
} }
}, },
// mixins: [resizeMixin], // mixins: [resizeMixin],
......
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
}, },
handleTabClick({ index, name }) { handleTabClick({ index, name }) {
const { formId, id, silent } = this.formTabs[index] const { formId, id, silent } = this.formTabs[index]
console.log('表单项', this.formTabs)
if (formId && silent) { if (formId && silent) {
this.formTabs[index]["silent"] = false //控制是否获取接口数据 this.formTabs[index]["silent"] = false //控制是否获取接口数据
return return
......
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