|
|
|
@ -1,22 +1,13 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="p20">
|
|
|
|
|
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
|
|
|
|
|
<template #tableTitle>
|
|
|
|
|
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:factory:add')">
|
|
|
|
|
<span class="iconfont icon-new_document"></span>
|
|
|
|
|
添加
|
|
|
|
|
</a-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="确定要删除勾选的数据?"
|
|
|
|
|
ok-text="确定"
|
|
|
|
|
cancel-text="取消"
|
|
|
|
|
@confirm="handleDel"
|
|
|
|
|
:disabled="checkPermissions('op:factory:del')"
|
|
|
|
|
<TableButton
|
|
|
|
|
:show="{ add: 'op:factory:add', del: 'op:factory:del' }"
|
|
|
|
|
@add="handleCreate"
|
|
|
|
|
@del="handleDel"
|
|
|
|
|
>
|
|
|
|
|
<a-button type="link" :disabled="checkPermissions('op:factory:del')">
|
|
|
|
|
<span class="iconfont icon-shanchu2"></span> 删除
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</TableButton>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
@ -46,7 +37,7 @@
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
const { notification } = useMessage()
|
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
|
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
|
|
|
|
|
const [registerTable, { reload, getForm, getVxeSelectRows }] = useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await ApiList(p)
|
|
|
|
@ -117,11 +108,11 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleDel() {
|
|
|
|
|
if (getSelectRows().length) {
|
|
|
|
|
if (getVxeSelectRows().length) {
|
|
|
|
|
let Apidata: any = {
|
|
|
|
|
ids: [],
|
|
|
|
|
}
|
|
|
|
|
getSelectRows().forEach((item) => {
|
|
|
|
|
getVxeSelectRows().forEach((item) => {
|
|
|
|
|
Apidata.ids.push(item.id)
|
|
|
|
|
})
|
|
|
|
|
ApiDel(Apidata).then((res) => {
|
|
|
|
|