forked from github/dataease
perf(X-Pack): 阈值告警预览页面
This commit is contained in:
parent
139f9974b5
commit
378fbd5020
@ -7,7 +7,6 @@
|
||||
import { ref, toRefs, watch, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { formatDataEaseBi } from '@/utils/url'
|
||||
import { guid } from '@/views/visualized/data/dataset/form/util'
|
||||
import tinymce from 'tinymce/tinymce' // tinymce默认hidden,不引入不显示
|
||||
import Editor from '@tinymce/tinymce-vue' // 编辑器引入
|
||||
import 'tinymce/themes/silver/theme' // 编辑器主题
|
||||
@ -126,6 +125,7 @@ const init = ref({
|
||||
fetch: callback => {
|
||||
const items = props.fieldList.map(ele => {
|
||||
return {
|
||||
id: ele.id,
|
||||
icon: iconMap[ele.deType],
|
||||
type: 'choiceitem',
|
||||
text: ele.name,
|
||||
@ -144,11 +144,12 @@ const fieldSelect = name => {
|
||||
const ed = tinymce.editors[tinymceId]
|
||||
const obj = props.fieldList.find(ele => ele.name === name)
|
||||
const field = {
|
||||
id: obj.id,
|
||||
name: obj.name,
|
||||
backgroundColor: obj.groupType === 'd' ? '#3370FF33' : '#00D6B933',
|
||||
color: obj.groupType === 'd' ? '#2B5FD9' : '#04B49C'
|
||||
}
|
||||
const fieldId = 'changeText-' + guid()
|
||||
const fieldId = 'changeText-' + field.id || ''
|
||||
const value =
|
||||
`<span style="background: ${field.backgroundColor};color: ${field.color}" id="` +
|
||||
fieldId +
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 813c95f1106779434b2b5715034cde96da491ba0
|
||||
Subproject commit a77c9297c262ab15f600897c00e30abf02166fda
|
@ -63,4 +63,7 @@ public interface ThresholdApi {
|
||||
@PostMapping("/instancePager/{goPage}/{pageSize}")
|
||||
IPage<ThresholdInstanceVO> instancePager(@PathVariable("goPage") int goPage, @PathVariable("pageSize") int pageSize, @RequestBody ThresholdInstanceRequest request);
|
||||
|
||||
@Operation(summary = "预览信息")
|
||||
@PostMapping("/preview")
|
||||
String preview(@RequestBody ThresholdPreviewRequest request);
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package io.dataease.api.threshold.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ThresholdPreviewRequest implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3609209252630995739L;
|
||||
|
||||
private Long tableId;
|
||||
|
||||
private String thresholdRules;
|
||||
|
||||
private String msgContent;
|
||||
}
|
Loading…
Reference in New Issue
Block a user