Browse Source

短信及推送

1
mo 3 years ago
parent
commit
5b9fb58f3c

+ 9 - 0
src/views/childrensDay/api.js

@@ -22,3 +22,12 @@ export function getMusicGroupDetail(data) {
     params: data
     params: data
   })
   })
 }
 }
+
+// 发送短信
+export function sendMsgList(data) {
+  return request2({
+    url: api + '/childrenReserve/sendMsg',
+    method: 'post',
+    data
+  })
+}

+ 3 - 3
src/views/childrensDay/detail.vue

@@ -148,7 +148,7 @@
           <el-table-column
           <el-table-column
             align="center"
             align="center"
             prop="subjectName"
             prop="subjectName"
-            label="学员声部"
+            label="报考声部"
           ></el-table-column>
           ></el-table-column>
           <el-table-column align="center" prop="isReserve" label="是否预约">
           <el-table-column align="center" prop="isReserve" label="是否预约">
             <template slot-scope="scope">
             <template slot-scope="scope">
@@ -157,7 +157,7 @@
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column align="center" prop="studentId" label="报考乐等级">
+          <el-table-column align="center" prop="studentId" label="报考乐等级">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
                 {{ scope.row.gradeLeave ? scope.row.gradeLeave + "级" : "-" }}
                 {{ scope.row.gradeLeave ? scope.row.gradeLeave + "级" : "-" }}
@@ -167,7 +167,7 @@
           <el-table-column align="center" prop="studentId" label="乐理报考等级">
           <el-table-column align="center" prop="studentId" label="乐理报考等级">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
-                {{ scope.row.theoryLevel ? scope.row.theoryLeve + "级" : "-" }}
+                {{ scope.row.theoryLevel ? scope.row.theoryLevel + "级" : "-" }}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>

+ 90 - 41
src/views/childrensDay/index.vue

@@ -73,43 +73,60 @@
         <el-button type="primary" @click="onCreateQRCode('placeholder')"
         <el-button type="primary" @click="onCreateQRCode('placeholder')"
           >占位链接</el-button
           >占位链接</el-button
         >
         >
-        <el-button type="primary" @click="onCreateQRCode('music')">器乐考级链接</el-button>
-        <el-button type="primary" @click="onCreateQRCode('vip')">VIP课程链接</el-button>
-        <el-button type="primary" @click="onCreateQRCode('theory')">乐理考级链接</el-button>
-        <el-button type="primary"  v-permission="'export/statisticsDetail'"  @click="exportChildren">导出</el-button>
+        <el-button type="primary" @click="onCreateQRCode('music')"
+          >乐器考级链接</el-button
+        >
+        <el-button type="primary" @click="onCreateQRCode('vip')"
+          >VIP课程链接</el-button
+        >
+        <el-button type="primary" @click="onCreateQRCode('theory')"
+          >乐理考级链接</el-button
+        >
+        <el-button
+          type="primary"
+          @click="sendMsg"
+          v-permission="'childrenReserve/sendMsg'"
+          >发送短信及推送</el-button
+        >
+        <el-button
+          type="primary"
+          v-permission="'export/statisticsDetail'"
+          @click="exportChildren"
+          >导出</el-button
+        >
       </div>
       </div>
       <statistic :col="4" class="statistic" :cols="0">
       <statistic :col="4" class="statistic" :cols="0">
         <statistic-item>
         <statistic-item>
+          <span>乐器考级人次</span>
           <span><count-to :endVal="statInfo.instrumentalMusicNum" /></span>
           <span><count-to :endVal="statInfo.instrumentalMusicNum" /></span>
-          <span>器乐考级人次</span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
-          <span><count-to :endVal="statInfo.musicTheoryNum" /></span>
           <span>乐理考级人次</span>
           <span>乐理考级人次</span>
+          <span><count-to :endVal="statInfo.musicTheoryNum" /></span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
-          <span><count-to :endVal="statInfo.buyMusicTheoryNum" /></span>
           <span>乐理课购买人数</span>
           <span>乐理课购买人数</span>
+          <span><count-to :endVal="statInfo.buyMusicTheoryNum" /></span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
-          <span><count-to :endVal="statInfo.buyMusicTheoryAmount" /></span>
           <span>乐理课成交金额</span>
           <span>乐理课成交金额</span>
+          <span><count-to :endVal="statInfo.buyMusicTheoryAmount" /></span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
-          <span><count-to :endVal="statInfo.buyVip1Num" /></span>
           <span>1v1VIP课购买人数</span>
           <span>1v1VIP课购买人数</span>
+          <span><count-to :endVal="statInfo.buyVip1Num" /></span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
+          <span>1v1VIP课成交金额</span>
           <span><count-to :endVal="statInfo.buyVip1Amount" /></span>
           <span><count-to :endVal="statInfo.buyVip1Amount" /></span>
-          <span>1v1VIP课购成交金额</span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
-          <span><count-to :endVal="statInfo.buyVip2Num" /></span>
           <span>1v2VIP课购买人数</span>
           <span>1v2VIP课购买人数</span>
+          <span><count-to :endVal="statInfo.buyVip2Num" /></span>
         </statistic-item>
         </statistic-item>
         <statistic-item>
         <statistic-item>
+          <span>1v2VIP课成交金额</span>
           <span><count-to :endVal="statInfo.buyVip2Amount" /></span>
           <span><count-to :endVal="statInfo.buyVip2Amount" /></span>
-          <span>1v2VIP课购成交金额</span>
         </statistic-item>
         </statistic-item>
       </statistic>
       </statistic>
       <div class="tableWrap">
       <div class="tableWrap">
@@ -117,8 +134,15 @@
           style="width: 100%"
           style="width: 100%"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
           :data="tableList"
+          @selection-change="handleSelectionChange"
         >
         >
           <el-table-column
           <el-table-column
+            type="selection"
+            width="55"
+            v-permission="'childrenReserve/sendMsg'"
+          >
+          </el-table-column>
+          <el-table-column
             align="center"
             align="center"
             prop="organName"
             prop="organName"
             label="分部"
             label="分部"
@@ -151,7 +175,7 @@
           <el-table-column
           <el-table-column
             align="center"
             align="center"
             prop="instrumentalMusicNum"
             prop="instrumentalMusicNum"
-            label="乐考级人次"
+            label="乐考级人次"
           ></el-table-column>
           ></el-table-column>
           <el-table-column
           <el-table-column
             align="center"
             align="center"
@@ -168,12 +192,11 @@
             prop="buyVip1Amount"
             prop="buyVip1Amount"
             label="1v1VIP课成交金额"
             label="1v1VIP课成交金额"
           >
           >
-           <template slot-scope="scope">
+            <template slot-scope="scope">
               <div>
               <div>
-                {{ scope.row.buyVip1Amount |moneyFormat }}
+                {{ scope.row.buyVip1Amount | moneyFormat }}
               </div>
               </div>
             </template>
             </template>
-
           </el-table-column>
           </el-table-column>
           <el-table-column
           <el-table-column
             align="center"
             align="center"
@@ -185,9 +208,9 @@
             prop="buyVip2Amount"
             prop="buyVip2Amount"
             label="1v2VIP课成交金额"
             label="1v2VIP课成交金额"
           >
           >
-             <template slot-scope="scope">
+            <template slot-scope="scope">
               <div>
               <div>
-                {{ scope.row.buyVip2Amount |moneyFormat }}
+                {{ scope.row.buyVip2Amount | moneyFormat }}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -203,7 +226,7 @@
           >
           >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
-                {{ scope.row.buyMusicTheoryAmount |moneyFormat }}
+                {{ scope.row.buyMusicTheoryAmount | moneyFormat }}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -234,14 +257,14 @@
 <script>
 <script>
 import axios from "axios";
 import axios from "axios";
 import { getToken } from "@/utils/auth";
 import { getToken } from "@/utils/auth";
-import qs from 'qs'
+import qs from "qs";
 import pagination from "@/components/Pagination/index";
 import pagination from "@/components/Pagination/index";
 import qrCode from "@/components/QrCode/index";
 import qrCode from "@/components/QrCode/index";
 import { vaildStudentUrl } from "@/utils/validate";
 import { vaildStudentUrl } from "@/utils/validate";
 import { Export } from "@/utils/downLoadFile";
 import { Export } from "@/utils/downLoadFile";
 import load from "@/utils/loading";
 import load from "@/utils/loading";
 import { queryByOrganId, getSchool, getMusicGroup } from "@/api/systemManage";
 import { queryByOrganId, getSchool, getMusicGroup } from "@/api/systemManage";
-import { getMusicGroupGradeList } from "./api";
+import { getMusicGroupGradeList, sendMsgList } from "./api";
 import countTo from "vue-count-to";
 import countTo from "vue-count-to";
 const baseStatusInfo = {
 const baseStatusInfo = {
   buyMusicTheoryAmount: 0,
   buyMusicTheoryAmount: 0,
@@ -290,6 +313,7 @@ export default {
       statInfo: {
       statInfo: {
         ...baseStatusInfo,
         ...baseStatusInfo,
       },
       },
+      chioseList: [],
     };
     };
   },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -337,17 +361,17 @@ export default {
         this.codeTitle = "占位链接";
         this.codeTitle = "占位链接";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenSeat";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenSeat";
       }
       }
-      if(status == "theory"){
-         this.codeTitle = "乐理考级链接";
+      if (status == "theory") {
+        this.codeTitle = "乐理考级链接";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment?dHlwZT0y";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment?dHlwZT0y";
       }
       }
 
 
-      if(status == "music"){
-          this.codeTitle = "乐考级链接";
+      if (status == "music") {
+        this.codeTitle = "乐考级链接";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment?dHlwZT0x";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment?dHlwZT0x";
       }
       }
-      if(status == "vip"){
-            this.codeTitle = "VIP课程链接";
+      if (status == "vip") {
+        this.codeTitle = "VIP课程链接";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment";
         this.qrCodeUrl = vaildStudentUrl() + "/#/childrenPayment";
       }
       }
       this.codeStatus = true;
       this.codeStatus = true;
@@ -359,6 +383,9 @@ export default {
     changeCooper(val) {
     changeCooper(val) {
       this.searchForm.musicGroupId = null;
       this.searchForm.musicGroupId = null;
     },
     },
+    handleSelectionChange(val) {
+      this.chioseList = val;
+    },
     gotoDetail(row) {
     gotoDetail(row) {
       // query:{'musicGroupId':}
       // query:{'musicGroupId':}
       this.$router.push({
       this.$router.push({
@@ -366,19 +393,41 @@ export default {
         query: {
         query: {
           musicGroupId: row.musicGroupId,
           musicGroupId: row.musicGroupId,
           musicGroupName: row.musicGroupName,
           musicGroupName: row.musicGroupName,
-          cooperationOrganId:row.cooperationOrganId,
-          organId:row.organId
+          cooperationOrganId: row.cooperationOrganId,
+          organId: row.organId,
         },
         },
       });
       });
     },
     },
-    exportChildren(){
-       Export(this, {
-          url: '/api-web/export/statisticsDetail',
-          fileName: '21暑期考级.xls',
-          method: 'post',
-          params:qs.stringify({ ...this.searchForm })
-        }, '您确定导出21暑期考级?')
-    }
+    exportChildren() {
+      Export(
+        this,
+        {
+          url: "/api-web/export/statisticsDetail",
+          fileName: "21暑期考级.xls",
+          method: "post",
+          params: qs.stringify({ ...this.searchForm }),
+        },
+        "您确定导出21暑期考级?"
+      );
+    },
+    async sendMsg() {
+      if (this.chioseList.length < 1) {
+        this.$message.error("请至少选择一个乐团");
+        return;
+      }
+      let arr = this.chioseList.map((item) => {
+        return {
+          musicGroupId: item.musicGroupId,
+          organId: item.organId,
+        };
+      });
+      try {
+        const res = await sendMsgList(arr);
+        console.log(res);
+        this.$message.success("发送成功");
+        this.getList()
+      } catch {}
+    },
   },
   },
   watch: {
   watch: {
     "searchForm.organId"(val) {
     "searchForm.organId"(val) {
@@ -403,11 +452,11 @@ export default {
 <style lang='scss' scoped>
 <style lang='scss' scoped>
 .statistic {
 .statistic {
   .statistic-content > span {
   .statistic-content > span {
-    font-size: 20px !important;
+    font-size: 22px !important;
     &:first-child {
     &:first-child {
-      font-size: 24px !important;
-      color: rgba(0, 0, 0, 0.85);
-      font-weight: bold;
+      font-size: 14px !important;
+      // color: rgba(0, 0, 0, 0.85);
+      // font-weight: bold;
     }
     }
   }
   }
 }
 }

+ 2 - 2
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 module.exports = {