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