mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #9660 from dataease/pr@dev-v2@perf_report_not_finish
Pr@dev v2@perf report not finish
This commit is contained in:
commit
d8164430dd
@ -0,0 +1,17 @@
|
||||
package io.dataease.chart.dao.ext.mapper;
|
||||
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ExtChartViewMapper {
|
||||
|
||||
@Select("""
|
||||
select id, scene_id as pid, title, type from core_chart_view where scene_id = #{resourceId}
|
||||
""")
|
||||
List<ViewSelectorVO> queryViewOption(@Param("resourceId") Long resourceId);
|
||||
}
|
@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.dataease.api.chart.dto.*;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.api.chart.filter.FilterTreeObj;
|
||||
import io.dataease.api.dataset.union.model.SQLObj;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.dao.ext.mapper.ExtChartViewMapper;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper;
|
||||
import io.dataease.dataset.manage.PermissionManage;
|
||||
@ -42,6 +44,9 @@ public class ChartViewManege {
|
||||
@Resource
|
||||
private PermissionManage permissionManage;
|
||||
|
||||
@Resource
|
||||
private ExtChartViewMapper extChartViewMapper;
|
||||
|
||||
private ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@Transactional
|
||||
@ -272,4 +277,7 @@ public class ChartViewManege {
|
||||
|
||||
}
|
||||
|
||||
public List<ViewSelectorVO> viewOption(Long resourceId) {
|
||||
return extChartViewMapper.queryViewOption(resourceId);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.chart.server;
|
||||
import io.dataease.api.chart.ChartViewApi;
|
||||
import io.dataease.api.chart.dto.ChartViewDTO;
|
||||
import io.dataease.api.chart.dto.ChartViewFieldDTO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.dataease.chart.manage.ChartViewManege;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.result.ResultCode;
|
||||
@ -52,5 +53,8 @@ public class ChartViewServer implements ChartViewApi {
|
||||
return chartViewManege.getDetails(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ViewSelectorVO> viewOption(Long resourceId) {
|
||||
return chartViewManege.viewOption(resourceId);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class CronUtils {
|
||||
return date;
|
||||
}
|
||||
|
||||
public static String cron() {
|
||||
public static String tempCron() {
|
||||
Calendar instance = Calendar.getInstance();
|
||||
instance.add(Calendar.SECOND, 5);
|
||||
return instance.get(Calendar.SECOND) + " " +
|
||||
|
@ -10,32 +10,34 @@ import org.quartz.TriggerKey;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
@Component("deTaskExecutor")
|
||||
public class DeTaskExecutor {
|
||||
|
||||
protected static final String IS_TEMP_TASK = "isTempTask";
|
||||
|
||||
private static final String JOB_GROUP = "REPORT_TASK";
|
||||
private static final String TEMP_JOB_GROUP = "TEMP_REPORT_TASK";
|
||||
|
||||
@Resource
|
||||
private ScheduleManager scheduleManager;
|
||||
|
||||
@XpackInteract(value = "xpackTaskExecutor", replace = true)
|
||||
public boolean execute(Long taskId) {
|
||||
public boolean execute(Map<String, Object> taskData) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@XpackInteract(value = "xpackTaskExecutor", replace = true)
|
||||
public boolean executeTemplate(Long taskId) {
|
||||
return false;
|
||||
}
|
||||
public void init() {}
|
||||
|
||||
public void addOrUpdateTask(Long taskId, String cron, Long startTime, Long endTime) {
|
||||
if (CronUtils.taskExpire(endTime)) {
|
||||
return;
|
||||
}
|
||||
String key = taskId.toString();
|
||||
JobKey jobKey = new JobKey(key, key);
|
||||
TriggerKey triggerKey = new TriggerKey(key, key);
|
||||
JobKey jobKey = new JobKey(key, JOB_GROUP);
|
||||
TriggerKey triggerKey = new TriggerKey(key, JOB_GROUP);
|
||||
JobDataMap jobDataMap = new JobDataMap();
|
||||
jobDataMap.put("taskId", taskId);
|
||||
jobDataMap.put(IS_TEMP_TASK, false);
|
||||
@ -44,27 +46,27 @@ public class DeTaskExecutor {
|
||||
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, new Date(startTime), end, jobDataMap);
|
||||
}
|
||||
|
||||
public void fireNow(Long taskId) throws Exception{
|
||||
public void fireNow(Long taskId) throws Exception {
|
||||
String key = taskId.toString();
|
||||
JobKey jobKey = new JobKey(key, key);
|
||||
JobKey jobKey = new JobKey(key, JOB_GROUP);
|
||||
scheduleManager.fireNow(jobKey);
|
||||
}
|
||||
|
||||
public void addTempTask(Long taskId, Long startTime) {
|
||||
String key = taskId.toString();
|
||||
JobKey jobKey = new JobKey(key, key);
|
||||
TriggerKey triggerKey = new TriggerKey(key, key);
|
||||
JobKey jobKey = new JobKey(key, TEMP_JOB_GROUP);
|
||||
TriggerKey triggerKey = new TriggerKey(key, TEMP_JOB_GROUP);
|
||||
JobDataMap jobDataMap = new JobDataMap();
|
||||
jobDataMap.put(IS_TEMP_TASK, true);
|
||||
String cron = CronUtils.cron();
|
||||
String cron = CronUtils.tempCron();
|
||||
jobDataMap.put("taskId", taskId);
|
||||
scheduleManager.addOrUpdateCronJob(jobKey, triggerKey, DeXpackScheduleJob.class, cron, new Date(startTime), null, jobDataMap);
|
||||
}
|
||||
|
||||
public void removeTask(Long taskId) {
|
||||
public void removeTask(Long taskId, boolean isTemp) {
|
||||
String key = taskId.toString();
|
||||
JobKey jobKey = new JobKey(key);
|
||||
TriggerKey triggerKey = new TriggerKey(key);
|
||||
JobKey jobKey = new JobKey(key, isTemp ? TEMP_JOB_GROUP : JOB_GROUP);
|
||||
TriggerKey triggerKey = new TriggerKey(key, isTemp ? TEMP_JOB_GROUP : JOB_GROUP);
|
||||
scheduleManager.removeJob(jobKey, triggerKey);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.job.schedule;
|
||||
|
||||
import io.dataease.license.utils.LicenseUtil;
|
||||
import io.dataease.utils.CommonBeanFactory;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.quartz.*;
|
||||
@ -9,26 +10,19 @@ import java.util.Objects;
|
||||
|
||||
@Component
|
||||
public class DeXpackScheduleJob implements Job {
|
||||
@Resource
|
||||
private DeTaskExecutor deTaskExecutor;
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
Trigger trigger = jobExecutionContext.getTrigger();
|
||||
JobKey jobKey = trigger.getJobKey();
|
||||
JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap();
|
||||
Long taskId = jobDataMap.getLong("taskId");
|
||||
boolean isTempTask = jobDataMap.getBoolean("isTempTask");
|
||||
boolean taskLoaded = false;
|
||||
if (isTempTask) {
|
||||
taskLoaded = deTaskExecutor.executeTemplate(taskId);
|
||||
} else {
|
||||
taskLoaded = deTaskExecutor.execute(taskId);
|
||||
}
|
||||
DeTaskExecutor deTaskExecutor = CommonBeanFactory.getBean(DeTaskExecutor.class);
|
||||
assert deTaskExecutor != null;
|
||||
LicenseUtil.validate();
|
||||
boolean taskLoaded = deTaskExecutor.execute(jobDataMap);
|
||||
if (!taskLoaded) {
|
||||
Objects.requireNonNull(CommonBeanFactory.getBean(ScheduleManager.class)).removeJob(jobKey, trigger.getKey());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
package io.dataease.listener;
|
||||
|
||||
import io.dataease.job.schedule.DeTaskExecutor;
|
||||
import io.dataease.license.utils.LicenseUtil;
|
||||
import io.dataease.utils.LogUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Order(value = 4)
|
||||
public class XpackTaskStarter implements ApplicationRunner {
|
||||
|
||||
@Resource
|
||||
private DeTaskExecutor deTaskExecutor;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
try {
|
||||
LicenseUtil.validate();
|
||||
deTaskExecutor.init();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e.getCause());
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1,3 @@
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M104.185 95.254c8.161 7.574 13.145 17.441 13.145 28.28 0 1.508-.098 2.998-.285 4.466h-10.784c.238-1.465.403-2.948.403-4.465 0-8.983-4.36-17.115-11.419-23.216C86 104.66 75.355 107.162 64 107.162c-11.344 0-21.98-2.495-31.22-6.83-7.064 6.099-11.444 14.218-11.444 23.203 0 1.517.165 3 .403 4.465H10.955a35.444 35.444 0 0 1-.285-4.465c0-10.838 4.974-20.713 13.127-28.291C9.294 85.42.003 70.417.003 53.58.003 23.99 28.656.001 64 .001s63.997 23.988 63.997 53.58c0 16.842-9.299 31.85-23.812 41.673zM64 36.867c-29.454 0-53.33-10.077-53.33 15.342 0 25.418 23.876 46.023 53.33 46.023 29.454 0 53.33-20.605 53.33-46.023 0-25.419-23.876-15.342-53.33-15.342zm24.888 25.644c-3.927 0-7.111-2.665-7.111-5.953 0-3.288 3.184-5.954 7.11-5.954 3.928 0 7.111 2.666 7.111 5.954s-3.183 5.953-7.11 5.953zm-3.556 16.372c0 4.11-9.55 7.442-21.332 7.442-11.781 0-21.332-3.332-21.332-7.442 0-1.06.656-2.064 1.8-2.976 3.295 2.626 10.79 4.465 19.532 4.465 8.743 0 16.237-1.84 19.531-4.465 1.145.912 1.801 1.916 1.801 2.976zm-46.22-16.372c-3.927 0-7.11-2.665-7.11-5.953 0-3.288 3.183-5.954 7.11-5.954 3.927 0 7.111 2.666 7.111 5.954s-3.184 5.953-7.11 5.953z"/></svg>
|
||||
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M104.185 95.254c8.161 7.574 13.145 17.441 13.145 28.28 0 1.508-.098 2.998-.285 4.466h-10.784c.238-1.465.403-2.948.403-4.465 0-8.983-4.36-17.115-11.419-23.216C86 104.66 75.355 107.162 64 107.162c-11.344 0-21.98-2.495-31.22-6.83-7.064 6.099-11.444 14.218-11.444 23.203 0 1.517.165 3 .403 4.465H10.955a35.444 35.444 0 0 1-.285-4.465c0-10.838 4.974-20.713 13.127-28.291C9.294 85.42.003 70.417.003 53.58.003 23.99 28.656.001 64 .001s63.997 23.988 63.997 53.58c0 16.842-9.299 31.85-23.812 41.673zM64 36.867c-29.454 0-53.33-10.077-53.33 15.342 0 25.418 23.876 46.023 53.33 46.023 29.454 0 53.33-20.605 53.33-46.023 0-25.419-23.876-15.342-53.33-15.342zm24.888 25.644c-3.927 0-7.111-2.665-7.111-5.953 0-3.288 3.184-5.954 7.11-5.954 3.928 0 7.111 2.666 7.111 5.954s-3.183 5.953-7.11 5.953zm-3.556 16.372c0 4.11-9.55 7.442-21.332 7.442-11.781 0-21.332-3.332-21.332-7.442 0-1.06.656-2.064 1.8-2.976 3.295 2.626 10.79 4.465 19.532 4.465 8.743 0 16.237-1.84 19.531-4.465 1.145.912 1.801 1.916 1.801 2.976zm-46.22-16.372c-3.927 0-7.11-2.665-7.11-5.953 0-3.288 3.183-5.954 7.11-5.954 3.927 0 7.111 2.666 7.111 5.954s-3.184 5.953-7.11 5.953z"/></svg><svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.25 6.58317H7.75C9.36083 6.58317 11.25 7.70816 11.25 9.73317V11.3082C11.25 11.5981 10.9888 11.8332 10.6667 11.8332H1.33333C1.01117 11.8332 0.75 11.5981 0.75 11.3082V9.73317C0.75 7.70986 2.63917 6.58317 4.25 6.58317ZM10.0833 10.6665V9.69428C10.0833 8.46841 8.84142 7.74984 7.75 7.74984H4.25C3.18248 7.74984 1.91667 8.43333 1.91667 9.69428V10.6665H10.0833ZM6 5.99984C4.38917 5.99984 3.08333 4.694 3.08333 3.08317C3.08333 1.47234 4.38917 0.166504 6 0.166504C7.61083 0.166504 8.91667 1.47234 8.91667 3.08317C8.91667 4.694 7.61083 5.99984 6 5.99984ZM6 4.83317C6.9665 4.83317 7.75 4.04967 7.75 3.08317C7.75 2.11667 6.9665 1.33317 6 1.33317C5.0335 1.33317 4.25 2.11667 4.25 3.08317C4.25 4.04967 5.0335 4.83317 6 4.83317Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.0 KiB |
3
core/core-frontend/src/assets/svg/user-reci.svg
Normal file
3
core/core-frontend/src/assets/svg/user-reci.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.25 6.58317H7.75C9.36083 6.58317 11.25 7.70816 11.25 9.73317V11.3082C11.25 11.5981 10.9888 11.8332 10.6667 11.8332H1.33333C1.01117 11.8332 0.75 11.5981 0.75 11.3082V9.73317C0.75 7.70986 2.63917 6.58317 4.25 6.58317ZM10.0833 10.6665V9.69428C10.0833 8.46841 8.84142 7.74984 7.75 7.74984H4.25C3.18248 7.74984 1.91667 8.43333 1.91667 9.69428V10.6665H10.0833ZM6 5.99984C4.38917 5.99984 3.08333 4.694 3.08333 3.08317C3.08333 1.47234 4.38917 0.166504 6 0.166504C7.61083 0.166504 8.91667 1.47234 8.91667 3.08317C8.91667 4.694 7.61083 5.99984 6 5.99984ZM6 4.83317C6.9665 4.83317 7.75 4.04967 7.75 3.08317C7.75 2.11667 6.9665 1.33317 6 1.33317C5.0335 1.33317 4.25 2.11667 4.25 3.08317C4.25 4.04967 5.0335 4.83317 6 4.83317Z" fill=""/>
|
||||
</svg>
|
After Width: | Height: | Size: 835 B |
@ -5,6 +5,7 @@ import { ref, onMounted, toRefs, getCurrentInstance, computed } from 'vue'
|
||||
import findComponent from '@/utils/components'
|
||||
import { downloadCanvas, imgUrlTrans } from '@/utils/imgUtils'
|
||||
import ComponentEditBar from '@/components/visualization/ComponentEditBar.vue'
|
||||
import ComponentSelector from '@/components/visualization/ComponentSelector.vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
|
||||
const componentWrapperInnerRef = ref(null)
|
||||
@ -72,6 +73,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 100
|
||||
},
|
||||
isSelector: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
const { config, showPosition, index, canvasStyleData, canvasViewInfo, dvInfo, searchCount, scale } =
|
||||
@ -187,7 +192,7 @@ const deepScale = computed(() => scale.value / 100)
|
||||
@mouseenter="onMouseEnter"
|
||||
>
|
||||
<component-edit-bar
|
||||
v-if="!showPosition.includes('canvas') && dvInfo.type === 'dashboard'"
|
||||
v-if="!showPosition.includes('canvas') && dvInfo.type === 'dashboard' && !props.isSelector"
|
||||
class="wrapper-edit-bar"
|
||||
ref="componentEditBarRef"
|
||||
:class="{ 'wrapper-edit-bar-active': active }"
|
||||
@ -197,6 +202,10 @@ const deepScale = computed(() => scale.value / 100)
|
||||
:show-position="showPosition"
|
||||
@userViewEnlargeOpen="opt => emits('userViewEnlargeOpen', opt)"
|
||||
></component-edit-bar>
|
||||
<component-selector
|
||||
v-if="props.isSelector && config.component === 'UserView'"
|
||||
:resource-id="config.id"
|
||||
/>
|
||||
<div class="wrapper-inner" ref="componentWrapperInnerRef" :style="componentBackgroundStyle">
|
||||
<!--边框背景-->
|
||||
<Icon
|
||||
|
@ -12,6 +12,7 @@ import CanvasOptBar from '@/components/visualization/CanvasOptBar.vue'
|
||||
import { isMainCanvas } from '@/utils/canvasUtils'
|
||||
import { activeWatermark } from '@/components/watermark/watermark'
|
||||
import { personInfoApi } from '@/api/user'
|
||||
import router from '@/router'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { pcMatrixCount, curComponent, mobileInPc } = storeToRefs(dvMainStore)
|
||||
|
||||
@ -58,6 +59,10 @@ const props = defineProps({
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
},
|
||||
isSelector: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
@ -85,7 +90,9 @@ const userInfo = ref(null)
|
||||
const dashboardActive = computed(() => {
|
||||
return dvInfo.value.type === 'dashboard'
|
||||
})
|
||||
|
||||
const isReport = computed(() => {
|
||||
return !!router.currentRoute.value.query?.report
|
||||
})
|
||||
const canvasStyle = computed(() => {
|
||||
let style = {}
|
||||
if (canvasStyleData.value && canvasStyleData.value.width && isMainCanvas(canvasId.value)) {
|
||||
@ -105,6 +112,12 @@ const canvasStyle = computed(() => {
|
||||
})
|
||||
|
||||
const getDownloadStatusMainHeight = () => {
|
||||
if (!previewCanvas.value?.childNodes) {
|
||||
nextTick(() => {
|
||||
canvasStyle.value.height = getDownloadStatusMainHeight()
|
||||
})
|
||||
return '100%'
|
||||
}
|
||||
const children = previewCanvas.value.childNodes
|
||||
let maxHeight = 0
|
||||
|
||||
@ -126,7 +139,7 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const restore = () => {
|
||||
const resetLayout = () => {
|
||||
if (downloadStatus.value) {
|
||||
return
|
||||
}
|
||||
@ -152,6 +165,12 @@ const restore = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const restore = () => {
|
||||
if (isReport.value) {
|
||||
return
|
||||
}
|
||||
resetLayout()
|
||||
}
|
||||
|
||||
const getShapeItemShowStyle = item => {
|
||||
return getShapeItemStyle(item, {
|
||||
@ -219,7 +238,7 @@ const initWatermark = (waterDomId = 'preview-canvas-main') => {
|
||||
|
||||
onMounted(() => {
|
||||
initRefreshTimer()
|
||||
restore()
|
||||
resetLayout()
|
||||
window.addEventListener('resize', restore)
|
||||
const erd = elementResizeDetectorMaker()
|
||||
erd.listenTo(document.getElementById(domId), () => {
|
||||
@ -276,6 +295,7 @@ defineExpose({
|
||||
:show-position="showPosition"
|
||||
:search-count="searchCount"
|
||||
:scale="mobileInPc ? 100 : scaleWidth"
|
||||
:is-selector="props.isSelector"
|
||||
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
||||
/>
|
||||
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||
|
@ -53,6 +53,7 @@ defineExpose({
|
||||
<style lang="less" scope>
|
||||
.filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 46px;
|
||||
|
||||
> :nth-child(1) {
|
||||
@ -84,7 +85,7 @@ defineExpose({
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin-bottom: 12px;
|
||||
// margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.active,
|
||||
|
@ -70,6 +70,7 @@ defineExpose({
|
||||
<style lang="less" scope>
|
||||
.filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 46px;
|
||||
|
||||
> :nth-child(1) {
|
||||
|
@ -84,6 +84,7 @@ defineExpose({
|
||||
<style lang="less" scope>
|
||||
.filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 32px;
|
||||
|
||||
> :nth-child(1) {
|
||||
@ -94,7 +95,7 @@ defineExpose({
|
||||
line-height: 24px;
|
||||
white-space: nowrap;
|
||||
width: 116px;
|
||||
margin-top: 5px;
|
||||
// margin-top: 5px;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
|
@ -99,6 +99,7 @@ defineExpose({
|
||||
<style lang="less" scope>
|
||||
.filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 46px;
|
||||
|
||||
> :nth-child(1) {
|
||||
|
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div class="bar-main">
|
||||
<el-checkbox v-model="checked" @change="checkChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { useViewSelectorStoreWithOut } from '@/store/modules/data-visualization/viewSelector'
|
||||
const viewSelectorStore = useViewSelectorStoreWithOut()
|
||||
|
||||
const checked = ref(false)
|
||||
|
||||
const props = defineProps({
|
||||
resourceId: {
|
||||
type: String,
|
||||
required: false
|
||||
}
|
||||
})
|
||||
onMounted(() => {
|
||||
checked.value = viewSelectorStore.getViewIdList.includes(props.resourceId)
|
||||
})
|
||||
|
||||
const checkChange = val => {
|
||||
if (val) {
|
||||
viewSelectorStore.add(props.resourceId)
|
||||
} else {
|
||||
viewSelectorStore.remove(props.resourceId)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bar-main {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 10px;
|
||||
z-index: 10;
|
||||
border-radius: 2px;
|
||||
cursor: pointer !important;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,57 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { store } from '@/store/index'
|
||||
|
||||
interface ViewSelectorState {
|
||||
enable: boolean
|
||||
viewIdList: string[]
|
||||
}
|
||||
|
||||
export const viewSelectorStore = defineStore('viewSelectorStore', {
|
||||
state: (): ViewSelectorState => {
|
||||
return {
|
||||
enable: false,
|
||||
viewIdList: []
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
getEnable(): boolean {
|
||||
return this.enable
|
||||
},
|
||||
getViewIdList(): string[] {
|
||||
return this.viewIdList
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setEnable(enable: boolean) {
|
||||
this.enable = enable
|
||||
},
|
||||
remove(id?: string) {
|
||||
let len = this.viewIdList.length
|
||||
if (!len) {
|
||||
return
|
||||
}
|
||||
if (!id) {
|
||||
this.viewIdList = []
|
||||
return
|
||||
}
|
||||
while (len--) {
|
||||
if (this.viewIdList[len] === id) {
|
||||
this.viewIdList.splice(len, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
add(id: string) {
|
||||
if (!this.viewIdList.includes(id)) {
|
||||
this.viewIdList.push(id)
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.enable = false
|
||||
this.viewIdList = []
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export const useViewSelectorStoreWithOut = () => {
|
||||
return viewSelectorStore(store)
|
||||
}
|
@ -599,7 +599,12 @@ const iconSize = computed<string>(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="chart-area" v-loading="loadingFlag" element-loading-background="rgba(0,0,0,0)">
|
||||
<div
|
||||
class="chart-area report-load"
|
||||
:class="{ 'report-load-finish': !loadingFlag }"
|
||||
v-loading="loadingFlag"
|
||||
element-loading-background="rgba(0,0,0,0)"
|
||||
>
|
||||
<div
|
||||
class="title-container"
|
||||
:style="{ 'justify-content': titleAlign, 'margin-bottom': marginBottom }"
|
||||
|
@ -25,6 +25,10 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
isSelector: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
@ -119,6 +123,7 @@ defineExpose({
|
||||
:canvas-view-info="state.canvasViewInfoPreview"
|
||||
:dv-info="state.dvInfo"
|
||||
:cur-gap="state.curPreviewGap"
|
||||
:is-selector="props.isSelector"
|
||||
></de-preview>
|
||||
</div>
|
||||
<XpackComponent
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 1ce831779b69626bdb865b36454b7f91ce17eeb7
|
||||
Subproject commit 498d9457e56bc4db7cb2d639d0ff674b6df816cf
|
@ -3,6 +3,7 @@ package io.dataease.api.chart;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.chart.dto.ChartViewDTO;
|
||||
import io.dataease.api.chart.dto.ChartViewFieldDTO;
|
||||
import io.dataease.api.chart.vo.ViewSelectorVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -38,4 +39,8 @@ public interface ChartViewApi {
|
||||
@Operation(summary = "查询图表详情")
|
||||
@PostMapping("getDetail/{id}")
|
||||
ChartViewDTO getDetail(@PathVariable Long id);
|
||||
|
||||
@Operation(summary = "查询仪表板下视图项")
|
||||
@GetMapping("/viewOption/{resourceId}")
|
||||
List<ViewSelectorVO> viewOption(@PathVariable("resourceId") Long resourceId);
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
package io.dataease.api.chart.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ViewSelectorVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7163837502596313691L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private String title;
|
||||
|
||||
private String type;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pid;
|
||||
}
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.report.dto.*;
|
||||
import io.dataease.api.report.vo.ReportGridVO;
|
||||
import io.dataease.api.report.vo.ReportInfoVO;
|
||||
import io.dataease.api.report.vo.ReportInstanceVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@ -46,6 +47,10 @@ public interface ReportApi {
|
||||
@PostMapping("/stop/{taskId}")
|
||||
void stopNow(@PathVariable("taskId") Long taskId);
|
||||
|
||||
@Operation(summary = "启用")
|
||||
@PostMapping("/start/{taskId}")
|
||||
void start(@PathVariable("taskId") Long taskId);
|
||||
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/delete")
|
||||
void delete(@RequestBody List<Long> taskIdList);
|
||||
@ -53,7 +58,7 @@ public interface ReportApi {
|
||||
|
||||
@Operation(summary = "查询详情")
|
||||
@GetMapping("/info/{taskId}")
|
||||
ReportEditor info(@PathVariable("taskId") Long taskId);
|
||||
ReportInfoVO info(@PathVariable("taskId") Long taskId);
|
||||
|
||||
@Operation(summary = "查询日志列表")
|
||||
@Parameters({
|
||||
@ -68,6 +73,6 @@ public interface ReportApi {
|
||||
@PostMapping("/deleteLog")
|
||||
void deleteInstance(@RequestBody ReportInstanceDelRequest request);
|
||||
|
||||
@GetMapping("/logMsg")
|
||||
@PostMapping("/logMsg")
|
||||
String logMsg(@RequestBody ReportInstanceMsgRequest request);
|
||||
}
|
||||
|
@ -13,4 +13,6 @@ public class ReportInstanceDelRequest implements Serializable {
|
||||
private Long instanceId;
|
||||
|
||||
private Integer timeFlag;
|
||||
|
||||
private Long taskId;
|
||||
}
|
||||
|
@ -18,4 +18,6 @@ public class ReportInstanceRequest implements Serializable {
|
||||
private List<Long> timeList;
|
||||
|
||||
private String keyword;
|
||||
|
||||
private Boolean timeDesc;
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
package io.dataease.api.report.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ReportInfoVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2287397931951305464L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long taskId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String title;
|
||||
|
||||
private String content;
|
||||
|
||||
private Integer rtid;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long rid;
|
||||
|
||||
private Integer format;
|
||||
|
||||
private List<String> viewIdList;
|
||||
|
||||
private Integer viewDataRange;
|
||||
|
||||
private String pixel;
|
||||
|
||||
private List<Integer> reciFlagList;
|
||||
|
||||
private List<String> uidList;
|
||||
|
||||
private List<String> ridList;
|
||||
|
||||
private List<String> emailList;
|
||||
|
||||
private List<String> larkGroupList;
|
||||
|
||||
private Integer extWaitTime;
|
||||
|
||||
private Integer rateType;
|
||||
|
||||
private String rateVal;
|
||||
|
||||
private Long startTime;
|
||||
|
||||
private Long endTime;
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package io.dataease.api.report.vo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
@ -10,6 +12,7 @@ public class ReportInstanceVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -7845204306008848053L;
|
||||
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
@ -181,4 +181,8 @@ public interface UserApi {
|
||||
@Hidden
|
||||
@GetMapping("/getRecipient")
|
||||
List<Map<String, Object>> getRecipient(@RequestBody UserReciRequest request);
|
||||
|
||||
@Hidden
|
||||
@GetMapping("/orgAdmin")
|
||||
boolean orgAdmin();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user