Browse Source

总后台-按部门筛选

三七 1 day ago
parent
commit
cb26e86b85

+ 4 - 4
src/api/course/courseAnswerlogs.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listLogs(query) {
   return request({
     url: '/course/courseAnswerLog/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 
@@ -47,7 +47,7 @@ export function delLogs(logId) {
 export function exportLogs(query) {
   return request({
     url: '/course/courseAnswerLog/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }

+ 4 - 4
src/api/course/courseRedPacketLog.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listCourseRedPacketLog(query) {
   return request({
     url: '/course/courseRedPacketLog/list',
-    method: 'get',
-    params: query
+    method: 'POST',
+    data: query
   })
 }
 
@@ -58,7 +58,7 @@ export function delCourseRedPacketLog(logId) {
 export function exportCourseRedPacketLog(query) {
   return request({
     url: '/course/courseRedPacketLog/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }

+ 4 - 4
src/api/course/courseWatchLog.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listCourseWatchLog(query) {
   return request({
     url: '/course/courseWatchLog/list',
-    method: 'get',
-    params: query
+    method: 'POST',
+    data: query
   })
 }
 
@@ -47,8 +47,8 @@ export function delCourseWatchLog(logId) {
 export function exportCourseWatchLog(query) {
   return request({
     url: '/course/courseWatchLog/export',
-    method: 'get',
-    params: query
+    method: 'POST',
+    data: query
   })
 }
 

+ 4 - 4
src/api/qw/sop.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listSop(query) {
   return request({
     url: '/qw/sop/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 // 查询企微sop模板列表
@@ -98,8 +98,8 @@ export function updateStatus(ids) {
 export function exportSop(query) {
   return request({
     url: '/qw/sop/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 

+ 4 - 4
src/api/qw/sopTemp.js

@@ -4,8 +4,8 @@ import request from '@/utils/request'
 export function listSopTemp(query) {
   return request({
     url: '/qw/sopTemp/list',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 // 查询sop模板列表
@@ -136,8 +136,8 @@ export function shareSopTemp(data) {
 export function exportSopTemp(query) {
   return request({
     url: '/qw/sopTemp/export',
-    method: 'get',
-    params: query
+    method: 'post',
+    data: query
   })
 }
 

+ 22 - 12
src/views/course/courseAnswerlogs/index.vue

@@ -92,8 +92,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="创建时间" prop="createTime">
-        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd"
-                        type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="timeChange"></el-date-picker>
+        <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss"
+                        type="datetimerange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="timeChange"></el-date-picker>
 
       </el-form-item>
       <el-form-item>
@@ -160,7 +160,7 @@ export default {
       selectedCompanyList: [],
       deptList: [],
       // 遮罩层
-      loading: true,
+      loading: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -226,16 +226,17 @@ export default {
 
     getCompanyList().then(response => {
       this.companys = response.data;
-      if(this.companys!=null&&this.companys.length>0){
-        this.companyId=this.companys[0].companyId;
-        this.getTreeselect();
-      }
+      // if(this.companys!=null&&this.companys.length>0){
+      //   this.companyId=this.companys[0].companyId;
+      //   this.getTreeselect();
+      // }
       this.companys.push({companyId:"-1",companyName:"无"})
     });
     this.getDicts("sys_company_or").then(response => {
       this.sysCompanyOr = response.data;
     });
-    this.getList();
+
+    // this.getList();
 
   },
   methods: {
@@ -251,8 +252,8 @@ export default {
 
 
       listLogs(this.queryParams).then(response => {
-        this.logsList = response.rows;
-        this.total = response.total;
+        this.logsList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -374,8 +375,17 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.exportLoading = true;
-          return exportLogs(queryParams);
+
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        this.exportLoading = true;
+        return exportLogs(queryParams).finally(res=>{
+          loadingInstance.close();
+        });
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;

+ 20 - 9
src/views/course/courseRedPacketLog/index.vue

@@ -24,6 +24,17 @@
           :return-leaf-only="false"
         ></select-tree>
       </el-form-item>
+<!--    <el-form-item label="部门" prop="type">-->
+<!--      <TreeselectVue-->
+<!--        style="width: 220px"-->
+<!--        :clearable="false"-->
+<!--        v-model="queryParams.deptId"-->
+<!--        :options="deptOptions"-->
+<!--        clearable-->
+<!--        :show-count="true"-->
+<!--        placeholder="请选择归属部门"-->
+<!--      />-->
+<!--    </el-form-item>-->
 		<el-form-item label="员工" prop="companyUserName">
 		  <el-input
 		    v-model="queryParams.companyUserName"
@@ -83,7 +94,7 @@
      </el-select>
 	</el-form-item>
 	 <el-form-item label="创建时间" prop="createTime">
-	           <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd" type="daterange"
+	           <el-date-picker v-model="createTime" size="small" style="width: 220px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange"
                              range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="change"></el-date-picker>
 	 </el-form-item>
 
@@ -181,6 +192,7 @@
 <script>
 import { courseList,videoList,listCourseRedPacketLog, getCourseRedPacketLog, delCourseRedPacketLog, addCourseRedPacketLog, updateCourseRedPacketLog, exportCourseRedPacketLog } from "@/api/course/courseRedPacketLog";
 import { getCompanyList } from "@/api/company/company";
+import {treeselect} from "../../../api/company/companyDept";
 import SelectTree from '@/components/TreeSelect/index.vue'
 import { getDeptData } from '@/api/system/employeeStats'
 
@@ -190,11 +202,10 @@ export default {
   data() {
     return {
     selectedCompanyList: [],
-    deptList: [],
 	  companys:[],
-	  deptOptions:[],
+    deptList: [],
       // 遮罩层
-      loading: true,
+      loading: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -247,7 +258,6 @@ export default {
       this.deptList = response.data;
     })
 
-
     getCompanyList().then(response => {
 	    this.companys = response.data;
 	  });
@@ -255,15 +265,15 @@ export default {
 	    this.courseLists = response.list;
 	  });
 
-    this.getList();
+    // this.getList();
   },
   methods: {
 	  handleClick(tab, event) {
 	    this.activeName=tab.name;
 	    this.queryParams.status=tab.name
-	    console.log(this.queryParams.status)
 	    this.getList();
 	  },
+
     /** 查询短链课程看课记录列表 */
     getList() {
       this.loading = true;
@@ -275,8 +285,9 @@ export default {
       }
 
       listCourseRedPacketLog(this.queryParams).then(response => {
-        this.courseRedPacketLogList = response.rows;
-        this.total = response.total;
+        console.log("response",response)
+        this.courseRedPacketLogList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
       });
     },

+ 32 - 6
src/views/course/courseWatchLog/index.vue

@@ -24,6 +24,24 @@
           :return-leaf-only="false"
         ></select-tree>
       </el-form-item>
+      <el-form-item label="客户ID" prop="qwExternalContactId">
+        <el-input
+          v-model="queryParams.qwExternalContactId"
+          placeholder="请输入会员ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="会员ID" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入会员ID"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="课程" prop="courseId">
         <el-select filterable  v-model="queryParams.courseId" placeholder="请选择课程"  clearable size="small" @change="courseChange(queryParams.courseId)">
           <el-option
@@ -198,7 +216,7 @@ export default {
       companyList: [],
       queryUserLoading: false,
       // 遮罩层
-      loading: true,
+      loading: false,
       // 导出遮罩层
       exportLoading: false,
       // 选中数组
@@ -277,7 +295,7 @@ export default {
     // 设置默认当天时间 xgb 防止频繁查询大量数据
     this.setToday();
 
-    this.getList();
+    // this.getList();
 
     this.loading = false;
 
@@ -455,8 +473,8 @@ export default {
       }
 
       listCourseWatchLog(this.queryParams).then(response => {
-        this.courseWatchLogList = response.rows;
-        this.total = response.total;
+        this.courseWatchLogList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
       }).catch(() => {
           this.loading = false;
@@ -590,8 +608,16 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.exportLoading = true;
-          return exportCourseWatchLog(queryParams);
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        this.exportLoading = true;
+        return exportCourseWatchLog(queryParams).finally(res=>{
+          loadingInstance.close();
+        });
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;

+ 2 - 2
src/views/qw/sop/sop.vue

@@ -329,8 +329,8 @@ export default {
       }
       listSop(this.queryParams).then(response => {
 
-        this.sopList = response.rows;
-        this.total = response.total;
+        this.sopList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
 
       });

+ 12 - 3
src/views/qw/sopTemp/index.vue

@@ -481,8 +481,8 @@ export default {
         this.queryParams.companyUserIds = [];
       }
       listSopTemp(this.queryParams).then(response => {
-        this.sopTempList = response.rows;
-        this.total = response.total;
+        this.sopTempList = response.data.list;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -706,8 +706,17 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
+        const loadingInstance = this.$loading({
+          lock: true,
+          text: '正在导出数据,请稍候...',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
         this.exportLoading = true;
-        return exportSopTemp(queryParams);
+        return exportSopTemp(queryParams).finally(res=>{
+          loadingInstance.close();
+        });
+
       }).then(response => {
         this.download(response.msg);
         this.exportLoading = false;