Browse Source

平台员工管理

1
mo 3 years ago
parent
commit
fa28392ed7
2 changed files with 44 additions and 5 deletions
  1. 42 3
      src/views/categroyManager/insideSetting/staffPlatManager.vue
  2. 2 2
      vue.config.js

+ 42 - 3
src/views/categroyManager/insideSetting/staffPlatManager.vue

@@ -382,6 +382,31 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item
+              label="管理机构"
+              prop="tenantIds"
+              :label-width="formLabelWidth"
+            >
+              <select-all
+                v-model.trim="form.tenantIds"
+                placeholder="请选择管理机构"
+                clearable
+                filterable
+                collapse-tags
+                multiple
+              >
+                <el-option
+                  v-for="item in tenantList"
+                  :key="item.value"
+                  :label="item.name"
+                  :value="item.id"
+                ></el-option>
+              </select-all>
+            </el-form-item>
+          </el-col>
+        </el-row>
         <!-- <el-alert
           style="margin: 10px 0"
           title="OA信息"
@@ -537,6 +562,7 @@
 <script>
 import pagination from "@/components/Pagination/index";
 import { permission } from "@/utils/directivePage";
+import { tenantInfoQueryPage } from "@/views/organManager/api";
 import {
   getPlatEmploy,
   employeeOperate,
@@ -669,6 +695,7 @@ export default {
         organId: null,
         roleId: null,
       },
+      tenantList: [],
     };
   },
   mounted() {
@@ -716,7 +743,7 @@ export default {
             // organIdList: organIdLists.join(","),
             deptIds: tempDeptIds,
             deptId: tempDeptId,
-            tenantId:-1,
+            tenantId: -1,
             ...res,
           };
           if (this.formActionTitle == "create") {
@@ -771,6 +798,17 @@ export default {
         }
       });
     },
+    async onTenantChange() {
+      try {
+        const res = await tenantInfoQueryPage({
+          page: 1,
+          rows: 999,
+          payState: 1,
+          state: 1,
+        });
+        this.tenantList = res.data?.rows || [];
+      } catch (e) {}
+    },
     /** 转换菜单数据结构 */
     normalizer(node) {
       let temp = [];
@@ -791,7 +829,7 @@ export default {
     },
     async getRoleList() {
       // 获取角色
-      getUserRole({ delFlag: 0, rows: 9999,tenantId:-1 }).then((res) => {
+      getUserRole({ delFlag: 0, rows: 9999, tenantId: -1 }).then((res) => {
         let result = res.data;
         if (res.code == 200 && result && result.rows.length > 0) {
           this.roleList = [];
@@ -892,7 +930,7 @@ export default {
       });
       this.formActionTitle = type;
       this.roleStatus = true;
-
+    this.onTenantChange()
       //  格式化 可选角色
 
       // 修改的时候
@@ -958,6 +996,7 @@ export default {
           postalCode: data.postalCode,
           postDeptIds: postDeptArr,
           deptIds: tempDeptIds,
+          tenantIds: data.userTenantList || [],
         };
       } else {
         this.roleResetList = [...this.roleBaseList];

+ 2 - 2
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.251:8000' // 何国威
 // let target = 'http://192.168.3.250:8000' //邹璇
 // let target = 'http://192.168.3.119:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**