roleslistdiglog.vue 4.24 KB
<template>
  <Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()">
    <template slot="content">
      <vxe-table
        show-overflow
        :data="memberList"
        border
        class="header-bg-type1"
        auto-resize
        :checkbox-config="{ highlight: true, range: true }"
        highlight-hover-row
        max-height="500px"
        :empty-render="{ name: 'NotData' }"
      >
        <template #empty>
          <table-empty />
        </template>
        <vxe-table-column
          type="checkbox"
          width="60"
          align="left"
          fixed="left"
        />
        <vxe-table-column
          field="code"
          title="工号"
          fixed="left"
          min-width="100"
          show-header-overflow="tooltip"
          show-overflow="tooltip"
          align="left"
        />
        <vxe-table-column
          title="姓名"
          fixed="left"
          show-header-overflow="tooltip"
          show-overflow="tooltip"
        >
          <template slot-scope="scope">
            <svg-icon
              :icon-class="
                scope.row.sex === '0'
                  ? 'male'
                  : scope.row.sex === '1'
                  ? 'female'
                  : 'secrecy'
              "
            />
            {{ scope.row.name }}
          </template>
        </vxe-table-column>
        <vxe-table-column
          field="loginName"
          title="用户名"
          fixed="left"
          show-header-overflow="tooltip"
          show-overflow="tooltip"
        />
        <vxe-table-column
          field="departmentName"
          title="部门"
          show-header-overflow="tooltip"
          show-overflow="tooltip"
        />
      </vxe-table>
    </template>
    <template slot="footer">
      <el-button type="primary" class="save" @click="submitForm(1)"
        >保存</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 {
      form: {
        sex: "0",
      },
      memberList: [
        {
          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,
          code: "123324",
          jobLevel: null,
          telephone: "028-87720898",
          address: "办公地点修改测试",
          isLocked: false,
          departmentName: "研发部",
          _X_ROW_KEY: "row_276",
        },
      ],
      title: "",
      type: "",
      visible: false,
      showLoginName: false,
      options: [],
      setProps: {
        value: "id",
        label: "name",
        children: "children",
        expandTrigger: "hover",
        checkStrictly: true, // 可取消关联,选择任意一级选项
        emitPath: false,
      },
      sexList: [],
      levelList: [],
      organizationId: "", // 组织机构ID
      departmentId: "", // 部门ID
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    adds() {
      this.visible = true;
    },
    edit(record) {
      this.visible = true;
    },
    handleChange(value) {
      this.form.departmentId = value;
    },

    close() {
      // this.resetForm()
      this.visible = false;
    },
  },
};
</script>
<style scoped lang="scss">
.el-form {
  .el-form-item__content {
    .el-radio {
      margin-right: 6px;
    }
  }
  .el-checkbox {
    line-height: 40px;
  }
  .col-pd0 {
    padding: 0 !important;
  }
}
</style>