|
|
@@ -16,10 +16,12 @@
|
|
|
<Col :span="6">
|
|
|
<Card title="病区属性" style="height: 680px">
|
|
|
<template #extra
|
|
|
- ><Button size="small" v-auth="['sys:wardProperties:add']" @click="handleAddAttr"
|
|
|
- >+</Button
|
|
|
- ></template
|
|
|
- >
|
|
|
+ ><Button
|
|
|
+ shape="circle"
|
|
|
+ v-auth="['bizSys:wardProperties:add']"
|
|
|
+ @click="handleAddAttr"
|
|
|
+ ><Icon icon="icon-plus|iconfont" :size="14" /></Button
|
|
|
+ ></template>
|
|
|
<Row>
|
|
|
<div class="type-title">阴性</div>
|
|
|
</Row>
|
|
|
@@ -52,10 +54,9 @@
|
|
|
<Col :span="17">
|
|
|
<Card title="病区信息" style="height: 680px">
|
|
|
<template #extra
|
|
|
- ><Button size="small" v-auth="['sys:wardInfo:add']" @click="handleAddInfo"
|
|
|
- >+</Button
|
|
|
- ></template
|
|
|
- >
|
|
|
+ ><Button shape="circle" v-auth="['bizSys:wardInfo:add']" @click="handleAddInfo"
|
|
|
+ ><Icon icon="icon-plus|iconfont" :size="14" /></Button
|
|
|
+ ></template>
|
|
|
<BasicTable @register="registerTable">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'disable'">
|
|
|
@@ -67,7 +68,7 @@
|
|
|
<TableAction
|
|
|
:actions="[
|
|
|
{
|
|
|
- auth: 'sys:wardInfo:status',
|
|
|
+ auth: 'bizSys:wardInfo:status',
|
|
|
icon: 'icon-minus-square|iconfont',
|
|
|
tooltip: '停用',
|
|
|
label: '',
|
|
|
@@ -80,7 +81,7 @@
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- auth: 'sys:wardInfo:status',
|
|
|
+ auth: 'bizSys:wardInfo:status',
|
|
|
icon: 'icon-plus|iconfont',
|
|
|
tooltip: '启用',
|
|
|
label: '',
|
|
|
@@ -93,7 +94,79 @@
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- auth: 'sys:wardInfo:edit',
|
|
|
+ auth: 'bizSys:wardInfo:edit',
|
|
|
+ icon: 'icon-edit|iconfont',
|
|
|
+ tooltip: '编辑',
|
|
|
+ label: '',
|
|
|
+ onClick: handleEdit.bind(null, record),
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </BasicTable>
|
|
|
+ </Card>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </p>
|
|
|
+ <p :key="1" v-else>
|
|
|
+ <Row>
|
|
|
+ <Col :span="6">
|
|
|
+ <Card title="工作日配置" style="height: 680px">
|
|
|
+ <template #extra
|
|
|
+ ><Button shape="circle" v-auth="['bizSys:workday:edit']" @click="handleEditWorkDay">
|
|
|
+ <Icon icon="icon-edit|iconfont" :size="14" /></Button
|
|
|
+ ></template>
|
|
|
+ <Row v-for="(item, index) in workDays" :key="index">
|
|
|
+ <div class="wrak-day">{{ item.label }}</div>
|
|
|
+ </Row>
|
|
|
+ </Card>
|
|
|
+ </Col>
|
|
|
+ <Col :span="1" />
|
|
|
+ <Col :span="17">
|
|
|
+ <Card title="班次配置" style="height: 680px">
|
|
|
+ <template #extra
|
|
|
+ ><Button v-auth="['bizSys:wardInfo:add']" @click="handleAddSailing" shape="circle"
|
|
|
+ ><Icon icon="icon-edit|iconfont" :size="14" /></Button
|
|
|
+ ></template>
|
|
|
+ <BasicTable @register="registerSailingsTable">
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
+ <template v-if="column.key === 'disable'">
|
|
|
+ <Tag :color="formatDictColor(disableOptions, record.disable)">
|
|
|
+ {{ formatDictValue(disableOptions, record.disable) }}
|
|
|
+ </Tag>
|
|
|
+ </template>
|
|
|
+ <template v-if="column.key === 'action'">
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ auth: 'bizSys:wardInfo:status',
|
|
|
+ icon: 'icon-minus-square|iconfont',
|
|
|
+ tooltip: '停用',
|
|
|
+ label: '',
|
|
|
+ color: 'error',
|
|
|
+ ifShow: record.disable == 0,
|
|
|
+ popConfirm: {
|
|
|
+ title: '是否确认停用',
|
|
|
+ placement: 'left',
|
|
|
+ confirm: handleChangeState.bind(null, record),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: 'bizSys:wardInfo:status',
|
|
|
+ icon: 'icon-plus|iconfont',
|
|
|
+ tooltip: '启用',
|
|
|
+ label: '',
|
|
|
+ ifShow: record.disable == 1,
|
|
|
+ color: 'error',
|
|
|
+ popConfirm: {
|
|
|
+ title: '是否确认启用',
|
|
|
+ placement: 'left',
|
|
|
+ confirm: handleChangeState.bind(null, record),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ auth: 'bizSys:wardInfo:edit',
|
|
|
icon: 'icon-edit|iconfont',
|
|
|
tooltip: '编辑',
|
|
|
label: '',
|
|
|
@@ -108,23 +181,28 @@
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</p>
|
|
|
- <p :key="1" v-else> 班次设置 </p>
|
|
|
</Card>
|
|
|
</PageWrapper>
|
|
|
<WardTypeFormModal @register="registerWardTypeModal" @success="handleWardTypeSuccess" />
|
|
|
<WardInfoFormModal @register="registerWardInfoModal" @success="handleWardInfoSuccess" />
|
|
|
+ <WorkDayFormModal @register="registerWorkDayModal" @success="handleWorkDaySuccess" />
|
|
|
+ <SailingEdit @register="registerSailingEditModal" @success="handleSailingSuccess" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { onBeforeMount, ref } from 'vue';
|
|
|
import { PageWrapper } from '/@/components/Page';
|
|
|
import { Button, Card, Row, Col, Tag } from 'ant-design-vue';
|
|
|
+ import Icon from '/@/components/Icon/src/Icon.vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
- import { wardInfoColumns } from './data';
|
|
|
+ import { wardInfoColumns, sailingsColumns } from './data';
|
|
|
import WardTypeFormModal from './wardTypeFormModal.vue';
|
|
|
import WardInfoFormModal from './wardInfoFormModal.vue';
|
|
|
+ import WorkDayFormModal from './workDayFormModal.vue';
|
|
|
+ import SailingEdit from './sailingsEditFormModal.vue';
|
|
|
import { getWardInfo, changeStatus } from '/@/api/biz/management/wardInfo';
|
|
|
import { getAttrList, deleteWardType } from '/@/api/biz/management/wardType';
|
|
|
+ import { getWorkingDay, getSailings } from '/@/api/biz/management/working';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import { listDictModel } from '/@/api/common';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
@@ -137,10 +215,12 @@
|
|
|
const activeKey = ref(0);
|
|
|
const attributePositiveList = ref([]); // 阳性列表
|
|
|
const attributeFeminineList = ref([]); // 阴性列表
|
|
|
+ const workDays = ref([]);
|
|
|
const disableOptions = ref();
|
|
|
onBeforeMount(async () => {
|
|
|
disableOptions.value = await listDictModel({ dictCode: 'sys_disable_type' });
|
|
|
await getWardType();
|
|
|
+ await getWordDay();
|
|
|
});
|
|
|
const [registerTable, { reload }] = useTable({
|
|
|
api: getWardInfo,
|
|
|
@@ -169,8 +249,23 @@
|
|
|
sortFn: handleSortFn,
|
|
|
});
|
|
|
|
|
|
+ const [registerSailingsTable, { reload: SailingsReload }] = useTable({
|
|
|
+ api: getSailings,
|
|
|
+ columns: sailingsColumns,
|
|
|
+ showIndexColumn: false,
|
|
|
+ formConfig: {
|
|
|
+ labelWidth: 120,
|
|
|
+ autoSubmitOnEnter: true,
|
|
|
+ baseColProps: { xs: 24, sm: 12, md: 12, lg: 8 },
|
|
|
+ },
|
|
|
+ useSearchForm: false,
|
|
|
+ bordered: true,
|
|
|
+ });
|
|
|
+
|
|
|
const [registerWardTypeModal, { openModal: openWardTypeModal }] = useModal();
|
|
|
const [registerWardInfoModal, { openModal: openWardInfoModal }] = useModal();
|
|
|
+ const [registerWorkDayModal, { openModal: openWorkDayModal }] = useModal();
|
|
|
+ const [registerSailingEditModal, { openModal: openSailingModal }] = useModal();
|
|
|
const tableSort = ref([
|
|
|
{
|
|
|
field: 'sort',
|
|
|
@@ -216,6 +311,14 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ //打开编辑工作日方法
|
|
|
+ function handleEditWorkDay() {
|
|
|
+ openWorkDayModal(true, {
|
|
|
+ record: workDays.value,
|
|
|
+ isUpdate: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
// 打开编辑病区信息方法
|
|
|
function handleEdit(record: Recordable) {
|
|
|
openWardInfoModal(true, {
|
|
|
@@ -244,6 +347,7 @@
|
|
|
|
|
|
function handleWardInfoSuccess() {
|
|
|
reload();
|
|
|
+ SailingsReload();
|
|
|
}
|
|
|
|
|
|
async function getWardType() {
|
|
|
@@ -263,6 +367,100 @@
|
|
|
selectType.value = e.key;
|
|
|
reload();
|
|
|
}
|
|
|
+
|
|
|
+ // 获取工作日
|
|
|
+ async function getWordDay() {
|
|
|
+ const res = await getWorkingDay();
|
|
|
+ const workDay = [];
|
|
|
+ Object.keys(res).forEach((value, index) => {
|
|
|
+ if (res[value]) {
|
|
|
+ switch (value) {
|
|
|
+ case 'monday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周一',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'tuesday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周二',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'wednesday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周三',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'thursday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周四',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'friday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周五',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'saturday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周六',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ case 'sunday': {
|
|
|
+ workDay.push({
|
|
|
+ name: value,
|
|
|
+ key: index,
|
|
|
+ value: res[value],
|
|
|
+ label: '周日',
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ workDays.value = workDay;
|
|
|
+ }
|
|
|
+ // 新增班次
|
|
|
+ function handleAddSailing() {
|
|
|
+ openSailingModal(true, {});
|
|
|
+ }
|
|
|
+
|
|
|
+ async function handleWorkDaySuccess() {
|
|
|
+ await getWordDay();
|
|
|
+ }
|
|
|
+
|
|
|
+ async function handleSailingSuccess() {
|
|
|
+ await SailingsReload();
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
@@ -286,6 +484,15 @@
|
|
|
border-radius: 4px !important;
|
|
|
border: 1px solid #c2ccd4 !important;
|
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
-function $forceUpdate() { throw new Error('Function not implemented.'); }
|
|
|
+ .wrak-day {
|
|
|
+ width: 28px;
|
|
|
+ height: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #000a18;
|
|
|
+ line-height: 20px;
|
|
|
+ }
|
|
|
+</style>
|