|
@@ -1,3 +1,5 @@
|
|
|
|
|
+pick(['st_patrol_time','st_family_name'])
|
|
|
|
|
+
|
|
|
<template>
|
|
<template>
|
|
|
<div class="m-4">
|
|
<div class="m-4">
|
|
|
<div>
|
|
<div>
|
|
@@ -12,11 +14,22 @@
|
|
|
/>
|
|
/>
|
|
|
<XTForm :form-data="formData" @change="callFormChange" @click="callFormClick" />
|
|
<XTForm :form-data="formData" @change="callFormChange" @click="callFormClick" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="flex mb-2" v-if="siftData.length">
|
|
|
|
|
+ <Sift :data="siftData" />
|
|
|
|
|
+ </div>
|
|
|
<BasicTable @register="registerTable">
|
|
<BasicTable @register="registerTable">
|
|
|
<template #bodyCell="{ column, record }">
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'name'">
|
|
<template v-if="column.key === 'name'">
|
|
|
<span :class="['table-dot', 'table-dot--' + record.status]" />
|
|
<span :class="['table-dot', 'table-dot--' + record.status]" />
|
|
|
- <span>{{ record.name }}</span>
|
|
|
|
|
|
|
+ <span :title="record.name">{{ record.name }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-if="column.dataIndex === 'updatorName'">
|
|
|
|
|
+ <Image
|
|
|
|
|
+ v-if="record.updateAvatar"
|
|
|
|
|
+ :src="record.updateAvatar"
|
|
|
|
|
+ style="width: 20; height: 20px"
|
|
|
|
|
+ />
|
|
|
|
|
+ {{ record.updatorName }}
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="column.key === 'gender'">
|
|
<template v-if="column.key === 'gender'">
|
|
|
<Icon
|
|
<Icon
|
|
@@ -42,7 +55,6 @@
|
|
|
tooltip: '查房记录',
|
|
tooltip: '查房记录',
|
|
|
label: '查房记录',
|
|
label: '查房记录',
|
|
|
onClick: handleDetail.bind(null, record),
|
|
onClick: handleDetail.bind(null, record),
|
|
|
- // ifShow: !record.master,
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
auth: 'archives:patrolWard:edit',
|
|
auth: 'archives:patrolWard:edit',
|
|
@@ -51,10 +63,10 @@
|
|
|
onClick: handleEdit.bind(null, record),
|
|
onClick: handleEdit.bind(null, record),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- auth: 'storage:config:remove',
|
|
|
|
|
|
|
+ auth: 'archives:patrolWard:followOrNo',
|
|
|
tooltip: '关注',
|
|
tooltip: '关注',
|
|
|
label: '关注',
|
|
label: '关注',
|
|
|
- color: 'error',
|
|
|
|
|
|
|
+ ifShow: record.status > 1,
|
|
|
popConfirm: {
|
|
popConfirm: {
|
|
|
title: '是否确定要关注?',
|
|
title: '是否确定要关注?',
|
|
|
placement: 'left',
|
|
placement: 'left',
|
|
@@ -62,21 +74,21 @@
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- auth: 'storage:config:remove',
|
|
|
|
|
|
|
+ auth: 'archives:patrolWard:followOrNo',
|
|
|
tooltip: '取消关注',
|
|
tooltip: '取消关注',
|
|
|
label: '取消关注',
|
|
label: '取消关注',
|
|
|
- color: 'error',
|
|
|
|
|
|
|
+ ifShow: record.status == 1,
|
|
|
popConfirm: {
|
|
popConfirm: {
|
|
|
title: '是否确定要取消关注?',
|
|
title: '是否确定要取消关注?',
|
|
|
placement: 'left',
|
|
placement: 'left',
|
|
|
- confirm: handleCancel.bind(null, record),
|
|
|
|
|
|
|
+ confirm: handleClick.bind(null, record),
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
]"
|
|
]"
|
|
|
:actions="[
|
|
:actions="[
|
|
|
{
|
|
{
|
|
|
auth: 'archives:patrolWard:query',
|
|
auth: 'archives:patrolWard:query',
|
|
|
- icon: 'icon-eye|iconfont',
|
|
|
|
|
|
|
+ icon: 'icon-xt-ward_default|iconfont',
|
|
|
tooltip: '查房',
|
|
tooltip: '查房',
|
|
|
onClick: handleView.bind(null, record),
|
|
onClick: handleView.bind(null, record),
|
|
|
},
|
|
},
|
|
@@ -88,7 +100,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<FormModal @register="registerModal" @success="handleSuccess" />
|
|
<FormModal @register="registerModal" @success="handleSuccess" />
|
|
|
<ViewDrawer @register="registerDrawerView" @success="handleSuccess" />
|
|
<ViewDrawer @register="registerDrawerView" @success="handleSuccess" />
|
|
|
- <!-- <DatailModal @register="registerModalView" /> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -97,11 +108,11 @@
|
|
|
import { XTTab } from '/@/components/XTTab/index';
|
|
import { XTTab } from '/@/components/XTTab/index';
|
|
|
import { XTForm } from '/@/components/XTForm/index';
|
|
import { XTForm } from '/@/components/XTForm/index';
|
|
|
import { Icon } from '/@/components/Icon';
|
|
import { Icon } from '/@/components/Icon';
|
|
|
|
|
+ import { Image } from 'ant-design-vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
|
- import { BasicTab, BasicTabActive, checkColumns } from './data';
|
|
|
|
|
|
|
+ import { checkColumns, BasicTabActive, BasicTab } from './data';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
import { useRouter } from 'vue-router';
|
|
|
-
|
|
|
|
|
import {
|
|
import {
|
|
|
checkQueryCheckRoomRecord,
|
|
checkQueryCheckRoomRecord,
|
|
|
checkQueryPersonNumber,
|
|
checkQueryPersonNumber,
|
|
@@ -114,9 +125,9 @@
|
|
|
import FormModal from './formModal.vue';
|
|
import FormModal from './formModal.vue';
|
|
|
import ViewDrawer from './viewDrawer.vue';
|
|
import ViewDrawer from './viewDrawer.vue';
|
|
|
import { useDrawer } from '@/components/Drawer';
|
|
import { useDrawer } from '@/components/Drawer';
|
|
|
-
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
|
|
|
|
|
|
+ // const bizDictOptions = reactive<any>({});
|
|
|
//路由跳转
|
|
//路由跳转
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -124,31 +135,11 @@
|
|
|
const tabData = ref(BasicTab);
|
|
const tabData = ref(BasicTab);
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
const [registerDrawerView, { openDrawer, openDrawer: openDrawerView }] = useDrawer();
|
|
const [registerDrawerView, { openDrawer, openDrawer: openDrawerView }] = useDrawer();
|
|
|
-
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
- const stats = await checkQueryPersonNumber();
|
|
|
|
|
- console.log('🚀 ~ file: index.vue:104 ~ onMounted ~ stats:', stats);
|
|
|
|
|
- tabData.value = tabData.value.map(ele => {
|
|
|
|
|
- if (ele.key == '0') {
|
|
|
|
|
- ele.value = stats.all;
|
|
|
|
|
- }
|
|
|
|
|
- if (ele.key == '1') {
|
|
|
|
|
- ele.value = stats.dialysisPatients;
|
|
|
|
|
- }
|
|
|
|
|
- if (ele.key == '2') {
|
|
|
|
|
- ele.value = stats.noDialysisPatients;
|
|
|
|
|
- }
|
|
|
|
|
- if (ele.key == '3') {
|
|
|
|
|
- ele.value = stats.newPatient;
|
|
|
|
|
- }
|
|
|
|
|
- if (ele.key == '4') {
|
|
|
|
|
- ele.value = stats.attention;
|
|
|
|
|
- }
|
|
|
|
|
- return ele;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ getTab();
|
|
|
console.log('🚀 ~ file: index.vue:118 ~ onMounted ~ tabData.value:', tabData.value);
|
|
console.log('🚀 ~ file: index.vue:118 ~ onMounted ~ tabData.value:', tabData.value);
|
|
|
});
|
|
});
|
|
|
- const [registerTable, { reload }] = useTable({
|
|
|
|
|
|
|
+ const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
|
|
|
api: checkQueryCheckRoomRecord,
|
|
api: checkQueryCheckRoomRecord,
|
|
|
// exportAuthList: ['sys:log:export'],
|
|
// exportAuthList: ['sys:log:export'],
|
|
|
rowKey: 'id',
|
|
rowKey: 'id',
|
|
@@ -174,10 +165,10 @@
|
|
|
componentType: 'Select',
|
|
componentType: 'Select',
|
|
|
placeholder: '请选择',
|
|
placeholder: '请选择',
|
|
|
width: 120,
|
|
width: 120,
|
|
|
- defaultValue: 'patrolTime',
|
|
|
|
|
|
|
+ defaultValue: 'st_patrol_time',
|
|
|
dicts: [
|
|
dicts: [
|
|
|
- { label: '按查房时间', value: 'patrolTime' },
|
|
|
|
|
- { label: '按姓氏', value: 'patientNamePinyin' },
|
|
|
|
|
|
|
+ { label: '按查房时间', value: 'st_patrol_time' },
|
|
|
|
|
+ { label: '按姓氏', value: 'st_family_name' },
|
|
|
],
|
|
],
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -191,25 +182,43 @@
|
|
|
|
|
|
|
|
const formValue = reactive({
|
|
const formValue = reactive({
|
|
|
name: '',
|
|
name: '',
|
|
|
|
|
+ tableSort: 'st_patrol_time',
|
|
|
}) as any;
|
|
}) as any;
|
|
|
|
|
|
|
|
|
|
+ async function getTab() {
|
|
|
|
|
+ const personNumber = await checkQueryPersonNumber();
|
|
|
|
|
+ console.log('🚀 ~ file: index.vue:104 ~ onMounted ~ stats:', personNumber);
|
|
|
|
|
+ tabData.value = tabData.value.map(ele => {
|
|
|
|
|
+ if (ele.key == '0') {
|
|
|
|
|
+ ele.value = personNumber.all;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ele.key == '1') {
|
|
|
|
|
+ ele.value = personNumber.attention;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ele.key == '2') {
|
|
|
|
|
+ ele.value = personNumber.newPatient;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ele.key == '3') {
|
|
|
|
|
+ ele.value = personNumber.dialysisPatients;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ele.key == '4') {
|
|
|
|
|
+ ele.value = personNumber.noDialysisPatients;
|
|
|
|
|
+ }
|
|
|
|
|
+ return ele;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
// 表格请求之前,对参数进行处理, 添加默认 排序
|
|
// 表格请求之前,对参数进行处理, 添加默认 排序
|
|
|
function handleBeforeFetch(params) {
|
|
function handleBeforeFetch(params) {
|
|
|
- // return { ...params, orders: tableSort.value };
|
|
|
|
|
- const sift = {};
|
|
|
|
|
- siftData.value.forEach(ele => {
|
|
|
|
|
- sift[ele.field] = ele.isDict ? ele.dict : ele.value;
|
|
|
|
|
- });
|
|
|
|
|
return {
|
|
return {
|
|
|
...params,
|
|
...params,
|
|
|
- queryType: activeKey.value == '0' ? '0' : activeKey.value,
|
|
|
|
|
|
|
+ patientType: activeKey.value == '0' ? '0' : activeKey.value,
|
|
|
name: formValue.name,
|
|
name: formValue.name,
|
|
|
- orders: [{ field: 'patrolTime', direction: 'DESC' }],
|
|
|
|
|
- sortType: 'st_patrol_time',
|
|
|
|
|
- ...sift,
|
|
|
|
|
|
|
+ orders: [],
|
|
|
|
|
+ sortType: formValue.tableSort,
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ // 'st_patrol_time','name'
|
|
|
|
|
+ // 'st_patrol_time','st_family_name'
|
|
|
function handleAfterFetch(data) {
|
|
function handleAfterFetch(data) {
|
|
|
// data.forEach(item => {
|
|
// data.forEach(item => {
|
|
|
// item.status = 2;
|
|
// item.status = 2;
|
|
@@ -235,12 +244,11 @@
|
|
|
name: record.name,
|
|
name: record.name,
|
|
|
gender: record.gender,
|
|
gender: record.gender,
|
|
|
age: record.age,
|
|
age: record.age,
|
|
|
|
|
+ activeKeys: 5,
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const { createMessage } = useMessage();
|
|
|
|
|
-
|
|
|
|
|
// 编辑按钮事件
|
|
// 编辑按钮事件
|
|
|
function handleEdit(record: Recordable) {
|
|
function handleEdit(record: Recordable) {
|
|
|
openModal(true, {
|
|
openModal(true, {
|
|
@@ -250,23 +258,33 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 取消按钮事件
|
|
// 取消按钮事件
|
|
|
- async function handleCancel(record) {
|
|
|
|
|
- // clearSelectedRowKeys();
|
|
|
|
|
- await checkFollowOrNo(record.id);
|
|
|
|
|
- createMessage.success('操作成功!');
|
|
|
|
|
|
|
+ const { createMessage } = useMessage();
|
|
|
|
|
+ async function handleCancel(record: Recordable) {
|
|
|
|
|
+ await checkFollowOrNo(record.patientBasicId);
|
|
|
|
|
+ createMessage.success('关注成功!');
|
|
|
|
|
+ clearSelectedRowKeys();
|
|
|
|
|
+ await getTab();
|
|
|
|
|
+ await reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ async function handleClick(record: Recordable) {
|
|
|
|
|
+ await checkFollowOrNo(record.patientBasicId);
|
|
|
|
|
+ createMessage.success('取消关注成功!');
|
|
|
|
|
+ clearSelectedRowKeys();
|
|
|
|
|
+ await getTab();
|
|
|
await reload();
|
|
await reload();
|
|
|
- // await getTab();
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 弹窗回调事件
|
|
// 弹窗回调事件
|
|
|
async function handleSuccess({ isUpdate, values }) {
|
|
async function handleSuccess({ isUpdate, values }) {
|
|
|
console.log(isUpdate);
|
|
console.log(isUpdate);
|
|
|
console.log(values);
|
|
console.log(values);
|
|
|
|
|
+ await getTab();
|
|
|
await reload();
|
|
await reload();
|
|
|
}
|
|
}
|
|
|
// 回调
|
|
// 回调
|
|
|
async function callTab(data) {
|
|
async function callTab(data) {
|
|
|
activeKey.value = data.value;
|
|
activeKey.value = data.value;
|
|
|
|
|
+ await getTab();
|
|
|
await reload();
|
|
await reload();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -281,6 +299,9 @@
|
|
|
|
|
|
|
|
async function callFormChange(data) {
|
|
async function callFormChange(data) {
|
|
|
formValue.name = data.name ? data.name : '';
|
|
formValue.name = data.name ? data.name : '';
|
|
|
|
|
+ // formValue.patientName = data.patientName ? data.patientName : '';
|
|
|
|
|
+ formValue.tableSort = data.tableSort ? data.tableSort : '';
|
|
|
|
|
+ await getTab();
|
|
|
await reload();
|
|
await reload();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -312,20 +333,20 @@
|
|
|
margin-right: 6px;
|
|
margin-right: 6px;
|
|
|
border-radius: 50%;
|
|
border-radius: 50%;
|
|
|
|
|
|
|
|
- &hb--1 {
|
|
|
|
|
- background-color: #1bc1b3;
|
|
|
|
|
|
|
+ &--1 {
|
|
|
|
|
+ background-color: #3cf;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&--2 {
|
|
&--2 {
|
|
|
- background-color: #d3d8dd;
|
|
|
|
|
|
|
+ background-color: #f7b500;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&--3 {
|
|
&--3 {
|
|
|
- background-color: #f7b500;
|
|
|
|
|
|
|
+ background-color: #d3d8dd;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&--4 {
|
|
&--4 {
|
|
|
- background-color: #3cf;
|
|
|
|
|
|
|
+ background-color: #1bc1b3;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|