Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
93af9799
Commit
93af9799
authored
Apr 18, 2024
by
WBY1026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加统计行,增加新的弹出窗口,修复bug
parent
cb99fae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
6 deletions
+56
-6
demoData1.vue
src/views/demoData/demoData1.vue
+56
-6
No files found.
src/views/demoData/demoData1.vue
View file @
93af9799
...
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment