Commit 7b9fa245 authored by 黄奎's avatar 黄奎

页面修改

parent 1753764d
This diff is collapsed.
This diff is collapsed.
...@@ -2,28 +2,62 @@ ...@@ -2,28 +2,62 @@
<div class="performanceStatics"> <div class="performanceStatics">
<div class="head-title"> <div class="head-title">
品牌管理 品牌管理
<el-button style="float:right;margin-top: -5px;" type="primary" class="el-button--small" <el-button
@click="CommonJump('hbrandedit')">新增</el-button> style="float:right;margin-top: -5px;"
type="primary"
class="el-button--small"
@click="CommonJump('hbrandedit')"
>新增</el-button
>
</div> </div>
<div class="content"> <div class="content">
<div style="margin-bottom:20px"> <div style="margin-bottom:20px">
<span>分类</span> <span>分类</span>
<el-select style="margin:0 10px" class="w200" @change="msg.pageIndex=1,getList()" v-model="msg.CategoryId" <el-select
size="small" placeholder="请选择" clearable> style="margin:0 10px"
class="w200"
@change="(msg.pageIndex = 1), getList()"
v-model="msg.CategoryId"
size="small"
placeholder="请选择"
clearable
>
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="0"></el-option>
<el-option v-for="item in CategoryList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option
v-for="item in CategoryList"
:key="item.Id"
:label="item.Name"
:value="item.Id"
>
</el-option> </el-option>
</el-select> </el-select>
<span>品牌名称</span> <span>品牌名称</span>
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="msg.Name" clearable <el-input
@input="msg.pageIndex=1,getList()"> type="text"
style="width:250px"
size="small"
maxlength="100"
v-model="msg.Name"
clearable
@input="(msg.pageIndex = 1), getList()"
>
</el-input> </el-input>
<el-button @click="msg.pageIndex=1,getList()" size="small" type="primary"> <el-button
@click="(msg.pageIndex = 1), getList()"
size="small"
type="primary"
>
查询 查询
</el-button> </el-button>
</div> </div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%"> <el-table
<el-table-column prop="Id" label="编号" width="100"> :data="tableData"
v-loading="loading"
border
style="width: 100%"
>
<el-table-column prop="Id" label="编号" width="100"> </el-table-column>
<el-table-column prop="CategoryName" label="所属分类" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="Name" label="品牌名称" width="200"> <el-table-column prop="Name" label="品牌名称" width="200">
</el-table-column> </el-table-column>
...@@ -34,32 +68,57 @@ ...@@ -34,32 +68,57 @@
</el-table-column> </el-table-column>
<el-table-column label="是否热门" width="100px"> <el-table-column label="是否热门" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsHot==1" effect="dark"> <el-tag v-if="scope.row.IsHot == 1" effect="dark">
热门 热门
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="RemarkDesc" label="上传描述"> <el-table-column prop="RemarkDesc" label="上传描述"> </el-table-column>
</el-table-column> <el-table-column prop="MoreDesc" label="备注描述"> </el-table-column>
<el-table-column prop="MoreDesc" label="备注描述"> <el-table-column label="操作" width="150px">
</el-table-column>
<el-table-column label="操作" width="250px">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="showBrandForm(scope.row)" src="../../assets/img/userman/edit.png" alt="" /> <el-tooltip
<img @click="RemmoveBrand(scope.row)" style="margin-left:10px;" src="../../assets/img/userman/del.png" class="item"
alt="" /> effect="dark"
content="编辑"
placement="top"
>
<img
class="edit-img"
src="../../assets/img/userman/edit.png"
@click="showBrandForm(scope.row)"
/>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
content="删除"
placement="top"
>
<img
src="../../assets/img/userman/del.png"
@click="RemmoveBrand(scope.row)"
/>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize" <el-pagination
:current-page.sync="msg.pageIndex" layout="prev, pager, next" :total="total"> style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
:current-page.sync="msg.pageIndex"
layout="prev, pager, next"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
...@@ -69,14 +128,14 @@ ...@@ -69,14 +128,14 @@
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
CategoryId: 0, //分类编号 CategoryId: 0, //分类编号
Name: '', //品牌名称 Name: "" //品牌名称
}, },
CategoryList: [], //分类列表 CategoryList: [], //分类列表
dateList: [], //日期 dateList: [] //日期
} };
}, },
created() { created() {
this.getCategoryList() this.getCategoryList();
}, },
mounted() { mounted() {
this.getList(); this.getList();
...@@ -90,24 +149,23 @@ ...@@ -90,24 +149,23 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) });
},
refreshPage() {
}, },
refreshPage() {},
//新增修改品牌 //新增修改品牌
showBrandForm(item) { showBrandForm(item) {
this.CommonJump('hbrandedit', { this.CommonJump("hbrandedit", {
Id: item.Id Id: item.Id
}) });
}, },
//删除品牌 //删除品牌
RemmoveBrand(item) { RemmoveBrand(item) {
let that = this; let that = this;
that.Confirm("是否删除此品牌?", function () { that.Confirm("是否删除此品牌?", function() {
that.apipost( that.apipost(
"/api/Assess/DelBrandInfo", { "/api/Assess/DelBrandInfo",
BrandId: item.Id, {
BrandId: item.Id
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -116,7 +174,7 @@ ...@@ -116,7 +174,7 @@
} else { } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
}, }
); );
}); });
}, },
...@@ -131,21 +189,24 @@ ...@@ -131,21 +189,24 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) });
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
},
} }
}; }
};
</script> </script>
<style> <style scope>
.performanceStatics .content { .performanceStatics .content {
background: #fff; background: #fff;
margin-top: 10px; margin-top: 10px;
padding: 20px; padding: 20px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.edit-img {
margin-right: 10px;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment