Browse Source

Merge branch 'master' of http://47.110.251.215:3000/web/saber into master

zhangh 3 years ago
parent
commit
88690bb2f0
2 changed files with 32 additions and 1 deletions
  1. 10 0
      src/api/system/user.js
  2. 22 1
      src/views/work/process/leave/handle.vue

+ 10 - 0
src/api/system/user.js

@@ -128,3 +128,13 @@ export const unlock = (userIds) => {
     }
   })
 }
+
+export const getUserList = (params) => {
+  return request({
+    url: '/api/blade-user/user-list',
+    method: 'get',
+    params: {
+      ...params,
+    }
+  })
+}

+ 22 - 1
src/views/work/process/leave/handle.vue

@@ -30,6 +30,11 @@
         <el-form-item label="请假理由">
           <el-input :disabled="true" type="textarea" v-model="form.reason"/>
         </el-form-item>
+        <el-form-item label="审批人员">
+          <el-select v-model="form.taskUser" placeholder="请选择审批人员">
+            <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="批复意见">
           <el-input type="textarea" v-model="form.comment"/>
         </el-form-item>
@@ -66,6 +71,7 @@
 <script>
   import {historyFlowList, leaveDetail} from "@/api/work/process";
   import {completeTask} from "@/api/work/work";
+  import {getUserList} from "@/api/system/user";
 
   export default {
     data() {
@@ -84,6 +90,8 @@
           reason: '',
           comment: '',
         },
+
+        userList:[],
       }
     },
     created() {
@@ -116,6 +124,8 @@
             this.form = data.data;
           }
         })
+
+        this.getUserList();
       },
       handleAgree() {
         if (!this.form.comment) {
@@ -133,7 +143,7 @@
           if (data.success) {
             this.$message.success(data.msg);
             this.$router.$avueRouter.closeTag();
-            this.$router.push({path: `/work/start`});
+            this.$router.push({path: `/work/send`});
           } else {
             this.$message.error(data.msg || '提交失败');
           }
@@ -163,6 +173,17 @@
       handleCancel() {
         this.$router.$avueRouter.closeTag();
         this.$router.push({path: `/work/start`});
+      },
+
+      getUserList(){
+        getUserList().then((res)=>{
+          const data = res.data;
+          if (data.success) {
+            this.userList = data.data;
+          }else{
+            this.userList = [];
+          }
+        })
       }
     }
   }