|
@@ -12,15 +12,24 @@
|
|
|
/>
|
|
/>
|
|
|
<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" @close="callClose" />
|
|
|
|
|
- </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>{{ record.name }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template v-if="column.key === 'gender'">
|
|
|
|
|
+ <Icon
|
|
|
|
|
+ v-if="record.gender == 'pb_sex_man'"
|
|
|
|
|
+ icon="icon-xt-male_sm|iconfont"
|
|
|
|
|
+ color="#0057FF"
|
|
|
|
|
+ />
|
|
|
|
|
+ <Icon
|
|
|
|
|
+ v-if="record.gender == 'pb_sex_woman'"
|
|
|
|
|
+ icon="icon-xt-female_sm|iconfont"
|
|
|
|
|
+ color="#FF0066"
|
|
|
|
|
+ />({{ record.age }})</template
|
|
|
|
|
+ >
|
|
|
<template v-if="column.key === 'patrolTime'">
|
|
<template v-if="column.key === 'patrolTime'">
|
|
|
{{ record.patrolTime ? dayjs(record.patrolTime).format('YYYY-MM-DD') : '' }}
|
|
{{ record.patrolTime ? dayjs(record.patrolTime).format('YYYY-MM-DD') : '' }}
|
|
|
</template>
|
|
</template>
|
|
@@ -29,35 +38,46 @@
|
|
|
<TableAction
|
|
<TableAction
|
|
|
:dropDownActions="[
|
|
:dropDownActions="[
|
|
|
{
|
|
{
|
|
|
- auth: 'storage:config:edit',
|
|
|
|
|
|
|
+ auth: 'storage:config:query',
|
|
|
tooltip: '查房记录',
|
|
tooltip: '查房记录',
|
|
|
label: '查房记录',
|
|
label: '查房记录',
|
|
|
- ifShow: !record.master,
|
|
|
|
|
|
|
+ onClick: handleDetail.bind(null, record),
|
|
|
|
|
+ // ifShow: !record.master,
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- auth: 'storage:config:edit',
|
|
|
|
|
|
|
+ auth: 'archives:patrolWard:edit',
|
|
|
tooltip: '编辑',
|
|
tooltip: '编辑',
|
|
|
label: '编辑',
|
|
label: '编辑',
|
|
|
onClick: handleEdit.bind(null, record),
|
|
onClick: handleEdit.bind(null, record),
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ auth: 'storage:config:remove',
|
|
|
|
|
+ tooltip: '关注',
|
|
|
|
|
+ label: '关注',
|
|
|
|
|
+ color: 'error',
|
|
|
|
|
+ popConfirm: {
|
|
|
|
|
+ title: '是否确定要关注?',
|
|
|
|
|
+ placement: 'left',
|
|
|
|
|
+ confirm: handleCancel.bind(null, record),
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
auth: 'storage:config:remove',
|
|
auth: 'storage:config:remove',
|
|
|
tooltip: '取消关注',
|
|
tooltip: '取消关注',
|
|
|
label: '取消关注',
|
|
label: '取消关注',
|
|
|
color: 'error',
|
|
color: 'error',
|
|
|
- // popConfirm: {
|
|
|
|
|
- // title: '是否确定要取消关注?',
|
|
|
|
|
- // placement: 'left',
|
|
|
|
|
- // confirm: handleDelete.bind(null, record),
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ popConfirm: {
|
|
|
|
|
+ title: '是否确定要取消关注?',
|
|
|
|
|
+ placement: 'left',
|
|
|
|
|
+ confirm: handleCancel.bind(null, record),
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
]"
|
|
]"
|
|
|
:actions="[
|
|
:actions="[
|
|
|
{
|
|
{
|
|
|
- auth: 'sys:log:query',
|
|
|
|
|
- // icon: 'icon-eye|iconfont',
|
|
|
|
|
|
|
+ auth: 'archives:patrolWard:query',
|
|
|
|
|
+ icon: 'icon-eye|iconfont',
|
|
|
tooltip: '查房',
|
|
tooltip: '查房',
|
|
|
- label: '查房',
|
|
|
|
|
onClick: handleView.bind(null, record),
|
|
onClick: handleView.bind(null, record),
|
|
|
},
|
|
},
|
|
|
]"
|
|
]"
|
|
@@ -68,6 +88,7 @@
|
|
|
</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>
|
|
|
|
|
|
|
@@ -75,16 +96,18 @@
|
|
|
import { XTTitle } from '/@/components/XTTitle/index';
|
|
import { XTTitle } from '/@/components/XTTitle/index';
|
|
|
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 { Sift } from '/@/components/XTList/index';
|
|
|
|
|
|
|
+ import { Icon } from '/@/components/Icon';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
|
- import { BasicTab, BasicTabActive, columns } from './data';
|
|
|
|
|
|
|
+ import { BasicTab, BasicTabActive, checkColumns } from './data';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
- // import { useRouter } from 'vue-router';
|
|
|
|
|
|
|
+ import { useRouter } from 'vue-router';
|
|
|
|
|
+
|
|
|
import {
|
|
import {
|
|
|
- archivesPatrolWardQueryCheckRoomRecord,
|
|
|
|
|
- archivesPatrolWardQueryPersonNumber,
|
|
|
|
|
|
|
+ checkQueryCheckRoomRecord,
|
|
|
|
|
+ checkQueryPersonNumber,
|
|
|
|
|
+ checkFollowOrNo,
|
|
|
} from '/@/api/biz/visit/checkApi';
|
|
} from '/@/api/biz/visit/checkApi';
|
|
|
- // import { formatDictColor, formatDictFontColor, formatDictValue } from '/@/utils';
|
|
|
|
|
|
|
+
|
|
|
import { onMounted, reactive } from 'vue';
|
|
import { onMounted, reactive } from 'vue';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
@@ -92,42 +115,44 @@
|
|
|
import ViewDrawer from './viewDrawer.vue';
|
|
import ViewDrawer from './viewDrawer.vue';
|
|
|
import { useDrawer } from '@/components/Drawer';
|
|
import { useDrawer } from '@/components/Drawer';
|
|
|
|
|
|
|
|
- // const bizDictOptions = reactive<any>({});
|
|
|
|
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
|
+
|
|
|
//路由跳转
|
|
//路由跳转
|
|
|
- // const router = useRouter();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const router = useRouter();
|
|
|
const activeKey = ref(BasicTabActive);
|
|
const activeKey = ref(BasicTabActive);
|
|
|
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 personNumber = await archivesPatrolWardQueryPersonNumber();
|
|
|
|
|
- console.log('🚀 ~ file: index.vue:104 ~ onMounted ~ stats:', personNumber);
|
|
|
|
|
|
|
+ const stats = await checkQueryPersonNumber();
|
|
|
|
|
+ console.log('🚀 ~ file: index.vue:104 ~ onMounted ~ stats:', stats);
|
|
|
tabData.value = tabData.value.map(ele => {
|
|
tabData.value = tabData.value.map(ele => {
|
|
|
if (ele.key == '0') {
|
|
if (ele.key == '0') {
|
|
|
- ele.value = personNumber.all;
|
|
|
|
|
|
|
+ ele.value = stats.all;
|
|
|
}
|
|
}
|
|
|
if (ele.key == '1') {
|
|
if (ele.key == '1') {
|
|
|
- ele.value = personNumber.dialysisPatients;
|
|
|
|
|
|
|
+ ele.value = stats.dialysisPatients;
|
|
|
}
|
|
}
|
|
|
if (ele.key == '2') {
|
|
if (ele.key == '2') {
|
|
|
- ele.value = personNumber.noDialysisPatients;
|
|
|
|
|
|
|
+ ele.value = stats.noDialysisPatients;
|
|
|
}
|
|
}
|
|
|
if (ele.key == '3') {
|
|
if (ele.key == '3') {
|
|
|
- ele.value = personNumber.newPatient;
|
|
|
|
|
|
|
+ ele.value = stats.newPatient;
|
|
|
}
|
|
}
|
|
|
if (ele.key == '4') {
|
|
if (ele.key == '4') {
|
|
|
- ele.value = personNumber.attention;
|
|
|
|
|
|
|
+ ele.value = stats.attention;
|
|
|
}
|
|
}
|
|
|
return ele;
|
|
return ele;
|
|
|
});
|
|
});
|
|
|
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 }] = useTable({
|
|
|
- api: archivesPatrolWardQueryCheckRoomRecord,
|
|
|
|
|
|
|
+ api: checkQueryCheckRoomRecord,
|
|
|
// exportAuthList: ['sys:log:export'],
|
|
// exportAuthList: ['sys:log:export'],
|
|
|
rowKey: 'id',
|
|
rowKey: 'id',
|
|
|
- columns,
|
|
|
|
|
|
|
+ columns: checkColumns,
|
|
|
showIndexColumn: true,
|
|
showIndexColumn: true,
|
|
|
bordered: true,
|
|
bordered: true,
|
|
|
actionColumn: {
|
|
actionColumn: {
|
|
@@ -138,6 +163,7 @@
|
|
|
beforeFetch: handleBeforeFetch,
|
|
beforeFetch: handleBeforeFetch,
|
|
|
afterFetch: handleAfterFetch,
|
|
afterFetch: handleAfterFetch,
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
// 筛选数据
|
|
// 筛选数据
|
|
|
const siftData = ref([]);
|
|
const siftData = ref([]);
|
|
|
|
|
|
|
@@ -185,6 +211,9 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function handleAfterFetch(data) {
|
|
function handleAfterFetch(data) {
|
|
|
|
|
+ // data.forEach(item => {
|
|
|
|
|
+ // item.status = 2;
|
|
|
|
|
+ // });
|
|
|
return data;
|
|
return data;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -196,6 +225,22 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //查房记录事件
|
|
|
|
|
+ function handleDetail(record: Recordable) {
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: '../../bizArchives/detail',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: record.id,
|
|
|
|
|
+ accessId: record.accessId,
|
|
|
|
|
+ name: record.name,
|
|
|
|
|
+ gender: record.gender,
|
|
|
|
|
+ age: record.age,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const { createMessage } = useMessage();
|
|
|
|
|
+
|
|
|
// 编辑按钮事件
|
|
// 编辑按钮事件
|
|
|
function handleEdit(record: Recordable) {
|
|
function handleEdit(record: Recordable) {
|
|
|
openModal(true, {
|
|
openModal(true, {
|
|
@@ -204,6 +249,15 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 取消按钮事件
|
|
|
|
|
+ async function handleCancel(record) {
|
|
|
|
|
+ // clearSelectedRowKeys();
|
|
|
|
|
+ await checkFollowOrNo(record.id);
|
|
|
|
|
+ createMessage.success('操作成功!');
|
|
|
|
|
+ await reload();
|
|
|
|
|
+ // await getTab();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 弹窗回调事件
|
|
// 弹窗回调事件
|
|
|
async function handleSuccess({ isUpdate, values }) {
|
|
async function handleSuccess({ isUpdate, values }) {
|
|
|
console.log(isUpdate);
|
|
console.log(isUpdate);
|
|
@@ -248,18 +302,34 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+</script>
|
|
|
|
|
|
|
|
- async function callClose(data) {
|
|
|
|
|
- if (data.type == 'clear') {
|
|
|
|
|
- console.log('清空全部');
|
|
|
|
|
- siftData.value = [];
|
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
|
+ .table-dot {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 10px;
|
|
|
|
|
+ height: 10px;
|
|
|
|
|
+ margin-right: 6px;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+
|
|
|
|
|
+ &hb--1 {
|
|
|
|
|
+ background-color: #1bc1b3;
|
|
|
}
|
|
}
|
|
|
- if (data.type == 'close') {
|
|
|
|
|
- console.log('删除部分条件');
|
|
|
|
|
- siftData.value = siftData.value.filter(ele => {
|
|
|
|
|
- return ele.field != data.item?.field;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ &--2 {
|
|
|
|
|
+ background-color: #d3d8dd;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &--3 {
|
|
|
|
|
+ background-color: #f7b500;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ &--4 {
|
|
|
|
|
+ background-color: #3cf;
|
|
|
}
|
|
}
|
|
|
- await reload();
|
|
|
|
|
}
|
|
}
|
|
|
-</script>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ ::v-deep(.ant-btn-link) {
|
|
|
|
|
+ color: rgb(61 65 85 / 100%);
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|