WBS - 工作分解结构 [英] WBS - Work Breakdown Structure

查看:276
本文介绍了WBS - 工作分解结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我正在研究WorkBreak Down结构,但我无法完美地完成它。我发布了我的代码。我必须完成这项任务。请帮帮我。


必须形成这样的形式


WBS任务ID资源编号St.Date End.Date持续时间
1 asdkfa 2 asdfasd asdfdas asdf

1.1 asdkfa 2 asdfasd asdfdas asdf

2 asdkfa 2 asdfasd asdfdas asdf

2.1 asdkfa 2 asdfasd asdfdas asdf

2.2 asdkfa 2 asdfasd asdfdas asdf


像这样我必须动态组建

我开发的代码是


[HTML]< html>

< head>

< script src =" Cal.js" type =" text / javascript">< / script>

< script type =" text / javascript">

i = 1;

j = 1;

var ww = new Array();

ww [0] = 0;

ww [1 ] = 0;


var taskno = 0;

var subirow;

var subtaskno;

var fl = 0;

var zx;

函数insSubRow(q)

{


i ++;

ww [i] = 0;

var xx = q.parentNode.parentNode.rowIndex;

indx(xx)

var table = document.getElementById(" myTable");

var row = table.rows [xx];

var cell = row .cells [0];

var az = cell.firstChild.nodeValue;

if(fl == 0)

{

subirow = xx;

zx = xx;

zx ++;

fl = 1;

subtaskno = 0;

}

其他

{

if(subirow == xx)

{

zx ++;

}

else

{

subtaskno = 0;

subirow = xx;

zx = xx;

zx ++;

}

}

var x = document.getElementById(''myTable'')。insertRow(zx);

var b = x.insertCell(0);

subtaskno = subtaskno + 1;

temp = az +"。" + subtaskno;

b.innerHTML = temp;

var c = x.insertCell(1);

c.innerHTML ="& nbsp& nbsp& nbsp& ; NBSP&安培; NBSP&安培; NBSP&安培; NBSP&安培; NBSP&安培; NBSP" + '' < input type =" text" size =" 20">''+"& nbsp& nbsp" +''< input type =" button"值= [移除" onclick =" deleteRow(this,0)">'';

var a = x.insertCell(2);

a.innerHTML =''< ; input type =" text" size =" 10">'';

var a = x.insertCell(3);

a.innerHTML =''< select>< option> ;高< /选项><选项>中< /选项><选项>低< /选项>< / select>'';

var a = x.insertCell(4);

a.innerHTML =''< select>< option> yes< / option>< option> no< / option>< / select>'';

var a = x.insertCell(5);

a.innerHTML =''< select>< option> Assigned< / option>< option> On Track< / option>< ;选项>延迟< /选项><选项>完成< /选项>< / select>'';

var a = x.insertCell(6);

a.innerHTML =''< input type =" text"大小= QUOT; 10" onclick =" scwShow(this,event)">'';

var a = x.insertCell(7);

a.innerHTML =''< ; input type =" text"大小= QUOT; 10" onclick =" scwShow(this,event)">'';

var a = x.insertCell(8);

a.innerHTML =''< ; input type =" text" size =" 10">'';

}

函数insRow(p)

{

ww [i] = 0;


var x = document.getElementById(''myTable'')。insertRow(i);

var b = x .insertCell(0);

taskno = taskno + 1;

b.innerHTML = taskno;

var c = x.insertCell(1 );

c.innerHTML =''< input type =" text" size =" 15">''+"& nbsp& nbsp& nbsp" +''< input type =" button" value =" Sub Task" onclick =" insSubRow(this)">''+"& nbsp& nbsp" +''< input type =" button"值= [移除" onclick =" deleteRow(this,1)">'';

var a = x.insertCell(2);

a.innerHTML =''< ; input type =" text" size =" 10">'';

var a = x.insertCell(3);

a.innerHTML =''< select>< option> ;高< /选项><选项>中< /选项><选项>低< /选项>< / select>'';

var a = x.insertCell(4);

a.innerHTML =''< select>< option> yes< / option>< option> no< / option>< / select>'';

var a = x.insertCell(5);

a.innerHTML =''< select>< option> Assigned< / option>< option> On Track< / option>< ;选项>延迟< /选项><选项>完成< /选项>< / select>'';

var a = x.insertCell(6);

a.innerHTML =''< input type =" text"大小= QUOT; 10" onclick =" scwShow(this,event)">'';

var a = x.insertCell(7);

a.innerHTML =''< ; input type =" text"大小= QUOT; 10" onclick =" scwShow(this,event)">'';

var a = x.insertCell(8);

a.innerHTML =''< ; input type =" text" size =" 10">'';

i ++;

}

function indx(jk)

{

jj = jk;

k = ww [jj];

k ++;

ww [jj] = k;

}

函数deleteRow(r,f)

{


var jj = r.parentNode.parentNode.rowIndex;

if(f == 0)

{

document.getElementById(''myTable'' ).deleteRow(jj);

i - ;

zx--;

}

else < br $>
{


for(m = ww [jj] + jj; m> = jj; m--)

{


document.getElementById(''myTable'')。deleteRow(jj);

i - ;

zx--;

}

j--;

}


}

< / script>

< / head>

< body>

< p>< p>< p>< p>

& nbsp& nbsp< input type =" button"的onclick = QUOT; insRow(本)" value ="添加任务">

< p>< p>< p>< p>

< table id =" myTable"帧= QUOT; hsides"对齐= QUOT;中心"边界=" 3英寸CELLSPACING = QUOT; 0" cellpading = QUOT; 0" width =" 1000">

< tr>

< th> WBS< / th>

< th width =" 399">任务ID< / th>


< th>任务名称< / th>

< th>优先级< / th>

< th>有效< / th>

< th>状态< / th>

< th> St。日期< / th>

< th>结束日期< / th>

< th>总计小时< / th>

< / tr>

< / table>

< / table>

< / body>

< / html> [/ HTML]


请帮帮我们。这是非常迫切的

Hello I am working on WorkBreak Down structures, but i was unable to finish it perfectly. I am posting my code with this. I have to finish this task. please help me out.

It must form like this

WBS TaskID No. of Resource St.Date End.Date Duration
1 asdkfa 2 asdfasd asdfdas asdf
1.1 asdkfa 2 asdfasd asdfdas asdf
2 asdkfa 2 asdfasd asdfdas asdf
2.1 asdkfa 2 asdfasd asdfdas asdf
2.2 asdkfa 2 asdfasd asdfdas asdf

Like this I have to form dynamically
The code I had developed is

[HTML]<html>
<head>
<script src="Cal.js" type="text/javascript"></script>
<script type="text/javascript">
i=1;
j=1;
var ww=new Array();
ww[0]=0;
ww[1]=0;

var taskno=0;
var subirow;
var subtaskno;
var fl=0;
var zx;
function insSubRow(q)
{

i++;
ww[i]=0;
var xx =q.parentNode.parentNode.rowIndex;
indx(xx)
var table = document.getElementById("myTable");
var row = table.rows[xx];
var cell = row.cells[0];
var az = cell.firstChild.nodeValue;
if(fl==0)
{
subirow=xx;
zx=xx;
zx++;
fl=1;
subtaskno=0;
}
else
{
if(subirow==xx)
{
zx++;
}
else
{
subtaskno=0;
subirow=xx;
zx=xx;
zx++;
}
}
var x=document.getElementById(''myTable'').insertRow(zx) ;
var b=x.insertCell(0);
subtaskno = subtaskno+1;
temp = az+"."+subtaskno;
b.innerHTML = temp;
var c=x.insertCell(1);
c.innerHTML = "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp"+''< input type="text" size="20">''+"&nbsp&nbsp"+''<input type="button" value="remove" onclick="deleteRow(this,0)">'';
var a=x.insertCell(2);
a.innerHTML=''<input type="text" size="10">'';
var a=x.insertCell(3);
a.innerHTML=''<select><option>High</option><option>Medium</option><option>Low</option></select>'';
var a=x.insertCell(4);
a.innerHTML=''<select><option>yes</option><option>no</option></select>'';
var a=x.insertCell(5);
a.innerHTML=''<select><option>Assigned</option><option>On Track</option><option>Late</option><option>Complete</option></select>'';
var a=x.insertCell(6);
a.innerHTML=''<input type="text" size="10" onclick="scwShow(this,event)">'';
var a=x.insertCell(7);
a.innerHTML=''<input type="text" size="10" onclick="scwShow(this,event)">'';
var a=x.insertCell(8);
a.innerHTML=''<input type="text" size="10">'';
}
function insRow(p)
{
ww[i]=0;

var x=document.getElementById(''myTable'').insertRow(i);
var b=x.insertCell(0);
taskno = taskno+1;
b.innerHTML = taskno;
var c=x.insertCell(1);
c.innerHTML = ''<input type="text" size="15">''+"&nbsp&nbsp&nbsp"+''<input type="button" value="Sub Task" onclick="insSubRow(this)">''+"&nbsp&nbsp"+''<input type="button" value="remove" onclick="deleteRow(this,1)">'';
var a=x.insertCell(2);
a.innerHTML=''<input type="text" size="10">'';
var a=x.insertCell(3);
a.innerHTML=''<select><option>High</option><option>Medium</option><option>Low</option></select>'';
var a=x.insertCell(4);
a.innerHTML=''<select><option>yes</option><option>no</option></select>'';
var a=x.insertCell(5);
a.innerHTML=''<select><option>Assigned</option><option>On Track</option><option>Late</option><option>Complete</option></select>'';
var a=x.insertCell(6);
a.innerHTML=''<input type="text" size="10" onclick="scwShow(this,event)">'';
var a=x.insertCell(7);
a.innerHTML=''<input type="text" size="10" onclick="scwShow(this,event)">'';
var a=x.insertCell(8);
a.innerHTML=''<input type="text" size="10">'';
i++;
}
function indx(jk)
{
jj=jk;
k=ww[jj];
k++;
ww[jj]=k;
}
function deleteRow(r,f)
{

var jj=r.parentNode.parentNode.rowIndex;
if(f==0)
{
document.getElementById(''myTable'').deleteRow(jj);
i--;
zx--;
}
else
{


for(m=ww[jj]+jj;m>=jj;m--)
{

document.getElementById(''myTable'').deleteRow(jj);
i--;
zx--;
}
j--;
}

}
</script>
</head>
<body>
<p><p><p><p>
&nbsp&nbsp<input type="button" onclick="insRow(this)" value="Add Task">
<p><p><p><p>
<table id="myTable" frame="hsides" align="center" border="3" cellspacing="0" cellpading="0" width="1000">
<tr >
<th>WBS</th>
<th width="399">Task Id</th>

<th>Task Name</th>
<th>Priority</th>
<th>Active</th>
<th>Status</th>
<th>St. Date</th>
<th>End Date</th>
<th>Total Hrs.</th>
</tr>
</table>
</table>
</body>
</html>[/HTML]

Please Help me out guys. It''s very very urgent

推荐答案

那么会发生什么?什么有用,有什么用?
So what happens? What works and what doesn''t?



那么会发生什么?什么有用,有什么用?
So what happens? What works and what doesn''t?



你好代码工作正常,但问题是。如果我正在递增索引的子索引,并且在我尝试相同的其他方法之后它就可以了。如果我再次工作,它会崩溃。此外,如果我删除子索引或索引,编号更加糟糕,我不能构建正确的编号。请帮帮我。你只需用HTML运行代码然后你就可以找到问题

Hello the code is working cool but the problem is. If I am incrementing the subindex of an index and after I am trying the same for other means it''s ok. If again i work on the first its get collapsed. Moreover if I am deleting a sub index or index the numberings are more worse i can''t frame the correct numbering. Please help me out. You just run the code in HTML then you can find the problem



你好,代码工作正常,但问题是。如果我正在递增索引的子索引,并且在我尝试相同的其他方法之后它就可以了。如果我再次工作,它会崩溃。此外,如果我删除子索引或索引,编号更加糟糕,我不能构建正确的编号。请帮帮我。您只需在HTML中运行代码,然后就可以找到问题
Hello the code is working cool but the problem is. If I am incrementing the subindex of an index and after I am trying the same for other means it''s ok. If again i work on the first its get collapsed. Moreover if I am deleting a sub index or index the numberings are more worse i can''t frame the correct numbering. Please help me out. You just run the code in HTML then you can find the problem



您正在使用未更新的全局变量taskno。删除行时需要更新它。

You''re using the global variable taskno which you''re not updating. You need to update it when deleting a row.


这篇关于WBS - 工作分解结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆