Commit 93af9799 authored by WBY1026's avatar WBY1026

增加统计行,增加新的弹出窗口,修复bug

parent cb99fae1
......@@ -94,8 +94,9 @@
<div class="list" v-show="haveInfo">
<el-table :data="mytableList" v-loading="loading" @cell-click="cellClick">
<div class="list" v-show="this.haveInfo">
<el-table :data="mytableList" v-loading="loading" show-summary :summary-method="getMainListSummaries"
@cell-click="cellClick">
<el-table-column fixed label="用户" prop="ccc" width="100px"></el-table-column>
<!-- 月 -->
<el-table-column v-for="(item1, index1) in dateColData" width="360px" :key="index1" align="center" prop=""
......@@ -119,14 +120,12 @@
</div>
<div v-show="!haveInfo" style=" width: 100%;height: 300px; display: flex;" >
<div v-if="!this.haveInfo" style=" width: 100%;height: 300px; display: flex;">
<img style="margin: auto;" src='./404.png' alt='暂无数据,稍后重试' />
</div>
<!-- <button @click="test">2222</button> -->
<!-- 点击表单内容出现的表格 -->
......@@ -165,6 +164,29 @@
</el-dialog>
<!-- 点击用户信息出现的表格 -->
<el-dialog :visible.sync="userDialogTableVisible" title="用户详细信息">
<div>
<div>ccc: {{ this.clickccc }}</div>
<!-- 这几个对象如果空的说明您没选 -->
<p>这几个对象如果空的说明您没选</p>
<div>aaa: {{ this.lockaaa }}</div>
<div>bbb: {{ this.lockbbb }}</div>
<div>cccc: {{ this.lockcccc }}</div>
<div>ddd: {{ this.lockddd }}</div>
<div>dddd: {{ this.lockdddd }}</div>
<div>eee: {{ this.lockeee }}</div>
<!-- 下面的几个值是布尔值,直接显示不会出来,但是值都是能读到的 -->
<p>下面的几个值是布尔值,直接显示不会出来,但是值都是能读到的</p>
<div>fff: {{ this.lockfff }}</div>
<div>ggg: {{ this.lockggg }}</div>
<div>hhh: {{ this.lockhhh }}</div>
<div>iii: {{ this.lockiii }}</div>
<div>jjj: {{ this.lockjjj }}</div>
<div>kkk: {{ this.lockkkk }}</div>
</div>
</el-dialog>
......@@ -173,7 +195,7 @@
</template>
<script>
/* eslint-disable */
import { searchAaa, searchBbb, searchCcc, searchCccc, searchDdd, searchDddd, searchEee, searchTableList, getListTotal, getClickInformation, getClickInformationPageNum } from '@/api/demoData1.js'
......@@ -246,6 +268,9 @@ export default {
gridData: [],
dialogTempData: {},
clickKey: null,
// 点用户的弹窗
userDialogTableVisible: false,
clickccc: null
// ============================================
......@@ -382,6 +407,7 @@ export default {
}
});
console.log(this.haveInfo);
},
// 主页分页
......@@ -679,6 +705,15 @@ export default {
cellClick(row, column, cell, event) {
console.log("点用户格子会报错,因为用户格子不包含完整信息,可以自己加个判断慢慢改");
console.log("不影响使用");
// 判断是否点到用户了
// 点到用户展开特殊的面板
if (column.property == 'ccc') {
this.clickccc = row.ccc
this.userDialogTableVisible = true
}
// 正则匹配出末尾数字
let num = parseInt(column.property.match(/\d+$/))
// 获取日期
......@@ -694,6 +729,7 @@ export default {
this.clickKey = key
console.log('高亮赋值' + this.clickKey);
if (value) {
this.dialogTempData = {
aaa: this.lockaaa,
......@@ -740,6 +776,20 @@ export default {
},
// 主表的合计方法
getMainListSummaries(param){
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
}else{
sums[index] = 'xxx'
}
});
return sums
},
// 高亮某一列
setCellColor({ row, column, rowIndex, columnIndex }) {
// console.log(column.property);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment