From d809d884e58fd23e34728ef7e51c7a90adc78cff Mon Sep 17 00:00:00 2001 From: sulenn <273409891@qq.com> Date: Wed, 11 Dec 2019 12:20:20 +0800 Subject: [PATCH 1/2] comlete picture and video area --- .gitignore | 3 +++ demo.html | 64 +++++++++++++++++++++++++++++++++-------------- image/新疆/1.jpg | Bin 0 -> 46746 bytes image/新疆/2.jpg | Bin 0 -> 100140 bytes image/新疆/3.jpg | Bin 0 -> 44126 bytes image/新疆/4.jpg | Bin 0 -> 44895 bytes image/新疆/5.jpg | Bin 0 -> 32201 bytes image/西藏/1.jpg | Bin 0 -> 142948 bytes image/西藏/2.jpg | Bin 0 -> 549105 bytes image/西藏/3.jpg | Bin 0 -> 44711 bytes image/西藏/4.jpg | Bin 0 -> 51639 bytes image/西藏/5.jpg | Bin 0 -> 104225 bytes image/青海/1.jpg | Bin 0 -> 96690 bytes image/青海/2.jpg | Bin 0 -> 64698 bytes image/青海/3.jpg | Bin 0 -> 25859 bytes image/青海/4.jpg | Bin 0 -> 32510 bytes image/青海/5.jpg | Bin 0 -> 60734 bytes 17 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 image/新疆/1.jpg create mode 100644 image/新疆/2.jpg create mode 100644 image/新疆/3.jpg create mode 100644 image/新疆/4.jpg create mode 100644 image/新疆/5.jpg create mode 100644 image/西藏/1.jpg create mode 100644 image/西藏/2.jpg create mode 100644 image/西藏/3.jpg create mode 100644 image/西藏/4.jpg create mode 100644 image/西藏/5.jpg create mode 100644 image/青海/1.jpg create mode 100644 image/青海/2.jpg create mode 100644 image/青海/3.jpg create mode 100644 image/青海/4.jpg create mode 100644 image/青海/5.jpg diff --git a/.gitignore b/.gitignore index 7b2c018..a343e86 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ # precompiled files .precomp lib/.precomp +image/青海/1.mp4 +image/西藏/1.mp4 +image/新疆/1.mp4 diff --git a/demo.html b/demo.html index 4cb785c..642c3dc 100644 --- a/demo.html +++ b/demo.html @@ -25,38 +25,26 @@
- +
- +
- +
- +
- -
-
- -
-
- -
-
- -
-
- +
@@ -1101,6 +1089,8 @@ category = 1 symbolSize = 40 init(city) + loadPic(city) + loadVideo(city) }); myChart.setOption(option); @@ -1273,7 +1263,7 @@ optionGraph.series[0].links = Object.values(currentGraph.links); myChartGraph.setOption(optionGraph); } - + const optionGraph = { title: { title:'知识图谱', @@ -1354,6 +1344,7 @@ } }] }; + init("西藏") myChartGraph.on('click', function(params) { if (params.dataType === "node") { const node = nodeMap[params.data.name]; @@ -1366,6 +1357,41 @@ } }); +// 点击省份加载图片 + function loadPic(name) { + if (name == "西藏" || name == "新疆" || name == "青海") { + temp = 1 + } + else { + name = "西藏" + } + $("img").each(function(index){ + newPath = "./image/"+name+"/"+(index+1)+".jpg" + $(this).attr("src", newPath) + // alert(index) + + }); + } +// 点击省份加载视频 +function loadVideo(name) { + if (name == "西藏" || name == "新疆" || name == "青海") { + temp = 1 + } + else { + name = "西藏" + } + $("video").remove(); + var newPath = "./image/"+name+"/1.mp4" + var newSource = "
"+ + ""+ + "
" + $(".div-c").prepend(newSource) + } +