|
|
|
@ -3,14 +3,25 @@ |
|
|
|
<div style="width: 90%"> |
|
|
|
<el-table :data="tableData" border style="width: 100%" row-key="id" class="el-table__body-wrapper tbody" |
|
|
|
height="200" @row-click="rowick" highlight-current-row> |
|
|
|
<el-table-column prop="forSexId" label="性别" /> |
|
|
|
<el-table-column prop="forSexId" label="性别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(forSexId, 'id', scope.row.forSexId, 'displayName') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="ageLowerLimit" label="年龄上限" /> |
|
|
|
<el-table-column prop="ageUpperLimit" label="年龄下限" /> |
|
|
|
<el-table-column prop="referenceRangeValue" label="参考范围" /> |
|
|
|
<el-table-column prop="criticalRangeValue" label="警告范围" /> |
|
|
|
<el-table-column prop="lowerDiagnosisId" label="偏低诊断" /> |
|
|
|
<el-table-column prop="upperDiagnosisId" label="偏高诊断" /> |
|
|
|
|
|
|
|
<el-table-column prop="lowerDiagnosisId" label="偏低诊断"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(diagnosis, 'id', scope.row.lowerDiagnosisId, 'displayName') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="upperDiagnosisId" label="偏高诊断"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(diagnosis, 'id', scope.row.upperDiagnosisId, 'displayName') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width=""> |
|
|
|
<template> |
|
|
|
<el-tag class="move" style="cursor: move; margin-left: 15px" draggable="true"> |
|
|
|
@ -59,13 +70,13 @@ |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="偏低诊断" prop="lowerDiagnosisId"> |
|
|
|
<el-select v-model="form.lowerDiagnosisId" placeholder="请选择"> |
|
|
|
<el-option v-for="item in lowerDiagnosisId" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
<el-option v-for="item in diagnosis" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> </el-form-item></el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="偏高诊断" prop="upperDiagnosisId"> |
|
|
|
<el-select v-model="form.upperDiagnosisId" placeholder="请选择"> |
|
|
|
<el-option v-for="item in upperDiagnosisId" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
<el-option v-for="item in diagnosis" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> </el-form-item></el-col> |
|
|
|
</el-row> |
|
|
|
@ -80,9 +91,9 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapState } from "vuex"; |
|
|
|
import { getapi, postapi, putapi,deletapi } from "@/api/api"; |
|
|
|
import { referencerangelist, getporjectlists } from "@/request/commonapi"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { examinationgender } from "@/request/systemapi"; |
|
|
|
import { dddw } from '../../utlis/proFunc' |
|
|
|
// import |
|
|
|
export default { |
|
|
|
props: ['itemId', 'ReferenceRangeTypeFlag'], |
|
|
|
@ -116,7 +127,6 @@ export default { |
|
|
|
// Sorting: "displayOrder desc", |
|
|
|
}, |
|
|
|
dialogVisible: false, |
|
|
|
title: 1, |
|
|
|
form: { |
|
|
|
itemId: "", |
|
|
|
forSexId: "", |
|
|
|
@ -130,9 +140,7 @@ export default { |
|
|
|
}, |
|
|
|
id: '', //新增/编辑 或删除的记录 id |
|
|
|
forSexId: [], //性别 |
|
|
|
lowerDiagnosisId: [], //偏低诊断 |
|
|
|
upperDiagnosisId: [], //偏高诊断 |
|
|
|
initTableData: [], |
|
|
|
diagnosis: [], //偏低诊断 |
|
|
|
tableData: [], |
|
|
|
}; |
|
|
|
}, |
|
|
|
@ -143,8 +151,10 @@ export default { |
|
|
|
|
|
|
|
mounted() { |
|
|
|
//console.log('@子节点', this.itemId, this.ReferenceRangeTypeFlag) |
|
|
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
|
|
|
this.addtoedit() |
|
|
|
|
|
|
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
|
|
|
|
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(['itemSet']) |
|
|
|
@ -162,7 +172,10 @@ export default { |
|
|
|
this.form = row |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//ldddw(forSexId, 'id', scope.row.forSexId, 'displayName') |
|
|
|
ldddw(arrayData,key,value,display){ |
|
|
|
return dddw(arrayData,key,value,display) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 新增或者编辑需要的类别 |
|
|
|
@ -173,8 +186,7 @@ export default { |
|
|
|
}); |
|
|
|
//诊断 |
|
|
|
postapi("/api/app/diagnosis/getlistinfilter").then((res) => { |
|
|
|
this.lowerDiagnosisId = res.data.items; |
|
|
|
this.upperDiagnosisId = res.data.items; |
|
|
|
this.diagnosis = res.data.items; |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
@ -200,22 +212,22 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deletapi(`/api/app/reference-range/${this.id}`, this.form).then(res => { |
|
|
|
this.$message.success('删除成功') |
|
|
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag) |
|
|
|
this.id = '' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消删除' |
|
|
|
}); |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deletapi(`/api/app/reference-range/${this.id}`, this.form).then(res => { |
|
|
|
this.$message.success('删除成功') |
|
|
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag) |
|
|
|
this.id = '' |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
type: 'info', |
|
|
|
message: '已取消删除' |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//确定新增或者编辑 |
|
|
|
@ -226,7 +238,7 @@ export default { |
|
|
|
postapi("/api/app/reference-range", this.form).then((res) => { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
|
|
|
console.log('res',res) |
|
|
|
console.log('res', res) |
|
|
|
this.id = res.data.id; |
|
|
|
}); |
|
|
|
} |
|
|
|
|