#6 设备管理-机场及飞行器的筛选条件都未生效
parent
322535470e
commit
c0b7153688
|
|
@ -37,7 +37,7 @@
|
|||
import { h, watch, onMounted, ref, nextTick } from "vue"
|
||||
import { EditOutlined } from '@ant-design/icons-vue'
|
||||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { columns, dataSource, searchFormSchema } from './utils'
|
||||
import { columns, searchFormSchema } from './utils'
|
||||
import { GetUavPageList, DeleteUav } from '@/api/demo/device'
|
||||
import { getClient, clientSubscribe } from '@/utils/mqtt'
|
||||
import dayjs from "dayjs";
|
||||
|
|
@ -48,7 +48,7 @@ const props = defineProps(['projectList','connected'])
|
|||
const editDeviceDate = ref({})
|
||||
const editDeviceModal = ref(false)
|
||||
onMounted(() => {
|
||||
const targetField = searchFormSchema.find(item => item.field === 'project');
|
||||
const targetField = searchFormSchema.find(item => item.field === 'workspaceid');
|
||||
if (targetField) {
|
||||
targetField.componentProps = {
|
||||
...(targetField.componentProps || {}),
|
||||
|
|
|
|||
|
|
@ -33,27 +33,10 @@ export const columns = [
|
|||
dataIndex: 'online_time',
|
||||
},
|
||||
];
|
||||
export const dataSource = [
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
{ model: 111, sn:222, name: 333, version: 444, status: 555, project: 666, join_time: 777, online_time: 888 },
|
||||
]
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'project',
|
||||
field: 'workspaceid',
|
||||
label: '项目',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
|
@ -63,25 +46,9 @@ export const searchFormSchema: FormSchema[] = [
|
|||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '当前状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '在线', value: '在线' },
|
||||
{ label: '离线', value: '离线' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'model',
|
||||
field: 'type',
|
||||
label: '设备型号',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
],
|
||||
},
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ import { cloneDeep } from 'lodash-es';
|
|||
|
||||
const props = defineProps(['projectList','connected'])
|
||||
watch(() => props.projectList, () => {
|
||||
const targetField = searchFormSchema.find(item => item.field === 'project');
|
||||
const targetField = searchFormSchema.find(item => item.field === 'workspaceid');
|
||||
if (targetField) {
|
||||
targetField.componentProps = {
|
||||
...(targetField.componentProps || {}),
|
||||
|
|
|
|||
|
|
@ -43,39 +43,39 @@ export const columns = [
|
|||
];
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
// {
|
||||
// field: 'upgrade_status',
|
||||
// label: '升级状态',
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '固件待升级', value: '固件待升级' },
|
||||
// { label: '固件一致性升级', value: '固件一致性升级' },
|
||||
// { label: '飞行安全数据库待升级', value: '飞行安全数据库待升级' },
|
||||
// ],
|
||||
// },
|
||||
// colProps: { span: 4 },
|
||||
// },
|
||||
// {
|
||||
// field: 'work_status',
|
||||
// label: '工作状态',
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// options: [
|
||||
// { label: '全部工作状态', value: '全部工作状态' },
|
||||
// { label: '设备空闲中', value: '设备空闲中' },
|
||||
// { label: '现场调试中', value: '现场调试中' },
|
||||
// { label: '远程调试中', value: '远程调试中' },
|
||||
// { label: '设备作业中', value: '设备作业中' },
|
||||
// { label: '设备升级中', value: '设备升级中' },
|
||||
// { label: '设备已离线', value: '设备已离线' },
|
||||
// { label: '未标定', value: '未标定' },
|
||||
// ],
|
||||
// },
|
||||
// colProps: { span: 4 },
|
||||
// },
|
||||
{
|
||||
field: 'upgrade_status',
|
||||
label: '升级状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '固件待升级', value: '固件待升级' },
|
||||
{ label: '固件一致性升级', value: '固件一致性升级' },
|
||||
{ label: '飞行安全数据库待升级', value: '飞行安全数据库待升级' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'work_status',
|
||||
label: '工作状态',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '全部工作状态', value: '全部工作状态' },
|
||||
{ label: '设备空闲中', value: '设备空闲中' },
|
||||
{ label: '现场调试中', value: '现场调试中' },
|
||||
{ label: '远程调试中', value: '远程调试中' },
|
||||
{ label: '设备作业中', value: '设备作业中' },
|
||||
{ label: '设备升级中', value: '设备升级中' },
|
||||
{ label: '设备已离线', value: '设备已离线' },
|
||||
{ label: '未标定', value: '未标定' },
|
||||
],
|
||||
},
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'project',
|
||||
field: 'workspaceid',
|
||||
label: '项目',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
|
|
@ -87,15 +87,11 @@ export const searchFormSchema: FormSchema[] = [
|
|||
{
|
||||
field: 'model',
|
||||
label: '设备型号',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: [
|
||||
],
|
||||
},
|
||||
component: 'Input',
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'key',
|
||||
field: 'sn',
|
||||
label: '设备SN',
|
||||
component: 'Input',
|
||||
colProps: { span: 6 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue