修改bug

This commit is contained in:
宋伟佳
2021-08-19 18:04:34 +08:00
parent 9107e06b43
commit bb4fc26161
3 changed files with 68 additions and 62 deletions
@@ -1224,6 +1224,7 @@ export default {
},
//添加标准确定事件
okStand() {
this.getStandData();
if (this.standList.length < 1) {
this.$message.warning("请选择需要添加进清单的数据");
} else {
@@ -700,67 +700,72 @@ export default {
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)
}
})
}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;
// this.detailedListModel = false
// this.standModel = false
// okStand(){
// console.log(this.dataList);
// if(this.standList.length < 1){
// this.$message.warning('请至少选择一条数据进行添加')
// }else{
// this.standList.map(item => {
// let addIndex;
// addIndex = this.dataList.findIndex(items => {
// return items.standId == item.id
// })
// console.log(addIndex);
// if(addIndex > -1){
// this.$message.warning('请勿重复添加数据')
// }else{
// this.dataList.push(item)
// }
// })
//
// }
// },
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){
this.detailedId = data.id
+3 -3
View File
@@ -4,10 +4,10 @@
* @date: 2018-09-04 17:47:46
*/
// 服务器地址
// const devIp = '10.96.10.171'
// const devInterfacePORT = '9999'
const devIp = '10.96.170.156'
const devIp = '10.96.10.171'
const devInterfacePORT = '9999'
// const devIp = '10.5.103.101'
// const devInterfacePORT = '9999'
// 云端端口号
const DEV_CLOUD_RES_INTERFACE_PORT = '7777'
const simpleFilePath = 'att/attFile/upload'