|
@ -10,8 +10,14 @@ const props = defineProps({ |
|
|
type: Object, |
|
|
type: Object, |
|
|
default: () => {} |
|
|
default: () => {} |
|
|
}, |
|
|
}, |
|
|
|
|
|
type: { |
|
|
type:String, |
|
|
type:String, |
|
|
default:()=>"" |
|
|
default:()=>"" |
|
|
|
|
|
}, |
|
|
|
|
|
currentTable: { |
|
|
|
|
|
type:Object, |
|
|
|
|
|
default:()=>{} |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
const g6data = ref([]) |
|
|
const g6data = ref([]) |
|
|
|
|
|
|
|
@ -300,7 +306,7 @@ function initG6() { |
|
|
|
|
|
|
|
|
registerNode("dice-er-box", { |
|
|
registerNode("dice-er-box", { |
|
|
draw(cfg, group) { |
|
|
draw(cfg, group) { |
|
|
const width = 250; |
|
|
const width = 300; |
|
|
const { |
|
|
const { |
|
|
attrs = [], |
|
|
attrs = [], |
|
|
startIndex = 0, |
|
|
startIndex = 0, |
|
@ -308,10 +314,16 @@ function initG6() { |
|
|
collapsed, |
|
|
collapsed, |
|
|
icon, |
|
|
icon, |
|
|
} = cfg; |
|
|
} = cfg; |
|
|
|
|
|
let currentTableLabel = props.currentTable.tabEngName |
|
|
|
|
|
if (props.currentTable.tabCnName && props.currentTable.tabCnName.length>0){ |
|
|
|
|
|
currentTableLabel += "("+props.currentTable.tabCnName+")" |
|
|
|
|
|
}else if (props.currentTable.tabCrrctName && props.currentTable.tabCnName.tabCrrctName>0){ |
|
|
|
|
|
currentTableLabel += "("+props.currentTable.tabCrrctName+")" |
|
|
|
|
|
} |
|
|
const list = attrs; |
|
|
const list = attrs; |
|
|
const itemCount = list.length; |
|
|
const itemCount = list.length; |
|
|
const boxStyle = { |
|
|
const boxStyle = { |
|
|
stroke: "#096DD9", |
|
|
stroke: currentTableLabel === cfg.label?"#67C23A":"#096DD9", |
|
|
radius: 4, |
|
|
radius: 4, |
|
|
}; |
|
|
}; |
|
|
const afterList = list.slice( |
|
|
const afterList = list.slice( |
|
@ -596,7 +608,7 @@ function initG6() { |
|
|
width, |
|
|
width, |
|
|
height, |
|
|
height, |
|
|
defaultNode: { |
|
|
defaultNode: { |
|
|
size: [300, 200], |
|
|
size: [350, 200], |
|
|
type: 'dice-er-box', |
|
|
type: 'dice-er-box', |
|
|
color: '#5B8FF9', |
|
|
color: '#5B8FF9', |
|
|
style: { |
|
|
style: { |
|
@ -646,7 +658,7 @@ watch( |
|
|
let table = props.data.tableList[i] |
|
|
let table = props.data.tableList[i] |
|
|
let g6Tab = { |
|
|
let g6Tab = { |
|
|
id: table.ssys_cd+"-"+table.mdl_name+"-"+table.tab_eng_name, |
|
|
id: table.ssys_cd+"-"+table.mdl_name+"-"+table.tab_eng_name, |
|
|
label: table.tab_eng_name, |
|
|
label: table.tab_eng_name + ((table.tab_cn_name && table.tab_cn_name.length>0)?"("+table.tab_cn_name+")":""), |
|
|
attrs:[], |
|
|
attrs:[], |
|
|
collapsed:true |
|
|
collapsed:true |
|
|
} |
|
|
} |
|
|