forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
f9523a6620
@ -68,7 +68,7 @@ curl -sSL https://github.com/dataease/dataease/releases/latest/download/quick_st
|
|||||||
```
|
```
|
||||||
|
|
||||||
- [在线文档](https://dataease.io/docs/)
|
- [在线文档](https://dataease.io/docs/)
|
||||||
- [演示视频](https://www.bilibili.com/video/BV1UB4y1K7jA)
|
- [演示视频](https://www.bilibili.com/video/BV1i34y1v7hq/)
|
||||||
|
|
||||||
## 微信群
|
## 微信群
|
||||||
|
|
||||||
|
@ -5,10 +5,7 @@ import io.dataease.auth.annotation.DePermission;
|
|||||||
import io.dataease.auth.annotation.DePermissionProxy;
|
import io.dataease.auth.annotation.DePermissionProxy;
|
||||||
import io.dataease.commons.constants.DePermissionType;
|
import io.dataease.commons.constants.DePermissionType;
|
||||||
import io.dataease.commons.constants.ResourceAuthLevel;
|
import io.dataease.commons.constants.ResourceAuthLevel;
|
||||||
import io.dataease.controller.request.chart.ChartCalRequest;
|
import io.dataease.controller.request.chart.*;
|
||||||
import io.dataease.controller.request.chart.ChartExtRequest;
|
|
||||||
import io.dataease.controller.request.chart.ChartViewCacheRequest;
|
|
||||||
import io.dataease.controller.request.chart.ChartViewRequest;
|
|
||||||
import io.dataease.controller.response.ChartDetail;
|
import io.dataease.controller.response.ChartDetail;
|
||||||
import io.dataease.dto.chart.ChartViewDTO;
|
import io.dataease.dto.chart.ChartViewDTO;
|
||||||
import io.dataease.plugins.common.base.domain.ChartViewCacheWithBLOBs;
|
import io.dataease.plugins.common.base.domain.ChartViewCacheWithBLOBs;
|
||||||
@ -23,6 +20,7 @@ import springfox.documentation.annotations.ApiIgnore;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author gin
|
* @Author gin
|
||||||
@ -112,6 +110,13 @@ public class ChartViewController {
|
|||||||
return chartViewService.chartCopy(id, panelId);
|
return chartViewService.chartCopy(id, panelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1)
|
||||||
|
@ApiOperation("批量复制")
|
||||||
|
@PostMapping("chartBatchCopy/{panelId}")
|
||||||
|
public Map<String,String> chartBatchCopy(@RequestBody ChartCopyBatchRequest request, @PathVariable String panelId) {
|
||||||
|
return chartViewService.chartBatchCopy(request,panelId);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiIgnore
|
@ApiIgnore
|
||||||
@GetMapping("searchAdviceSceneId/{panelId}")
|
@GetMapping("searchAdviceSceneId/{panelId}")
|
||||||
public String searchAdviceSceneId(@PathVariable String panelId) {
|
public String searchAdviceSceneId(@PathVariable String panelId) {
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
package io.dataease.controller.request.chart;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author: wangjiahao
|
||||||
|
* Date: 2022/4/26
|
||||||
|
* Description:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ChartCopyBatchRequest {
|
||||||
|
|
||||||
|
private String panelId;
|
||||||
|
|
||||||
|
private Map<String,String> sourceAndTargetIds;
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.service.chart;
|
package io.dataease.service.chart;
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import io.dataease.auth.entity.SysUserEntity;
|
import io.dataease.auth.entity.SysUserEntity;
|
||||||
@ -1024,13 +1025,35 @@ public class ChartViewService {
|
|||||||
return chartViewMapper.selectByPrimaryKey(id);
|
return chartViewMapper.selectByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String chartCopy(String id, String panelId) {
|
public String chartCopy(String sourceViewId,String newViewId, String panelId) {
|
||||||
|
extChartViewMapper.chartCopy(newViewId, sourceViewId, panelId);
|
||||||
|
extChartViewMapper.copyCache(sourceViewId, newViewId);
|
||||||
|
extPanelGroupExtendDataMapper.copyExtendData(sourceViewId, newViewId, panelId);
|
||||||
|
chartViewCacheService.refreshCache(newViewId);
|
||||||
|
return newViewId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String chartCopy(String sourceViewId, String panelId) {
|
||||||
String newChartId = UUID.randomUUID().toString();
|
String newChartId = UUID.randomUUID().toString();
|
||||||
extChartViewMapper.chartCopy(newChartId, id, panelId);
|
return chartCopy(sourceViewId,newChartId,panelId);
|
||||||
extChartViewMapper.copyCache(id, newChartId);
|
}
|
||||||
extPanelGroupExtendDataMapper.copyExtendData(id, newChartId, panelId);
|
|
||||||
chartViewCacheService.refreshCache(newChartId);
|
|
||||||
return newChartId;
|
/**
|
||||||
|
* @Description Copy a set of views with a given source ID and target ID
|
||||||
|
* @param request
|
||||||
|
* @param panelId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Map<String,String> chartBatchCopy(ChartCopyBatchRequest request,String panelId){
|
||||||
|
Assert.notNull(panelId,"panelId should not be null");
|
||||||
|
Map<String,String> sourceAndTargetIds = request.getSourceAndTargetIds();
|
||||||
|
if(sourceAndTargetIds != null && !sourceAndTargetIds.isEmpty()){
|
||||||
|
for(Map.Entry<String,String> entry:sourceAndTargetIds.entrySet()){
|
||||||
|
chartCopy(entry.getKey(),entry.getValue(),panelId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return request.getSourceAndTargetIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String searchAdviceSceneId(String panelId) {
|
public String searchAdviceSceneId(String panelId) {
|
||||||
|
@ -161,3 +161,11 @@ RETURN 'success';
|
|||||||
END
|
END
|
||||||
;;
|
;;
|
||||||
delimiter ;
|
delimiter ;
|
||||||
|
|
||||||
|
ALTER TABLE `qrtz_triggers`
|
||||||
|
DROP INDEX `IDX_QRTZ_T_G`,
|
||||||
|
DROP INDEX `IDX_QRTZ_T_STATE`,
|
||||||
|
DROP INDEX `IDX_QRTZ_T_NFT_MISFIRE`;
|
||||||
|
|
||||||
|
ALTER TABLE `qrtz_fired_triggers`
|
||||||
|
DROP INDEX `IDX_QRTZ_FT_TRIG_INST_NAME`;
|
||||||
|
@ -27,6 +27,14 @@ export function chartCopy(id, panelId) {
|
|||||||
loading: false
|
loading: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function chartBatchCopy(params, panelId) {
|
||||||
|
return request({
|
||||||
|
url: '/chart/view/chartBatchCopy/' + panelId,
|
||||||
|
method: 'post',
|
||||||
|
data: params,
|
||||||
|
loading: false
|
||||||
|
})
|
||||||
|
}
|
||||||
export function chartGroupTree(data) {
|
export function chartGroupTree(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/chart/group/tree',
|
url: '/chart/group/tree',
|
||||||
|
@ -2,7 +2,7 @@ import store from '@/store/index'
|
|||||||
import toast from '@/components/canvas/utils/toast'
|
import toast from '@/components/canvas/utils/toast'
|
||||||
import generateID from '@/components/canvas/utils/generateID'
|
import generateID from '@/components/canvas/utils/generateID'
|
||||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||||
import { chartCopy } from '@/api/chart/chart'
|
import { chartBatchCopy, chartCopy } from '@/api/chart/chart'
|
||||||
import { uuid } from 'vue-uuid'
|
import { uuid } from 'vue-uuid'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -53,6 +53,19 @@ export default {
|
|||||||
newView.propValue.viewId = res.data
|
newView.propValue.viewId = res.data
|
||||||
store.commit('addComponent', { component: newView })
|
store.commit('addComponent', { component: newView })
|
||||||
})
|
})
|
||||||
|
} if (data.type === 'de-tabs') {
|
||||||
|
const sourceAndTargetIds = {}
|
||||||
|
const newCop = deepCopy(data)
|
||||||
|
newCop.options.tabList.forEach((item) => {
|
||||||
|
if (item.content && item.content.type === 'view') {
|
||||||
|
const newViewId = uuid.v1()
|
||||||
|
sourceAndTargetIds[item.content.propValue.viewId] = newViewId
|
||||||
|
item.content.propValue.viewId = newViewId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
chartBatchCopy({ 'sourceAndTargetIds': sourceAndTargetIds }, state.panel.panelInfo.id).then((rsp) => {
|
||||||
|
store.commit('addComponent', { component: newCop })
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
const newCop = deepCopy(data)
|
const newCop = deepCopy(data)
|
||||||
newCop.id = uuid.v1()
|
newCop.id = uuid.v1()
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
type="card"
|
type="card"
|
||||||
style-type="radioGroup"
|
style-type="radioGroup"
|
||||||
class="de-tabs-height"
|
class="de-tabs-height"
|
||||||
:class="isEdit ? 'de-tabs-edit' : ''"
|
:class="isCurrentEdit ? 'de-tabs-edit' : ''"
|
||||||
:font-color="fontColor"
|
:font-color="fontColor"
|
||||||
:active-color="activeColor"
|
:active-color="activeColor"
|
||||||
:border-color="borderColor"
|
:border-color="borderColor"
|
||||||
@ -249,6 +249,9 @@ export default {
|
|||||||
},
|
},
|
||||||
titleValid() {
|
titleValid() {
|
||||||
return !!this.textarea && !!this.textarea.trim()
|
return !!this.textarea && !!this.textarea.trim()
|
||||||
|
},
|
||||||
|
isCurrentEdit() {
|
||||||
|
return this.isEdit && this.curComponent && this.curComponent.id === this.element.id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -143,7 +143,7 @@ div:focus {
|
|||||||
height: 100vh !important;
|
height: 100vh !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.de-tabs-edit {
|
.de-tabs-edit>.el-tabs__header{
|
||||||
padding-right: 50px !important;
|
padding-right: 50px !important;
|
||||||
}
|
}
|
||||||
.de-tabs {
|
.de-tabs {
|
||||||
|
@ -110,6 +110,7 @@ import { mapState } from 'vuex'
|
|||||||
import { deepCopy } from '@/components/canvas/utils/utils'
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
||||||
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
import { COLOR_PANEL } from '@/views/chart/chart/chart'
|
||||||
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
import { uploadFileResult } from '@/api/staticResource/staticResource'
|
||||||
|
import { COMMON_BACKGROUND_NONE } from '@/components/canvas/custom-component/component-list'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Background',
|
name: 'Background',
|
||||||
@ -144,7 +145,7 @@ export default {
|
|||||||
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
|
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
|
||||||
this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
|
this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
|
||||||
}
|
}
|
||||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground)
|
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
|
||||||
this.queryBackground()
|
this.queryBackground()
|
||||||
},
|
},
|
||||||
queryBackground() {
|
queryBackground() {
|
||||||
|
@ -949,6 +949,7 @@ export default {
|
|||||||
hyperlinks: HYPERLINKS,
|
hyperlinks: HYPERLINKS,
|
||||||
mobileStyle: BASE_MOBILE_STYLE,
|
mobileStyle: BASE_MOBILE_STYLE,
|
||||||
propValue: fileResult,
|
propValue: fileResult,
|
||||||
|
commonBackground: deepCopy(COMMON_BACKGROUND),
|
||||||
style: {
|
style: {
|
||||||
...commonStyle
|
...commonStyle
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-row class="demo_main">
|
<el-row class="demo_main">
|
||||||
<div class="demo_title" />
|
<div class="demo_title" />
|
||||||
<div class="demo_content">
|
<div class="demo_content">
|
||||||
<a href="https://www.bilibili.com/video/BV1UB4y1K7jA" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
<a href="https://www.bilibili.com/video/BV1i34y1v7hq/" target="_blank">{{ $t('wizard.demo_video_hint') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,7 +43,7 @@ export default {
|
|||||||
head: this.$t('wizard.quick_start'),
|
head: this.$t('wizard.quick_start'),
|
||||||
content: this.$t('wizard.demo_video_hint'),
|
content: this.$t('wizard.demo_video_hint'),
|
||||||
bottom: '',
|
bottom: '',
|
||||||
href: 'https://www.bilibili.com/video/BV1UB4y1K7jA',
|
href: 'https://www.bilibili.com/video/BV1i34y1v7hq/',
|
||||||
component: 'CardDetail'
|
component: 'CardDetail'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user