标准清单数据列表删除

This commit is contained in:
shen_yan_pu
2021-08-16 11:27:02 +08:00
parent 377a72f38a
commit 795c722ebc
4 changed files with 33 additions and 30 deletions
@@ -994,8 +994,6 @@ export default {
},
// 点击批量删除事件
deleteList() {
console.log(this.selectList);
console.log(this.dataList);
if (this.selectList.length < 1) {
this.$message.warning("请选择一条数据进行删除");
} else {
@@ -1011,10 +1009,8 @@ export default {
index = this.dataList.findIndex(items => {
return items.id === item;
});
console.log(index);
if (index > -1) {
this.dataList.splice(index, 1);
console.log(this.dataList);
}
exits.push(item);
});
@@ -177,8 +177,8 @@
prop="code"
show-overflow-tooltip
fixed="left"
width="180px"
align="center"
width="180px"
label="标准号">
<template slot-scope="scope">
<span @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standNumber }}</span>
@@ -641,6 +641,7 @@ export default {
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list
CycxOptions: [],
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
/** ******************************/
@@ -900,7 +901,7 @@ export default {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
this.CycxOptions = res.data.CLLX
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
@@ -1235,10 +1236,10 @@ export default {
},
// 清单条目 table select事件
sarAccessInfoSelect (selectData) {
this.sarAccessInfoListArry = selectData
/* let sarAccessInfoListArryId = []
for(let i=0; i<this.selectData.length; i++){
}*/
this.sarAccessInfoListArry = []
for (let i = 0; i < selectData.length; i++) {
this.sarAccessInfoListArry.push(selectData[i].id);
}
},
// 点击取消按钮 返回事件
backCancal () {
@@ -1493,10 +1494,10 @@ export default {
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let i in this.CycxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
if (this.CycxOptions[i].value === k[m]) {
k[m] = this.CycxOptions[i].label
}
item.typeApplicable = k.join(',')
}
@@ -2039,6 +2040,7 @@ export default {
this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.PRODUCTTYPE // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES // 能源种类list
this.CycxOptions = res.data.CLLX
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY //适用区域list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
@@ -621,6 +621,7 @@ export default {
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list
CycxOptions: [],
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
/** ******************************/
@@ -881,7 +882,7 @@ export default {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
this.CycxOptions = res.data.CLLX
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
@@ -1207,7 +1208,10 @@ export default {
},
// 清单条目 table select事件
sarAccessInfoSelect (selectData) {
this.sarAccessInfoListArry = selectData
this.sarAccessInfoListArry = []
for (let i = 0; i < selectData.length; i++) {
this.sarAccessInfoListArry.push(selectData[i].id);
}
},
// 点击取消按钮 返回事件
backCancal () {
@@ -1461,10 +1465,10 @@ export default {
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let i in this.CycxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
if (this.CycxOptions[i].value === k[m]) {
k[m] = this.CycxOptions[i].label
}
item.typeApplicable = k.join(',')
}
@@ -2018,6 +2022,7 @@ export default {
this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list
this.CycxOptions = res.data.CLLX // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY //适用区域list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质
@@ -2032,10 +2037,6 @@ export default {
this.textStatusOptions = res.data.WBZTCLASS
this.sycpxOptions = res.data.SYCPXCLASS // 适用产品线
this.setMap(this.textStatusOptions)
this.setMap(this.zrbmOptions)
this.setMap(this.categoryOptions)
this.setMap(this.sycpxOptions)
this.setMap(this.energyKindOptions)
this.getGzzOption()
}, e => {
})
@@ -18,7 +18,7 @@
size="small"
>
<el-option
v-for="item in energyKindOptions"
v-for="item in CycxOptions"
:value="item.value"
:key="item.value"
:label="item.label"
@@ -134,7 +134,7 @@
size="small"
>
<el-option
v-for="item in energyKindOptions"
v-for="item in CycxOptions"
:value="item.value"
:key="item.value"
:label="item.label"
@@ -284,7 +284,6 @@
<el-button
class="common-button-default delete-button"
size="mini" @click="deleteSelectSarAccessInfo"
v-if="!disabledFlag"
v-btn-permission="''"
><i class="iconfont">&#xe61b;</i>删除</el-button>
</div>
@@ -670,6 +669,7 @@ export default {
zrbmOptions: [], // 责任部门
categoryOptions: [], // 能源类型
energyKindOptions: [], // 能源种类list
CycxOptions: [],
sycpxOptions: [], // 适用产品线
applyArcticOptions: [], // 基础车型 适用车型list
syrzOptions: [],
@@ -936,7 +936,7 @@ export default {
// 责任部门数据字典
this.zrbmOptions = res.data.ZRBMCLASS
// 能源类型数据字典
this.energyKindOptions = res.data.ENERGYTYPES
this.CycxOptions = res.data.CLLX
// this.categoryOptions = res.data.NYLXCLASS // 能源类型
// 适用车型数据字典
this.applyArcticOptions = res.data.PRODUCTTYPE
@@ -1180,7 +1180,10 @@ export default {
},
// 清单条目 table select事件
sarAccessInfoSelect (selectData) {
this.sarAccessInfoListArry = selectData
this.sarAccessInfoListArry = []
for (let i = 0; i < selectData.length; i++) {
this.sarAccessInfoListArry.push(selectData[i].id);
}
},
// 点击取消按钮 返回事件
backCancal () {
@@ -1304,10 +1307,10 @@ export default {
// 适用车型转换
if (item.typeApplicable !== null) {
let k = (item.typeApplicable || "").split(',')
for (let i in this.energyKindOptions) {
for (let i in this.CycxOptions) {
for (let m = 0; m< k.length; m++) {
if (this.energyKindOptions[i].value === k[m]) {
k[m] = this.energyKindOptions[i].label
if (this.CycxOptions[i].value === k[m]) {
k[m] = this.CycxOptions[i].label
}
item.typeApplicable = k.join(',')
}
@@ -1929,6 +1932,7 @@ export default {
this.regionOptions = res.data.REGION // 基础信息 区域list
this.applyArcticOptions = res.data.PRODUCTTYPE || [] // 基础车型 适用车型list
this.energyKindOptions = res.data.ENERGYTYPES || [] // 能源种类list
this.CycxOptions = res.data.CLLX || [] // 能源种类list
this.drawerCountryOptions = res.data.COUNTRY // 国家、地区list
this.applyOptions = res.data.COUNTRY //适用区域list
this.standNatureOptions = res.data.SARPROPERTY // 新增 标准性质