|
@@ -31,7 +31,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="margin-top: 20px;font-size: 15px;font-weight: 600;color: red;">PS:插入行与删除行并未进行保存操作,需要保存请点击保存按钮!!!</div>
|
|
|
|
|
|
|
+ <div style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
|
|
+ <div style="margin-top: 20px;font-size: 15px;font-weight: 600;color: red;">PS:插入行与删除行并未进行保存操作,需要保存请点击保存按钮!!!</div>
|
|
|
|
|
+ <el-button size="mini" @click="pushxiangmu" type="primary">添加项目</el-button>
|
|
|
|
|
+ </div>
|
|
|
<el-table :data="tableDatass" :span-method="objectSpanMethod" border style="width: 100%; ">
|
|
<el-table :data="tableDatass" :span-method="objectSpanMethod" border style="width: 100%; ">
|
|
|
<el-table-column prop="title" label="项目" width="180">
|
|
<el-table-column prop="title" label="项目" width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -55,11 +58,11 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="操作" width="150">
|
|
<el-table-column prop="remark" label="操作" width="150">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button class="czbtn" size="mini" type="primary" @click="insertTaskAbove(scope.$index,scope.row)">插入行↑</el-button>
|
|
|
|
|
|
|
+ <el-button style="width:80px;" class="czbtn" size="mini" type="primary" @click="insertTaskAbove(scope.$index,scope.row)">插入行↑</el-button>
|
|
|
<br />
|
|
<br />
|
|
|
- <el-button style="margin: 10px 0;" size="mini" @click="deleterow(scope.$index,scope.row)" type="danger">删 除</el-button>
|
|
|
|
|
|
|
+ <el-button style="margin: 10px 0;width:80px;" size="mini" @click="deleterow(scope.$index,scope.row)" type="danger">删 除</el-button>
|
|
|
<br />
|
|
<br />
|
|
|
- <el-button size="mini" @click="insertTaskBelow(scope.$index,scope.row)" type="primary">插入行↓</el-button>
|
|
|
|
|
|
|
+ <el-button style="width:80px;" size="mini" @click="insertTaskBelow(scope.$index,scope.row)" type="primary">插入行↓</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -389,7 +392,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.porojectindex=val;
|
|
this.porojectindex=val;
|
|
|
-
|
|
|
|
|
// for (let b = 0; b < this.porojectindex.length; b++) {
|
|
// for (let b = 0; b < this.porojectindex.length; b++) {
|
|
|
// // this.tableDatass.splice( this.porojectindex,1)
|
|
// // this.tableDatass.splice( this.porojectindex,1)
|
|
|
// for (let m = 0; m < this.porojectname.length; m++) {
|
|
// for (let m = 0; m < this.porojectname.length; m++) {
|
|
@@ -397,11 +399,29 @@ export default {
|
|
|
// this.tableDatass.splice(this.porojectindex[b],1,this.porojectname[m])
|
|
// this.tableDatass.splice(this.porojectindex[b],1,this.porojectname[m])
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
- // this.tableDatass=this.porojectname.concat(this.tableDatass)
|
|
|
|
|
|
|
+ // this.tableDatass=this.porojectname.concat(this.tableDatass);
|
|
|
this.unflattenData();
|
|
this.unflattenData();
|
|
|
this.flattenData();
|
|
this.flattenData();
|
|
|
this.getSpanArr();
|
|
this.getSpanArr();
|
|
|
},
|
|
},
|
|
|
|
|
+ //添加项目
|
|
|
|
|
+ pushxiangmu(){
|
|
|
|
|
+ this.unflattenData();
|
|
|
|
|
+ console.log(this.tableData);
|
|
|
|
|
+ var obj={
|
|
|
|
|
+ title:'新项目',
|
|
|
|
|
+ itmes:[{
|
|
|
|
|
+ id:0,
|
|
|
|
|
+ dataDetails:'',
|
|
|
|
|
+ details:'',
|
|
|
|
|
+ remark:'',
|
|
|
|
|
+ identification:'新项目',
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
|
|
+ this.tableData.push(obj);
|
|
|
|
|
+ this.flattenData();
|
|
|
|
|
+ this.getSpanArr();
|
|
|
|
|
+ },
|
|
|
//获得焦点
|
|
//获得焦点
|
|
|
huodejiaodian(val){
|
|
huodejiaodian(val){
|
|
|
this.porojectname=[];
|
|
this.porojectname=[];
|
|
@@ -434,4 +454,4 @@ export default {
|
|
|
margin-bottom: 0;
|
|
margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
-
|
|
|
|
|
|
|
+
|