|
@@ -35,7 +35,7 @@
|
|
|
unCheckedChildren="禁用"
|
|
|
v-model="record.enableFlag"
|
|
|
@change="e=>changeFlagHandle(e,record)"/>
|
|
|
- <span v-else :style="{color:(record.enableFlag?'#00aa00':'#999')}"> {{ record.enableFlag? '已启用': '已禁用' }} </span>
|
|
|
+ <span v-else :style="{color:(record.status==1?'#00aa00':'#999')}"> {{ record.status==1? '已启用': '已禁用' }} </span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -122,6 +122,10 @@ export default {
|
|
|
if (res.status == 200) {
|
|
|
const pos = this.loadDataList.findIndex(item => item.categorySn === record.categorySn)
|
|
|
_this.loadDataList[pos].children = pos != -1 ? (res.data.shopCategoryList && res.data.shopCategoryList.length > 0) ? res.data.shopCategoryList : [] : []
|
|
|
+ // 处理显示状态
|
|
|
+ if (_this.loadDataList[pos].children && _this.loadDataList[pos].children.length > 0) {
|
|
|
+ _this.loadDataList[pos].children.map(con => con.enableFlag = con.status == 1)
|
|
|
+ }
|
|
|
}
|
|
|
_this.spinning = false
|
|
|
})
|
|
@@ -147,7 +151,6 @@ export default {
|
|
|
this.pageType = typeVal
|
|
|
this.openCategoryModal = true
|
|
|
this.parentData = row
|
|
|
- console.log('22222222222222:', row, typeVal)
|
|
|
if (typeVal === 'edit') {
|
|
|
this.$refs.categoryModal.getDetailData({ categorySn: row.categorySn })
|
|
|
}
|