|
|
@@ -24,20 +24,7 @@
|
|
|
<BasicTable @register="registerTable" @edit-change="callEditChange">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- auth: 'archives:diagnosisHistory:edit',
|
|
|
- icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
- tooltip: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否取消删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDel.bind(null, record, column),
|
|
|
- },
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ <TableAction :actions="createActions(record, column)" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
@@ -46,20 +33,7 @@
|
|
|
<BasicTable @register="registerTableOperation" @edit-change="callEditChange">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- auth: 'archives:diagnosisHistory:edit',
|
|
|
- icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
- tooltip: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否取消删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDel.bind(null, record, column),
|
|
|
- },
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ <TableAction :actions="createActions(record, column)" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
@@ -68,20 +42,7 @@
|
|
|
<BasicTable @register="registerTableContagious" @edit-change="callEditChange">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- auth: 'archives:diagnosisHistory:edit',
|
|
|
- icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
- tooltip: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否取消删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDel.bind(null, record, column),
|
|
|
- },
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ <TableAction :actions="createActions(record, column)" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
@@ -97,20 +58,7 @@
|
|
|
<BasicTable @register="registerTableMulti" @edit-change="callEditChange">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- auth: 'archives:diagnosisHistory:edit',
|
|
|
- icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
- tooltip: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否取消删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDel.bind(null, record, column),
|
|
|
- },
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ <TableAction :actions="createActions(record, column)" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
@@ -119,20 +67,7 @@
|
|
|
<BasicTable @register="registerTableOther" @edit-change="callEditChange">
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'action'">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- auth: 'archives:diagnosisHistory:edit',
|
|
|
- icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
- tooltip: '删除',
|
|
|
- popConfirm: {
|
|
|
- title: '是否取消删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDel.bind(null, record, column),
|
|
|
- },
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ <TableAction :actions="createActions(record, column)" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
@@ -146,7 +81,7 @@
|
|
|
import { ref, unref, nextTick, reactive } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { BasicForm, useForm } from '/@/components/Form';
|
|
|
- import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
|
|
+ import { BasicTable, useTable, TableAction, BasicColumn, ActionItem } from '/@/components/Table';
|
|
|
import { PlusOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
@@ -424,7 +359,20 @@
|
|
|
dataSource: tableDataOther.value,
|
|
|
columns: columnsOther,
|
|
|
});
|
|
|
-
|
|
|
+ // 创建 删除 按钮
|
|
|
+ function createActions(record, column: BasicColumn): ActionItem[] {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ auth: 'archives:diagnosisHistory:edit',
|
|
|
+ icon: 'icon-xt-details_delete_default|iconfont',
|
|
|
+ tooltip: '删除',
|
|
|
+ popConfirm: {
|
|
|
+ title: '是否取消删除',
|
|
|
+ confirm: handleDel.bind(null, record, column),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
async function handleAdd() {
|
|
|
if (type.value == DiagnosisEnum.allergic_field) {
|
|
|
tableDataAllergic.value.push({
|