diff --git a/plugin/jetlinks.ts b/plugin/jetlinks.ts
index 6edf3d95..47286c81 100644
--- a/plugin/jetlinks.ts
+++ b/plugin/jetlinks.ts
@@ -100,7 +100,7 @@ const matchComponents: IMatcher[] = [
},
{
pattern: /^TimePicker|^TimeRangePicker/,
- styleDir: 'TimeTicker'
+ styleDir: 'TimePicker'
},
{
pattern: /^Radio/,
diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts
index db7583ec..8fcd6d96 100644
--- a/src/api/device/instance.ts
+++ b/src/api/device/instance.ts
@@ -85,7 +85,7 @@ export const batchDeleteDevice = (data: string[]) => server.put(`/device-instanc
*/
export const deviceTemplateDownload = (productId: string, type: string) => `${BASE_API_PATH}/device-instance/${productId}/template.${type}`
-export const templateDownload = (productId: string, type: string) => server.get(`/device-instance/${productId}/template.${type}`,{},{responseType: 'blob'})
+export const templateDownload = (productId: string, type: string) => server.get(`/device-instance/${productId}/template.${type}`, {}, { responseType: 'blob' })
/**
* 设备导入
* @param productId 产品id
@@ -245,6 +245,22 @@ export const unbindBatchDevice = (deviceId: string, data: Record) =
*/
export const bindDevice = (deviceId: string, data: Record) => server.post(`/device/gateway/${deviceId}/bind`, data)
+/**
+ * 获取产品列表
+ * @param data
+ */
+export const getProductListNoPage = (data: any) => server.post('/device/product/_query/no-paging?paging=false', data)
+
+/**
+ * 修改设备
+ */
+export const editDevice = (parmas: any) => server.patch('/device-instance', parmas)
+
+/**
+ * 新增设备
+ */
+export const addDevice = (params: any) => server.post("/device-instance", params)
+
/**
* 设备接入网关状态
* @param id 设备接入网关id
@@ -504,14 +520,14 @@ export const productCode = (productId: string) => server.get(`/device/transparen
* @param productId
* @returns
*/
-export const saveProductCode = (productId: string,data: Record) => server.post(`/device/transparent-codec/${productId}`,data)
+export const saveProductCode = (productId: string, data: Record) => server.post(`/device/transparent-codec/${productId}`, data)
/**
* 获取设备解析规则
* @param productId
* @param deviceId
* @returns
*/
-export const deviceCode = (productId: string,deviceId:string) => server.get(`device/transparent-codec/${productId}/${deviceId}`)
+export const deviceCode = (productId: string, deviceId: string) => server.get(`device/transparent-codec/${productId}/${deviceId}`)
/**
* 保存设备解析规则
* @param productId
@@ -520,13 +536,13 @@ export const deviceCode = (productId: string,deviceId:string) => server.get(`dev
* @param data
* @returns
*/
-export const saveDeviceCode = (productId: string,deviceId:string,data: Record) => server.post(`/device/transparent-codec/${productId}/${deviceId}`,data)
+export const saveDeviceCode = (productId: string, deviceId: string, data: Record) => server.post(`/device/transparent-codec/${productId}/${deviceId}`, data)
/**
* 编码测试
* @param data
* @returns
*/
-export const testCode = (data: Record) => server.post(`/device/transparent-codec/decode-test`,data)
+export const testCode = (data: Record) => server.post(`/device/transparent-codec/decode-test`, data)
/**
* 删除设备解析规则
* @param productId
diff --git a/src/components/FRuleEditor/Debug/index.vue b/src/components/FRuleEditor/Debug/index.vue
index 14257edb..1d89dd9a 100644
--- a/src/components/FRuleEditor/Debug/index.vue
+++ b/src/components/FRuleEditor/Debug/index.vue
@@ -135,18 +135,18 @@ const runScript = () => {
});
if (ws.value) {
- ws.value.unsubscribe();
+ ws.value.unsubscribe?.();
}
if (!props.virtualRule?.script) {
isBeginning.value = true;
message.warning('请编辑规则');
return;
}
- ws.value = getWebSocket(`virtual-property-debug-${ruleEditorStore.state.property}-${new Date().getTime()}`,
+ ws.value = getWebSocket(`virtual-property-debug-${props.id}-${new Date().getTime()}`,
'/virtual-property-debug',
{
virtualId: `${virtualIdRef.value}-virtual-id`,
- property: ruleEditorStore.state.property,
+ property: props.id,
virtualRule: {
...props.virtualRule,
},
@@ -163,7 +163,7 @@ const beginAction = () => {
const stopAction = () => {
isBeginning.value = true;
if (ws.value) {
- ws.value.unsubscribe();
+ ws.value.unsubscribe?.();
}
}
const clearAction = () => {
@@ -172,7 +172,7 @@ const clearAction = () => {
onUnmounted(() => {
if (ws.value) {
- ws.value.unsubscribe();
+ ws.value.unsubscribe?.();
}
})
diff --git a/src/components/FRuleEditor/index.vue b/src/components/FRuleEditor/index.vue
index 70cb6fe4..bd12a913 100644
--- a/src/components/FRuleEditor/index.vue
+++ b/src/components/FRuleEditor/index.vue
@@ -1,6 +1,5 @@
- {{ _value }}
diff --git a/src/components/Metadata/VirtualRuleParam/index.vue b/src/components/Metadata/VirtualRuleParam/index.vue
index b8a712f9..5452a0e5 100644
--- a/src/components/Metadata/VirtualRuleParam/index.vue
+++ b/src/components/Metadata/VirtualRuleParam/index.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/components/RadioCard/index.vue b/src/components/RadioCard/index.vue
index eb07f433..4efbc621 100644
--- a/src/components/RadioCard/index.vue
+++ b/src/components/RadioCard/index.vue
@@ -16,10 +16,11 @@
disabled && myValue === item.value
? 'active-checked-disabled'
: '',
+ item.disabled ? 'disabled' : '',
]"
v-for="(item, index) in options"
:key="index"
- @click="myValue = item.value"
+ @click="handleRadio(item)"
>
{{ item.label }}
@@ -86,6 +87,11 @@ const myValue = computed({
}
},
});
+
+const handleRadio = (item: any) => {
+ if (item.disabled) return;
+ myValue.value = item.value;
+};
diff --git a/src/components/index.ts b/src/components/index.ts
index a41944b2..f27cd374 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -1,5 +1,5 @@
import type { App } from 'vue'
-import AIcon from './AIcon'
+// import AIcon from './AIcon'
import PermissionButton from './PermissionButton/index.vue'
import JTable from './Table/index'
import TitleComponent from "./TitleComponent/index.vue";
@@ -10,7 +10,7 @@ import NormalUpload from './NormalUpload/index.vue'
import FileFormat from './FileFormat/index.vue'
import JProUpload from './JUpload/index.vue'
import { BasicLayoutPage, BlankLayoutPage } from './Layout'
-import { PageContainer } from 'jetlinks-ui-components'
+import { PageContainer, AIcon } from 'jetlinks-ui-components'
import Ellipsis from './Ellipsis/index.vue'
import JEmpty from './Empty/index.vue'
import AMapComponent from './AMapComponent/index.vue'
diff --git a/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue b/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue
index 71fe278a..72f82b22 100644
--- a/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue
+++ b/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue
@@ -18,7 +18,7 @@
@search="handleSearch"
type="simple"
/>
-
-
+
diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/MSelect.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/MSelect.vue
new file mode 100644
index 00000000..1b66df49
--- /dev/null
+++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/MSelect.vue
@@ -0,0 +1,117 @@
+
+
+ {{ item.name }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue
new file mode 100644
index 00000000..e28e2733
--- /dev/null
+++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue
@@ -0,0 +1,212 @@
+
+
+
+
+ 采集器的点位名称与属性名称一致时将自动映射绑定;有多个采集器点位名称与属性名称一致时以第1个采集器的点位数据进行绑定
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue
new file mode 100644
index 00000000..6d3434ac
--- /dev/null
+++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/index.vue
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+ 批量映射
+ 保存
+
+
+
+
+
+
+ 采集器
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue b/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue
new file mode 100644
index 00000000..acabb451
--- /dev/null
+++ b/src/views/device/Instance/Detail/ChildDevice/SaveChild/index.vue
@@ -0,0 +1,106 @@
+
+
+
+
+ 返回
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ i.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/ChildDevice/index.vue b/src/views/device/Instance/Detail/ChildDevice/index.vue
index 214a9491..14c50cdc 100644
--- a/src/views/device/Instance/Detail/ChildDevice/index.vue
+++ b/src/views/device/Instance/Detail/ChildDevice/index.vue
@@ -1,91 +1,113 @@
-
-
-
-
- 新增并绑定
-
- 绑定
-
-
- 批量解绑
-
-
-
-
- {{
- slotProps.registryTime
- ? moment(slotProps.registryTime).format(
- 'YYYY-MM-DD HH:mm:ss',
- )
- : ''
- }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 新增并绑定
-
+ 绑定
+ 批量解除
+
+
+
+ {{
+ slotProps.registryTime
+ ? moment(slotProps.registryTime).format(
+ 'YYYY-MM-DD HH:mm:ss',
+ )
+ : ''
+ }}
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+ style="padding: 0px"
+ :hasPermission="'device/Instance:' + i.key"
+ >
+
+
+
+
+
+
+
+
@@ -97,11 +119,17 @@ import { useInstanceStore } from '@/store/instance';
import { storeToRefs } from 'pinia';
import { message } from 'ant-design-vue';
import BindChildDevice from './BindChildDevice/index.vue';
+import { usePermissionStore } from '@/store/permission';
+import SaveChild from './SaveChild/index.vue';
const instanceStore = useInstanceStore();
const { detail } = storeToRefs(instanceStore);
const router = useRouter();
-
+const childVisible = ref(false);
+const permissionStore = usePermissionStore();
+// watchEffect(() => {
+// console.log(detail.value);
+// });
const statusMap = new Map();
statusMap.set('online', 'success');
statusMap.set('offline', 'error');
@@ -111,6 +139,7 @@ const childDeviceRef = ref>({});
const params = ref>({});
const _selectedRowKeys = ref([]);
const visible = ref(false);
+const current = ref({});
const columns = [
{
@@ -192,7 +221,7 @@ const getActions = (data: Partial>): ActionsType[] => {
},
},
{
- key: 'unbind',
+ key: 'action',
text: '解绑',
tooltip: {
title: '解绑',
@@ -215,6 +244,18 @@ const getActions = (data: Partial>): ActionsType[] => {
},
},
},
+ {
+ key: 'update',
+ text: '编辑',
+ tooltip: {
+ title: '编辑',
+ },
+ icon: 'EditOutlined',
+ onClick: () => {
+ current.value = data;
+ childVisible.value = true;
+ },
+ },
];
};
@@ -252,6 +293,10 @@ const closeBindDevice = (val: boolean) => {
childDeviceRef.value?.reload();
}
};
+
+const closeChildSave = () => {
+ childVisible.value = false;
+};
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/media/DashBoard/components/Card.vue b/src/views/media/DashBoard/components/Card.vue
index 5b0ecf2c..42683516 100644
--- a/src/views/media/DashBoard/components/Card.vue
+++ b/src/views/media/DashBoard/components/Card.vue
@@ -133,22 +133,22 @@ watch(
() => dimension.value,
(val) => {
if (val === 'today') {
- dateRange[0] = moment().startOf('day').format('x');
+ dateRange.value[0] = moment().startOf('day').format('x');
}
if (val === 'week') {
- dateRange[0] = moment().subtract(1, 'week').format('x');
+ dateRange.value[0] = moment().subtract(1, 'week').format('x');
}
if (val === 'month') {
- dateRange[0] = moment().subtract(1, 'month').format('x');
+ dateRange.value[0] = moment().subtract(1, 'month').format('x');
}
if (val === 'year') {
- dateRange[0] = moment().subtract(1, 'year').format('x');
+ dateRange.value[0] = moment().subtract(1, 'year').format('x');
}
- dateRange[1] = moment().format('x');
+ dateRange.value[1] = moment().format('x');
emits('change', {
time: {
- start: dateRange[0],
- end: dateRange[1],
+ start: dateRange.value[0],
+ end: dateRange.value[1],
},
});
},
diff --git a/src/views/media/Device/Channel/Save.vue b/src/views/media/Device/Channel/Save.vue
index 9dadda2c..7c1df256 100644
--- a/src/views/media/Device/Channel/Save.vue
+++ b/src/views/media/Device/Channel/Save.vue
@@ -55,7 +55,22 @@
/>
-
+
+
+
+
+
+
+
+
+
+
props.channelData,
(val: any) => {
+ console.log('val: ', val);
const {
id,
address,
@@ -179,6 +212,8 @@ watch(
description,
deviceId,
name,
+ manufacturer,
+ ptzType,
others,
...extra
} = val;
@@ -189,6 +224,8 @@ watch(
description,
deviceId,
name,
+ manufacturer,
+ ptzType: ptzType?.value || 0,
...others,
};
},
@@ -225,6 +262,8 @@ const handleSubmit = () => {
media_url,
media_password,
media_username,
+ manufacturer,
+ ptzType,
...extraFormData
} = formData.value;
if (media_url || media_password || media_username) {
diff --git a/src/views/media/Device/Save/SaveProduct.vue b/src/views/media/Device/Save/SaveProduct.vue
index 09c5d573..298c1b49 100644
--- a/src/views/media/Device/Save/SaveProduct.vue
+++ b/src/views/media/Device/Save/SaveProduct.vue
@@ -84,14 +84,16 @@
?.addresses"
:key="`${i.address}_address${idx}`"
>
-
+
+
+
@@ -263,6 +265,7 @@ const handleCancel = () => {
text-align: center;
.gateway-item {
padding: 16px;
+ text-align: left;
.card-item-content-title,
.desc,
.subtitle {
diff --git a/src/views/media/Device/index.vue b/src/views/media/Device/index.vue
index c5c00109..292f4ba3 100644
--- a/src/views/media/Device/index.vue
+++ b/src/views/media/Device/index.vue
@@ -294,9 +294,12 @@ const getActions = (
data.state.value === 'notActive' ||
data.provider === 'fixed-media',
icon: 'SyncOutlined',
- onClick: () => {
- // updateChannel()
- console.log('updateChannel: ', data);
+ onClick: async () => {
+ const res = await DeviceApi.updateChannels(data.id);
+ if (res.success) {
+ message.success('通道更新成功');
+ listRef.value?.reload();
+ }
},
},
{
diff --git a/src/views/rule-engine/Instance/index.vue b/src/views/rule-engine/Instance/index.vue
index 13f9bed0..92f0e4a5 100644
--- a/src/views/rule-engine/Instance/index.vue
+++ b/src/views/rule-engine/Instance/index.vue
@@ -116,6 +116,9 @@
@click="i.onClick"
type="link"
style="padding: 0px"
+ :hasPermission="
+ 'rule-engine/Instance:' + i.key
+ "
>
-
-
-
- {{ label }}
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue
new file mode 100644
index 00000000..52992e07
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/DropdownButton.vue
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ name }}
+ {{ description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue
new file mode 100644
index 00000000..0a48897a
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/Menus.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue b/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue
new file mode 100644
index 00000000..ab9a7983
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/Time.vue
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less
new file mode 100644
index 00000000..359d9041
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.less
@@ -0,0 +1,44 @@
+.dropdown-button {
+ display: flex;
+ align-items: center;
+ padding: 6px 8px;
+ border: 1px solid #d9d9d9;
+ border-radius: 8px;
+ cursor: pointer;
+}
+
+.scene-select-content {
+ position: relative;
+ min-width: 220px;
+ padding: 4px;
+ background: #fff;
+ border-radius: 2px;
+ box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d;
+}
+
+.column {
+ color: #00a4fe;
+ background-color: rgba(154, 219, 255, 0.3);
+ border-color: rgba(0, 164, 254, 0.3);
+}
+
+.termType {
+ color: #2f54eb;
+ background-color: rgba(163, 202, 255, 0.3);
+ border-color: rgba(47, 84, 235, 0.3);
+}
+
+.value {
+ color: #692ca7;
+ background-color: rgba(188, 125, 238, 0.1);
+ border-color: rgba(188, 125, 238, 0.5);
+}
+
+.type {
+ padding: 5px 10px;
+}
+
+.tree-title-description {
+ padding-left: 5px;
+ color: grey;
+}
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts
new file mode 100644
index 00000000..214d6ef1
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/index.ts
@@ -0,0 +1,9 @@
+import Dropdown from './DropdownButton.vue'
+import DropdownMenus from './Menus.vue'
+import DropdownTimePicker from './Time.vue'
+
+export default Dropdown
+
+export {
+ DropdownMenus, DropdownTimePicker
+}
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts b/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts
new file mode 100644
index 00000000..ba64375e
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/DropdownButton/util.ts
@@ -0,0 +1,42 @@
+export type DropdownButtonOptions = {
+ label: string;
+ value: string;
+ children?: DropdownButtonOptions[];
+ [key: string]: any;
+};
+
+export const getComponent = (type: string): string => {
+ switch (type) {
+ case 'int':
+ case 'long':
+ case 'float':
+ case 'double':
+ return 'number'
+ case 'metric':
+ case 'enum':
+ case 'boolean':
+ return 'menu'
+ case 'date':
+ return 'date'
+ case 'tree':
+ return 'tree'
+ default:
+ return 'input'
+ }
+}
+
+export const getOption = (data: any[], value?: string | number | boolean, key: string = 'name'): DropdownButtonOptions | any => {
+ let option = {}
+ if (!value) return option
+ for (let i = 0; i < data.length; i++) {
+ const item = data[i]
+ if (item[key] === value) {
+ option = data[i]
+ break
+ } else if (item.children && item.children.length){
+ option = getOption(item.children, value, key)
+ if (option) break
+ }
+ }
+ return option
+}
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue
deleted file mode 100644
index bc101782..00000000
--- a/src/views/rule-engine/Scene/Save/components/ParamsDropdown.vue
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue
new file mode 100644
index 00000000..79c03073
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/Double.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts
new file mode 100644
index 00000000..dca9540f
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.ts
@@ -0,0 +1,8 @@
+import ParamsDropdown from './index.vue'
+import DoubleParamsDropdown from './Double.vue'
+
+export default ParamsDropdown
+
+export {
+ DoubleParamsDropdown
+}
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue
new file mode 100644
index 00000000..65010591
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/index.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ name }}
+ {{ description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts
new file mode 100644
index 00000000..dfbf0a62
--- /dev/null
+++ b/src/views/rule-engine/Scene/Save/components/ParamsDropdown/typings.ts
@@ -0,0 +1,58 @@
+import type { PropType } from 'vue'
+
+export type LabelType = string | number | undefined
+
+export type DropdownButtonOptions = {
+ label: string;
+ value: string;
+ children?: DropdownButtonOptions[];
+ [key: string]: any;
+};
+
+export type TabsOption = {
+ label: string;
+ key: string;
+ component: string,
+ options: DropdownButtonOptions[]
+}
+type ValueArrayType = [string, number]
+export type ValueType = string | number | undefined | ValueArrayType
+
+export const defaultSetting = {
+ icon: {
+ type: String,
+ default: ''
+ },
+ placeholder: {
+ type: String,
+ default: undefined
+ },
+ value: {
+ type: [String, Number, Array] as PropType,
+ default: undefined
+ },
+ valueName: {
+ type: String,
+ default: 'value'
+ },
+ labelName: {
+ type: String,
+ default: 'label'
+ },
+ source: {
+ type: String,
+ default: 'fixed'
+ },
+ options: {
+ type: Array as PropType>,
+ default: () => []
+ },
+ metricOptions: { // 指标值
+ type: Array as PropType>,
+ default: () => []
+ },
+ tabsOptions: {
+ type: Array as PropType>,
+ default: () => []
+ }
+}
diff --git a/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue b/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue
index 60c55ac2..fa8d0d84 100644
--- a/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue
+++ b/src/views/rule-engine/Scene/Save/components/Terms/ParamsItem.vue
@@ -16,8 +16,11 @@
@mouseout='mouseout'
>
-
-
-
+
+
-