车型项目库调取数据bug修改~~
This commit is contained in:
@@ -699,115 +699,52 @@ export default {
|
|||||||
cancelStand() {
|
cancelStand() {
|
||||||
this.standModel = false;
|
this.standModel = false;
|
||||||
},
|
},
|
||||||
//如果张宇欢改好了就把这个放开,然后把底下那个注释了
|
|
||||||
// okStand() {
|
okStand() {
|
||||||
// let _this = this;
|
let _this = this;
|
||||||
// if (this.standList.length < 1) {
|
if (this.standList.length < 1) {
|
||||||
// _this.$message.warning("请选择标准");
|
_this.$message.warning("请选择标准");
|
||||||
// } else {
|
} else {
|
||||||
// for (let i = 0; i < this.dataList.length; i++) {
|
for (let i = 0; i < this.dataList.length; i++) {
|
||||||
// let newStand = false;
|
let newStand = false;
|
||||||
// for (let j = 0; j < this.standList.length; j++) {
|
for (let j = 0; j < this.standList.length; j++) {
|
||||||
// if (this.standList[j].id == this.dataList[i].standId) {
|
if (this.standList[j].id == this.dataList[i].standId) {
|
||||||
// newStand = true;
|
newStand = true;
|
||||||
// this.standList.splice(j, 1)
|
this.standList.splice(j, 1)
|
||||||
// j--
|
j--
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if (newStand) {
|
if (newStand) {
|
||||||
// _this.$message.warning("请勿重复添加数据");
|
_this.$message.warning("请勿重复添加数据");
|
||||||
// } else {
|
} else {
|
||||||
// // _this.dataList.push(item);
|
// _this.dataList.push(item);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// this.standardData = []
|
this.standardData = []
|
||||||
// _this.standModel = false;
|
_this.standModel = false;
|
||||||
// for (var i = 0; i < this.standList.length; i++) {
|
for (var i = 0; i < this.standList.length; i++) {
|
||||||
// this.standList1.push({
|
this.standList1.push({
|
||||||
// standId: this.standList[i].id,
|
standId: this.standList[i].id,
|
||||||
// projectId: this.localProEO.id
|
projectId: this.localProEO.id
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// if (this.standList1 != '') {
|
if (this.standList1 != '') {
|
||||||
// this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, {
|
this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, {
|
||||||
// _this: this
|
_this: this
|
||||||
// }, res => {
|
}, res => {
|
||||||
// if (res.ok) {
|
if (res.ok) {
|
||||||
// // this.$message.success(res.message)
|
// this.$message.success(res.message)
|
||||||
// this.getDataList()
|
this.getDataList()
|
||||||
// }
|
}
|
||||||
// }, e => {
|
}, e => {
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// this.standList = []
|
this.standList = []
|
||||||
// this.standList1 = []
|
this.standList1 = []
|
||||||
// _this.standModel = false;
|
_this.detailedListModel = false;
|
||||||
// }
|
_this.standModel = false;
|
||||||
// },
|
}
|
||||||
//添加标准确定事件
|
|
||||||
okStand(){
|
|
||||||
if(this.standList.length > 0){
|
|
||||||
this.standList.forEach(item => {
|
|
||||||
let addIndex
|
|
||||||
addIndex = this.dataList.findIndex(items => {
|
|
||||||
return items.standId === item.id
|
|
||||||
})
|
|
||||||
if(addIndex > -1){
|
|
||||||
this.$message.warning('请勿重复添加数据')
|
|
||||||
}else{
|
|
||||||
this.dataList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.detailedListModel = false
|
|
||||||
this.standModel = false
|
|
||||||
}else{
|
|
||||||
this.$message.warning('请至少选择一条数据进行添加')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// okStand() {
|
|
||||||
// let _this = this;
|
|
||||||
// if (this.standList.length < 1) {
|
|
||||||
// _this.$message.warning("请选择标准");
|
|
||||||
// } else {
|
|
||||||
// for (let i = 0; i < this.dataList.length; i++) {
|
|
||||||
// let newStand = false;
|
|
||||||
// for (let j = 0; j < this.standList.length; j++) {
|
|
||||||
// if (this.standList[j].id == this.dataList[i].standId) {
|
|
||||||
// newStand = true;
|
|
||||||
// this.standList.splice(j, 1)
|
|
||||||
// j--
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (newStand) {
|
|
||||||
// _this.$message.warning("请勿重复添加数据");
|
|
||||||
// } else {
|
|
||||||
// // _this.dataList.push(item);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// this.standardData = []
|
|
||||||
// _this.standModel = false;
|
|
||||||
// for (var i = 0; i < this.standList.length; i++) {
|
|
||||||
// this.standList1.push({
|
|
||||||
// standId: this.standList[i].id,
|
|
||||||
// projectId: this.localProEO.id
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if (this.standList1 != '') {
|
|
||||||
// this.$http.postData("sarStandProjectLibrary/batchInsert", this.standList1, {
|
|
||||||
// _this: this
|
|
||||||
// }, res => {
|
|
||||||
// if (res.ok) {
|
|
||||||
// // this.$message.success(res.message)
|
|
||||||
// this.getDataList()
|
|
||||||
// }
|
|
||||||
// }, e => {
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// this.standList = []
|
|
||||||
// this.standList1 = []
|
|
||||||
// _this.standModel = false;
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
//获取标准
|
//获取标准
|
||||||
getStandrd(data){
|
getStandrd(data){
|
||||||
this.detailedId = data.id
|
this.detailedId = data.id
|
||||||
|
|||||||
Reference in New Issue
Block a user