|
|
@@ -54,8 +54,7 @@
|
|
|
chooseSpec: [], // 当前分类选中的规格
|
|
|
allData: {},
|
|
|
type: 0, // 1编辑 0新增,
|
|
|
- shop_allData: [],
|
|
|
- now_spec_id: 0
|
|
|
+ shop_allData: []
|
|
|
},
|
|
|
methods: {
|
|
|
onSubmit() {
|
|
|
@@ -105,7 +104,6 @@
|
|
|
for (var key in Object(res)) {
|
|
|
let index = this.tableData.findIndex(item => item.id == res[key]['id']);
|
|
|
const isExist = this.shop_allData.includes(res[key]['id'])
|
|
|
- let now_spec_state = this.now_spec_id == res[key]['id'] ? true : false;
|
|
|
if (index != -1) {
|
|
|
this.tableData.splice(index, 1)
|
|
|
} else {
|
|
|
@@ -113,13 +111,9 @@
|
|
|
id: res[key]['id'],
|
|
|
name: res[key]['title'],
|
|
|
type_id: this.tabValue,
|
|
|
- selected_d: isExist,
|
|
|
- now_spec_state: now_spec_state
|
|
|
+ selected_d: isExist
|
|
|
}
|
|
|
this.tableData.push(item);
|
|
|
- // if(now_spec_state){
|
|
|
- // this.allData[this.tabValue] = item
|
|
|
- // }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -131,7 +125,6 @@
|
|
|
|
|
|
},
|
|
|
onLoad: function (query) {
|
|
|
- this.now_spec_id = Yunqi.data.now_spec_id;
|
|
|
let rows = Yunqi.data.rows;
|
|
|
if (rows) {
|
|
|
const grouped = JSON.parse(rows).reduce((acc, item) => {
|