合并冲突解决
This commit is contained in:
parent
d5378e2cb5
commit
2b6b9b7d51
|
|
@ -26,7 +26,6 @@ export function getRelationGraphByUtcTime(utcTime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3.群体成员演化分析
|
// 3.群体成员演化分析
|
||||||
<<<<<<< HEAD
|
|
||||||
// 3.1 获取时间线数据
|
// 3.1 获取时间线数据
|
||||||
export function getGroupMemberTimeLine() {
|
export function getGroupMemberTimeLine() {
|
||||||
return http.get(`/groupEvolution/groupMember/timeline`)
|
return http.get(`/groupEvolution/groupMember/timeline`)
|
||||||
|
|
@ -45,9 +44,4 @@ export function getGroupMemberChart() {
|
||||||
// 3.4 群体演化信息
|
// 3.4 群体演化信息
|
||||||
export function getGroupMemberEvolutionInfoByTime(date) {
|
export function getGroupMemberEvolutionInfoByTime(date) {
|
||||||
return http.get(`/groupEvolution/groupMember/changeList?date=${date}`)
|
return http.get(`/groupEvolution/groupMember/changeList?date=${date}`)
|
||||||
=======
|
|
||||||
// 3.1 群体成员演化信息列表信息
|
|
||||||
export function getGroupMemberInfoList() {
|
|
||||||
return http.get(`/groupEvolution/groupMember/infoList`)
|
|
||||||
>>>>>>> 90124585f151f0a2286527a4c2e9232b86951cfb
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,132 +39,6 @@ const handlePointerDown = (time) => {
|
||||||
emit("click:pointerDownAndSlide", utcTime)
|
emit("click:pointerDownAndSlide", utcTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
const initChart = () => {
|
|
||||||
if (chart == null) {
|
|
||||||
chart = echarts.init(document.getElementById("container"))
|
|
||||||
}
|
|
||||||
if (Object.keys(graph.value).length === 0) {
|
|
||||||
chart.clear()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
function variableColorAndPos(groupId) {
|
|
||||||
const resultMap = {
|
|
||||||
0: { color: "#1f8473", x: 100, y: 100 },
|
|
||||||
1: { color: "#807d2c", x: 300, y: 300 },
|
|
||||||
6: { color: "#0c7090", x: 600, y: 600 }
|
|
||||||
}
|
|
||||||
return resultMap[parseInt(groupId)]
|
|
||||||
}
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
//hover上去的窗口
|
|
||||||
tooltip: {
|
|
||||||
trigger: "item",
|
|
||||||
backgroundColor: "rgba(0,0,0,0)", // 透明背景
|
|
||||||
borderColor: "rgba(0,0,0,0)", // 透明边框
|
|
||||||
borderWidth: 0,
|
|
||||||
extraCssText: "box-shadow:none;padding:0;",
|
|
||||||
formatter: function (params) {
|
|
||||||
if (params.dataType === "node") {
|
|
||||||
return `<div
|
|
||||||
style="
|
|
||||||
padding:10px 15px;
|
|
||||||
height: 68px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: url('${nodeHoverImg}');
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
flex-direction: column;
|
|
||||||
">
|
|
||||||
<div style="color:#fff;letter-spacing: 0.14px;">
|
|
||||||
<div >用户名:${params.data.name}</div>
|
|
||||||
<div >组ID:${params.data.groupId}</div>
|
|
||||||
</div>
|
|
||||||
</div>`
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
edgeLabel: {
|
|
||||||
show: true,
|
|
||||||
color: "#fff",
|
|
||||||
fontSize: 18,
|
|
||||||
textShadowColor: "#fff",
|
|
||||||
textShadowBlur: 0,
|
|
||||||
textShadowOffsetX: 0,
|
|
||||||
textShadowOffsetY: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
type: "graph",
|
|
||||||
layout: "force",
|
|
||||||
animation: false,
|
|
||||||
draggable: true,
|
|
||||||
roam: true,
|
|
||||||
zoom: 0.1,
|
|
||||||
force: {
|
|
||||||
initLayout: "circular", // 初始布局使用圆形
|
|
||||||
edgeLength: 6000,
|
|
||||||
repulsion: 5000,
|
|
||||||
gravity: 0.1,
|
|
||||||
friction: 0.02,
|
|
||||||
coolingFactor: 0.1
|
|
||||||
},
|
|
||||||
|
|
||||||
animationDurationUpdate: 3500, // 节点移动更平滑
|
|
||||||
data: graph.value?.nodes.map((node) => ({
|
|
||||||
...node,
|
|
||||||
symbol: "circle",
|
|
||||||
x: variableColorAndPos(node.groupId).x,
|
|
||||||
y: variableColorAndPos(node.groupId).y,
|
|
||||||
symbolSize: 40,
|
|
||||||
itemStyle: {
|
|
||||||
color: variableColorAndPos(node.groupId).color,
|
|
||||||
opacity: 1,
|
|
||||||
borderColor: "#46C6AD",
|
|
||||||
borderWidth: 1,
|
|
||||||
shadowBlur: 4,
|
|
||||||
borderType: "solid",
|
|
||||||
shadowColor: "rgba(19, 27, 114, 0.25)"
|
|
||||||
}
|
|
||||||
})),
|
|
||||||
links: graph.value?.links,
|
|
||||||
lineStyle: {
|
|
||||||
color: "#37ACD7",
|
|
||||||
width: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
chart.setOption(option)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
initChart()
|
|
||||||
})
|
|
||||||
let lastPostsLength = 0 //当列表更新时,记录上一次的长度
|
|
||||||
watch(
|
|
||||||
() => graph.value,
|
|
||||||
(newValue) => {
|
|
||||||
if (newValue.nodes.length > lastPostsLength) {
|
|
||||||
nextTick(() => {
|
|
||||||
initChart()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
lastPostsLength = newValue.nodes.length //实现按需更新
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
)
|
|
||||||
>>>>>>> 90124585f151f0a2286527a4c2e9232b86951cfb
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
></GroupGraph>
|
></GroupGraph>
|
||||||
</div>
|
</div>
|
||||||
<div class="postList">
|
<div class="postList">
|
||||||
|
|
||||||
<GroupPost
|
<GroupPost
|
||||||
:posts="groupMemberStore.posts"
|
:posts="groupMemberStore.posts"
|
||||||
@click:open-dialog="handleOpenPostDialog"
|
@click:open-dialog="handleOpenPostDialog"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user