feat(X-Pack): 增加血缘分析、告警管理菜单

This commit is contained in:
fit2cloud-chenyw 2024-08-08 18:52:35 +08:00
commit 552d296ac9
7 changed files with 138 additions and 8 deletions

View File

@ -31,6 +31,7 @@ i18n_menu.plugin=\u63D2\u4EF6\u7BA1\u7406
i18n_menu.platform=\u5E73\u53F0\u5BF9\u63A5
i18n_menu.appearance=\u5916\u89C2\u914D\u7F6E
i18n_menu.sysVariable=\u7CFB\u7EDF\u53D8\u91CF
i18n_menu.sysTypeface=\u5b57\u4f53\u7ba1\u7406
i18n_field_name_repeat=\u6709\u91CD\u590D\u5B57\u6BB5\u540D\uFF1A
i18n_pid_not_eq_id=\u79FB\u52A8\u76EE\u6807\u4E0D\u80FD\u662F\u81EA\u5DF1\u6216\u5B50\u76EE\u5F55
i18n_ds_name_exists=\u8BE5\u5206\u7EC4\u4E0B\u540D\u79F0\u91CD\u590D

View File

@ -127,9 +127,17 @@ onBeforeMount(() => {
<template>
<el-date-picker
disabled
class="date-editor_granularity"
:key="config.timeGranularity"
v-model="selectValue"
:type="config.timeGranularity"
:placeholder="$t('commons.date.select_date_time')"
/>
</template>
<style lang="less">
.date-editor_granularity .ed-input__wrapper {
width: 325px;
margin-top: 0;
}
</style>

View File

@ -231,7 +231,7 @@ defineExpose({
/>
</el-select>
<el-time-picker
style="width: 146px; margin-left: 8px"
style="width: 108px; margin-left: 8px"
v-if="curComponent.timeGranularity === 'datetime'"
v-model="curComponent.arbitraryTime"
/>
@ -239,8 +239,8 @@ defineExpose({
</div>
<div class="setting">
<div class="setting-label">预览</div>
<div class="setting-value">
<component :config="curComponent" isConfig ref="inputCom" :is="DynamicTime"></component>
<div class="setting-value" style="width: 325px">
<DynamicTime style="width: 100%" :config="curComponent" isConfig></DynamicTime>
</div>
</div>
</div>
@ -280,7 +280,7 @@ defineExpose({
.setting-input {
display: flex;
padding-left: 86px;
padding-left: 126px;
justify-content: flex-end;
align-items: center;
&.range {

View File

@ -197,14 +197,59 @@ const relativeToCurrentTypeMap = {
const confirmTimeSelect = () => {
item.value.dynamicTimeSetting = { ...timeDialog.value.curComponent }
const { timeGranularity, timeNum, relativeToCurrentType, around, arbitraryTime } =
item.value.dynamicTimeSetting
const {
timeGranularity,
timeNum,
relativeToCurrentType,
around,
arbitraryTime,
relativeToCurrent
} = item.value.dynamicTimeSetting
if (relativeToCurrent !== 'custom') {
item.value.timeValue = [
{
label: '今年',
value: 'thisYear'
},
{
label: '去年',
value: 'lastYear'
},
{
label: '本月',
value: 'thisMonth'
},
{
label: '上月',
value: 'lastMonth'
},
{
label: '今天',
value: 'today'
},
{
label: '昨天',
value: 'yesterday'
},
{
label: '月初',
value: 'monthBeginning'
},
{
label: '年初',
value: 'yearBeginning'
}
].find(ele => ele.value === relativeToCurrent).label
dialogVisible.value = false
return
}
item.value.timeValue = `${timeNum}${relativeToCurrentTypeMap[relativeToCurrentType]}${
around === 'f' ? '前' : '后'
}`
if (timeGranularity === 'datetime') {
item.value.timeValue += new Date(arbitraryTime).toLocaleString().split(' ')[1]
}
dialogVisible.value = false
}

View File

@ -0,0 +1,40 @@
package io.dataease.api.typeface.api;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.api.typeface.dto.SysTypefaceDto;
import io.dataease.auth.DeApiPath;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import static io.dataease.constant.AuthResourceEnum.SYSTEM;
@Tag(name = "字体管理")
@ApiSupport(order = 881, author = "fit2cloud-someone")
@DeApiPath(value = "/sysTypeface", rt = SYSTEM)
public interface SysTypefaceApi {
@Operation(summary = "创建")
@PostMapping("/create")
SysTypefaceDto create(@RequestBody SysTypefaceDto sysVariableDto);
@Operation(summary = "编辑")
@PostMapping("/edit")
SysTypefaceDto edit(@RequestBody SysTypefaceDto sysVariableDto);
@Operation(summary = "删除")
@PostMapping("/delete/{id}")
void delete(@PathVariable("id") Long id);
@Operation(summary = "变更默认设置")
@PostMapping("/changeDefault/")
void changeDefault(@RequestBody SysTypefaceDto sysVariableDto);
}

View File

@ -0,0 +1,32 @@
package io.dataease.api.typeface.dto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
@Data
public class SysTypefaceDto {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 字体名称
*/
private String name;
/**
* 文件名称
*/
private String fileName;
/**
* 文件转换名称
*/
private String fileTransName;
/**
* 是否默认
*/
private Boolean isDefault;
}

View File

@ -92,9 +92,13 @@ public abstract class Provider {
*/
public abstract void hidePW(DatasourceDTO datasourceDTO);
public abstract void exec(DatasourceRequest datasourceRequest) throws DEException;
public void exec(DatasourceRequest datasourceRequest) {
public abstract int executeUpdate(DatasourceRequest datasourceRequest) throws DEException;
}
public int executeUpdate(DatasourceRequest datasourceRequest) {
return 0;
}
@Getter