| | |
| | | <div class="table-page-search-wrapper"> |
| | | <div class="search-wrapper"> |
| | | <div> |
| | | <a-input v-model="formModel.name" :style="{ width: '320px' }" :placeholder="$t('请输入')" /> |
| | | <a-input |
| | | v-model="formModel.name" |
| | | :style="{ width: '320px' }" |
| | | :placeholder="$t('请输入')" |
| | | /> |
| | | </div> |
| | | <div> |
| | | <a-button type="primary" style="margin-right: 20px; margin-left: 10px" @click="search"> |
| | | <a-button |
| | | type="primary" |
| | | style="margin-right: 20px; margin-left: 10px" |
| | | @click="search" |
| | | > |
| | | <template #icon> |
| | | <icon-search /> |
| | | </template> |
| | |
| | | <div class="search-wrapper"> |
| | | <div> |
| | | <a-space> |
| | | <a-button type="primary" :align="'right'" @click="operation(0)">+ 新建用户组</a-button> |
| | | <a-button type="primary" :align="'right'" @click="operation(0)" |
| | | >+ 新建用户组</a-button |
| | | > |
| | | </a-space> |
| | | </div> |
| | | <div class="wrapper-icon"> |
| | |
| | | </div> |
| | | </a-tooltip> |
| | | <template #content> |
| | | <a-doption v-for="item in densityList" :key="item.value" :value="item.value" |
| | | :class="{ active: item.value === size }"> |
| | | <a-doption |
| | | v-for="item in densityList" |
| | | :key="item.value" |
| | | :value="item.value" |
| | | :class="{ active: item.value === size }" |
| | | > |
| | | <span>{{ item.name }}</span> |
| | | </a-doption> |
| | | </template> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <a-table row-key="id" :loading="loading" :pagination="pagination" :columns="columns" :data="renderData" |
| | | :bordered="false" :size="size" @page-change="onPageChange"> |
| | | <a-table |
| | | row-key="id" |
| | | :loading="loading" |
| | | :pagination="pagination" |
| | | :columns="columns" |
| | | :data="renderData" |
| | | :bordered="false" |
| | | :size="size" |
| | | @page-change="onPageChange" |
| | | > |
| | | <template #index="{ rowIndex }"> |
| | | {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }} |
| | | </template> |
| | | <template #status="{ record }"> |
| | | <a-switch v-model="record.status" checked-value="1" unchecked-value="0" |
| | | @change="statusChange(record.status, record)" /> |
| | | <a-switch |
| | | v-model="record.status" |
| | | checked-value="1" |
| | | unchecked-value="0" |
| | | @change="statusChange(record.status, record)" |
| | | /> |
| | | </template> |
| | | <template #operations="{ record }"> |
| | | <a-space> |
| | | <a-button type="outline" @click="operation(2, record)">编辑</a-button> |
| | | <a-button type="dashed" status="success" @click="operation(1, record)">成员管理</a-button> |
| | | <a-button type="dashed" status="warning" @click="operation(4, record)">权限管理</a-button> |
| | | <a-popconfirm content="请确认是否删除?" type="success" @ok="operation(3, record)"> |
| | | <a-button type="outline" @click="operation(2, record)" |
| | | >编辑</a-button |
| | | > |
| | | <a-button |
| | | type="dashed" |
| | | status="success" |
| | | @click="operation(1, record)" |
| | | >成员管理</a-button |
| | | > |
| | | <a-button |
| | | type="dashed" |
| | | status="warning" |
| | | @click="operation(4, record)" |
| | | >权限管理</a-button |
| | | > |
| | | <a-popconfirm |
| | | content="请确认是否删除?" |
| | | type="success" |
| | | @ok="operation(3, record)" |
| | | > |
| | | <a-button type="outline" status="danger">删除</a-button> |
| | | </a-popconfirm> |
| | | </a-space> |
| | | </template> |
| | | </a-table> |
| | | </a-card> |
| | | <a-modal v-model:visible="visible" :title="editModalTitle" width="30%" @cancel="handleCancel(1)" @ok="editHandleOk"> |
| | | <a-modal |
| | | v-model:visible="visible" |
| | | :title="editModalTitle" |
| | | width="30%" |
| | | @cancel="handleCancel(1)" |
| | | @ok="editHandleOk" |
| | | > |
| | | <a-form ref="formRef" :model="editform" auto-label-width> |
| | | <a-row> |
| | | <a-form-item field="loginName" label="用户组名称名称:" :rules="[{ required: true, message: '用户名必填' }]"> |
| | | <a-form-item |
| | | field="loginName" |
| | | label="用户组名称名称:" |
| | | :rules="[{ required: true, message: '用户名必填' }]" |
| | | > |
| | | <a-input v-model="editform.loginName" /> |
| | | </a-form-item> |
| | | </a-row> |
| | |
| | | </a-row> |
| | | </a-form> |
| | | </a-modal> |
| | | <a-modal v-model:visible="memberVisible" width="50%" title="用户组成员管理" @cancel="handleCancel(2)" |
| | | @ok="editDeptHandleOk"> |
| | | <a-modal |
| | | v-model:visible="memberVisible" |
| | | width="50%" |
| | | title="用户组成员管理" |
| | | @cancel="handleCancel(2)" |
| | | @ok="editDeptHandleOk" |
| | | > |
| | | <div :style="{ display: 'flex', justifyContent: 'center' }"> |
| | | <!-- TODO默认值回显 --> |
| | | <a-transfer show-search :data="memberList" :default-value="selectedMemberList" :source-input-search-props="{ |
| | | placeholder: '请输入用户名搜索' |
| | | }" :target-input-search-props="{ |
| | | placeholder: '请输入用户名搜索' |
| | | }"> |
| | | <a-transfer |
| | | show-search |
| | | :data="memberList" |
| | | :default-value="selectedMemberList" |
| | | :source-input-search-props="{ |
| | | placeholder: '请输入用户名搜索', |
| | | }" |
| | | :target-input-search-props="{ |
| | | placeholder: '请输入用户名搜索', |
| | | }" |
| | | > |
| | | <template #source-title>可选列表</template> |
| | | <template #target-title>已选列表</template> |
| | | </a-transfer> |
| | | </div> |
| | | </a-modal> |
| | | <a-modal v-if="resourcevisible" v-model:visible="resourcevisible" width="50%" title="权限管理" ok-text="关闭" |
| | | hide-cancel="true" @ok="handleCancel(3)"> |
| | | <a-modal |
| | | v-if="resourcevisible" |
| | | v-model:visible="resourcevisible" |
| | | width="50%" |
| | | title="权限管理" |
| | | ok-text="关闭" |
| | | hide-cancel="true" |
| | | @ok="handleCancel(3)" |
| | | > |
| | | <div :style="{ 'display': 'flex', 'flex-direction': 'column' }"> |
| | | <a-card :style="{ |
| | | <a-card |
| | | :style="{ |
| | | 'width': '100%', |
| | | 'height': '40%', |
| | | 'overflow-y': 'auto', |
| | | 'margin': '1px', |
| | | }" class="card-demo" title="用户所有权限" hoverable> |
| | | |
| | | }" |
| | | class="card-demo" |
| | | title="用户所有权限" |
| | | hoverable |
| | | > |
| | | <a-space wrap> |
| | | 菜单功能: |
| | | <!-- TODO默认值回显 --> |
| | | <a-checkbox-group :default-value="['1']"> |
| | | <a-checkbox v-for="(item, index) of checkStrictlyMenu" :value="item.menuId" :key="item.menuId"> |
| | | {{ item.menuName }}</a-checkbox> |
| | | <a-checkbox |
| | | v-for="(item, index) of checkStrictlyMenu" |
| | | :key="item.menuId" |
| | | :value="item.menuId" |
| | | > |
| | | {{ item.menuName }}</a-checkbox |
| | | > |
| | | </a-checkbox-group> |
| | | </a-space> |
| | | <a-divider /> |
| | |
| | | 知识库: |
| | | <!-- TODO默认值回显 --> |
| | | <a-checkbox-group :default-value="['1']"> |
| | | <a-checkbox v-for="(item, index) of checkStrictlyKnowledge" :value="item.menuId" :key="item.knowledgeId"> |
| | | {{ item.knowledgeName }}</a-checkbox> |
| | | <a-checkbox |
| | | v-for="(item, index) of checkStrictlyKnowledge" |
| | | :key="item.knowledgeId" |
| | | :value="item.menuId" |
| | | > |
| | | {{ item.knowledgeName }}</a-checkbox |
| | | > |
| | | </a-checkbox-group> |
| | | </a-space> |
| | | <a-divider /> |
| | |
| | | 智能体: |
| | | <!-- TODO默认值回显 --> |
| | | <a-checkbox-group :default-value="['1']"> |
| | | <a-checkbox v-for="(item, index) of checkStrictlyDialog" :value="item.dialogId" :key="item.menuId"> |
| | | {{ item.dialogName }}</a-checkbox> |
| | | <a-checkbox |
| | | v-for="(item, index) of checkStrictlyDialog" |
| | | :key="item.menuId" |
| | | :value="item.dialogId" |
| | | > |
| | | {{ item.dialogName }}</a-checkbox |
| | | > |
| | | </a-checkbox-group> |
| | | <!-- TODO默认值回显 --> |
| | | <a-checkbox-group :default-value="['1']"> |
| | | <a-checkbox v-for="(item, index) of checkStrictlyAgent" :value="item.agentId" :key="item.menuId"> |
| | | {{ item.agentName }}</a-checkbox> |
| | | <a-checkbox |
| | | v-for="(item, index) of checkStrictlyAgent" |
| | | :key="item.menuId" |
| | | :value="item.agentId" |
| | | > |
| | | {{ item.agentName }}</a-checkbox |
| | | > |
| | | </a-checkbox-group> |
| | | </a-space> |
| | | </a-card> |
| | |
| | | <script lang="ts" setup> |
| | | import { computed, reactive, ref, h, onMounted } from 'vue'; |
| | | import { useI18n } from 'vue-i18n'; |
| | | import useLoading from '@/hooks/loading'; |
| | | import { Pagination } from '@/types/global'; |
| | | import type { TableColumnData } from '@arco-design/web-vue/es/table/interface'; |
| | | import { |
| | | DialogList, |
| | | KnowledgeList, |
| | | OrganizationList, |
| | | ResourceList, |
| | | Role, |
| | | RoleList, |
| | | User, |
| | | UserAdd, |
| | | UserChangePwd, |
| | | UserDelete, |
| | | UserEdit, |
| | | UserList, |
| | | GroupList, |
| | | Userstatus, |
| | | } from '@/api/authority'; |
| | | import useLoading from '@/hooks/loading'; |
| | | import { Pagination } from '@/types/global'; |
| | | import type { TableColumnData } from '@arco-design/web-vue/es/table/interface'; |
| | | import { Modal } from '@arco-design/web-vue'; |
| | | import Authheader from '@/views/authority/components/authheader.vue'; |
| | | import { create } from 'lodash'; |
| | |
| | | value: 'zhangsan', |
| | | }, |
| | | ]); |
| | | const selectedMemberList = ref(['zhangsan']) |
| | | const selectedMemberList = ref(['zhangsan']); |
| | | |
| | | const roles = ref([]); |
| | | |
| | |
| | | ) => { |
| | | setLoading(true); |
| | | try { |
| | | await UserList(params).then((res) => { |
| | | await GroupList(params).then((res) => { |
| | | for (const user of res.rows) { |
| | | if (user.dept) { |
| | | for (const d of user.dept) { |
| | |
| | | |
| | | :deep(.arco-transfer-view) { |
| | | width: 250px; |
| | | height: 400px |
| | | height: 400px; |
| | | } |
| | | </style> |
| | | |