|
@@ -657,9 +657,7 @@ export class shellServer {
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
- _body += `${this.fromatFiledCollect(
|
|
|
|
- data[row]?.get('childrens')
|
|
|
|
- )}`;
|
|
|
|
|
|
+ _body += `${this.fromatFiledCollect(data[row]?.get('childrens'))}`;
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
@@ -669,7 +667,6 @@ export class shellServer {
|
|
)}`;
|
|
)}`;
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
-
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
_body += `${this.fromatFiledCollect(
|
|
_body += `${this.fromatFiledCollect(
|
|
data[row]?.get('childrens'),
|
|
data[row]?.get('childrens'),
|
|
@@ -701,28 +698,32 @@ export class shellServer {
|
|
let arr: Array<string | null> = [];
|
|
let arr: Array<string | null> = [];
|
|
// 监测空值
|
|
// 监测空值
|
|
list?.forEach((item: Parse.Object) => {
|
|
list?.forEach((item: Parse.Object) => {
|
|
- if(radioValue){
|
|
|
|
|
|
+ if (radioValue) {
|
|
switch (radioValue) {
|
|
switch (radioValue) {
|
|
case '链接':
|
|
case '链接':
|
|
- item.get('collectCheck') == '链接' && arr.push('链接:' + item.get('collectLink').url);
|
|
|
|
|
|
+ item.get('collectCheck') == '链接' &&
|
|
|
|
+ arr.push('链接:' + item.get('collectLink').url);
|
|
break;
|
|
break;
|
|
case '链接和账号密码':
|
|
case '链接和账号密码':
|
|
- item.get('collectCheck') == '链接和账号密码' && arr.push(`链接:lian${item.get('collectLink').url}
|
|
|
|
|
|
+ item.get('collectCheck') == '链接和账号密码' &&
|
|
|
|
+ arr.push(`链接:lian${item.get('collectLink').url}
|
|
账号:lian${item.get('collectLink').username}
|
|
账号:lian${item.get('collectLink').username}
|
|
密码:lian${item.get('collectLink').password}
|
|
密码:lian${item.get('collectLink').password}
|
|
`);
|
|
`);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- if(item.get('collectCheck') == '上传文件'){
|
|
|
|
- let list:Array<string> = []
|
|
|
|
- item.get('collectDigitFiles')?.forEach((i:any)=>list.push(i.name))
|
|
|
|
|
|
+ if (item.get('collectCheck') == '上传文件') {
|
|
|
|
+ let list: Array<string> = [];
|
|
|
|
+ item
|
|
|
|
+ .get('collectDigitFiles')
|
|
|
|
+ ?.forEach((i: any) => list.push(i.name));
|
|
arr.push(...list);
|
|
arr.push(...list);
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- let list:Array<string> = []
|
|
|
|
- item.get('collectFiles')?.forEach((i:any)=>list.push(i.name))
|
|
|
|
|
|
+ } else {
|
|
|
|
+ let list: Array<string> = [];
|
|
|
|
+ item.get('collectFiles')?.forEach((i: any) => list.push(i.name));
|
|
arr.push(...list);
|
|
arr.push(...list);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -730,6 +731,195 @@ export class shellServer {
|
|
return j || '-';
|
|
return j || '-';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //导出所有流程申报表格
|
|
|
|
+ async exportEduProcess() {
|
|
|
|
+ try {
|
|
|
|
+ let queryProcs = new Parse.Query('EduProcess');
|
|
|
|
+ queryProcs.include('profileSubmitted', 'profileSubmitted.user');
|
|
|
|
+ queryProcs.select('name', 'profileSubmitted');
|
|
|
|
+ queryProcs.notEqualTo('branch','66865d66ad23a23355b12aa7')
|
|
|
|
+ queryProcs.notEqualTo('isDeleted',true)
|
|
|
|
+ queryProcs.limit(300)
|
|
|
|
+ let resEduProcess = await queryProcs.find();
|
|
|
|
+ for (let index = 0; index < resEduProcess.length; index++) {
|
|
|
|
+ const r = resEduProcess[index];
|
|
|
|
+ // let query = new Parse.Query('EduTextbook');
|
|
|
|
+ let query = new Parse.Query('EduTextbook');
|
|
|
|
+ query.notEqualTo('isDeleted', true);
|
|
|
|
+ query.notEqualTo('discard', true);
|
|
|
|
+ query.equalTo('eduProcess', r.id);
|
|
|
|
+ query.equalTo('render', true);
|
|
|
|
+ query.select(
|
|
|
|
+ 'title',
|
|
|
|
+ 'childrens.ISBN',
|
|
|
|
+ 'childrens.author',
|
|
|
|
+ 'childrens.unit',
|
|
|
|
+ 'childrens.printDate',
|
|
|
|
+ 'childrens.printNumber',
|
|
|
|
+ 'childrens.editionUnit',
|
|
|
|
+ 'childrens.carrierShape',
|
|
|
|
+ 'childrens.lang',
|
|
|
|
+ 'childrens.editionFirst',
|
|
|
|
+ 'childrens.editionDate',
|
|
|
|
+ 'childrens.editionNumber',
|
|
|
|
+ 'childrens.printSum',
|
|
|
|
+ 'childrens.importantProject',
|
|
|
|
+
|
|
|
|
+ 'childrens.collectFiles',
|
|
|
|
+ 'childrens.collectLink',
|
|
|
|
+ 'childrens.collectDigitFiles',
|
|
|
|
+ 'childrens.collectCheck',
|
|
|
|
+ 'typeNumber',
|
|
|
|
+ 'user.department',
|
|
|
|
+ 'department.branch',
|
|
|
|
+ 'code',
|
|
|
|
+ 'discipline',
|
|
|
|
+ 'majorPoniter',
|
|
|
|
+ 'approval',
|
|
|
|
+ 'inviteUnit',
|
|
|
|
+ // 'eduProcess.profileSubmitted',
|
|
|
|
+ // 'eduProcess.profileSubmitted.email',
|
|
|
|
+ // 'eduProcess.profileSubmitted.user.name',
|
|
|
|
+ // 'eduProcess.profileSubmitted.user.phone',
|
|
|
|
+ 'type',
|
|
|
|
+ 'major'
|
|
|
|
+ );
|
|
|
|
+ query.limit(500);
|
|
|
|
+ let data = await query.find();
|
|
|
|
+
|
|
|
|
+ let table = `<table border="1px" cellspacing="0" cellpadding="0">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th colspan="10" style="font-size: 20px;font-family: '黑体';">“十四五”普通高等教育本科国家级规划教材推荐汇总表</th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th>
|
|
|
|
+ <th style="font-size: 12px;font-family: '黑体';text-align: left;">单位名称(公章):</th>
|
|
|
|
+ <th colspan="3" style="font-size: 12px;font-family: '黑体';text-align: left;">${r?.get(
|
|
|
|
+ 'name'
|
|
|
|
+ )}</th>
|
|
|
|
+ <th></th><th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th>
|
|
|
|
+ <th style="font-size: 12px;font-family: '黑体';text-align: left;">申报工作联系人:</th>
|
|
|
|
+ <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">姓名 ${r
|
|
|
|
+ ?.get('profileSubmitted')
|
|
|
|
+ ?.get('user')
|
|
|
|
+ ?.get('name')}</th>
|
|
|
|
+ <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">电话 ${r
|
|
|
|
+ ?.get('profileSubmitted')
|
|
|
|
+ ?.get('user')
|
|
|
|
+ ?.get('phone')}</th>
|
|
|
|
+ <th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ <th></th><th></th><th></th><th></th><th></th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>序号</th>
|
|
|
|
+ <th>申报编号</th>
|
|
|
|
+ <th>申报教材名称</th>
|
|
|
|
+ <th>教材所属专业类</th>
|
|
|
|
+ <th>第一主编/作者</th>
|
|
|
|
+ <th>第一主编(作者)单位</th>
|
|
|
|
+ <th>申报类型</th>
|
|
|
|
+ <th>是否为重点建设教材</th>
|
|
|
|
+ <th>出版单位</th>
|
|
|
|
+ <th>初版时间</th>
|
|
|
|
+ <th>载体形式</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ `;
|
|
|
|
+ let _body = '';
|
|
|
|
+ for (let row = 0; row < data.length; row++) {
|
|
|
|
+ _body += '<tr>';
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${row + 1}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += ` ${data[row].get('code') || ''}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += ` ${data[row].get('title') || '-'}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += ` ${
|
|
|
|
+ (data[row].get('discipline')?.code || '') +
|
|
|
|
+ '/' +
|
|
|
|
+ (data[row]?.get('discipline')?.name || '')
|
|
|
|
+ }`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiled(data[row]?.get('childrens'), 'author')}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiled(data[row]?.get('childrens'), 'unit')}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${
|
|
|
|
+ data[row]?.get('type') == '单本'
|
|
|
|
+ ? '单本'
|
|
|
|
+ : '全册 - ' + data[row]?.get('typeNumber') || '-'
|
|
|
|
+ }`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${data[row]?.get('approval') || '-'}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiled(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ 'editionUnit'
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += ` ${this.fromatFiled(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ 'editionFirst'
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiled(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ 'carrierShape'
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '</tr>';
|
|
|
|
+ }
|
|
|
|
+ table += _body;
|
|
|
|
+ table += '</tbody>';
|
|
|
|
+ table += '</table>';
|
|
|
|
+ let title = r?.get('name')+' 推荐汇总表';
|
|
|
|
+ this.excel(table, `${title}.xls`);
|
|
|
|
+ }
|
|
|
|
+ } catch (err) {}
|
|
|
|
+ }
|
|
|
|
+
|
|
excel(data: any, filename: string) {
|
|
excel(data: any, filename: string) {
|
|
let html =
|
|
let html =
|
|
"<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>";
|
|
"<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'>";
|