From 4df0471b7dff0494625ff09969b1a13b5359a26e Mon Sep 17 00:00:00 2001
From: XingChuan <m17600301067@163.com>
Date: 星期一, 31 五月 2021 22:41:47 +0800
Subject: [PATCH] 统计表弹框UI优化;增加点击企业名称缩放至企业;二级表展示功能优化。
---
src/components/table/components/WasteSolid.vue | 48 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/src/components/table/components/WasteSolid.vue b/src/components/table/components/WasteSolid.vue
index 4b24e07..4c46ab8 100644
--- a/src/components/table/components/WasteSolid.vue
+++ b/src/components/table/components/WasteSolid.vue
@@ -1,5 +1,5 @@
<template>
- <div class="waste-water">
+ <div class="waste-solid">
<el-table
class="tableBox"
:data="tableData"
@@ -20,8 +20,7 @@
:disabled="!isShowIcon"
popper-class="popovers">
<ChemicalWastewater v-show="$index ===1"></ChemicalWastewater>
- <i class="el-icon-caret-right" :class="{active: isActive === $index}" slot="reference"
- @click="doIcon($index)"></i>
+ <i class="el-icon-caret-right showBottomTableBtn" @click="showBottomTable" slot="reference"></i>
<!-- <i class="el-icon-caret-bottom" slot="reference" v-else @click="doIcon($index)"></i>-->
</el-popover>
</template>
@@ -29,10 +28,8 @@
<el-table-column label="搴忓彿" width="45px" type="index">
</el-table-column>
<el-table-column prop="UserName" label="浼佷笟鍚嶇О" width="120px">
- <template slot-scope="scope">
- <div v-if="scope.row.UserName==='闆嗗洟鍚嶇О'" style="color: #00ffff">{{ scope.row.UserName }}</div>
- <div v-else-if="scope.row.UserName==='澶╂触鐭冲寲'" style="color: #00ffff">{{ scope.row.UserName }}</div>
- <div v-else>{{ scope.row.UserName }}</div>
+ <template slot-scope="{row}">
+ <u @click="searchNameToPosition" style="cursor: pointer">{{row.UserName}}</u>
</template>
</el-table-column>
<el-table-column prop="WasteWaters" width="100px">
@@ -93,6 +90,11 @@
MissingAlarm,
Refinery,
ChemicalWastewater
+ },
+ props: {
+ searchNameToPosition: {
+ type: Function
+ }
},
data () {
return {
@@ -160,7 +162,7 @@
},
// 琛ㄥご鏍峰紡璁剧疆
rowClass () {
- // return 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
+ return 'height:.3rem'
},
// 鑾峰彇鐐瑰嚮鐨勮〃鏍�
handle (row, column, event, cell) {
@@ -178,6 +180,19 @@
return
}
this.isActive = index
+ },
+ showBottomTable (e) {
+ if (e.path[0].classList.contains('go') === true) {
+ e.path[0].classList.remove('go')
+ e.path[0].classList.add('aa')
+ } else {
+ const newList = document.querySelectorAll('i.showBottomTableBtn')
+ for (let i = 0; i < newList.length; i++) {
+ newList[i].classList.remove('go')
+ }
+ e.path[0].classList.remove('aa')
+ e.path[0].classList.add('go')
+ }
}
}
}
@@ -197,5 +212,20 @@
/*color: red;*/
transform: rotate(90deg);
}
-
+.waste-solid{
+ .el-icon-caret-right{
+ position: absolute;
+ top: .11rem;
+ left: .04rem;
+ font-size: .14rem;
+ cursor: pointer;
+ }
+}
+.aa{
+ transition: all .2s;
+}
+.go{
+ transform:rotate(90deg);
+ transition: all .2s;
+}
</style>
--
Gitblit v1.8.0