Demo.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211
  1. <template>
  2. <h1>组件示例</h1>
  3. <tab :data="tabData" @select="select" />
  4. <!-- 图表 -->
  5. <el-scrollbar v-if="currTab == 1" style="height:85%;">
  6. <h2>图表</h2>
  7. <h2>07-08新增</h2>
  8. <h3>组合: 时间区域 area-bar-chart</h3>
  9. <area-bar-chart @areaClick="areaBarChartClick" :showLegend="true" />
  10. <h3>组合: 柱线图 multiple-bar-line-chart</h3>
  11. <multiple-bar-line-chart :height="'250px'" />
  12. <h3>散点图 normal-scatter-chart</h3>
  13. <normal-scatter-chart />
  14. <h2>07-07新增</h2>
  15. <h3>柱状图:multiple-y-line-chart</h3>
  16. <multiple-y-line-chart :height="'300px'" />
  17. <h2>old</h2>
  18. <h3>柱状图:horizontal-bar-chart</h3>
  19. <horizontal-bar-chart :height="'300px'" />
  20. <h3>柱状图:horizontal-bar-chart</h3>
  21. <hover-bar-chart :list="HoverBarChart" :height="'200px'" />
  22. <h3>柱状图:list-bar-chart-2</h3>
  23. <list-bar-chart-2 :list="ListBarChart" :height="'200px'" />
  24. <h3>柱状图:multiple-bar-chart</h3>
  25. <multiple-bar-chart :list="MultipleBarChart" :height="'200px'" />
  26. <h3>柱状图:multiple-hover-bar-chart</h3>
  27. <multiple-hover-bar-chart :height="'200px'" />
  28. <h3>柱状图:percent-bar</h3>
  29. <percent-bar />
  30. <h3>柱状图:single-bar-chart</h3>
  31. <single-bar-chart />
  32. <h3>柱状图:thermometer</h3>
  33. <thermometer />
  34. <h3>组合:bar-line-chart</h3>
  35. <bar-line-chart :height="'300px'" />
  36. <h3>组合:bar-line-chart</h3>
  37. <vertival-bar-line-chart :height="'300px'" />
  38. <h3>折线图:double-line-chart</h3>
  39. <double-line-chart :height="'200px'" />
  40. <h3>折线图:multiple-line-chart</h3>
  41. <multiple-line-chart :height="'200px'" />
  42. <h3>折线图:multi-arrow-line-chart</h3>
  43. <multi-arrow-line-chart :height="'200px'" />
  44. <h3>折线图:multiple-line-chart</h3>
  45. <normal-line-chart />
  46. <h3>折线图:simple-line-chart</h3>
  47. <simple-line-chart />
  48. <h3>折线图:table-line-chart</h3>
  49. <table-line-chart />
  50. <h3>饼图:dash-pie-chart</h3>
  51. <div style="width: 350px">
  52. <dash-pie-chart />
  53. </div>
  54. <h3>饼图:dual-pie-chart</h3>
  55. <div style="width: 350px">
  56. <dual-pie-chart />
  57. </div>
  58. <h3>饼图:normal-pie-chart</h3>
  59. <div style="width: 350px">
  60. <normal-pie-chart />
  61. </div>
  62. <h3>饼图:percent-pie-chart</h3>
  63. <div style="width: 350px">
  64. <percent-pie-chart />
  65. </div>
  66. <h3>饼图:direction-radar-chart</h3>
  67. <div style="height: 500px">
  68. <direction-radar-chart :height="'500px'" />
  69. </div>
  70. <h3>饼图:normal-radar-chart</h3>
  71. <div style="height: 500px">
  72. <normal-radar-chart :height="'500px'" />
  73. </div>
  74. <h3>饼图:normal-radar-chart</h3>
  75. <div style="height: 500px">
  76. <radar-chart :height="'500px'" />
  77. </div>
  78. </el-scrollbar>
  79. <!-- 组件 -->
  80. <el-scrollbar v-if="currTab == 2" style="height:85%;">
  81. <h3>panel</h3>
  82. <panel :title="'title 标题'">
  83. 带标题title
  84. </panel>
  85. <br />
  86. <panel>
  87. 无标题title
  88. </panel>
  89. <h3>panel-2</h3>
  90. <panel-2 :title="'panel -2'">
  91. panel 2
  92. </panel-2>
  93. <h3>panel-3</h3>
  94. <panel-3>
  95. panel-3
  96. </panel-3>
  97. <h3>toolbar-panel</h3>
  98. <toolbar-panel title="toolbar-panel">
  99. <template v-slot:tools>
  100. <div class="tools">
  101. <div class="tool-block">
  102. <div class="legend bg-green"></div>
  103. <div class="legend-text">实际电量</div>
  104. </div>
  105. <div class="tool-block">
  106. <div class="legend bg-orange"></div>
  107. <div class="legend-text">计划检修损失</div>
  108. </div>
  109. <div class="tool-block">
  110. <div class="legend bg-yellow"></div>
  111. <div class="legend-text">非计划检修损失</div>
  112. </div>
  113. <div class="tool-block">
  114. <div class="legend bg-red"></div>
  115. <div class="legend-text">限电损失</div>
  116. </div>
  117. <div class="tool-block">
  118. <div class="legend bg-purple"></div>
  119. <div class="legend-text">受累损失</div>
  120. </div>
  121. <div class="tool-block">
  122. <div class="legend bg-blue"></div>
  123. <div class="legend-text">性能损失</div>
  124. </div>
  125. </div>
  126. </template>
  127. <bar-line-chart :height="'calc(100vh - 200px)'" :color="barColor" />
  128. </toolbar-panel>
  129. <h3>btn-group-double</h3>
  130. <btn-group-double :btnGroups="btnGroups" @select="btnGroupDoubleSelect" />
  131. <h3>card-1</h3>
  132. <card-1 />
  133. <h3>percent-card</h3>
  134. <percent-card :value="25" :title="'标题'" />
  135. <h3>percent-card-2</h3>
  136. <percent-card-2 />
  137. <h3>collapse-list</h3>
  138. <div style="width:200px">
  139. <collapse-list />
  140. </div>
  141. <h3>list</h3>
  142. <div style="width:200px">
  143. <list />
  144. </div>
  145. </el-scrollbar>
  146. <el-scrollbar v-if="currTab == 3" style="height:85%;">
  147. <h2>07-09更新</h2>
  148. <h3>table-2</h3>
  149. <h3>组件说明:</h3>
  150. <p>与原组件使用方式基本相同 原table组件满足的情况下,不更换新组件也可以</p>
  151. <p>新table支持原table所有特性,优化了props及column, 支持更多功能</p>
  152. <p>现支持 文本省略及鼠标浮动显示</p>
  153. <p>* 原有template 及第三方标签实现方式更改 删除了column 中的 template、type及props</p>
  154. <h3>props说明:</h3>
  155. <p>height : string 高度 指定列表高度 自动判断是否显示滚动条, 不进行设置则为最大宽度且没有滚动条</p>
  156. <p>pageSize : number 分页个数 若不传 pagesize 不进行分页处理</p>
  157. <p>@onPagging : method 分页回调</p>
  158. <p>data : Object 数据源 { column: [] , data:[] , total: number }</p>
  159. <h3>column说明:</h3>
  160. <p>
  161. { name: "风机名称", field: "name", width:'', click:function(){ } ,sortable:fasle, slot:false, fixed:false, align:"center" }
  162. </p>
  163. <p>name : string 列名</p>
  164. <p>field : string 对应数据项 同时使用于具名插槽的name值</p>
  165. <p>width : 列宽 可自定与每列宽度 如果想设置横向滚动条 需手动设置列宽 满足各列宽度和大于屏幕宽度</p>
  166. <p>click : 点击事件 与原有table相同</p>
  167. <p>sortable : 排序</p>
  168. <p>slot: 开启插槽 为true时, 可在HTML中添加 插槽模板 添加自定义内容 为false时, 默认对应显示值, 示例参考代码中template </p>
  169. <p>fixed: 固定列</p>
  170. <p>align: 默认文本居中 left | center| right</p>
  171. <table-2 :data="tableData2" :height="'200px'" :pageSize="10" @onPagging="tableonPagging">
  172. <!-- v-slot:[field] 对应列嵌入自定义内容 包括第三方标签 -->
  173. <!-- 同时需要在 colum 中设置 slot:true -->
  174. <!-- 如果只设置 slot:true 不写模板 列不存在内容 -->
  175. <!-- scope 内容 scope.column 传入的 col 值, scope.row 数据值 -->
  176. <template v-slot:lqf="scope"> {{ scope.column.name }}:{{ scope.row.lqf }} </template>
  177. <template v-slot:action="scope">
  178. <a style="cursor:pointer;color:green;margin-right:8px;" @click="tableAction(scope)"> 点击查看组件点击事件返回信息 </a>
  179. <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}2 </a>
  180. <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}3 </a>
  181. </template>
  182. </table-2>
  183. <h3>table</h3>
  184. <Table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" />
  185. <h3>table</h3>
  186. <check-table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" @check="CheckTableonCheck" />
  187. <h3>el-table</h3>
  188. <el-table :data="eltableData" max-height="200" stripe style="width: 100%" border="false">
  189. <el-table-column prop="date" label="日期" width="150"> </el-table-column>
  190. <el-table-column label="配送信息">
  191. <el-table-column prop="name" label="姓名" width="120"> </el-table-column>
  192. <el-table-column label="地址">
  193. <el-table-column prop="province" label="省份" width="120"> </el-table-column>
  194. <el-table-column prop="city" label="市区" width="120"> </el-table-column>
  195. <el-table-column prop="address" label="地址"> </el-table-column>
  196. <el-table-column prop="zip" label="邮编" width="120"> </el-table-column>
  197. </el-table-column>
  198. </el-table-column>
  199. </el-table>
  200. </el-scrollbar>
  201. <el-scrollbar v-if="currTab == 4" style="height:85%;">
  202. <i class="svg-icon svg-icon-sm mg-r-16">
  203. <svg-icon :svgid="'svg-wind-site'" />
  204. </i>
  205. <i class="svg-icon svg-icon-green mg-r-16">
  206. <svg-icon :svgid="'svg-wind-site'" />
  207. </i>
  208. <i class="svg-icon svg-icon-lg svg-icon-red mg-r-16">
  209. <svg-icon :svgid="'svg-wind-site'" />
  210. </i>
  211. </el-scrollbar>
  212. </template>
  213. <script>
  214. import horizontalBarChart from "../components/chart/bar/horizontal-bar-chart.vue";
  215. import HoverBarChart from "../components/chart/bar/hover-bar-chart.vue";
  216. import ListBarChart2 from "../components/chart/bar/list-bar-chart2.vue";
  217. import MultipleBarChart from "../components/chart/bar/multiple-bar-chart.vue";
  218. import MultipleHoverBarChart from "../components/chart/bar/multiple-hover-bar-chart.vue";
  219. import PercentBar from "../components/chart/bar/percent-bar.vue";
  220. import SingleBarChart from "../components/chart/bar/single-bar-chart.vue";
  221. import Thermometer from "../components/chart/bar/thermometer.vue";
  222. import AreaBarChart from "../components/chart/combination/area-bar-chart.vue";
  223. import BarLineChart from "../components/chart/combination/bar-line-chart.vue";
  224. import MultipleBarLineChart from "../components/chart/combination/multiple-bar-line-chart.vue";
  225. import VertivalBarLineChart from "../components/chart/combination/vertival-bar-line-chart.vue";
  226. import DoubleLineChart from "../components/chart/line/double-line-chart.vue";
  227. import MultipleLineChart from "../components/chart/line/multiple-line-chart.vue";
  228. import MultipleYLineChart from "../components/chart/line/multiple-y-line-chart.vue";
  229. import NormalLineChart from "../components/chart/line/normal-line-chart.vue";
  230. import SimpleLineChart from "../components/chart/line/simple-line-chart.vue";
  231. import TableLineChart from "../components/chart/line/table-line-chart.vue";
  232. import DashPieChart from "../components/chart/pie/dash-pie-chart.vue";
  233. import DualPieChart from "../components/chart/pie/dual-pie-chart.vue";
  234. import NormalPieChart from "../components/chart/pie/normal-pie-chart.vue";
  235. import PercentPieChart from "../components/chart/pie/percent-pie-chart.vue";
  236. import DirectionRadarChart from "../components/chart/radar/direction-radar-chart.vue";
  237. import NormalRadarChart from "../components/chart/radar/normal-radar-chart.vue";
  238. import RadarChart from "../components/chart/radar/radar-chart.vue";
  239. import NormalScatterChart from "../components/chart/scatter/normal-scatter-chart.vue";
  240. import BtnGroupDouble from "../components/coms/btn/btn-group-double.vue";
  241. import Card1 from "../components/coms/cards/card-1.vue";
  242. import PercentCard2 from "../components/coms/cards/percent-card-2.vue";
  243. import PercentCard from "../components/coms/cards/percent-card.vue";
  244. import CollapseList from "../components/coms/collapse/collapse-list.vue";
  245. import SvgIcon from "../components/coms/icon/svg-icon.vue";
  246. import List from "../components/coms/list/list.vue";
  247. import Panel from "../components/coms/panel/panel.vue";
  248. import Panel2 from "../components/coms/panel/panel2.vue";
  249. import Panel3 from "../components/coms/panel/panel3.vue";
  250. import ToolbarPanel from "../components/coms/panel/toolbar-panel.vue";
  251. import CheckTable from "../components/coms/table/check-table.vue";
  252. import Table from "../components/coms/table/table.vue";
  253. import Table2 from "../components/coms/table/table2.vue";
  254. import Tab from "../components/coms/tabs/tab.vue";
  255. import multiArrowLineChart from "../components/chart/line/multi-arrow-line-chart.vue";
  256. export default {
  257. components: {
  258. horizontalBarChart,
  259. HoverBarChart,
  260. ListBarChart2,
  261. MultipleBarChart,
  262. MultipleHoverBarChart,
  263. PercentBar,
  264. SingleBarChart,
  265. Thermometer,
  266. BarLineChart,
  267. VertivalBarLineChart,
  268. DoubleLineChart,
  269. MultipleLineChart,
  270. NormalLineChart,
  271. SimpleLineChart,
  272. TableLineChart,
  273. DashPieChart,
  274. DualPieChart,
  275. NormalPieChart,
  276. PercentPieChart,
  277. DirectionRadarChart,
  278. NormalRadarChart,
  279. RadarChart,
  280. Tab,
  281. BtnGroupDouble,
  282. Card1,
  283. PercentCard,
  284. PercentCard2,
  285. CollapseList,
  286. List,
  287. Panel,
  288. Panel2,
  289. Panel3,
  290. ToolbarPanel,
  291. Table,
  292. CheckTable,
  293. SvgIcon,
  294. MultipleYLineChart,
  295. NormalScatterChart,
  296. AreaBarChart,
  297. MultipleBarLineChart,
  298. Table2,
  299. multiArrowLineChart
  300. },
  301. methods: {
  302. select(data) {
  303. // console.log(data);
  304. this.currTab = parseInt(data.id);
  305. },
  306. btnGroupDoubleSelect(param) {
  307. console.log("btn-group-double");
  308. console.log(param);
  309. },
  310. tableonPagging(param) {
  311. console.log("table pagging event");
  312. console.log(param);
  313. this.tableData.data = [
  314. {
  315. index: 1,
  316. name: "MG01-01",
  317. lqf: "0.1000",
  318. yggl: "0.1000",
  319. yyy: "0.10",
  320. pcspp: "0.1000",
  321. u1: "0.1000",
  322. u2: "0.1000",
  323. v1: "0.1000",
  324. v2: "0.1000",
  325. w1: "0.1000",
  326. w2: "0.1000",
  327. zca: "0.1000",
  328. zcb: "0.1000",
  329. clx: "0.1000",
  330. clx1: "0.1000",
  331. clx2: "0.1000",
  332. jc: "0.1000",
  333. hh: "0.1000",
  334. hj: "0.1000",
  335. is_light: false,
  336. },
  337. ];
  338. let index = 0;
  339. for (let i = param.start; i < param.end; i++) {
  340. this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
  341. this.tableData.data[index].index = i + 1;
  342. index++;
  343. }
  344. },
  345. CheckTableonCheck(param) {
  346. console.log("table check event");
  347. console.log(param);
  348. },
  349. areaBarChartClick(param) {
  350. console.log(param);
  351. },
  352. tableAction(param) {
  353. console.log(param);
  354. },
  355. },
  356. data() {
  357. return {
  358. currTab: 1,
  359. tabData: [
  360. {
  361. id: "1",
  362. text: "图表",
  363. },
  364. {
  365. id: "2",
  366. text: "组件",
  367. },
  368. {
  369. id: "3",
  370. text: "表格",
  371. },
  372. {
  373. id: "4",
  374. text: "图标",
  375. },
  376. ],
  377. tableData: {
  378. column: [
  379. {
  380. name: "",
  381. field: "index",
  382. width: "50px",
  383. is_num: false,
  384. is_light: false,
  385. },
  386. {
  387. name: "名称",
  388. field: "name",
  389. is_num: false,
  390. is_light: false,
  391. click: function(event, data) {
  392. console.log(event);
  393. console.log(data);
  394. },
  395. },
  396. {
  397. name: "理论发电量",
  398. field: "lqf",
  399. is_num: false,
  400. is_light: false,
  401. slot: true,
  402. },
  403. {
  404. name: "SCADA发电量",
  405. field: "yggl",
  406. is_num: false,
  407. is_light: false,
  408. },
  409. {
  410. name: "风速",
  411. field: "yyy",
  412. is_num: false,
  413. is_light: false,
  414. },
  415. {
  416. name: "非计划检修",
  417. field: "pcspp",
  418. is_num: false,
  419. is_light: false,
  420. },
  421. {
  422. name: "计划检修",
  423. field: "u1",
  424. is_num: false,
  425. is_light: false,
  426. },
  427. {
  428. name: "受累",
  429. field: "u2",
  430. is_num: false,
  431. is_light: true,
  432. },
  433. {
  434. name: "限电",
  435. field: "v1",
  436. is_num: false,
  437. is_light: false,
  438. },
  439. {
  440. name: "性能",
  441. field: "v2",
  442. is_num: false,
  443. is_light: false,
  444. },
  445. {
  446. name: "风能率用率%",
  447. field: "w1",
  448. is_num: false,
  449. is_light: false,
  450. },
  451. ],
  452. data: [
  453. {
  454. index: 1,
  455. name: "MG01-01",
  456. lqf: "0.1000",
  457. yggl: "0.1000",
  458. yyy: "0.10",
  459. pcspp: "0.1000",
  460. u1: "0.1000",
  461. u2: "0.1000",
  462. v1: "0.1000",
  463. v2: "0.1000",
  464. w1: "0.1000",
  465. w2: "0.1000",
  466. zca: "0.1000",
  467. zcb: "0.1000",
  468. clx: "0.1000",
  469. clx1: "0.1000",
  470. clx2: "0.1000",
  471. jc: "0.1000",
  472. hh: "0.1000",
  473. hj: "0.1000",
  474. is_light: false,
  475. },
  476. ],
  477. total: 100,
  478. },
  479. tableData2: {
  480. column: [
  481. {
  482. name: "",
  483. field: "index",
  484. width: 50,
  485. sortable: true,
  486. },
  487. {
  488. name: "名称",
  489. field: "name",
  490. width: 200,
  491. click: function(event, data) {
  492. console.log(event);
  493. console.log(data);
  494. },
  495. align: "left",
  496. resizable: true,
  497. },
  498. {
  499. name: "理论发电量",
  500. width: 200,
  501. field: "lqf",
  502. slot: true,
  503. },
  504. {
  505. width: 200,
  506. name: "SCADA发电量",
  507. field: "yggl",
  508. },
  509. {
  510. name: "风速",
  511. width: 80,
  512. field: "yyy",
  513. sortable: true,
  514. align: "right",
  515. },
  516. {
  517. name: "非计划检修",
  518. field: "pcspp",
  519. width: 200,
  520. },
  521. {
  522. name: "计划检修",
  523. width: 200,
  524. field: "u1",
  525. },
  526. {
  527. name: "受累",
  528. width: 200,
  529. field: "u2",
  530. },
  531. {
  532. name: "限电",
  533. field: "v1",
  534. width: 200,
  535. },
  536. {
  537. name: "性能",
  538. width: 200,
  539. field: "v2",
  540. },
  541. {
  542. name: "风能率用率%",
  543. width: 200,
  544. field: "w1",
  545. },
  546. {
  547. name: "操作",
  548. field: "action",
  549. width: 400,
  550. slot: true,
  551. },
  552. ],
  553. data: [
  554. {
  555. index: 1,
  556. name: "MG01-01",
  557. lqf: "0.1000",
  558. yggl: "0.1000",
  559. yyy: "0.10",
  560. pcspp: "0.1000",
  561. u1: "0.1000",
  562. u2: "0.1000",
  563. v1: "0.1000",
  564. v2: "0.1000",
  565. w1: "0.1000",
  566. w2: "0.1000",
  567. zca: "0.1000",
  568. zcb: "0.1000",
  569. clx: "0.1000",
  570. clx1: "0.1000",
  571. clx2: "0.1000",
  572. jc: "0.1000",
  573. hh: "0.1000",
  574. hj: "0.1000",
  575. is_light: false,
  576. },
  577. ],
  578. total: 100,
  579. },
  580. // 柱状图:horizontal-bar-chart data
  581. HorizontalBarChart: {
  582. area: ["新荣区", "平城区", "云冈区", "云州区", "阳高县", "天镇县", "广灵县", "浑源县", "左云县"],
  583. legend: ["因病", "因残", "因学", "因灾", "缺土地", "缺水"],
  584. data: [
  585. [1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
  586. [320, 302, 301, 334, 390, 330, 320, 100, 50],
  587. [320, 302, 301, 334, 390, 330, 320, 100, 50],
  588. [320, 302, 301, 334, 390, 330, 320, 100, 50],
  589. [320, 302, 301, 334, 390, 330, 320, 100, 50],
  590. [320, 302, 301, 334, 390, 330, 320, 100, 50],
  591. ],
  592. },
  593. // 柱状图:horizontal-bar-chart data
  594. HoverBarChart: [
  595. {
  596. text: "1",
  597. value: 1,
  598. },
  599. {
  600. text: "2",
  601. value: 2,
  602. },
  603. {
  604. text: "3",
  605. value: 1,
  606. },
  607. {
  608. text: "4",
  609. value: 3,
  610. },
  611. {
  612. text: "5",
  613. value: 3,
  614. },
  615. {
  616. text: "6",
  617. value: 3,
  618. },
  619. {
  620. text: "7",
  621. value: 3,
  622. },
  623. {
  624. text: "8",
  625. value: 3,
  626. },
  627. {
  628. text: "9",
  629. value: 3,
  630. },
  631. {
  632. text: "10",
  633. value: 3,
  634. },
  635. {
  636. text: "11",
  637. value: 3,
  638. },
  639. {
  640. text: "12",
  641. value: 3,
  642. },
  643. {
  644. text: "13",
  645. value: 3,
  646. },
  647. {
  648. text: "14",
  649. value: 3,
  650. },
  651. {
  652. text: "15",
  653. value: 3,
  654. },
  655. {
  656. text: "16",
  657. value: 3,
  658. },
  659. {
  660. text: "17",
  661. value: 3,
  662. },
  663. {
  664. text: "18",
  665. value: 3,
  666. },
  667. {
  668. text: "19",
  669. value: 3,
  670. },
  671. {
  672. text: "20",
  673. value: 3,
  674. },
  675. {
  676. text: "21",
  677. value: 3,
  678. },
  679. {
  680. text: "22",
  681. value: 3,
  682. },
  683. {
  684. text: "23",
  685. value: 3,
  686. },
  687. {
  688. text: "24",
  689. value: 3,
  690. },
  691. {
  692. text: "25",
  693. value: 3,
  694. },
  695. {
  696. text: "26",
  697. value: 3,
  698. },
  699. {
  700. text: "27",
  701. value: 3,
  702. },
  703. {
  704. text: "28",
  705. value: 3,
  706. },
  707. {
  708. text: "29",
  709. value: 3,
  710. },
  711. {
  712. text: "30",
  713. value: 3,
  714. },
  715. {
  716. text: "31",
  717. value: 3,
  718. },
  719. ],
  720. // list-bar-chart-2 data
  721. ListBarChart: [
  722. {
  723. name: "当日预测电量",
  724. value: 103.62,
  725. total: 150,
  726. },
  727. {
  728. name: "实际发电量",
  729. value: 98.62,
  730. total: 100,
  731. },
  732. {
  733. name: "当月预测电量",
  734. value: 113.27,
  735. total: 150,
  736. },
  737. {
  738. name: "实际发电量",
  739. value: 136.72,
  740. total: 150,
  741. },
  742. ],
  743. // multiple-bar-chart data
  744. MultipleBarChart: [
  745. {
  746. title: "日发电量",
  747. yAxisIndex: 0,
  748. value: [
  749. {
  750. text: "1日",
  751. value: 1,
  752. },
  753. {
  754. text: "2日",
  755. value: 2,
  756. },
  757. {
  758. text: "3日",
  759. value: 1,
  760. },
  761. {
  762. text: "4日",
  763. value: 3,
  764. },
  765. {
  766. text: "5日",
  767. value: 3,
  768. },
  769. {
  770. text: "6日",
  771. value: 3,
  772. },
  773. {
  774. text: "7日",
  775. value: 3,
  776. },
  777. ],
  778. },
  779. {
  780. title: "上网电量",
  781. yAxisIndex: 0,
  782. value: [
  783. {
  784. text: "1日",
  785. value: 1,
  786. },
  787. {
  788. text: "2日",
  789. value: 2,
  790. },
  791. {
  792. text: "3日",
  793. value: 1,
  794. },
  795. {
  796. text: "4日",
  797. value: 3,
  798. },
  799. {
  800. text: "5日",
  801. value: 3,
  802. },
  803. {
  804. text: "6日",
  805. value: 3,
  806. },
  807. {
  808. text: "7日",
  809. value: 3,
  810. },
  811. ],
  812. },
  813. {
  814. title: "购网电量",
  815. yAxisIndex: 0,
  816. value: [
  817. {
  818. text: "1日",
  819. value: 1,
  820. },
  821. {
  822. text: "2日",
  823. value: 2,
  824. },
  825. {
  826. text: "3日",
  827. value: 1,
  828. },
  829. {
  830. text: "4日",
  831. value: 3,
  832. },
  833. {
  834. text: "5日",
  835. value: 3,
  836. },
  837. {
  838. text: "6日",
  839. value: 3,
  840. },
  841. {
  842. text: "7日",
  843. value: 3,
  844. },
  845. ],
  846. },
  847. {
  848. title: "风速",
  849. yAxisIndex: 1,
  850. value: [
  851. {
  852. text: "1日",
  853. value: 1,
  854. },
  855. {
  856. text: "2日",
  857. value: 2,
  858. },
  859. {
  860. text: "3日",
  861. value: 1,
  862. },
  863. {
  864. text: "4日",
  865. value: 3,
  866. },
  867. {
  868. text: "5日",
  869. value: 3,
  870. },
  871. {
  872. text: "6日",
  873. value: 3,
  874. },
  875. {
  876. text: "7日",
  877. value: 3,
  878. },
  879. ],
  880. },
  881. ],
  882. // btnGroups
  883. btnGroups: [
  884. {
  885. icon: "fa fa-fire",
  886. btns: [
  887. {
  888. text: "某某风场",
  889. code: "mmfdc1",
  890. },
  891. {
  892. text: "某某风场",
  893. code: "mhsfc",
  894. },
  895. {
  896. text: "某某风场",
  897. code: "mmfdc2",
  898. },
  899. {
  900. text: "某某风场",
  901. code: "mmfdc3",
  902. },
  903. {
  904. text: "某某风场",
  905. code: "mmfdc4",
  906. },
  907. ],
  908. },
  909. {
  910. icon: "fa fa-fire-extinguisher",
  911. btns: [
  912. {
  913. text: "某某风场",
  914. code: "mmgf1",
  915. },
  916. {
  917. text: "某某风场",
  918. code: "mmgf2",
  919. },
  920. {
  921. text: "某某风场",
  922. code: "mmgf3",
  923. },
  924. {
  925. text: "某某风场",
  926. code: "mmgf4",
  927. },
  928. ],
  929. },
  930. ],
  931. eltableData: [
  932. {
  933. date: "2016-05-03",
  934. name: "王小虎",
  935. province: "上海",
  936. city: "普陀区",
  937. address: "上海市普陀区金沙江路 1518 弄",
  938. zip: 200333,
  939. },
  940. {
  941. date: "2016-05-02",
  942. name: "王小虎",
  943. province: "上海",
  944. city: "普陀区",
  945. address: "上海市普陀区金沙江路 1518 弄",
  946. zip: 200333,
  947. },
  948. {
  949. date: "2016-05-04",
  950. name: "王小虎",
  951. province: "上海",
  952. city: "普陀区",
  953. address: "上海市普陀区金沙江路 1518 弄",
  954. zip: 200333,
  955. },
  956. {
  957. date: "2016-05-01",
  958. name: "王小虎",
  959. province: "上海",
  960. city: "普陀区",
  961. address: "上海市普陀区金沙江路 1518 弄",
  962. zip: 200333,
  963. },
  964. {
  965. date: "2016-05-08",
  966. name: "王小虎",
  967. province: "上海",
  968. city: "普陀区",
  969. address: "上海市普陀区金沙江路 1518 弄",
  970. zip: 200333,
  971. },
  972. {
  973. date: "2016-05-06",
  974. name: "王小虎",
  975. province: "上海",
  976. city: "普陀区",
  977. address: "上海市普陀区金沙江路 1518 弄",
  978. zip: 200333,
  979. },
  980. {
  981. date: "2016-05-07",
  982. name: "王小虎",
  983. province: "上海",
  984. city: "普陀区",
  985. address: "上海市普陀区金沙江路 1518 弄",
  986. zip: 200333,
  987. },
  988. {
  989. date: "2016-05-07",
  990. name: "王小虎",
  991. province: "上海",
  992. city: "普陀区",
  993. address: "上海市普陀区金沙江路 1518 弄",
  994. zip: 200333,
  995. },
  996. {
  997. date: "2016-05-07",
  998. name: "王小虎",
  999. province: "上海",
  1000. city: "普陀区",
  1001. address: "上海市普陀区金沙江路 1518 弄",
  1002. zip: 200333,
  1003. },
  1004. {
  1005. date: "2016-05-07",
  1006. name: "王小虎",
  1007. province: "上海",
  1008. city: "普陀区",
  1009. address: "上海市普陀区金沙江路 1518 弄",
  1010. zip: 200333,
  1011. },
  1012. {
  1013. date: "2016-05-07",
  1014. name: "王小虎",
  1015. province: "上海",
  1016. city: "普陀区",
  1017. address: "上海市普陀区金沙江路 1518 弄",
  1018. zip: 200333,
  1019. },
  1020. {
  1021. date: "2016-05-07",
  1022. name: "王小虎",
  1023. province: "上海",
  1024. city: "普陀区",
  1025. address: "上海市普陀区金沙江路 1518 弄",
  1026. zip: 200333,
  1027. },
  1028. {
  1029. date: "2016-05-07",
  1030. name: "王小虎",
  1031. province: "上海",
  1032. city: "普陀区",
  1033. address: "上海市普陀区金沙江路 1518 弄",
  1034. zip: 200333,
  1035. },
  1036. {
  1037. date: "2016-05-07",
  1038. name: "王小虎",
  1039. province: "上海",
  1040. city: "普陀区",
  1041. address: "上海市普陀区金沙江路 1518 弄",
  1042. zip: 200333,
  1043. },
  1044. {
  1045. date: "2016-05-07",
  1046. name: "王小虎",
  1047. province: "上海",
  1048. city: "普陀区",
  1049. address: "上海市普陀区金沙江路 1518 弄",
  1050. zip: 200333,
  1051. },
  1052. {
  1053. date: "2016-05-07",
  1054. name: "王小虎",
  1055. province: "上海",
  1056. city: "普陀区",
  1057. address: "上海市普陀区金沙江路 1518 弄",
  1058. zip: 200333,
  1059. },
  1060. {
  1061. date: "2016-05-07",
  1062. name: "王小虎",
  1063. province: "上海",
  1064. city: "普陀区",
  1065. address: "上海市普陀区金沙江路 1518 弄",
  1066. zip: 200333,
  1067. },
  1068. {
  1069. date: "2016-05-07",
  1070. name: "王小虎",
  1071. province: "上海",
  1072. city: "普陀区",
  1073. address: "上海市普陀区金沙江路 1518 弄",
  1074. zip: 200333,
  1075. },
  1076. {
  1077. date: "2016-05-07",
  1078. name: "王小虎",
  1079. province: "上海",
  1080. city: "普陀区",
  1081. address: "上海市普陀区金沙江路 1518 弄",
  1082. zip: 200333,
  1083. },
  1084. {
  1085. date: "2016-05-07",
  1086. name: "王小虎",
  1087. province: "上海",
  1088. city: "普陀区",
  1089. address: "上海市普陀区金沙江路 1518 弄",
  1090. zip: 200333,
  1091. },
  1092. {
  1093. date: "2016-05-07",
  1094. name: "王小虎",
  1095. province: "上海",
  1096. city: "普陀区",
  1097. address: "上海市普陀区金沙江路 1518 弄",
  1098. zip: 200333,
  1099. },
  1100. {
  1101. date: "2016-05-07",
  1102. name: "王小虎",
  1103. province: "上海",
  1104. city: "普陀区",
  1105. address: "上海市普陀区金沙江路 1518 弄",
  1106. zip: 200333,
  1107. },
  1108. {
  1109. date: "2016-05-07",
  1110. name: "王小虎",
  1111. province: "上海",
  1112. city: "普陀区",
  1113. address: "上海市普陀区金沙江路 1518 弄",
  1114. zip: 200333,
  1115. },
  1116. {
  1117. date: "2016-05-07",
  1118. name: "王小虎",
  1119. province: "上海",
  1120. city: "普陀区",
  1121. address: "上海市普陀区金沙江路 1518 弄",
  1122. zip: 200333,
  1123. },
  1124. ],
  1125. };
  1126. },
  1127. created() {
  1128. for (let i = 1; i < 21; i++) {
  1129. this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
  1130. this.tableData.data[i].index = i + 1;
  1131. this.tableData2.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
  1132. this.tableData2.data[i].index = i + 1;
  1133. this.tableData2.data[i].yyy = i * 0.01 * Math.random();
  1134. }
  1135. },
  1136. };
  1137. </script>
  1138. <style lang="less" scoped>
  1139. .tools {
  1140. display: flex;
  1141. line-height: 3.4259vh;
  1142. .tool-block {
  1143. display: flex;
  1144. align-items: center;
  1145. margin-left: 0.741vh;
  1146. .legend {
  1147. flex: auto;
  1148. width: 0.741vh;
  1149. height: 0.741vh;
  1150. margin-right: 0.741vh;
  1151. &.long {
  1152. width: 2.963vh;
  1153. height: 0.37vh;
  1154. }
  1155. }
  1156. .legend-text {
  1157. color: @gray-l;
  1158. font-size: @fontsize-s;
  1159. }
  1160. }
  1161. }
  1162. </style>