|
@@ -97,19 +97,6 @@ export default {
|
|
|
...imports(['create']),
|
|
|
...schPlan(['update']),
|
|
|
...util(['fetch']),
|
|
|
- // 导出功能
|
|
|
- exportExcel() {
|
|
|
- /* generate workbook object from table */
|
|
|
- var wb = XLSX.utils.table_to_book(document.querySelector('#out-table'));
|
|
|
- /* get binary string as output */
|
|
|
- var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array' });
|
|
|
- try {
|
|
|
- FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), 'sheetjs.xlsx');
|
|
|
- } catch (e) {
|
|
|
- if (typeof console !== 'undefined') console.log(e, wbout);
|
|
|
- }
|
|
|
- return wbout;
|
|
|
- },
|
|
|
async search() {
|
|
|
const msg = this.$message({ message: '正在加载中', duration: 0 });
|
|
|
let tp = await this.getTrainplan(this.id);
|
|
@@ -182,9 +169,14 @@ export default {
|
|
|
const { termid, batchid } = i;
|
|
|
const r = await this.getStudent({ termid, batchid, schid: this.user.code, skip: 0, limit: 1 });
|
|
|
if (this.$checkRes(r)) {
|
|
|
- const { total } = r;
|
|
|
- console.log(total);
|
|
|
- i.is_upload = total > 0;
|
|
|
+ const { total, data } = r;
|
|
|
+ if (total > 0) {
|
|
|
+ const isChange = data.filter(f => f.classid || f.bedroomid);
|
|
|
+ if (isChange.length > 0) i.is_upload = true;
|
|
|
+ else i.is_upload = false;
|
|
|
+ } else {
|
|
|
+ i.is_upload = false;
|
|
|
+ }
|
|
|
} else {
|
|
|
i.is_upload = false;
|
|
|
}
|