用户管理页面(解决toggleRowSelection在dialog用不了的隐患,包含el-table的plus版本的组件)

news2025/6/6 9:12:07

新增/编辑/删除/分配角色,图片上传在此文章分类下另一个文章

1.重点分配角色:

<template>
  <!-- 客户资料 -->
  <div class="pageBox">

    <elPlusTable :tableData="tableData" :tablePage="tablePage" @onSizeChange='onSizeChange' @onCurrentChange='onCurrentChange'>
      <template v-slot:searchConditions>
        <el-form-item label="用户名称">
          <el-input v-model="formInline.name" placeholder="请输入" clearable />
        </el-form-item>
        <el-form-item label="用户账号">
          <el-input v-model="formInline.username" placeholder="请输入" clearable />
        </el-form-item>
        <el-form-item label="用户电话">
          <el-input v-model="formInline.mobilenumber" placeholder="请输入" clearable />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">
            <Search style="width: 1em; height: 1em; margin-right: 8px" />
            查询
          </el-button>
          <el-button type="primary" @click="onSubmitreset">
            <Search style="width: 1em; height: 1em; margin-right: 8px" />
            重置
          </el-button>
        </el-form-item>
      </template>
      <template v-slot:optionBtn>
        <el-button type="primary" @click="clickDialogBtn('新增',{})">
          <Plus style="width: 1em; height: 1em; margin-right: 8px" />
          新增
        </el-button>
        <el-button @click="adminGetAllUser">
          <Delete style="width: 1em; height: 1em; margin-right: 8px" />
          删除
        </el-button>
      </template>
      <template v-slot:tableColumns>
        <el-table-column type="selection" align="center" :selectable="selectable" width="110" />

        <el-table-column prop="avatar" align="center" label="头像">
          <template #default="scope">
            <el-image style="height: 40px;width: 40px;" :src="scope.row.avatar"></el-image>
          </template>
        </el-table-column>
        <el-table-column prop="nickname" align="center" label="用户名称" />
        <el-table-column prop="username" align="center" label="用户账号" />
        <el-table-column prop="mobileNumber" align="center" label="用户电话" />
        <el-table-column prop="email" align="center" label="用户Email" />
        <el-table-column fixed="right" align="center" label="操作" min->
          <template #default="scope">
            <el-button link type="primary" size="small" @click="clickDialogBtn('编辑',scope.row)">
              <Edit style="width: 1em; height: 1em; margin-right: 8px" />
              编辑
            </el-button>
            <el-button @click="remove(scope.row)" link type="primary" size="small">
              <Delete style="width: 1em; height: 1em; margin-right: 8px" />
              删除
            </el-button>
            <el-button link type="primary" size="small" @click="handleClick(scope.row)">
              分配角色
            </el-button>
          </template>
        </el-table-column>
      </template>
    </elPlusTable>

    <assigningRoles ref='assigningRolesREF' @onSure="onSureRole" />
    <addOrEditDialog ref="dialogRef" @onSure='addOnSure' @onSure2='addOnSurePWD'></addOrEditDialog>
  </div>
</template>
<script lang="ts">
import { Options, Vue } from 'vue-class-component'
import PageBase from '@common/views/PageBase'
import assigningRoles from './assigningRoles.vue'
import elPlusTable from '@src/components/elPlusTableBase/index.vue'
import addOrEditDialog from './addOrEditDialog.vue'
import { useTTACLinkStore } from '@src/store/index'
import {
  adminGetAllUser,
  allocationUserRole,
  adminGetAllUserByPage,
  adminAddUser,
  adminRemoveUser,
  adminUpdateUser,
  adminUpdateUserPwd,
  getUserRoles,
  getAuthById,
  getAllAuth
} from '@common/apis/ttacLink'

import {
  ElImage,
  ElPopconfirm,
  ElTable,
  ElTableColumn,
  ElButton,
  ElRadio,
  ElRadioGroup,
  ElMessage,
  ElForm,
  ElInput,
  ElIcon,
  ElTooltip,
  ElCheckbox,
  ElCheckboxGroup,
  ElFormItem,
  ElSelect,
  ElOption,
  ElDialog
} from 'element-plus'
import { ElMessageBox } from 'element-plus'

@Options({
  components: {
    ElImage,
    ElPopconfirm,
    ElMessage,
    addOrEditDialog,
    elPlusTable,
    assigningRoles,
    ElTable,
    ElTableColumn,
    ElButton,
    ElRadio,
    ElRadioGroup,
    ElForm,
    ElInput,
    ElIcon,
    ElTooltip,
    ElCheckbox,
    ElCheckboxGroup,
    ElFormItem,
    ElSelect,
    ElOption,
    ElDialog
  }
})
export default class index extends PageBase {
  // 按钮功能权限
  private buttons: any = []
  // 权限读取
  private async getNowCustomerPageAuthInfoFn() {
    const ttacLinkStore = useTTACLinkStore()
    // let apiRoutes = await getAuthById(ttacLinkStore.currentUserInfo.userinfo.id)
    let apiRoutes = await getAllAuth()

    // getStore().commit('system/set_PCAPI_routes', apiRoutes)
    // if (this.$store.state.system.PCAPI_routes.findIndex((item) => item.menuPath == this.$route.path) > -1) {
    //   this.buttons = this.$store.state.system.PCAPI_routes.find((item) => item.menuPath == this.$route.path).button.split(',')
    // }
    // console.log('按钮权限:', this.buttons)
  }
  mounted() {
    this.adminGetAllUser()
    this.getNowCustomerPageAuthInfoFn()
  }
  private url = 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
  private async remove(row) {
    // 使用 confirm 对话框的例子
    ElMessageBox.confirm('是否删除该行?', '警告', {
      distinguishCancelAndClose: true,
      confirmButtonText: '确定',
      cancelButtonText: '取消'
    })
      .then(async () => {
        console.log('用户点击了确定')

        let res = await adminRemoveUser([row.id])
        if (res.code == -1) {
          ElMessage({
            message: '删除失败!',
            type: 'error'
          })
        } else {
          ElMessage({
            message: '删除成功!',
            type: 'success'
          })
          this.adminGetAllUser()
        }
      })
      .catch((action) => {
        if (action === 'cancel') {
          console.log('用户点击了取消')
          // ElMessage({
          //       message: '取消!',
          //       type: 'error'
          //     })
        } else {
          console.log('用户关闭了对话框')
        }
      })
  }
  private async addOnSurePWD(data, key) {
    if (key == '编辑') {
      try {
        await adminUpdateUserPwd(data)

        ElMessage({
          message: '修改密码成功!',
          type: 'success'
        })
        this.adminGetAllUser()
      } catch (error) {}
    }
  }
  private async addOnSure(data, key) {
    if (key == '新增') {
      try {
        await adminAddUser(data)
      } catch (e) {
        ElMessage({
          message: '新增失败!',
          type: 'error'
        })
        return
      }
      ElMessage({
        message: '新增成功!',
        type: 'success'
      })
      this.adminGetAllUser()
    } else if (key == '编辑') {
      try {
        await adminUpdateUser(data)

        ElMessage({
          message: '编辑成功!',
          type: 'success'
        })
        this.adminGetAllUser()
      } catch (error) {}
    }
  }
  private async onSureRole(currentUserId, roles) {
    // 更新用户的角色列表
    let requestdata = { userId: currentUserId, userroleIds: [] }
    for (let index = 0; index < roles.length; index++) {
      const element = roles[index]
      requestdata.userroleIds.push(element.id)
    }
    await allocationUserRole(requestdata)
    // '分配角色成功'
    // this.$lyl_notifyPopup.success(`${this.$t('i18n.roleChangeInfo')}`)

    ElMessage({
      message: '成功分配权限!',
      type: 'success'
    })
  }
  private clickDialogBtn(dialogTitle: string, rowData: any) {
    ;(this.$refs.dialogRef as any).openDialog(dialogTitle, rowData)
  }

  private tablePage: any = {
    pageSize: 10,
    total: 0,
    currentPage: 1
  }
  private async adminGetAllUser() {
    try {
      let res = await adminGetAllUserByPage(
        this.tablePage.currentPage,
        this.tablePage.pageSize,
        this.formInline.name,
        this.formInline.username,
        this.formInline.mobilenumber
      )
      this.tableData = res.data.data
      this.tablePage.total = res.data.totalDataCount
      this.tablePage.currentPage = res.data.pageIndex
    } catch (error) {
      console.log(error)
    }

    // let res = await adminGetAllUser()
    // this.tableData = res.data
  }
  private userId: string = ''

  private async handleClick(row) {
    this.userId = row.id
    let currentRoles = await getUserRoles(row.id)
    ;(this.$refs.assigningRolesREF as any).openDialog(row, currentRoles.data)
  }
  private formInline: any = {
    name: '',
    username: '',
    mobilenumber: ''
  }

  private onSubmit = () => {
    this.adminGetAllUser()
    console.log('submit!')
  }
  private onSubmitreset() {
    this.formInline = {
      name: '',
      username: '',
      mobilenumber: ''
    }
    this.adminGetAllUser()
  }
  private selectable: any = null
  private tableData: any[] = []
  private onSizeChange(val) {
    this.tablePage.pageSize = val
    this.tablePage.currentPage = 1
    this.adminGetAllUser()
    console.log('变化了', val)
  }
  private onCurrentChange(val) {
    this.adminGetAllUser()
    console.log('变化了', val)
  }
}
</script>


 

1.新增

<template>
  <el-dialog v-model="visible" title="分配角色" width="500px" center>
    <div style='margin-top:20px;height:76%;'>
      <elPlusTable ref="elplustableREF" :showPagination='showPagination' :showButton='showButton' :showSearch='showSearch' :tableData="tableData"
        @onSelectedData='getSelectionDataInfo'>
        <template v-slot:tableColumns>
          <el-table-column type="selection" min-width="55" />
          <el-table-column prop="rolename" label="角色名称" min-width="180" />
        </template>
      </elPlusTable>
    </div>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="confirm">
          确认
        </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script lang="ts" >
import { ref, nextTick } from 'vue'
import { Options, Vue } from 'vue-class-component'
import elPlusTable from '@src/components/elPlusTableBase/index.vue'
import { Component, Prop, Emit, Watch } from 'vue-property-decorator'
import moment from 'moment'

// import { downloadHisPdf } from '@/utils/PDF/getPdfDoc'

import { getAllRole } from '@common/apis/ttacLink'
import PageBase from '@common/views/PageBase'
import {
  ElTableColumn,
  ElButton,
  ElRadio,
  ElRadioGroup,
  ElMessage,
  ElForm,
  ElInput,
  ElTable,
  ElIcon,
  ElTooltip,
  ElCheckbox,
  ElCheckboxGroup,
  ElFormItem,
  ElSelect,
  ElOption,
  ElDialog,
  ElRow
} from 'element-plus'
import { fa } from 'element-plus/es/locale'

@Options({
  components: {
    elPlusTable,
    ElRow,
    ElDialog,
    ElTable,
    ElTableColumn,
    ElButton,
    ElRadio,
    ElRadioGroup,
    ElForm,
    ElInput,
    ElIcon,
    ElTooltip,
    ElCheckbox,
    ElCheckboxGroup,
    ElFormItem,
    ElSelect,
    ElOption
  }
})
export default class index extends PageBase {
  mounted() {}
  private showPagination: boolean = false
  private visible: boolean = false
  private showSearch: boolean = false
  private showButton: boolean = false
  public async openDialog(val, currentRoles) {
    this.visible = true
    let res = await getAllRole()
    this.tableData = res.data

    // userId:当前行用户的 id    currentRoles:当前行用户的角色信息
    this.currentUserId = val.id
    //  计算已经初始化选中的行
    let initrows = []
    if (currentRoles) {
      for (let index = 0; index < this.tableData.length; index++) {
        const element = this.tableData[index]
        let find = currentRoles.find((o) => o.rolename === element.rolename)
        if (find) {
          initrows.push(element)
        }
      }
      await this.$nextTick()
      ;(this.$refs.elplustableREF as any).toggleRowSelections(initrows)

      window.console.log('initrows:', initrows)
    }

    // toggleRowSelection
  }
  private currentUserId: string = ''

  private ruleForm: any = {}
  private confirm() {
    this.onSure(this.currentUserId, this.chooseArray)
    this.visible = false
  }
  private close() {
    this.ruleForm = {}
    this.visible = false
  }
  private radio: any = ''
  private tableData: any[] = []
  // private tabHeight: string = '440px'
  // private getClickRowInfo(row) {
  //   this.$nextTick(() => {
  //     // ;(this.$refs.elplustableREF as any).toggleRowSelection(row, true)
  //   })
  //   // this.tableData.filter((item, index) => {
  //   //   if (row.id == item.id) {
  //   //     this.radio = index
  //   //   }
  //   // })
  // }
  private chooseArray: any[] = []
  private getSelectionDataInfo(row) {
    this.chooseArray = row
  }

  @Emit('onSure')
  private onSure(currentUserId: string, chooseArray: any[]) {}
}
</script>
<style lang="scss" scoped></style>

 

3.el-table抽离出来的组件 

//el-table抽离出来的组件
<template>
  <!-- 规格参数 -->
  <div class="pageBox">
    <div class="searchBox" v-if="showSearch">
      <!-- 搜索条件 -->
      <slot name="searchConditions"> </slot>
    </div>
    <div class="contentBox">
      <div class="optionBox" v-if="showButton">
        <!-- 操作按钮 -->
        <slot name="optionBtn"> </slot>
      </div>
      <div class="tableBox" :style="{ height: showPagination ? 'calc(100% - 100px)' : 'calc(100% - 50px)' }">
        <el-table ref='pTable' height="100%" :data="tableData" style="width: 100%" @row-click="rowClickFn" @selection-change="selectionChange"
          :header-cell-style="{ backgroundColor: '#007caa',color:'#fff' }">>
          <!-- 表列表 -->
          <slot name="tableColumns"> </slot>
        </el-table>
      </div>
      <div class="paginationBox" v-if="showPagination">
        <!-- 分页 -->
        <el-pagination v-model:current-page="tablePage.currentPage" v-model:page-size="tablePage.pageSize" :page-sizes="tablePage.pageSizes"
          :size="size" :disabled="disabled" :background="background" layout="total, sizes, prev, pager, next, jumper" :total="tablePage.total"
          @size-change="handleSizeChange" @current-change="handleCurrentChange" />
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { Options, Vue } from 'vue-class-component'
import PageBase from '@common/views/PageBase'
import addOrEditDialog from './addOrEditDialog.vue'
import { Prop, Component, Emit, Watch } from 'vue-property-decorator'
import {
  ElTable,
  ElTableColumn,
  ElButton,
  ElRadio,
  ElRadioGroup,
  ElMessage,
  ElForm,
  ElInput,
  ElIcon,
  ElTooltip,
  ElCheckbox,
  ElCheckboxGroup,
  ElFormItem,
  ElSelect,
  ElOption,
  ElDialog,
  ElPagination
} from 'element-plus'
import { computed } from 'vue'
import type { ComponentSize } from 'element-plus'
import dataDashboard from '@src/utils/modules/apiList/dataDashboard/dataDashboard'
@Options({
  components: {
    ElTable,
    ElTableColumn,
    ElButton,
    ElRadio,
    ElRadioGroup,
    ElForm,
    ElInput,
    ElIcon,
    ElTooltip,
    ElCheckbox,
    ElCheckboxGroup,
    ElFormItem,
    ElSelect,
    ElOption,
    ElDialog,
    ElPagination
  }
})
export default class index extends PageBase {
  mounted() {}
  @Prop({
    default: () => []
  })
  private tableData: any[]
  //  ------------------------------分页-----------------------------------------
  @Prop({
    default: true
  })
  showPagination: boolean //是否需要展示分页
  @Prop({
    default: true
  })
  showSearch: boolean //是否需要搜索
  @Prop({
    default: true
  })
  showButton: boolean //是否需要搜索
  @Prop({
    default: 20
  })
  total: number //数据总数
  //分页
  @Prop({
    default: {
      total: 0,
      currentPage: 1,
      pageSize: 10
    }
  })
  tablePage: any

  private currentPage: number = 1 //当前页数
  private pageSize: number = 10 //一页多少条数据
  private pageSizes: number[] = [10, 20, 30, 40, 50]
  private size: string = 'default'
  private background: boolean = false
  private disabled: boolean = false
  // 处理页码大小
  private handleSizeChange = (val: number) => {
    console.log(val)
    this.onSizeChange(val)
  }
  // 当前页变动
  private handleCurrentChange = (val: number) => {
    console.log(val)
    this.onCurrentChange(val)
  }
  private selectionChange(rows: any[]) {
    if (rows.length > 0) {
    }
    // if (val.length > 0) {
    //   ;(this.$refs.pTable as any).toggleRowSelection(val, true)
    // }
    this.onSelectedData(rows)
  }

  // 当选择项发生变化时会触发该事件
  @Emit('onSelectedData')
  private onSelectedData(data) {}

  private rowClickFn(data: any) {
    ;(this.$refs.pTable as any).toggleRowSelection(data)

    this.getRowClickFn(data)
  }

  @Emit('getRowClickFn')
  private getRowClickFn(data: any) {}

  @Emit('onSizeChange')
  private onSizeChange(data: any) {}
  @Emit('onCurrentChange')
  private onCurrentChange(data: any) {}



//这个解决了toggleRowSelection在dialog里用不了的隐患
  public toggleRowSelections(rows: any[]) {
    const table = this.$refs.pTable as any
    if (table && table.toggleRowSelection) {
      rows.forEach((row) => {
        table.toggleRowSelection(row, true)
      })
    }
  }

  //  ---------------------------------------------------------------------------
}
</script>

<style lang="scss" scoped>
.pageBox {
  width: 100%;
  height: 100%;
  padding: 30px;
  box-sizing: border-box;
  .searchBox {
    width: 100%;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: left;
    padding: 10px;
    box-sizing: border-box;
    box-shadow: 0px 4px 12px 0px rgba(138, 149, 163, 0.35);
    ::v-deep .el-form-item.asterisk-left {
      margin: 0 10px 0 0;
    }
  }
  .contentBox {
    padding: 10px;
    box-sizing: border-box;
    .optionBox {
      width: 100%;
      height: 50px;
      display: flex;
      align-items: center;
    }
    .tableBox {
      width: 100%;
    }
    .paginationBox {
      height: 50px;
      width: 100%;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: right;
    }
    width: 100%;
    height: calc(100% - 130px);
    border-radius: 10px;
    box-shadow: 0px 4px 12px 0px rgba(138, 149, 163, 0.35);
  }
}
.demo-pagination-block + .demo-pagination-block {
  margin-top: 10px;
}
.demo-pagination-block .demonstration {
  margin-bottom: 16px;
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2399139.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Linux-GCC、makefile、GDB

GCC gcc -E test.c -o test.i预处理(-o指定文件名) gcc -S test.i -o test.s编译gcc -c test.s -o test.o汇编gcc test.o -o test链接(生成一个可执行程序的软连接) gcc test.c -o test一条指令可以完成以上所有内容 gcc *.c -I(大写的i) include由于在main.c中找不到当前文件…

[MySQL初阶]MySQL(7) 表的内外连接

标题&#xff1a;[MySQL初阶]MySQL(7)表的内外连接 水墨不写bug 文章目录 一. 内连接 (INNER JOIN)二. 外连接 (OUTER JOIN)关键区别总结 三、 如何选择 在 MySQL 中&#xff0c;连接&#xff08;JOIN&#xff09;用于根据两个或多个表之间的相关列组合行。内连接&#xff08;I…

【R语言编程绘图-mlbench】

mlbench库简介 mlbench是一个用于机器学习的R语言扩展包&#xff0c;主要用于提供经典的基准数据集和工具&#xff0c;常用于算法测试、教学演示或研究场景。该库包含多个知名数据集&#xff0c;涵盖分类、回归、聚类等任务。 包含的主要数据集 BostonHousing 波士顿房价数据…

检索器组件深入学习与使用技巧 BaseRetriever 检索器基类

1. BaseRetriever 检索器基类 在 LangChain 中&#xff0c;传递一段 query 并返回与这段文本相关联文档的组件被称为 检索器&#xff0c;并且 LangChain 为所有检索器设计了一个基类——BaseRetriever&#xff0c;该类继承了 RunnableSerializable&#xff0c;所以该类是一个 …

【Doris基础】Doris中的Replica详解:Replica原理、架构

目录 1 Replica基础概念 1.1 什么是Replica 1.2 Doris中的副本类型 2 Doris副本架构设计 2.1 副本分布机制 2.2 副本一致性模型 3 副本生命周期管理 3.1 副本创建流程 3.2 副本恢复机制 4 副本读写流程详解 4.1 写入流程与副本同步 4.2 查询流程与副本选择 5 副本…

【中国·广州】第三届信号处理与智能计算国际学术会议 (SPIC2025) 即将开启

第三届信号处理与智能计算国际学术会议 (SPIC2025) 即将开启 在信息技术飞速发展的当下&#xff0c;信号处理与智能计算作为前沿科技领域&#xff0c;正深刻改变着我们的生活与产业格局。为汇聚全球顶尖智慧&#xff0c;推动该领域进一步突破&#xff0c;第三届信号处理与智能…

Android12 Launcher3显示所有应用列表

Android12 Launcher3显示所有应用列表 1.前言&#xff1a; 最近在Android12Rom定制时需要显示所有桌面应用的图标&#xff0c;并且不能去掉抽屉&#xff0c;在手机上面抽屉和所有应该列表是两种不同模式&#xff0c;用户基可以自行选择&#xff0c;但是在自定义的launcher中这…

智能快递地址解析接口如何用PHP调用?

一、什么是智能快递地址解析接口 随着互联网技术的普及和电子商务的迅猛发展&#xff0c;网购已成为现代人日常生活的重要组成部分。然而&#xff0c;在这个便捷的背后&#xff0c;一个看似不起眼却影响深远的问题正悄然浮现——用户填写的快递地址格式混乱、信息不全甚至错漏…

华为OD机试真题——模拟消息队列(2025B卷:100分)Java/python/JavaScript/C++/C语言/GO六种最佳实现

2025 B卷 100分 题型 本文涵盖详细的问题分析、解题思路、代码实现、代码详解、测试用例以及综合分析; 并提供Java、python、JavaScript、C++、C语言、GO六种语言的最佳实现方式! 2025华为OD真题目录+全流程解析/备考攻略/经验分享 华为OD机试真题《模拟消息队列》: 目录 题…

基于VU37P的高性能采集板卡

基于VU37P的高性能采集板卡是一款最大可提供20路ADC接收通道的高性能采集板卡。每路A/D通道支持1GS/s的采样率&#xff0c;分辨率为14bit&#xff0c;模拟输入带宽可达500MHz&#xff0c;交流耦合&#xff0c;输入阻抗50欧姆。 产品简介 可提供20路ADC接收通道的高性能采集板…

2025-05-31 Python深度学习10——模型训练流程

文章目录 1 数据准备1.1 下载与预处理1.2 数据加载 2 模型构建2.1 自定义 CNN 模型2.2 GPU加速 3 训练配置3.1 损失函数3.2 优化器3.3 训练参数 4 训练循环4.1 训练模式 (model.train())4.2 评估模式 (model.eval()) 5 模型验证 本文环境&#xff1a; Pycharm 2025.1Python 3.1…

K8S StatefulSet 快速开始

其实这篇文章的梗概已经写了很久了&#xff0c;中间我小孩出生了&#xff0c;从此人间多了一份牵挂。抽出一些时间去办理新生儿相关手续。初为人父确实艰辛&#xff0c;就像学技术一样&#xff0c;都需要有极大的耐心&#xff0c;付出很多的时间。 一、引子 1.1、独立的存储 …

nav2笔记-250603

合作背景&#xff1a; AMD与Open Navigation在过去几个月里进行了合作&#xff0c;旨在向ROS 2社区展示AMD强大的Ryzen AI、Embedded和Kria能力。 演示内容&#xff1a; 帖子提到&#xff0c;他们已经开始展示如何使用Ryzen AI为自主机器人产品提供动力&#xff0c;在各种现实世…

指纹识别+精准化POC攻击

开发目的 解决漏洞扫描器的痛点 第一就是扫描量太大&#xff0c;对一个站点扫描了大量的无用 POC&#xff0c;浪费时间 指纹识别后还需要根据对应的指纹去进行 payload 扫描&#xff0c;非常的麻烦 开发思路 我们的思路分为大体分为指纹POC扫描 所以思路大概从这几个方面…

mac环境下的python、pycharm和pip安装使用

Python安装 Mac环境下的python安装 下载地址&#xff1a;https://www.jetbrains.com.cn/pycharm/ 一直点击下一步即可完成 在应用程序中会多了两个图标 IDLE 和 Python launcher IDLE支持在窗口中直接敲python命令并立即执行&#xff0c;双击即可打开 Python launcher双击打…

BUUCTF[极客大挑战 2019]Havefun 1题解

BUUCTF[极客大挑战 2019]Havefun 1题解 题目分析解题理解代码逻辑&#xff1a;构造Payload&#xff1a; 总结 题目分析 生成靶机&#xff0c;进入网址&#xff1a; 首页几乎没有任何信息&#xff0c;公式化F12打开源码&#xff0c;发现一段被注释的源码&#xff1a; 下面我们…

Tomcat优化篇

目录 一、Tomcat自身配置 1.Tomcat管理页面 2. 禁用AJP服务 3.Executor优化 4.三种运行模式 5.web.xml 6.Host标签 7.Context标签 8.启动速度优化 9.其他方面 二、JMeter测试 笔者推荐 一、Tomcat自身配置 1.Tomcat管理页面 我们可以打开Tomcat的管理页面&#xff…

Temporal Fusion Transformer(TFT)扩散模型时间序列预测模型

1. TFT 简介 Temporal Fusion Transformer&#xff08;TFT&#xff09;模型是一种专为时间序列预测设计的高级深度学习模型。它结合了神经网络的多种机制处理时间序列数据中的复杂关系。TFT 由 Lim et al. 于 2019年提出&#xff0c;旨在处理时间序列中的不确定性和多尺度的依…

【LangServe部署流程】5 分钟部署你的 AI 服务

目录 一、LangServe简介 二、环境准备 1. 安装必要依赖 2. 编写一个 LangChain 可运行链&#xff08;Runnable&#xff09; 3. 启动 LangServe 服务 4. 启动服务 5. 使用 API 进行调用 三、可选&#xff1a;访问交互式 Swagger 文档 四、基于 LangServe 的 RAG 应用部…

攻防世界-unseping

进入环境 在获得的场景中发现PHP代码并进行分析 编写PHP编码 得到 Tzo0OiJlYXNlIjoyOntzOjEyOiIAZWFzZQBtZXRob2QiO3M6NDoicGluZyI7czoxMDoiAGVhc2UAYXJncyI7YToxOntpOjA7czozOiJwd2QiO319 将其传入 想执行ls&#xff0c;但是发现被过滤掉了 使用环境变量进行绕过 $a new…