4 changed files with 413 additions and 10 deletions
-
4public/sysConfig.json
-
395src/components/itemSet/ReferenceRange3.vue
-
13src/views/fee-settings/Item.vue
-
11src/views/fee-settings/cardBillSum.vue
@ -0,0 +1,395 @@ |
|||||
|
<template> |
||||
|
<div class="" style="width: 100%;display: flex;margin-top: 15px;"> |
||||
|
<div style="width: 90%"> |
||||
|
<el-table :data="tableData" style="width: 100%" class="el-table__body-wrapper tbody" |
||||
|
:height="window.pageHeight < 600 ? 260 : window.pageHeight - 340" @row-click="rowick" highlight-current-row> |
||||
|
<!-- |
||||
|
<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="sexHormoneTermId" label="激素期" /> |
||||
|
<el-table-column prop="referenceRangeValue" label="参考范围" /> |
||||
|
<el-table-column prop="followUpRangeValue" label="随访范围" /> |
||||
|
<el-table-column prop="criticalRangeValue" 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> |
||||
|
</div> |
||||
|
<!-- 按钮区域 --> |
||||
|
<div style="margin-left: 10px;" class="editButton"> |
||||
|
<div> |
||||
|
<el-button type="" @click="add" class="commonbutton">新增</el-button> |
||||
|
</div> |
||||
|
<div style="margin-top: 5px;"> |
||||
|
<el-button type="" @click="edit" class="commonbutton">编辑</el-button> |
||||
|
</div> |
||||
|
<div style="margin-top: 5px;"> |
||||
|
<el-button type="" @click="del" class="deleteButton">删除</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 新增或者编辑弹框 --> |
||||
|
<el-dialog :title="id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="70%" :append-to-body="true"> |
||||
|
<el-form ref="form" :model="form" label-width="100px" :rules="rules"> |
||||
|
<el-row> |
||||
|
<!-- |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="性别" prop="forSexId"> |
||||
|
<el-select v-model="form.forSexId" placeholder="请选择" size="small"> |
||||
|
<el-option v-for="item in forSexId" :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="sexHormoneTermId"> |
||||
|
<el-select v-model="form.sexHormoneTermId" placeholder="请选择" size="small"> |
||||
|
<el-option v-for="item in sexHormoneTerm" :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="ageLowerLimit"> |
||||
|
<el-input type="number" v-model="form.ageLowerLimit" size="small"></el-input> </el-form-item></el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="年龄上限" prop="ageUpperLimit"> |
||||
|
<el-input type="number" v-model="form.ageUpperLimit" size="small"></el-input> </el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="参考范围" prop="referenceRangeValue"> |
||||
|
<el-input v-model="form.referenceRangeValue" size="small"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="随访范围" prop="followUpRangeValue"> |
||||
|
<el-input v-model="form.followUpRangeValue" size="small"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="危急值范围" prop="criticalRangeValue"> |
||||
|
<el-input v-model="form.criticalRangeValue" size="small"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<el-form-item label="偏低诊断" prop=""> |
||||
|
<el-select v-model="form.lowerDiagnosisId" placeholder="请选择" filterable :filter-method="remoteMethods" |
||||
|
default-first-option clearable @change="quckEditdigoisce" size="small"> |
||||
|
<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=""> |
||||
|
<el-select v-model="form.upperDiagnosisId" placeholder="请选择" filterable :filter-method="remoteMethodes" |
||||
|
default-first-option clearable @change="quckEditdigoisces" size="small"> |
||||
|
<el-option v-for="item in diagnosies" :key="item.id" :label="item.displayName" :value="item.id"> |
||||
|
</el-option> |
||||
|
</el-select> </el-form-item></el-col> |
||||
|
</el-row> |
||||
|
</el-form> |
||||
|
<span slot="footer" class="dialog-footer"> |
||||
|
<el-button @click="dialogVisible = false, id = curRowes.id" class="difference">取 消</el-button> |
||||
|
<el-button type="primary" @click="onsbmint" class="commonbutton">确 定</el-button> |
||||
|
</span> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { mapState } from "vuex"; |
||||
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
||||
|
import { examinationgender } from "@/request/systemapi"; |
||||
|
import { dddw } from "../../utlis/proFunc"; |
||||
|
// import |
||||
|
export default { |
||||
|
props: ["itemId", "ReferenceRangeTypeFlag"], |
||||
|
data() { |
||||
|
return { |
||||
|
rules: { |
||||
|
itemId: [{ required: true, message: "请选择项目", trigger: "blur" }], |
||||
|
sexHormoneTermId: [{ required: true, message: "请选择激素期", trigger: "blur" }], |
||||
|
ageLowerLimit: [ |
||||
|
{ required: true, message: "请输入年龄下限", trigger: "blur" }, |
||||
|
], |
||||
|
ageUpperLimit: [ |
||||
|
{ required: true, message: "请输入年龄上限", trigger: "blur" }, |
||||
|
], |
||||
|
referenceRangeValue: [ |
||||
|
{ required: true, message: "请输入参考范围", trigger: "blur" }, |
||||
|
], |
||||
|
lowerDiagnosisId: [ |
||||
|
{ required: true, message: "请选择偏低诊断", trigger: "blur" }, |
||||
|
], |
||||
|
upperDiagnosisId: [ |
||||
|
{ required: true, message: "请选择偏高诊断", trigger: "blur" }, |
||||
|
], |
||||
|
}, |
||||
|
pages: { |
||||
|
SkipCount: 0, |
||||
|
MaxResultCount: 100, |
||||
|
// Sorting: "displayOrder desc", |
||||
|
}, |
||||
|
dialogVisible: false, |
||||
|
form: { |
||||
|
itemId: "", |
||||
|
sexHormoneTermId: "", |
||||
|
ageLowerLimit: 0, |
||||
|
ageUpperLimit: 200, |
||||
|
referenceRangeValue: "", |
||||
|
criticalRangeValue: "", |
||||
|
followUpRangeValue: "", |
||||
|
lowerDiagnosisId: "", |
||||
|
upperDiagnosisId: "", |
||||
|
referenceRangeTypeFlag: "1", |
||||
|
}, |
||||
|
sexHormoneTerm: [], |
||||
|
id: "", //新增/编辑 或删除的记录 id |
||||
|
forSexId: [], //性别 |
||||
|
diagnosis: [], //偏低诊断 |
||||
|
diagnosies: [],//偏高诊断 |
||||
|
tableData: [], |
||||
|
curRowes: {}, |
||||
|
diagnosisId: "" |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() { |
||||
|
//性激素期 |
||||
|
getapi("/api/app/sex-hormone-term/in-filter").then((res) => { |
||||
|
if (res.code == 1) { |
||||
|
this.sexHormoneTerm = res.data; |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
//诊断 |
||||
|
postapi("/api/app/Diagnosis/GetSimpleList").then((res) => { |
||||
|
this.diagnosis = res.data; |
||||
|
this.diagnosies = res.data |
||||
|
this.diagnosisId = res.data |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
this.addtoedit(); |
||||
|
this.getlist(this.itemId); |
||||
|
}, |
||||
|
computed: { |
||||
|
...mapState(["itemSet", "window"]), |
||||
|
}, |
||||
|
methods: { |
||||
|
getlist(itemId) { |
||||
|
postapi('/api/app/SexHormoneReferenceRange/GetListByItemId', { itemId }) |
||||
|
.then(res => { |
||||
|
this.tableData = res.data; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
remoteMethods(keyWords) { |
||||
|
if (keyWords) { |
||||
|
this.diagnosis = []; |
||||
|
this.diagnosisId.forEach(item => { |
||||
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
) { |
||||
|
this.diagnosis.push(item); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.quckeDitd = deepCopy(this.diagnosis); |
||||
|
} |
||||
|
}, |
||||
|
remoteMethodes(keyWords) { |
||||
|
if (keyWords) { |
||||
|
this.diagnosies = []; |
||||
|
this.diagnosisId.forEach(item => { |
||||
|
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
||||
|
) { |
||||
|
this.diagnosies.push(item); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.quckeDitd = deepCopy(this.diagnosies); |
||||
|
} |
||||
|
}, |
||||
|
rowick(row) { |
||||
|
this.curRowes = row; |
||||
|
this.id = row.id; |
||||
|
// getapi(`/api/app/reference-range/${row.id}`).then((res) => { |
||||
|
// this.curRowes = res.data; |
||||
|
// this.id = res.data.id; |
||||
|
// }); |
||||
|
}, |
||||
|
quckEditdigoisce(e) { |
||||
|
if (!e) { |
||||
|
this.remoteMethods() |
||||
|
} |
||||
|
}, |
||||
|
quckEditdigoisces(e) { |
||||
|
if (!e) { |
||||
|
this.remoteMethodes() |
||||
|
} |
||||
|
}, |
||||
|
//ldddw(forSexId, 'id', scope.row.forSexId, 'displayName') |
||||
|
ldddw(arrayData, key, value, display) { |
||||
|
return dddw(arrayData, key, value, display); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
add() { |
||||
|
|
||||
|
this.id = ""; |
||||
|
this.dialogVisible = true; |
||||
|
if (this.$refs.form !== undefined) { |
||||
|
this.$refs.form.resetFields() |
||||
|
} |
||||
|
Object.assign(this.$data.form, this.$options.data().form) |
||||
|
this.form.itemId = this.itemId |
||||
|
}, |
||||
|
|
||||
|
//编辑弹框 |
||||
|
edit() { |
||||
|
if (!this.id) { |
||||
|
this.$message.warning({ showClose: true, message: "请先选中要编辑的记录" }); |
||||
|
return; |
||||
|
} |
||||
|
this.dialogVisible = true; |
||||
|
if (this.$refs.form !== undefined) { |
||||
|
this.$refs.form.resetFields() |
||||
|
} |
||||
|
this.form = { ...this.curRowes } |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
del() { |
||||
|
//console.log("删除操作"); |
||||
|
if (!this.id) { |
||||
|
this.$message.warning({ showClose: true, message: "请先选中要删除的记录" }); |
||||
|
return; |
||||
|
} |
||||
|
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning", |
||||
|
cancelButtonClass: "difference", |
||||
|
confirmButtonClass: "commonbutton" |
||||
|
}) |
||||
|
.then(() => { |
||||
|
return postapi('/api/app/SexHormoneReferenceRange/Delete', { |
||||
|
sexHormoneReferenceRangeId: this.form.id |
||||
|
}); |
||||
|
}) |
||||
|
.then((res) => { |
||||
|
if (res.code != -1) { |
||||
|
console.log("删除成功"); |
||||
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
||||
|
this.id = ""; |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$message.info({ showClose: true, message: "已取消删除" }); |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
confirmationRequest() { |
||||
|
if (!this.id) { |
||||
|
postapi('/api/app/SexHormoneReferenceRange/Create', this.form) |
||||
|
.then((res) => { |
||||
|
if (res.code != -1) { |
||||
|
console.log("新增成功"); |
||||
|
this.getlist(this.itemId); |
||||
|
this.id = this.curRowes.id; |
||||
|
this.dialogVisible = false |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
postapi(`/api/app/SexHormoneReferenceRange/Update`, Object.assign({ sexHormoneReferenceRangeId: this.form.id }, this.form)) |
||||
|
.then( |
||||
|
(res) => { |
||||
|
if (res.code != -1) { |
||||
|
console.log("修改成功"); |
||||
|
this.dialogVisible = false |
||||
|
this.getlist(this.itemId); |
||||
|
} |
||||
|
} |
||||
|
); |
||||
|
} |
||||
|
}, |
||||
|
//确定新增或者编辑 |
||||
|
onsbmint() { |
||||
|
this.$refs["form"].validate((v) => { |
||||
|
let that = this |
||||
|
if (v) { |
||||
|
that.confirmationRequest() |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
//监听事件 |
||||
|
watch: { |
||||
|
//itemId','ReferenceRangeTypeFlag' |
||||
|
itemId(newVal, oldVal) { |
||||
|
if (newVal != oldVal && newVal != "") { |
||||
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
||||
|
} |
||||
|
}, |
||||
|
ReferenceRangeTypeFlag(newVal, oldVal) { |
||||
|
if (newVal != oldVal && newVal != "") { |
||||
|
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
/* .box { |
||||
|
display: flex; |
||||
|
margin-top: 15px; |
||||
|
} */ |
||||
|
/* :deep .editButton .el-button{ |
||||
|
width: 100%; |
||||
|
} */ |
||||
|
/* :deep .el-form-item { |
||||
|
margin-bottom: 14px; |
||||
|
} */ |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue