|
@@ -143,7 +143,7 @@ export class shellServer {
|
|
`;
|
|
`;
|
|
|
|
|
|
let _body = '';
|
|
let _body = '';
|
|
- for (var row = 0; row < r.length; row++) {
|
|
|
|
|
|
+ for (let row = 0; row < r.length; row++) {
|
|
_body += '<tr>';
|
|
_body += '<tr>';
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
_body += ` ${r[row]?.get('user')?.get('phone') || ''}`;
|
|
_body += ` ${r[row]?.get('user')?.get('phone') || ''}`;
|
|
@@ -233,7 +233,7 @@ export class shellServer {
|
|
// `;
|
|
// `;
|
|
|
|
|
|
// let _body = '';
|
|
// let _body = '';
|
|
- // for (var row = 0; row < len; row++) {
|
|
|
|
|
|
+ // for (let row = 0; row < len; row++) {
|
|
// _body += '<tr>';
|
|
// _body += '<tr>';
|
|
// _body += '<td>';
|
|
// _body += '<td>';
|
|
// _body += `${a[row] || ''}`;
|
|
// _body += `${a[row] || ''}`;
|
|
@@ -299,7 +299,7 @@ export class shellServer {
|
|
`;
|
|
`;
|
|
|
|
|
|
let _body = '';
|
|
let _body = '';
|
|
- for (var row = 0; row < data.length; row++) {
|
|
|
|
|
|
+ for (let row = 0; row < data.length; row++) {
|
|
_body += '<tr>';
|
|
_body += '<tr>';
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
_body += `${data[row]?.get('title') || ''}`;
|
|
_body += `${data[row]?.get('title') || ''}`;
|
|
@@ -384,8 +384,8 @@ export class shellServer {
|
|
$inQuery: {
|
|
$inQuery: {
|
|
where: {
|
|
where: {
|
|
// editionUnit: unitName,
|
|
// editionUnit: unitName,
|
|
- collectStatus: { $ne: '200' },
|
|
|
|
- // collectStatus: '200',
|
|
|
|
|
|
+ // collectStatus: { $ne: '200' },
|
|
|
|
+ collectStatus: '200',
|
|
},
|
|
},
|
|
className: 'EduTextbookVolume',
|
|
className: 'EduTextbookVolume',
|
|
},
|
|
},
|
|
@@ -414,6 +414,12 @@ export class shellServer {
|
|
'childrens.editionNumber',
|
|
'childrens.editionNumber',
|
|
'childrens.printSum',
|
|
'childrens.printSum',
|
|
'childrens.importantProject',
|
|
'childrens.importantProject',
|
|
|
|
+
|
|
|
|
+ 'childrens.collectFiles',
|
|
|
|
+ 'childrens.collectLink',
|
|
|
|
+ 'childrens.collectDigitFiles',
|
|
|
|
+ 'childrens.collectCheck',
|
|
|
|
+
|
|
'user.department',
|
|
'user.department',
|
|
'department.branch',
|
|
'department.branch',
|
|
'code',
|
|
'code',
|
|
@@ -434,7 +440,7 @@ export class shellServer {
|
|
query.ascending('createdAt');
|
|
query.ascending('createdAt');
|
|
let count = await query.count();
|
|
let count = await query.count();
|
|
console.log(count);
|
|
console.log(count);
|
|
- query.limit(100);
|
|
|
|
|
|
+ query.limit(10000);
|
|
query.skip(0);
|
|
query.skip(0);
|
|
let data = await query.find();
|
|
let data = await query.find();
|
|
let table = `<table border="1px" cellspacing="0" cellpadding="0">
|
|
let table = `<table border="1px" cellspacing="0" cellpadding="0">
|
|
@@ -464,6 +470,12 @@ export class shellServer {
|
|
<th>适用专业代码(六位)及名称</th>
|
|
<th>适用专业代码(六位)及名称</th>
|
|
<th>申报状态</th>
|
|
<th>申报状态</th>
|
|
<th>源文件状态</th>
|
|
<th>源文件状态</th>
|
|
|
|
+
|
|
|
|
+ <th>纸质教材PDF名称</th>
|
|
|
|
+ <th>数字教材链接</th>
|
|
|
|
+ <th>链接和账号密码</th>
|
|
|
|
+ <th>数字教材文件名称</th>
|
|
|
|
+
|
|
</tr>
|
|
</tr>
|
|
</thead>
|
|
</thead>
|
|
<tbody>
|
|
<tbody>
|
|
@@ -482,7 +494,7 @@ export class shellServer {
|
|
// <tbody>
|
|
// <tbody>
|
|
// `;
|
|
// `;
|
|
let _body = '';
|
|
let _body = '';
|
|
- for (var row = 0; row < data.length; row++) {
|
|
|
|
|
|
+ for (let row = 0; row < data.length; row++) {
|
|
// console.log(data[row]?.get('user')?.get('department'));
|
|
// console.log(data[row]?.get('user')?.get('department'));
|
|
let inviteUnit = data[row]?.get('inviteUnit');
|
|
let inviteUnit = data[row]?.get('inviteUnit');
|
|
if (
|
|
if (
|
|
@@ -525,8 +537,8 @@ export class shellServer {
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
- // _body += ` ${data[row]?.get('inviteUnit') || ''}`;
|
|
|
|
- _body += ` ${inviteUnit || ''}`;
|
|
|
|
|
|
+ _body += ` ${data[row]?.get('inviteUnit') || ''}`;
|
|
|
|
+ // _body += ` ${inviteUnit || ''}`;
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
@@ -641,7 +653,35 @@ export class shellServer {
|
|
_body += `已报送`;
|
|
_body += `已报送`;
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
_body += '<td>';
|
|
_body += '<td>';
|
|
- _body += `待上传`;
|
|
|
|
|
|
+ _body += `已上传`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiledCollect(
|
|
|
|
+ data[row]?.get('childrens')
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiledCollect(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ '链接'
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiledCollect(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ '链接和账号密码'
|
|
|
|
+ )}`;
|
|
|
|
+ _body += '</td>';
|
|
|
|
+
|
|
|
|
+ _body += '<td>';
|
|
|
|
+ _body += `${this.fromatFiledCollect(
|
|
|
|
+ data[row]?.get('childrens'),
|
|
|
|
+ '上传文件'
|
|
|
|
+ )}`;
|
|
_body += '</td>';
|
|
_body += '</td>';
|
|
|
|
|
|
_body += '</tr>';
|
|
_body += '</tr>';
|
|
@@ -655,6 +695,41 @@ export class shellServer {
|
|
console.log(err);
|
|
console.log(err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /* 格式化拓展表字段教材文件 */
|
|
|
|
+ fromatFiledCollect(list: Array<Parse.Object>, radioValue?: string): string {
|
|
|
|
+ let arr: Array<string | null> = [];
|
|
|
|
+ // 监测空值
|
|
|
|
+ list?.forEach((item: Parse.Object) => {
|
|
|
|
+ if(radioValue){
|
|
|
|
+ switch (radioValue) {
|
|
|
|
+ case '链接':
|
|
|
|
+ item.get('collectCheck') == '链接' && arr.push('链接:' + item.get('collectLink').url);
|
|
|
|
+ break;
|
|
|
|
+ case '链接和账号密码':
|
|
|
|
+ item.get('collectCheck') == '链接和账号密码' && arr.push(`链接:lian${item.get('collectLink').url}
|
|
|
|
+ 账号:lian${item.get('collectLink').username}
|
|
|
|
+ 密码:lian${item.get('collectLink').password}
|
|
|
|
+ `);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ if(item.get('collectCheck') == '上传文件'){
|
|
|
|
+ let list:Array<string> = []
|
|
|
|
+ item.get('collectDigitFiles')?.forEach((i:any)=>list.push(i.name))
|
|
|
|
+ arr.push(...list);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ let list:Array<string> = []
|
|
|
|
+ item.get('collectFiles')?.forEach((i:any)=>list.push(i.name))
|
|
|
|
+ arr.push(...list);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ let j = Array.from(arr).join(',');
|
|
|
|
+ return j || '-';
|
|
|
|
+ }
|
|
|
|
+
|
|
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'>";
|
|
@@ -858,7 +933,7 @@ export class shellServer {
|
|
<tbody>
|
|
<tbody>
|
|
`;
|
|
`;
|
|
let _body = '';
|
|
let _body = '';
|
|
- for (var row = 0; row < data.length; row++) {
|
|
|
|
|
|
+ for (let row = 0; row < data.length; row++) {
|
|
_body += '<tr>';
|
|
_body += '<tr>';
|
|
|
|
|
|
_body += '<td>';
|
|
_body += '<td>';
|