优化
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id"
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="key"
|
||||
:tree-props="{ children: 'skuList', hasChildren: 'hasChildren' }">
|
||||
<el-table-column width="50px"></el-table-column>
|
||||
<el-table-column label="商品信息">
|
||||
@@ -134,7 +134,8 @@
|
||||
<template v-slot="scope">
|
||||
<div class="cons_wrap" v-if="scope.row.typeEnum">
|
||||
<div v-if="scope.row.conInfos && scope.row.conInfos.length">
|
||||
<span v-for="item in scope.row.conInfos" :key="item.id">{{ item.conName }}、</span>
|
||||
<el-button type="text" v-for="item in scope.row.conInfos" :key="item.id"
|
||||
@click="showBindCons(scope.row)">{{ item.conName }}、</el-button>
|
||||
</div>
|
||||
<el-button type="text" @click="showBindCons(scope.row)">
|
||||
绑定
|
||||
@@ -206,7 +207,7 @@
|
||||
<el-dialog :title="editorEumn[editorForm.key]" :visible.sync="editorVisable" :show-close="false" width="300px">
|
||||
<el-form :model="editorForm">
|
||||
<el-form-item>
|
||||
<el-input-number v-model="editorForm.value" />
|
||||
<el-input-number v-model="editorForm.value" :min="0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -311,6 +312,8 @@ export default {
|
||||
|
||||
this.editorConfirmChange()
|
||||
}
|
||||
|
||||
this.getTableData()
|
||||
},
|
||||
changeGrounding(event, row, key) {
|
||||
this.editorForm.key = key
|
||||
@@ -436,6 +439,16 @@ export default {
|
||||
shopId: localStorage.getItem('shopId'),
|
||||
sort: this.tableData.sort
|
||||
})
|
||||
|
||||
res.content.map(item => {
|
||||
item.key = item.id
|
||||
item.skuList.map(val => {
|
||||
val.key = `${item.id}-${val.id}`
|
||||
})
|
||||
})
|
||||
|
||||
console.log(res);
|
||||
|
||||
this.tableData.loading = false
|
||||
this.tableData.data = res.content
|
||||
this.tableData.total = res.totalElements
|
||||
|
||||
Reference in New Issue
Block a user