shuishen
2021-09-18 29c70ac9c7d7f23471cd6dfdb305c3aa99f1dccc
src/views/securityGuardManagement/register.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-07-05 16:31:54
 * @Last Modified by: liu
 * @Last Modified time: 2021-09-10 16:47:56
 * @Last Modified time: 2021-09-18 09:42:02
 * menu-name 保安员注册查询
 */
<template>
@@ -371,63 +371,41 @@
        treeLoad: function (node, resolve) {
          const parentId = node.level === 0 ? 0 : node.data.id;
          if (parentId == 0) {
            getDeptLazyTree(parentId).then((res) => {
              resolve(
                res.data.data.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          } else if (parentId == '1372091709474910209') {
          } else if (parentId == "1372091709474910209") {
            getDeptLazyTree(parentId).then((res) => {
              resolve(
                res.data.data[0].children.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          } else {
            getDeptLazyTree(parentId).then((res) => {
              res.data.data = [];
              resolve(
                res.data.data.map((item) => {
                  return {
                    ...item,
                    leaf: !item.hasChildren,
                  };
                })
              );
            });
          }
        },
        addBtn: false,
        menu: false,
@@ -779,8 +757,10 @@
    },
    "excelForm.isCovered"() {
      if (this.excelForm.isCovered !== "") {
        const column = this.findObject(this.excelOption.column, "excelFile");
        column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
        try {
          const column = this.findObject(this.excelOption.column, "excelFile");
          column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
        } catch {}
      }
    },
  },
@@ -883,16 +863,22 @@
    },
    initData(tenantId) {
      getRoleTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "roleId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "roleId");
          column.dicData = res.data.data;
        } catch {}
      });
      getDeptTree(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "deptId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "deptId");
          column.dicData = res.data.data;
        } catch {}
      });
      getPostList(tenantId).then((res) => {
        const column = this.findObject(this.option.group, "postId");
        column.dicData = res.data.data;
        try {
          const column = this.findObject(this.option.group, "postId");
          column.dicData = res.data.data;
        } catch {}
      });
    },