songshankun
2023-10-10 5d0120d2e8a6e5cd2e1e95d4c5ffeecf5fc1c4a6
src/views/backgroundConfig/memberManage/index.vue
@@ -1,6 +1,8 @@
<template>
  <div class="memeber-manage">
    <div class="left"></div>
    <div class="left">
      <TreeLeft @editDepartmentClick="editDepartmentClick" />
    </div>
    <div class="right">
      <SearchCommonView
        ref="searchCommonView"
@@ -18,7 +20,7 @@
          :login-control="true"
          :operates-list="operatesList"
        />
        <PagerView class="page" />
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
      <TableCommonView ref="tableListRef" :table-list="tableList">
        <template slot="tableButton">
@@ -38,18 +40,24 @@
    </div>
    <!-- 新建/编辑 -->
    <AddContractManageDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
    <AddMemberManageDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
    <!-- 编辑部门 -->
    <EditDepartmentDialog v-if="departmentConfig.visible" :edit-department-config="departmentConfig" />
  </div>
</template>
<script>
import AddContractManageDialog from "@/views/sales/contractManage/AddContractManageDialog"
import AddMemberManageDialog from "@/views/backgroundConfig/memberManage/AddMemberManageDialog"
import TreeLeft from "@/views/backgroundConfig/memberManage/TreeLeft"
import EditDepartmentDialog from "@/views/backgroundConfig/memberManage/EditDepartmentDialog"
export default {
  name: "MemberManage",
  props: {},
  components: {
    AddContractManageDialog
    AddMemberManageDialog,
    TreeLeft,
    EditDepartmentDialog
  },
  computed: {
    searchCommonHeight() {
@@ -82,6 +90,11 @@
        visible: false,
        title: "新建",
        infomation: {}
      },
      departmentConfig: {
        visible: false,
        title: "编辑部门",
        infomation: {}
      }
    }
  },
@@ -106,7 +119,7 @@
          }
        ],
        tableColumn: [
          { label: "姓名", prop: "name", min: 120 },
          { label: "姓名", prop: "name", sortable: true, min: 120 },
          { label: "账号", prop: "account", min: 90 },
          { label: "部门", prop: "department" },
          { label: "角色权限", prop: "rolePermssion", min: 100 },
@@ -127,15 +140,40 @@
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = {
        customName: "",
        documentNumber: "ZDYBD01-3",
        owner: "",
        contractStatus: "",
        salesQuotation: "",
        approvalWorkflow: "",
        approvalSteps: "",
        approvalPerson: "",
        approvalOpinion: ""
        account: "",
        isAdmin: "",
        password: "",
        passwordConfirm: "",
        name: "",
        realName: "",
        department: "",
        state: "",
        phone: "",
        telephone: "",
        email: "",
        wechat: "",
        approvalDelegation: "",
        miniProgram: "",
        dingtalk: "",
        approvalPrincipal: "",
        positionLevel: "",
        notes: "",
        employeeDate: "",
        avatar: "",
        cloudHome: "",
        determine: "",
        rolePermssion: "",
        dataScope: "",
        role1: "",
        role2: "",
        role3: "",
        role4: "",
        role5: "",
        role6: "",
        role7: "",
        role8: "",
        other1: "",
        other2: ""
      }
    },
    // 编辑
@@ -144,15 +182,40 @@
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = {
        customName: "",
        documentNumber: "TKD20230521-12",
        owner: "",
        contractStatus: "",
        salesQuotation: "",
        approvalWorkflow: "",
        approvalSteps: "",
        approvalPerson: "",
        approvalOpinion: ""
        account: "",
        isAdmin: "",
        password: "",
        passwordConfirm: "",
        name: "",
        realName: "",
        department: "",
        state: "",
        phone: "",
        telephone: "",
        email: "",
        wechat: "",
        approvalDelegation: "",
        miniProgram: "",
        dingtalk: "",
        approvalPrincipal: "",
        positionLevel: "",
        notes: "",
        employeeDate: "",
        avatar: "",
        cloudHome: "",
        determine: "",
        rolePermssion: "",
        dataScope: "",
        role1: "",
        role2: "",
        role3: "",
        role4: "",
        role5: "",
        role6: "",
        role7: "",
        role8: "",
        other1: "",
        other2: ""
      }
    },
    // 启用
@@ -170,6 +233,25 @@
    // 删除
    deleteClick(row) {
      console.log(row)
    },
    // 编辑部门
    editDepartmentClick(command, data) {
      console.log(command, data)
      if (command === "edit") {
        this.departmentConfig.visible = true
        this.departmentConfig.infomation = {
          departmentName: data.label,
          departmentNumber: data.id,
          notes: ""
        }
      } else if (command === "add") {
        this.departmentConfig.visible = true
        this.departmentConfig.infomation = {
          departmentName: "",
          departmentNumber: "",
          notes: ""
        }
      }
    }
  }
}