This commit is contained in:
宋伟佳
2021-08-13 21:34:18 +08:00
parent 03f3f76389
commit 76d4cf782e
13 changed files with 32 additions and 17 deletions
@@ -1035,7 +1035,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -595,7 +595,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -994,6 +994,8 @@ export default {
}, },
// 点击批量删除事件 // 点击批量删除事件
deleteList() { deleteList() {
console.log(this.selectList);
console.log(this.dataList);
if (this.selectList.length < 1) { if (this.selectList.length < 1) {
this.$message.warning("请选择一条数据进行删除"); this.$message.warning("请选择一条数据进行删除");
} else { } else {
@@ -1007,10 +1009,12 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
console.log(index);
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
console.log(this.dataList);
} }
exits.push(item); exits.push(item);
}); });
@@ -598,7 +598,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -394,7 +394,7 @@ export default {
this.deleteDataList.map(item => { this.deleteDataList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -430,7 +430,7 @@ export default {
this.selectedList.map(item => { this.selectedList.map(item => {
let addList; let addList;
addList = this.dataList.findIndex(items => { addList = this.dataList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -631,7 +631,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.productLine = item; return items.productLine === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -605,7 +605,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.productLine = item; return items.productLine === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -450,8 +450,13 @@ export default {
}, { }, {
_this: this _this: this
}, res => { }, res => {
this.ProjectDatas = res.data.Maintenance.records; if(res.data === null){
this.total = res.data.Maintenance.total; this.ProjectDatas = ''
this.total = 0
}else{
this.ProjectDatas = res.data.Maintenance.records;
this.total = res.data.Maintenance.total;
}
}); });
}, },
@@ -421,6 +421,7 @@ export default {
//标准表格选择框改变 //标准表格选择框改变
selectStandChange(data) { selectStandChange(data) {
this.selectList = data; this.selectList = data;
console.log(this.selectList);
}, },
getTree() { getTree() {
this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => { this.$http.get("SarInstitution/institution/institutionAndUser", {}, {}, res => {
@@ -1124,7 +1124,7 @@ export default {
this.selectedAccInfoSearchList.map(item => { this.selectedAccInfoSearchList.map(item => {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1211,7 +1211,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -1093,7 +1093,7 @@ export default {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1183,7 +1183,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -1092,7 +1092,7 @@ export default {
this.selectedAccInfoSearchList.map(item => { this.selectedAccInfoSearchList.map(item => {
let addList; let addList;
addList = this.sarAccessInfoList.findIndex(items => { addList = this.sarAccessInfoList.findIndex(items => {
return items.id == item.id return items.id === item.id
}) })
if(addList > -1){ if(addList > -1){
// this.$refs.accessTypeSelect.clearSelection() // this.$refs.accessTypeSelect.clearSelection()
@@ -1182,7 +1182,7 @@ export default {
this.sarAccessInfoListArry.map(item => { this.sarAccessInfoListArry.map(item => {
let index let index
index = this.sarAccessInfoList.findIndex(items => { index = this.sarAccessInfoList.findIndex(items => {
return items.id = item return items.id === item
}) })
if (index > -1) { if (index > -1) {
this.sarAccessInfoList.splice(index, 1) this.sarAccessInfoList.splice(index, 1)
@@ -631,7 +631,7 @@ export default {
this.selectList.map(item => { this.selectList.map(item => {
let index; let index;
index = this.dataList.findIndex(items => { index = this.dataList.findIndex(items => {
return items.id = item; return items.id === item;
}); });
if (index > -1) { if (index > -1) {
this.dataList.splice(index, 1); this.dataList.splice(index, 1);
@@ -743,6 +743,11 @@ export default {
}, { }, {
_this: this _this: this
}, res => { }, res => {
if(res.data === null){
this.standardData = ''
this.totalDo =''
this.standModel = true;
}
this.standardData = res.data.records this.standardData = res.data.records
this.totalDo = res.data.total this.totalDo = res.data.total
this.standModel = true; this.standModel = true;