箱管换表

zth
lijingjia 1 week ago
parent fedb33e67a
commit 38a4f44a0d

@ -2,42 +2,41 @@
<div> <div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit"> <BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle> <template #tableTitle>
<a-button type="link" @click="handleCreate"> <span>
<span class="iconfont icon-tianjia"></span> <a-button type="link" @click="handleCreate">
新建 <span class="iconfont icon-tianjia"></span>
</a-button> 新建
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button> </a-button>
</a-popconfirm> <a-popconfirm
<a-button type="link" @click="Confirm"> title="确定删除当前选中数据?"
<span class="iconfont icon-yiwancheng2"></span> ok-text="是"
确认执行 cancel-text="否"
</a-button> @confirm="handleDel"
<a-button type="link" @click="Cancel"> >
<span class="iconfont icon-weiwancheng"></span> <a-button type="link">
取消确认 <span class="iconfont icon-shanchu21"></span>
</a-button> 删除
</a-button>
</a-popconfirm>
<a-button type="link" @click="Confirm">
<span class="iconfont icon-yiwancheng2"></span>
确认执行
</a-button>
<a-button type="link" @click="Cancel">
<span class="iconfont icon-weiwancheng"></span>
取消确认
</a-button>
</span>
</template> </template>
<template #bodyCell="{ column, record }"> <template v-slot:tableAction="{ record }">
<template v-if="column.key === 'action'"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<TableAction <template #title>
:actions="[ <span>编辑</span>
{ </template>
icon: 'clarity:note-edit-line', <a-button type="link" @click="handleAudit(record)">
tooltip: '编辑', <span class="iconfont icon-icon_519"></span>
onClick: handleAudit.bind(null, record), </a-button>
}, </a-tooltip>
]"
/>
</template>
</template> </template>
</BasicTable> </BasicTable>
@ -56,7 +55,7 @@
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getSelectRows }] = useTable({ const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -84,7 +83,7 @@
width: 60, width: 60,
}, },
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 15,
immediate: true, immediate: true,
actionColumn: { actionColumn: {
width: 80, width: 80,
@ -92,6 +91,9 @@
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
tableComponent: 'vxe',
autoHeight: window.innerHeight - 250,
id: '0'
}) })
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
@ -100,7 +102,7 @@
}) })
} }
function Confirm() { function Confirm() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -119,7 +121,7 @@
}) })
} }
function Cancel() { function Cancel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -139,7 +141,7 @@
} }
function handleDel() { function handleDel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
} }

@ -2,21 +2,23 @@
<div> <div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit"> <BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle> <template #tableTitle>
<a-button type="link" @click="handleCreate"> <span>
<span class="iconfont icon-tianjia"></span> <a-button type="link" @click="handleCreate">
新建 <span class="iconfont icon-tianjia"></span>
</a-button> 新建
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button> </a-button>
</a-popconfirm> <a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</span>
<!-- <a-button type="link" @click="Confirm"> <!-- <a-button type="link" @click="Confirm">
<span class="iconfont icon-yiwancheng2"></span> <span class="iconfont icon-yiwancheng2"></span>
确认执行 确认执行
@ -26,21 +28,17 @@
取消确认 取消确认
</a-button> --> </a-button> -->
</template> </template>
<template #bodyCell="{ column, record }"> <template v-slot:tableAction="{ record }">
<template v-if="column.key === 'action'"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<TableAction <template #title>
:actions="[ <span>编辑</span>
{ </template>
icon: 'clarity:note-edit-line', <a-button type="link" @click="handleAudit(record)">
tooltip: '编辑', <span class="iconfont icon-icon_519"></span>
onClick: handleAudit.bind(null, record), </a-button>
}, </a-tooltip>
]"
/>
</template>
</template> </template>
</BasicTable> </BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" /> <TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div> </div>
</template> </template>
@ -55,8 +53,9 @@
const { notification } = useMessage() const { notification } = useMessage()
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const tbHeight = window.innerHeight - 250
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getSelectRows }] = useTable({ const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -84,7 +83,9 @@
width: 60, width: 60,
}, },
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 15,
tableComponent: 'vxe',
autoHeight: tbHeight,
immediate: true, immediate: true,
actionColumn: { actionColumn: {
width: 80, width: 80,
@ -92,6 +93,7 @@
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
id: '0'
}) })
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
@ -100,7 +102,7 @@
}) })
} }
function Confirm() { function Confirm() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -119,7 +121,7 @@
}) })
} }
function Cancel() { function Cancel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -139,7 +141,7 @@
} }
function handleDel() { function handleDel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
} }

@ -2,21 +2,23 @@
<div> <div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit"> <BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle> <template #tableTitle>
<a-button type="link" @click="handleCreate"> <span>
<span class="iconfont icon-tianjia"></span> <a-button type="link" @click="handleCreate">
新建 <span class="iconfont icon-tianjia"></span>
</a-button> 新建
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button> </a-button>
</a-popconfirm> <a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="handleDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</span>
<!-- <a-button type="link" @click="Confirm"> <!-- <a-button type="link" @click="Confirm">
<span class="iconfont icon-yiwancheng2"></span> <span class="iconfont icon-yiwancheng2"></span>
确认执行 确认执行
@ -26,18 +28,15 @@
取消确认 取消确认
</a-button> --> </a-button> -->
</template> </template>
<template #bodyCell="{ column, record }"> <template v-slot:tableAction="{ record }">
<template v-if="column.key === 'action'"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<TableAction <template #title>
:actions="[ <span>编辑</span>
{ </template>
icon: 'clarity:note-edit-line', <a-button type="link" @click="handleAudit(record)">
tooltip: '编辑', <span class="iconfont icon-icon_519"></span>
onClick: handleAudit.bind(null, record), </a-button>
}, </a-tooltip>
]"
/>
</template>
</template> </template>
</BasicTable> </BasicTable>
@ -56,7 +55,7 @@
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getSelectRows }] = useTable({ const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -84,7 +83,7 @@
width: 60, width: 60,
}, },
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 15,
immediate: true, immediate: true,
actionColumn: { actionColumn: {
width: 80, width: 80,
@ -92,6 +91,9 @@
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
tableComponent: 'vxe',
autoHeight: window.innerHeight - 250,
id: '0'
}) })
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
@ -100,7 +102,7 @@
}) })
} }
function Confirm() { function Confirm() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -119,7 +121,7 @@
}) })
} }
function Cancel() { function Cancel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -139,7 +141,7 @@
} }
function handleDel() { function handleDel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
} }

@ -26,18 +26,15 @@
取消确认 取消确认
</a-button> --> </a-button> -->
</template> </template>
<template #bodyCell="{ column, record }"> <template v-slot:tableAction="{ record }">
<template v-if="column.key === 'action'"> <a-tooltip placement="top" :mouseEnterDelay="0.5">
<TableAction <template #title>
:actions="[ <span>编辑</span>
{ </template>
icon: 'clarity:note-edit-line', <a-button type="link" @click="handleAudit(record)">
tooltip: '编辑', <span class="iconfont icon-icon_519"></span>
onClick: handleAudit.bind(null, record), </a-button>
}, </a-tooltip>
]"
/>
</template>
</template> </template>
</BasicTable> </BasicTable>
@ -56,7 +53,7 @@
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getSelectRows }] = useTable({ const [registerTable, { reload, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -84,14 +81,17 @@
width: 60, width: 60,
}, },
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 15,
immediate: true, immediate: true,
actionColumn: { actionColumn: {
width: 80, width: 50,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
id:'0',
tableComponent: 'vxe',
autoHeight: window.innerHeight - 250
}) })
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
@ -100,7 +100,7 @@
}) })
} }
function Confirm() { function Confirm() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -119,7 +119,7 @@
}) })
} }
function Cancel() { function Cancel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
id: '', id: '',
ids: [], ids: [],
@ -139,7 +139,7 @@
} }
function handleDel() { function handleDel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
} }

@ -33,8 +33,9 @@
const { notification } = useMessage() const { notification } = useMessage()
// //
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
const tbHeight = window.innerHeight - 270
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getVxeSelectRows }] = useTable({
title: '', title: '',
api: async (p) => { api: async (p) => {
if (p.queryCondition == '[]') { if (p.queryCondition == '[]') {
@ -80,12 +81,15 @@
indexColumnProps: { indexColumnProps: {
width: 60, width: 60,
}, },
tableComponent: 'vxe',
autoHeight: tbHeight,
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 15,
immediate: false, immediate: false,
id: '0'
}) })
function handleDel() { function handleDel() {
const select = getSelectRows() const select = getVxeSelectRows()
let ApiData: any = { let ApiData: any = {
ids: [], ids: [],
} }

Loading…
Cancel
Save