|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="article-manager"> |
|
|
|
|
<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }"> |
|
|
|
|
<!-- <el-card :bordered="false" shadow="never" class="ivu-mt-16" :body-style="{ padding: 0 }"> |
|
|
|
|
<div class="padding-add"> |
|
|
|
|
<el-form ref="artFrom" :model="artFrom" inline label-width="80px" label-position="right" @submit.native.prevent> |
|
|
|
|
<el-form-item label="商品分类:" prop="pid" label-for="pid"> |
|
|
|
@ -26,11 +26,10 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
<el-card :bordered="false" shadow="never" class="ivu-mt mt16"> |
|
|
|
|
</el-card> --> |
|
|
|
|
<el-card :bordered="false" shadow="never" class="ivu-mt-16"> |
|
|
|
|
<el-button type="primary" class="bnt" @click="addClass">添加分类</el-button> |
|
|
|
|
<el-table class="mt14" highlight-hover-row :loading="loading" header-row-class-name="false" |
|
|
|
|
:tree-config="{ children: 'children' }" :data="tableData"> |
|
|
|
|
<el-table class="mt14" :loading="loading" :data="tableData"> |
|
|
|
|
<el-table-column field="id" label="ID" tooltip width="80"></el-table-column> |
|
|
|
|
<el-table-column field="cate_name" tree-node label="分类名称" min-width="250"></el-table-column> |
|
|
|
|
<el-table-column field="pic" label="分类图标" min-width="100"> |
|
|
|
@ -66,11 +65,10 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import edit from '@/components/Category/edit' |
|
|
|
|
|
|
|
|
|
import { mapState } from 'vuex'; |
|
|
|
|
// import { productListApi, productCreateApi, productEditApi, setShowApi, treeListApi } from '@/api/product'; |
|
|
|
|
import edit from '@/components/Category/edit' |
|
|
|
|
import editFrom from '../../../components/from/from'; |
|
|
|
|
import productApi from '@/api/product/productAttr.js'; |
|
|
|
|
import {loadingFn} from "@/utils/validate" |
|
|
|
|
export default { |
|
|
|
|
name: 'product_productClassify', |
|
|
|
|
components: { |
|
|
|
@ -92,40 +90,31 @@ export default { |
|
|
|
|
xs: 24, |
|
|
|
|
}, |
|
|
|
|
loading: false, |
|
|
|
|
artFrom: { |
|
|
|
|
pid: 0, |
|
|
|
|
is_show: '', |
|
|
|
|
page: 1, |
|
|
|
|
cate_name: '', |
|
|
|
|
limit: 15, |
|
|
|
|
page: { |
|
|
|
|
"currentPage": 1, |
|
|
|
|
"pageSize": 10, |
|
|
|
|
"params": {}, |
|
|
|
|
totalCount: 0 |
|
|
|
|
}, |
|
|
|
|
total: 0, |
|
|
|
|
tableData: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapState('admin/userLevel', ['categoryId']), |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.goodsCategory(); |
|
|
|
|
this.getList(); |
|
|
|
|
// this.goodsCategory(); |
|
|
|
|
// this.getList(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 商品分类; |
|
|
|
|
goodsCategory() { |
|
|
|
|
// treeListApi(0) |
|
|
|
|
// .then((res) => { |
|
|
|
|
// this.treeSelect = res.data; |
|
|
|
|
// }) |
|
|
|
|
// .catch((res) => { |
|
|
|
|
// this.$message.error(res.msg); |
|
|
|
|
// }); |
|
|
|
|
goodsCategory() { |
|
|
|
|
}, |
|
|
|
|
// 列表 |
|
|
|
|
getList() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.artFrom.is_show = this.artFrom.is_show || ''; |
|
|
|
|
this.artFrom.pid = this.artFrom.pid || ''; |
|
|
|
|
// console.log(,'loadingFn') |
|
|
|
|
// loadingFn(this.loading,productApi.classifyGetByPage(this.page)) |
|
|
|
|
// this.artFrom.is_show = this.artFrom.is_show || ''; |
|
|
|
|
// this.artFrom.pid = this.artFrom.pid || ''; |
|
|
|
|
// productListApi(this.artFrom) |
|
|
|
|
// .then(async (res) => { |
|
|
|
|
// let data = res.data; |
|
|
|
@ -137,6 +126,7 @@ export default { |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.$message.error(res.msg); |
|
|
|
|
// }); |
|
|
|
|
// productApi.classifyGetByPage() |
|
|
|
|
}, |
|
|
|
|
pageChange(index) { |
|
|
|
|
this.artFrom.page = index; |
|
|
|
|