Commit 42f90057 authored by liwei's avatar liwei

liwei

parent 766a2373
......@@ -212,6 +212,7 @@ export default {
teacher_id: "",
periods_title: ""
},
propertyList: [],
watchList: [
{ id: 0, title: 5 },
{ id: 1, title: 6 },
......@@ -220,6 +221,12 @@ export default {
]
};
},
watch: {
propertyList() {
console.log("test======", this.list);
}
},
components: { page },
methods: {
exportDataTable() {
......@@ -246,37 +253,46 @@ export default {
if (this.searchFrom.watch_num) {
json.watch_num = this.searchFrom.watch_num;
}
console.log("json======", json);
exportExcelApi("/api/admin/channel/class/list/export", json);
},
objectSpanMethod(data) {
if (this.propertyList.indexOf(data.column.property) > -1) {
if (
data.rowIndex === 0 ||
data.row.cur_date !== this.list[data.rowIndex - 1].cur_date
) {
let rowspan = 1;
for (let i = data.rowIndex + 1; i < this.list.length; i++) {
if (data.row.cur_date === this.list[i].cur_date) {
rowspan++;
} else {
break;
}
}
return {
rowspan: rowspan,
colspan: 1
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
} else {
// if (this.propertyList.indexOf(data.column.property) > -1) {
// if (
// data.rowIndex === 0 ||
// data.row.cur_date !== this.list[data.rowIndex - 1].cur_date
// ) {
// let rowspan = 1;
// for (let i = data.rowIndex + 1; i < this.list.length; i++) {
// if (data.row.cur_date === this.list[i].cur_date) {
// rowspan++;
// } else {
// break;
// }
// }
// return {
// rowspan: rowspan,
// colspan: 1
// };
// } else {
// return {
// rowspan: 0,
// colspan: 0
// };
// }
// } 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 {
rowspan: 1,
colspan: 1
rowspan: _row, //合并的行数
colspan: _col //合并的列数
};
}
},
......@@ -404,6 +420,7 @@ export default {
if (res) {
if (res.list && res.list.length > 0) {
this.total = res.total;
this.list = [];
this.list = res.list.map((item, index) => {
item.index = index;
if (index == 0) {
......
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