Procházet zdrojové kódy

润元堂--token统计导出

wjj před 1 dnem
rodič
revize
1262919f03

+ 10 - 0
src/api/fastGpt/fastgptPushTokenTotal.js

@@ -16,3 +16,13 @@ export function getFastGptPushTokenDeptTotal(query) {
     params: query
   })
 }
+
+
+// 导出token统计
+export function tokenExport(query) {
+  return request({
+    url: '/qw/qwPushCount/tokenExport',
+    method: 'get',
+    params: query
+  })
+}

+ 21 - 8
src/views/fastGpt/fastGptPushTokenTotal/index.vue

@@ -16,7 +16,20 @@
       </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"
+        >导出
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -40,7 +53,7 @@
 
 <script>
 import { listFastgptEventLogTotal, exportFastgptEventLogTotal, getFastGptRoleAppKeyList} from "@/api/fastGpt/fastgptEventLogTotal";
-import { getFastGptPushTokenTotal} from "@/api/fastGpt/fastgptPushTokenTotal";
+import { getFastGptPushTokenTotal,tokenExport} from "@/api/fastGpt/fastgptPushTokenTotal";
 import SelectTree from "@/components/TreeSelect/index.vue";
 import {getDeptData} from "@/api/system/employeeStats";
 import TreeSelect from '@riophae/vue-treeselect'
@@ -237,18 +250,18 @@ export default {
     handleExport() {
       const queryParams = this.queryParams;
 
-      if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
-        this.queryParams.userIds = this.selectedCompanyList;
-      }else {
-        this.queryParams.userIds = [];
-      }
-      this.$confirm('是否确认导出所有ai事件埋点统计数据项?', "警告", {
+      // if(this.selectedCompanyList != null && this.selectedCompanyList.length > 0) {
+      //   this.queryParams.userIds = this.selectedCompanyList;
+      // }else {
+      //   this.queryParams.userIds = [];
+      // }
+      this.$confirm('是否确认导出所有token统计数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
           this.exportLoading = true;
-          return exportFastgptEventLogTotal(queryParams);
+          return tokenExport(queryParams);
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;