项目管理工具DHTMLX Gantt教程(十五):从MS项目导入导出(下)
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这篇<span style="color: black;">文案</span>给<span style="color: black;">大众</span>讲解DHTMLX Gantt请求大文件导入的<span style="color: black;">体积</span>限制。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;"><a style="color: black;">DHTMLX Gantt官方最新版免费下载试用,历史版本下载,在线文档和<span style="color: black;">帮忙</span>文件下载-慧都网</a></span></strong></span></p>
<h1 style="color: black; text-align: left; margin-bottom: 10px;">请求大文件导入的<span style="color: black;">体积</span>限制</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">MSProject导出/导入服务有两个 API 端点:</span></p><span style="color: black;">https://export.dhtmlx.com/gantt - 服务于所有导出<span style="color: black;">办法</span>( exportToPDF 、 exportToPNG 、 exportToMSProject 等)的默认端点。 最大请求<span style="color: black;">体积</span>为 10 MB 。</span><span style="color: black;">https://export.dhtmlx.com/gantt/project - 专用于 MS Project 服务的端点( 仅限 exportToMSProject / importFromMSProject )。 最大请求<span style="color: black;">体积</span>:40 MB 。</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">端点<span style="color: black;">能够</span>由导出配置对象的 server 属性指定:</span></p><span style="color: black;">gantt</span><span style="color: black;">.importFromMSProject</span>({
<span style="color: black;">server</span>:<span style="color: black;">"https://export.dhtmlx.com/gantt"</span>,
data: file,
callback: <span style="color: black;">function</span>(project){
// some logic
}
});<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>未指定端点, </p>https://export.dhtmlx.com/gantt 则默认<span style="color: black;">运用</span> 。 以下调用等效于<span style="color: black;">以上</span>调用:
<span style="color: black;">gantt</span><span style="color: black;">.importFromMSProject</span>({
<span style="color: black;">data</span>: file,
callback: <span style="color: black;">function</span>(project){
// some logic
}
});<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为了导出或导入超过 4MB 限制的大型项目,<span style="color: black;">能够</span><span style="color: black;">运用</span>第二个端点:</span></p><span style="color: black;">gantt</span><span style="color: black;">.importFromMSProject</span>({
<span style="color: black;">server</span>:<span style="color: black;">"https://export.dhtmlx.com/gantt/project"</span>,
data: file,
callback: <span style="color: black;">function</span>(project){
// some logic
}
});<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">它<span style="color: black;">准许</span>发送最大 40MB 的请求,并支持 MS Project 导出和导入。 它只能用于 MS Project 导出。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">任何其他<span style="color: black;">办法</span>,例如 gantt.exportToPDF({server:"</p>https://export.dhtmlx.com/gantt/project"}) 应该返回服务器错误。
<h1 style="color: black; text-align: left; margin-bottom: 10px;">DHTMLX Gantt vs MS Project 时间计算</h1>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DHTMLX Gantt 和 MS Project 中日期计算的工作方式存在<span style="color: black;">基本</span>差异,在某些<span style="color: black;">状况</span>下会<span style="color: black;">引起</span><span style="color: black;">区别</span>的结果。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这些差异<span style="color: black;">亦</span>因甘特图中<span style="color: black;">运用</span>的配置组合而异。 <span style="color: black;">然则</span>您<span style="color: black;">能够</span>更改可能影响计算结果的甘特图设置:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">之间的时长转换存在差异 1. <span style="color: black;">首要</span>,DHTMLX Gantt 和MS Project 。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1、<span style="color: black;">能够</span><span style="color: black;">经过</span>指定 HoursPerDay 和 MinutesPerDay来绕过它: 当您将甘特图导出到 MS Project 时</span></p>gantt.exportToMSProject({
<span style="color: black;">project</span>: {
<span style="color: black;">HoursPerDay</span>: <span style="color: black;"><span style="color: black;">function</span> () </span>{
<span style="color: black;">return</span> <span style="color: black;">24</span>;
},
<span style="color: black;">MinutesPerDay</span>: <span style="color: black;"><span style="color: black;">function</span> () </span>{
<span style="color: black;">return</span> <span style="color: black;">24</span> * <span style="color: black;">60</span>;
}
}
});<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2. 其次,您的项目可能禁用了 work_time 设置:</span></p><span style="color: black;">gantt.config.work_time</span> = <span style="color: black;">false</span><span style="color: black;">;</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">请<span style="color: black;">重视</span>,即使禁用了工作时间计算,甘特图仍然在配置中<span style="color: black;">拥有</span>默认日历设置(<span style="color: black;">每日</span> 8 小时,周一至周五工作周)。 即使在甘特图中禁用了工作时间,<span style="color: black;">咱们</span>的导出客户端<span style="color: black;">亦</span>会始终将默认日历发送到 MS Project。 这<span style="color: black;">便是</span><span style="color: black;">为何</span> MS Project 以<span style="color: black;">区别</span>方式计算任务<span style="color: black;">连续</span>时间的<span style="color: black;">原由</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">做为</span>一种<span style="color: black;">处理</span><span style="color: black;">办法</span>,您<span style="color: black;">能够</span>清除默认日历,<span style="color: black;">因此呢</span>即使将其发送到 MS Project,任务<span style="color: black;">连续</span>时间<span style="color: black;">亦</span>将以与甘特图相同的方式计算:</span></p><span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">0</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">1</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">2</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">3</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">4</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">5</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});
<span style="color: black;">gantt</span><span style="color: black;">.setWorkTime</span>({<span style="color: black;">day</span>:<span style="color: black;">6</span>, hours:[<span style="color: black;">0</span>,<span style="color: black;">24</span>]});<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3. <span style="color: black;">另外</span>,如果您将</p>gantt.config.duration_unit 指定为“day”,您可能会<span style="color: black;">重视</span>到汇总项日期之间的差异:
<span style="color: black;">gantt.config.duration_unit</span> = <span style="color: black;">"day"</span><span style="color: black;">;</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在这种<span style="color: black;">状况</span>下,甘特图会将<span style="color: black;">连续</span>时间四舍五入到总天数。 <span style="color: black;">然则</span> MS Project 不会<span style="color: black;">这般</span>做,并且会<span style="color: black;">表示</span>分数<span style="color: black;">连续</span>时间。 例如,顶级项目在甘特图中的<span style="color: black;">连续</span>时间为 439,而在 MS Project 中的<span style="color: black;">连续</span>时间为 438.58。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">独一</span>的<span style="color: black;">处理</span><span style="color: black;">办法</span>是将 duration_unit 切换为小时单位:</span></p><span style="color: black;">gantt.config.duration_unit</span> = <span style="color: black;">"hour"</span><span style="color: black;">;</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">DHTMLX Gantt是用于跨浏览器和跨平台应用程序的功能齐全的Gantt图表,可满足<strong style="color: blue;">项目管理控件</strong>应用程序的所有<span style="color: black;">需要</span>,是最完善的甘特图图表库。<span style="color: black;">认识</span><span style="color: black;">更加多</span>Dhtmlx Gantt<span style="color: black;">关联</span>内容和<span style="color: black;">新闻</span>,欢迎在线咨询<span style="color: black;">或</span>私信我获取正版试用版及报价。</span></p>
感谢楼主分享,祝愿外链论坛越办越好!
页:
[1]