lex %!s(int64=2) %!d(string=hai) anos
pai
achega
ce2aad09f6

+ 26 - 17
src/api/process/work-order.js

@@ -6,7 +6,7 @@ export function processStructure(params) {
   return request({
     url: "/api-oa/api/v1/work-order/process-structure",
     method: "get",
-    params
+    params,
   });
 }
 
@@ -15,7 +15,7 @@ export function createWorkOrder(data) {
   return request({
     url: "/api-oa/api/v1/work-order/create",
     method: "post",
-    data
+    data,
   });
 }
 
@@ -24,7 +24,7 @@ export function checkCourseReturnFee(data) {
   return request({
     url: "/api-web/oa/checkCourseReturnFee",
     method: "post",
-    data
+    data,
   });
 }
 
@@ -33,7 +33,7 @@ export function workOrderList(params) {
   return request({
     url: "/api-oa/api/v1/work-order/list",
     method: "get",
-    params
+    params,
   });
 }
 
@@ -42,7 +42,7 @@ export function handleWorkOrder(data) {
   return request({
     url: "/api-oa/api/v1/work-order/handle",
     method: "post",
-    data
+    data,
   });
 }
 
@@ -52,7 +52,7 @@ export function asyncPlayLog(data) {
     url: "api-web/oa/syncPayLog",
     method: "post",
     requestType: "form",
-    data: qs.stringify(data)
+    data: qs.stringify(data),
   });
 }
 
@@ -61,7 +61,7 @@ export function unityWorkOrder(params) {
   return request({
     url: "/api-oa/api/v1/work-order/unity",
     method: "get",
-    params
+    params,
   });
 }
 
@@ -70,7 +70,7 @@ export function inversionWorkOrder(data) {
   return request({
     url: "/api-oa/api/v1/work-order/inversion",
     method: "post",
-    data
+    data,
   });
 }
 
@@ -79,7 +79,7 @@ export function urgeWorkOrder(params) {
   return request({
     url: "/api-oa/api/v1/work-order/urge",
     method: "get",
-    params
+    params,
   });
 }
 
@@ -88,7 +88,7 @@ export function activeOrder(data, workOrderId) {
   return request({
     url: `/api-oa/api/v1/work-order/active-order/${workOrderId}`,
     method: "put",
-    data
+    data,
   });
 }
 
@@ -96,7 +96,7 @@ export function activeOrder(data, workOrderId) {
 export function deleteWorkOrder(workOrderId) {
   return request({
     url: `/api-oa/api/v1/work-order/delete/${workOrderId}`,
-    method: "delete"
+    method: "delete",
   });
 }
 
@@ -104,7 +104,7 @@ export function deleteWorkOrder(workOrderId) {
 export function reopenWorkOrder(id) {
   return request({
     url: `/api-oa/api/v1/work-order/reopen/${id}`,
-    method: "post"
+    method: "post",
   });
 }
 
@@ -112,15 +112,24 @@ export function reopenWorkOrder(id) {
 export function queryAllOrgan() {
   return request({
     url: `/api-web/eduOrganization/queryAllOrgan`,
-    method: "get"
+    method: "get",
+  });
+}
+
+// 获取所有分部
+export function queryTeacherOrgan(params) {
+  return request({
+    url: "/api-teacher/teacher/queryOrganList",
+    method: "get",
+    params,
   });
 }
 
 export function queryUserInfo(data) {
   return request({
-    url: "/api-web/employee/queryUserInfo",
+    url: "/api-auth/api/queryUserInfo",
     method: "get",
-    params: data
+    params: data,
   });
 }
 
@@ -129,7 +138,7 @@ export function getOrganCooperation(params) {
   return request({
     url: `/api-web/eduOrganization/getOrganCooperation`,
     method: "get",
-    params
+    params,
   });
 }
 
@@ -138,6 +147,6 @@ export function orderComment(data) {
   return request({
     url: "/api-oa/api/v1/work-order/comment",
     method: "post",
-    data
+    data,
   });
 }

+ 1 - 1
src/store/modules/user.js

@@ -53,7 +53,7 @@ const actions = {
   login({ commit }, userInfo) {
     const { username, password } = userInfo
     return new Promise((resolve, reject) => {
-      login({ username: username.trim(), password: password, clientId: 'system', clientSecret: 'system' }).then(response => {
+      login({ username: username.trim(), password: password, clientId: 'oa', clientSecret: 'oa' }).then(response => {
         const { data } = response
         if (response.code == 200) {
           console.log(data)

+ 86 - 77
src/views/process/list/create.vue

@@ -54,8 +54,8 @@
           <fm-generate-form
             v-show="
               currentNode.hideTpls === undefined ||
-                currentNode.hideTpls === null ||
-                currentNode.hideTpls.indexOf(tplItem.id) === -1
+              currentNode.hideTpls === null ||
+              currentNode.hideTpls.indexOf(tplItem.id) === -1
             "
             :key="tplIndex"
             :ref="'generateForm-' + tplItem.id"
@@ -79,8 +79,8 @@
           />
         </template>
       </div>
-      <hr style="background-color: #d9d9d9; border:0; height:1px;" />
-      <div class="text item" style="text-align: center;margin-top:18px">
+      <hr style="background-color: #d9d9d9; border: 0; height: 1px" />
+      <div class="text item" style="text-align: center; margin-top: 18px">
         <el-button
           v-for="(item, index) in btn_group"
           :key="index"
@@ -105,7 +105,8 @@ import {
   createWorkOrder,
   checkCourseReturnFee,
   queryAllOrgan,
-  queryUserInfo
+  queryTeacherOrgan,
+  queryUserInfo,
 } from "@/api/process/work-order";
 import { listUser } from "@/api/system/sysuser";
 export default {
@@ -120,6 +121,7 @@ export default {
       socialId: null, // 是否是社保分部
       userId: null,
       tenantId: 1,
+      userType: "SYSTEM",
       ruleForm: {
         priority: 1,
         deptId: null, // 社保部分
@@ -131,17 +133,17 @@ export default {
         process_method: "",
         tpls: {
           form_structure: [],
-          form_data: []
+          form_data: [],
         },
-        tasks: []
+        tasks: [],
       },
       rules: {
         deptId: [
-          { required: true, message: "请选择申请部门", trigger: "change" }
+          { required: true, message: "请选择申请部门", trigger: "change" },
         ],
         priority: [
-          { required: true, message: "请选择工单优先级", trigger: "blur" }
-        ]
+          { required: true, message: "请选择工单优先级", trigger: "blur" },
+        ],
       },
       deptList: [], // 分部列表
       btn_group: [],
@@ -149,13 +151,13 @@ export default {
         // 获取用户列表
         userList(resolve) {
           listUser({
-            pageSize: 999999
-          }).then(response => {
+            pageSize: 999999,
+          }).then((response) => {
             const options = response.data.list;
             resolve(options);
           });
-        }
-      }
+        },
+      },
     };
   },
   async mounted() {
@@ -165,48 +167,57 @@ export default {
   },
   methods: {
     async getUserInfo() {
-      await queryUserInfo().then(res => {
+      await queryUserInfo().then((res) => {
         if (res.code == 200) {
           this.userId = res.data.id;
           this.tenantId = res.data.tenantId;
+          this.userType = res.data.userType;
         } else {
           this.$message.error(res.data);
         }
       });
     },
-    async getAllOrgan() {
+    getAllOrgan() {
       // 获取分部
-      await queryAllOrgan({ 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
-          ];
-          let tempOrgan = [];
-          // 过滤不会显示的分部
-          result.forEach(item => {
-            if (!filterOrganId.includes(item.id)) {
-              tempOrgan.push(item);
-            }
-          });
-          this.organList = tempOrgan;
-        }
-      });
+      console.log(this.tenantId, "tenantId");
+      if (this.userType.indexOf("SYSTEM") != -1) {
+        queryAllOrgan({ 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,
+            ];
+            let tempOrgan = [];
+            // 过滤不会显示的分部
+            result.forEach((item) => {
+              if (!filterOrganId.includes(item.id)) {
+                tempOrgan.push(item);
+              }
+            });
+            this.organList = tempOrgan;
+          }
+        });
+      } else {
+        queryTeacherOrgan({ 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,
+            ];
+            let tempOrgan = [];
+            // 过滤不会显示的分部
+            result.forEach((item) => {
+              if (!filterOrganId.includes(item.key)) {
+                tempOrgan.push({
+                  id: item.key,
+                  name: item.value,
+                });
+              }
+            });
+            this.organList = tempOrgan;
+          }
+        });
+      }
     },
     getProcessNodeList() {
       const processId = this.$route.query.processId;
@@ -215,8 +226,8 @@ export default {
       }
       processStructure({
         processId: this.$route.query.processId,
-        userId: this.userId
-      }).then(response => {
+        userId: this.userId,
+      }).then((response) => {
         let tempData = response.data.tpls;
         console.log(response);
         // 获取对应模板中,下拉框的key, value
@@ -232,7 +243,7 @@ export default {
 
         tempData.forEach((temp, index) => {
           let tempList = temp.form_structure.list || [];
-          tempList.forEach(item => {
+          tempList.forEach((item) => {
             if (hiddenFormList[index].length > 0) {
               if (item.type != "text" && !item.options.relationStatus) {
                 item.hidden = true;
@@ -250,9 +261,9 @@ export default {
             if (item.type == "subform") {
               let childList = item.columns || [];
               let subFormStatus = true;
-              childList.forEach(child => {
+              childList.forEach((child) => {
                 let childList = child.list || [];
-                childList.forEach(c => {
+                childList.forEach((c) => {
                   if (hiddenFormList[index].length > 0) {
                     if (c.type != "text" && !c.options.relationStatus) {
                       c.hidden = true;
@@ -298,7 +309,7 @@ export default {
 
         const psv = response.data.edges || [];
         const btn_group = [];
-        psv.forEach(item => {
+        psv.forEach((item) => {
           if (item.source === this.currentNode.id && item.flowProperties == 1) {
             if (item.flowProperties == 1) {
               item.className = "primary";
@@ -320,7 +331,7 @@ export default {
           // })
           this.$alert("您当前暂未设置所属部门,请联系管理员", "提示", {
             confirmButtonText: "确定",
-            callback: action => {}
+            callback: (action) => {},
           });
         }
       });
@@ -332,7 +343,7 @@ export default {
         let tempList = temp.form_structure.list || [];
         let tempSelectList = tplValues[index] || [];
         let listArray = [];
-        tempList.forEach(list => {
+        tempList.forEach((list) => {
           if (list.type == "select") {
             if (type == "value") {
               const result = this.getFormDataDetail(temp.form_data, list.model);
@@ -342,13 +353,13 @@ export default {
             } else {
               let selectOptions = [];
               let selectValue = [];
-              tempSelectList.forEach(tsl => {
+              tempSelectList.forEach((tsl) => {
                 if (tsl.model == list.model) {
                   selectOptions = list.options.options || [];
                   selectValue = tsl.value || [];
                 }
               });
-              selectOptions.forEach(so => {
+              selectOptions.forEach((so) => {
                 if (selectValue.includes(so.value)) {
                   let tempRo = so.relationOptions || [];
                   listArray.push(...tempRo);
@@ -358,9 +369,9 @@ export default {
           }
           if (list.type == "subform") {
             let childList = list.columns || [];
-            childList.forEach(child => {
+            childList.forEach((child) => {
               let childList = child.list || [];
-              childList.forEach(c => {
+              childList.forEach((c) => {
                 if (c.type == "select") {
                   if (type == "value") {
                     const originObj = JSON.parse(JSON.stringify(c));
@@ -374,13 +385,13 @@ export default {
                   } else {
                     let selectOptions = [];
                     let selectValue = [];
-                    tempSelectList.forEach(tsl => {
+                    tempSelectList.forEach((tsl) => {
                       if (tsl.model == c.model) {
                         selectOptions = c.options.options || [];
                         selectValue = tsl.value || [];
                       }
                     });
-                    selectOptions.forEach(so => {
+                    selectOptions.forEach((so) => {
                       if (selectValue.includes(so.value)) {
                         let tempRo = so.relationOptions || [];
                         listArray.push(...tempRo);
@@ -400,7 +411,7 @@ export default {
     getFormDataDetail(formData, model) {
       let modelStatus = {
         status: false,
-        value: null
+        value: null,
       };
       for (let data in formData) {
         if (typeof formData[data] == "object") {
@@ -412,7 +423,7 @@ export default {
                 model: child,
                 value: formData[data][child]
                   ? formData[data][child].split(",")
-                  : []
+                  : [],
               };
             }
           }
@@ -421,7 +432,7 @@ export default {
             modelStatus = {
               status: true,
               model: data,
-              value: formData[data] ? formData[data].split(",") : []
+              value: formData[data] ? formData[data].split(",") : [],
             };
           }
         }
@@ -429,16 +440,15 @@ export default {
       return modelStatus;
     },
     submitAction(target) {
-      this.$refs["ruleForm"].validate(valid => {
+      this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
           this.submitDisabled = true;
           var stateMap = {};
           this.ruleForm.process = parseInt(this.$route.query.processId);
           this.ruleForm.classify = this.processStructureValue.process.classify;
           stateMap["id"] = target;
-          this.ruleForm.source_state = this.processStructureValue.nodes[
-            this.active
-          ].label;
+          this.ruleForm.source_state =
+            this.processStructureValue.nodes[this.active].label;
           for (var v of this.processStructureValue.nodes) {
             if (v.id === target) {
               if (v.assignType !== undefined) {
@@ -455,7 +465,7 @@ export default {
 
           this.ruleForm.tpls = {
             form_structure: [],
-            form_data: []
+            form_data: [],
           };
           // 绑定流程任务
           this.ruleForm.tasks =
@@ -482,10 +492,9 @@ export default {
             promiseList.push(this.$refs["generateForm-" + tpl.id][0].getData());
           }
           Promise.all(promiseList)
-            .then(async values => {
-              this.ruleForm.source = this.processStructureValue.nodes[
-                this.active
-              ].id;
+            .then(async (values) => {
+              this.ruleForm.source =
+                this.processStructureValue.nodes[this.active].id;
               this.ruleForm.tpls.form_data = values;
               const formData = values[0];
               const tplInfo = this.processStructureValue.tpls[0]; // 默认只用第一个模板
@@ -493,11 +502,11 @@ export default {
               // 校验数据
               const res = await checkCourseReturnFee({
                 tplInfoId: tplInfo.id,
-                formData
+                formData,
               });
               if (res.code == 200) {
                 await createWorkOrder(this.ruleForm)
-                  .then(response => {
+                  .then((response) => {
                     if (response.code === 200) {
                       this.$message.success("工单申请成功");
                       this.$router.push({ path: "/process/my-create" });
@@ -516,7 +525,7 @@ export default {
             });
         }
       });
-    }
-  }
+    },
+  },
 };
 </script>

+ 60 - 34
src/views/process/list/handle.vue

@@ -309,6 +309,7 @@ import {
   asyncPlayLog,
   queryUserInfo,
   queryAllOrgan,
+  queryTeacherOrgan,
   orderComment,
 } from "@/api/process/work-order";
 import store from "@/store";
@@ -372,6 +373,7 @@ export default {
       },
       userIds: null,
       tenantId: 1,
+      userType: "SYSTEM",
       btn_group: [],
       is_end: 0, // 是否结束
       remoteFunc: {
@@ -511,6 +513,7 @@ export default {
         if (res.code == 200) {
           this.userIds = res.data.id;
           this.tenantId = res.data.tenantId;
+          this.userType = res.data.userType;
         } else {
           this.$message.error(res.data);
         }
@@ -987,22 +990,46 @@ export default {
     //   })
     // },
     async getAllOrgan() {
-      await queryAllOrgan({ 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,
-          ];
-          let tempOrgan = [];
-          // 过滤不会显示的分部
-          result.forEach((item) => {
-            if (!filterOrganId.includes(item.id)) {
-              tempOrgan.push(item);
-            }
-          });
-          this.organList = tempOrgan;
-        }
-      });
+      // 获取分部
+      console.log(this.tenantId, "tenantId");
+      if (this.userType.indexOf("SYSTEM") != -1) {
+        queryAllOrgan({ 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,
+            ];
+            let tempOrgan = [];
+            // 过滤不会显示的分部
+            result.forEach((item) => {
+              if (!filterOrganId.includes(item.id)) {
+                tempOrgan.push(item);
+              }
+            });
+            this.organList = tempOrgan;
+          }
+        });
+      } else {
+        queryTeacherOrgan({ 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,
+            ];
+            let tempOrgan = [];
+            // 过滤不会显示的分部
+            result.forEach((item) => {
+              if (!filterOrganId.includes(item.key)) {
+                tempOrgan.push({
+                  id: item.key,
+                  name: item.value,
+                });
+              }
+            });
+            this.organList = tempOrgan;
+          }
+        });
+      }
     },
     dataModelFormatBr(str) {
       return str ? str.replace(/\n/g, "<br />") : str;
@@ -1109,25 +1136,24 @@ export default {
 }
 
 .large-icon {
-  :deep(.el-timeline-item__node--large)
-   {
-      top: -8px;
-      left: -7px;
-      width: 24px;
-      height: 24px;
-      background-color: transparent;
-    }
+  :deep(.el-timeline-item__node--large) {
+    top: -8px;
+    left: -7px;
+    width: 24px;
+    height: 24px;
+    background-color: transparent;
+  }
 
-    :deep(.el-icon-success),
-    :deep(.el-icon-error) {
-      font-size: 24px;
-      color: #22b4a9;
-      background-color: #fff;
-      padding: 2px 0;
-    }
+  :deep(.el-icon-success),
+  :deep(.el-icon-error) {
+    font-size: 24px;
+    color: #22b4a9;
+    background-color: #fff;
+    padding: 2px 0;
+  }
 
-    :deep(.el-icon-error) {
-      color: #ff2e2e;
-    }
+  :deep(.el-icon-error) {
+    color: #ff2e2e;
+  }
 }
 </style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/index.html


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/css/chunk-36bb34f2.de1c4cdf.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/css/chunk-420fd609.4b21ca6c.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/app.dbf544db.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-05325903.a107ae0d.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-05a99c67.64b1035d.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-36bb34f2.8d0f4ad9.js


+ 1 - 0
web/static/web/js/chunk-39b1e937.4bb6bac3.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39b1e937"],{"1db4":function(t,s,i){"use strict";i.r(s);var a=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"wscn-http404-container"},[i("div",{staticClass:"wscn-http404"},[t._m(0),t._v(" "),i("div",{staticClass:"bullshit"},[i("div",{staticClass:"bullshit__oops"},[t._v("OOPS!")]),t._v(" "),i("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),t._v(" "),i("div",{staticClass:"bullshit__info"},[t._v("请检查您访问的地址是否正确,通常在切换用户时,若您的用户没有上个用户退出时的页面权限,也会触发此报错,请知悉,或者点击一下按钮返回首页。")]),t._v(" "),i("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("返回首页")])])])])},c=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"pic-404"},[a("img",{staticClass:"pic-404__parent",attrs:{src:i("a36b"),alt:"404"}}),t._v(" "),a("img",{staticClass:"pic-404__child left",attrs:{src:i("26fc"),alt:"404"}}),t._v(" "),a("img",{staticClass:"pic-404__child mid",attrs:{src:i("26fc"),alt:"404"}}),t._v(" "),a("img",{staticClass:"pic-404__child right",attrs:{src:i("26fc"),alt:"404"}})])}],l={name:"Page404",computed:{message:function(){return"抱歉,您找的页面不存在。"}}},e=l,n=(i("3f88"),i("2877")),_=Object(n["a"])(e,a,c,!1,null,"171d498a",null);s["default"]=_.exports},"26fc":function(t,s,i){t.exports=i.p+"static/web/img/404_cloud.0f4bc32b.png"},"3f88":function(t,s,i){"use strict";i("6b50")},"6b50":function(t,s,i){},a36b:function(t,s,i){t.exports=i.p+"static/web/img/404.a57b6f31.png"}}]);

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-3f4d73d6.979f308d.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-58b95138.96b8103a.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-6673a38f.92641996.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-be174eec.13e475a9.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
web/static/web/js/chunk-libs.d0a5b4d1.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio