From 2698387e653c6a25059c3ae9976f18b814eba892 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 12 九月 2025 15:16:46 +0800
Subject: [PATCH] 医疗权限
---
src/views/project/donationwitness/index.vue | 980 +++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 710 insertions(+), 270 deletions(-)
diff --git a/src/views/project/donationwitness/index.vue b/src/views/project/donationwitness/index.vue
index 4fa5c29..cacd679 100644
--- a/src/views/project/donationwitness/index.vue
+++ b/src/views/project/donationwitness/index.vue
@@ -1,23 +1,47 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="70px">
+ <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-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
+ 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
+ v-for="item in provinceData"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ >
</el-option>
</el-select>
</el-form-item>
@@ -25,9 +49,18 @@
<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
+ v-model="queryParams.workflow"
+ placeholder="璇烽�夋嫨鎹愮尞杩涘害"
+ clearable
+ size="small"
+ >
+ <el-option
+ v-for="dict in dict.type.sys_donornode"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
</el-select>
</el-form-item>
</el-col>
@@ -35,8 +68,16 @@
<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-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>
@@ -44,33 +85,71 @@
<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
+ 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-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-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">
+ <el-table
+ v-loading="loading"
+ :default-sort="{ prop: 'deathtime', order: 'descending' }"
+ border
+ :data="donatebaseinfoList"
+ >
+ <el-table-column
+ label="妗堜緥鏃堕棿"
+ align="center"
+ prop="donatetime"
+ width="120"
+ >
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.donatetime, "{y}-{m}-{d}") }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鎶ュ憡鏃堕棿"
+ align="center"
+ prop="reporttime"
+ width="140"
+ >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
</template>
@@ -80,33 +159,90 @@
<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)" />
+ <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">
+ <el-table-column label="骞撮緞" align="center" prop="age" width="100">
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_DonationCategory" :value="scope.row.dwdonationcategory" />
+ {{
+ `${
+ scope.row.age && scope.row.age !== 0 ? `${scope.row.age}${scope.row.ageunit?scope.row.ageunit:''}` : ""
+ } ${
+ scope.row.age2 && scope.row.age2 !== 0
+ ? `${scope.row.age2}${scope.row.ageunit2}`
+ : ""
+ }`.trim()
+ }}
+ </template>
+ </el-table-column>
+ <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>
+ <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="reportername"
+ width="100"
+ />
- <el-table-column label="鎹愮尞杩涘害" align="center" prop="recordstate">
+ <el-table-column
+ label="鎹愮尞杩涘害"
+ align="center"
+ prop="workflow"
+ width="120"
+ >
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_DonationStatus" :value="scope.row.recordstate" />
+ <div v-if="!scope.row.terminationCase">
+ <dict-tag
+ :options="dict.type.sys_donornode"
+ :value="scope.row.workflow"
+ />
+ </div>
+ <div v-else>浠诲姟缁堟</div>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width" width="140" fixed="right">
+ <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
+ 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"
@@ -115,70 +251,126 @@
@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>
+ <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" />
+ <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-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-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
+ 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-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
+ 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
+ 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="idcardno">
+ <el-input
+ ref="updateBSvalue"
+ class="sfzcode"
+ v-model="curCase.idcardno"
+ placeholder="璇疯緭鍏ヨ瘉浠跺彿鐮�"
+ disabled
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <!--
+ <el-row>
<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">
@@ -197,13 +389,26 @@
</el-select>
</el-form-item>
</el-col>
+ <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-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>
+ <el-checkbox
+ v-for="dict in dict.type.sys_Organ"
+ :key="dict.value"
+ :label="dict.value"
+ disabled
+ >
{{ dict.label }}
</el-checkbox>
</el-checkbox-group>
@@ -214,8 +419,12 @@
<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
+ 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>
@@ -236,26 +445,41 @@
</el-col>
<el-col :span="10">
<el-form-item align="left" label="鍖荤敓涓�" prop="deathjudgedocto">
- <el-input v-model="form.deathjudgedocto" placeholder="鍒ゅ畾鍖荤敓濮撳悕" />
+ <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-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-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
+ 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-input
+ v-model="form.deathreason"
+ placeholder="璇疯緭鍏ユ浜″師鍥�"
+ />
</el-form-item>
</el-col>
</el-row>
@@ -265,117 +489,249 @@
</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
+ 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
+ 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-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-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-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-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-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-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-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-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-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-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
+ 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-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
+ align="center"
+ width="80px"
+ prop="organname"
+ label="鍣ㄥ畼鍚嶇О"
+ >
</el-table-column>
- <el-table-column align="center" width="220px" prop="gainhospitalno" label="鑾峰彇缁勭粐">
+ <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" />
+ <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="鑾峰彇鍖诲笀">
+ <el-table-column
+ align="center"
+ width="140px"
+ prop="organgetdoct"
+ label="鑾峰彇鍖诲笀"
+ >
<template slot-scope="scope">
- <el-input v-model="scope.row.organgetdoct" placeholder="璇疯緭鍏ヨ幏鍙栧尰甯�"></el-input>
+ <el-input
+ v-model="scope.row.organgetdoct"
+ placeholder="璇疯緭鍏ヨ幏鍙栧尰甯�"
+ ></el-input>
</template>
</el-table-column>
- <el-table-column align="center" width="210px" prop="organgettime" label="鑾峰彇鏃ユ湡">
+ <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
+ 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">
+ <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
+ 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>
@@ -384,33 +740,53 @@
<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
+ 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
+ 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-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="璇疯緭鍏ヨ礋璐d汉濮撳悕" />
+ <el-form-item
+ label="鎵嬫湳璐熻矗浜�"
+ label-width="140px"
+ prop="responsibleusername"
+ >
+ <el-input
+ v-model="form.responsibleusername"
+ placeholder="璇疯緭鍏ヨ礋璐d汉濮撳悕"
+ />
</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
+ v-for="item in coordinatorlist1"
+ :key="item.reportNo"
+ :label="item.reportName"
+ :value="item.reportNo"
+ >
</el-option>
</el-select>
</el-form-item>
@@ -418,8 +794,12 @@
<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
+ v-for="item in coordinatorlist1"
+ :key="item.reportNo"
+ :label="item.reportName"
+ :value="item.reportNo"
+ >
</el-option>
</el-select>
</el-form-item>
@@ -428,7 +808,12 @@
</el-form>
<!-- 缂栬緫鍣ㄥ畼 -->
- <el-dialog title="鍣ㄥ畼" :close-on-click-modal="false" :visible.sync="dialogFormVisible" append-to-body>
+ <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>
@@ -436,7 +821,9 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
- <el-button type="primary" @click="dialogFormVisible = false">淇� 瀛�</el-button>
+ <el-button type="primary" @click="dialogFormVisible = false"
+ >淇� 瀛�</el-button
+ >
</div>
</el-dialog>
<div slot="footer" class="dialog-footer">
@@ -452,8 +839,7 @@
import {
listOrganization,
listReportname,
- listUser,
-
+ listUser
} from "@/api/project/organization";
import {
@@ -471,21 +857,22 @@
listDonateorgan,
addDonateorgan,
delDonateorgan,
- updateDonateorgan,
+ updateDonateorgan
} from "@/api/project/donateorgan";
import {
listDonatebaseinfo,
updateDonatebaseinfo,
- getDonatebaseinfo,
+ 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";
+import { getToken } from "@/utils/auth";
export default {
components: {
Li_area_select,
- OrgSelecter,
+ OrgSelecter
},
name: "Donationwitness",
dicts: [
@@ -515,12 +902,12 @@
"sys_Infectious",
"sys_InfoSources",
"sys_OtherCases",
- "sys_DonationStatus",
+ "sys_donornode",
"sys_DiseaseType",
"sys_SelfWill",
"sys_FamilyRelation",
"sys_Organ",
- "sys_organstate",
+ "sys_organstate"
],
data() {
return {
@@ -547,7 +934,7 @@
{ label: "琛㈠窞甯�", value: "8" },
{ label: "鑸熷北甯�", value: "9" },
{ label: "鍙板窞甯�", value: "A" },
- { label: "涓芥按甯�", value: "B" },
+ { label: "涓芥按甯�", value: "B" }
],
// 鎻掔鏃堕棿
@@ -559,7 +946,7 @@
sheng: "",
shi: "",
qu: "",
- organizationname: null,
+ organizationname: null
},
table: {},
@@ -567,7 +954,9 @@
dialogFormVisible: false,
dialogTableVisible: false,
tableData: [],
-
+ headers: {
+ Authorization: "Bearer " + getToken()
+ },
dosex: "",
dobirthday: "",
donation: "",
@@ -629,48 +1018,51 @@
reportername: null,
reporttime: null,
city: null,
- treatmenthospitalno: null,
+ treatmenthospitalno: null
},
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
rules: {
donationcategory: [
- { required: true, message: "璇疯緭鍏ラ�夋嫨鎹愮尞绫诲埆", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ラ�夋嫨鎹愮尞绫诲埆", trigger: "blur" }
],
deathjudgedocto: [
- { required: true, message: "璇疯緭鍏ユ浜″垽瀹氫笓瀹朵竴", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ユ浜″垽瀹氫笓瀹朵竴", trigger: "blur" }
],
deathjudgedoctt: [
- { required: true, message: "璇疯緭鍏ユ浜″垽瀹氫笓瀹朵簩", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ユ浜″垽瀹氫笓瀹朵簩", trigger: "blur" }
],
deathtime: [
- { required: true, message: "璇疯緭鍏ユ浜℃椂闂�", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ユ浜℃椂闂�", trigger: "blur" }
],
operationbegtime: [
- { required: true, message: "璇疯緭鍏ユ墜鏈紑濮嬫椂闂�", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ユ墜鏈紑濮嬫椂闂�", trigger: "blur" }
],
responsibleusername: [
- { required: true, message: "璇疯緭鍏ユ墜鏈礋璐d汉", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ユ墜鏈礋璐d汉", trigger: "blur" }
],
coordinateduserido: [
- { required: true, message: "璇疯緭鍏ュ崗璋冨憳涓�", trigger: "blur" },
+ { required: true, message: "璇疯緭鍏ュ崗璋冨憳涓�", trigger: "blur" }
],
coordinateduseridt: [
- { required: true, message: "璇疯緭鍏ュ崗璋冨憳浜�", trigger: "blur" },
- ],
+ { required: true, message: "璇疯緭鍏ュ崗璋冨憳浜�", trigger: "blur" }
+ ]
},
curCase: {},
- tempRecordState: null,
+ tempRecordState: null
};
},
created() {
- this.getuserlist();
+ if (sessionStorage.getItem("donationwitness")) {
+ this.queryParams = JSON.parse(sessionStorage.getItem("donationwitness"));
+ console.log(this.queryParams, "queryParams");
+ }
this.getCoordinatorList1();
this.getCoordinatorList2();
- this.getList();
},
- activated() {
+ activated() {},
+ mounted(e) {
this.selecttime = "";
this.reportervalue = "";
this.reportlist = [];
@@ -681,9 +1073,7 @@
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"),
+ this.$moment(this.$route.params.endtime).format("YYYY-MM-DD")
];
}
if (this.$route.params.reporterno != "") {
@@ -709,28 +1099,27 @@
}
this.getTimeList();
this.getList();
- },
- mounted(e) {
this.getuserlist();
// this.selectReporters();
this.tempRecordState = this.$route.params.tempRecordState;
- this.starttime = this.$route.params.starttime;
+ // this.starttime = this.$route.params.starttime;
+ // this.endtime = this.$route.params.endtime;
console.log("浼犳潵鐨勫��", this.starttime);
- this.endtime = this.$route.params.endtime;
+ console.log("浼犳潵鐨勫��", this.endtime);
this.LoadReportList();
},
methods: {
LoadReportList() {
- listDonatebaseinfo().then((res) => {
+ listDonatebaseinfo().then(res => {
console.log("娼滃湪鎹愮尞琛�", res);
let list = res.rows;
let reportlist = [];
- list.forEach((element) => {
+ list.forEach(element => {
reportlist.push({
reporterno: element.reporterno,
- reportername: element.reportername,
+ reportername: element.reportername
});
});
console.log("dwada", reportlist);
@@ -742,7 +1131,7 @@
},
resetArr(Arr) {
var hash = {};
- Arr = Arr.reduce(function (arr, current) {
+ Arr = Arr.reduce(function(arr, current) {
hash[current.reporterno]
? ""
: (hash[current.reporterno] = true && arr.push(current));
@@ -807,20 +1196,20 @@
},
//鐢ㄦ埛鍒楄〃
getuserlist() {
- listUser().then((res) => {
+ listUser().then(res => {
this.users = res.data;
});
},
getCoordinatorList1() {
//鍗忚皟鍛樹竴
// let userType = {"userType":"xty1"};
- listReportname("xty1").then((res) => {
+ listReportname("xty1").then(res => {
this.coordinatorlist1 = res.data;
});
},
getCoordinatorList2() {
//鍗忚皟鍛樹簩
- listReportname("xty2").then((res) => {
+ listReportname("xty2").then(res => {
this.coordinatorlist2 = res.data;
});
},
@@ -828,6 +1217,11 @@
getList(e) {
this.loading = true;
this.queryParams.params = {};
+ sessionStorage.removeItem("donationwitness");
+ sessionStorage.setItem(
+ "donationwitness",
+ JSON.stringify(this.queryParams)
+ );
if (this.starttime != "") {
this.queryParams.starttime = this.starttime;
}
@@ -841,7 +1235,7 @@
// this.queryParams.recordstate = e
// }
this.$nextTick(() => {
- listnewDonationwitness(this.queryParams).then((response) => {
+ listnewDonationwitness(this.queryParams).then(response => {
this.donatebaseinfoList = response.rows;
this.donatebaseinfoList.dodeathtime = "";
this.total = response.total;
@@ -930,7 +1324,7 @@
updateBy: null,
updateTime: null,
organdonation: [],
- organdonationOther: null,
+ organdonationOther: null
};
this.resetForm("form");
},
@@ -959,7 +1353,7 @@
acquisitiontissueno: null,
reportername: null,
reporttime: null,
- city: null,
+ city: null
};
this.selecttime = [];
this.getTimeList();
@@ -967,17 +1361,17 @@
sheng: "",
shi: "",
qu: "",
- organizationname: null,
+ organizationname: null
};
- this.operationbegtime = []
- this.startoperationbegtime = ""
- this.endoperationbegtime = ""
+ this.operationbegtime = [];
+ this.startoperationbegtime = "";
+ this.endoperationbegtime = "";
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
+ this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
@@ -988,62 +1382,79 @@
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd(row) {
- debugger;
- 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,
- };
- debugger;
- 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 = "鏂板浜轰綋鍣ㄥ畼鎹愮尞鑾峰彇瑙佽瘉鐧昏琛�";
- }
+ this.$router.push({
+ path: "/organ/donationdetails/",
+ query: {
+ id: row.id,
+ organType: "edit"
}
});
+ // this.reset();
+
+ // const id = row.id;
+ // this.curCase = {
+ // id: row.id,
+ // recordstate: null,
+ // donorno: row.donorno,
+ // name: row.name,
+ // treatmenthospitalname: row.treatmenthospitalname,
+ // sex: row.sex,
+ // idcardtype: row.idcardtype,
+ // idcardno: row.idcardno,
+ // education: row.education,
+ // nationality: row.nationality,
+ // occupation: row.occupation,
+ // birthday: row.birthday
+ // };
+
+ // 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;
+ // console.log("row", row);
+ // 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) => {
+ getDonationwitness(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "淇敼";
@@ -1052,31 +1463,33 @@
/** 鎻愪氦鎸夐挳 */
submitForm() {
- this.$refs["form"].validate((valid) => {
+ this.$refs["form"].validate(valid => {
if (valid) {
//鍗忚皟鍛�1
let coordinatedusernameIndex = this.coordinatorlist1.findIndex(
- (item) => this.form.coordinateduserido == item.reportNo
+ item => this.form.coordinateduserido == item.reportNo
);
if (coordinatedusernameIndex > -1) {
- this.form.coordinatedusernameo =
- this.coordinatorlist1[coordinatedusernameIndex].reportName;
+ this.form.coordinatedusernameo = this.coordinatorlist1[
+ coordinatedusernameIndex
+ ].reportName;
}
//鍗忚皟鍛�2
let coordinatedusernametIndex = this.coordinatorlist1.findIndex(
- (item) => this.form.coordinateduseridt == item.reportNo
+ item => this.form.coordinateduseridt == item.reportNo
);
if (coordinatedusernametIndex > -1) {
- this.form.coordinatedusernamet =
- this.coordinatorlist1[coordinatedusernametIndex].reportName;
+ this.form.coordinatedusernamet = this.coordinatorlist1[
+ coordinatedusernametIndex
+ ].reportName;
}
this.form.organdonation = this.form.organdonation.join(",");
if (this.form.id != null) {
- updateDonationwitness(this.form).then((response) => {
+ updateDonationwitness(this.form).then(response => {
this.$modal.msgSuccess("淇敼鎴愬姛");
- updatedonatorno(this.form.infoid).then((res) => {
+ updatedonatorno(this.form.infoid).then(res => {
this.getList();
});
this.open = false;
@@ -1084,14 +1497,15 @@
//鏇存柊鍣ㄥ畼琛�
for (let k = 0; k < this.tableData.length; k++) {
try {
- this.tableData[k].gainhospitalname =
- this.$refs.gainhosselect.getOptionByValue(
- this.tableData[k].gainhospitalno
- ).organizationname;
+ this.tableData[
+ k
+ ].gainhospitalname = this.$refs.gainhosselect.getOptionByValue(
+ this.tableData[k].gainhospitalno
+ ).organizationname;
} catch {
console.log("鑾峰彇鏈烘瀯鍚嶇О澶辫触");
}
- updateDonateorgan(this.tableData[k]).then((response1) => {
+ updateDonateorgan(this.tableData[k]).then(response1 => {
if (response1.code == 200) {
this.$modal.msgSuccess("鍣ㄥ畼璁板綍淇敼鎴愬姛");
}
@@ -1100,35 +1514,36 @@
this.curCase.recordstate = 11;
//update.donatebaseinfoList.deathtime = this.form.deathtime;
- updateDonatebaseinfo(this.curCase).then((response) => {
+ updateDonatebaseinfo(this.curCase).then(response => {
this.open = false;
});
this.getList();
});
} else {
- addDonationwitness(this.form).then((response) => {
+ 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;
+ this.tableData[
+ k
+ ].gainhospitalname = this.$refs.gainhosselect.getOptionByValue(
+ this.tableData[k].gainhospitalno
+ ).organizationname;
} catch {
console.log("鑾峰彇鏈烘瀯鍚嶇О澶辫触");
}
- updateDonateorgan(this.tableData[k]).then((response1) => {
+ updateDonateorgan(this.tableData[k]).then(response1 => {
if (response1.code == 200) {
this.$modal.msgSuccess("鍣ㄥ畼璁板綍淇敼鎴愬姛");
}
});
}
- updatedonatorno(this.form.infoid).then((res) => {
+ updatedonatorno(this.form.infoid).then(res => {
this.getList();
});
this.curCase.recordstate = 11;
- updateDonatebaseinfo(this.curCase).then((response) => {
+ updateDonatebaseinfo(this.curCase).then(response => {
this.open = false;
this.getList();
});
@@ -1144,28 +1559,27 @@
const ids = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鎹愮尞瑙佽瘉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�')
- .then(function () {
+ .then(function() {
return delDonationwitness(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
})
- .catch(() => { });
+ .catch(() => {});
},
//鑾峰彇鐥呬汉宸叉崘鐚殑鍣ㄥ畼鍒楄〃
GetDonortedList() {
this.loading = true;
let oraganqueryParam = {
//donorno: this.form.donorno,
- infoid: this.curCase.id,
+ infoid: this.curCase.id
};
- debugger;
console.log(
"璋冪敤鍣ㄥ畼鍒楄〃鎺ュ彛锛屽弬鏁帮細" + JSON.stringify(oraganqueryParam)
);
- listDonateorgan(oraganqueryParam).then((response) => {
- debugger;
+
+ listDonateorgan(oraganqueryParam).then(response => {
this.loading = false;
if (response.code == 200) {
this.organdonation = [];
@@ -1176,15 +1590,17 @@
this.tableData[i].gainhospitalname == null ||
this.tableData[i].gainhospitalname == ""
) {
- this.tableData[i].gainhospitalname =
- this.tableData[i].transplanthospitalname;
+ 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.tableData[i].gainhospitalno = this.tableData[
+ i
+ ].transplanthospitalno;
}
}
//this.organalForm.organname = [];
@@ -1200,8 +1616,8 @@
handledownload(row) {
const id = row.id || this.ids;
console.log("232323232", row);
- downloadwitnessinfo(row.dwid).then((response) => {
- var fileUrl = response;
+ downloadwitnessinfo(row.dwid).then(res => {
+ var fileUrl = res;
//鑾峰彇褰撳墠缃戝潃
var urlBase = process.env.VUE_APP_BASE_API;
var curWWWPath = window.document.location.href;
@@ -1210,20 +1626,44 @@
var aEle = document.createElement("a");
aEle.href =
curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
- aEle.click();
+ console.log(aEle.href);
+ // 娣诲姞Authorization澶撮儴
+ fetch(aEle.href, {
+ headers: this.headers
+ })
+ .then(response => {
+ // 灏嗘枃浠朵笅杞介摼鎺ヤ綔涓篵lob瀵硅薄杩涜涓嬭浇
+ return response.blob();
+ })
+ .then(blob => {
+ const url = window.URL.createObjectURL(new Blob([blob]));
+ console.log(url);
+ const link = document.createElement("a");
+ link.href = url;
+ const name = fileUrl["downloadName"];
+ link.setAttribute("download", name); // 鏇挎崲file.pdf涓哄疄闄呯殑鏂囦欢鍚�
+ document.body.appendChild(link);
+ link.click();
+ link.parentNode.removeChild(link);
+ });
});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
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
+ this.$modal
+ .confirm("鏄惁纭瀵煎嚭鎵�鏈夎幏鍙栬璇佹暟鎹」锛�")
+ .then(() => {
+ this.exportLoading = true;
+ return exportDonationwitness(queryParams);
+ })
+ .then(response => {
+ this.$download.name(response.msg);
+ this.exportLoading = false;
+ })
+ .catch(() => {});
+ z;
}
- },
+ }
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3