vue3+dhtmlx 甘特图真是案例
使用vue3 + ts +dhtmlx 实现项目任务甘特图展示
支持拖拽,选择人员,优先级,开发状态,进度
效果图
完整代码
安装命令:npm i dhtmlx-gantt
<template><div style="height: 100%; background-color: white"><div class="gantt-header"><el-button type="primary" @click="addNewTask"><el-icon><Plus /></el-icon>新建任务</el-button><el-button type="primary" @click="handVal">获取数据</el-button><!-- <el-button type="success" @click="addSubTaskToSelected"><el-icon><Plus /></el-icon>添加子任务</el-button> --></div><div ref="ganttRef" style="width: 100%; height: 600px"></div></div>
</template><script setup name="gantt-widget">
import { ref, reactive, onMounted, defineEmits } from 'vue'
import { gantt } from 'dhtmlx-gantt'
import 'dhtmlx-gantt/codebase/dhtmlxgantt.css'
import { Plus } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'import { defineProps } from 'vue'
const props = defineProps({widgetObj: {type: Object,required: true,},
})const ganttRef = ref()
const tasks = ref({})//动态加载数据
const fetchData = () => {tasks.value = {data: [{id: 10,text: 'RFQ&项目启动',type: 'project',progress: 0.1,open: true,person: '张三',priority: 1,},{id: 12,text: '产品需求 #1.0.1',start_date: '02-01-2025',duration: 3,parent: 10,progress: 1,person: '张三',priority: 2,},{id: 13,text: '产品数据 #1.0.2',start_date: '05-01-2025',duration: 3,parent: 10,progress: 0.8,person: '张三',},{id: 14,text: '环境数据 #1.0.3',start_date: '08-01-2025',duration: 3,parent: 10,progress: 0,person: '张三',},{id: 15,text: '项目评估指令 #1.1',start_date: '11-01-2025',duration: 3,parent: 10,progress: 0,person: '张三',},{id: 16,text: '成立项目小组 #1.2.1',start_date: '12-01-2025',duration: 2,parent: 10,progress: 0,person: '张三',},{id: 17,text: '可行性评估 #1.2.2',start_date: '13-01-2025',duration: 3,parent: 10,progress: 0,person: '张三',},{id: 18,text: '输入评审 #1.2.3',start_date: '14-01-2025',duration: 2,parent: 10,progress: 0,person: '张三',},{id: 19,text: '初始产品方案 #1.2.4',start_date: '16-01-2025',duration: 2,parent: 10,progress: 0,person: '张三',},{id: 20,text: '产品设计&开发',type: 'project',progress: 0,person: '张三',open: false,},{id: 21,text: '设计输入信息管理#3.0.1',start_date: '18-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 22,text: '产品设计过往教训展开 #3.0.2',start_date: '20-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 23,text: '产品设计进度管理 #3.0.3',start_date: '22-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 24,text: '产品设计方案 #3.0.4',start_date: '24-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 25,text: '产品特殊特性识别 #3.0.5',start_date: '26-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 26,text: '产品设计方案评审 #3.0.6',start_date: '28-01-2025',duration: 2,parent: 20,progress: 0,person: '张三',},{id: 30,text: '过程设计&开发',type: 'project',progress: 0,person: '张三',open: false,},{id: 31,text: '场地规划 #5.0.1',start_date: '28-02-2025',duration: 3,parent: 30,progress: 0,person: '张三',},{id: 32,text: '场地评审 #5.0.2',start_date: '28-02-2025',duration: 3,parent: 30,progress: 0,person: '张三',},{id: 33,text: '过程检验标准 #5.0.3',start_date: '29-02-2025',duration: 3,parent: 30,progress: 0,person: '张三',},{id: 40,text: '产品&过程验证',type: 'project',open: false,progress: 0,person: '张三',},{id: 41,text: '量具重复再现性分析 #6.0.1',start_date: '29-02-2025',duration: 3,parent: 40,progress: 0,person: '张三',},{id: 42,text: '检具使用验收 #6.0.2',start_date: '01-03-2025',duration: 3,parent: 40,progress: 0,person: '张三',},{id: 43,text: '工装-厂外预验收 #6.1.1',start_date: '02-03-2025',duration: 3,parent: 40,progress: 0,person: '张三',},{id: 44,text: '设备-厂外预验收 #6.2.1',start_date: '03-03-2025',duration: 3,parent: 40,progress: 0,person: '张三',},{id: 45,text: '模具-厂外预验收 #6.3.1',start_date: '04-03-2025',duration: 3,parent: 40,progress: 0,person: '张三',},{id: 50,text: '过程验证',type: 'project',open: false,progress: 0,person: '张三',},{id: 51,text: '小批量试生产总结 #7.0.1',start_date: '28-04-2025',duration: 3,parent: 50,progress: 0,person: '张三',},{id: 52,text: '产品尺寸记录 #7.0.2',start_date: '29-04-2025',duration: 3,parent: 50,progress: 0,person: '张三',},{id: 52,text: '过程能力研究 #7.0.3',start_date: '30-04-2025',duration: 3,parent: 50,progress: 0,person: '张三',},{id: 60,text: '反馈,纠正和改进',type: 'project',open: false,progress: 0,person: '张三',},{id: 61,text: '模工检移交 #8.0.1',start_date: '28-05-2025',duration: 3,parent: 60,progress: 0,person: '张三',},{id: 62,text: '项目移交会议 #8.0.2',start_date: '29-05-2025',duration: 3,parent: 60,progress: 0,person: '张三',},{id: 63,text: '取得量产交付计划 #8.1.1',start_date: '30-05-2025',duration: 3,parent: 60,progress: 0,person: '张三',},],links: [{ id: 10, source: 12, target: 13, type: 1 },{ id: 11, source: 13, target: 14, type: 1 },{ id: 12, source: 14, target: 15, type: 1 },]}
}// 添加子任务到选中的任务
const addSubTaskToSelected = () => {const selectedTask = gantt.getSelectedId()if (selectedTask) {addSubTask(selectedTask)} else {ElMessage.warning('请先选择一个任务')}
}// 添加新任务
const addNewTask = (parentId = null) => {const newTask = {id: gantt.uid(),text: '新任务',start_date: new Date(),duration: 1,progress: 0, // 默认状态为未开始person: '张三', // 默认负责人parent: parentId,priority: 2 // 默认优先级为中}gantt.addTask(newTask)
}// 添加子任务
const addSubTask = (parentId) => {addNewTask(parentId)
}
const handVal = () => {// 获取甘特图所有任务数据const data = gantt.serialize()console.log('甘特图数据:', data)// 获取选中的任务const selectedTaskId = gantt.getSelectedId()if (selectedTaskId) {const selectedTask = gantt.getTask(selectedTaskId)console.log('选中的任务:', selectedTask)}
}//初始化配置
const initGantt = () => {gantt.plugins({ tooltip: true, // 鼠标悬停显示任务信息quick_info: true // 快速信息})// 隐藏右侧日期列表// gantt.config.show_chart = false// 添加右键菜单gantt.config.context_menu = {items: {add: {text: "添加任务",icon: "gantt_add",onclick: function (id) {addNewTask()}},add_sub: {text: "添加子任务",icon: "gantt_add",onclick: function (id) {addSubTask(id)}},delete: {text: "删除",icon: "gantt_delete",onclick: function (id) {gantt.deleteTask(id)}}}}// 允许拖放gantt.config.drag_project = truegantt.config.drag_move = truegantt.config.drag_resize = truegantt.config.drag_links = true// 允许任务排序gantt.config.order_branch = truegantt.config.order_branch_free = true// 显示任务树gantt.config.show_grid = truegantt.config.show_task_cells = true// 隐藏任务之间的连线gantt.config.show_links = false// 汉化窗口gantt.locale.labels = {dhx_cal_today_button: '今天',day_tab: '日',week_tab: '周',month_tab: '月',new_event: '新建日程',icon_save: '保存',icon_cancel: '关闭',icon_details: '详细',icon_edit: '编辑',icon_delete: '删除',confirm_closing: '请确认是否撤销修改!', //Your changes will be lost, are your sure?confirm_deleting: '是否删除计划?',section_description: '描述:',section_time: '时间范围:',section_type: '类型:',section_text: '计划名称:',section_test: '测试:',section_projectClass: '项目类型:',taskProjectType_0: '项目任务',taskProjectType_1: '普通任务',section_head: '负责人:',section_priority: '优先级:',taskProgress: '任务状态',taskProgress_0: '未开始',taskProgress_1: '进行中',taskProgress_2: '已完成',taskProgress_3: '已延期',taskProgress_4: '搁置中',section_template: 'Details',/* grid columns */column_text: '计划名称',column_start_date: '开始时间',column_duration: '持续时间',column_add: '',column_priority: '难度',/* link confirmation */link: '关联',confirm_link_deleting: '将被删除',message_ok: '确定',message_cancel: '取消',link_start: ' (开始)',link_end: ' (结束)',type_task: '任务',type_project: '项目',type_milestone: '里程碑',minutes: '分钟',hours: '小时',days: '天',weeks: '周',months: '月',years: '年',}// 格式化日期gantt.locale.date = {month_full: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',],month_short: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',],day_full: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六',],day_short: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六',],}// 当task的长度改变时,自动调整图表坐标轴区间用于适配task的长度gantt.config.fit_tasks = true// 定义时间格式gantt.config.scales = [{ unit: 'month', step: 1, date: '%F, %Y' },{ unit: 'day', step: 1, date: '%j, %D' },]// gantt.config.scale_height = 80// gantt.config.row_height = 60// gantt.config.bar_height = 40gantt.i18n.setLocale('cn')// gantt.config.autosize = true// gantt.config.readonly = truegantt.config.show_grid = truegantt.config.show_task_tooltips = truegantt.config.show_progress = truegantt.config.branches = {open: 'open',closed: 'closed',}gantt.templates.tooltip_text = (start, end, task) => `<div><div>任务:${task.text}</div><div>开始时间:${formatDate(task.start_date, '{y}-{m}-{d}')}</div><div>结束时间:${formatDate(task.end_date, '{y}-{m}-{d}')}</div><div>进度:${task.progress * 100}%</div></div>`gantt.config.columns = [{name: 'text',label: '任务名称',width: '250',tree: true,align: 'left',},{ name: 'start_date', label: '起始时间', width: '100', align: 'center' },{ name: 'duration', label: '持续时间', width: '80', align: 'center' },{name: 'progress',label: '进度',width: '100',align: 'center',template: function (obj) {return obj.progress * 100 + '%'},},{ name: 'person', label: '负责人', width: '80', align: 'center' },{name: 'status',label: '状态',width: '100',align: 'center',template: function (obj) {const status = getTaskStatus(obj)return `<span class="task-status ${status.class}">${status.text}</span>`}},{name: 'priority',label: '优先级',width: '80',align: 'center',template: function (obj) {const priority = obj.priority return `<span class="task-priority priority-${priority}">${getPriorityText(priority)}</span>` // return priority}},{name: 'add',label: '操作',width: '100',align: 'center',template: function (obj) {return `<div class="task-actions"><el-button type="primary" size="small" onclick="gantt.$vue.addSubTask(${obj.id})"><el-icon><Plus /></el-icon>添加子任务</el-button></div>`}}]gantt.config.lightbox_zindex = 10000// 定义可选的人员列表gantt.serverList("person", [{ key: "张三", label: "张三" },{ key: "李四", label: "李四" },{ key: "王五", label: "王五" },{ key: "赵六", label: "赵六" }]);// 定义任务状态列表gantt.serverList("status", [{ key: 0, label: "未开始" },{ key: 0.5, label: "进行中" },{ key: 1, label: "已完成" }]);// 定义优先级列表gantt.serverList("priority", [{ key: 1, label: "高" },{ key: 2, label: "中" },{ key: 3, label: "低" }]);// 添加弹窗属性gantt.config.lightbox.sections = [{name: 'description',height: 70,map_to: 'text',type: 'textarea',focus: true,},{ name: 'type', type: 'typeselect', map_to: 'type' },{ name: 'time', type: 'duration', map_to: 'auto' },{name: 'priority',height: 30,map_to: 'priority',type: 'select',label: '优先级',options: gantt.serverList("priority")},{name: 'person',height: 30,map_to: 'person',type: 'select',label: '负责人',options: gantt.serverList("person")},{name: 'progress',height: 30,map_to: 'progress',type: 'select',label: '状态',options: gantt.serverList("status")}]// 获取优先级文本const getPriorityText = (priority) => {const priorityList = gantt.serverList("priority")const found = priorityList.find(item => item.key == priority)return found ? found.label : ''}// 获取任务状态const getTaskStatus = (task) => {if (task.progress === 1) {return { text: '已完成', class: 'status-completed' }} else if (task.progress > 0) {return { text: '进行中', class: 'status-in-progress' }} else {return { text: '未开始', class: 'status-not-started' }}}// 将 Vue 实例挂载到 gantt 对象上,以便在模板中访问gantt.$vue = {addSubTask: addSubTask,getTaskStatus: getTaskStatus,getPriorityText: getPriorityText}// 初始化gantt.init(ganttRef.value)// 清空旧数据gantt.clearAll()// 数据解析gantt.parse(tasks.value)
}const formatDate = (date, format) => {if (!date) return ''const d = new Date(date)const year = d.getFullYear()const month = String(d.getMonth() + 1).padStart(2, '0')const day = String(d.getDate()).padStart(2, '0')return format.replace('{y}', year).replace('{m}', month).replace('{d}', day)
}onMounted(() => {fetchData()initGantt()
})
</script><style lang="scss" scoped>
.gantt_cal_light {z-index: 9999 !important;
}.gantt_cal_cover {z-index: 10000 !important;
}.gantt-header {padding: 10px;border-bottom: 1px solid #ebeef5;margin-bottom: 10px;
}:deep(.task-actions) {.el-button {padding: 4px 8px;font-size: 12px;}
}:deep(.task-status) {padding: 2px 8px;border-radius: 4px;font-size: 12px;&.status-completed {background-color: #f0f9eb;color: #67c23a;}&.status-in-progress {background-color: #fdf6ec;color: #e6a23c;}&.status-not-started {background-color: #f4f4f5;color: #909399;}
}:deep(.task-priority) {padding: 2px 8px;border-radius: 4px;font-size: 12px;&.priority-1 {background-color: #fef0f0;color: #f56c6c;}&.priority-2 {background-color: #fdf6ec;color: #e6a23c;}&.priority-3 {background-color: #f0f9eb;color: #67c23a;}
}
</style>
相关文章:
vue3+dhtmlx 甘特图真是案例
使用vue3 ts dhtmlx 实现项目任务甘特图展示 支持拖拽,选择人员,优先级,开发状态,进度 效果图 完整代码 安装命令:npm i dhtmlx-gantt <template><div style"height: 100%; background-color: white…...
Chrome/Edge浏览器使用多屏完美解决方案,http部署使用https部署的功能
多屏使用场景:例如1屏显示录入操作界面,2屏显示SOP。或者每个屏上显示不同的看板内容等 废话不少说,直接上代码:将下面的代码复制到txt记事本里,保存为html格式即可本地观看效果 <!DOCTYPE html> <html>…...
Linux中进程的属性:状态
一、通用OS进程中的各种状态与相关概念 1.1通用进程中的状态 CPU执行进程代码,不是把进程执行完才开始执行下一个,而是给每个进程预分配一个“时间片”, CPU基于时间片进行轮转调度(每个CPU分别进行) 其中发涉及到的…...
软件架构师常用的软件工具有哪些
软件架构师的工作离不开多种工具的支撑,主要包括 建模与设计工具、文档与协作平台、代码质量与静态分析工具、性能与监控工具、DevOps 工具链、架构可视化与管理平台 等。其中,建模与设计工具 是架构师最核心的武器,能够帮助其从业务抽象到技…...
rl中,GRPO损失函数详解。
文章目录 **一、GRPO损失函数的设计背景****二、代码逐行解析****三、关键组件详解****1. 对数概率与KL散度计算****2. 优势值与策略梯度****3. 掩码与平均损失****四、训练动态与调参建议**在TRL(Transformer Reinforcement Learning)库中,GRPO(Group Relative Policy Opt…...
奇安信春招面试题
奇安信面试真题,以下是5道具有代表性的经典技术面试题及其解析,覆盖网络安全、渗透测试、安全架构设计等核心领域。 《网安面试指南》https://mp.weixin.qq.com/s/RIVYDmxI9g_TgGrpbdDKtA?token1860256701&langzh_CN 5000篇网安资料库https://mp.…...
MineWorld,微软研究院开源的实时交互式世界模型
MineWorld是什么 MineWorld是微软研究院开发并开源的一个基于《我的世界》(Minecraft)的实时互动世界模型。该模型采用了视觉-动作自回归Transformer架构,将游戏场景和玩家动作转化为离散的token ID,并通过下一个token的预测进行…...
Nginx RTMP配置存储位置
window: 支持本地磁盘和远程网络位置 配置文件如下 worker_processes 1;events {worker_connections 1024; }#RTMP服务 rtmp {server { listen 1935; #监听端口chunk_size 4096; #数据传输块大小application my_live { # 创建rtmp应用hlslive on; # 当路径匹…...
JVM理解(通俗易懂)
虽然网上有很多关于JVM的教程,但是都天花乱坠,很多都是一上来就JVM内存模型、JVM双亲委派等等,(可能我比较菜看不懂)。于是我自己决定写一篇能看懂的文章~如果有看不懂我就自己百度,大家有什么疑问也可以评论区交流~ 欢迎指点我的Error~ JVM概念 JVM大家都知道,就Ja…...
python三维矩阵的维度
matrix_3x3x3 np.array([[[ 8.35, 16.72, 17.46],[16.72, 33.49, 34.97],[17.46, 34.97, 36.51]],[[16.72, 33.49, 34.97],[33.49, 67.09, 70.05],[34.97, 70.05, 73.13]],[[17.46, 34.97, 36.51],[34.97, 70.05, 73.13],[36.51, 73.13, 76.35]] ]) 例如这样的三维矩阵&#…...
HarmonyOS 是 Android 套壳嘛?
文章目录 HarmonyOS 是 Android 套壳吗?技术视角的深度解析一、核心结论二、技术对比:从底层到应用层1. 内核与基础架构2. 应用开发与运行机制3. 生态与应用场景 三、常见误解的澄清误解 1:“HarmonyOS 使用 Android 应用,所以是套…...
【Java面试笔记:基础】10.如何保证集合是线程安全的? ConcurrentHashMap如何实现高效地线程安全?
1. 保证集合线程安全的方式 传统同步容器:如 Hashtable 和 Vector,通过在方法上加 synchronized 关键字实现线程安全,但性能较低。同步包装器:通过 Collections.synchronizedMap 等方法将普通集合包装成线程安全的集合,但仍然使用粗粒度的锁,性能不佳。List<String>…...
【Amazing晶焱科技高速 CAN Bus 传输与 TVS/ESD/EOS 保护,将是车用电子的生死关键无标题】
台北国际车用电子展是亚洲地区重量级的车用电子科技盛会,聚焦于 ADAS、电动车动力系统、智慧座舱、人机界面、车联网等领域。各大车厂与 Tier 1 供应链无不摩拳擦掌,推出最新技术与创新解决方案。 而今年,“智慧座舱” 无疑将成为全场焦点&am…...
电控---DMP库
一、DMP库的本质与核心定位 DMP库是为Invensense(现TDK)系列传感器(如MPU6050、MPU9250等)内置的数字运动处理器(DMP)硬件模块提供的软件接口层。其核心目标是: 抽象硬件操作:将复…...
YOLO数据处理
YOLO(You Only Look Once)的数据处理流程是为了解决目标检测领域的核心挑战,核心目标是为模型训练和推理提供高效、规范化的数据输入。其设计方法系统性地解决了以下关键问题,并对应发展了成熟的技术方案: 一、解决的问…...
Linux实现网络计数器
1.TcpServer.hpp文件 类TcpServer的私有成员变量有端口号,指向类Socket对象的指针,布尔值表示是否运行,以及回调函数,ioservice_t是表示参数为指向Socket对象的指针和InetAddr对象的函数,TcpServer类的构造函数接收端…...
数据分析:用Excel做周报
目录 1.初始模板 编辑 2.填充数据 2.1 日期以及表头 2.2 数据验证 2.3 计算数据填充 2.3.1 灵活计算 2.3.2 单独计算 2.3.3 总计 2.4 数据格式 2.5 周累计 2.6 周环比 2.7 业务进度 3 美化 1.初始模板 2.填充数据 2.1 日期以及表头 结果指标有以下这些&#…...
初阶数据结构--排序算法(全解析!!!)
排序 1. 排序的概念 排序:所谓排序,就是使一串记录,按照其中的某个或某些些关键字的大小,递增或递减的排列起来的操作。 2. 常见的排序算法 3. 实现常见的排序算法 以下排序算法均是以排升序为示例。 3.1 插入排序 基本思想:…...
SpringCloud 微服务复习笔记
文章目录 微服务概述单体架构微服务架构 微服务拆分微服务拆分原则拆分实战第一步:创建一个新工程第二步:创建对应模块第三步:引入依赖第四步:被配置文件拷贝过来第五步:把对应的东西全部拷过来第六步:创建…...
加油站小程序实战教程14会员充值页面搭建
目录 1 原型2 搭建充值金额选择功能3 搭建金额输入4 搭建支付方式5 充值按钮最终的效果 上一篇我们介绍了充值规则的后台功能,有了基础的规则,在会员充值页面就可以显示具体的充值规则。本篇我们介绍一下会员充值的开发过程。 1 原型 充值页面我们是分为…...
内卷的中国智驾,合资品牌如何弯道超车?
作者 |德新 编辑 |王博 上海车展前夕,一汽丰田举办重磅车型bZ5的技术发布会,脱口秀演员庞博透露了这款车型的一大重要特性,其搭载来自Momenta的智能辅助驾驶系统行驶里程已经超过20亿公里。 携手中国科技公司提高车型智能化的属性ÿ…...
【go】go run-gcflags常用参数归纳,go逃逸分析执行语句,go返回局部变量指针是安全的
go官方参考文档: https://pkg.go.dev/cmd/compile 基本语法 go run 命令用来编译并运行Go程序,-gcflags 后面可以跟一系列的编译选项,多个选项之间用空格分隔。基本语法如下: go run -gcflags "<flags>" main.…...
数据库11(触发器)
触发器有三种类型,包括删除触发器,更新触发器,添加触发器 触发器的作用是:当某个表发生某个操作时,自动触发触发器,进行触发器规定的操作 触发器语句 create trigger tname --创建触发器 on aa --创建在表…...
十大物联网平台-物联网十大品牌
物联网十大品牌及平台解析 物联网(IoT)作为当下极具影响力的技术,正逐步渗透至社会各领域,为人们生活与社会发展带来诸多便利与变革。如今,众多企业投身于物联网行业,致力于推动其发展。以下是对物联网相关…...
心智模式VS系统思考
很多人常说,“改变自己,从改变思维开始。”但事实上,打破一个人的心智模式,远比想象中要困难得多。我们的思维方式、行为习惯,甚至是对世界的认知,往往是多年积累下来的产物。那些曾经的经历、长期的学习与…...
QT 打包安装程序【windeployqt.exe】报错c000007d原因:Conda巨坑
一、命令行执行命令 E:\Project\GNCGC\Bin\Win32\Vc22\RS422地检>E:\SoftWare\Qt\5.14.2\msvc2017\bin\windeployqt.exe CGC170.exe二、安装了Conda的朋友,巨坑 无语,E:\SoftWare\Qt\5.14.2\msvc2017\bin\windeployqt.exe 优先把Conda环境关联的Qt动…...
Vue3祖先后代组件数据双向同步实现方法
在 Vue3 中实现祖先后代组件的双向数据同步,可以通过组合式 API 的 provide/inject 配合响应式数据实现。以下是两种常见实现方案: 方案一:共享响应式对象 方法 html <!-- 祖先组件 --> <script setup> import { ref, provide…...
OpenBayes 一周速览|EasyControl 高效控制 DiT 架构,助力吉卜力风图像一键生成;TripoSG 单图秒变高保真 3D 模型
公共资源速递 10 个教程: * 一键部署 R1-OneVision * UNO:通用定制化图像生成 * TripoSG:单图秒变高保真 3D * 使用 VASP 进行机器学习力场训练 * InfiniteYou 高保真图像生成 Demo * VenusFactory 蛋白质工程设计平台 * Qwen2.5-0mni…...
服务器-conda下载速度慢-国内源
文章目录 前言一、解决问题:使用国内conda镜像下载(差)二、解决问题:使用pip下载(优)总结 前言 conda频道中有无效频道导致下载失败 一、解决问题:使用国内conda镜像下载(差) 步骤 1ÿ…...
python的pip download命令-2
当然可以,下面我详细解释一下 pip download 的作用、用法和技术原理。 🧠 一句话总结: pip download 是 pip 提供的一个命令,用来下载 Python 包及其依赖项的安装文件,但不会安装。 🔍 和 pip install 的区别: 命令作用是否安装是否联网典型用途pip install安装指定包…...
【Java设计模式及实践学习-第4章节-结构型模式】
第4章节-结构型模式 笔记记录 1. 适配器模式2. 代理模式3. 装饰器模式4. 桥接模式5. 组合模式6. 外观模式7. 享元模式8. 总结 1. 适配器模式 2. 代理模式 3. 装饰器模式 4. 桥接模式 5. 组合模式 6. 外观模式 7. 享元模式 Java语言中的String字符串就使用了享元模式&…...
python:mido 提取 midi文件中某一音轨的音乐数据
pip install mido 使用 mido库可以方便地处理 MIDI 文件,提取其中音轨的音乐数据。 1.下面的程序会读取指定的 MIDI 文件,并提取指定编号音轨的音乐数据,主要包括音符事件等信息。 编写 mido_extract.py 如下 # -*- coding: utf-8 -*- &…...
将输入帧上下文打包到下一个帧的预测模型中用于视频生成
Paper Title: Packing Input Frame Context in Next-Frame Prediction Models for Video Generation 论文发布于2025年4月17日 Abstract部分 在这篇论文中,FramePack是一种新提出的网络结构,旨在解决视频生成中的两个主要问题:遗忘和漂移。 具体来说,遗忘指的是在生成视…...
第六章:Multi-Backend Configuration
Chapter 6: Multi-Backend Configuration 从交响乐团到变形金刚:如何让代理适应不同环境? 在上一章任务工作流编排,我们学会了如何像指挥家一样协调任务。但就像变形金刚能切换不同形态应对环境变化一样,你的AI代理也需要能灵活切…...
tomcat远程Debug
tomcat远程Debug -- /bin目录下 catalina.bat文件下加一行 SET CATALINA_OPTS-server -Xdebug -Xnoagent -Djava.compilerNONE -Xrunjdwp:transportdt_socket,servery,suspendn,address8088idea端配置如下...
Vue3:component(组件:uniapp版本)
目录 一、基本概述二、基本使用三、插槽 一、基本概述 在项目的开发过程中,页面上井场会出现一些通用的内容,例如头部的导航栏,如果我们每一个页面都去写一遍,那实在是太繁琐了,所以,我们使用组件来解决这…...
rust编程学习(三):8大容器类型
1简介 rust标准库std::collections也提供了像C STL库中的容器,分为4种通用的容器,8种类型,如下表所示。 线性容器类型: 名称简介Vec<T>内存空间连续,可变长度的数组,类似于C中Vector<T>容器…...
前端中阻止事件冒泡的几种方法
在 JavaScript 前端开发中,阻止事件冒泡是处理 DOM 事件时的常见需求。以下是几种阻止事件冒泡的方法: 1. 使用 event.stopPropagation() 这是最常用的阻止事件冒泡的方法。 element.addEventListener(click, function(event) {event.stopPropagation…...
ShenNiusModularity项目源码学习(20:ShenNius.Admin.Mvc项目分析-5)
ShenNiusModularity项目的系统管理模块主要用于配置系统的用户、角色、权限、基础数据等信息,上篇文章中学习的日志列表页面相对独立,而后面几个页面之间存在依赖关系,如角色页面依赖菜单页面定义菜单列表以便配置角色的权限,用户…...
前端js需要连接后端c#的wss服务
背景 前端js需要连接后端wss服务 前端:js 后端:c# - 控制台搭建wss服务器 步骤1 wss需要ssl认证,所以需要个证书,随便找一台linux的服务器(windows的话,自己安装下openssl即可),…...
MAGI-1自回归式大规模视频生成
1. 关于 MAGI-1 提出 MAGI-1——一种世界模型(world model),通过自回归方式预测一系列视频块(chunk,固定长度的连续帧片段)来生成视频。 模型被训练为在时间维度上单调递增噪声的条件下对每个块进行去噪&a…...
深入剖析TCP协议(内容一):从OSI与TCP/IP网络模型到三次握手、四次挥手、状态管理、性能优化及Linux内核源码实现的全面技术指南
文章目录 TCP网络模型OSI参考模型TCP/IP五层模型 TCP状态TIME_WAIT 连接过程TCP三次握手TCP四次挥手 TCP优化TCP三次握手优化TCP四次挥手优化TCP数据传输优化 TCP TCP是面向连接的、可靠的、基于字节流的传输层通信协议: 面向连接:一定是一对一才能连接…...
基于deepseek的模型微调
使用 DeepSeek 模型(如 DeepSeek-VL、DeepSeek-Coder、DeepSeek-LLM)进行微调,可以分为几个关键步骤,下面以 DeepSeek-LLM 为例说明,适用于 Q&A、RAG、聊天机器人等方向的应用。 一、准备工作 1. 环境依赖 建议使用 transformers + accelerate 或 LoRA 等轻量微调方…...
node.js 实战——(path模块 知识点学习)
path 模块 提供了操作路径的功能 说明path. resolve拼接规范的绝对路径path. sep获取操作系统的路径分隔符path. parse解析路径并返回对象path. basename获取路径的基础名称path. dirname获取路径的目录名path. extname获得路径的扩展名 resolve 拼接规范的绝对路径 const…...
【k8s】docker、k8s、虚拟机的区别以及使用场景
一、Docker (一)概念 Docker 是一个开源的应用容器引擎,允许开发者将应用及其依赖打包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可实现虚拟化。 (二)隔离性 Docker 的隔离…...
校园外卖服务系统的设计与实现(代码+数据库+LW)
摘 要 传统信息的管理大部分依赖于管理人员的手工登记与管理,然而,随着近些年信息技术的迅猛发展,让许多比较老套的信息管理模式进行了更新迭代,外卖信息因为其管理内容繁杂,管理数量繁多导致手工进行处理不能满足广…...
Windows上使用Python 3.10结合Appium-实现APP自动化
一、准备工作 所需条件: Windows 10/11 操作系统 Python 3.10.x(建议3.10.9) Java JDK 8 或以上(建议JDK 8u301) Node.js 14.x 或以上(建议14.21.3) Appium Server 1.22.x 或以上(建…...
【计算机视觉】CV项目实战- SiamMask 单阶段分割跟踪器
SiamMask 单阶段分割跟踪器 一、项目概述与技术原理1.1 核心技术创新1.2 性能优势 二、实战环境搭建2.1 系统要求与依赖安装2.2 项目编译与配置 三、模型推理实战3.1 快速体验Demo3.2 常见运行时错误处理 四、模型训练指南4.1 数据准备流程4.2 训练执行与监控 五、高级应用与优…...
计算机视觉基础
1. 数字图像的基本概念 像素(Pixel):图像的最小构成单元,每个像素存储亮度或颜色信息。 灰度图像:每个像素是 0(黑)~255(白) 的标量值(8位无符号整数&#x…...
系统编程_进程间通信机制_消息队列与共享内存
消息队列概述 消息有类型:每条消息都有一个类型,就像每封信都有一个标签,方便分类和查找。消息有格式:消息的内容有固定的格式,就像每封信都有固定的信纸格式。随机查询:你可以按类型读取消息,…...