|
@@ -2,10 +2,14 @@
|
|
|
<h1>组件示例</h1>
|
|
|
<tab :data="tabData" @select="select" />
|
|
|
<!-- 图表 -->
|
|
|
- <el-scrollbar v-if="currTab == 1" style="height:85%;">
|
|
|
+ <el-scrollbar v-if="currTab == 1" style="height: 85%">
|
|
|
<h2>图表</h2>
|
|
|
<h2>07-16新增</h2>
|
|
|
- <scatter-line-chart :lineData="scatterLineData.lineData" :data="scatterLineData.data" :height="'250px'" />
|
|
|
+ <scatter-line-chart
|
|
|
+ :lineData="scatterLineData.lineData"
|
|
|
+ :data="scatterLineData.data"
|
|
|
+ :height="'250px'"
|
|
|
+ />
|
|
|
|
|
|
<h2>07-12新增</h2>
|
|
|
<h3>折现: zoom-line-chart</h3>
|
|
@@ -114,25 +118,17 @@
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
<!-- 组件 -->
|
|
|
- <el-scrollbar v-if="currTab == 2" style="height:85%;">
|
|
|
+ <el-scrollbar v-if="currTab == 2" style="height: 85%">
|
|
|
<h3>panel</h3>
|
|
|
- <panel :title="'title 标题'">
|
|
|
- 带标题title
|
|
|
- </panel>
|
|
|
+ <panel :title="'title 标题'"> 带标题title </panel>
|
|
|
<br />
|
|
|
- <panel>
|
|
|
- 无标题title
|
|
|
- </panel>
|
|
|
+ <panel> 无标题title </panel>
|
|
|
|
|
|
<h3>panel-2</h3>
|
|
|
- <panel-2 :title="'panel -2'">
|
|
|
- panel 2
|
|
|
- </panel-2>
|
|
|
+ <panel-2 :title="'panel -2'"> panel 2 </panel-2>
|
|
|
|
|
|
<h3>panel-3</h3>
|
|
|
- <panel-3>
|
|
|
- panel-3
|
|
|
- </panel-3>
|
|
|
+ <panel-3> panel-3 </panel-3>
|
|
|
|
|
|
<h3>toolbar-panel</h3>
|
|
|
<toolbar-panel title="toolbar-panel">
|
|
@@ -180,87 +176,150 @@
|
|
|
<percent-card-2 />
|
|
|
|
|
|
<h3>collapse-list</h3>
|
|
|
- <div style="width:200px">
|
|
|
+ <div style="width: 200px">
|
|
|
<collapse-list />
|
|
|
</div>
|
|
|
|
|
|
<h3>list</h3>
|
|
|
- <div style="width:200px">
|
|
|
+ <div style="width: 200px">
|
|
|
<list />
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
|
|
|
<!-- Table 组件 -->
|
|
|
- <el-scrollbar v-if="currTab == 3" style="height:85%;">
|
|
|
+ <el-scrollbar v-if="currTab == 3" style="height: 85%">
|
|
|
<h2>07-09更新</h2>
|
|
|
<h3>table-2</h3>
|
|
|
<h3>组件说明:</h3>
|
|
|
<p>与原组件使用方式基本相同 原table组件满足的情况下,不更换新组件也可以</p>
|
|
|
<p>新table支持原table所有特性,优化了props及column, 支持更多功能</p>
|
|
|
<p>现支持 文本省略及鼠标浮动显示</p>
|
|
|
- <p>* 原有template 及第三方标签实现方式更改 删除了column 中的 template、type及props</p>
|
|
|
+ <p>
|
|
|
+ * 原有template 及第三方标签实现方式更改 删除了column 中的
|
|
|
+ template、type及props
|
|
|
+ </p>
|
|
|
<h3>props说明:</h3>
|
|
|
- <p>height : string 高度 指定列表高度 自动判断是否显示滚动条, 不进行设置则为最大宽度且没有滚动条</p>
|
|
|
+ <p>
|
|
|
+ height : string 高度 指定列表高度 自动判断是否显示滚动条,
|
|
|
+ 不进行设置则为最大宽度且没有滚动条
|
|
|
+ </p>
|
|
|
<p>pageSize : number 分页个数 若不传 pagesize 不进行分页处理</p>
|
|
|
<p>@onPagging : method 分页回调</p>
|
|
|
<p>data : Object 数据源 { column: [] , data:[] , total: number }</p>
|
|
|
<h3>column说明:</h3>
|
|
|
<p>
|
|
|
- { name: "风机名称", field: "name", width:'', click:function(){ } ,sortable:fasle, slot:false, fixed:false, align:"center" }
|
|
|
+ { name: "风机名称", field: "name", width:'', click:function(){ }
|
|
|
+ ,sortable:fasle, slot:false, fixed:false, align:"center" }
|
|
|
</p>
|
|
|
<p>name : string 列名</p>
|
|
|
<p>field : string 对应数据项 同时使用于具名插槽的name值</p>
|
|
|
- <p>width : 列宽 可自定与每列宽度 如果想设置横向滚动条 需手动设置列宽 满足各列宽度和大于屏幕宽度</p>
|
|
|
+ <p>
|
|
|
+ width : 列宽 可自定与每列宽度 如果想设置横向滚动条 需手动设置列宽
|
|
|
+ 满足各列宽度和大于屏幕宽度
|
|
|
+ </p>
|
|
|
<p>click : 点击事件 与原有table相同</p>
|
|
|
<p>sortable : 排序</p>
|
|
|
- <p>slot: 开启插槽 为true时, 可在HTML中添加 插槽模板 添加自定义内容 为false时, 默认对应显示值, 示例参考代码中template</p>
|
|
|
+ <p>
|
|
|
+ slot: 开启插槽 为true时, 可在HTML中添加 插槽模板 添加自定义内容 为false时,
|
|
|
+ 默认对应显示值, 示例参考代码中template
|
|
|
+ </p>
|
|
|
<p>fixed: 固定列</p>
|
|
|
<p>align: 默认文本居中 left | center| right</p>
|
|
|
- <table-2 :data="tableData2" :height="'200px'" :pageSize="10" @onPagging="tableonPagging">
|
|
|
+ <table-2
|
|
|
+ :data="tableData2"
|
|
|
+ :height="'200px'"
|
|
|
+ :pageSize="10"
|
|
|
+ @onPagging="tableonPagging"
|
|
|
+ >
|
|
|
<!-- v-slot:[field] 对应列嵌入自定义内容 包括第三方标签 -->
|
|
|
<!-- 同时需要在 colum 中设置 slot:true -->
|
|
|
<!-- 如果只设置 slot:true 不写模板 列不存在内容 -->
|
|
|
<!-- scope 内容 scope.column 传入的 col 值, scope.row 数据值 -->
|
|
|
- <template v-slot:lqf="scope"> {{ scope.column.name }}:{{ scope.row.lqf }} </template>
|
|
|
+ <template v-slot:lqf="scope">
|
|
|
+ {{ scope.column.name }}:{{ scope.row.lqf }}
|
|
|
+ </template>
|
|
|
<template v-slot:action="scope">
|
|
|
- <a style="cursor:pointer;color:green;margin-right:8px;" @click="tableAction(scope)"> 点击查看组件点击事件返回信息 </a>
|
|
|
- <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}2 </a>
|
|
|
- <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}3 </a>
|
|
|
+ <a
|
|
|
+ style="cursor: pointer; color: green; margin-right: 8px"
|
|
|
+ @click="tableAction(scope)"
|
|
|
+ >
|
|
|
+ 点击查看组件点击事件返回信息
|
|
|
+ </a>
|
|
|
+ <a style="cursor: pointer; color: green; margin-right: 8px">
|
|
|
+ {{ scope.column.name }}2
|
|
|
+ </a>
|
|
|
+ <a style="cursor: pointer; color: green; margin-right: 8px">
|
|
|
+ {{ scope.column.name }}3
|
|
|
+ </a>
|
|
|
</template>
|
|
|
</table-2>
|
|
|
|
|
|
<h3>table</h3>
|
|
|
- <Table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging"
|
|
|
-
|
|
|
- />
|
|
|
+ <Table
|
|
|
+ :data="tableData"
|
|
|
+ :height="'200px'"
|
|
|
+ :canScroll="true"
|
|
|
+ :pageSize="40"
|
|
|
+ :showHover="false"
|
|
|
+ @onPagging="tableonPagging"
|
|
|
+ />
|
|
|
<h3>table</h3>
|
|
|
- <check-table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" @check="CheckTableonCheck" />
|
|
|
+ <check-table
|
|
|
+ :data="tableData"
|
|
|
+ :height="'200px'"
|
|
|
+ :canScroll="true"
|
|
|
+ :pageSize="40"
|
|
|
+ :showHover="false"
|
|
|
+ @onPagging="tableonPagging"
|
|
|
+ @check="CheckTableonCheck"
|
|
|
+ />
|
|
|
|
|
|
<h3>el-table</h3>
|
|
|
- <el-table class="custom-table" :data="eltableData" max-height="200" stripe style="width: 100%" border="false">
|
|
|
+ <el-table
|
|
|
+ class="custom-table"
|
|
|
+ :data="eltableData"
|
|
|
+ max-height="200"
|
|
|
+ stripe
|
|
|
+ style="width: 100%"
|
|
|
+ border="false"
|
|
|
+ >
|
|
|
<el-table-column prop="date" label="日期" width="150"> </el-table-column>
|
|
|
<el-table-column label="配送信息">
|
|
|
- <el-table-column prop="name" label="姓名" width="120"> </el-table-column>
|
|
|
+ <el-table-column prop="name" label="姓名" width="120">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="地址">
|
|
|
- <el-table-column prop="province" label="省份" width="120"> </el-table-column>
|
|
|
- <el-table-column prop="city" label="市区" width="120"> </el-table-column>
|
|
|
+ <el-table-column prop="province" label="省份" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="city" label="市区" width="120">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="地址"> </el-table-column>
|
|
|
- <el-table-column prop="zip" label="邮编" width="120"> </el-table-column>
|
|
|
+ <el-table-column prop="zip" label="邮编" width="120">
|
|
|
+ </el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<div>
|
|
|
- <el-table class="custom-table" :data="treeTableData" style="width: 100%;margin-bottom: 20px;" row-key="id" border default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
|
|
- <el-table-column prop="date" label="日期" sortable width="180"> </el-table-column>
|
|
|
- <el-table-column prop="name" label="姓名" sortable width="180"> </el-table-column>
|
|
|
+ <el-table
|
|
|
+ class="custom-table"
|
|
|
+ :data="treeTableData"
|
|
|
+ style="width: 100%; margin-bottom: 20px"
|
|
|
+ row-key="id"
|
|
|
+ border
|
|
|
+ default-expand-all
|
|
|
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
+ >
|
|
|
+ <el-table-column prop="date" label="日期" sortable width="180">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="姓名" sortable width="180">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="address" label="地址"> </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
|
|
|
<!-- icon -->
|
|
|
- <el-scrollbar v-if="currTab == 4" style="height:85%;">
|
|
|
+ <el-scrollbar v-if="currTab == 4" style="height: 85%">
|
|
|
<i class="svg-icon svg-icon-sm mg-r-16">
|
|
|
<svg-icon :svgid="'svg-wind-site'" />
|
|
|
</i>
|
|
@@ -274,15 +333,62 @@
|
|
|
|
|
|
<!-- el-compoments -->
|
|
|
|
|
|
- <el-scrollbar v-if="currTab == 5" style="height:85%;">
|
|
|
- <el-button type="text" @click="dialogTableVisible = true">打开 Dialog</el-button>
|
|
|
- <el-tree :data="elTreeData.data" :props="elTreeData.defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ <el-scrollbar v-if="currTab == 5" style="height: 85%">
|
|
|
+ <el-button type="text" @click="dialogTableVisible = true"
|
|
|
+ >打开 Dialog</el-button
|
|
|
+ >
|
|
|
+ <el-tree
|
|
|
+ :data="elTreeData.data"
|
|
|
+ :props="elTreeData.defaultProps"
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ ></el-tree>
|
|
|
|
|
|
- <el-cascader :options="cascader.options" :props="cascader.props" clearable></el-cascader>
|
|
|
+ <el-cascader
|
|
|
+ :options="cascader.options"
|
|
|
+ :props="cascader.props"
|
|
|
+ clearable
|
|
|
+ ></el-cascader>
|
|
|
</el-scrollbar>
|
|
|
|
|
|
+ <!-- 表格合并 -->
|
|
|
+
|
|
|
+ <div v-if="currTab == 6" style="height: 70%">
|
|
|
+ <el-button type="text" @click="()=>{ tableMergeStyleShow = !tableMergeStyleShow; BASE.showMsg({type:'success',msg:'表格样式已切换'}); }">切换表格样式</el-button>
|
|
|
+ <el-button type="text" @click="()=>{ BASE.showMsg({type:'success',msg:'数据已刷新'}); createMergeTable(createSum); }">刷新表格数据</el-button>
|
|
|
+ <el-button type="text" @click="()=>{ createSum = !createSum; BASE.showMsg({type:createSum ? 'success' : 'warning',msg:`合计行已${createSum ? '显示' : '隐藏'}`}); createMergeTable(createSum); }">{{createSum ? "隐藏" : "显示"}}表格合计</el-button>
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ height="100%"
|
|
|
+ :class="tableMergeStyleShow ? 'custom-table' : ''"
|
|
|
+ :data="tableMergeData"
|
|
|
+ :span-method="tableMergeArraySpanMethod"
|
|
|
+ :show-summary="createSum"
|
|
|
+ :summary-method="tableMergeDataSumMethod"
|
|
|
+ sum-text="总计"
|
|
|
+ >
|
|
|
+ <el-table-column prop="fpName" label="名称" width="150" />
|
|
|
+ <el-table-column prop="sd" label="时段" align="center" />
|
|
|
+ <el-table-column label="时间">
|
|
|
+ <el-table-column prop="sj1" label="2020-02-01" align="center" />
|
|
|
+ <el-table-column prop="sj2" label="2020-02-02" align="center" />
|
|
|
+ <el-table-column prop="sj3" label="2020-02-03" align="center" />
|
|
|
+ <el-table-column prop="sj4" label="2020-02-04" align="center" />
|
|
|
+ <el-table-column prop="sj5" label="2020-02-05" align="center" />
|
|
|
+ <el-table-column prop="sj6" label="2020-02-06" align="center" />
|
|
|
+ <el-table-column prop="sj7" label="2020-02-07" align="center" />
|
|
|
+ <el-table-column prop="sj8" label="2020-02-08" align="center" />
|
|
|
+ <el-table-column prop="sj9" label="2020-02-09" align="center" />
|
|
|
+ <el-table-column prop="sj10" label="2020-02-10" align="center" />
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
<el-dialog custom-class="modal" title="收货地址" v-model="dialogTableVisible">
|
|
|
- <el-tree :data="elTreeData.data" :props="elTreeData.defaultProps" @node-click="handleNodeClick"></el-tree>
|
|
|
+ <el-tree
|
|
|
+ :data="elTreeData.data"
|
|
|
+ :props="elTreeData.defaultProps"
|
|
|
+ @node-click="handleNodeClick"
|
|
|
+ ></el-tree>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
@@ -383,7 +489,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
select(data) {
|
|
|
- // console.log(data);
|
|
|
this.currTab = parseInt(data.id);
|
|
|
},
|
|
|
btnGroupDoubleSelect(param) {
|
|
@@ -420,7 +525,9 @@ export default {
|
|
|
];
|
|
|
let index = 0;
|
|
|
for (let i = param.start; i < param.end; i++) {
|
|
|
- this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
|
+ this.tableData.data.push(
|
|
|
+ JSON.parse(JSON.stringify(this.tableData.data[0]))
|
|
|
+ );
|
|
|
this.tableData.data[index].index = i + 1;
|
|
|
index++;
|
|
|
}
|
|
@@ -435,6 +542,127 @@ export default {
|
|
|
tableAction(param) {
|
|
|
console.log(param);
|
|
|
},
|
|
|
+ createMergeTable(createSum = false) {
|
|
|
+ let tableMergeData = [];
|
|
|
+
|
|
|
+ let tableNum = this.BASE.randomNum(30, 50);
|
|
|
+
|
|
|
+ const sd = [{ title: "上午" }, { title: "中午" }, { title: "下午" }];
|
|
|
+
|
|
|
+ let hjFlg = false;
|
|
|
+ let cellSumIdx = 0;
|
|
|
+ for (let i = 0; i < tableNum; i++) {
|
|
|
+ const sdNum = this.BASE.randomNum(0, 3);
|
|
|
+ hjFlg = sdNum > 0 ? true : false;
|
|
|
+ const fpName = this.BASE.randomNum(0, 1)
|
|
|
+ ? `风电场 - (${this.BASE.randomNum(1000, 99999)})`
|
|
|
+ : `光伏电站 - (${this.BASE.randomNum(1000, 99999)})`;
|
|
|
+ for (let j = 0; j < sdNum; j++) {
|
|
|
+ tableMergeData.push({
|
|
|
+ fpName,
|
|
|
+ sd: sd[j].title,
|
|
|
+ sj1: this.BASE.randomNum(1, 9999),
|
|
|
+ sj2: this.BASE.randomNum(1, 9999),
|
|
|
+ sj3: this.BASE.randomNum(1, 9999),
|
|
|
+ sj4: this.BASE.randomNum(1, 9999),
|
|
|
+ sj5: this.BASE.randomNum(1, 9999),
|
|
|
+ sj6: this.BASE.randomNum(1, 9999),
|
|
|
+ sj7: this.BASE.randomNum(1, 9999),
|
|
|
+ sj8: this.BASE.randomNum(1, 9999),
|
|
|
+ sj9: this.BASE.randomNum(1, 9999),
|
|
|
+ sj10: this.BASE.randomNum(1, 9999),
|
|
|
+ cellArray: j ? [j, 0] : [sdNum + (createSum ? 1 : 0), 1],
|
|
|
+ cellIndex: j,
|
|
|
+ cellSumIdx,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (hjFlg && createSum) {
|
|
|
+ let sj1 = 0;
|
|
|
+ let sj2 = 0;
|
|
|
+ let sj3 = 0;
|
|
|
+ let sj4 = 0;
|
|
|
+ let sj5 = 0;
|
|
|
+ let sj6 = 0;
|
|
|
+ let sj7 = 0;
|
|
|
+ let sj8 = 0;
|
|
|
+ let sj9 = 0;
|
|
|
+ let sj10 = 0;
|
|
|
+ tableMergeData.forEach((ele) => {
|
|
|
+ if (cellSumIdx === ele.cellSumIdx) {
|
|
|
+ sj1 += ele.sj1;
|
|
|
+ sj2 += ele.sj2;
|
|
|
+ sj3 += ele.sj3;
|
|
|
+ sj4 += ele.sj4;
|
|
|
+ sj5 += ele.sj5;
|
|
|
+ sj6 += ele.sj6;
|
|
|
+ sj7 += ele.sj7;
|
|
|
+ sj8 += ele.sj8;
|
|
|
+ sj9 += ele.sj9;
|
|
|
+ sj10 += ele.sj10;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ tableMergeData.push({
|
|
|
+ fpName,
|
|
|
+ sd: "合计",
|
|
|
+ sj1,
|
|
|
+ sj2,
|
|
|
+ sj3,
|
|
|
+ sj4,
|
|
|
+ sj5,
|
|
|
+ sj6,
|
|
|
+ sj7,
|
|
|
+ sj8,
|
|
|
+ sj9,
|
|
|
+ sj10,
|
|
|
+ cellArray: [0, 0],
|
|
|
+ cellIndex: -1,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ cellSumIdx++;
|
|
|
+ }
|
|
|
+ this.tableMergeData = tableMergeData;
|
|
|
+ },
|
|
|
+ tableMergeArraySpanMethod(row) {
|
|
|
+ if (!row.columnIndex) {
|
|
|
+ if (row.row.cellArray[0]) {
|
|
|
+ return row.row.cellArray;
|
|
|
+ } else if (
|
|
|
+ row.row.cellArray[0] &&
|
|
|
+ row.rowIndex & (row.row.cellArray[0] === row.row.cellIndex)
|
|
|
+ ) {
|
|
|
+ return [0, 0];
|
|
|
+ } else if (row.row.cellIndex === -1) {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tableMergeDataSumMethod() {
|
|
|
+ let sj1 = 0;
|
|
|
+ let sj2 = 0;
|
|
|
+ let sj3 = 0;
|
|
|
+ let sj4 = 0;
|
|
|
+ let sj5 = 0;
|
|
|
+ let sj6 = 0;
|
|
|
+ let sj7 = 0;
|
|
|
+ let sj8 = 0;
|
|
|
+ let sj9 = 0;
|
|
|
+ let sj10 = 0;
|
|
|
+ this.tableMergeData.forEach((ele) => {
|
|
|
+ if (ele.cellIndex !== -1) {
|
|
|
+ sj1 += ele.sj1;
|
|
|
+ sj2 += ele.sj2;
|
|
|
+ sj3 += ele.sj3;
|
|
|
+ sj4 += ele.sj4;
|
|
|
+ sj5 += ele.sj5;
|
|
|
+ sj6 += ele.sj6;
|
|
|
+ sj7 += ele.sj7;
|
|
|
+ sj8 += ele.sj8;
|
|
|
+ sj9 += ele.sj9;
|
|
|
+ sj10 += ele.sj10;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return ["总计", "", sj1, sj2, sj3, sj4, sj5, sj6, sj7, sj8, sj9, sj10];
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -460,6 +688,10 @@ export default {
|
|
|
id: "5",
|
|
|
text: "element 组件",
|
|
|
},
|
|
|
+ {
|
|
|
+ id: "6",
|
|
|
+ text: "表格合并",
|
|
|
+ },
|
|
|
],
|
|
|
tableData: {
|
|
|
column: [
|
|
@@ -475,7 +707,7 @@ export default {
|
|
|
field: "name",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
- click: function(event, data) {
|
|
|
+ click: function (event, data) {
|
|
|
console.log(event);
|
|
|
console.log(data);
|
|
|
},
|
|
@@ -576,7 +808,7 @@ export default {
|
|
|
name: "名称",
|
|
|
field: "name",
|
|
|
width: 200,
|
|
|
- click: function(event, data) {
|
|
|
+ click: function (event, data) {
|
|
|
console.log(event);
|
|
|
console.log(data);
|
|
|
},
|
|
@@ -668,7 +900,17 @@ export default {
|
|
|
},
|
|
|
// 柱状图:horizontal-bar-chart data
|
|
|
HorizontalBarChart: {
|
|
|
- area: ["新荣区", "平城区", "云冈区", "云州区", "阳高县", "天镇县", "广灵县", "浑源县", "左云县"],
|
|
|
+ area: [
|
|
|
+ "新荣区",
|
|
|
+ "平城区",
|
|
|
+ "云冈区",
|
|
|
+ "云州区",
|
|
|
+ "阳高县",
|
|
|
+ "天镇县",
|
|
|
+ "广灵县",
|
|
|
+ "浑源县",
|
|
|
+ "左云县",
|
|
|
+ ],
|
|
|
legend: ["因病", "因残", "因学", "因灾", "缺土地", "缺水"],
|
|
|
data: [
|
|
|
[1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
|
|
@@ -1359,8 +1601,15 @@ export default {
|
|
|
yTitle: "功率",
|
|
|
legends: [],
|
|
|
data: [
|
|
|
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
|
|
|
- [0, 0, 0, 93.67, 98.38, 165, 295.84, 471.84, 648.28, 871.72, 1124.84, 1296.42, 1448.63, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548],
|
|
|
+ [
|
|
|
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
|
|
+ 19, 20, 21, 22, 23, 24, 25,
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 0, 0, 0, 93.67, 98.38, 165, 295.84, 471.84, 648.28, 871.72,
|
|
|
+ 1124.84, 1296.42, 1448.63, 1548, 1548, 1548, 1548, 1548, 1548,
|
|
|
+ 1548, 1548, 1548, 1548, 1548, 1548, 1548,
|
|
|
+ ],
|
|
|
],
|
|
|
},
|
|
|
},
|
|
@@ -2593,17 +2842,25 @@ export default {
|
|
|
address: "上海市普陀区金沙江路 1516 弄",
|
|
|
},
|
|
|
],
|
|
|
+ tableMergeData: [],
|
|
|
+ createSum: false,
|
|
|
+ tableMergeStyleShow:true,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
for (let i = 1; i < 21; i++) {
|
|
|
- this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
|
+ this.tableData.data.push(
|
|
|
+ JSON.parse(JSON.stringify(this.tableData.data[0]))
|
|
|
+ );
|
|
|
this.tableData.data[i].index = i + 1;
|
|
|
|
|
|
- this.tableData2.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
|
|
|
+ this.tableData2.data.push(
|
|
|
+ JSON.parse(JSON.stringify(this.tableData.data[0]))
|
|
|
+ );
|
|
|
this.tableData2.data[i].index = i + 1;
|
|
|
this.tableData2.data[i].yyy = i * 0.01 * Math.random();
|
|
|
}
|
|
|
+ this.createMergeTable(this.createSum);
|
|
|
},
|
|
|
mounted() {},
|
|
|
};
|