<template>
|
<div class="app-container">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
:inline="true"
|
v-show="showSearch"
|
>
|
<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="treatmenthospitalno"
|
>
|
<org-selecter
|
ref="orgSelecter"
|
:org-type="'3'"
|
v-model="queryParams.treatmenthospitalno"
|
/>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<el-form-item label="捐献地市">
|
<el-select v-model="queryParams.city" placeholder="请选择地市">
|
<el-option
|
v-for="item in provinceData"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
|
<el-col :span="6">
|
<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-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="报告人">
|
<el-select v-model="queryParams.reportername" placeholder="请选择报告人">
|
<el-option
|
v-for="item in reportlist"
|
:key="item.index"
|
:label="item.reportername"
|
:value="item.reportername"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="报告日期">
|
<el-date-picker
|
style="width: 100%"
|
v-model="selecttime"
|
type="monthrange"
|
range-separator="至"
|
start-placeholder="开始月份"
|
end-placeholder="结束月份"
|
value-format="yyyy-MM-dd"
|
@change="getTimeList"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<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-table
|
v-loading="loading"
|
:data="donatebaseinfoList"
|
@selection-change="handleSelectionChange"
|
border
|
>
|
<el-table-column
|
label="报告时间"
|
align="center"
|
prop="reporttime"
|
width="100"
|
>
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="姓名" align="center" prop="name" width="100" />
|
|
<el-table-column label="性别" align="center" prop="sex" width="100">
|
<template slot-scope="scope">
|
<dict-tag
|
:options="dict.type.sys_user_sex"
|
:value="parseInt(scope.row.sex)"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column label="年龄" align="center" prop="age" width="100" />
|
<el-table-column
|
label="现所在地市"
|
align="center"
|
prop="registercityname"
|
width="150"
|
/>
|
<el-table-column
|
label="医疗机构"
|
align="center"
|
prop="treatmenthospitalname"
|
/>
|
|
<el-table-column
|
label="报告人"
|
align="center"
|
prop="reportername"
|
width="100"
|
/>
|
|
<el-table-column label="捐献进度" align="center" prop="recordstate">
|
<template slot-scope="scope">
|
<dict-tag
|
:options="dict.type.sys_DonationStatus"
|
:value="scope.row.recordstate"
|
/>
|
</template>
|
</el-table-column>
|
|
<el-table-column
|
label="操作"
|
align="center"
|
class-name="small-padding fixed-width"
|
width="160"
|
fixed="right"
|
>
|
<template slot-scope="scope">
|
<el-button
|
v-if="
|
scope.row.recordstate == 12 ||
|
scope.row.recordstate == 13 ||
|
scope.row.recordstate == 14
|
"
|
size="mini"
|
type="text"
|
icon="el-icon-thumb"
|
@click="getReview(scope.row)"
|
>审核</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="reviewTitle"
|
:visible.sync="isShowReviewDialog"
|
width="1100px"
|
append-to-body
|
>
|
|
<div slot="footer" class="dialog-footer">
|
<el-button type="primary" @click="saveReview">确 定</el-button>
|
<el-button @click="hideReviewDialog">取 消</el-button>
|
</div>
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-row>
|
<el-col :span="8">
|
<el-form-item label="捐献编号" prop="donorno">
|
<el-input
|
disabled
|
v-model="curCase.donorno"
|
placeholder="请输入捐献者编号"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="姓名" prop="name">
|
<el-input
|
disabled
|
v-model="curCase.name"
|
placeholder="请输入捐献者姓名"
|
/>
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item label="完成时间" prop="completetime">
|
<el-date-picker
|
style="width: 167px"
|
clearable
|
size="small"
|
v-model="form.completetime"
|
type="date"
|
value-format="yyyy-MM-dd hh:mm:ss"
|
placeholder="选择完成时间"
|
>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-form-item label="器官组织">
|
<el-checkbox-group align="left" v-model="form.donateorganList">
|
<el-checkbox
|
v-for="dict in dict.type.sys_Organ"
|
:key="dict.value"
|
:label="dict.value"
|
disabled
|
>
|
{{ dict.label }}
|
</el-checkbox>
|
</el-checkbox-group>
|
</el-form-item>
|
</el-row>
|
<el-row style="margin-bottom: 22px">
|
<el-table v-loading="loading" border :data="tableData">
|
<el-table-column
|
label="器官名称"
|
align="center"
|
prop="organname"
|
width="80"
|
/>
|
<el-table-column
|
label="移植医院(接收单位)"
|
align="center"
|
prop="transplanthospitalno"
|
width="240"
|
>
|
<template slot-scope="scope">
|
<org-selecter
|
ref="transplanthosselect"
|
:org-type="'4'"
|
v-model="scope.row.transplanthospitalno"
|
/>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="移植负责人"
|
align="center"
|
prop="transplantdoct"
|
width="120"
|
>
|
<template slot-scope="scope">
|
<el-input
|
v-model="scope.row.transplantdoct"
|
placeholder="请输入负责人"
|
></el-input>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="移植日期"
|
align="center"
|
prop="transplanttime"
|
width="230"
|
>
|
<template slot-scope="scope">
|
<el-row>
|
<el-date-picker
|
clearable
|
size="small"
|
style="width: 90%"
|
v-model="scope.row.transplanttime"
|
type="date"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择器官获取时间"
|
>
|
</el-date-picker>
|
</el-row>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="abandonreason"
|
label="弃用原因"
|
align="center"
|
width="260"
|
>
|
<template slot-scope="scope">
|
<el-row>
|
<el-input
|
clearable
|
v-model="scope.row.abandonreason"
|
placeholder="请输入弃用原因"
|
/>
|
</el-row>
|
</template>
|
</el-table-column>
|
|
<el-table-column
|
label="器官状态"
|
align="center"
|
prop="organstate"
|
width="130"
|
>
|
<template slot-scope="scope">
|
<el-select
|
v-model="scope.row.organstate"
|
placeholder="请选择器官状态"
|
value-key="value"
|
@change="selectOrganstate(scope.row)"
|
>
|
<el-option
|
v-for="dict in dict.type.sys_organstate"
|
:key="dict.value"
|
:label="dict.label"
|
:value="dict.value"
|
></el-option>
|
</el-select>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-row>
|
|
<el-row>
|
<el-col :span="7">
|
<el-form-item align="left" label="遗体捐献" prop="isbodydonation">
|
<el-radio-group v-model="form.isbodydonation">
|
<el-radio
|
v-for="dict in dict.type.sys_0_1"
|
:key="dict.value"
|
:label="dict.value"
|
>{{ dict.label }}</el-radio
|
>
|
</el-radio-group>
|
</el-form-item>
|
</el-col>
|
<el-col :span="7">
|
<el-form-item align="left" label="接收单位" prop="receivingunit">
|
<el-input
|
v-model="form.receivingunit"
|
placeholder="请输入接受单位"
|
/>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row>
|
<el-col :span="7">
|
<el-form-item label="负责人" prop="responsibleuserid">
|
<el-select
|
v-model="form.responsibleuserid"
|
placeholder="请选择"
|
>
|
<el-option
|
v-for="item in leaderlist"
|
: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="coordinateduserido">
|
<el-select
|
v-model="form.coordinateduserido"
|
placeholder="请选择"
|
>
|
<el-option
|
v-for="item in coordinatorlist1"
|
: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="coordinateduseridt">
|
<el-select
|
v-model="form.coordinateduseridt"
|
placeholder="请选择"
|
>
|
<el-option
|
v-for="item in coordinatorlist1"
|
:key="item.reportNo"
|
:label="item.reportName"
|
:value="item.reportNo"
|
>
|
</el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<!-- <el-row>
|
<el-form-item align="left" label="附件">
|
<fileUpload v-model="form.assessannex" />
|
</el-form-item>
|
</el-row> -->
|
<el-row>
|
<el-form-item label="附件" align="left" prop="annexfile">
|
<annex-upload
|
ref="finishannex"
|
:infoid="curCase.id"
|
:donorno="curCase.donorno"
|
:flowname="flowname"
|
:annexno="annexno"
|
/>
|
</el-form-item>
|
</el-row>
|
</el-form>
|
|
<el-form
|
ref="reviewForm"
|
:model="reviewForm"
|
:rules="reviewRules"
|
label-width="120px"
|
>
|
<el-form-item label="流程名称" prop="flowname">
|
<el-input
|
v-model="reviewForm.flowname"
|
placeholder="请输入流程名称"
|
disabled
|
/>
|
</el-form-item>
|
<el-form-item label="审核意见" prop="flowcontent">
|
<el-input
|
v-model="reviewForm.flowcontent"
|
type="textarea"
|
placeholder="请输入审核意见"
|
/>
|
</el-form-item>
|
<el-form-item label="流程结论">
|
<el-radio-group v-model="reviewForm.flowconclusion">
|
<el-radio
|
v-for="dict in dict.type.sys_review_status"
|
: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> -->
|
</el-dialog>
|
|
|
|
|
|
</div>
|
</template>
|
<style scoped>
|
</style>
|
<script>
|
import {
|
listDonatebaseinfo,
|
getDonatebaseinfo,
|
delDonatebaseinfo,
|
addDonatebaseinfo,
|
updateDonatebaseinfo,
|
exportDonatebaseinfo,
|
// exportProvincemessage,
|
} from "@/api/project/donatebaseinfo";
|
import {
|
listDonateflowchart,
|
getDonateflowchart,
|
delDonateflowchart,
|
addDonateflowchart,
|
updateDonateflowchart,
|
exportDonateflowchart,
|
} from "@/api/project/DonationEvaluation";
|
import AnnexUpload from "@/views/project/components/annexupload";
|
|
import Li_area_select from "@/components/Address";
|
import OrgSelecter from "@/views/project/components/orgselect";
|
import {
|
listDonateorgan,
|
addDonateorgan,
|
delDonateorgan,
|
updateDonateorgan,
|
getDonateorgan,
|
} from "@/api/project/donateorgan";
|
import {
|
listOrganization,
|
listReportname,
|
listUser,
|
} from "@/api/project/organization";
|
import {
|
getDonatecompletioninfo,
|
listnewDonatecompletioninfo,
|
addDonatecompletioninfo,
|
updateDonatecompletioninfo,
|
listDonatecompletioninfo,
|
downloadcompletioninfo,
|
} from "@/api/project/donatecompletioninfo";
|
export default {
|
components: {
|
Li_area_select,
|
OrgSelecter,
|
AnnexUpload,
|
},
|
name: "Donatebaseinfo",
|
dicts: [
|
"sys_nation",
|
"country",
|
"sys_user_sex",
|
"sys_OrganizationType",
|
"sys_HospitalNature",
|
"sys_RegionalLevel",
|
"country",
|
"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",
|
"sys_Organ",
|
"sys_organstate",
|
"sys_0_1",
|
"sys_DonationStatus",
|
"sys_review_status",
|
],
|
data() {
|
return {
|
curCase: {
|
donorno: "",
|
name: "",
|
registerAddresss: "",
|
infoid: "",
|
id:"",
|
},
|
approvalState: false,
|
countyname: "",
|
cuuntry: "",
|
annexno: "",
|
tableData: [],
|
//省市区
|
//默认值设置,可为空
|
searchAddress: {
|
sheng: "",
|
shi: "",
|
qu: "",
|
organizationname: null,
|
},
|
residenceAddresss: {
|
sheng: "浙江省",
|
shi: "",
|
qu: "",
|
},
|
registerAddresss: {
|
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,
|
donorno: null,
|
recordstate: "13",
|
// treatmenthospitalno: null,
|
treatmenthospitalname: null,
|
name: null,
|
residenceprovince: null,
|
residencecity: null,
|
residencetown: null,
|
starttime: null,
|
endtime: null,
|
city: null,
|
reportno: null,
|
// organizationname: null,
|
// organizationtype: null,
|
// idcardno: null,
|
// reporterno: null,
|
// reporttime: null,
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {},
|
|
|
//负责人
|
leaderlist: [],
|
//协调员一
|
coordinatorlist1: [],
|
//协调员二
|
coordinatorlist2: [],
|
//是否显示保存按钮
|
loading: true,
|
// 导出遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 捐献基础表格数据
|
donatebaseinfoList: [],
|
// 弹出层标题
|
title: "",
|
exportLoading: false,
|
//审核弹窗标题
|
reviewTitle: "捐献完成审核",
|
|
showSaveBtn: true,
|
//是否显示审核弹窗
|
isShowReviewDialog: false,
|
reviewRules: {},
|
reviewForm: {},
|
flowname: "捐献完成审核",
|
|
starttime: "",
|
endtime: "",
|
selecttime: "",
|
reportlist: [],
|
reportervalue: "",
|
|
provinceData: [
|
{ label: "全部", value: "" },
|
{ label: "杭州市", value: "1" },
|
{ label: "宁波市", value: "2" },
|
{ label: "温州市", value: "3" },
|
{ label: "嘉兴市", value: "4" },
|
{ label: "湖州市", value: "5" },
|
{ label: "绍兴市", value: "6" },
|
{ label: "金华市", value: "7" },
|
{ label: "衢州市", value: "8" },
|
{ label: "舟山市", value: "9" },
|
{ label: "台州市", value: "A" },
|
{ label: "丽水市", value: "B" },
|
],
|
};
|
},
|
created() {
|
// this.getDicts('country').then(res=>{
|
// this.nationality =res.data
|
// })
|
},
|
mounted() {
|
this.LoadReportList();
|
this.getList();
|
this.getLeaderList();
|
this.getCoordinatorList1();
|
},
|
methods: {
|
getCoordinatorList1() {
|
listReportname("xty1").then((res) => {
|
this.coordinatorlist1 = res.data;
|
});
|
},
|
getLeaderList() {
|
listReportname("fzr").then((res) => {
|
this.leaderlist = res.data;
|
});
|
},
|
handlesee(row){
|
console.log('row',row);
|
this.loading = true;
|
this.reset();
|
this.curCase.registerAddresss = row.registeraddresss;
|
this.curCase.donorno = row.donorno;
|
this.curCase.name = row.name;
|
this.curCase.infoid = row.id;
|
this.curCase.id = row.id;
|
this.open = true;
|
this.title = "修改捐献完成登记表";
|
this.curdonotor = row;
|
//查询
|
let searchParam = {
|
donorno: row.donorno,
|
};
|
let oraganqueryParam = {
|
// donorname: this.curCase.name,
|
// donorno: this.curCase.donorno,
|
// registeraddress: this.curCase.registeraddresss,
|
infoid:this.curCase.id
|
};
|
listDonateorgan(oraganqueryParam).then((response) => {
|
if (response.code == 200) {
|
console.log('2',response)
|
this.tableData = response.rows;
|
} else {
|
this.$modal.msgError("获取捐献器官失败:" + response.msg);
|
}
|
this.loading = false;
|
//获取器官分配信息
|
// this.GetDonortedList();
|
});
|
listnewDonatecompletioninfo(searchParam).then((response) => {
|
if (response.code == 200 && response.rows.length == 1) {
|
this.open = true;
|
this.form = response.rows[0];
|
console.log("update", this.form.donateorgan);
|
this.form.donateorganList = JSON.parse(this.form.donateorgan);
|
console.log("update2", this.form.donateorganList);
|
} else {
|
this.$modal.msgError(
|
"获取捐献完成登记记录错误:" + JSON.stringify(response)
|
);
|
}
|
this.loading = false;
|
});
|
// getDonatebaseinfo(row.id).then(res=>{
|
// console.log('潜在信息',res)
|
// })
|
// getDonateflowchart(row.id).then(res=>{
|
// console.log('捐献完成的审核',res)
|
// })
|
},
|
handleapproval(row) {
|
this.$confirm("是否确认将案例完成记录审核?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
})
|
.then(() => {
|
row.recordstate = 14;
|
updateDonatebaseinfo(row).then((response) => {
|
this.$message({
|
type: "success",
|
message: "审核成功",
|
});
|
this.getList();
|
});
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "已取消审核",
|
});
|
});
|
},
|
handlerefuse(row) {
|
this.$confirm("是否拒绝案例完成记录审核?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
})
|
.then(() => {
|
row.recordstate = 15;
|
updateDonatebaseinfo(row).then((response) => {
|
this.$message({
|
type: "success",
|
message: "拒绝成功",
|
});
|
this.getList();
|
});
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "已取消审核",
|
});
|
});
|
},
|
updateMessage() {},
|
// sheng: '浙江省',
|
// shi: '',
|
// qu: '',
|
|
// 身份证验证
|
//根据身份证号自动生成性别、出生日期和年龄
|
inputChange() {
|
const idCard = this.props.form.getFieldValue("idCard");
|
let birthday = "";
|
let sex = "0";
|
if (idCard.length === 15) {
|
birthday = `19${idCard.substring(6, 8)}-${idCard.substring(
|
9,
|
10
|
)}-${idCard.substring(11, 12)}`;
|
sex = idCard[14] % 2 === 0 ? "0" : "1";
|
} else {
|
birthday = `${idCard.substring(6, 10)}-${idCard.substring(
|
11,
|
12
|
)}-${idCard.substring(13, 14)}`;
|
sex = idCard[16] % 2 === 0 ? "0" : "1";
|
}
|
this.setState({
|
birthday,
|
sex,
|
});
|
},
|
|
/** 查询捐献基础列表 */
|
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];
|
}
|
this.queryParams.params = {};
|
// if (null != this.daterangeReporttime && "" != this.daterangeReporttime) {
|
// this.queryParams.params["beginReporttime"] =
|
// this.daterangeReporttime[0];
|
// this.queryParams.params["endReporttime"] = this.daterangeReporttime[1];
|
// }
|
// this.queryParams.residenceprovince = this.$refs.areaSelect.getSheng();
|
// this.queryParams.residencecity = this.$refs.areaSelect.getShi();
|
// this.queryParams.residencetown = this.$refs.areaSelect.getQu();
|
if (this.starttime != "") {
|
this.queryParams.starttime = this.starttime;
|
} else {
|
this.queryParams.starttime = "";
|
}
|
if (this.endtime != "") {
|
this.queryParams.endtime = this.endtime;
|
} else {
|
this.queryParams.endtime = "";
|
}
|
// this.queryParams.residenceprovince = this.$refs.areaSelect.getSheng();
|
// this.queryParams.residencecity = this.$refs.areaSelect.getShi();
|
// this.queryParams.residencetown = this.$refs.areaSelect.getQu();
|
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,
|
name: null,
|
sex: null,
|
idcardtype: null,
|
idcardno: null,
|
age: null,
|
ageunit: null,
|
birthday: null,
|
phone: null,
|
residenceaddress: null,
|
nationality: null,
|
nativeplace: null,
|
residenceprovince: null,
|
nation: null,
|
residenceprovincename: null,
|
occupation: null,
|
residencecity: null,
|
education: null,
|
residencecityname: null,
|
residencetown: null,
|
residencetownname: null,
|
residencecommunity: null,
|
residencecommunityname: null,
|
residencecountycode: null,
|
residencecountyname: null,
|
registeraddress: null,
|
registerprovince: null,
|
registerprovincename: null,
|
registercity: null,
|
registercityname: null,
|
registertown: null,
|
registertownname: null,
|
registercommunity: null,
|
registercommunityname: null,
|
registercountycode: null,
|
registercountyname: null,
|
recordstate: null,
|
treatmenthospitalno: null,
|
treatmenthospitalname: null,
|
treatmentdeptname: null,
|
diagnosisno: null,
|
diagnosisname: null,
|
bloodtype: "0",
|
inpatientno: null,
|
rhyin: 0,
|
donorno: null,
|
donationcategory: null,
|
illnessoverview: null,
|
diseasetype: [],
|
infectious: [],
|
selfwill: [],
|
diseasetypeOther: null,
|
othercases: [],
|
kinshipwill: 0,
|
infosources: [],
|
kinship: [],
|
redorganno: null,
|
redorganname: null,
|
contactperson: null,
|
infectiousOther: null,
|
contactnumber: null,
|
reporterno: null,
|
reportername: null,
|
patientstate: [],
|
reporterphone: null,
|
infosourcesOther: null,
|
reporttime: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
kinshipOther: null,
|
majorrelatives: null,
|
familyrelations: null,
|
acquisitiontissueno: null,
|
acquisitiontissuename: null,
|
};
|
this.resetForm("form");
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.pageNum = 1;
|
this.getList();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.daterangeReporttime = [];
|
this.queryParams = {
|
doname: null,
|
pageNum: 1,
|
pageSize: 10,
|
name: null,
|
idcardno: null,
|
residenceprovince: null,
|
residencecity: null,
|
residencetown: null,
|
// "2"
|
recordstate: null,
|
treatmenthospitalname: null,
|
donorno: null,
|
acquisitiontissueno: null,
|
reportername: null,
|
reporttime: null,
|
city: null,
|
treatmenthospitalno: null,
|
createBy: null,
|
};
|
this.selecttime = [];
|
this.getTimeList();
|
this.searchAddress = {
|
sheng: "",
|
shi: "",
|
qu: "",
|
organizationname: null,
|
};
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
// 多选框选中数据
|
handleSelectionChange(selection) {
|
this.ids = selection.map((item) => item.id);
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
/** 新增按钮操作 */
|
handleAdd() {
|
this.reset();
|
this.showSaveBtn = true;
|
this.open = true;
|
this.title = "人体器官潜在捐献者登记表";
|
},
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
this.reset();
|
this.showSaveBtn = true;
|
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.selfwill = this.form.selfwill.split(",");
|
this.form.othercases = this.form.othercases.split(",");
|
this.form.infosources = this.form.infosources.split(",");
|
this.form.kinship = this.form.kinship.split(",");
|
this.form.patientstate = this.form.patientstate.split(",");
|
this.open = true;
|
this.title = "修改捐献基础";
|
|
this.registerAddresss.sheng = response.data.registerprovincename;
|
this.residenceAddresss.sheng = response.data.residenceprovincename;
|
this.registerAddresss.shi = response.data.registercityname;
|
this.residenceAddresss.shi = response.data.residencecityname;
|
this.residenceAddresss.qu = response.data.residencetownname;
|
this.registerAddresss.qu = response.data.registertownname;
|
});
|
},
|
handleShow(row) {
|
this.reset();
|
this.showSaveBtn = false;
|
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.selfwill = this.form.selfwill.split(",");
|
this.form.othercases = this.form.othercases.split(",");
|
this.form.infosources = this.form.infosources.split(",");
|
this.form.kinship = this.form.kinship.split(",");
|
this.form.patientstate = this.form.patientstate.split(",");
|
this.open = true;
|
this.title = "查看捐献基础";
|
|
this.registerAddresss.sheng = response.data.registerprovincename;
|
this.residenceAddresss.sheng = response.data.residenceprovincename;
|
this.registerAddresss.shi = response.data.registercityname;
|
this.residenceAddresss.shi = response.data.residencecityname;
|
this.residenceAddresss.qu = response.data.residencetownname;
|
this.registerAddresss.qu = response.data.registertownname;
|
});
|
},
|
/** 提交按钮 */
|
submitForm() {
|
this.$refs["form"].validate((valid) => {
|
if (valid) {
|
this.form.diseasetype = this.form.diseasetype.join(",");
|
this.form.infectious = this.form.infectious.join(",");
|
this.form.selfwill = this.form.selfwill.join(",");
|
this.form.othercases = this.form.othercases.join(",");
|
this.form.infosources = this.form.infosources.join(",");
|
this.form.kinship = this.form.kinship.join(",");
|
this.form.patientstate = this.form.patientstate.join(",");
|
this.form.registerprovince = this.$refs.registerSelect.getSheng();
|
this.form.registerprovincename = this.registerAddresss.sheng;
|
|
this.form.residenceprovince = this.$refs.residenceSelect.getSheng();
|
this.form.residenceprovincename = this.residenceAddresss.sheng;
|
|
this.form.registercity = this.$refs.registerSelect.getShi();
|
this.form.registercityname = this.registerAddresss.shi;
|
|
this.form.residencecity = this.$refs.residenceSelect.getShi();
|
this.form.residencecityname = this.residenceAddresss.shi;
|
|
this.form.residencetown = this.$refs.residenceSelect.getQu();
|
this.form.residencetownname = this.residenceAddresss.qu;
|
|
this.form.registertown = this.$refs.registerSelect.getQu();
|
this.form.registertownname = this.registerAddresss.qu;
|
this.form.recordstate = 0;
|
console.log(JSON.stringify(this.form));
|
if (this.form.id != null) {
|
updateDonatebaseinfo(this.form).then((response) => {
|
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
this.getList();
|
// console.log("修改成功")
|
});
|
} else {
|
addDonatebaseinfo(this.form).then((response) => {
|
if (response.code == 200) {
|
this.$modal.msgSuccess("新增成功");
|
this.open = false;
|
this.getList();
|
} else {
|
this.$modal.msgError("新增失败:" + response.msg);
|
}
|
// console.log("新增成功")
|
});
|
}
|
}
|
});
|
},
|
/** 删除按钮操作 */
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal
|
.confirm('是否确认删除捐献基础编号为"' + ids + '"的数据项?')
|
.then(function () {
|
return delDonatebaseinfo(ids);
|
})
|
.then(() => {
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
})
|
.catch(() => {});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
const queryParams = this.queryParams;
|
this.$modal
|
.confirm("是否确认导出所有捐献基础数据项?")
|
.then(() => {
|
this.exportLoading = true;
|
return exportDonatebaseinfo(queryParams);
|
})
|
.then((response) => {
|
this.$download.name(response.msg);
|
this.exportLoading = false;
|
})
|
.catch(() => {});
|
},
|
|
//重置审核from
|
resetReviewForm() {
|
this.reviewForm = {
|
id: null,
|
infoid: null,
|
donorno: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
flowname: null,
|
flowannex: null,
|
flowcontent: null,
|
flowconclusion: 1,
|
};
|
this.resetForm("reviewForm");
|
},
|
//显示审核dialog
|
showReviewDialog(row) {
|
// this.curCase = row;
|
// console.log(JSON.stringify(this.curCase));
|
this.resetReviewForm();
|
this.reviewForm.infoid = row.id;
|
this.reviewForm.donorno = row.donorno;
|
this.reviewForm.flowname = this.flowname;
|
this.isShowReviewDialog = true;
|
},
|
//隐藏审核dialog
|
hideReviewDialog() {
|
this.isShowReviewDialog = false;
|
},
|
//保存审核
|
saveReview() {
|
this.$refs["reviewForm"].validate((valid) => {
|
if (valid) {
|
//判断审查意见录入
|
console.log("exp", this.reviewForm.flowconclusion);
|
if (this.reviewForm.flowconclusion == 0) {
|
var exp = this.reviewForm.flowcontent;
|
console.log("exp", exp);
|
if (typeof exp == "undefined" || exp == null || exp == "") {
|
this.$modal.msgError("请输入审核意见!");
|
return;
|
}
|
}
|
//判断是否是新纪录
|
if (this.reviewForm.id != null) {
|
updateDonateflowchart(this.reviewForm).then((response) => {
|
//将状态改为已审核
|
if (this.reviewForm.flowconclusion == 1) {
|
this.curCase.recordstate = 14;
|
} else {
|
this.curCase.recordstate = 15;
|
}
|
console.log(JSON.stringify(this.curCase));
|
updateDonatebaseinfo(this.curCase).then((response) => {
|
this.$modal.msgSuccess("审核成功");
|
this.isShowReviewDialog = false;
|
this.getList();
|
});
|
});
|
} else {
|
addDonateflowchart(this.reviewForm).then((response) => {
|
//将状态改为已审核
|
if (this.reviewForm.flowconclusion == 1) {
|
this.curCase.recordstate = 10;
|
} else {
|
this.curCase.recordstate = 8;
|
}
|
updateDonatebaseinfo(this.curCase).then((response) => {
|
this.$modal.msgSuccess("审核成功");
|
this.isShowReviewDialog = false;
|
this.getList();
|
});
|
});
|
}
|
}
|
});
|
},
|
//获取审核
|
getReview(row) {
|
this.curCase = row;
|
let searchParam = {
|
donorno: row.donorno,
|
flowname: this.flowname,
|
};
|
listDonateflowchart(searchParam).then((response) => {
|
this.handlesee(row);
|
if (response.code == 200) {
|
if (response.rows.length == 0) {
|
this.resetReviewForm();
|
this.reviewForm.infoid = row.id;
|
this.reviewForm.donorno = row.donorno;
|
this.reviewForm.flowname = this.flowname;
|
this.isShowReviewDialog = true;
|
} else if (response.rows.length == 1) {
|
this.reviewForm = response.rows[0];
|
this.reviewForm.infoid = row.id;
|
this.reviewForm.donorno = row.donorno;
|
this.reviewForm.flowname = this.flowname;
|
this.isShowReviewDialog = true;
|
}
|
} else {
|
}
|
});
|
},
|
|
LoadReportList() {
|
listDonatebaseinfo().then((res) => {
|
let list = res.rows;
|
let reportlist = [];
|
reportlist.push({ reporterno: "", reportername: "全部" });
|
list.forEach((element) => {
|
reportlist.push({
|
reporterno: element.reporterno,
|
reportername: element.reportername,
|
});
|
});
|
if (reportlist != 0) {
|
reportlist = this.resetArr(reportlist);
|
this.reportlist = reportlist;
|
}
|
});
|
},
|
|
getTimeList(e) {
|
console.log(this.selecttime);
|
if (this.selecttime != null) {
|
if (this.selecttime != 0) {
|
this.endtime = this.selecttime[1];
|
this.starttime = this.selecttime[0];
|
// if (this.endtime == this.starttime) {
|
let num = Number(this.endtime.slice(5, 7));
|
if (num < 9) {
|
let mon = Number(this.endtime.slice(6, 7));
|
this.endtime =
|
this.endtime.slice(0, 5) +
|
"0" +
|
(mon + 1) +
|
"-" +
|
"01" +
|
" " +
|
"00" +
|
":" +
|
"00" +
|
":" +
|
"00";
|
}
|
// this.endtime=this.endtime.slice(0,5)年
|
else if (num >= 10) {
|
this.endtime =
|
this.endtime.slice(0, 5) +
|
(num + 1) +
|
"-" +
|
"01" +
|
" " +
|
"00" +
|
":" +
|
"00" +
|
":" +
|
"00";
|
} else {
|
this.endtime =
|
this.endtime.slice(0, 5) +
|
"10" +
|
"-" +
|
"01" +
|
" " +
|
"00" +
|
":" +
|
"00" +
|
":" +
|
"00";
|
}
|
this.starttime =
|
this.starttime + " " + "00" + ":" + "00" + ":" + "00";
|
// }
|
} else {
|
this.starttime = "1998-01-01 00:00:00";
|
this.endtime = "2998-01-01 00:00:00";
|
}
|
} else {
|
this.starttime = "1998-01-01 00:00:00";
|
this.endtime = "2998-01-01 00:00:00";
|
}
|
},
|
|
|
resetArr(Arr) {
|
var hash = {};
|
Arr = Arr.reduce(function (arr, current) {
|
hash[current.reporterno]
|
? ""
|
: (hash[current.reporterno] = true && arr.push(current));
|
return arr;
|
}, []);
|
return Arr;
|
},
|
|
// 对象转成指定字符串分隔
|
listToString(list, separator) {
|
let strs = "";
|
separator = separator || ",";
|
for (let i in list) {
|
strs += list[i] + separator;
|
}
|
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
},
|
//字符串根据指定字符串分隔
|
stringToList(str, separator) {
|
separator = separator || ",";
|
let tempList = [];
|
if (str != null && str != undefined && str != "") {
|
tempList = str.split(separator);
|
}
|
return tempList;
|
},
|
},
|
};
|
</script>
|