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