Merge remote-tracking branch 'yudao/feature/iot' into feature/iot
This commit is contained in:
@ -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
|
||||
|
||||
@ -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 } }>({})
|
||||
|
||||
@ -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 @puhui999:value、label 看看能不能复用枚举值;
|
||||
const statusOperatorOptions = [
|
||||
{
|
||||
value: '=',
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -199,6 +199,7 @@ const handleValidate = (result: { valid: boolean; message: string }) => {
|
||||
}
|
||||
|
||||
// 验证逻辑
|
||||
// TODO @puhui999:这个校验,是不是用更原生的 validator 哈。项目风格更统一点。
|
||||
const updateValidationResult = () => {
|
||||
if (isDevicePropertyTrigger.value) {
|
||||
// 设备属性触发验证
|
||||
|
||||
Reference in New Issue
Block a user