Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
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
new-sing
admin-base
Commits
42f90057
Commit
42f90057
authored
Jul 10, 2019
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
liwei
parent
766a2373
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
27 deletions
+44
-27
index.vue
src/components/channelTransList/index.vue
+44
-27
No files found.
src/components/channelTransList/index.vue
View file @
42f90057
...
@@ -212,6 +212,7 @@ export default {
...
@@ -212,6 +212,7 @@ export default {
teacher_id
:
""
,
teacher_id
:
""
,
periods_title
:
""
periods_title
:
""
},
},
propertyList
:
[],
watchList
:
[
watchList
:
[
{
id
:
0
,
title
:
5
},
{
id
:
0
,
title
:
5
},
{
id
:
1
,
title
:
6
},
{
id
:
1
,
title
:
6
},
...
@@ -220,6 +221,12 @@ export default {
...
@@ -220,6 +221,12 @@ export default {
]
]
};
};
},
},
watch
:
{
propertyList
()
{
console
.
log
(
"test======"
,
this
.
list
);
}
},
components
:
{
page
},
components
:
{
page
},
methods
:
{
methods
:
{
exportDataTable
()
{
exportDataTable
()
{
...
@@ -246,37 +253,46 @@ export default {
...
@@ -246,37 +253,46 @@ export default {
if
(
this
.
searchFrom
.
watch_num
)
{
if
(
this
.
searchFrom
.
watch_num
)
{
json
.
watch_num
=
this
.
searchFrom
.
watch_num
;
json
.
watch_num
=
this
.
searchFrom
.
watch_num
;
}
}
console
.
log
(
"json======"
,
json
);
exportExcelApi
(
"/api/admin/channel/class/list/export"
,
json
);
exportExcelApi
(
"/api/admin/channel/class/list/export"
,
json
);
},
},
objectSpanMethod
(
data
)
{
objectSpanMethod
(
data
)
{
if
(
this
.
propertyList
.
indexOf
(
data
.
column
.
property
)
>
-
1
)
{
// if (this.propertyList.indexOf(data.column.property) > -1) {
if
(
// if (
data
.
rowIndex
===
0
||
// data.rowIndex === 0 ||
data
.
row
.
cur_date
!==
this
.
list
[
data
.
rowIndex
-
1
].
cur_date
// data.row.cur_date !== this.list[data.rowIndex - 1].cur_date
)
{
// ) {
let
rowspan
=
1
;
// let rowspan = 1;
for
(
let
i
=
data
.
rowIndex
+
1
;
i
<
this
.
list
.
length
;
i
++
)
{
// for (let i = data.rowIndex + 1; i
<
this
.
list
.
length
;
i
++
)
{
if
(
data
.
row
.
cur_date
===
this
.
list
[
i
].
cur_date
)
{
// if (data.row.cur_date === this.list[i].cur_date) {
rowspan
++
;
// rowspan++;
}
else
{
// } else {
break
;
// break;
}
// }
}
// }
return
{
// return {
rowspan
:
rowspan
,
// rowspan: rowspan,
colspan
:
1
// colspan: 1
};
// };
}
else
{
// } else {
return
{
// return {
rowspan
:
0
,
// rowspan: 0,
colspan
:
0
// colspan: 0
};
// };
}
// }
}
else
{
// } else {
// return {
// rowspan: 1,
// colspan: 1
// };
// }
console
.
log
(
"====================="
,
data
);
if
(
data
.
columnIndex
===
0
)
{
//用于设置要合并的列
const
_row
=
this
.
spanArr
[
data
.
rowIndex
];
const
_col
=
_row
>
0
?
1
:
0
;
return
{
return
{
rowspan
:
1
,
rowspan
:
_row
,
//合并的行数
colspan
:
1
colspan
:
_col
//合并的列数
};
};
}
}
},
},
...
@@ -404,6 +420,7 @@ export default {
...
@@ -404,6 +420,7 @@ export default {
if
(
res
)
{
if
(
res
)
{
if
(
res
.
list
&&
res
.
list
.
length
>
0
)
{
if
(
res
.
list
&&
res
.
list
.
length
>
0
)
{
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
list
=
[];
this
.
list
=
res
.
list
.
map
((
item
,
index
)
=>
{
this
.
list
=
res
.
list
.
map
((
item
,
index
)
=>
{
item
.
index
=
index
;
item
.
index
=
index
;
if
(
index
==
0
)
{
if
(
index
==
0
)
{
...
...
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