无人机管理后台前端(已迁走)
张含笑
2025-12-09 5808f76456ca0d40de5074f132b73a5a488e3e13
src/views/system/user.vue
@@ -1,17 +1,19 @@
<template>
  <div class="manage-p-all-10 manage-p-t-0 manage-h-0 manage-flex-1 manage-flex">
    <div class="manage-flex-2 manage-h-100">
      <div class="box">
    <div
      class="manage-p-all-20 manage-flex-2 manage-h-100 manage-b-r-5 manage-box-s-b-b manage-overflow-h manage-b-c-w">
      <div class="box ">
        <el-scrollbar>
          <basic-container>
          <div class="manage-w-100 manage-h-100">
            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
          </basic-container>
          </div>
        </el-scrollbar>
      </div>
    </div>
    <div class="manage-flex-6 manage-h-100 manage-flex manage-f-d-c">
      <basic-container>
    <div
      class="manage-p-all-10 manage-p-t-0 manage-p-b-0 manage-flex-9 manage-h-100 manage-flex manage-box-s-b-b manage-f-d-c">
      <div class="manage-p-all-20 manage-h-100 manage-box-s-b-b manage-b-c-w  manage-b-r-5">
        <avue-crud :option="option" v-model:search="search" :table-loading="loading" :data="data" ref="crud"
          v-model="form" :permission="permissionList" @row-del="rowDel" @row-update="rowUpdate" @row-save="rowSave"
          :before-open="beforeOpen" v-model:page="page" @search-change="searchChange" @search-reset="searchReset"
@@ -24,9 +26,9 @@
            <el-button type="danger" plain icon="el-icon-delete" v-if="permission.user_delete && !auditMode"
              @click="handleDelete">删 除
            </el-button>
            <el-button type="primary" plain icon="el-icon-operation"
              v-if="userInfo.role_name.includes('admin') && !auditMode" @click="handleAudit">审 核
            </el-button>
<!--            <el-button type="primary" plain icon="el-icon-operation"-->
<!--              v-if="userInfo.role_name.includes('admin') && !auditMode" @click="handleAudit">审 核-->
<!--            </el-button>-->
            <el-button type="success" plain icon="el-icon-check"
              v-if="userInfo.role_name.includes('admin') && auditMode" @click="handleAuditPass">通 过
            </el-button>
@@ -42,9 +44,9 @@
            <el-button type="info" plain v-if="permission.user_reset && !auditMode" icon="el-icon-refresh"
              @click="handleReset">密码重置
            </el-button>
            <el-button type="info" plain v-if="userInfo.role_name.includes('admin') && !auditMode"
              icon="el-icon-setting" @click="handlePlatform">平台配置
            </el-button>
<!--            <el-button type="info" plain v-if="userInfo.role_name.includes('admin') && !auditMode"-->
<!--              icon="el-icon-setting" @click="handlePlatform">平台配置-->
<!--            </el-button>-->
            <el-button type="info" plain v-if="userInfo.role_name.includes('admin') && !auditMode"
              icon="el-icon-coordinate" @click="handleLock">账号解封
            </el-button>
@@ -104,7 +106,7 @@
            </template>
          </avue-crud>
        </el-dialog>
      </basic-container>
      </div>
    </div>
  </div>
</template>
@@ -223,11 +225,11 @@
        },
      },
      option: {
        // height: 'auto',
        // calcHeight: 140,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        searchGutter: 30,
        searchMenuPosition: 'left',
        searchMenuSpan: 4,
        border: true,
        index: true,
        selection: true,
@@ -235,11 +237,15 @@
        viewBtn: true,
        dialogType: 'drawer',
        dialogClickModal: false,
        height: 'auto',
        calcHeight: 20,
        column: [
          {
            label: '登录账号',
            prop: 'account',
            search: true,
            searchSpan: 5,
            display: false,
          },
          // {
@@ -252,6 +258,7 @@
            label: '用户姓名',
            prop: 'realName',
            search: true,
            searchSpan: 5,
            display: false,
          },
          {
@@ -399,8 +406,8 @@
                  },
                  {
                    min: 2,
                    max: 10,
                    message: '姓名长度在2到5个字符',
                    max: 50,
                    message: '姓名长度在2到50个字符',
                  },
                ],
              },
@@ -483,7 +490,7 @@
                label: '所属部门',
                prop: 'deptId',
                type: 'tree',
                multiple: true,
                multiple: false,
                dicData: [],
                // props: {
                //   label: 'title',
@@ -512,6 +519,7 @@
            column: [
              {
                label: '到期时间',
                labelWidth: 110,
                prop: 'expireTime',
                type: 'datetime',
                format: 'YYYY-MM-DD HH:mm:ss',
@@ -519,12 +527,14 @@
              },
              {
                label: '次数限制',
                labelWidth: 110,
                prop: 'maxLoginNum',
                type: 'input',
              },
              {
                label: '飞行开始时间',
                labelWidth: 110,
                prop: 'flightStartTime',
                type: 'time',
                format: 'HH:mm',
@@ -539,6 +549,7 @@
              },
              {
                label: '飞行结束时间',
                labelWidth: 110,
                prop: 'flightEndTime',
                type: 'time',
                format: 'HH:mm',
@@ -782,7 +793,7 @@
        }
      }
      row.deptId = func.join(row.deptId)
      // row.deptId = func.join(row.deptId)
      row.roleId = func.join(row.roleId)
      row.postId = func.join(row.postId)
      row.name = row.realName
@@ -825,7 +836,7 @@
        }
      }
      row.deptId = func.join(row.deptId)
      // row.deptId = func.join(row.deptId)
      row.roleId = func.join(row.roleId)
      row.postId = func.join(row.postId)
      row.name = row.realName
@@ -1050,9 +1061,9 @@
      if (['edit', 'view'].includes(type)) {
        getUser(this.form.id).then(res => {
          this.form = res.data.data
          if (this.form.hasOwnProperty('deptId')) {
            this.form.deptId = func.split(this.form.deptId)
          }
          // if (this.form.hasOwnProperty('deptId')) {
          //   this.form.deptId = func.split(this.form.deptId)
          // }
          if (this.form.hasOwnProperty('roleId')) {
            this.form.roleId = func.split(this.form.roleId)
          }
@@ -1165,16 +1176,16 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.box {
  height: 100%;
}
.el-scrollbar {
::v-deep(.el-scrollbar) {
  height: 100%;
}
.box .el-scrollbar__wrap {
  overflow: scroll;
  .el-scrollbar__wrap {
    overflow: auto;
  }
}
</style>