<template>
|
<div class="app-container">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
:inline="true"
|
v-show="showSearch"
|
label-width="70px"
|
>
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="姓名" prop="name">
|
<el-input
|
v-model="queryParams.name"
|
placeholder="请输入姓名"
|
clearable
|
size="small"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<!-- 查询没有 -->
|
<el-form-item align="left" label="移植医院" prop="hospitalno">
|
<org-selecter
|
ref="orgSelecter"
|
:org-type="'3'"
|
v-model="queryParams.hospitalno"
|
@keyup.enter.native="handleQuery"
|
/>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="8">
|
<el-form-item label="随访时间" prop="followuptime">
|
<el-date-picker
|
clearable
|
size="small"
|
v-model="queryParams.followuptime"
|
type="daterange"
|
range-separator="至"
|
start-placeholde="起始日期"
|
end-placeholde="结束日期"
|
value-format="yyyy-MM-dd"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="4">
|
<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-col>
|
</el-row>
|
|
|
</el-form>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button
|
type="primary"
|
plain
|
icon="el-icon-plus"
|
size="mini"
|
@click="handleAdd"
|
v-hasPermi="['project:donatefollowup:add']"
|
>新增</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button
|
type="success"
|
plain
|
icon="el-icon-edit"
|
size="mini"
|
:disabled="single"
|
@click="handleUpdate"
|
v-hasPermi="['project:donatefollowup:edit']"
|
>修改</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button
|
type="danger"
|
plain
|
icon="el-icon-delete"
|
size="mini"
|
:disabled="multiple"
|
@click="handleDelete"
|
v-hasPermi="['project:donatefollowup:remove']"
|
>删除</el-button
|
>
|
</el-col>
|
<el-col :span="1.5">
|
<el-button
|
type="warning"
|
plain
|
icon="el-icon-download"
|
size="mini"
|
:loading="exportLoading"
|
@click="handleExport"
|
v-hasPermi="['project:donatefollowup:export']"
|
>导出</el-button
|
>
|
</el-col>
|
<right-toolbar
|
:showSearch.sync="showSearch"
|
@queryTable="getList"
|
></right-toolbar>
|
</el-row>
|
|
<el-table
|
v-loading="loading"
|
border
|
:data="donatefollowupList"
|
@selection-change="handleSelectionChange"
|
>
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
<el-table-column label="捐献者" width="100" align="center" prop="name" />
|
|
<el-table-column
|
label="器官"
|
width="100"
|
align="center"
|
prop="organname"
|
/>
|
<el-table-column
|
label="捐献医院"
|
align="center"
|
prop="transplanthospitalname"
|
/>
|
<el-table-column
|
label="移植医院"
|
align="center"
|
prop="transplanthospitalname"
|
/>
|
<el-table-column
|
label="移植时间"
|
width="180"
|
align="center"
|
prop="transplanttime"
|
/>
|
|
<el-table-column
|
label="随访移植结果"
|
align="center"
|
prop="donateresult"
|
>
|
<template slot-scope="scope">
|
<dict-tag
|
:options="dict.type.sys_transplantResult"
|
:value="scope.row.donateresult"
|
/>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column
|
label="随访描述"
|
width="200"
|
align="center"
|
prop="followupdescribe"
|
/> -->
|
<el-table-column
|
label="随访时间"
|
align="center"
|
prop="followuptime"
|
width="110"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.followuptime, "{y}-{m}-{d}") }}</span>
|
</template> </el-table-column
|
>
|
<!-- <el-table-column label="录入者" align="center" prop="createby">
|
<template slot-scope="scope" v-if="scope.row.createby != null"
|
><span
|
>{{
|
users.filter(function (item) {
|
return item.username == scope.row.createby;
|
})[0].nickname
|
}}
|
</span></template
|
>
|
</el-table-column>
|
<el-table-column
|
label="录入时间"
|
align="center"
|
prop="createtime"
|
sortable
|
width="120"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.createtime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column> -->
|
<el-table-column
|
label="操作"
|
align="center"
|
fixed="right"
|
width="180"
|
class-name="small-padding fixed-width"
|
>
|
<template slot-scope="scope">
|
<el-button
|
v-if="scope.row.dfid == null"
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
@click="handleAdd(scope.row)"
|
v-hasPermi="['project:donatefollowup:edit']"
|
>添加</el-button
|
>
|
<el-button
|
size="mini"
|
v-if="scope.row.dfid != null"
|
type="text"
|
icon="el-icon-edit"
|
@click="handleUpdate(scope.row)"
|
v-hasPermi="['project:donatefollowup:edit']"
|
>修改</el-button
|
>
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-delete"
|
@click="handleDelete(scope.row)"
|
v-hasPermi="['project:donatefollowup:remove']"
|
>删除</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"
|
align="center"
|
:visible.sync="open"
|
:close-on-click-modal="false"
|
width="1100px"
|
append-to-body
|
>
|
<el-form
|
ref="form"
|
:model="form"
|
:rules="rules"
|
label-width="130px"
|
label-position="right"
|
>
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="捐献编号">
|
<el-input
|
disabled
|
v-model="this.curCase.donorno"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
<el-col :span="7">
|
<el-form-item label="捐献者" prop="followupdescribe">
|
<el-input
|
disabled
|
v-model="this.curCase.name"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
<el-col :span="8">
|
<el-form-item label="捐献医院">
|
<el-input
|
disabled
|
v-model="this.curCase.transplanthospitalname"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="当前器官">
|
<el-input
|
disabled
|
v-model="this.curCase.organname"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
<el-col :span="7">
|
<el-form-item label="移植时间">
|
<el-input
|
disabled
|
v-model="this.curCase.transplanttime"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
<el-col :span="8">
|
<el-form-item label="移植医院">
|
<el-input
|
disabled
|
v-model="this.curCase.transplanthospitalname"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="随访人员" prop="followupno">
|
<el-select v-model="form.followupno" placeholder="请选择">
|
<el-option
|
v-for="item in reporters"
|
:key="item.reportNo"
|
:label="item.reportName"
|
:value="item.reportNo"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="7">
|
<el-form-item label="随访时间" prop="followuptime">
|
<el-date-picker
|
clearable
|
size="small"
|
v-model="form.followuptime"
|
type="date"
|
value-format="yyyy-MM-dd hh:mm:ss"
|
placeholder="选择随访时间"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="移植结果" prop="donateresult">
|
<el-select
|
v-model="form.donateresult"
|
placeholder="请选择捐献结果"
|
>
|
<el-option
|
v-for="dict in dict.type.sys_transplantResult"
|
:key="dict.value"
|
:label="dict.label"
|
:value="dict.value"
|
></el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="15">
|
<el-form-item label="随访说明" prop="followupdescribe">
|
<el-input
|
v-model="form.followupdescribe"
|
placeholder="请输入随访描述"
|
/> </el-form-item
|
></el-col>
|
</el-row>
|
</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 {
|
listnewDonatefollowup,
|
listDonatefollowup,
|
getDonatefollowup,
|
delDonatefollowup,
|
addDonatefollowup,
|
updateDonatefollowup,
|
exportDonatefollowup,
|
} from "@/api/project/donatefollowup";
|
|
import OrgSelecter from "@/views/project/components/orgselect";
|
import ReportName from "@/views/project/components/organizationUser";
|
import {
|
listOrganization,
|
listReportname,
|
listUser,
|
} from "@/api/project/organization";
|
|
export default {
|
components: {
|
OrgSelecter,
|
ReportName,
|
},
|
name: "Donatefollowup",
|
dicts: ["sys_transplantResult"],
|
|
data() {
|
return {
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 捐献随访表格数据
|
donatefollowupList: [],
|
|
//用户表
|
users: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
seqno: null,
|
recipientname: null,
|
hospitalname: null,
|
donateresult: null,
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {},
|
//随访人员
|
reporters: [],
|
curCase: {},
|
};
|
},
|
created() {
|
this.getuserlist();
|
this.getList();
|
|
this.selectReporters();
|
},
|
methods: {
|
/** 查询捐献随访列表 */
|
getList() {
|
this.loading = true;
|
listnewDonatefollowup(this.queryParams).then((response) => {
|
console.log("随访数据", response);
|
this.donatefollowupList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
|
//用户表
|
getuserlist() {
|
listUser().then((res) => {
|
this.users = res.data;
|
});
|
},
|
|
//专职人员
|
selectReporters() {
|
listReportname("zzry").then((res) => {
|
this.reporters = res.data;
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
id: null,
|
seqno: null,
|
infoid: null,
|
organid: null,
|
recipientname: null,
|
recipientphone: null,
|
recipientdesribe: null,
|
hospitalno: null,
|
hospitalname: null,
|
hospitaldept: null,
|
doctorname: null,
|
doctorphone: null,
|
doctordescribe: null,
|
donateresult: null,
|
followupdescribe: null,
|
followupno: null,
|
followuptime: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.ids = selection.map((item) => item.id);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
/** 新增按钮操作 */
|
handleAdd(row) {
|
this.reset();
|
|
this.form.organid = row.id;
|
this.form.infoid = row.infoid;
|
this.curCase.donorno = row.donorno;
|
this.curCase.donorno = row.donorno;
|
this.curCase.name = row.name;
|
this.curCase.transplanthospitalname = row.transplanthospitalname;
|
this.curCase.organname = row.organname;
|
this.curCase.transplanttime = row.transplanttime;
|
|
this.open = true;
|
this.title = "添加捐献随访";
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.curCase.donorno = row.donorno;
|
this.curCase.name = row.name;
|
this.curCase.transplanthospitalname = row.transplanthospitalname;
|
this.curCase.organname = row.organname;
|
this.curCase.transplanttime = row.transplanttime;
|
this.reset();
|
const id = row.dfid || this.ids;
|
getDonatefollowup(id).then((response) => {
|
console.log("修改", response);
|
this.form = response.data;
|
this.open = true;
|
this.title = "修改捐献随访";
|
});
|
},
|
/** 提交按钮 */
|
submitForm() {
|
this.$refs["form"].validate((valid) => {
|
if (valid) {
|
if (this.form.id != null) {
|
updateDonatefollowup(this.form).then((response) => {
|
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
this.getList();
|
});
|
} else {
|
addDonatefollowup(this.form).then((response) => {
|
this.$modal.msgSuccess("新增成功");
|
this.open = false;
|
this.getList();
|
});
|
}
|
}
|
});
|
},
|
/** 删除按钮操作 */
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal
|
.confirm('是否确认删除捐献随访编号为"' + ids + '"的数据项?')
|
.then(function () {
|
return delDonatefollowup(ids);
|
})
|
.then(() => {
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
})
|
.catch(() => {});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
const queryParams = this.queryParams;
|
this.$modal
|
.confirm("是否确认导出所有捐献随访数据项?")
|
.then(() => {
|
this.exportLoading = true;
|
return exportDonatefollowup(queryParams);
|
})
|
.then((response) => {
|
this.$download.name(response.msg);
|
this.exportLoading = false;
|
})
|
.catch(() => {});
|
},
|
},
|
};
|
</script>
|