Browse Source

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI

ct 5 ngày trước cách đây
mục cha
commit
802f6f12fb

+ 9 - 0
src/api/company/redPacket.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function redPacketInfo(query) {
+  return request({
+    url: '/his/redPacket/info',
+    method: 'get',
+    params: query
+  })
+}

+ 44 - 1
src/views/course/courseWatchLog/deptWatchLog.vue

@@ -628,13 +628,30 @@ export default {
     courseList().then(response => {
       this.courseLists = response.list;
     });
-    this.getList();
+
     this.getDicts("sys_course_watch_log_type").then(response => {
       this.logTypeOptions = response.data;
     });
+
+    // 设置默认当天时间 xgb 防止频繁查询大量数据
+    this.setToday();
+
+    this.getList();
     this.getCompanyUserListLikeName(true);
+    this.loading=false;
   },
   methods: {
+    setToday(){
+      const today = new Date();
+      const todayStart = new Date(today);
+      todayStart.setHours(0, 0, 0, 0);
+      const todayEnd = new Date(today);
+      todayEnd.setHours(23, 59, 59, 999);
+
+      this.createTimeText = [this.formatDate(todayStart), this.formatDate(todayEnd)];
+      this.queryParams.sTime = this.formatDate(todayStart);
+      this.queryParams.eTime = this.formatDate(todayEnd);
+    },
     handleSendTypeChange() {
       this.handleQuery(); // 重新查询列表
     },
@@ -686,6 +703,12 @@ export default {
     },
     /** 查询短链课程看课记录列表 */
     getList() {
+      // xgb 看课数据量太大必须限制时间
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
+
       this.loading = true;
       if(this.queryParams.logType == "10"){
         this.queryParams.logType = null;
@@ -754,6 +777,8 @@ export default {
       // 统一重置日历组件
       this.resetCalendars();
 
+      this.setToday();
+
       this.handleQuery();
     },
     // 多选框选中数据
@@ -814,6 +839,11 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
+
       const that = this
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
@@ -889,6 +919,19 @@ export default {
     // 创建时间
     createChange(createTime) {
       if (createTime && createTime.length >= 2) {
+        const startDate = new Date(createTime[0]);
+        const endDate = new Date(createTime[1]);
+        const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
+        const diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
+
+        // 限制时间区间为一个月
+        if (diffDays > 31) {
+          this.$message.warning('创建时间区间不能超过一个月');
+          this.createTimeText = null;
+          this.queryParams.sTime = null;
+          this.queryParams.eTime = null;
+          return;
+        }
         // this.createTimeText = this.formatDateRange(createTime);
         this.queryParams.sTime = this.formatDate(createTime[0]) || null;
         this.queryParams.eTime = this.formatDate(createTime[1]) || null;

+ 45 - 1
src/views/course/courseWatchLog/index.vue

@@ -815,16 +815,34 @@ export default {
     courseList().then(response => {
       this.courseLists = response.list;
     });
-    this.getList();
+
     this.getDicts("sys_course_watch_log_type_new").then(response => {
       this.logTypeOptions = response.data;
     });
     this.getDicts("sys_course_project").then(response => {
       this.projectOptions = response.data;
     });
+
+    // 设置默认当天时间 xgb 防止频繁查询大量数据
+    this.setToday();
+
+    this.getList();
     this.getCompanyUserListLikeName(true);
+
+    this.loading=false;
   },
   methods: {
+    setToday(){
+      const today = new Date();
+      const todayStart = new Date(today);
+      todayStart.setHours(0, 0, 0, 0);
+      const todayEnd = new Date(today);
+      todayEnd.setHours(23, 59, 59, 999);
+
+      this.createTimeText = [this.formatDate(todayStart), this.formatDate(todayEnd)];
+      this.queryParams.sTime = this.formatDate(todayStart);
+      this.queryParams.eTime = this.formatDate(todayEnd);
+    },
     /**
      * 处理所属销售下拉框显示状态变化
      */
@@ -1019,6 +1037,20 @@ export default {
     // 创建时间
     createChange(createTime) {
       if (createTime && createTime.length >= 2) {
+        const startDate = new Date(createTime[0]);
+        const endDate = new Date(createTime[1]);
+        const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
+        const diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
+
+        // 限制时间区间为一个月
+        if (diffDays > 31) {
+          this.$message.warning('创建时间区间不能超过一个月');
+          this.createTimeText = null;
+          this.queryParams.sTime = null;
+          this.queryParams.eTime = null;
+          return;
+        }
+
         // this.createTimeText = this.formatDateRange(createTime);
         this.queryParams.sTime = this.formatDate(createTime[0]) || null;
         this.queryParams.eTime = this.formatDate(createTime[1]) || null;
@@ -1156,6 +1188,12 @@ export default {
     },
     /** 查询短链课程看课记录列表 */
     getList() {
+      // xgb 看课数据量太大必须限制时间
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
+
       this.loading = true;
       if(this.queryParams.logType == "10"){
         this.queryParams.logType = null;
@@ -1223,6 +1261,8 @@ export default {
       this.queryParams.scheduleEndTime = null;
       this.queryParams.sopId = null; // 重置SOP ID
 
+      this.setToday();
+
       // 重置SOP搜索
       this.handleSopClear();
 
@@ -1289,6 +1329,10 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
           confirmButtonText: "确定",

+ 45 - 4
src/views/course/courseWatchLog/watchLog.vue

@@ -788,7 +788,7 @@ export default {
     courseList().then(response => {
       this.courseLists = response.list;
     });
-    this.getList();
+
     this.getDicts("sys_course_watch_log_type_new").then(response => {
       this.logTypeOptions = response.data;
     });
@@ -796,14 +796,30 @@ export default {
     this.getDicts("sys_company_or").then(response => {
       this.sysCompanyOr = response.data;
     });
-    getMyQwUserList().then(response => {
-      this.myQwUserList = response.data;
-    });
     this.getDicts("sys_course_project").then(response => {
       this.projectOptions = response.data;
     });
+    // 设置默认当天时间 xgb 防止频繁查询大量数据
+    this.setToday();
+
+    this.getList();
+    getMyQwUserList().then(response => {
+      this.myQwUserList = response.data;
+    });
+
   },
   methods: {
+    setToday(){
+      const today = new Date();
+      const todayStart = new Date(today);
+      todayStart.setHours(0, 0, 0, 0);
+      const todayEnd = new Date(today);
+      todayEnd.setHours(23, 59, 59, 999);
+
+      this.createTimeText = [this.formatDate(todayStart), this.formatDate(todayEnd)];
+      this.queryParams.sTime = this.formatDate(todayStart);
+      this.queryParams.eTime = this.formatDate(todayEnd);
+    },
 
     handleSendTypeChange() {
       // 重置相关参数
@@ -902,6 +918,20 @@ export default {
     // 创建时间
     createChange(createTime) {
       if (createTime && createTime.length >= 2) {
+        const startDate = new Date(createTime[0]);
+        const endDate = new Date(createTime[1]);
+        const timeDiff = Math.abs(endDate.getTime() - startDate.getTime());
+        const diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
+
+        // 限制时间区间为一个月
+        if (diffDays > 31) {
+          this.$message.warning('创建时间区间不能超过一个月');
+          this.createTimeText = null;
+          this.queryParams.sTime = null;
+          this.queryParams.eTime = null;
+          return;
+        }
+
         // this.createTimeText = this.formatDateRange(createTime);
         this.queryParams.sTime = this.formatDate(createTime[0]) || null;
         this.queryParams.eTime = this.formatDate(createTime[1]) || null;
@@ -1027,6 +1057,11 @@ export default {
 
     /** 查询短链课程看课记录列表 */
     getList() {
+      // xgb 看课数据量太大必须限制时间
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
       this.loading = true;
       let param = JSON.parse(JSON.stringify(this.queryParams));
       if (param.logType == "10") {
@@ -1100,6 +1135,8 @@ export default {
       // 统一重置日历组件
       this.resetCalendars();
 
+      this.setToday();
+
       this.handleQuery();
     },
     // 多选框选中数据
@@ -1161,6 +1198,10 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
+      if (!this.createTimeText) {
+        this.$message.warning('请选择创建时间');
+        return;
+      }
       const queryParams = this.queryParams;
       this.$confirm('是否确认导出所有短链课程看课记录数据项?', "警告", {
         confirmButtonText: "确定",

+ 43 - 4
src/views/index.vue

@@ -3,7 +3,7 @@
     <!-- 数据概览 (Data Overview) -->
     <el-card class="overview-section" shadow="never">
       <el-row :gutter="20">
-        <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16" class="companybox">
+        <el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="12" class="companybox">
           <img src="../assets/images/topbg.png" alt="" class="topimg">
           <img src="../assets/images/topbg.png" alt="" class="bottomimg">
           <div class="companyboxtitle">
@@ -54,8 +54,7 @@
           </div>
         </el-col>
 
-
-        <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8" class="propertyboxtitle">
+        <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" class="propertyboxtitle">
           <div class="property_title">
             资产概览
           </div>
@@ -83,6 +82,33 @@
           </div>
 
         </el-col>
+
+
+        <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" class="propertyboxtitle">
+          <div class="property_title">
+            红包概览
+          </div>
+          <div class="propertyboxflex">
+            <div class="property-card propertyline">
+              <div class="property-title">
+                <i class="el-icon-money"></i>
+                红包余额 (元)
+              </div>
+              <div class="card-value highlight">
+                <count-to :decimals="2"  :start-val="0" :end-val="redBalance" :duration="3600" class="card-panel-num" />
+              </div>
+            </div>
+            <div class="property-card">
+              <div class="property-title">
+                <span>今日余额变化 (元)</span>
+              </div>
+              <div class="card-value highlight">
+                <count-to :decimals="2" :start-val="0" :end-val="redTodayComsumption" :duration="3600" class="card-panel-num" />
+              </div>
+            </div>
+          </div>
+
+        </el-col>
       </el-row>
 
       <le-row :gutter="20">
@@ -528,8 +554,9 @@ import {
   authorizationInfo,
   dealerAggregated, deaMemberTopTen, rechargeComsumption, rewardMoneyTopTen, rewardMoneyTrend,
   smsBalance, thisMonthOrderCount, thisMonthRecvCount, trafficLog,
-  watchCourseTopTen, watchEndPlayTrend,getWatchCourseStatisticsData
+  watchCourseTopTen, watchEndPlayTrend,getWatchCourseStatisticsData,
 } from "@/api/statistics/statistics";
+import {redPacketInfo} from "@/api/company/redPacket";
 import dayjs from 'dayjs';
 
 
@@ -975,6 +1002,8 @@ export default {
       todayComsumption: 0,
       yesterdayComsumption: 0,
       balance: 0,
+      redBalance:0,
+      redTodayComsumption:0,
       autoRefreshInterval: null,
       // 今日新增用户数
       todayIncreaseUserNum: 0,
@@ -1140,6 +1169,16 @@ export default {
         }
       });
 
+      // 获取红包概览
+      redPacketInfo().then(res=>{
+        if(res.code === 200){
+          if(res.data){
+            this.redBalance = res.data.redBalance;
+            this.redTodayComsumption = res.data.redTodayComsumption;
+          }
+        }
+      })
+
       trafficLog().then(res=>{
         if(res.code === 200) {
           this.todayTraffic = res.data.today;

+ 12 - 0
src/views/qw/sopUserLogs/sopUserLogsSchedule.vue

@@ -84,6 +84,18 @@
         </el-tooltip>
       </el-col>
 
+      <el-col :span="1.5">
+        <el-tooltip class="item" effect="dark" content="修改选择的群聊营期时间" placement="top">
+          <el-button
+            type="danger"
+            icon="el-icon-edit"
+            size="medium"
+            :disabled="multiple"
+            @click="updateGroupTime"
+          >批量修改营期时间</el-button>
+        </el-tooltip>
+      </el-col>
+
       <el-col :span="1.5">
         <el-tooltip class="item" effect="dark" content="删除营期之后,将不会在给原营期的客户发送消息,ps:删除之后不可恢复" placement="top">
           <el-button