<template>
|
<div class="app-container">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
|
<el-row :gutter="8">
|
<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 :gutter="8">
|
<el-col :span="6">
|
<el-form-item label="报告人">
|
<el-select v-model="queryParams.reporterno" placeholder="请选择报告人">
|
<el-option v-for="item in reportlist" :key="item.index" :label="item.reportername" :value="item.reporterno">
|
</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-row :gutter="10" class="mb8">
|
|
<el-col :span="1.5">
|
<el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading"
|
@click="handleExport">导出</el-button>
|
</el-col>
|
|
</el-row>
|
<el-table v-loading="loading" :default-sort="{ prop: 'deathtime', order: 'descending' }" border
|
:data="donatebaseinfoList">
|
<el-table-column label="报告时间" align="center" prop="reporttime" width="140">
|
<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="treatmenthospitalname" />
|
<!-- <el-table-column label="身份证号" prop="idcardno" width="200" /> -->
|
<el-table-column label="捐献类别" align="center" prop="dwdonationcategory" width="150">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.sys_DonationCategory" :value="scope.row.dwdonationcategory" />
|
</template>
|
</el-table-column>
|
<el-table-column label="见证时间" align="center" prop="operationbegtime">
|
<template slot-scope="scope">
|
<span>{{ parseTime(scope.row.operationbegtime, "{y}-{m}-{d}") }}</span>
|
</template>
|
</el-table-column>
|
<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="140" fixed="right">
|
<template slot-scope="scope">
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAdd(scope.row)">见证登记</el-button>
|
<!-- <el-button
|
v-if="scope.row.recordstate==2 || scope.row.recordstate==3"
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
@click="submitRecord(scope.row)"
|
v-hasPermi="['project:donatebaseinfo:edit']"
|
>上报伦理审查</el-button> -->
|
<el-button size="mini" type="text" icon="el-icon-refrigerator" @click="handledownload(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="title" align="center" :visible.sync="open" width="1000px" append-to-body
|
:close-on-click-modal="false">
|
<el-form ref="form" style="margin: 0px auto" :model="form" :rules="rules" label-width="120px">
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="捐献编号" prop="donorno">
|
<el-input v-model="curCase.donorno" disabled placeholder="请输入捐献者编号" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item align="left" label="捐献医院" prop="treatmenthospitalname">
|
<org-selecter ref="orgSelecter" :org-type="'3'" v-model="curCase.treatmenthospitalname" disabled />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="6">
|
<el-form-item label="姓名 " prop="name">
|
<el-input v-model="curCase.name" disabled placeholder="请输入捐献者姓名" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="性别" prop="sex">
|
<el-select v-model="curCase.sex" disabled placeholder="请选择性别">
|
<el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
|
:value="dict.value"></el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="出生日期" prop="birthday">
|
<el-date-picker style="width: 95%" clearable v-model="curCase.birthday" type="date"
|
value-format="yyyy:MM:dd" placeholder="选择出生日期" disabled>
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="民族" prop="nation">
|
<el-select v-model="curCase.nation" disabled placeholder="请选择民族">
|
<el-option v-for="dict in dict.type.sys_nation" :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="6">
|
<el-form-item label="证件类型" prop="idcardtype">
|
<el-select v-model="curCase.idcardtype" disabled placeholder="请选择证件类型">
|
<el-option v-for="dict in dict.type.sys_IDType" :key="dict.value" :label="dict.label"
|
:value="parseInt(dict.value)"></el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="证件号码" prop="idcardno">
|
<el-input ref="updateBSvalue" class="sfzcode" v-model="curCase.idcardno" placeholder="请输入证件号码" disabled />
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="学历" prop="education">
|
<el-select v-model="curCase.education" disabled placeholder="请选择学历">
|
<el-option v-for="dict in dict.type.sys_education" :key="dict.value" :label="dict.value"
|
:value="dict.value"></el-option>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="6">
|
<el-form-item label="职业" prop="occupation">
|
<el-select v-model="curCase.occupation" disabled placeholder="请选择职业">
|
<el-option v-for="dict in dict.type.sys_occupation" :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="24">
|
<el-form-item align="left" label="捐献决定">
|
<el-checkbox-group v-model="form.organdonation">
|
<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-col>
|
</el-row>
|
<el-row>
|
<el-col :span="24">
|
<el-form-item align="left" label="捐献类别" prop="donationcategory">
|
<el-radio-group v-model="form.donationcategory">
|
<el-radio v-for="dict in dict.type.sys_DonationCategory" :key="dict.value" :label="dict.value">{{
|
dict.label }}</el-radio>
|
</el-radio-group>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<!-- <el-col :span="6">
|
<el-form-item label="其他" align="left" prop="organdecisionOther">
|
<el-input
|
v-model="form.organdecisionOther"
|
placeholder="请输入其他"
|
/>
|
</el-form-item>
|
</el-col> -->
|
</el-row>
|
<el-row>
|
<el-col :span="2">
|
<el-form-item align="left" label="死亡判定:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="医生一" prop="deathjudgedocto">
|
<el-input v-model="form.deathjudgedocto" placeholder="判定医生姓名" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="医生二" prop="deathjudgedoctt">
|
<el-input v-model="form.deathjudgedoctt" placeholder="判定医生姓名" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row><el-col :span="2"><el-form-item align="left" label="" /> </el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="死亡时间" prop="deathtime">
|
<el-date-picker clearable v-model="form.deathtime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择死亡时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="死亡原因" prop="deathreason">
|
<el-input v-model="form.deathreason" placeholder="请输入死亡原因" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="2">
|
<el-form-item align="left" label="手术:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="开始时间" prop="operationbegtime">
|
<el-date-picker clearable v-model="form.operationbegtime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择手术开始时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item align="left" label="结束时间" prop="operationendtime">
|
<el-date-picker clearable v-model="form.operationendtime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
placeholder="选择手术结束时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row><el-col :span="2"><el-form-item align="left" label="腹主动脉:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="插管时间" align="left" prop="abdominalaortacannulatime">
|
<el-date-picker clearable v-model="form.abdominalaortacannulatime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择腹主动脉插管时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="灌注时间" align="left" prop="abdominalaortaperfusiontime">
|
<el-date-picker clearable v-model="form.abdominalaortaperfusiontime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择腹主动脉灌注时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row><el-col :span="2"><el-form-item align="left" label="门静脉:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="插管时间" align="left" prop="portalveincannulatime">
|
<el-date-picker clearable v-model="form.portalveincannulatime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择门静脉脉插管时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="灌注时间" align="left" prop="portalveinperfusiontime">
|
<el-date-picker clearable v-model="form.portalveinperfusiontime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择门静脉灌注时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row><el-col :span="2"><el-form-item align="left" label="肺动脉:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="插管时间" align="left" prop="pulmonaryarterycannulatime">
|
<el-date-picker clearable v-model="form.pulmonaryarterycannulatime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择门静脉插管时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="灌注时间" align="left" prop="pulmonaryarteryperfusiontime">
|
<el-date-picker clearable v-model="form.pulmonaryarteryperfusiontime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择门静脉灌注时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-row><el-col :span="2"><el-form-item align="left" label="主动脉:" />
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="灌注时间" align="left" prop="aortacannulatime">
|
<el-date-picker clearable v-model="form.aortacannulatime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择主动脉灌注时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
<el-col :span="10">
|
<el-form-item label="灌注时间" align="left" prop="aortaperfusiontime">
|
<el-date-picker clearable v-model="form.aortaperfusiontime" type="datetime"
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择主动脉灌注时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
|
<el-table :data="tableData" border>
|
<el-table-column align="center" width="80px" prop="organname" label="器官名称">
|
</el-table-column>
|
<el-table-column align="center" width="220px" prop="gainhospitalno" label="获取组织">
|
<template slot-scope="scope">
|
<org-selecter ref="gainhosselect" :org-type="'4'" v-model="scope.row.gainhospitalno" />
|
</template>
|
</el-table-column>
|
<el-table-column align="center" width="140px" prop="organgetdoct" label="获取医师">
|
<template slot-scope="scope">
|
<el-input v-model="scope.row.organgetdoct" placeholder="请输入获取医师"></el-input>
|
</template>
|
</el-table-column>
|
<el-table-column align="center" width="210px" prop="organgettime" label="获取日期">
|
<template slot-scope="scope">
|
<el-row>
|
<el-date-picker clearable size="small" style="width: 100%" v-model="scope.row.organgettime"
|
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择器官获取时间">
|
</el-date-picker>
|
</el-row>
|
</template>
|
</el-table-column>
|
<el-table-column label="器官状态" align="center" prop="organstate" width="180">
|
<template slot-scope="scope">
|
<el-select v-model="scope.row.organstate" placeholder="请选择器官状态">
|
<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-col :span="12">
|
<el-form-item align="left" label="默哀缅怀仪式">
|
<el-radio-group v-model="form.isspendremember">
|
<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-col>
|
<el-col :span="12">
|
<el-form-item align="left" label="恢复遗体仪容">
|
<el-radio-group v-model="form.isrestoreremains">
|
<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-col>
|
</el-row>
|
<!-- <el-form-item align="left" label="死亡证明附件路径">
|
<fileUpload v-model="form.deathjudgeannex" />
|
</el-form-item> -->
|
<el-row>
|
<el-col :span="8">
|
<el-form-item label="手术负责人" label-width="140px" prop="responsibleusername">
|
<el-input v-model="form.responsibleusername" placeholder="请输入负责人姓名" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<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="8">
|
<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-form>
|
|
<!-- 编辑器官 -->
|
<el-dialog title="器官" :close-on-click-modal="false" :visible.sync="dialogFormVisible" append-to-body>
|
<el-form :model="table">
|
<el-form-item label="器官名称" :label-width="formLabelWidth">
|
<el-input v-model="form.organnames"></el-input>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
<el-button type="primary" @click="dialogFormVisible = false">保 存</el-button>
|
</div>
|
</el-dialog>
|
<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 OrgSelecter from "@/views/project/components/orgselect";
|
import {
|
listOrganization,
|
listReportname,
|
listUser,
|
|
} from "@/api/project/organization";
|
|
import {
|
getByInfoId,
|
listDonationwitness,
|
getDonationwitness,
|
delDonationwitness,
|
addDonationwitness,
|
updateDonationwitness,
|
listnewDonationwitness,
|
downloadwitnessinfo,
|
exportDonationwitness
|
} from "@/api/project/donationwitness";
|
import {
|
listDonateorgan,
|
addDonateorgan,
|
delDonateorgan,
|
updateDonateorgan,
|
} from "@/api/project/donateorgan";
|
import {
|
listDonatebaseinfo,
|
updateDonatebaseinfo,
|
getDonatebaseinfo,
|
} from "@/api/project/donatebaseinfo";
|
import Li_area_select from "@/components/Address";
|
import OrgSelecter from "@/views/project/components/orgselect";
|
import { updatedonatorno } from "@/api/project/relativesconfirmation";
|
|
export default {
|
components: {
|
Li_area_select,
|
OrgSelecter,
|
},
|
name: "Donationwitness",
|
dicts: [
|
"sys_DonationCategory",
|
"sys_0_1",
|
"silence_to_mourn",
|
"sys_OrganDonation",
|
"sys_OrganizationType",
|
"sys_HospitalNature",
|
"sys_RegionalLevel",
|
"sys_nation",
|
"country",
|
"sys_OrganDecision",
|
"sys_IDType",
|
"sys_FamilyRelation",
|
"sys_KinshipConfirm",
|
"sys_FamilyRelation",
|
"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",
|
],
|
data() {
|
return {
|
starttime: "",
|
endtime: "",
|
|
// 插管位置
|
cannulatimeList: {},
|
coordinatorlist1: [],
|
coordinatorlist2: [],
|
|
selecttime: "",
|
reportervalue: "",
|
reportlist: [],
|
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" },
|
],
|
|
// 插管时间
|
|
// 灌注时间
|
|
//默认值设置,可为空
|
searchAddress: {
|
sheng: "",
|
shi: "",
|
qu: "",
|
organizationname: null,
|
},
|
|
table: {},
|
formLabelWidth: "120px",
|
dialogFormVisible: false,
|
dialogTableVisible: false,
|
tableData: [],
|
|
dosex: "",
|
dobirthday: "",
|
donation: "",
|
doname: "",
|
doeducation: "",
|
dooccupation: "",
|
doidcardtype: "",
|
donationality: "",
|
doidcardno: "",
|
countyname: "",
|
|
//列表死亡时间
|
dodeathtime: "",
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
multiple: true,
|
// 遮罩层
|
loading: true,
|
// 导出遮罩层
|
exportLoading: false,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 捐献基础表格数据
|
donatebaseinfoList: [],
|
users: [],
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 获取组织名称时间范围
|
daterangeReporttime: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
name: null,
|
idcardno: null,
|
residenceprovince: null,
|
residencecity: null,
|
residencetown: null,
|
recordstate: null,
|
treatmenthospitalname: null,
|
treatmenthospitalno: null,
|
donorno: null,
|
gainhospitalname: null,
|
operationdoctor: null,
|
acquisitiontissueno: null,
|
reportername: null,
|
reporttime: null,
|
city: null,
|
treatmenthospitalno: null,
|
},
|
// 表单参数
|
form: {},
|
// 表单校验
|
rules: {
|
donationcategory: [
|
{ required: true, message: "请输入选择捐献类别", trigger: "blur" },
|
],
|
deathjudgedocto: [
|
{ required: true, message: "请输入死亡判定专家一", trigger: "blur" },
|
],
|
deathjudgedoctt: [
|
{ required: true, message: "请输入死亡判定专家二", trigger: "blur" },
|
],
|
deathtime: [
|
{ required: true, message: "请输入死亡时间", trigger: "blur" },
|
],
|
operationbegtime: [
|
{ required: true, message: "请输入手术开始时间", trigger: "blur" },
|
],
|
responsibleusername: [
|
{ required: true, message: "请输入手术负责人", trigger: "blur" },
|
],
|
coordinateduserido: [
|
{ required: true, message: "请输入协调员一", trigger: "blur" },
|
],
|
coordinateduseridt: [
|
{ required: true, message: "请输入协调员二", trigger: "blur" },
|
],
|
},
|
curCase: {},
|
tempRecordState: null,
|
};
|
},
|
created() {
|
this.getuserlist();
|
this.getCoordinatorList1();
|
this.getCoordinatorList2();
|
this.getList();
|
},
|
activated() {
|
this.selecttime = "";
|
this.reportervalue = "";
|
this.reportlist = [];
|
this.queryParams.donorno = "";
|
this.queryParams.recordstate = "";
|
this.queryParams.name = "";
|
this.queryParams.treatmenthospitalno = "";
|
if (this.$route.params.starttime != null && this.$route.params.endtime) {
|
this.selecttime = [
|
this.$moment(this.$route.params.starttime).format("YYYY-MM-DD"),
|
this.$moment(this.$route.params.endtime)
|
.add(-1, "month")
|
.format("YYYY-MM-DD"),
|
];
|
}
|
if (this.$route.params.reporterno != "") {
|
this.reporterno = this.$route.params.reporterno;
|
}
|
if (this.$route.params.tempRecordState != "") {
|
this.queryParams.recordstate = this.$route.params.tempRecordState;
|
}
|
if (this.$route.params.reporterno != "") {
|
this.reportervalue = this.$route.params.reporterno;
|
}
|
if (!this.$route.params.shen != "") {
|
this.searchAddress.sheng = this.$route.params.shen;
|
if (!this.$route.params.shi != "") {
|
this.searchAddress.shi = this.$route.params.shi;
|
}
|
if (!this.$route.params.qu) {
|
this.searchAddress.qu = this.$route.params.qu;
|
}
|
}
|
if (this.$route.params.city != "") {
|
this.queryParams.city = this.$route.params.city;
|
}
|
this.getTimeList();
|
this.getList();
|
},
|
mounted(e) {
|
this.getuserlist();
|
// this.selectReporters();
|
|
this.tempRecordState = this.$route.params.tempRecordState;
|
this.starttime = this.$route.params.starttime;
|
console.log("传来的值", this.starttime);
|
this.endtime = this.$route.params.endtime;
|
|
this.LoadReportList();
|
},
|
methods: {
|
LoadReportList() {
|
listDonatebaseinfo().then((res) => {
|
console.log("潜在捐献表", res);
|
let list = res.rows;
|
let reportlist = [];
|
list.forEach((element) => {
|
reportlist.push({
|
reporterno: element.reporterno,
|
reportername: element.reportername,
|
});
|
});
|
console.log("dwada", reportlist);
|
if (reportlist != 0) {
|
reportlist = this.resetArr(reportlist);
|
this.reportlist = reportlist;
|
}
|
});
|
},
|
resetArr(Arr) {
|
var hash = {};
|
Arr = Arr.reduce(function (arr, current) {
|
hash[current.reporterno]
|
? ""
|
: (hash[current.reporterno] = true && arr.push(current));
|
return arr;
|
}, []);
|
return Arr;
|
},
|
getTimeList(e) {
|
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";
|
console.log("1212121", this.endtime);
|
}
|
this.starttime = this.starttime + " " + "00" + ":" + "00" + ":" + "00";
|
// }
|
} else {
|
// this.starttime = "1998-01-01 00:00:00";
|
// this.endtime = "2998-01-01 00:00:00";
|
}
|
},
|
//用户列表
|
getuserlist() {
|
listUser().then((res) => {
|
this.users = res.data;
|
});
|
},
|
getCoordinatorList1() {
|
//协调员一
|
// let userType = {"userType":"xty1"};
|
listReportname("xty1").then((res) => {
|
this.coordinatorlist1 = res.data;
|
});
|
},
|
getCoordinatorList2() {
|
//协调员二
|
listReportname("xty2").then((res) => {
|
this.coordinatorlist2 = res.data;
|
});
|
},
|
|
getList(e) {
|
this.loading = true;
|
this.queryParams.params = {};
|
if (this.starttime != "") {
|
this.queryParams.starttime = this.starttime;
|
}
|
if (this.endtime != "") {
|
this.queryParams.endtime = this.endtime;
|
}
|
|
this.queryParams.reportervalue = this.reportervalue;
|
|
// if(e != null && e!= undefined && !isNaN(e)){
|
// this.queryParams.recordstate = e
|
// }
|
this.$nextTick(() => {
|
listnewDonationwitness(this.queryParams).then((response) => {
|
this.donatebaseinfoList = response.rows;
|
this.donatebaseinfoList.dodeathtime = "";
|
this.total = response.total;
|
this.loading = false;
|
});
|
});
|
},
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.form = {
|
donationcategory: null,
|
gaindate: null,
|
gaindoctor: null,
|
gainorganazation: null,
|
organnames: null,
|
dosex: null,
|
dobirthday: null,
|
donation: null,
|
doname: null,
|
doeducation: null,
|
dooccupation: null,
|
doidcardtype: null,
|
donationality: null,
|
doidcardno: null,
|
treatmenthospitalname: null,
|
id: null,
|
infoid: null,
|
donorno: null,
|
name: null,
|
idcardtype: null,
|
idcardno: null,
|
phone: null,
|
organdecision: [],
|
organdecisionOther: null,
|
relativeconfirmationsign: null,
|
familyrelations: null,
|
acquisitiontissueno: null,
|
acquisitiontissuename: null,
|
responsibleuserid: null,
|
responsibleusername: null,
|
coordinateduserido: null,
|
coordinatedusernameo: null,
|
coordinateduseridt: null,
|
coordinatedusernamet: null,
|
signdate: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
gainhospitalno: null,
|
gainhospitalname: null,
|
deathtime: null,
|
deathreason: null,
|
deathjudgedocto: null,
|
deathjudgedoctt: null,
|
deathjudgeannex: null,
|
operationbegtime: null,
|
operationendtime: null,
|
operationdoctor: null,
|
isspendremember: null,
|
isrestoreremains: null,
|
rememberannex: "0",
|
responsibleuserid: null,
|
responsibleusername: null,
|
coordinateduserido: null,
|
coordinatedusernameo: null,
|
coordinateduseridt: null,
|
coordinatedusernamet: null,
|
abdominalaortacannulatime: null,
|
abdominalaortaperfusiontime: null,
|
portalveincannulatime: null,
|
portalveinperfusiontime: null,
|
pulmonaryarterycannulatime: null,
|
pulmonaryarteryperfusiontime: null,
|
aortacannulatime: null,
|
aortaperfusiontime: null,
|
delFlag: null,
|
createBy: null,
|
createTime: null,
|
updateBy: null,
|
updateTime: null,
|
organdonation: [],
|
organdonationOther: 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,
|
};
|
this.selecttime = [];
|
this.getTimeList();
|
this.searchAddress = {
|
sheng: "",
|
shi: "",
|
qu: "",
|
organizationname: null,
|
};
|
this.operationbegtime = []
|
this.startoperationbegtime = ""
|
this.endoperationbegtime = ""
|
this.resetForm("queryForm");
|
this.handleQuery();
|
},
|
|
handleSelectionChange(selection) {
|
this.ids = selection.map((item) => item.id);
|
|
this.single = selection.length !== 1;
|
this.multiple = !selection.length;
|
},
|
updated(res) {
|
this.dialogFormVisible = true;
|
this.form.organnames = res.organnames;
|
},
|
/** 新增按钮操作 */
|
handleAdd(row) {
|
this.curCase = {
|
id: row.id,
|
recordstate: null,
|
donorno: row.donorno,
|
};
|
this.reset();
|
const id = row.id;
|
getDonatebaseinfo(id).then((res) => {
|
console.log("捐献基础表数据", res);
|
this.curCase.nation = res.data.nation;
|
this.curCase.education = res.data.education;
|
this.curCase.occupation = res.data.occupation;
|
});
|
// this.open = true;
|
this.form.infoid = row.id;
|
this.form.donorno = row.donorno;
|
this.form.name = row.name;
|
this.form.treatmenthospitalname = row.treatmenthospitalname;
|
this.form.dosex = row.sex;
|
this.form.doidcardtype = row.idcardtype;
|
this.form.doidcardno = row.idcardno;
|
this.form.doeducation = row.education;
|
this.form.donationality = row.nationality;
|
this.form.dooccupation = row.occupation;
|
this.form.dobirthday = row.birthday;
|
|
//判断是否存在见证记录
|
let searchParam = {
|
infoid: row.id,
|
};
|
this.GetDonortedList();
|
const infoid = this.form.infoid;
|
getByInfoId(infoid).then((response) => {
|
if (response.code == 200) {
|
//获取器官分配信息
|
|
if (response.data != null) {
|
// this.$modal.msgError("获取捐献器官失败1:" + response.msg);
|
this.open = true;
|
this.form = response.data;
|
this.form.organdonation = this.form.organdonation.split(",");
|
this.title = "修改人体器官捐献获取见证登记表";
|
} else {
|
this.open = true;
|
this.title = "新增人体器官捐献获取见证登记表";
|
}
|
}
|
});
|
},
|
/** 修改按钮操作 */
|
handleUpdate(row) {
|
this.reset();
|
const id = row.id || this.ids;
|
getDonationwitness(id).then((response) => {
|
this.form = response.data;
|
this.open = true;
|
this.title = "修改";
|
});
|
},
|
|
/** 提交按钮 */
|
submitForm() {
|
this.$refs["form"].validate((valid) => {
|
if (valid) {
|
//协调员1
|
let coordinatedusernameIndex = this.coordinatorlist1.findIndex(
|
(item) => this.form.coordinateduserido == item.reportNo
|
);
|
|
if (coordinatedusernameIndex > -1) {
|
this.form.coordinatedusernameo =
|
this.coordinatorlist1[coordinatedusernameIndex].reportName;
|
}
|
//协调员2
|
let coordinatedusernametIndex = this.coordinatorlist1.findIndex(
|
(item) => this.form.coordinateduseridt == item.reportNo
|
);
|
if (coordinatedusernametIndex > -1) {
|
this.form.coordinatedusernamet =
|
this.coordinatorlist1[coordinatedusernametIndex].reportName;
|
}
|
|
this.form.organdonation = this.form.organdonation.join(",");
|
if (this.form.id != null) {
|
updateDonationwitness(this.form).then((response) => {
|
this.$modal.msgSuccess("修改成功");
|
updatedonatorno(this.form.infoid).then((res) => {
|
this.getList();
|
});
|
this.open = false;
|
|
//更新器官表
|
for (let k = 0; k < this.tableData.length; k++) {
|
try {
|
this.tableData[k].gainhospitalname =
|
this.$refs.gainhosselect.getOptionByValue(
|
this.tableData[k].gainhospitalno
|
).organizationname;
|
} catch {
|
console.log("获取机构名称失败");
|
}
|
updateDonateorgan(this.tableData[k]).then((response1) => {
|
if (response1.code == 200) {
|
this.$modal.msgSuccess("器官记录修改成功");
|
}
|
});
|
}
|
|
this.curCase.recordstate = 11;
|
//update.donatebaseinfoList.deathtime = this.form.deathtime;
|
updateDonatebaseinfo(this.curCase).then((response) => {
|
this.open = false;
|
});
|
this.getList();
|
});
|
} else {
|
addDonationwitness(this.form).then((response) => {
|
this.$modal.msgSuccess("新增成功");
|
//更新器官表
|
for (let k = 0; k < this.tableData.length; k++) {
|
try {
|
this.tableData[k].gainhospitalname =
|
this.$refs.gainhosselect.getOptionByValue(
|
this.tableData[k].gainhospitalno
|
).organizationname;
|
} catch {
|
console.log("获取机构名称失败");
|
}
|
updateDonateorgan(this.tableData[k]).then((response1) => {
|
if (response1.code == 200) {
|
this.$modal.msgSuccess("器官记录修改成功");
|
}
|
});
|
}
|
updatedonatorno(this.form.infoid).then((res) => {
|
this.getList();
|
});
|
this.curCase.recordstate = 11;
|
updateDonatebaseinfo(this.curCase).then((response) => {
|
this.open = false;
|
this.getList();
|
});
|
});
|
}
|
console.log("lpl", this.form);
|
}
|
});
|
},
|
|
/** 删除按钮操作 */
|
handleDelete(row) {
|
const ids = row.id || this.ids;
|
this.$modal
|
.confirm('是否确认删除捐献见证编号为"' + ids + '"的数据项?')
|
.then(function () {
|
return delDonationwitness(ids);
|
})
|
.then(() => {
|
this.getList();
|
this.$modal.msgSuccess("删除成功");
|
})
|
.catch(() => { });
|
},
|
//获取病人已捐献的器官列表
|
GetDonortedList() {
|
this.loading = true;
|
let oraganqueryParam = {
|
//donorno: this.form.donorno,
|
infoid: this.curCase.id,
|
};
|
console.log(
|
"调用器官列表接口,参数:" + JSON.stringify(oraganqueryParam)
|
);
|
listDonateorgan(oraganqueryParam).then((response) => {
|
this.loading = false;
|
if (response.code == 200) {
|
this.organdonation = [];
|
this.tableData = response.rows;
|
//获取医院默认是移植医院
|
for (let i = 0; i < this.tableData.length; i++) {
|
if (
|
this.tableData[i].gainhospitalname == null ||
|
this.tableData[i].gainhospitalname == ""
|
) {
|
this.tableData[i].gainhospitalname =
|
this.tableData[i].transplanthospitalname;
|
}
|
if (
|
this.tableData[i].gainhospitalno == null ||
|
this.tableData[i].gainhospitalno == ""
|
) {
|
this.tableData[i].gainhospitalno =
|
this.tableData[i].transplanthospitalno;
|
}
|
}
|
//this.organalForm.organname = [];
|
for (let i = 0; i < response.rows.length; i++) {
|
this.form.organdonation.push(response.rows[i].organno);
|
}
|
} else {
|
this.$modal.msgError("获取捐献器官失败:" + response.msg);
|
}
|
});
|
},
|
//下载捐献见证登记表
|
handledownload(row) {
|
const id = row.id || this.ids;
|
console.log("232323232", row);
|
downloadwitnessinfo(row.dwid).then((response) => {
|
var fileUrl = response;
|
//获取当前网址
|
var urlBase = process.env.VUE_APP_BASE_API;
|
var curWWWPath = window.document.location.href;
|
var pos = curWWWPath.indexOf(window.document.location.pathname);
|
// 创建a标签
|
var aEle = document.createElement("a");
|
aEle.href =
|
curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
|
aEle.click();
|
});
|
},
|
/** 导出按钮操作 */
|
handleExport() {
|
const queryParams = this.queryParams;
|
this.$modal.confirm('是否确认导出所有获取见证数据项?').then(() => {
|
this.exportLoading = true;
|
return exportDonationwitness(queryParams);
|
}).then(response => {
|
this.$download.name(response.msg);
|
this.exportLoading = false;
|
}).catch(() => { }); z
|
}
|
},
|
};
|
</script>
|