forked from github/dataease
Merge branch 'dev-v2' into pr@dev-v2@fixDatasource
This commit is contained in:
commit
a23cb61d64
@ -114,7 +114,8 @@ htmlStream.pipe(parserStream).on('finish', () => {
|
||||
let element = document.createElement(name)
|
||||
Object.entries(obj).forEach(([key, value]) => {
|
||||
if (['href', 'src'].includes(key)) {
|
||||
element[key] = \`\${preUrl}\${value}\`
|
||||
const relativeVal = value.startsWith('./') ? value.substr(1) : value
|
||||
element[key] = \`\${preUrl}\${relativeVal}\`
|
||||
} else {
|
||||
element.setAttribute(key, value || '')
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
"axios": "^1.3.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"dayjs": "^1.11.9",
|
||||
"element-plus-secondary": "^0.4.12",
|
||||
"element-plus-secondary": "^0.4.15",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"file-saver": "^2.0.5",
|
||||
"html-to-image": "^1.11.11",
|
||||
|
@ -3,6 +3,7 @@ import { toRefs } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
||||
import { toPercent } from '@/utils/translate'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { canvasViewInfo } = storeToRefs(dvMainStore)
|
||||
|
||||
@ -37,6 +38,15 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const { propValue, dvInfo, searchCount } = toRefs(props)
|
||||
|
||||
const customGroupStyle = item => {
|
||||
return {
|
||||
width: toPercent(item.groupStyle.width),
|
||||
height: toPercent(item.groupStyle.height),
|
||||
top: toPercent(item.groupStyle.top),
|
||||
left: toPercent(item.groupStyle.left)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -50,7 +60,7 @@ const { propValue, dvInfo, searchCount } = toRefs(props)
|
||||
:config="item"
|
||||
:index="index"
|
||||
:dv-info="dvInfo"
|
||||
:style="item.groupStyle"
|
||||
:style="customGroupStyle(item)"
|
||||
:show-position="showPosition"
|
||||
:search-count="searchCount"
|
||||
/>
|
||||
|
@ -31,7 +31,6 @@ const loadInfoList = () => {
|
||||
}
|
||||
|
||||
const toRouter = item => {
|
||||
console.log(item)
|
||||
push({ name: item.rName })
|
||||
}
|
||||
onMounted(() => {
|
||||
|
@ -1,7 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onBeforeMount, nextTick } from 'vue'
|
||||
import { initCanvasData } from '@/utils/canvasUtils'
|
||||
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import { check } from '@/utils/CrossPermission'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const dashboardPreview = ref(null)
|
||||
const state = reactive({
|
||||
canvasDataPreview: null,
|
||||
@ -10,8 +14,20 @@ const state = reactive({
|
||||
dvInfo: null,
|
||||
curPreviewGap: 0
|
||||
})
|
||||
|
||||
onBeforeMount(() => {
|
||||
const checkPer = async resourceId => {
|
||||
if (!window.DataEaseBi || !resourceId) {
|
||||
return true
|
||||
}
|
||||
const request = { busiFlag: window.DataEaseBi.busiFlag }
|
||||
await interactiveStore.setInteractive(request)
|
||||
const key = window.DataEaseBi.busiFlag === 'dataV' ? 'screen-weight' : 'panel-weight'
|
||||
return check(wsCache.get(key), resourceId, 1)
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
const checkResult = await checkPer(window.DataEaseBi.dvId)
|
||||
if (!checkResult) {
|
||||
return
|
||||
}
|
||||
initCanvasData(
|
||||
window.DataEaseBi.dvId,
|
||||
window.DataEaseBi.busiFlag,
|
||||
|
@ -1,6 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onBeforeMount, reactive } from 'vue'
|
||||
import { initCanvasDataPrepare } from '@/utils/canvasUtils'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
import { check } from '@/utils/CrossPermission'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
const { wsCache } = useCache()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const config = ref()
|
||||
const viewInfo = ref()
|
||||
const userViewEnlargeRef = ref()
|
||||
@ -12,7 +17,21 @@ const state = reactive({
|
||||
dvInfo: null,
|
||||
curPreviewGap: 0
|
||||
})
|
||||
onBeforeMount(() => {
|
||||
|
||||
const checkPer = async resourceId => {
|
||||
if (!window.DataEaseBi || !resourceId) {
|
||||
return true
|
||||
}
|
||||
const request = { busiFlag: window.DataEaseBi.busiFlag }
|
||||
await interactiveStore.setInteractive(request)
|
||||
const key = window.DataEaseBi.busiFlag === 'dataV' ? 'screen-weight' : 'panel-weight'
|
||||
return check(wsCache.get(key), resourceId, 1)
|
||||
}
|
||||
onBeforeMount(async () => {
|
||||
const checkResult = await checkPer(window.DataEaseBi.dvId)
|
||||
if (!checkResult) {
|
||||
return
|
||||
}
|
||||
initCanvasDataPrepare(
|
||||
window.DataEaseBi.dvId,
|
||||
window.DataEaseBi.busiFlag,
|
||||
|
@ -883,7 +883,9 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
if (this.dvInfo) {
|
||||
this.dvInfo.dataState = 'ready'
|
||||
this.dvInfo.optType = null
|
||||
this.dvInfo.id = newId
|
||||
if (newId) {
|
||||
this.dvInfo.id = newId
|
||||
}
|
||||
}
|
||||
},
|
||||
createInit(dvType, resourceId?, pid?) {
|
||||
|
@ -47,7 +47,7 @@ export const interactiveStore = defineStore('interactive', {
|
||||
actions: {
|
||||
async setInteractive(param: BusiTreeRequest) {
|
||||
const flag = busiFlagMap.findIndex(item => item === param.busiFlag)
|
||||
if (!hasMenuAuth(flag)) {
|
||||
if (!hasMenuAuth(flag) && !window.DataEaseBi) {
|
||||
const tempData: InnerInteractive = {
|
||||
rootManage: false,
|
||||
anyManage: false,
|
||||
|
@ -1,12 +1,15 @@
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
|
||||
export const check = (data, id?: string) => {
|
||||
export const check = (data, id?: string, weight?: number) => {
|
||||
if (!weight) {
|
||||
weight = 1
|
||||
}
|
||||
if (!id) {
|
||||
ElMessage.error('资源ID不能为空')
|
||||
return false
|
||||
}
|
||||
const node = getNode(data, id)
|
||||
if (!node) {
|
||||
if (!node || node < weight) {
|
||||
showMsg('无权访问当前资源,是否离开当前页面?系统将不保存您所做的更改', id)
|
||||
return false
|
||||
}
|
||||
|
@ -142,14 +142,8 @@ export function canvasSave(callBack) {
|
||||
if (item.component === 'UserView') {
|
||||
item.linkageFilters = []
|
||||
} else if (item.component === 'Group') {
|
||||
const groupStyle = item.style
|
||||
item.propValue.forEach(groupItem => {
|
||||
groupItem.linkageFilters = []
|
||||
// 计算groupStyle
|
||||
groupItem.groupStyle.left = toPercent(groupItem.style.left / groupStyle.width)
|
||||
groupItem.groupStyle.top = toPercent(groupItem.style.top / groupStyle.height)
|
||||
groupItem.groupStyle.width = toPercent(groupItem.style.width / groupStyle.width)
|
||||
groupItem.groupStyle.height = toPercent(groupItem.style.height / groupStyle.height)
|
||||
})
|
||||
} else if (item.component === 'DeTabs') {
|
||||
item.propValue.forEach(tabItem => {
|
||||
@ -168,9 +162,7 @@ export function canvasSave(callBack) {
|
||||
|
||||
const method = dvInfo.value.id ? updateCanvas : saveCanvas
|
||||
method(canvasInfo).then(res => {
|
||||
if (res && res.data) {
|
||||
dvMainStore.updateDvInfoId(res.data)
|
||||
}
|
||||
dvMainStore.updateDvInfoId(res.data)
|
||||
snapshotStore.resetStyleChangeTimes()
|
||||
callBack(res)
|
||||
})
|
||||
|
@ -16,12 +16,14 @@ import DeCanvas from '@/views/canvas/DeCanvas.vue'
|
||||
import { check, compareStorage } from '@/utils/CrossPermission'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const { wsCache } = useCache()
|
||||
const eventCheck = e => {
|
||||
if (e.key === 'panel-weight' && !compareStorage(e.oldValue, e.newValue)) {
|
||||
const { resourceId, opt } = window.DataEaseBi || router.currentRoute.value.query
|
||||
if (!(opt && opt === 'create')) {
|
||||
check(wsCache.get('panel-weight'), resourceId)
|
||||
check(wsCache.get('panel-weight'), resourceId, 4)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -58,12 +60,23 @@ const viewEditorShow = computed(() => {
|
||||
!batchOptStatus.value
|
||||
)
|
||||
})
|
||||
|
||||
const checkPer = async resourceId => {
|
||||
if (!window.DataEaseBi || !resourceId) {
|
||||
return true
|
||||
}
|
||||
const request = { busiFlag: 'dashboard' }
|
||||
await interactiveStore.setInteractive(request)
|
||||
return check(wsCache.get('panel-weight'), resourceId, 4)
|
||||
}
|
||||
// 全局监听按键事件
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
window.addEventListener('storage', eventCheck)
|
||||
initDataset()
|
||||
const { resourceId, opt, pid, createType } = window.DataEaseBi || router.currentRoute.value.query
|
||||
const checkResult = await checkPer(resourceId)
|
||||
if (!checkResult) {
|
||||
return
|
||||
}
|
||||
initDataset()
|
||||
state.sourcePid = pid
|
||||
if (resourceId) {
|
||||
dataInitState.value = false
|
||||
|
@ -25,12 +25,14 @@ import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { check, compareStorage } from '@/utils/CrossPermission'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import RealTimeListTree from '@/components/data-visualization/RealTimeListTree.vue'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const { wsCache } = useCache()
|
||||
const eventCheck = e => {
|
||||
if (e.key === 'screen-weight' && !compareStorage(e.oldValue, e.newValue)) {
|
||||
const { dvId, opt } = window.DataEaseBi || router.currentRoute.value.query
|
||||
if (!(opt && opt === 'create')) {
|
||||
check(wsCache.get('screen-weight'), dvId)
|
||||
check(wsCache.get('screen-weight'), dvId, 4)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -180,14 +182,25 @@ watch(
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
const checkPer = async resourceId => {
|
||||
if (!window.DataEaseBi || !resourceId) {
|
||||
return true
|
||||
}
|
||||
const request = { busiFlag: 'dataV' }
|
||||
await interactiveStore.setInteractive(request)
|
||||
return check(wsCache.get('screen-weight'), resourceId, 4)
|
||||
}
|
||||
onMounted(async () => {
|
||||
window.addEventListener('blur', releaseAttachKey)
|
||||
if (editMode.value === 'edit') {
|
||||
window.addEventListener('storage', eventCheck)
|
||||
}
|
||||
initDataset()
|
||||
const { dvId, opt, pid, createType } = window.DataEaseBi || router.currentRoute.value.query
|
||||
const checkResult = await checkPer(dvId)
|
||||
if (!checkResult) {
|
||||
return
|
||||
}
|
||||
initDataset()
|
||||
if (dvId) {
|
||||
state.canvasInitStatus = false
|
||||
initCanvasData(dvId, 'dataV', function () {
|
||||
|
@ -128,7 +128,7 @@ const selectedData = ref(null)
|
||||
const handleNodeClick = async (data: Tree) => {
|
||||
selectedData.value = data
|
||||
const geoJson = cloneDeep(await getGeoJsonFile(data['id']))
|
||||
selectedData.value['geoJson'] = geoJson
|
||||
selectedData.value['geoJson'] = JSON.stringify(geoJson)
|
||||
const pid = data['pid']
|
||||
if (pid) {
|
||||
const parent = areaTreeRef.value.getNode(pid)
|
||||
|
@ -2361,6 +2361,10 @@ const getDsIconName = data => {
|
||||
.ed-tree-node.is-current > .ed-tree-node__content:not(.is-menu):after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.flex-align-center {
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
.calc-field-edit-dialog {
|
||||
.ed-dialog__footer {
|
||||
|
@ -107,7 +107,10 @@ const showAll = ref(true)
|
||||
const datasource = ref()
|
||||
const loading = ref(false)
|
||||
const createDataset = ref(false)
|
||||
const filterMethod = (value, data) => data.name.includes(value)
|
||||
const filterMethod = (value, data) => {
|
||||
if (!data) return false
|
||||
data.name.includes(value)
|
||||
}
|
||||
const resetForm = () => {
|
||||
createDataset.value = false
|
||||
}
|
||||
@ -277,7 +280,7 @@ const saveDataset = () => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
wsCache.set('ds-new-success', true)
|
||||
emits('handleShowFinishPage', res)
|
||||
emits('handleShowFinishPage', { ...res, pid: params.pid })
|
||||
ElMessage.success('保存数据源成功')
|
||||
successCb()
|
||||
}
|
||||
@ -292,7 +295,7 @@ const saveDataset = () => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
wsCache.set('ds-new-success', true)
|
||||
emits('handleShowFinishPage', res)
|
||||
emits('handleShowFinishPage', { ...res, pid: params.pid })
|
||||
ElMessage.success('保存数据源成功')
|
||||
successCb()
|
||||
}
|
||||
|
@ -211,7 +211,14 @@ const next = () => {
|
||||
}
|
||||
|
||||
const complete = (params, successCb, finallyCb) => {
|
||||
excel.value.saveExcelDs(params, successCb, finallyCb)
|
||||
excel.value.saveExcelDs(
|
||||
params,
|
||||
() => {
|
||||
pid.value = params.pid
|
||||
successCb()
|
||||
},
|
||||
finallyCb
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
@ -239,24 +246,29 @@ const continueCreating = () => {
|
||||
init(null, pid.value)
|
||||
}
|
||||
|
||||
const handleShowFinishPage = ({ id, name }) => {
|
||||
isShowFinishPage().then(res => {
|
||||
if (editDs.value || !res.data) {
|
||||
emits('refresh')
|
||||
visible.value = false
|
||||
return
|
||||
} else {
|
||||
showFinishPage.value = true
|
||||
Object.assign(dsInfo, { id, name })
|
||||
}
|
||||
})
|
||||
const handleShowFinishPage = ({ id, name, pid }) => {
|
||||
isShowFinishPage()
|
||||
.then(res => {
|
||||
if (editDs.value || !res.data) {
|
||||
emits('refresh')
|
||||
visible.value = false
|
||||
return
|
||||
} else {
|
||||
showFinishPage.value = true
|
||||
Object.assign(dsInfo, { id, name })
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
pid.value = pid
|
||||
})
|
||||
}
|
||||
|
||||
emitter.on('showFinishPage', handleShowFinishPage)
|
||||
|
||||
const prev = () => {
|
||||
if (currentDsType.value === 'API' && activeApiStep.value === 2) {
|
||||
activeApiStep.value = activeStep.value = 1
|
||||
activeApiStep.value = 1
|
||||
activeStep.value = 1
|
||||
return
|
||||
}
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -31,7 +31,7 @@
|
||||
<java-jwt.version>3.12.1</java-jwt.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<maven.antrun.version>3.1.0</maven.antrun.version>
|
||||
<hutool.version>5.8.16</hutool.version>
|
||||
<hutool.version>5.8.24</hutool.version>
|
||||
<ehcache.version>3.10.8</ehcache.version>
|
||||
<bcprov.version>1.74</bcprov.version>
|
||||
<junit.version>4.13.2</junit.version>
|
||||
|
@ -4,42 +4,56 @@ import io.dataease.api.template.dto.TemplateManageDTO;
|
||||
import io.dataease.api.template.request.TemplateManageBatchRequest;
|
||||
import io.dataease.api.template.request.TemplateManageRequest;
|
||||
import io.dataease.api.template.vo.VisualizationTemplateVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "模版管理:基础")
|
||||
public interface TemplateManageApi {
|
||||
|
||||
@PostMapping("/templateList")
|
||||
List<TemplateManageDTO> templateList(@RequestBody TemplateManageRequest request);
|
||||
@Operation(summary = "模版列表")
|
||||
List<TemplateManageDTO> templateList(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/save")
|
||||
@Operation(summary = "保存")
|
||||
TemplateManageDTO save(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/delete/{id}/{categoryId}")
|
||||
@Operation(summary = "删除")
|
||||
void delete(@PathVariable String id,@PathVariable String categoryId);
|
||||
|
||||
@PostMapping("/deleteCategory/{id}")
|
||||
@Operation(summary = "删除分类")
|
||||
String deleteCategory(@PathVariable String id);
|
||||
|
||||
@GetMapping("/findOne/{templateId}")
|
||||
@Operation(summary = "明细查询")
|
||||
VisualizationTemplateVO findOne(@PathVariable String templateId) throws Exception;
|
||||
|
||||
@PostMapping("/find")
|
||||
@Operation(summary = "查询")
|
||||
List<TemplateManageDTO> find(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/findCategories")
|
||||
@Operation(summary = "分类明细查询")
|
||||
List<TemplateManageDTO> findCategories(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/nameCheck")
|
||||
@Operation(summary = "模版名称校验")
|
||||
String nameCheck(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/categoryTemplateNameCheck")
|
||||
@Operation(summary = "分类名称校验")
|
||||
String categoryTemplateNameCheck(@RequestBody TemplateManageRequest request);
|
||||
|
||||
@PostMapping("/batchUpdate")
|
||||
@Operation(summary = "批量更新")
|
||||
void batchUpdate(@RequestBody TemplateManageBatchRequest request);
|
||||
|
||||
@PostMapping("/batchDelete")
|
||||
@Operation(summary = "批量删除")
|
||||
void batchDelete(@RequestBody TemplateManageBatchRequest request);
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import io.dataease.api.template.request.TemplateMarketSearchRequest;
|
||||
import io.dataease.api.template.response.MarketBaseResponse;
|
||||
import io.dataease.api.template.response.MarketPreviewBaseResponse;
|
||||
import io.dataease.api.template.vo.MarketMetaDataVO;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -14,20 +16,26 @@ import java.util.List;
|
||||
* @author : WangJiaHao
|
||||
* @date : 2023/11/6 17:23
|
||||
*/
|
||||
@Tag(name = "模版中心:基础")
|
||||
public interface TemplateMarketApi {
|
||||
|
||||
@GetMapping("/search")
|
||||
@Operation(summary = "查询")
|
||||
MarketBaseResponse searchTemplate();
|
||||
@GetMapping("/searchRecommend")
|
||||
@Operation(summary = "查询基础信息")
|
||||
MarketBaseResponse searchTemplateRecommend();
|
||||
|
||||
@GetMapping("/searchPreview")
|
||||
@Operation(summary = "预览")
|
||||
MarketPreviewBaseResponse searchTemplatePreview();
|
||||
|
||||
@GetMapping("/categories")
|
||||
@Operation(summary = "分类")
|
||||
List<String> categories();
|
||||
|
||||
@GetMapping("/categoriesObject")
|
||||
@Operation(summary = "分类明细")
|
||||
List<MarketMetaDataVO> categoriesObject() ;
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import io.dataease.auth.DeApiPath;
|
||||
import io.dataease.auth.DePermit;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
import io.dataease.model.BusiNodeVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@ -30,43 +31,54 @@ public interface DataVisualizationApi {
|
||||
*/
|
||||
@GetMapping("/findById/{dvId}/{busiFlag}")
|
||||
@DePermit(value = {"#p0+':read'"}, busiFlag = "#p1")
|
||||
@Operation(summary = "查询可视化资源")
|
||||
DataVisualizationVO findById(@PathVariable("dvId") Long dvId,@PathVariable("busiFlag") String busiFlag);
|
||||
|
||||
@PostMapping("/saveCanvas")
|
||||
@DePermit(value = {"#p0.pid + ':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "画布保存")
|
||||
String saveCanvas(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@PostMapping("/updateCanvas")
|
||||
@DePermit(value = {"#p0.id + ':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "画布更新")
|
||||
void updateCanvas(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@PostMapping("/updateBase")
|
||||
@DePermit(value = {"#p0.id + ':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "可视化资源基础信息更新")
|
||||
void updateBase(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@DeleteMapping("/deleteLogic/{dvId}/{busiFlag}")
|
||||
@DePermit(value = {"#p0+':manage'"}, busiFlag = "#p1")
|
||||
@Operation(summary = "可视化资源删除")
|
||||
void deleteLogic(@PathVariable("dvId") Long dvId,@PathVariable("busiFlag") String busiFlag);
|
||||
|
||||
@PostMapping("/tree")
|
||||
@Operation(summary = "查询可视化资源树")
|
||||
List<BusiNodeVO> tree(@RequestBody BusiNodeRequest request);
|
||||
|
||||
@PostMapping("/move")
|
||||
@DePermit(value = {"#p0.id+':manage'", "#p0.pid+':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "移动可视化资")
|
||||
void move(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@PostMapping("/nameCheck")
|
||||
@Operation(summary = "名称校验")
|
||||
void nameCheck(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@PostMapping("/findRecent")
|
||||
@Operation(summary = "查询最近操作资源")
|
||||
List<VisualizationResourceVO> findRecent(@RequestBody VisualizationWorkbranchQueryRequest request);
|
||||
|
||||
@PostMapping("/copy")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@DePermit(value = {"#p0.id+':manage'", "#p0.pid+':manage'"}, busiFlag = "#p0.type")
|
||||
@Operation(summary = "复制")
|
||||
String copy(@RequestBody DataVisualizationBaseRequest request);
|
||||
|
||||
@GetMapping("/findDvType/{dvId}")
|
||||
@Operation(summary = "查询可视化资源类型")
|
||||
String findDvType(@PathVariable("dvId")Long dvId);
|
||||
|
||||
/**
|
||||
@ -75,6 +87,7 @@ public interface DataVisualizationApi {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/decompression")
|
||||
@Operation(summary = "解析可视化资源模板信息")
|
||||
DataVisualizationVO decompression(@RequestBody DataVisualizationBaseRequest request) throws Exception;
|
||||
|
||||
/**
|
||||
@ -83,6 +96,7 @@ public interface DataVisualizationApi {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/decompressionLocalFile")
|
||||
@Operation(summary = "解析可视化资源模板文件信息")
|
||||
DataVisualizationVO decompressionLocalFile(@RequestPart(value = "file") MultipartFile file);
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.api.visualization;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.visualization.request.VisualizationBackgroundRequest;
|
||||
import io.dataease.api.visualization.vo.VisualizationBackgroundVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@ -18,5 +19,6 @@ import java.util.Map;
|
||||
@ApiSupport(order = 997)
|
||||
public interface VisualizationBackgroundApi {
|
||||
@GetMapping("/findAll")
|
||||
@Operation(summary = "背景信息查询")
|
||||
Map<String, List<VisualizationBackgroundVO>> findAll();
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import io.dataease.api.visualization.request.VisualizationLinkJumpBaseRequest;
|
||||
import io.dataease.api.visualization.response.VisualizationLinkJumpBaseResponse;
|
||||
import io.dataease.api.visualization.vo.VisualizationViewTableVO;
|
||||
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||
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;
|
||||
@ -24,23 +25,30 @@ public interface VisualizationLinkJumpApi {
|
||||
|
||||
|
||||
@GetMapping("/getTableFieldWithViewId/{viewId}")
|
||||
@Operation(summary = "查询可跳转字段信息")
|
||||
List<DatasetTableFieldDTO> getTableFieldWithViewId(@PathVariable Long viewId);
|
||||
|
||||
@GetMapping("/queryWithViewId/{dvId}/{viewId}")
|
||||
@Operation(summary = "根据视图ID查询跳转信息")
|
||||
VisualizationLinkJumpDTO queryWithViewId(@PathVariable Long dvId, @PathVariable Long viewId);
|
||||
|
||||
@GetMapping("/queryVisualizationJumpInfo/{dvId}")
|
||||
@Operation(summary = "根据可视化资源ID查询跳转信息")
|
||||
VisualizationLinkJumpBaseResponse queryVisualizationJumpInfo(@PathVariable Long dvId);
|
||||
|
||||
@PostMapping("/updateJumpSet")
|
||||
@Operation(summary = "更新跳转信息")
|
||||
void updateJumpSet(@RequestBody VisualizationLinkJumpDTO jumpDTO);
|
||||
|
||||
@PostMapping("/queryTargetVisualizationJumpInfo")
|
||||
@Operation(summary = "查询目标跳转信息")
|
||||
VisualizationLinkJumpBaseResponse queryTargetVisualizationJumpInfo(@RequestBody VisualizationLinkJumpBaseRequest request);
|
||||
|
||||
@GetMapping("/viewTableDetailList/{dvId}")
|
||||
@Operation(summary = "查询跳转明细")
|
||||
List<VisualizationViewTableVO> viewTableDetailList(@PathVariable Long dvId);
|
||||
|
||||
@PostMapping("/updateJumpSetActive")
|
||||
@Operation(summary = "更新跳转信息可用状态")
|
||||
VisualizationLinkJumpBaseResponse updateJumpSetActive(@RequestBody VisualizationLinkJumpBaseRequest request);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.api.visualization;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.commons.BaseRspModel;
|
||||
import io.dataease.api.visualization.request.VisualizationLinkageRequest;
|
||||
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;
|
||||
@ -17,24 +18,29 @@ import java.util.Map;
|
||||
* @date : 2023/7/13
|
||||
*/
|
||||
|
||||
@Tag(name = "可视化管理:链接")
|
||||
@Tag(name = "可视化管理:联动")
|
||||
@ApiSupport(order = 996)
|
||||
public interface VisualizationLinkageApi {
|
||||
|
||||
|
||||
@PostMapping("/getViewLinkageGather")
|
||||
@Operation(summary = "查询联动信息")
|
||||
Map getViewLinkageGather(@RequestBody VisualizationLinkageRequest request);
|
||||
|
||||
@PostMapping("/getViewLinkageGatherArray")
|
||||
@Operation(summary = "查询联动信息数组")
|
||||
List getViewLinkageGatherArray(@RequestBody VisualizationLinkageRequest request);
|
||||
|
||||
@PostMapping("/saveLinkage")
|
||||
@Operation(summary = "保存联动信息")
|
||||
BaseRspModel saveLinkage(@RequestBody VisualizationLinkageRequest request);
|
||||
|
||||
@GetMapping("/getVisualizationAllLinkageInfo/{dvId}")
|
||||
@Operation(summary = "根据资源ID查询联动信息")
|
||||
Map<String, List<String>> getVisualizationAllLinkageInfo(@PathVariable Long dvId);
|
||||
|
||||
@PostMapping("/updateLinkageActive")
|
||||
@Operation(summary = "修改联动信息可用状态")
|
||||
Map updateLinkageActive(@RequestBody VisualizationLinkageRequest request);
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.visualization.request.VisualizationStoreRequest;
|
||||
import io.dataease.api.visualization.request.VisualizationWorkbranchQueryRequest;
|
||||
import io.dataease.api.visualization.vo.VisualizationStoreVO;
|
||||
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;
|
||||
@ -17,10 +18,13 @@ import java.util.List;
|
||||
public interface VisualizationStoreApi {
|
||||
|
||||
@PostMapping("/execute")
|
||||
@Operation(summary = "变更收藏信息")
|
||||
void execute(@RequestBody VisualizationStoreRequest request);
|
||||
|
||||
@PostMapping("/query")
|
||||
@Operation(summary = "查询收藏资源信息")
|
||||
List<VisualizationStoreVO> query(@RequestBody VisualizationWorkbranchQueryRequest request);
|
||||
@GetMapping("/favorited/{id}")
|
||||
@Operation(summary = "收藏")
|
||||
boolean favorited(@PathVariable("id") Long id);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.api.visualization;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.visualization.request.VisualizationSubjectRequest;
|
||||
import io.dataease.api.visualization.vo.VisualizationSubjectVO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -13,15 +14,19 @@ import java.util.List;
|
||||
public interface VisualizationSubjectApi {
|
||||
|
||||
@PostMapping("/query")
|
||||
@Operation(summary = "查询")
|
||||
List<VisualizationSubjectVO> query(@RequestBody VisualizationSubjectRequest request);
|
||||
|
||||
@PostMapping("/querySubjectWithGroup")
|
||||
@Operation(summary = "分组查询")
|
||||
List<VisualizationSubjectVO> querySubjectWithGroup(@RequestBody VisualizationSubjectRequest request);
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新")
|
||||
void update(@RequestBody VisualizationSubjectRequest request);
|
||||
|
||||
@DeleteMapping("/delete/{id}")
|
||||
@Operation(summary = "删除")
|
||||
void delete(@PathVariable String id);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user