<template>
|
<div class="app-container">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
:inline="true"
|
v-show="showSearch"
|
label-width="68px"
|
>
|
|
<div>
|
<li_area_select v-model="defultAddress"></li_area_select>
|
<div>{{defultAddress}}</div>
|
</div>
|
|
<el-form-item label="姓名" prop="name">
|
<el-input
|
v-model="queryParams.name"
|
placeholder="请输入姓名"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="证件号码" prop="idcardno">
|
<el-input
|
v-model="queryParams.idcardno"
|
placeholder="请输入证件号码"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="省(区/市)" prop="residenceprovince">
|
<el-select
|
v-model="queryParams.residenceprovince"
|
placeholder="请选择省(区/市)"
|
clearable
|
size="small"
|
>
|
<el-option label="请选择字典生成" value="" />
|
</el-select>
|
</el-form-item>
|
<el-form-item label="记录状态" prop="recordstate">
|
<el-select
|
v-model="queryParams.recordstate"
|
placeholder="请选择记录状态"
|
clearable
|
size="small"
|
>
|
<el-option
|
v-for="dict in dict.type.sys_DonationStatus"
|
:key="dict.value"
|
:label="dict.label"
|
:value="dict.value"
|
/>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="所在医疗机构" prop="treatmenthospitalname">
|
<el-input
|
v-model="queryParams.treatmenthospitalname"
|
placeholder="请输入所在医疗机构"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="捐献者编号" prop="donorno">
|
<el-input
|
v-model="queryParams.donorno"
|
placeholder="请输入捐献者编号"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="报告人姓名" prop="reportername">
|
<el-input
|
v-model="queryParams.reportername"
|
placeholder="请输入报告人姓名"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
<el-form-item label="报告时间">
|
<el-date-picker
|
v-model="daterangeReporttime"
|
size="small"
|
style="width: 240px"
|
value-format="yyyy-MM-dd"
|
type="daterange"
|
range-separator="-"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item>
|
<el-button
|
type="primary"
|
icon="el-icon-search"
|
size="mini"
|
@click="handleQuery"
|
>搜索</el-button
|
>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
>重置</el-button
|
>
|
</el-form-item>
|
</el-form>
|
<el-table
|
v-loading="loading"
|
:data="donatebaseinfoList"
|
>
|
<el-table-column label="报告时间" align="center" prop="id" />
|
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column
|
label="省(区/市)"
|
align="center"
|
prop="residenceprovince"
|
/>
|
<el-table-column label="记录状态" align="center" prop="recordstate" />
|
<el-table-column
|
label="所在医疗机构"
|
align="center"
|
prop="treatmenthospitalname"
|
/>
|
<el-table-column label="报告人" align="center" prop="reportername" />
|
<el-table-column
|
label="报告时间"
|
align="center"
|
prop="reporttime"
|
width="180"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="操作"
|
align="center"
|
class-name="small-padding fixed-width"
|
width="220"
|
>
|
<template slot-scope="scope">
|
<el-button v-if="scope.row.recordstate == 1"
|
size="mini"
|
type="text"
|
icon="el-icon-coordinate"
|
@click="showDonationEvaluationDialog(scope.row)"
|
>捐献评估
|
</el-button>
|
<el-button v-else-if="scope.row.recordstate == 2 || scope.row.recordstate == 3"
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
@click="getDonationEvaluation(scope.row)"
|
>评估编辑
|
</el-button>
|
<el-button v-else
|
size="mini"
|
type="warning"
|
>无法评估
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
|
<!-- 医学捐献评估弹窗 -->
|
<el-dialog :title="title" :visible.sync="open" :fullscreen="true" width="800px" append-to-body>
|
<el-form ref="form" :model="form" :rules="rules" label-width="160px">
|
<el-form-item label="捐献者编号" prop="donorno">
|
<el-input v-model="form.donorno" placeholder="请输入捐献者编号" :disabled="true" />
|
</el-form-item>
|
<el-form-item label="流程名称" prop="flowname">
|
<el-input v-model="form.flowname" placeholder="请输入流程名称" :disabled="true" />
|
</el-form-item>
|
<el-form-item label="流程附件">
|
<fileUpload :on-preview="handlePreview" v-model="form.flowannex"/>
|
</el-form-item>
|
<el-form-item label="流程内容">
|
<el-input v-model="form.flowcontent" type="textarea" placeholder="请输入内容" />
|
</el-form-item>
|
<el-form-item label="是否符合捐献评估条件">
|
<el-radio-group v-model="form.flowconclusion">
|
<el-radio
|
v-for="dict in dict.type.sys_0_1"
|
:key="dict.value"
|
:label="parseInt(dict.value)"
|
>{{dict.label}}</el-radio>
|
</el-radio-group>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
</div>
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
<script>
|
import {
|
listDonatebaseinfo,
|
getDonatebaseinfo,
|
|
} from "@/api/project/donatebaseinfo";
|
import {
|
addDonateflowchart,
|
listDonateflowchart,
|
updateDonateflowchart
|
} from "@/api/project/DonationEvaluation";
|
import Li_area_select from '@/components/Address'
|
export default {
|
components: {
|
Li_area_select
|
},
|
name: "DonateEvaluation",
|
dicts: [
|
"sys_user_sex",
|
"sys_IDType",
|
"sys_AgeUnit",
|
"sys_BloodType",
|
"sys_0_1",
|
"sys_patientstate",
|
"sys_DonationCategory",
|
"sys_Kinship",
|
"sys_Infectious",
|
"sys_InfoSources",
|
"sys_OtherCases",
|
"sys_DonationStatus",
|
"sys_DiseaseType",
|
"sys_SelfWill",
|
"sys_FamilyRelation",
|
],
|
data() {
|
return {
|
//省市区
|
//默认值设置,可为空
|
defultAddress:{
|
sheng: '浙江省',
|
shi: '',
|
qu: '',
|
},
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 捐献基础表格数据
|
donatebaseinfoList: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 获取组织名称时间范围
|
daterangeReporttime: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
name: null,
|
idcardno: null,
|
residenceprovince: null,
|
recordstate: null,
|
treatmenthospitalname: null,
|
donorno: null,
|
reportername: null,
|
reporttime: null,
|
},
|
// 表单参数
|
form: {
|
id: null,
|
infoid: null,
|
donorno: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
flowname: null,
|
flowannex: null,
|
flowcontent: null,
|
flowconclusion: 0
|
},
|
// 表单校验
|
rules: {},
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
/** 查询捐献基础列表 */
|
getList() {
|
this.loading = true;
|
this.queryParams.params = {};
|
if (null != this.daterangeReporttime && "" != this.daterangeReporttime) {
|
this.queryParams.params["beginReporttime"] =
|
this.daterangeReporttime[0];
|
this.queryParams.params["endReporttime"] = this.daterangeReporttime[1];
|
}
|
listDonatebaseinfo(this.queryParams).then((response) => {
|
this.donatebaseinfoList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
id: null,
|
infoid: null,
|
donorno: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
flowname: null,
|
flowannex: null,
|
flowcontent: null,
|
flowconclusion: 0
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.daterangeReporttime = [];
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.reset();
|
const id = row.id || this.ids;
|
getDonatebaseinfo(id).then((response) => {
|
this.form = response.data;
|
this.form.diseasetype = this.form.diseasetype.split(",");
|
this.form.infectious = this.form.infectious.split(",");
|
this.form.othercases = this.form.othercases.split(",");
|
this.form.kinship = this.form.kinship.split(",");
|
this.form.infosources = this.form.infosources.split(",");
|
this.form.patientstate = this.form.patientstate.split(",");
|
this.open = true;
|
this.title = "修改捐献基础";
|
});
|
},
|
/** 医学捐献评估弹窗 */
|
showDonationEvaluationDialog(dontateInfo){
|
//console.log(dontateInfo);
|
this.reset();
|
this.open = true;
|
this.form.donorno = dontateInfo.donorno;
|
this.form.infoid = dontateInfo.id;
|
this.form.flowname = "医学捐献评估";
|
this.title = "医学捐献评估新增";
|
},
|
/** 保存捐献评估 */
|
submitForm() {
|
this.$refs["form"].validate(valid => {
|
if (valid) {
|
if (this.form.id != null) {
|
updateDonateflowchart(this.form).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
this.getList();
|
});
|
} else {
|
addDonateflowchart(this.form).then(response => {
|
this.$modal.msgSuccess("新增成功");
|
this.open = false;
|
this.getList();
|
});
|
}
|
}
|
});
|
},
|
/** 获取捐献评估 */
|
getDonationEvaluation(dontateInfo){
|
//this.loading = true;
|
let queryParam = {
|
donorno:dontateInfo.id,
|
flowname:"医学捐献评估"
|
};
|
console.log(queryParam);
|
listDonateflowchart(queryParam).then(response => {
|
console.log('获取医学评估',response);
|
let evaluationList = response.rows;
|
if(evaluationList.length == 1){
|
this.form = evaluationList[0];
|
this.open = true;
|
this.title = "修改医学捐献评估";
|
}
|
else if(evaluationList.length == 0){
|
this.$modal.msgError("数据不存在");
|
}
|
else{
|
this.$modal.msgError("数据重复");
|
}
|
});
|
},
|
/** 判断新增或是编辑 */
|
checkEditOrAdd(dontateInfo){
|
if(dontateInfo.recordstate == 1){
|
return true;
|
}
|
else{
|
return false
|
}
|
},
|
handlePreview(file) {
|
console.log(file);
|
}
|
},
|
};
|
</script>
|