Explorar o código

update 短信通知

warrior hai 7 meses
pai
achega
24d8fcc8d5

+ 1 - 1
projects/textbook/src/app/textbook/textbook.component.html

@@ -513,7 +513,7 @@
 </div>
 <!-- 全选操作:批量操作 -->
 @if (filterObj.isCheck && setOfCheckedId.size) {
-<div class="batch-toolbar-modal">
+<div class="batch-toolbar-modal" [style.left]="'calc(50% - '+ calc+'px)'">
   <div class="batch-toolbar">
     <div class="styles_counter__18S08">
       <span>已选</span>

+ 2 - 1
projects/textbook/src/app/textbook/textbook.component.scss

@@ -26,7 +26,8 @@
   display: flex;
   justify-content: center;
   bottom: 80px;
-  left: calc(50% - 134px);
+  // left: calc(50% - 134px);
+  left: calc(50% - 328px);
   -webkit-transform: translate(0);
   transform: translate(0);
 }

+ 13 - 6
projects/textbook/src/app/textbook/textbook.component.ts

@@ -149,7 +149,7 @@ export class TextbookComponent implements OnInit {
   setOfCheckedId = new Set<string>();
   searchValue: string = '';
   manage: boolean = false;
-
+  calc:number = 120
   constructor(
     public tbookSer: textbookServer,
     private route: Router,
@@ -161,8 +161,9 @@ export class TextbookComponent implements OnInit {
   ngOnInit() {
     this.activeRoute.paramMap.subscribe(async (params) => {
       // this.eduProcessId = params.get('id');
+      this.calc += Object.values(this.filterObj?.btns).length * 70
       this.getTextbook();
-      if (Object.values(this.filterObj.btns).some((item) => item)) {
+      if (Object.values(this.filterObj?.btns).some((item) => item)) {
         this.manage = true;
       }
       if (this.filterObj.showMore) {
@@ -579,10 +580,16 @@ export class TextbookComponent implements OnInit {
   }
   //导出
   async exportProcess(data?: Parse.Object) {
-    let processId = await this.getEduProcess(
-      this.tbookSer.profile.user?.department?.objectId
-    );
-    Parse.Cloud.run('tbookExportReport', { processId: processId }).then(
+    let bookList: Array<string> = []
+    if(data?.id){
+      bookList = [data?.id]
+    }else{
+      bookList = Array.from(this.setOfCheckedId)
+    }
+    // let processId = await this.getEduProcess(
+    //   this.tbookSer.profile.user?.department?.objectId
+    // );
+    Parse.Cloud.run('tbookExportReport', { bookList: bookList }).then(
       (data) => {
         console.log(data);
         let url = data.zipUrl;

+ 3 - 0
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -261,6 +261,9 @@ export class AccountInfoComponent implements OnInit {
         nzOnOk: () =>
           this.router.navigate(['/user/login'], { replaceUrl: true }),
       });
+      Parse.Cloud.run('aliSmsSend',{
+        "mobileList": [params.phone],"templateCode":"SMS_469060724","params":{},"signName":"普通高等教育教材网"
+      })
     } catch (err: any) {
       this.loading = false
       console.log(err?.message);

+ 3 - 0
projects/textbook/src/modules/nav-admin/page-role/page-role.component.ts

@@ -553,6 +553,9 @@ export class PageRoleComponent implements OnInit {
       this.isLoadingOne = false
       this.accountIsVisible = false;
       this.account = null;
+      Parse.Cloud.run('aliSmsSend',{
+        "mobileList": [this.account?.phone],"templateCode":"SMS_469060724","params":{},"signName":"普通高等教育教材网"
+      })
       this.modal.success({
         nzTitle: '添加成功',
         nzContent: '',

+ 6 - 0
projects/textbook/src/modules/nav-admin/page-user/page-user.component.ts

@@ -238,6 +238,9 @@ export class PageUserComponent implements OnInit {
           switch (type) {
             case '通过认证':
               r?.set('accountState', '已认证');
+              Parse.Cloud.run('aliSmsSend',{
+                "mobileList": [data?.get('user')?.get('phone')],"templateCode":"SMS_468870790","params":{},"signName":"普通高等教育教材网"
+              })
               await r?.save();
               break;
             case '禁用':
@@ -477,6 +480,9 @@ export class PageUserComponent implements OnInit {
       this.isLoadingOne = false
       this.accountIsVisible = false;
       this.account = null;
+      Parse.Cloud.run('aliSmsSend',{
+        "mobileList": [this.account?.phone],"templateCode":"SMS_469060724","params":{},"signName":"普通高等教育教材网"
+      })
       this.modal.success({
         nzTitle: '添加成功',
         nzContent: '',

+ 3 - 0
projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.ts

@@ -104,6 +104,9 @@ export class UserEditComponent implements OnInit {
     switch (type) {
       case '已认证':
         this.user.set('accountState', '已认证');
+        Parse.Cloud.run('aliSmsSend',{
+          "mobileList": [this.user?.get('phone')],"templateCode":"SMS_468870790","params":{},"signName":"普通高等教育教材网"
+        })
         break;
       case '已禁用':
         this.user.set('accountState', '已禁用');

+ 3 - 0
projects/textbook/src/modules/nav-province-contact/page-role/page-role.component.ts

@@ -590,6 +590,9 @@ export class PageRoleComponent implements OnInit {
       this.isLoadingOne = false
       this.accountIsVisible = false;
       this.account = null;
+      Parse.Cloud.run('aliSmsSend',{
+        "mobileList": [this.account?.phone],"templateCode":"SMS_469060724","params":{},"signName":"普通高等教育教材网"
+      })
       this.modal.success({
         nzTitle: '添加成功',
         nzContent: '',