Rightnav.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <div class="right-nav">
  3. <div class="nav-cont">
  4. <div class="nav-tit">
  5. <div class="nav-circle">
  6. <img src="../assets/images/yj-tity1.png" />
  7. </div>
  8. <p>救援队伍</p>
  9. </div>
  10. <div class="yj-search">
  11. <el-input
  12. class="inp-txt"
  13. placeholder="请输入内容"
  14. v-model="input">
  15. </el-input>
  16. <el-button slot="append" icon="el-icon-search"></el-button>
  17. </div>
  18. <div class="jydw-zs">
  19. <span>救援队伍总数:</span>
  20. <b>150</b>
  21. <span>人</span>
  22. </div>
  23. <div id="Jydw"></div>
  24. <div class="jydw-list scroll h-50">
  25. <div class="jydw-li">
  26. <img src="../assets/images/event_fire/binansuo1.png"/>
  27. <div class="jydw-txt">
  28. <h2>延吉市新兴街道</h2>
  29. <p>面积:5.8km²</p>
  30. <p>容纳人数:26000人</p>
  31. </div>
  32. </div>
  33. <div class="jydw-li">
  34. <img src="../assets/images/event_fire/binansuo2.png"/>
  35. <div class="jydw-txt">
  36. <h2>延吉市新兴街道民昌社区</h2>
  37. <p>面积:800m²</p>
  38. <p>容纳人数:2000人</p>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <script>
  46. import * as echarts from 'echarts';
  47. export default {
  48. name: 'Rightnav',
  49. data() {
  50. return{
  51. input:''
  52. }
  53. },
  54. props: {
  55. },
  56. methods:{
  57. initCharts (){
  58. let myChart = echarts.init(document.getElementById('Jydw'));
  59. myChart.setOption({
  60. tooltip: {
  61. show: true,
  62. trigger: 'axis',
  63. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  64. type: 'line', // 默认为直线,可选为:'line' | 'shadow'
  65. //修改指识线的颜色
  66. lineStyle: {
  67. color: "transparent"
  68. }
  69. },
  70. formatter: function(params) {
  71. console.log(params)
  72. },
  73. },
  74. grid: {
  75. top: 20,
  76. bottom: 20,
  77. left: 30,
  78. right: 20
  79. },
  80. xAxis: [{
  81. type: 'category',
  82. axisTick: {
  83. show: false,
  84. alignWithLabel: true, //true 的时候有效,可以保证刻度线和标签对齐
  85. },
  86. axisLine: {
  87. lineStyle: {
  88. color: "#fff"
  89. }
  90. },
  91. data: ['长胜村', '兴安村', '太阳村', '实现村', '勤劳村']
  92. }, ],
  93. yAxis: [{
  94. type: 'value',
  95. splitLine: {
  96. show: true,
  97. lineStyle: {
  98. color: "rgba(136, 159, 204, .2)"
  99. }
  100. },
  101. axisLine: {
  102. show: false,
  103. lineStyle: {
  104. color: "#fff"
  105. }
  106. },
  107. axisTick: {
  108. show: false
  109. },
  110. }],
  111. //手势放大柱状图折线图
  112. dataZoom: {
  113. type: "inside"
  114. },
  115. series: [{
  116. //给折线图下方添加阴影
  117. areaStyle: {
  118. normal: {
  119. color: new echarts.graphic.LinearGradient(
  120. 0,
  121. 0,
  122. 0,
  123. 1,
  124. [{
  125. offset: 0,
  126. color: 'rgba(0, 102, 255,0.4)'
  127. },
  128. {
  129. offset: 1,
  130. color: 'rgba(0, 102, 255,0)'
  131. }
  132. ],
  133. false
  134. ),
  135. shadowColor: 'rgba(59, 34, 201,1)',
  136. shadowBlur: 10
  137. }
  138. },
  139. name: '',
  140. type: 'line',
  141. smooth: true,
  142. itemStyle: {
  143. normal: {
  144. show: false,
  145. color: "#00a0fc", //改变折线点的颜色
  146. lineStyle: {
  147. color: "#00a0fc" //改变折线颜色
  148. },
  149. label: {
  150. show: false, //开启显示
  151. position: 'top', //在上方显示
  152. textStyle: { //数值样式
  153. color: '#999999',
  154. fontSize: 10
  155. }
  156. },
  157. },
  158. emphasis: {
  159. show: true,
  160. color: "#00a0fc",
  161. borderColor: "#ffffff",
  162. label: {
  163. show: true, //开启显示
  164. position: 'top', //在上方显示
  165. textStyle: { //数值样式
  166. color: '#fff',
  167. fontSize: 10,
  168. padding: [10, 10, 10, 10],
  169. backgroundColor: "rgba(24, 71, 185, .6)",
  170. borderRadius: 4,
  171. }
  172. }
  173. }
  174. },
  175. data: [36, 30, 28, 32, 24]
  176. }]
  177. })
  178. }
  179. },
  180. mounted(){
  181. this.initCharts();
  182. }
  183. }
  184. </script>
  185. <!-- Add "scoped" attribute to limit CSS to this component only -->
  186. <style scoped>
  187. .right-nav{
  188. background: url("../assets/images/yj-rightnavbg.png") no-repeat center;
  189. background-size: cover;
  190. position: absolute;
  191. right: 0px;
  192. top:0px;
  193. height: 100vh;
  194. z-index: 3;
  195. width: 382px;
  196. }
  197. .nav-cont{
  198. width: 330px;
  199. height: calc(100vh - 17vh);
  200. margin-top: 10vh;
  201. margin: 8vh 19px 0px 0px;
  202. float: right;
  203. }
  204. .jydw-zs{
  205. display: flex;
  206. flex-direction: row;
  207. margin:15px 0px;
  208. padding-left: 15px;
  209. align-items: baseline;
  210. }
  211. .jydw-zs span{
  212. font-size: 14px;
  213. color: #fff;
  214. }
  215. .jydw-zs b{
  216. font-size: 28px;
  217. color: #23d6df;
  218. padding: 0px 5px;
  219. font-family: myfont2;
  220. }
  221. #Jydw{
  222. width: 98%;
  223. height: 200px;
  224. margin-left: 20px;
  225. }
  226. .jydw-list{
  227. display: flex;
  228. flex-direction: column;
  229. margin: 20px 20px;
  230. }
  231. .jydw-list .jydw-li{
  232. display: flex;
  233. flex-direction: row;
  234. margin-bottom: 5px;
  235. cursor: pointer;
  236. width: 100%;
  237. text-align: left;
  238. padding: 4px 0px;
  239. }
  240. .jydw-list .jydw-li:hover{
  241. background: rgb(13 69 155 / 43%);
  242. }
  243. .jydw-list .jydw-li img{
  244. width: 100px;
  245. height: 68px;
  246. margin-right: 15px;
  247. }
  248. .jydw-list .jydw-li h2{
  249. color: #23d6df;
  250. font-size: 14px;
  251. font-weight: 900;
  252. padding-bottom: 5px;
  253. }
  254. .jydw-list .jydw-li p{
  255. color: #fff;
  256. font-size: 14px;
  257. line-height: 20px;
  258. }
  259. </style>