From 5aa165156994b1b8a601063fa0a1107d1893ea57 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 19 三月 2026 16:48:13 +0800
Subject: [PATCH] 更新
---
src/views/business/allocation/index.vue | 158 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 122 insertions(+), 36 deletions(-)
diff --git a/src/views/business/allocation/index.vue b/src/views/business/allocation/index.vue
index 72a80e7..b2cdf06 100644
--- a/src/views/business/allocation/index.vue
+++ b/src/views/business/allocation/index.vue
@@ -8,19 +8,28 @@
:inline="true"
label-width="100px"
>
- <el-form-item label="浣忛櫌鍙�" prop="hospitalNo">
+ <el-form-item label="浣忛櫌鍙�" prop="inpatientno">
<el-input
- v-model="queryParams.hospitalNo"
+ v-model="queryParams.inpatientno"
placeholder="璇疯緭鍏ヤ綇闄㈠彿"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鎹愮尞鑰呭鍚�" prop="donorName">
+ <el-form-item label="鎹愮尞鑰呭鍚�" prop="name">
<el-input
- v-model="queryParams.donorName"
+ v-model="queryParams.name"
placeholder="璇疯緭鍏ユ崘鐚�呭鍚�"
+ clearable
+ style="width: 200px"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="妗堜緥缂栧彿" prop="caseNo">
+ <el-input
+ v-model="queryParams.caseNo"
+ placeholder="璇疯緭鍏ユ渚嬬紪鍙�"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
@@ -33,9 +42,25 @@
clearable
style="width: 200px"
>
- <el-option label="宸插垎閰�" value="allocated" />
- <el-option label="寰呭垎閰�" value="pending" />
+ <el-option label="鍏ㄩ儴" value="" />
+ <el-option
+ v-for="dict in dict.type.allocation_Status"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
</el-select>
+ </el-form-item>
+ <el-form-item label="鍒嗛厤鏃堕棿鑼冨洿" prop="allocationTimeRange">
+ <el-date-picker
+ v-model="queryParams.allocationTimeRange"
+ type="daterange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd"
+ style="width: 240px"
+ />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
@@ -60,13 +85,13 @@
@click="handleUpdate"
>淇敼</el-button
>
- <el-button
+ <!-- <el-button
type="danger"
icon="el-icon-delete"
- :disabled="multiple"
+ :disabled="single"
@click="handleDelete"
>鍒犻櫎</el-button
- >
+ > -->
</el-col>
<el-col :span="8" style="text-align: right">
<el-tooltip content="鍒锋柊" placement="top">
@@ -85,31 +110,57 @@
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column
- label="浣忛櫌鍙�"
+ label="妗堜緥缂栧彿"
align="center"
- prop="hospitalNo"
+ prop="caseNo"
width="120"
/>
<el-table-column
- label="鎹愮尞鑰呭鍚�"
+ label="鎹愮尞鑰呯紪鍙�"
align="center"
- prop="donorName"
+ prop="donorno"
width="120"
/>
- <el-table-column label="鎬у埆" align="center" prop="gender" width="80">
+ <el-table-column label="濮撳悕" align="center" prop="name" width="100" />
+ <el-table-column
+ label="浣忛櫌鍙�"
+ align="center"
+ prop="inpatientno"
+ width="120"
+ />
+ <el-table-column label="鎬у埆" align="center" prop="sex" width="80">
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_user_sex"
- :value="parseInt(scope.row.gender)"
+ :value="scope.row.sex"
/>
</template>
</el-table-column>
<el-table-column label="骞撮緞" align="center" prop="age" width="80" />
<el-table-column
+ label="琛�鍨�"
+ align="center"
+ prop="bloodtype"
+ width="80"
+ />
+ <el-table-column
+ label="璇佷欢鍙风爜"
+ align="center"
+ prop="idcardno"
+ width="180"
+ />
+ <el-table-column
label="鐤剧梾璇婃柇"
align="center"
- prop="diagnosis"
+ prop="diagnosisname"
min-width="180"
+ show-overflow-tooltip
+ />
+ <el-table-column
+ label="鍖荤枟鏈烘瀯"
+ align="center"
+ prop="treatmenthospitalname"
+ min-width="150"
show-overflow-tooltip
/>
<el-table-column
@@ -119,9 +170,10 @@
width="100"
>
<template slot-scope="scope">
- <el-tag :type="scope.row.allocationStatus === 'allocated' ? 'success' : 'warning'">
- {{ scope.row.allocationStatus === 'allocated' ? '宸插垎閰�' : '寰呭垎閰�' }}
- </el-tag>
+ <dict-tag
+ :options="dict.type.allocation_Status"
+ :value="scope.row.allocationStatus"
+ />
</template>
</el-table-column>
<el-table-column
@@ -141,7 +193,7 @@
<el-table-column
label="鐧昏浜�"
align="center"
- prop="registrant"
+ prop="registrationName"
width="100"
/>
<el-table-column
@@ -161,7 +213,8 @@
<el-table-column
label="鎿嶄綔"
align="center"
- width="150"
+ width="210"
+ fixed="right"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
@@ -185,6 +238,7 @@
icon="el-icon-delete"
style="color: #F56C6C"
@click="handleDelete(scope.row)"
+ :disabled="scope.row.allocationStatus === '2'"
>鍒犻櫎</el-button
>
</template>
@@ -204,19 +258,21 @@
</template>
<script>
-import { listOrganAllocation, delOrganAllocation } from "./organAllocation";
+import { allocationList } from "@/api/businessApi";
import Pagination from "@/components/Pagination";
export default {
name: "OrganAllocationList",
components: { Pagination },
- dicts: ["sys_user_sex"],
+ dicts: ["sys_user_sex", "allocation_Status"],
data() {
return {
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
ids: [],
+ // 閫変腑鐨勮鏁版嵁
+ selectedRows: [],
// 闈炲崟涓鐢�
single: true,
// 闈炲涓鐢�
@@ -229,9 +285,11 @@
queryParams: {
pageNum: 1,
pageSize: 10,
- hospitalNo: undefined,
- donorName: undefined,
- allocationStatus: undefined
+ inpatientno: undefined,
+ name: undefined,
+ caseNo: undefined,
+ allocationStatus: undefined,
+ allocationTimeRange: []
}
};
},
@@ -242,13 +300,33 @@
// 鏌ヨ鍣ㄥ畼鍒嗛厤鍒楄〃
getList() {
this.loading = true;
- listOrganAllocation(this.queryParams)
+
+ // 澶勭悊鏌ヨ鍙傛暟
+ const params = {
+ ...this.queryParams
+ };
+
+ // 绉婚櫎鍒嗛〉鍙傛暟浠ュ鐨勯澶栧弬鏁�
+ delete params.allocationTimeRange;
+
+ // 濡傛灉鏈夋椂闂磋寖鍥村弬鏁�
+ if (
+ this.queryParams.allocationTimeRange &&
+ this.queryParams.allocationTimeRange.length === 2
+ ) {
+ params.allocationTimeStart =
+ this.queryParams.allocationTimeRange[0] + " 00:00:00";
+ params.allocationTimeEnd =
+ this.queryParams.allocationTimeRange[1] + " 23:59:59";
+ }
+
+ allocationList(params)
.then(response => {
if (response.code === 200) {
- this.organAllocationList = response.data.rows;
- this.total = response.data.total;
+ this.organAllocationList = response.data || [];
+ this.total = response.total || 0;
} else {
- this.$message.error("鑾峰彇鏁版嵁澶辫触");
+ this.$message.error(response.msg || "鑾峰彇鏁版嵁澶辫触");
}
this.loading = false;
})
@@ -270,7 +348,8 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id);
+ this.ids = selection.map(item => item.infoid);
+ this.selectedRows = selection;
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -278,7 +357,7 @@
handleView(row) {
this.$router.push({
path: "/case/allocationInfo",
- query: { id: row.id }
+ query: { id: row.id, infoid: row.infoid }
});
},
// 鏂板鎸夐挳鎿嶄綔
@@ -287,27 +366,34 @@
},
// 淇敼鎸夐挳鎿嶄綔
handleUpdate(row) {
- const id = row.id || this.ids[0];
this.$router.push({
path: "/case/allocationInfo",
- query: { id: id }
+ query: { id: row.id, infoid: row.infoid }
});
},
// 鍒犻櫎鎸夐挳鎿嶄綔
handleDelete(row) {
- const ids = row.id ? [row.id] : this.ids;
+ const selectedRow =
+ row || (this.selectedRows.length === 1 ? this.selectedRows[0] : null);
+ if (!selectedRow) {
+ this.$message.warning("璇烽�夋嫨涓�鏉¤褰�");
+ return;
+ }
+
this.$confirm("鏄惁纭鍒犻櫎閫変腑鐨勬暟鎹」锛�", "璀﹀憡", {
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
})
.then(() => {
- return delOrganAllocation(ids);
+ // return allocationdelete([selectedRow.infoid]);
})
.then(response => {
if (response.code === 200) {
this.$message.success("鍒犻櫎鎴愬姛");
this.getList();
+ } else {
+ this.$message.error(response.msg || "鍒犻櫎澶辫触");
}
})
.catch(() => {});
--
Gitblit v1.9.3