Bläddra i källkod

上传文件至 'ui/src/views/plant/staffmgr'

增加继任者清单
ssydinglh 3 år sedan
förälder
incheckning
220a254a01
1 ändrade filer med 59 tillägg och 1 borttagningar
  1. 59 1
      ui/src/views/plant/staffmgr/index.vue

+ 59 - 1
ui/src/views/plant/staffmgr/index.vue

@@ -150,6 +150,15 @@
           @click="handleLeft"
         >{{ $t('离职名单') }}</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-user"
+          size="mini"
+          @click="handleSuccessor"
+          v-hasPermi="['system:user:export']"
+          >{{ $t('继任者清单') }}</el-button>
+        </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -537,6 +546,22 @@
         <el-button @click="left.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
+    <!-- 继任者清单 -->
+    <el-dialog  v-loading="loading" title="继任者清单" :visible.sync="successor.open" width="650px" append-to-body custom-class="successorDialog">
+      <el-table :data="successorList">
+        <el-table-column property="post" label="岗位" align="center" width="150"></el-table-column>
+        <el-table-column property="currentPerson" label="当前人员" align="center" width="150"></el-table-column>
+        <el-table-column property="successor1" label="继任者1号" align="center" width="150"></el-table-column>
+        <el-table-column property="successor2" label="继任者2号" align="center" width="150"></el-table-column>
+      </el-table>
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="querySuccessorParams.pageNum"
+          :limit.sync="querySuccessorParams.pageSize"
+          @pagination="getSuccessorList"
+        />
+    </el-dialog>
     <el-drawer
       :title="$t('数据分析')"
       size="600px"
@@ -581,7 +606,17 @@
     </el-drawer>
   </div>
 </template>
-
+<style>
+.successorDialog {
+  display: flex;
+  flex-direction: column;
+  margin:0 !important;
+  position:absolute;
+  top:30%;
+  left:50%;
+  transform:translate(-50%,-50%);
+}
+</style>
 <script>
   import { listStaffmgr, listpIdStaffmgr, listLeftStaffmgr, getStaffmgr, delStaffmgr, delLeftStaffmgr,reLeftStaffmgr ,addStaffmgr, updateStaffmgr, exportStaffmgr } from "@/api/plant/staffmgr";
   import { allFileList, listCommonfile, getCommonfile, delCommonfile, addCommonfile, updateCommonfile, exportCommonfile} from "@/api/common/commonfile";
@@ -743,6 +778,15 @@
         querypIdParams: {
           units: '10,18',
         },
+        // 继任者查询参数
+        querySuccessorParams: {
+          pageNum: 1,
+          pageSize: 10,
+          post: undefined
+        },
+        successor: {
+          open: false,
+        },
         educations: [],
         units: [],
         teams: [],
@@ -843,6 +887,16 @@
           this.deptOptions = response.data;
         });
       },
+      /** 查询继任者列表 */
+    getSuccessorList() {
+      this.loading = true;
+      listSuccessorUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+          this.userList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        }
+      );
+    },
       /** 转换目标录入数据结构 */
       normalizer(node) {
         if (node.children && !node.children.length) {
@@ -1176,6 +1230,10 @@
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
+          /** 继任者清单按钮操作 */
+    handleSuccessor() {
+      this.successor.open=true;
+    },
     }
   };
 </script>