修复bug:长者管理-长者信息-护理流程功能无法正常使用
This commit is contained in:
parent
52bf0f075d
commit
315739f22d
|
|
@ -9,16 +9,8 @@
|
|||
<!-- <a-button type="primary" @click="getData(customerInfo)">加载</a-button> -->
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:14px;">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="dataSource"
|
||||
bordered
|
||||
size="small"
|
||||
:pagination="false"
|
||||
:rowClassName="setRowClassName"
|
||||
:customRow="handleCustomRow"
|
||||
@contextmenu.prevent
|
||||
>
|
||||
<a-table :columns="columns" :data-source="dataSource" bordered size="small" :pagination="false"
|
||||
:rowClassName="setRowClassName" :customRow="handleCustomRow" @contextmenu.prevent>
|
||||
<template #bodyCell="{ column, record, text }">
|
||||
<template v-if="column.key !== 'minute'">
|
||||
<a-tooltip :title="text" placement="topLeft">
|
||||
|
|
@ -34,17 +26,13 @@
|
|||
</a-row>
|
||||
|
||||
<!-- 右键菜单 -->
|
||||
<div
|
||||
v-if="contextMenu.visible"
|
||||
:style="{
|
||||
<div v-if="contextMenu.visible" :style="{
|
||||
position: 'fixed',
|
||||
left: `${contextMenu.x}px`,
|
||||
top: `${contextMenu.y}px`,
|
||||
zIndex: 1000,
|
||||
boxShadow: '0 2px 8px rgba(0,0,0,0.15)'
|
||||
}"
|
||||
class="context-menu"
|
||||
>
|
||||
}" class="context-menu">
|
||||
<a-menu @click="handleMenuClick" style="padding: 14px;">
|
||||
<a-menu-item key="add">新增数据</a-menu-item>
|
||||
<a-menu-item key="edit" :disabled="!contextMenu.record?.[contextMenu.columnKey]">编辑数据</a-menu-item>
|
||||
|
|
@ -53,12 +41,7 @@
|
|||
</div>
|
||||
|
||||
<!-- 数据操作模态框 -->
|
||||
<a-modal
|
||||
v-model:visible="modalVisible"
|
||||
:title="modalTitle"
|
||||
@ok="handleModalOk"
|
||||
@cancel="handleModalCancel"
|
||||
>
|
||||
<a-modal v-model:visible="modalVisible" :title="modalTitle" @ok="handleModalOk" @cancel="handleModalCancel">
|
||||
<a-form :model="formState" layout="vertical" style="padding:14px;">
|
||||
<a-form-item label="数据内容">
|
||||
<a-input v-model:value="formState.content" />
|
||||
|
|
@ -282,22 +265,21 @@ import { defHttp } from '/@/utils/http/axios';
|
|||
}
|
||||
function getData(record: any) {
|
||||
defHttp.get({
|
||||
url: "/nuIpadApi/nuBizNuCustomerServer/getNclist",
|
||||
params: { nuId: record.nuId, customerId: record.id }
|
||||
}).then((data) => {
|
||||
console.log("获取到的数据:", data);
|
||||
url: "/api/pad/care/directive/getNclist",
|
||||
params: { nuId: record.nuId, elderId: record.id }
|
||||
}).then((result) => {
|
||||
console.log("获取到的数据:", result);
|
||||
const data = result.serviceList
|
||||
|
||||
// 初始化数据源
|
||||
initDataSource();
|
||||
|
||||
// 处理返回的数据
|
||||
if (Array.isArray(data)) {
|
||||
data.forEach((hourData) => {
|
||||
const hour = parseInt(hourData.positioning);
|
||||
data.forEach((item) => {
|
||||
const hour = parseInt(item.positioning);
|
||||
|
||||
// 处理该小时的所有子项
|
||||
if (hourData.children && hourData.children.length > 0) {
|
||||
hourData.children.forEach((item) => {
|
||||
// 解析开始时间
|
||||
const [startHour, startMinute] = item.startTime.split(':').map(Number);
|
||||
const rowIndex = Math.floor(startMinute / 5); // 每5分钟一行
|
||||
|
|
@ -320,8 +302,7 @@ function getData(record: any) {
|
|||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log('12321312331', dataSource.value)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -356,6 +337,7 @@ function handleSaveBach(){
|
|||
.even-row {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.odd-row {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
|
@ -389,6 +371,7 @@ function handleSaveBach(){
|
|||
padding: 5px 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.cell-text {
|
||||
// display: inline-block;
|
||||
// max-width: 50px;
|
||||
|
|
@ -398,7 +381,8 @@ function handleSaveBach(){
|
|||
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2; /* 限制文本为2行 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制文本为2行 */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue