feat: merge remote dev branch changes
Merge IoT-related updates and improvements from remote dev branch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ export function getOtaTaskRecordStatusStatistics(
|
|||||||
taskId?: number,
|
taskId?: number,
|
||||||
) {
|
) {
|
||||||
return requestClient.get<Record<string, number>>(
|
return requestClient.get<Record<string, number>>(
|
||||||
'/iot/ota/task/record/status-statistics',
|
'/iot/ota/task/record/get-status-statistics',
|
||||||
{ params: { firmwareId, taskId } },
|
{ params: { firmwareId, taskId } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
title: '产品详情',
|
title: '产品详情',
|
||||||
activePath: '/iot/device/product',
|
activePath: '/iot/device/product',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('#/views/iot/product/product/modules/detail/index.vue'),
|
||||||
import('#/views/iot/product/product/modules/detail/index.vue'),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'device/detail/:id',
|
path: 'device/detail/:id',
|
||||||
@@ -28,11 +27,20 @@ const routes: RouteRecordRaw[] = [
|
|||||||
title: '设备详情',
|
title: '设备详情',
|
||||||
activePath: '/iot/device/device',
|
activePath: '/iot/device/device',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('#/views/iot/device/device/modules/detail/index.vue'),
|
||||||
import('#/views/iot/device/device/modules/detail/index.vue'),
|
},
|
||||||
|
{
|
||||||
|
path: 'ota/firmware/detail/:id',
|
||||||
|
name: 'IoTOtaFirmwareDetail',
|
||||||
|
meta: {
|
||||||
|
title: '固件详情',
|
||||||
|
activePath: '/iot/ota',
|
||||||
|
},
|
||||||
|
component: () => import('#/views/iot/ota/modules/firmware-detail/index.vue'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default routes;
|
export default routes;
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '接收的用户',
|
label: '接收的用户',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleUserList,
|
api: () => getSimpleUserList(),
|
||||||
labelField: 'nickname',
|
labelField: 'nickname',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '告警配置',
|
label: '告警配置',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleAlertConfigList,
|
api: () => getSimpleAlertConfigList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择告警配置',
|
placeholder: '请选择告警配置',
|
||||||
@@ -40,7 +40,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -53,7 +53,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备',
|
label: '设备',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleDeviceList,
|
api: () => getSimpleDeviceList(),
|
||||||
labelField: 'deviceName',
|
labelField: 'deviceName',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择设备',
|
placeholder: '请选择设备',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -89,7 +89,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleDeviceGroupList,
|
api: () => getSimpleDeviceGroupList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
@@ -156,7 +156,7 @@ export function useGroupFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleDeviceGroupList,
|
api: () => getSimpleDeviceGroupList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
@@ -199,7 +199,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -249,7 +249,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '设备分组',
|
label: '设备分组',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleDeviceGroupList,
|
api: () => getSimpleDeviceGroupList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择设备分组',
|
placeholder: '请选择设备分组',
|
||||||
|
|||||||
@@ -481,6 +481,10 @@ onMounted(async () => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
:deep(.vxe-toolbar div) {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* 隐藏 VxeGrid 自带的搜索表单区域 */
|
/* 隐藏 VxeGrid 自带的搜索表单区域 */
|
||||||
:deep(.vxe-grid--form-wrapper) {
|
:deep(.vxe-grid--form-wrapper) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { downloadFileFromBlobPart } from '@vben/utils';
|
|||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { importDeviceTemplate } from '#/api/iot/device/device';
|
import { importDeviceTemplate } from '#/api/iot/device/device';
|
||||||
import { $t } from '#/locales';
|
|
||||||
|
|
||||||
import { useImportFormSchema } from '../data';
|
import { useImportFormSchema } from '../data';
|
||||||
|
|
||||||
@@ -65,7 +64,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
|
|
||||||
if (result.code !== 0) {
|
if (result.code !== 0) {
|
||||||
message.error(result.msg || $t('ui.actionMessage.operationFailed'));
|
message.error(result.msg || '导入失败');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +94,7 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
await modalApi.close();
|
await modalApi.close();
|
||||||
emit('success');
|
emit('success');
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.message || $t('ui.actionMessage.operationFailed'));
|
message.error(error.message || '导入失败');
|
||||||
} finally {
|
} finally {
|
||||||
modalApi.unlock();
|
modalApi.unlock();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '父级分组',
|
label: '父级分组',
|
||||||
component: 'ApiTreeSelect',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleDeviceGroupList,
|
api: () => getSimpleDeviceGroupList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择父级分组',
|
placeholder: '请选择父级分组',
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '所属产品',
|
label: '所属产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -85,7 +85,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '所属产品',
|
label: '所属产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
@@ -86,7 +86,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import type { IoTOtaFirmwareApi } from '#/api/iot/ota/firmware';
|
|||||||
|
|
||||||
import { Page, useVbenModal } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
@@ -16,6 +17,8 @@ import { useGridColumns, useGridFormSchema } from './data';
|
|||||||
|
|
||||||
defineOptions({ name: 'IoTOtaFirmware' });
|
defineOptions({ name: 'IoTOtaFirmware' });
|
||||||
|
|
||||||
|
const { push } = useRouter();
|
||||||
|
|
||||||
const [FormModal, formModalApi] = useVbenModal({
|
const [FormModal, formModalApi] = useVbenModal({
|
||||||
connectedComponent: Form,
|
connectedComponent: Form,
|
||||||
destroyOnClose: true,
|
destroyOnClose: true,
|
||||||
@@ -36,10 +39,6 @@ function handleEdit(row: IoTOtaFirmwareApi.Firmware) {
|
|||||||
formModalApi.setData({ type: 'update', id: row.id }).open();
|
formModalApi.setData({ type: 'update', id: row.id }).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查看固件详情 */
|
|
||||||
function handleDetail(row: IoTOtaFirmwareApi.Firmware) {
|
|
||||||
formModalApi.setData({ type: 'view', id: row.id }).open();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除固件 */
|
/** 删除固件 */
|
||||||
async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
||||||
@@ -58,6 +57,11 @@ async function handleDelete(row: IoTOtaFirmwareApi.Firmware) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 查看固件详情 */
|
||||||
|
function handleDetail(row: IoTOtaFirmwareApi.Firmware) {
|
||||||
|
push({ name: 'IoTOtaFirmwareDetail', params: { id: row.id } });
|
||||||
|
}
|
||||||
|
|
||||||
const [Grid, gridApi] = useVbenVxeGrid({
|
const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
formOptions: {
|
formOptions: {
|
||||||
schema: useGridFormSchema(),
|
schema: useGridFormSchema(),
|
||||||
@@ -113,18 +117,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
|
|
||||||
<!-- 固件文件列 -->
|
<!-- 固件文件列 -->
|
||||||
<template #fileUrl="{ row }">
|
<template #fileUrl="{ row }">
|
||||||
<a
|
<div v-if="row.fileUrl" class="inline-flex items-center gap-1.5 align-middle leading-none">
|
||||||
v-if="row.fileUrl"
|
<IconifyIcon icon="ant-design:download-outlined" class="shrink-0 text-base align-middle text-primary" />
|
||||||
:href="row.fileUrl"
|
<a
|
||||||
target="_blank"
|
:href="row.fileUrl"
|
||||||
download
|
target="_blank"
|
||||||
class="text-primary cursor-pointer hover:underline"
|
download
|
||||||
>
|
class="text-primary cursor-pointer hover:underline align-middle"
|
||||||
<IconifyIcon icon="ant-design:download-outlined" class="mr-1" />
|
>
|
||||||
下载固件
|
下载固件
|
||||||
</a>
|
</a>
|
||||||
<span v-else class="text-gray-400">无文件</span>
|
</div>
|
||||||
</template>
|
<span v-else class="text-gray-400">无文件</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- 操作列 -->
|
<!-- 操作列 -->
|
||||||
<template #actions="{ row }">
|
<template #actions="{ row }">
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ onMounted(() => {
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<!-- 固件信息 -->
|
<!-- 固件信息 -->
|
||||||
<Card title="固件信息" class="mb-5" :loading="firmwareLoading">
|
<Card title="固件信息" class="mb-3" :loading="firmwareLoading">
|
||||||
<Descriptions :column="3" bordered>
|
<Descriptions :column="3" bordered size="small">
|
||||||
<Descriptions.Item label="固件名称">
|
<Descriptions.Item label="固件名称">
|
||||||
{{ firmware?.name }}
|
{{ firmware?.name }}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
@@ -86,15 +86,15 @@ onMounted(() => {
|
|||||||
<!-- 升级设备统计 -->
|
<!-- 升级设备统计 -->
|
||||||
<Card
|
<Card
|
||||||
title="升级设备统计"
|
title="升级设备统计"
|
||||||
class="mb-5"
|
class="mb-3"
|
||||||
:loading="firmwareStatisticsLoading"
|
:loading="firmwareStatisticsLoading"
|
||||||
>
|
>
|
||||||
<Row :gutter="20" class="py-5">
|
<Row :gutter="20" class="py-3">
|
||||||
<Col :span="6">
|
<Col :span="6">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-blue-500">
|
<div class="mb-1 text-3xl font-bold text-blue-500">
|
||||||
{{
|
{{
|
||||||
Object.values(firmwareStatistics).reduce(
|
Object.values(firmwareStatistics).reduce(
|
||||||
(sum: number, count) => sum + (count || 0),
|
(sum: number, count) => sum + (count || 0),
|
||||||
@@ -107,9 +107,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-gray-400">
|
<div class="mb-1 text-3xl font-bold text-gray-400">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[IoTOtaTaskRecordStatusEnum.PENDING.value] ||
|
firmwareStatistics[IoTOtaTaskRecordStatusEnum.PENDING.value] ||
|
||||||
0
|
0
|
||||||
@@ -120,9 +120,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-blue-400">
|
<div class="mb-1 text-3xl font-bold text-blue-400">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[IoTOtaTaskRecordStatusEnum.PUSHED.value] || 0
|
firmwareStatistics[IoTOtaTaskRecordStatusEnum.PUSHED.value] || 0
|
||||||
}}
|
}}
|
||||||
@@ -132,9 +132,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-yellow-500">
|
<div class="mb-1 text-3xl font-bold text-yellow-500">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[
|
firmwareStatistics[
|
||||||
IoTOtaTaskRecordStatusEnum.UPGRADING.value
|
IoTOtaTaskRecordStatusEnum.UPGRADING.value
|
||||||
@@ -146,9 +146,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-green-500">
|
<div class="mb-1 text-3xl font-bold text-green-500">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[IoTOtaTaskRecordStatusEnum.SUCCESS.value] ||
|
firmwareStatistics[IoTOtaTaskRecordStatusEnum.SUCCESS.value] ||
|
||||||
0
|
0
|
||||||
@@ -159,9 +159,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-red-500">
|
<div class="mb-1 text-3xl font-bold text-red-500">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[IoTOtaTaskRecordStatusEnum.FAILURE.value] ||
|
firmwareStatistics[IoTOtaTaskRecordStatusEnum.FAILURE.value] ||
|
||||||
0
|
0
|
||||||
@@ -172,9 +172,9 @@ onMounted(() => {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col :span="3">
|
<Col :span="3">
|
||||||
<div
|
<div
|
||||||
class="rounded border border-solid border-gray-200 bg-gray-50 p-5 text-center"
|
class="rounded border border-solid border-gray-200 bg-gray-50 p-3 text-center"
|
||||||
>
|
>
|
||||||
<div class="mb-2 text-3xl font-bold text-gray-400">
|
<div class="mb-1 text-3xl font-bold text-gray-400">
|
||||||
{{
|
{{
|
||||||
firmwareStatistics[IoTOtaTaskRecordStatusEnum.CANCELED.value] ||
|
firmwareStatistics[IoTOtaTaskRecordStatusEnum.CANCELED.value] ||
|
||||||
0
|
0
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '父级分类',
|
label: '父级分类',
|
||||||
component: 'ApiTreeSelect',
|
component: 'ApiTreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductCategoryList,
|
api: () => getSimpleProductCategoryList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择父级分类',
|
placeholder: '请选择父级分类',
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] {
|
|||||||
label: '产品分类',
|
label: '产品分类',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductCategoryList,
|
api: () => getSimpleProductCategoryList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品分类',
|
placeholder: '请选择产品分类',
|
||||||
@@ -246,7 +246,7 @@ export function useBasicFormSchema(formApi?: any): VbenFormSchema[] {
|
|||||||
label: '产品分类',
|
label: '产品分类',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductCategoryList,
|
api: () => getSimpleProductCategoryList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品分类',
|
placeholder: '请选择产品分类',
|
||||||
|
|||||||
@@ -333,6 +333,10 @@ onMounted(() => {
|
|||||||
</Page>
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
:deep(.vxe-toolbar div) {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* 隐藏 VxeGrid 自带的搜索表单区域 */
|
/* 隐藏 VxeGrid 自带的搜索表单区域 */
|
||||||
:deep(.vxe-grid--form-wrapper) {
|
:deep(.vxe-grid--form-wrapper) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
|
|||||||
label: '产品',
|
label: '产品',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: getSimpleProductList,
|
api: () => getSimpleProductList(),
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
placeholder: '请选择产品',
|
placeholder: '请选择产品',
|
||||||
|
|||||||
Reference in New Issue
Block a user