소스 검색

提交代码修改2

zhuxinbo 5 년 전
부모
커밋
0a2e6f8d5b
2개의 변경된 파일35개의 추가작업 그리고 20개의 파일을 삭제
  1. 28 17
      src/views/modules/Statistics/companyDetail.vue
  2. 7 3
      src/views/modules/Statistics/companyStatistics.vue

+ 28 - 17
src/views/modules/Statistics/companyDetail.vue

@@ -13,12 +13,16 @@
           <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
           <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
           <a-button type="primary" @click="exportExcel" style="margin-left: 8px">导出</a-button>
+          <a-button type="primary" @click="backStatistics" style="float:right;margin:10px 10px 10px 0"
+            >返回公司报表</a-button
+          >
           <br />
           是否展示消耗为0的数据:
           <a-radio-group buttonStyle="solid" v-model="isHasData" @change="onChageLogin" style="margin:10px">
             <a-radio-button value="1">是</a-radio-button>
             <a-radio-button value="0">否</a-radio-button>
           </a-radio-group>
+
           <a-table
             :columns="columns"
             :dataSource="dataList"
@@ -70,24 +74,25 @@ const columns = [
     dataIndex: 'date',
     key: 'date',
     align: 'center',
-    width: 200
+    fixed: 'left',
+    width: 150
   },
-//   {
-//     title: '是否有数据',
-//     dataIndex: 'isHasData',
-//     key: 'isHasData',
-//     filters: [
-//       { text: '是', value: '1' },
-//       { text: '否', value: '0' }
-//     ],
-//     onFilter: (value, record) =>
-//       record.isHasData
-//         .toString()
-//         .toLowerCase()
-//         .includes(value.toLowerCase()),
-//     scopedSlots: { customRender: 'isHasData' },
-//     align: 'center'
-//   },
+  //   {
+  //     title: '是否有数据',
+  //     dataIndex: 'isHasData',
+  //     key: 'isHasData',
+  //     filters: [
+  //       { text: '是', value: '1' },
+  //       { text: '否', value: '0' }
+  //     ],
+  //     onFilter: (value, record) =>
+  //       record.isHasData
+  //         .toString()
+  //         .toLowerCase()
+  //         .includes(value.toLowerCase()),
+  //     scopedSlots: { customRender: 'isHasData' },
+  //     align: 'center'
+  //   },
   {
     title: '快手id',
     dataIndex: 'kid',
@@ -247,6 +252,11 @@ export default {
         })
       }
     },
+    backStatistics() {
+      this.$router.replace({
+        path: '/Statistics/companyStatistics'
+      })
+    },
     exportExcel() {
       var weekDate = localStorage.getItem('companyDate')
       var params = {}
@@ -270,6 +280,7 @@ export default {
     },
     searchReset() {
       this.advertiserName = ''
+      this.isHasData = '1'
       this.searchQuery()
     },
     searchQuery() {

+ 7 - 3
src/views/modules/Statistics/companyStatistics.vue

@@ -116,7 +116,9 @@ th div {
     <a-row :gutter="10">
       <a-col :span="24">
         <a-card style="width:100%">
-          <a-button type="primary" @click="exportExcel" style="margin: 8px 8px 8px 0" :disabled="dataTable.length==0">导出</a-button>
+          <a-button type="primary" @click="exportExcel" style="margin: 8px 8px 8px 0" :disabled="dataTable.length == 0"
+            >导出</a-button
+          >
           <a-table
             :columns="columns"
             :dataSource="dataTable"
@@ -147,7 +149,7 @@ import lifting from './components/lifting'
 import timeCheck from './components/timeCheck'
 import Treeselect from './components/Treeselect.vue'
 
-import { getAction, postAction, postFile,downFilePost } from '@/api/manage'
+import { getAction, postAction, postFile, downFilePost } from '@/api/manage'
 import { mapGetters } from 'vuex'
 
 var length = 0
@@ -158,7 +160,9 @@ const columns = [
     title: '日期',
     dataIndex: 'date',
     key: 'date',
-    align: 'center'
+    align: 'center',
+    fixed: 'left',
+    width: 150
   },
   {
     title: '有消费计划数',