|
@@ -81,11 +81,20 @@
|
|
@change="hetongChange(key)"
|
|
@change="hetongChange(key)"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in fromss.projectAndUserList[key].dataInfo"
|
|
|
|
|
|
+ v-for="(item,index) in fromss.projectAndUserList[key].dataInfo"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.contractName"
|
|
:label="item.contractName"
|
|
:value="item.id"
|
|
:value="item.id"
|
|
>
|
|
>
|
|
|
|
+ <span style="float: left">{{ item.contractName }}</span>
|
|
|
|
+ <el-button
|
|
|
|
+ @click.stop="deleteProject(key,type,index)"
|
|
|
|
+ style="float: right;margin-right:5px;margin-top:3px;"
|
|
|
|
+ type="danger"
|
|
|
|
+ size="mini"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ circle
|
|
|
|
+ ></el-button>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-input
|
|
<el-input
|
|
@@ -1103,21 +1112,22 @@ export default {
|
|
this.findProjectAndContractList(row.id) //编辑获取参建项目
|
|
this.findProjectAndContractList(row.id) //编辑获取参建项目
|
|
this.$refs.crud.rowEdit(row, index)
|
|
this.$refs.crud.rowEdit(row, index)
|
|
},
|
|
},
|
|
- deleteProject (key, type) {//删除参建项目按钮
|
|
|
|
|
|
+ deleteProject (key, type, index) {//删除参建项目按钮
|
|
if (type == 'add') {
|
|
if (type == 'add') {
|
|
- this.fromss.projectAndUserList[key].dataInfo.forEach(val => {
|
|
|
|
- if (val.id == this.fromss.projectAndUserList[key].contractId) {
|
|
|
|
- if (this.fromss.projectAndUserList[key].dataInfo.length == 1) {
|
|
|
|
- this.fromss.projectAndUserList.splice(this.fromss.projectAndUserList[key], 1)
|
|
|
|
- } else {
|
|
|
|
- this.fromss.projectAndUserList[key].roleName = this.fromss.projectAndUserList[key].dataInfo[1].roleName
|
|
|
|
- this.fromss.projectAndUserList[key].contractName = this.fromss.projectAndUserList[key].dataInfo[1].id
|
|
|
|
- this.fromss.projectAndUserList[key].contractId = this.fromss.projectAndUserList[key].dataInfo[1].id
|
|
|
|
- this.fromss.projectAndUserList[key].dataInfo.splice(val, 1)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // this.fromss.projectAndUserList[key].dataInfo.forEach(val => {
|
|
|
|
+ // if (val.id == this.fromss.projectAndUserList[key].contractId) {
|
|
|
|
+ // if (this.fromss.projectAndUserList[key].dataInfo.length == 1) {
|
|
|
|
+ // this.fromss.projectAndUserList.splice(this.fromss.projectAndUserList[key], 1)
|
|
|
|
+ // } else {
|
|
|
|
+ // this.fromss.projectAndUserList[key].roleName = this.fromss.projectAndUserList[key].dataInfo[1].roleName
|
|
|
|
+ // this.fromss.projectAndUserList[key].contractName = this.fromss.projectAndUserList[key].dataInfo[1].id
|
|
|
|
+ // this.fromss.projectAndUserList[key].contractId = this.fromss.projectAndUserList[key].dataInfo[1].id
|
|
|
|
+ // this.fromss.projectAndUserList[key].dataInfo.splice(val, 1)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
|
|
|
|
+ this.fromss.projectAndUserList[key].dataInfo[index]
|
|
} else {
|
|
} else {
|
|
this.removeUsersByIds(this.fromss.projectAndUserList[key].contractName)
|
|
this.removeUsersByIds(this.fromss.projectAndUserList[key].contractName)
|
|
}
|
|
}
|