pull/2/head
parent
8049bb804c
commit
93cc41f557
8 changed files with 1548 additions and 1353 deletions
@ -0,0 +1,134 @@ |
||||
<template> |
||||
<div> |
||||
<el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }"> |
||||
<div class="padding-add"> |
||||
<el-form ref="artFrom" :model="page" label-width="80px" label-position="right" class="tabform" |
||||
@submit.native.prevent inline> |
||||
<el-form-item label="输入搜索"> |
||||
<el-input clearable v-model="page.rule_name" placeholder="品牌名称/关键词" |
||||
class="form_content_width"></el-input> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary" @click="userSearchs">查询</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</el-card> |
||||
<el-card :bordered="false" shadow="never" class="ivu-mt-16"> |
||||
<el-button type="primary" @click="addType">添加品牌</el-button> |
||||
<el-table @current-change="tableCurrentChange" ref="table" :data="tableData" v-loading="loading" |
||||
highlight-current-row :row-key="getRowKey" @selection-change="handleSelectRow" empty-text="暂无数据" |
||||
class="mt14"> |
||||
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column> |
||||
<el-table-column label="编号"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.brandNum }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="品牌名称"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.name }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="品牌首字母"> |
||||
<template slot-scope="scope"> |
||||
<el-button @click="showAttrList(scope.row)" type="text"> |
||||
{{ scope.row.attrCount }} |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="排序"> |
||||
<template slot-scope="scope"> |
||||
<el-button @click="showAttrList(scope.row)" type="text"> |
||||
{{ scope.row.attrCount }} |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="是否显示"> |
||||
<template slot-scope="scope"> |
||||
<el-button @click="showAttrList(scope.row)" type="text"> |
||||
{{ scope.row.attrCount }} |
||||
</el-button> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="操作" fixed="right"> |
||||
<template slot-scope="scope"> |
||||
<a @click="edit(scope.row)">编辑</a> |
||||
<el-divider direction="vertical"></el-divider> |
||||
<a @click="del(scope.row)">删除</a> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
<div class="acea-row row-right page"> |
||||
<el-pagination |
||||
@size-change="handleSizeChange" |
||||
@current-change="handleCurrentChange" |
||||
:current-page="page.currentPage" |
||||
:page-sizes="[10, 15, 20, 30]" |
||||
:page-size="page.pageSize" |
||||
layout="total, sizes, prev, pager, next, jumper" |
||||
:total="page.totalCount" /> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import productApi from '@/api/product/productAttr.js'; |
||||
import { loadingFn } from "@/utils/validate" |
||||
export default { |
||||
data() { |
||||
return { |
||||
selection: [], |
||||
selectAttrList: null, |
||||
isShowAttrList: false, |
||||
loading: false, |
||||
page: { |
||||
"currentPage": 1, |
||||
"pageSize": 10, |
||||
"params": {}, |
||||
totalCount: 0 |
||||
}, |
||||
tableData: [], |
||||
total: 0, |
||||
selectedIds: new Set(), //选中合并项的id |
||||
ids: [], |
||||
multipleSelection: [], |
||||
}; |
||||
}, |
||||
computed: {}, |
||||
created() { }, |
||||
methods: { |
||||
tableCurrentChange(e) { }, |
||||
handleCurrentChange(val) { }, |
||||
handleSizeChange(val) { }, |
||||
clearSelection() { }, |
||||
onCancel() { }, |
||||
addType() { }, |
||||
showAttrList(e) { }, |
||||
getRowKey(row) { }, |
||||
//全选和取消全选时触发 |
||||
handleSelectAll(selection) { }, |
||||
// 选中某一行 |
||||
handleSelectRow(selection) { }, |
||||
setChecked() { }, |
||||
// 删除 |
||||
del(row) { }, |
||||
addAttr(model) { |
||||
}, |
||||
// 编辑 |
||||
edit(row) { |
||||
}, |
||||
// 列表 |
||||
getList() { |
||||
loadingFn.call(this, "loading", productApi.brandGetByPage(this.page).then(res => { |
||||
if (res.code = 20000) ({ list: this.tableData = [], totalCount: this.page.totalCount = 0 } = res.data); |
||||
})); |
||||
}, |
||||
// 表格搜索 |
||||
userSearchs() { }, |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped></style> |
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue