authorizationdiglog.vue 3.55 KB
<template>
  <Dialog :title="title" class="tableClass" :show.sync="visible" :width="'715px'" @close="close()">
    <template slot="content">
     <lb-table ref="multipleTable"
      :pagination="false"
      :column="tableData.column"
      :data="tableData.data"
      @selection-change="handleSelectionChange">
    </lb-table>
    </template>
    <template slot="footer">
      <el-button type="primary" class="save" @click="handleSaveMember()"
        >保存</el-button
      >
      <el-button class="cancel-button" @click="close()">取消</el-button>
    </template>
  </Dialog>
</template>

<script>
import Dialog from "@/components/Dialog/";
export default {
  name: "",
  components: { Dialog },
  props: {},
  data() {
    return {
      title: "人员配置",
      visible: false,
       tableData: {
        column: [
          {
            type: 'selection'
          },
          {
            prop: 'name',
            label: '角色名称'
          },
          {
            prop: 'type',
            label: '角色类型'
          },
          {
            prop: 'departmentName',
            label: '角色描述'
          },
        ],
        data: [
          {
          id: "3127e455-43ba-45ff-9326-0e02ef89485e",
          createdAt: null,
          updatedAt: "2022-08-04T03:38:27.626+0000",
          createdBy: null,
          updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
          sort: 1,
          name: "超级管理员",
          loginName: "admin",
          password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
          passwordSalt: "5178114777136485",
          email: null,
          lastLoginTime: null,
          mobilePhone: "18291003568",
          status: "ACTIVE",
          passwordChangeTime: "2021-12-10T08:01:01.569+0000",
          idCard: "612725202111021521",
          departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
          organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
          sex: "0",
          isDuty: true,
          type:"",
          code: "123324",
          jobLevel: null,
          telephone: "028-87720898",
          address: "办公地点修改测试",
          isLocked: false,
          departmentName: "研发部",
          _X_ROW_KEY: "row_276",
        },
          {
            name: '数据管理员',
            type:"1",
          },
          {
            name: '数据管理员2',
            type:"d",
          }
        ]
      },
      multipleSelection: []

    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    authorization() {
      this.visible = true;
    },
    close() {
      // this.resetForm()
      this.visible = false;
    },
    // 保存事件
    handleSaveMember() {
      // if (this.memberList.length === 0) {
      //   this.$message.warning("请添加待选人员");
      //   return false;
      // }
      // const idList = this.memberList.map(item => item.id)
      // updateUser(this.roleId, idList).then(res => {
      //   if (res.status === 1) {
      //     this.$message.success({ message: '保存成功', showClose: true })
      //     this.showMemberConfigDialog = false
      //     this.$emit('setUsers', this.roleId)
      //     this.resetMemberConfig()
      //   } else this.$message.error({ message: res.message, showClose: true })
      // })
    },
    handleSelectionChange (val) {
      console.log("vadddl",val);
      this.multipleSelection = val
    }
  }
};
</script>
<style scoped lang="scss">
/deep/.el-dialog__header{
   text-align: center;
   margin-bottom: 10px;
.el-dialog__title{
  color: white;
}
}
</style>