mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
refactor: 优化发布问题
This commit is contained in:
@@ -7,6 +7,7 @@ export interface ResourceOrFolder {
|
||||
nodeType: 'folder' | 'leaf'
|
||||
type: string
|
||||
mobileLayout: boolean
|
||||
status: boolean
|
||||
}
|
||||
|
||||
export interface Panel {
|
||||
|
||||
@@ -726,6 +726,7 @@ const initOpenHandler = newWindow => {
|
||||
<el-dropdown popper-class="menu-outer-dv_popper" trigger="hover">
|
||||
<el-button
|
||||
@click="publishStatusChange(1)"
|
||||
:disabled="dvInfo.status === 1"
|
||||
style="float: right; margin: 0 12px 0 0"
|
||||
type="primary"
|
||||
>
|
||||
|
||||
@@ -476,6 +476,7 @@ const fullScreenPreview = () => {
|
||||
<el-dropdown effect="dark" popper-class="menu-outer-dv_popper" trigger="hover">
|
||||
<el-button
|
||||
@click="publishStatusChange(1)"
|
||||
:disabled="dvInfo.status === 1"
|
||||
style="float: right; margin: 0 12px 0 0"
|
||||
type="primary"
|
||||
>
|
||||
|
||||
@@ -430,11 +430,11 @@ em {
|
||||
}
|
||||
|
||||
.color-screen {
|
||||
background: rgb(0, 214, 185);
|
||||
background: rgba(51, 112, 255, 1);
|
||||
}
|
||||
|
||||
.color-dataV {
|
||||
background: rgb(0, 214, 185) !important;
|
||||
background: rgba(51, 112, 255, 1);
|
||||
}
|
||||
|
||||
.color-dataset {
|
||||
|
||||
@@ -256,7 +256,8 @@ const saveResource = () => {
|
||||
nodeType: nodeType.value as 'folder' | 'leaf',
|
||||
name: resourceForm.name,
|
||||
type: curCanvasType.value,
|
||||
mobileLayout: state.targetInfo?.extraFlag
|
||||
mobileLayout: state.targetInfo?.extraFlag,
|
||||
status: state.targetInfo?.extraFlag1
|
||||
}
|
||||
|
||||
switch (cmd.value) {
|
||||
|
||||
@@ -75,7 +75,7 @@ const props = defineProps({
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'name',
|
||||
disabled: 'leaf'
|
||||
disabled: (data: any) => data.extraFlag1 === 0
|
||||
}
|
||||
const mounted = ref(false)
|
||||
const rootManage = ref(false)
|
||||
@@ -259,13 +259,24 @@ const cancelPreRequest = () => {
|
||||
cancelRequestBatch('/linkJump/queryVisualizationJumpInfo/**')
|
||||
}
|
||||
|
||||
const nodeClick = (data: BusiTreeNode) => {
|
||||
cancelPreRequest()
|
||||
selectedNodeKey.value = data.id
|
||||
if (data.leaf) {
|
||||
emit('nodeClick', data)
|
||||
const nodeClick = (data: BusiTreeNode, node) => {
|
||||
if (node.disabled) {
|
||||
nextTick(() => {
|
||||
// 找到当前高亮的节点,移除高亮样式
|
||||
const currentNode = resourceListTree.value.$el.querySelector('.is-current')
|
||||
if (currentNode) {
|
||||
currentNode.classList.remove('is-current')
|
||||
}
|
||||
return // 阻止后续逻辑
|
||||
})
|
||||
} else {
|
||||
resourceListTree.value.setCurrentKey(null)
|
||||
cancelPreRequest()
|
||||
selectedNodeKey.value = data.id
|
||||
if (data.leaf) {
|
||||
emit('nodeClick', data)
|
||||
} else {
|
||||
resourceListTree.value.setCurrentKey(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -745,7 +756,12 @@ defineExpose({
|
||||
></component
|
||||
></Icon>
|
||||
</el-icon>
|
||||
<el-icon class="icon-screen-new color-dataV" style="font-size: 18px" v-else>
|
||||
<el-icon
|
||||
class="icon-screen-new color-dataV"
|
||||
:class="{ 'color-dataV': data.extraFlag1, 'color-dataV-disabled': !data.extraFlag1 }"
|
||||
style="font-size: 18px"
|
||||
v-else
|
||||
>
|
||||
<Icon name="icon_operation-analysis_outlined"
|
||||
><icon_operationAnalysis_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
@@ -968,4 +984,8 @@ defineExpose({
|
||||
color: rgba(187, 191, 196, 1);
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.color-dataV-disabled {
|
||||
background: #bbbfc4 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,5 +14,5 @@ public class BusiResourceEditor implements Serializable {
|
||||
private String name;
|
||||
private String flag;
|
||||
private int extraFlag;
|
||||
private int extraFlag1 = 0;
|
||||
private int extraFlag1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user