修改bug
This commit is contained in:
@@ -1224,6 +1224,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//添加标准确定事件
|
//添加标准确定事件
|
||||||
okStand() {
|
okStand() {
|
||||||
|
this.getStandData();
|
||||||
if (this.standList.length < 1) {
|
if (this.standList.length < 1) {
|
||||||
this.$message.warning("请选择需要添加进清单的数据");
|
this.$message.warning("请选择需要添加进清单的数据");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -700,67 +700,72 @@ export default {
|
|||||||
this.standModel = false;
|
this.standModel = false;
|
||||||
},
|
},
|
||||||
//添加标准确定事件
|
//添加标准确定事件
|
||||||
okStand(){
|
// this.detailedListModel = false
|
||||||
if(this.standList.length > 0){
|
// this.standModel = false
|
||||||
this.standList.forEach(item => {
|
// okStand(){
|
||||||
let addIndex
|
// console.log(this.dataList);
|
||||||
addIndex = this.dataList.findIndex(items => {
|
// if(this.standList.length < 1){
|
||||||
return items.standId === item.id
|
// this.$message.warning('请至少选择一条数据进行添加')
|
||||||
})
|
// }else{
|
||||||
if(addIndex > -1){
|
// this.standList.map(item => {
|
||||||
this.$message.warning('请勿重复添加数据')
|
// let addIndex;
|
||||||
}else{
|
// addIndex = this.dataList.findIndex(items => {
|
||||||
this.dataList.push(item)
|
// return items.standId == item.id
|
||||||
}
|
// })
|
||||||
})
|
// console.log(addIndex);
|
||||||
}else{
|
// if(addIndex > -1){
|
||||||
this.$message.warning('请至少选择一条数据进行添加')
|
// 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;
|
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
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
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
* @date: 2018-09-04 17:47:46
|
* @date: 2018-09-04 17:47:46
|
||||||
*/
|
*/
|
||||||
// 服务器地址
|
// 服务器地址
|
||||||
// const devIp = '10.96.10.171'
|
const devIp = '10.96.10.171'
|
||||||
// const devInterfacePORT = '9999'
|
|
||||||
const devIp = '10.96.170.156'
|
|
||||||
const devInterfacePORT = '9999'
|
const devInterfacePORT = '9999'
|
||||||
|
// const devIp = '10.5.103.101'
|
||||||
|
// const devInterfacePORT = '9999'
|
||||||
// 云端端口号
|
// 云端端口号
|
||||||
const DEV_CLOUD_RES_INTERFACE_PORT = '7777'
|
const DEV_CLOUD_RES_INTERFACE_PORT = '7777'
|
||||||
const simpleFilePath = 'att/attFile/upload'
|
const simpleFilePath = 'att/attFile/upload'
|
||||||
|
|||||||
Reference in New Issue
Block a user