lex 2 роки тому
батько
коміт
f898c3eae9

+ 19 - 11
src/api/dashboard.js

@@ -1,19 +1,27 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 export function initData(params) {
   return request({
-    url: '/api-oa/api/v1/dashboard',
-    method: 'get',
-    params
-  })
+    url: "/api-oa/api/v1/dashboard",
+    method: "get",
+    params,
+  });
 }
 
+// 当前用户全部分部
+export function queryAllOrgan(params) {
+  return request({
+    url: "/eduOrganization/queryAllOrgan",
+    method: "get",
+    params,
+  });
+}
 
 // 全部分部
-export function queryAllOrgan(params) {
+export function queryAllToOrgan(params) {
   return request({
-      url: '/eduOrganization/queryAllOrgan',
-      method: 'get',
-      params
-  })
-}
+    url: "/eduOrganization/queryAll",
+    method: "get",
+    params,
+  });
+}

+ 8 - 0
src/api/process/work-order.js

@@ -117,6 +117,14 @@ export function queryAllOrgan() {
 }
 
 // 获取所有分部
+export function queryAllToOrgan() {
+  return request({
+    url: `/api-web/eduOrganization/queryAll`,
+    method: "get",
+  });
+}
+
+// 获取所有分部
 export function queryTeacherOrgan(params) {
   return request({
     url: "/api-teacher/teacher/queryOrganList",

+ 32 - 27
src/store/modules/getDataList.js

@@ -1,46 +1,51 @@
-
-import { queryAllOrgan } from "../../api/dashboard"
-const loadings = {}
-const filterOrganId = [36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56]
+import { queryAllToOrgan } from "../../api/dashboard";
+const loadings = {};
+// const filterOrganId = [
+//   36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
+// ];
+const filterOrganId = [
+  1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26,
+  27, 28, 34, 37, 40, 71, 72, 124, 125,
+];
 const state = {
-  allBranch: []
-}
+  allBranch: [],
+};
 
 const mutations = {
   commit_all_branch: (state, allBranch) => {
-    state.allBranch = allBranch
-  }
-}
+    state.allBranch = allBranch;
+  },
+};
 
 const actions = {
-  async setAllBranch({
-    commit,
-    state
-  }, force) {
-    if ((!state.allBranch.length || force === true) && !loadings.commit_all_branch) {
-      loadings.commit_all_branch = await queryAllOrgan()
+  async setAllBranch({ commit, state }, force) {
+    if (
+      (!state.allBranch.length || force === true) &&
+      !loadings.commit_all_branch
+    ) {
+      loadings.commit_all_branch = await queryAllToOrgan();
       try {
-        const res = await loadings.commit_all_branch
-        const result = res.data
-        let tempOrgan = []
+        const res = await loadings.commit_all_branch;
+        const result = res.data;
+        let tempOrgan = [];
         // 过滤不会显示的分部
-        result.forEach(item => {
-          if (!filterOrganId.includes(item.id)) {
-            tempOrgan.push(item)
+        result.forEach((item) => {
+          if (filterOrganId.includes(item.id)) {
+            tempOrgan.push(item);
           }
-        })
-        commit('commit_all_branch', tempOrgan)
+        });
+        commit("commit_all_branch", tempOrgan);
       } catch (error) {
         //
       }
-      loadings.commit_all_branch = false
+      loadings.commit_all_branch = false;
     }
   },
-}
+};
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
+  actions,
+};

+ 8 - 4
src/views/process/list/create.vue

@@ -106,7 +106,7 @@ import {
   processStructure,
   createWorkOrder,
   checkCourseReturnFee,
-  queryAllOrgan,
+  queryAllToOrgan,
   queryTeacherOrgan,
   queryUserInfo,
 } from "@/api/process/work-order";
@@ -202,16 +202,20 @@ export default {
     async getAllOrgan() {
       // 获取分部
       if (this.userType.indexOf("SYSTEM") != -1) {
-        await queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
+        await queryAllToOrgan({ tenantId: this.tenantId }).then((res) => {
           if (res.code == 200) {
             const result = res.data;
+            // [
+            //   36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
+            // ];
             const filterOrganId = [
-              36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
+              1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+              23, 25, 26, 27, 28, 34, 37, 40, 71, 72, 124, 125,
             ];
             let tempOrgan = [];
             // 过滤不会显示的分部
             result.forEach((item) => {
-              if (!filterOrganId.includes(item.id)) {
+              if (filterOrganId.includes(item.id)) {
                 tempOrgan.push(item);
               }
             });

+ 5 - 4
src/views/process/list/handle.vue

@@ -349,7 +349,7 @@ import {
   activeOrder,
   asyncPlayLog,
   queryUserInfo,
-  queryAllOrgan,
+  queryAllToOrgan,
   queryTeacherOrgan,
   orderComment,
 } from "@/api/process/work-order";
@@ -1051,16 +1051,17 @@ export default {
       // 获取分部
       console.log(this.tenantId, "tenantId");
       if (this.userType.indexOf("SYSTEM") != -1) {
-        queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
+        queryAllToOrgan({ tenantId: this.tenantId }).then((res) => {
           if (res.code == 200) {
             const result = res.data;
             const filterOrganId = [
-              36, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 54, 55, 56,
+              1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+              23, 25, 26, 27, 28, 34, 37, 40, 71, 72, 124, 125,
             ];
             let tempOrgan = [];
             // 过滤不会显示的分部
             result.forEach((item) => {
-              if (!filterOrganId.includes(item.id)) {
+              if (filterOrganId.includes(item.id)) {
                 tempOrgan.push(item);
               }
             });

+ 14 - 18
src/views/process/list/model/transferSubmit.vue

@@ -29,13 +29,9 @@
 
 <script>
 import {
-  processStructure,
   handleWorkOrder,
-  activeOrder,
   asyncPlayLog,
-  queryUserInfo,
-  queryAllOrgan,
-  orderComment
+  orderComment,
 } from "@/api/process/work-order";
 import store from "@/store";
 import load from "@/utils/loading";
@@ -45,26 +41,26 @@ export default {
   props: {
     submitItem: {
       type: Object,
-      default: {}
+      default: {},
     },
     type: {
       type: String,
-      default: "commit"
-    }
+      default: "commit",
+    },
   },
   components: { Upload },
   data() {
     return {
       ruleForm: {
-        remarks: ""
+        remarks: "",
       },
-      fileUrl: []
+      fileUrl: [],
     };
   },
   mounted() {},
   methods: {
     submitForm() {
-      this.$refs["ruleForm"].validate(async _ => {
+      this.$refs["ruleForm"].validate(async (_) => {
         console.log(_);
         if (_) {
           // 评论
@@ -81,7 +77,7 @@ export default {
       const res = await orderComment({
         workOrderId: this.submitItem.workOrderId,
         remarks: this.ruleForm.remarks,
-        fileUrl: JSON.stringify(this.fileUrl || [])
+        fileUrl: JSON.stringify(this.fileUrl || []),
       });
       load.endLoading();
       if (res.code == 200) {
@@ -100,20 +96,20 @@ export default {
       this.$confirm(tips, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       }).then(async () => {
         load.startLoading();
         handleWorkOrder({
           work_order_id,
           fileUrl: JSON.stringify(this.fileUrl || []),
           remarks: this.ruleForm.remarks,
-          ...res
-        }).then(async response => {
+          ...res,
+        }).then(async (response) => {
           load.endLoading();
           if (response.code === 200) {
             await asyncPlayLog({
               workOrderId: parseInt(work_order_id),
-              fileUrl: fileList.join(",")
+              fileUrl: fileList.join(","),
             });
             this.$listeners.close();
             this.$listeners.getList();
@@ -121,7 +117,7 @@ export default {
           }
         });
       });
-    }
-  }
+    },
+  },
 };
 </script>