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