优化方法参数(代码规范处理)
This commit is contained in:
parent
0108068e00
commit
db391376cf
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div >
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" style="padding: 0 !important;">
|
||||
<!--插槽:table标题-->
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
|
|
@ -18,7 +18,7 @@ import { ref, reactive } from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, formSchema } from './cleanadvisory.data';
|
||||
import { list,dataClean,dataDelete } from './cleanadvisory.api';
|
||||
import { list, dataClean, dataDelete } from './cleanadvisory.api';
|
||||
|
||||
const props = defineProps({
|
||||
serverType: '',
|
||||
|
|
@ -34,9 +34,9 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
formConfig: {
|
||||
schemas: formSchema
|
||||
},
|
||||
actionColumn: {
|
||||
width: 380,
|
||||
},
|
||||
actionColumn: {
|
||||
width: 380,
|
||||
},
|
||||
canResize: false,
|
||||
useSearchForm: true,
|
||||
showTableSetting: false,
|
||||
|
|
@ -64,13 +64,13 @@ function searchQuery() {
|
|||
reload();
|
||||
}
|
||||
|
||||
async function handleClean(record,type) {
|
||||
async function handleClean(record, type) {
|
||||
console.log("🚀 ~ handleClean ~ record:", record)
|
||||
record.advisoryType = type;
|
||||
await dataClean(record, handleSuccess);
|
||||
}
|
||||
|
||||
async function handleDelete(record) {
|
||||
async function handleDelete(record, type) {
|
||||
console.log("🚀 ~ handleDelete ~ record:", record)
|
||||
await dataDelete(record, handleSuccess);
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ function getTableAction(record) {
|
|||
label: '清除长者入驻',
|
||||
popConfirm: {
|
||||
title: '是否确认清除入驻',
|
||||
confirm: handleClean.bind(null, record,'1'),
|
||||
confirm: handleClean.bind(null, record, '1'),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
|
|
@ -92,7 +92,7 @@ function getTableAction(record) {
|
|||
label: '清除员工入驻',
|
||||
popConfirm: {
|
||||
title: '是否确认清除入驻',
|
||||
confirm: handleClean.bind(null, record,'2'),
|
||||
confirm: handleClean.bind(null, record, '2'),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
|
|
@ -100,7 +100,7 @@ function getTableAction(record) {
|
|||
label: '清除机构入驻',
|
||||
popConfirm: {
|
||||
title: '是否确认清除入驻',
|
||||
confirm: handleClean.bind(null, record,'3'),
|
||||
confirm: handleClean.bind(null, record, '3'),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
|
|
@ -108,7 +108,7 @@ function getTableAction(record) {
|
|||
label: '清除所有',
|
||||
popConfirm: {
|
||||
title: '是否确认清除所有',
|
||||
confirm: handleDelete.bind(null, record,'1'),
|
||||
confirm: handleDelete.bind(null, record, '1'),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
},
|
||||
|
|
@ -160,6 +160,7 @@ defineExpose({
|
|||
.ant-table-thead>tr>th {
|
||||
background-color: #dadadaee;
|
||||
}
|
||||
|
||||
.ant-table-tbody>tr>td {
|
||||
background-color: #f3f3f3f5;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue