mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect-embeded.git
synced 2025-06-24 05:24:12 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3414394d32
@ -16,7 +16,7 @@
|
||||
//background-size: cover;
|
||||
//background-position: center center;
|
||||
|
||||
//background-color: #0d1540;
|
||||
background-color: #0d1540;
|
||||
//background-color: rgba(45, 119, 243, 0.4);
|
||||
//background-blend-mode: overlay;
|
||||
}
|
||||
|
@ -75,6 +75,11 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
:deep(.ant-btn-default:disabled),
|
||||
:deep(.ant-btn-default:disabled svg) {
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
:deep(.ant-btn-default:hover) {
|
||||
font-family: "Noto Sans SC", serif;
|
||||
font-size: 14px;
|
||||
@ -514,3 +519,8 @@
|
||||
color: white !important;
|
||||
border-inline-end: 1px solid #183171 !important;
|
||||
}
|
||||
|
||||
:deep(.ant-checkbox-inner) {
|
||||
border: 1px solid rgba(45, 119, 243, 0.3) !important;
|
||||
background-color: #13265a !important;
|
||||
}
|
||||
|
@ -7,6 +7,9 @@
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="handleCreate" :icon="h(PlusOutlined)">新增</a-button>
|
||||
<div style="width: 20px" />
|
||||
<a-button type="default" @click="handleDownload" :icon="h(DownloadOutlined)" :disabled="checkedKeys.length === 0">下发数据</a-button>
|
||||
<a-button type="default" @click="handleSync" :icon="h(SyncOutlined)" :disabled="checkedKeys.length === 0">同步数据</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
@ -35,6 +38,18 @@
|
||||
onClick: handleView.bind(null, record),
|
||||
divider: true
|
||||
},
|
||||
{
|
||||
label: '下发数据',
|
||||
icon: 'ant-design:download-outlined',
|
||||
onClick: handleDownload.bind(null, record),
|
||||
divider: true
|
||||
},
|
||||
{
|
||||
label: '同步数据',
|
||||
icon: 'ant-design:sync-outlined',
|
||||
onClick: handleSync.bind(null, record),
|
||||
divider: true
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
@ -55,13 +70,15 @@
|
||||
import { columns, searchFormSchema } from './schema';
|
||||
import { useMessage } from "@/hooks/web/useMessage";
|
||||
import {SvgIcon} from "@/components/Icon";
|
||||
import {h} from "vue";
|
||||
import {PlusOutlined} from "@ant-design/icons-vue";
|
||||
|
||||
import {h, ref} from "vue";
|
||||
import {DownloadOutlined, PlusOutlined, SyncOutlined} from "@ant-design/icons-vue";
|
||||
const { createMessage } = useMessage();
|
||||
const { hasPermission } = usePermission();
|
||||
const go = useGo();
|
||||
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const onSelectChange = (selectedRowKeys: (string | number)[]) => {
|
||||
checkedKeys.value = selectedRowKeys.filter(k => typeof k !== 'undefined');
|
||||
}
|
||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||
const [registerTable, { reload }] = useTable({
|
||||
api: (params) => TaskApi.search(handleParams(params)),
|
||||
@ -71,6 +88,10 @@
|
||||
schemas: searchFormSchema,
|
||||
showAdvancedButton: false,
|
||||
},
|
||||
rowSelection: {
|
||||
type: 'checkbox',
|
||||
onChange: onSelectChange,
|
||||
},
|
||||
useSearchForm: true,
|
||||
showTableSetting: false,
|
||||
bordered: true,
|
||||
@ -78,13 +99,12 @@
|
||||
canResize: false,
|
||||
rowKey: (record: any) => record.id,
|
||||
actionColumn: {
|
||||
width: 250,
|
||||
width: 420,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const handleParams = (params) => {
|
||||
const { pageNum, pageSize, field = 'id', order = 'descend', ...rest } = params;
|
||||
const handledParams: any = { pageNum, pageSize, orderByClause: `${field} ${order === 'descend' ? 'desc' : 'asc'}` };
|
||||
@ -143,6 +163,14 @@
|
||||
const handleView = (record) => {
|
||||
go('/data/task/' + record.id);
|
||||
};
|
||||
|
||||
const handleDownload = (record: Recordable) => {
|
||||
const ids = [...new Set([...(record.id ? [record.id] : []), ...(checkedKeys.value.map(d => (d)))])]
|
||||
};
|
||||
|
||||
const handleSync = (record: Recordable) => {
|
||||
const ids = [...new Set([...(record.id ? [record.id] : []), ...(checkedKeys.value.map(d => (d)))])]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@use '@/assets/custom.scss';
|
||||
|
Loading…
Reference in New Issue
Block a user