Commit 87fd1b23 authored by miaojiale's avatar miaojiale

审核质控动态表单回显

parent c41edeb9
<template>
<!-- 随访审核详情 -->
<div class="follow-form">
<!-- <ConfigForms form-type="2" formClass="follow-form"></ConfigForms> -->
<el-container>
<el-container v-loading="fromLoading">
<el-aside width="auto">
<div class="follow-tab">
<p class="tab-title">筛查病例数据</p>
<el-tabs tab-position="right" style="height: 200px;" v-model="activeTab">
<el-tabs
v-model="activeTab"
tab-position="right"
style="height: 200px"
>
<el-tab-pane
:label="'第'+ Number(index+1) + '次随访数据'"
v-for="(item,index) in formDataList"
v-for="(item, index) in formDataList"
:key="index"
:label="'第' + Number(index + 1) + '次随访数据'"
:name="String(index)"
></el-tab-pane>
</el-tabs>
</div>
</el-aside>
<el-main>
<read-form ref="form" :options="followupForm" :formEdit="formEdit"></read-form>
<el-main class="transition-box">
<el-empty v-if="!isEmpty && noData" description="暂无数据"></el-empty>
<template v-if="isEmpty && !noData">
<div ref="my-form" class="my-form">
<template v-for="(item, index) in jsonList">
<custom-form
:key="index"
ref="customForm"
class="mb-20"
:options="item"
:form-edit="formList"
></custom-form
></template>
</div>
</template>
</el-main>
<el-aside width="auto" class="transition-box">
<div class="follow-list">
......@@ -35,694 +51,41 @@
</template>
<script>
import ConfigForms from "@/views/screening/components/ConfigForms.vue"
import ReadForm from "@/components/FormComponents/ReadForm/index"
// import ConfigForms from "@/views/screening/components/ConfigForms.vue"
import { mapGetters } from "vuex"
import CustomForm from "@/components/FormComponents/CustomForm/index"
// import ReadForm from "@/components/FormComponents/ReadForm/index"
import { getCurrentFormByType } from "@/api/coop-group.js"
import { getFormDetail } from "@/api/field"
export default {
name: "followReview",
name: "FollowReview",
components: {
ConfigForms,
ReadForm
// ConfigForms,
CustomForm,
// ReadForm,
},
provide() {
return {
showIndex: true,
}
},
props: {
tabActive:{
type:String,
},
formDataList: {
type: Array,
tabActive: {
type: String,
},
formDataList: Array,
noData: Boolean,
},
data() {
return {
followupForm:{
column: [],
labelPosition: 'left',
labelSuffix: '',
labelWidth: 180,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: '提交',
emptyBtn: true,
emptyText: '清空',
nextTabBtn: true,
nextTabText: '下一页',
menuPosition: 'center',
group: [
{
label: '第二次随访调查',
prop: '1669858313508_15761',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [
{
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: 24,
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: 24,
width: 12
}
]
},
{
label: '是否接受胃镜检查',
prop: '1669860991131_8643',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
showIndex:true,
column: [{
type: 'radio',
display: true,
importantField: true,
styles: {},
label: '是否接受检查',
prop: 'is_accept',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [{
value: '1',
target: '1669861007378_67152'
}],
dicType: 'd-sf',
props: {
label: 'label',
value: 'value'
},
fieldType: 'tinyint',
fieldLength: '2',
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 24,
lg: 24
}]
},
{
label: '胃镜检查结果',
prop: '1669861007378_67152',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
showIndex:true,
column: [
{
type: 'datetime',
display: true,
importantField: true,
styles: {},
color:"#4B65FF",
label: '检查时间',
prop: 'check_time',
dicData: [{
label: '',
value: '1',
id: '1595347527757000705',
parentId: ''
}, {
label: '',
value: '0',
id: '1595347502595371010',
parentId: ''
}],
dynamicshSet: [],
dicOption: 'static',
dicType: '',
props: {
label: 'label',
value: 'value'
},
fieldType: 'datetime',
fieldLength: '',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 24,
width: 12
},
{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'check_type',
label: '胃镜检查方式',
fieldType: 'int',
fieldLength: '11',
autoRequired: 0,
personalRequired: 0,
dicData: [
{
label: '胃镜普通白光检查',
value: '1',
id: '1597475602204557314',
parentId: ''
}, {
label: '胃镜普通白光检查+LCI检查',
value: '2',
id: '1597475677853024258',
parentId: ''
}, {
label: '磁控胶囊胃镜检查',
value: '3',
id: '1597475763517489154',
parentId: ''
}
],
dynamicshSet: [],
dicType: 'gas_check_type',
props: {
label: 'label',
value: 'value'
},
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
span: 24
},
{
type: 'radio',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
dicData: [{
label: '未见异常',
value: '1',
id: '1597476184780800001',
parentId: ''
}, {
label: '异常',
value: '2',
id: '1597476229722767361',
parentId: ''
}],
dynamicshSet: [{
value: '2',
target: 'detail_check_type'
}, {
value: '2',
target: 'diagnosis'
}],
dicType: 'check_result',
props: {
label: 'label',
value: 'value'
},
prop: 'check_result',
label: '检查结果',
fieldType: 'tinyint',
fieldLength: '2',
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
span: 24
},
{
type: 'checkbox',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
dicData: [{
label: 'NBI',
value: '1',
id: '1597476883899973634',
parentId: ''
}, {
label: 'FICE',
value: '2',
id: '1597476919312482306',
parentId: ''
}, {
label: 'I-SC',
value: '3',
id: '1597476961561706498',
parentId: ''
}, {
label: 'BLI',
value: '4',
id: '1597476996303126529',
parentId: ''
}, {
label: '放大内镜',
value: '5',
id: '1597477029488459778',
parentId: ''
}, {
label: '激光共聚焦显微内镜',
value: '6',
id: '1597477062287917057',
parentId: ''
}, {
label: '荧光内镜',
value: '7',
id: '1597477097977249793',
parentId: ''
}, {
label: '化学染色',
value: '8',
id: '1597477133691748353',
parentId: ''
}],
dynamicshSet: [],
dicType: 'gas_detail_check_type',
props: {
label: 'label',
value: 'value'
},
prop: 'detail_check_type',
label: '胃镜精查方式',
fieldType: 'varchar',
fieldLength: '255',
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
span: 24
},
{
type: 'radio',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
dicData: [{
label: '未见异常',
value: '1',
id: '1597476184780800001',
parentId: ''
}, {
label: '异常',
value: '2',
id: '1597476229722767361',
parentId: ''
}],
dynamicshSet: [{
value: '2',
target: 'esophagus_level'
}, {
value: '2',
target: 'esophagus_position'
}, {
value: '2',
target: 'early_esophagus_cancer'
}, {
value: '2',
target: 'period_esophagus_cancer'
}, {
value: '2',
target: 'is_barret_esophagus'
}, {
value: '2',
target: 'is_back_esophagus'
}, {
value: '2',
target: 'inogm_level'
}, {
value: '2',
target: 'inogm_position'
}, {
value: '2',
target: 'early_gastric_cancer'
}, {
value: '2',
target: 'period_gastric_cancer'
}, {
value: '2',
target: 'atrophic_gastriti'
}, {
value: '2',
target: 'gastric_ulcer'
}, {
value: '2',
target: 'gastric_polyp_type'
}, {
value: '2',
target: 'gastric_polyp'
}, {
value: '2',
target: 'non_atrophic_gastriti'
}, {
value: '2',
target: 'is_duodenal_ulcer'
}, {
value: '2',
target: 'other_pathology'
}],
dicType: 'check_result',
props: {
label: 'label',
value: 'value'
},
prop: 'diagnosis',
label: '最后诊断',
fieldType: 'tinyint',
fieldLength: '4',
tableName: '胃镜检查',
tableCode: 'gastroscope',
tableId: '1597468524048121858',
notFilter: false,
cType: '',
subfield: false,
span: 24
},
]
},
{
label: '实验室检查',
prop: '1669863751318_50013',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
showIndex:true,
column: [
{
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'G_17',
label: '胃泌素17',
fieldType: 'varchar',
fieldLength: '255',
tableName: '实验室检查',
tableCode: 'gas_exam',
tableId: '1597466741234040833',
notFilter: false,
cType: '',
subfield: false,
autoRequired: 0,
personalRequired: 0,
span: 24,
width: 12,
unit:"pmol/L",
color:"#5972FF"
},
{
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'PG_I',
label: '胃蛋白酶原I(PG I)',
fieldType: 'varchar',
fieldLength: '255',
tableName: '实验室检查',
tableCode: 'gas_exam',
tableId: '1597466741234040833',
notFilter: false,
cType: '',
subfield: false,
span: 24,
width: 12
},
{
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'PG_II',
label: '胃蛋白酶原II(PG II)',
fieldType: 'varchar',
fieldLength: '255',
tableName: '实验室检查',
tableCode: 'gas_exam',
tableId: '1597466741234040833',
notFilter: false,
cType: '',
subfield: false,
span: 24,
width: 12
},
{
type: 'radio',
display: true,
importantField: true,
styles: {},
prop: 'IgG',
label: 'Hp抗体(IgG)检测',
fieldType: 'varchar',
fieldLength: '255',
autoRequired: 0,
personalRequired: 0,
dicData: [{
label: '阴性',
value: '1',
id: '1598150963816923138',
parentId: ''
}, {
label: '阳性',
value: '2',
id: '1598150992287858689',
parentId: ''
}],
dynamicshSet: [],
dicType: 'hp_antibody',
props: {
label: 'label',
value: 'value'
},
tableName: '实验室检查',
tableCode: 'gas_exam',
tableId: '1597466741234040833',
notFilter: false,
cType: '',
subfield: false,
span: 24
},
{
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'img_path',
label: '图片资料',
fieldType: 'varchar',
fieldLength: '255',
tableName: '实验室检查',
tableCode: 'gas_exam',
tableId: '1597466741234040833',
notFilter: false,
cType: '',
subfield: false,
span: 24,
width: 12
}
]
},
{
label: '风险评估',
prop: '1669864316349_49130',
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
showIndex:true,
column: [
{
type: 'input',
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: 'risk_score',
label: '风险评分',
fieldType: 'varchar',
fieldLength: '255',
tableName: '风险评估',
tableCode: 'gas_risk_assessment',
tableId: '1598151898370768898',
notFilter: false,
cType: '',
subfield: false,
span: 24,
width: 12
},
{
type: 'input',
display: true,
importantField: true,
styles: {},
prop: 'risk_rank',
label: '风险等级',
fieldType: 'varchar',
fieldLength: '20',
tableName: '风险评估',
tableCode: 'gas_risk_assessment',
tableId: '1598151898370768898',
notFilter: false,
cType: '',
subfield: false,
span: 24,
width: 12
},
]
},
{
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
}
]
},
]
},
fromLoading: false,
formTabs: [],
formTabsList: [],
jsonList: [],
formList: {},
// formEdit:{
// },
activeTab:'0',
activeTab: "0",
screenList: [
{
time: "2020-12-12 11:11:11",
......@@ -732,28 +95,105 @@ export default {
],
}
},
watch:{
tabActive(val){
this.activeTab = val
}
},
computed:{
computed: {
...mapGetters({
group: ["user/group"],
}),
isEmpty() {
return this.jsonList.length
},
//当前随访数据
formEdit:{
get(){
formEdit: {
get() {
return this.formDataList[this.activeTab]
},
set(){
}
}
set() {},
},
},
watch: {
tabActive(val) {
this.activeTab = val
},
},
created() {
this.getCurrentFormByType()
},
mounted(){
mounted() {
this.formEdit = this.formDataList[this.activeTab]
},
methods: {},
methods: {
getCurrentFormByType(type = 2) {
this.fromLoading = true
getCurrentFormByType({
type,
groupId: this.group.groupId,
})
.then((res) => {
if (res.code === 1) {
const formTabs = []
this.formTabsList = res.data.map((item, index) => {
if (index === 0) {
// formTabs.push({
// silent: false,
// ...item,
// label: item.tabName,
// })
} else {
formTabs.push({
id: item.id,
formId: item.formId,
silent: true,
label: item.tabName,
})
}
return {
...item,
silent: false,
label: item.tabName,
}
})
this.formTabs = formTabs
}
})
.finally(() => {
this.jsonList = []
let i = 0
this.initForm(i)
})
},
initForm(i) {
let formId = this.formTabs[i].formId
this.formloading = true
getFormDetail(formId)
.then((res) => {
if (res.code === 1 && res.data) {
const formJson = res.data.formJson
const obj = eval("(" + formJson + ")")
obj.disabled = true
obj.closeBtn = true
obj.detail = true
this.jsonList.push(obj)
if (i == this.formTabs.length - 1) {
// console.log(this.jsonList)
this.fromLoading = false
}
}
})
.finally(() => {
// console.log(this.formTabs)
if (i < this.formTabs.length - 1) {
i++
this.initForm(i)
}
// console.log(this.jsonList)
if (this.jsonList.length == this.formTabs.length) {
this.$nextTick(() => {
// this.getPatientDetail()
})
}
})
},
},
}
</script>
......@@ -842,35 +282,4 @@ export default {
}
}
}
.follow-form {
::v-deep {
.el-collapse-item__header {
// border-width: 0px 0px 0px;
border: none !important;
}
.row24 {
border-top: 1px solid #cccccc;
}
.custom-form-item {
border-width: 1px 0px 0px;
}
.el-collapse-item {
margin-bottom: 20px;
border-radius: 4px;
overflow: hidden;
border: 1px solid #cccccc;
}
.el-collapse-item:not(:last-child) {
}
.el-collapse-item__wrap {
border: none;
}
// .row24.el-col-lg-12:nth-child(2n) {
// border-width: 0px 0px 0px 1px;
// }
.el-form-item {
padding: 0px;
}
}
}
</style>
......@@ -208,7 +208,7 @@ export default {
// }
},
created() {
this.getDetail()
// this.getDetail()
},
computed: {
unionId() {
......@@ -218,6 +218,7 @@ export default {
methods: {
showDialog(val, index) {
console.log("显示框", val)
this.curBtn = index + 1
if (!this.editStatus) {
if (this.curBtn == 1) {
......@@ -228,6 +229,7 @@ export default {
//获取审核标签
this.getSysCheckNote()
} else {
d
this.rules.reason[0].message = "请输入驳回修改建议"
}
this.$refs.publicDialog.dialogVisible = true
......
......@@ -8,7 +8,9 @@
:disabled="disabled"
:tab-disabled="tabDisabled"
:get-data="getData"
:contrast="true"
:patient-id="patientId"
:screenList="screenList"
@refreshData="refreshData"
></ConfigForms>
</div>
......@@ -26,6 +28,13 @@ export default {
disabled: false,
tabDisabled: true,
refreshFlag: true,
screenList: [
{
time: "2020-12-12 11:11:11",
code: "UK102",
name: "修改第一次随访计划",
},
],
}
},
provide() {
......
......@@ -6,7 +6,10 @@
$route.path === '/screening/draft' ? 'p_padding' : '',
]"
>
<div v-if="formTabs && formTabs.length > 0" style="position: relative">
<div
v-if="formTabs && formTabs.length > 0"
style="position: relative; display: flex"
>
<el-button
v-if="formType == 1 ? (!disabled ? true : false) : true"
class="draftButton"
......@@ -46,7 +49,7 @@
:operation="operation"
:is-draft="isDraft"
:active-name="activeName"
contrast
:contrast="contrast"
:form-initial="formInitial"
:survival-flag="survivalFlag"
:follow-id="followId"
......@@ -60,6 +63,17 @@
</transition>
</el-tab-pane>
</el-tabs>
<el-aside v-if="contrast" :width="'200px'">
<div class="side-content">
<ul class="list">
<li v-for="(item, index) in screenList" :key="index">
<div class="time">{{ item.time }}</div>
<div class="time">{{ item.code }}</div>
<div class="time">{{ item.name }}</div>
</li>
</ul>
</div>
</el-aside>
</div>
<el-empty v-else description="暂无数据"></el-empty>
<!-- 筛查提交弹窗 -->
......@@ -146,6 +160,7 @@ export default {
mixins: [mixin],
props: {
disabled: Boolean,
screenList: Array,
tabDisabled: { type: Boolean, default: true },
formType: String,
patientId: String,
......@@ -153,6 +168,7 @@ export default {
operation: String,
isDraft: String,
getData: { type: Boolean, default: true },
contrast: { type: Boolean, default: false },
},
inject: {
tabFollowId: {
......@@ -381,6 +397,32 @@ export default {
</script>
<style lang="scss" scoped>
.el-aside {
padding: 88px 0 10px;
border-left: 0px;
.side-content {
width: 100%;
height: 100%;
border: 1px solid #ccc;
border-radius: 4px;
.list {
li {
padding: 20px 30px;
border-bottom: 1px solid #ccc;
cursor: pointer;
.time {
font-size: 14px;
margin-bottom: 8px;
font-family: AlibabaPuHuiTiR;
text-align: left;
&:first-child {
color: #4e68ff;
}
}
}
}
}
}
#publicContent {
position: relative;
padding: 32px 24px 32px;
......
......@@ -70,14 +70,6 @@
</div>
</template>
</el-main>
<el-aside
v-if="contrast"
:width="sideWidth"
class="transition-box"
:class="{ hidden: !asideShow }"
>
<div class="side-content"></div>
</el-aside>
</el-container>
</template>
<script>
......@@ -98,7 +90,7 @@ export default {
externalScroll: Boolean, //外部滚动
disabled: Boolean,
getData: Boolean,
contrast: Boolean, //同屏对照
// contrast: Boolean, //同屏对照
form: Object,
formType: String,
patientId: String,
......@@ -171,9 +163,9 @@ export default {
getTabFollowId() {
return this.tabFollowId()
},
sideWidth() {
return this.asideShow ? "200px" : "0px"
},
// sideWidth() {
// return this.asideShow ? "200px" : "0px"
// },
pageLoading() {
return this.loading || this.formloading
},
......@@ -545,12 +537,4 @@ export default {
float: left;
width: 150px;
}
.transition-box {
transition: all 0.2s;
&.hidden {
opacity: 0;
height: 0px;
}
}
</style>
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