Merge branch '2.2-dev' of https://git.drgyen.cn/0017/iot-ui-vue into 2.2-dev

This commit is contained in:
lmx019 2025-04-10 15:50:34 +08:00
commit fc3fa617a4
20 changed files with 107 additions and 88 deletions

View File

@ -1,5 +1,5 @@
{
"name": "jetlinks-vue",
"name": "dr-iot",
"private": true,
"version": "2.2.1",
"scripts": {

View File

@ -1,11 +1,7 @@
<template>
<j-advanced-search
<j-search
:target='target'
:type='type'
:request='(data) => saveSearchHistory(data, target)'
:historyRequest='() => getSearchHistory(target)'
:deleteRequest='(_target: string, id: string) => deleteSearchHistory(target, id)'
:columns='columns'
:columns='processedColumns'
:class='props.class'
style='padding-top: 18px; padding-bottom: 18px;'
@search='searchSubmit'
@ -29,7 +25,7 @@ const props = defineProps({
},
type: {
type: String,
default: 'advanced'
default: 'terms'
},
target: {
type: String,
@ -44,10 +40,33 @@ const props = defineProps({
const emit = defineEmits<Emit>()
// searchdefaultValue
const processedColumns = computed(() => {
return props.columns.map(column => {
// searchdefaultValuedefaultValue
if (column.search && !column.search.hasOwnProperty('defaultValue')) {
return {
...column,
search: {
...column.search,
defaultValue: null
}
}
}
return column
})
})
/**
* 提交
*/
const searchSubmit = (data: any) => {
console.log("搜索--------",data)
data = {
terms:[{
terms:data
}]
}
emit('search', data)
}

View File

@ -25,7 +25,7 @@ body {
.ant-pro-basicLayout {
.ant-pro-top-nav-header-main {
gap: 16px;
//gap: 16px;
}
.ant-pro-top-nav-header {

View File

@ -144,9 +144,9 @@ const columns = [
dataIndex: 'description',
key: 'description',
scopedSlots: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
ellipsis: true,
},
{
@ -186,9 +186,9 @@ const columns = [
dataIndex: 'requestTime',
key: 'requestTime',
scopedSlots: true,
search: {
type: 'date',
},
// search: {
// type: 'rangePicker',
// },
width: 200,
},
{

View File

@ -172,9 +172,9 @@ const columns = [
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
search: {
type: 'date',
},
// search: {
// type: 'date',
// },
scopedSlots: true,
width: 200,
},

View File

@ -102,27 +102,27 @@ const query = reactive({
type: 'string',
},
},
{
title: '排序',
dataIndex: 'sortIndex',
key: 'sortIndex',
search: {
type: 'number',
componentProps: {
precision: 0,
min: 1,
},
},
scopedSlots: true,
},
{
title: '说明',
key: 'description',
dataIndex: 'description',
search: {
type: 'string',
},
},
// {
// title: '',
// dataIndex: 'sortIndex',
// key: 'sortIndex',
// search: {
// type: 'number',
// componentProps: {
// precision: 0,
// min: 1,
// },
// },
// scopedSlots: true,
// },
// {
// title: '',
// key: 'description',
// dataIndex: 'description',
// search: {
// type: 'string',
// },
// },
{
title: '操作',
key: 'action',

View File

@ -310,9 +310,9 @@ const columns = [
key: 'createTime',
scopedSlots: true,
width: 200,
search: {
type: 'date',
},
// search: {
// type: 'date',
// },
},
{
title: '状态',
@ -472,9 +472,9 @@ const columns = [
dataIndex: 'describe',
key: 'describe',
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -555,9 +555,9 @@ const query = reactive({
title: '说明',
key: 'describe',
dataIndex: 'describe',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '产品分类',

View File

@ -260,9 +260,9 @@ const columns = [
title: '说明',
dataIndex: 'description',
key: 'description',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -106,9 +106,9 @@ const columns = [
dataIndex: 'description',
key: 'description',
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -196,9 +196,9 @@ const columns = [
title: '说明',
dataIndex: 'description',
key: 'description',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
ellipsis: true,
},
{

View File

@ -261,9 +261,9 @@ const columns = [
dataIndex: 'description',
key: 'description',
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -267,9 +267,9 @@ const columns = [
key: 'description',
scopedSlots: true,
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -259,9 +259,9 @@ const columns = [
key: 'description',
scopedSlots: true,
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -333,9 +333,9 @@ const columns = [
title: '说明',
dataIndex: 'description',
key: 'description',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
ellipsis: true,
},
{

View File

@ -264,9 +264,9 @@ const columns = [
title: '最近告警时间',
dataIndex: 'alarmTime',
key: 'alarmTime',
search: {
type: 'date',
},
// search: {
// type: 'rangePicker',
// },
scopedSlots: true,
},
{

View File

@ -217,9 +217,9 @@ const columns = [
dataIndex: 'description',
title: '说明',
ellipsis: true,
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
scopedSlots: true,
},
{

View File

@ -146,9 +146,9 @@ const columns = [
dataIndex: 'sortIndex',
key: 'sortIndex',
ellipsis: true,
search: {
type: 'number',
},
// search: {
// type: 'number',
// },
width: 80,
},
{
@ -163,9 +163,9 @@ const columns = [
dataIndex: 'createTime',
key: 'createTime',
ellipsis: true,
search: {
type: 'date',
},
// search: {
// type: 'date',
// },
width: 180,
scopedSlots: true,
},

View File

@ -146,9 +146,9 @@ const columns = [
key: 'description',
ellipsis: true,
fixed: 'left',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',

View File

@ -89,9 +89,9 @@ const columns = [
key: 'description',
ellipsis: true,
dataIndex: 'description',
search: {
type: 'string',
},
// search: {
// type: 'string',
// },
},
{
title: '操作',