Explorar el Código

1、流量统计调整迁移

yys hace 5 horas
padre
commit
5037490460

+ 8 - 0
src/api/course/courseTrafficLog.js

@@ -67,3 +67,11 @@ export function exportStatisticsSummary(query) {
     params: query
   })
 }
+
+// 获取公开课列表
+export function commonCourseList() {
+  return request({
+    url: '/course/courseRedPacketLog/publicCourseList',
+    method: 'get'
+  })
+}

+ 32 - 4
src/views/course/courseTrafficLog/index.vue

@@ -31,8 +31,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="公开课" v-if="activeTab === 'all' || activeTab === 'common'">
-        <el-select v-model="queryParams.courseId" placeholder="请选择课" filterable clearable size="small">
-          <el-option v-for="dict in courseLists" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
+        <el-select v-model="queryParams.courseId" placeholder="请选择公开课" filterable clearable size="small">
+          <el-option v-for="dict in commonCourseLists" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
         </el-select>
       </el-form-item>
 
@@ -56,6 +56,22 @@
       </el-form-item>
     </el-form>
 
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['his:company:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
     <!-- 表格 -->
     <el-table border v-loading="loading" :data="courseTrafficLogList" @selection-change="handleSelectionChange"
               show-summary :summary-method="getSummaries">
@@ -86,7 +102,7 @@
 </template>
 
 <script>
-import { listCourseTrafficLog, exportCourseTrafficLog } from "@/api/course/courseTrafficLog";
+import { listCourseTrafficLog, exportCourseTrafficLog, commonCourseList } from "@/api/course/courseTrafficLog";
 import { courseList } from "@/api/course/courseRedPacketLog";
 import { allList } from "@/api/company/company";
 
@@ -138,6 +154,7 @@ export default {
         ]
       },
       courseLists: [],
+      commonCourseLists: [],
       loading: false,
       exportLoading: false,
       showSearch: true,
@@ -151,12 +168,23 @@ export default {
         pageSize: 10,
         companyId: null,
         project: null,
-        courseId: null
+        courseId: null,
+        typeFlag:0
       }
     };
   },
   created() {
+    const today = new Date();
+    const year = today.getFullYear();
+    const month = String(today.getMonth() + 1).padStart(2, '0');
+    const day = String(today.getDate()).padStart(2, '0');
+    const todayStr = `${year}-${month}-${day}`;
+    this.timeRange = [todayStr, todayStr];
+    this.queryParams.startDate = todayStr;
+    this.queryParams.endDate = todayStr;
+    this.queryParams.tabType = "project";
     courseList().then(res => this.courseLists = res.list);
+    commonCourseList().then(res => this.commonCourseLists = res.list || res.data || []);
     this.getDicts("sys_course_project").then(res => this.projectOptions = res.data);
     this.getAllCompany();
     this.getList();

+ 49 - 0
src/views/his/redPacketConfig/index.vue

@@ -68,6 +68,25 @@
           v-hasPermi="['redPacket:more:remove']"
         >删除</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-tag
+          type="primary"
+          size="large"
+          style="font-size: 16px;"
+        >
+          当前使用的商户号:{{this.redPacketMchId}}
+        </el-tag>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="small"
+          @click="handleEditRedPacket"
+          v-hasPermi="['redPacket:more:editRedPacket']"
+        >修改当前发送的红包的商户号</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -170,6 +189,25 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+    <el-dialog :title="redPacketOpen.title" :visible.sync="redPacketOpen.open" width="600px" append-to-body>
+      <el-form ref="redPacketOpen" :model="redPacketOpen" label-width="110px">
+        <el-form-item label="商户号" prop="cateId">
+          <el-select v-model="redPacketOpen.newChangeMchId" placeholder="请选择" clearable size="small">
+            <el-option
+              v-for="dict in moreList"
+              :key="dict.mchId"
+              :label="dict.mchId"
+              :value="dict.mchId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormChangeMchId">确 定</el-button>
+        <el-button @click="cancelChangeMchId">取 消</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -264,6 +302,12 @@ export default {
       this.open = false;
       this.reset();
     },
+    cancelChangeMchId() {
+      this.redPacketOpen.open=false;
+      this.redPacketOpen.title=false;
+      this.redPacketOpen.oldChangeMchId=false;
+      this.redPacketOpen.newChangeMchId=false;
+    },
     // 表单重置
     reset() {
       this.form = {
@@ -316,6 +360,11 @@ export default {
         this.title = "修改多商户配置";
       });
     },
+    handleEditRedPacket(){
+      this.redPacketOpen.open= true;
+      this.redPacketOpen.title="修改发送红包的商户号";
+
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {