| 
					
				 | 
			
			
				@@ -7,7 +7,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item label="项目" prop="project"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-select v-model="form.project" placeholder="请选择项目" filterable clearable size="small"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-select v-model="queryParams.project" placeholder="请选择项目" filterable clearable size="small"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-option 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             v-for="dict in projectOptions" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             :key="dict.dictValue" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -28,11 +28,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item label="年月" prop="time"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-date-picker 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          v-model="queryParams.time" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          type="month" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          v-model="time" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          type="daterange" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           placeholder="选择年月" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           :picker-options="pickerOptions" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          :value-format="'yyyy-MM'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :value-format="'yyyy-MM-dd'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          @change="handleDateData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ></el-date-picker> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,7 +62,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="公司名称" align="center" prop="companyName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="项目" align="center" prop="projectName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="课程" align="center" prop="courseName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <el-table-column label="月份" align="center" prop="month" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-table-column label="日期" align="center" prop="month" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-table-column label="使用流量" align="center"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <template slot-scope="scope"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <span>{{ formatTrafficData(scope.row.totalInternetTraffic) }}</span> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -93,10 +94,18 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: "CourseTrafficLog", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      companyList:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       pickerOptions: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        shortcuts: [{ text: '本月', onClick: () => this.handleShortcut() }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        shortcuts: [{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          text: '最近一周', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          onClick(picker) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const end = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const start = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            picker.$emit('pick', [start, end]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      companyList:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 遮罩层 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loading: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 导出遮罩层 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -119,8 +128,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       title: "", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 是否显示弹出层 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       open: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      time: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 查询参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryParams: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        startDate: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        endDate: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageNum: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pageSize: 10, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         userId: null, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -131,7 +143,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         companyUserId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         companyId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         courseId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        time:new Date().toISOString().slice(0, 7) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 表单参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       form: {}, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -152,6 +163,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleDateData(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (this.time) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.startDate = this.time[0]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.endDate = this.time[1]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.startDate = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParams.endDate = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getAllCompany() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       allList().then(response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.companyList = response.rows; 
			 |