Merge remote-tracking branch 'yudao/feature/iot' into feature/iot

This commit is contained in:
puhui999
2025-08-02 11:44:24 +08:00
140 changed files with 2747 additions and 2464 deletions

View File

@ -52,6 +52,7 @@
<!-- 属性/事件/服务选择 -->
<el-col :span="6">
<el-form-item label="监控项" required>
<!-- TODO @puhui999是不是不展示“整数”、“小数”这个类型一行只展示属性名 + 标识,更简洁一点;然后标识是 tag因为已经有个 tip 了 -->
<PropertySelector
:model-value="condition.identifier"
@update:model-value="(value) => updateConditionField('identifier', value)"
@ -76,6 +77,7 @@
</el-col>
<!-- 值输入 -->
<!-- TODO @puhui999框子大小占满哈。 -->
<el-col :span="12">
<el-form-item label="比较值" required>
<ValueInput

View File

@ -13,8 +13,8 @@
</div>
<span>附加条件组</span>
</div>
<el-tag size="small" type="success">主条件为且关系</el-tag>
<el-tag size="small" type="info"> {{ modelValue?.length || 0 }}个子条件组 </el-tag>
<el-tag size="small" type="success">主条件为且关系</el-tag>
<el-tag size="small" type="info"> {{ modelValue?.length || 0 }} 个子条件组 </el-tag>
</div>
<div class="flex items-center gap-8px">
<el-button
@ -140,9 +140,10 @@ const emit = defineEmits<{
const container = useVModel(props, 'modelValue', emit)
// TODO @puhui999这个限制去掉好了
// 配置常量
const maxSubGroups = 3 // 最多3个子条件组
const maxConditionsPerGroup = 3 // 每组最多3个条件
const maxSubGroups = 3 // 最多 3 个子条件组
const maxConditionsPerGroup = 3 // 每组最多 3 个条件
// 验证状态
const subGroupValidations = ref<{ [key: number]: { valid: boolean; message: string } }>({})

View File

@ -43,9 +43,9 @@
>
<div class="flex items-center justify-between w-full">
<span>{{ option.label }}</span>
<span class="text-12px text-[var(--el-text-color-secondary)]">{{
option.description
}}</span>
<span class="text-12px text-[var(--el-text-color-secondary)]">
{{ option.description }}
</span>
</div>
</el-option>
</el-select>
@ -101,6 +101,7 @@ const emit = defineEmits<{
const condition = useVModel(props, 'modelValue', emit)
// 设备状态选项
// TODO @puhui999这个要不直接字段简洁一点
const deviceStatusOptions = [
{
value: 'online',
@ -121,6 +122,7 @@ const deviceStatusOptions = [
]
// 状态操作符选项
// TODO @puhui999value、label 看看能不能复用枚举值;
const statusOperatorOptions = [
{
value: '=',

View File

@ -20,6 +20,7 @@
</div>
<!-- 主条件配置 -->
<!-- TODO @puhui999主条件是不是和附加条件组弄成一个风格都是占一行有个绿条 -->
<div v-else class="space-y-16px">
<div class="flex items-center justify-between">
<div class="flex items-center gap-8px">

View File

@ -199,6 +199,7 @@ const handleValidate = (result: { valid: boolean; message: string }) => {
}
// 验证逻辑
// TODO @puhui999这个校验是不是用更原生的 validator 哈。项目风格更统一点。
const updateValidationResult = () => {
if (isDevicePropertyTrigger.value) {
// 设备属性触发验证