|
|
@@ -48,6 +48,10 @@
|
|
|
<div class="item_title">{{ item }}</div>
|
|
|
<!-- <div class="item_details">{{ currentRow?.remark }}</div> -->
|
|
|
</div>
|
|
|
+ <div class="textbox" style="justify-content: flex-start">
|
|
|
+ <div class="item_title" style="width: auto">设置参数:</div>
|
|
|
+ <ElTag v-for="tag in tags" :key="tag" class="mr-2">{{ labelNameMap[tag] }}</ElTag>
|
|
|
+ </div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
<div class="top_right">
|
|
|
@@ -59,7 +63,8 @@
|
|
|
<div class="details_title" style="margin-bottom: 16px">报警推送编辑</div>
|
|
|
<el-form :model="alarmConfig" size="default" :rules="rules" ref="ruleFormRef">
|
|
|
<el-form-item label="语句编辑:" prop="pushStatement">
|
|
|
- <div class="pushStatement">
|
|
|
+ <div class="pushStatement"
|
|
|
+ >condition
|
|
|
<div class="remark">时间:(示例:2023.10.23 10:55:28)</div>
|
|
|
<div class="remark">地点:(示例:C919总装车间150A工位)</div>
|
|
|
<el-input
|
|
|
@@ -95,6 +100,7 @@
|
|
|
import useAlgo from './useAlgoData';
|
|
|
import { Search } from '@element-plus/icons-vue';
|
|
|
import type { FormInstance, FormRules } from 'element-plus';
|
|
|
+ import { labelNameMap } from '../preview/components/AlgorithmsSetting/types';
|
|
|
|
|
|
//调用后端数据
|
|
|
const algoDatas = useAlgo();
|
|
|
@@ -138,6 +144,7 @@
|
|
|
id: 0,
|
|
|
pushLinkPrompt: '',
|
|
|
pushStatement: '',
|
|
|
+ extra: '',
|
|
|
});
|
|
|
|
|
|
interface User {
|
|
|
@@ -148,15 +155,31 @@
|
|
|
id: number;
|
|
|
pushLinkPrompt: string;
|
|
|
pushStatement: string;
|
|
|
+ extra: string;
|
|
|
}
|
|
|
|
|
|
const arrRemark = ref<string[]>([]);
|
|
|
+ const tags = ref<string[]>([]);
|
|
|
|
|
|
const handleRowClick = (val: User | undefined) => {
|
|
|
+ tags.value = [];
|
|
|
+
|
|
|
// console.log('xxxxxxxxxx', currentRow.value);
|
|
|
- currentRow.value = val;
|
|
|
+ currentRow.value = val || ({} as User);
|
|
|
arrRemark.value = currentRow.value.remark.split('\r\n');
|
|
|
// console.log('arrRemark', arrRemark.value);
|
|
|
+
|
|
|
+ const extra = currentRow.value.extra;
|
|
|
+ if (extra) {
|
|
|
+ const extraObj = JSON.parse(extra);
|
|
|
+ const params = extraObj?.inferParams;
|
|
|
+ if (params && params.length > 0) {
|
|
|
+ const metaObjs = params[0]?.metaObjs;
|
|
|
+ if (metaObjs && metaObjs.length > 0) {
|
|
|
+ tags.value = metaObjs.map((item) => item.label);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const searchKey = ref('');
|