husq
2023-09-27 2c2bc8614c8ea0ce386369eb4924da1e6aa052d1
src/pages/page-web/projects/members.vue
@@ -21,10 +21,10 @@
      <template #action="{ record }">
        <div class="editable-row-operations">
          <span v-if="editableData[record.user_id]">
            <a-tooltip title="Confirm changes">
            <a-tooltip title="保存">
              <span @click="save(record)" style="color: #28d445;"><CheckOutlined /></span>
            </a-tooltip>
            <a-tooltip title="Modification canceled">
            <a-tooltip title="取消">
              <span @click="() => delete editableData[record.user_id]" class="ml15" style="color: #e70102;"><CloseOutlined /></span>
            </a-tooltip>
          </span>
@@ -43,14 +43,16 @@
import { TableState } from 'ant-design-vue/lib/table/interface'
import { onMounted, reactive, Ref, ref, UnwrapRef } from 'vue'
import { IPage } from '/@/api/http/type'
import { getAllUsersInfo, updateUserInfo } from '/@/api/manage'
import { getAllUsersInfo, getUserPage, updateUserInfo } from '/@/api/manage'
import { ELocalStorageKey } from '/@/types'
import { EditOutlined, DeleteOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons-vue'
import { useMyStore } from '/@/store'
export interface Member {
    user_id: string
    username: string
    organization_name: string
    workspace_name: string
    project: string
    create_time: string
    user_role: string
@@ -62,11 +64,11 @@
}
const columns = [
  { title: '账号', dataIndex: 'username', width: 150, sorter: (a: Member, b: Member) => a.username.localeCompare(b.username), className: 'titleStyle' },
  { title: '人员组织名称', dataIndex: 'organization_name', sorter: (a: Member, b: Member) => a.organization_name.localeCompare(b.organization_name), width: 150, className: 'titleStyle' },
  { title: '用户角色', dataIndex: 'user_role', width: 150, className: 'titleStyle', slots: { customRender: 'user_role' } },
  { title: '所属项目', dataIndex: 'project', width: 150, className: 'titleStyle' },
  { title: '人员组织名称', dataIndex: 'deptName', sorter: (a: Member, b: Member) => a.organization_name.localeCompare(b.organization_name), width: 150, className: 'titleStyle' },
  { title: '用户角色', dataIndex: 'roleName', width: 150, className: 'titleStyle', slots: { customRender: 'user_role' } },
  { title: '所属项目', dataIndex: 'projectName', width: 150, className: 'titleStyle' },
  { title: '加入方式', dataIndex: 'join_way', width: 150, className: 'titleStyle', slots: { customRender: 'join_way' } },
  { title: '加入时间', dataIndex: 'create_time', width: 150, sorter: (a: Member, b: Member) => a.create_time.localeCompare(b.create_time), className: 'titleStyle' },
  { title: '加入时间', dataIndex: 'createTime', width: 150, sorter: (a: Member, b: Member) => a.create_time.localeCompare(b.create_time), className: 'titleStyle' },
  { title: '操作', dataIndex: 'action', width: 70, className: 'titleStyle', slots: { customRender: 'action' } },
]
@@ -104,6 +106,7 @@
  page_size: 50
}
const workspaceId: string = localStorage.getItem(ELocalStorageKey.WorkspaceId)!
const store = useMyStore()
onMounted(() => {
  getAllUsers(workspaceId, body)