Commit 20046abf authored by zhengke's avatar zhengke

修改

parent 20300da1
<template>
<div>
<el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true"
@clear="getList" @keyup.enter.native="getList">
<el-button slot="append" @click="getList">搜索</el-button>
</el-input>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50px">
</el-table-column>
<el-table-column label="ID" width="100px">
<template slot-scope="scope">{{ scope.row.Id }}</template>
</el-table-column>
<el-table-column prop="name" label="名称">
<template slot-scope="scope">
<div flex="cross:center dir:left">
<img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.CoverImage)"/>
<div>{{ scope.row.Name }}</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
<div>
<el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true" @clear="getList"
@keyup.enter.native="getList">
<el-button slot="append" @click="getList">搜索</el-button>
</el-input>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" height="450" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50px">
</el-table-column>
<el-table-column label="ID" width="80px">
<template slot-scope="scope">{{ scope.row.Id }}</template>
</el-table-column>
<el-table-column prop="CategoryList" label="分类" width="150px">
<template slot-scope="scope">
<div v-for="(subItem,SubIndex) in scope.row.CategoryList" :key="SubIndex">
{{subItem.CategoryName}}
</div>
</template>
</el-table-column>
<el-table-column prop="name" label="名称">
<template slot-scope="scope">
<div flex="cross:center dir:left">
<img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.CoverImage)" />
<div>{{ scope.row.Name }}</div>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
dataList: [],
msg:{
pageIndex:1,
pageSize:15,
Name:'',
msg: {
pageIndex: 1,
pageSize: 15,
Name: '',
},
total:0,
selectRow:[],
total: 0,
selectRow: [],
};
},
created() {},
......@@ -49,22 +52,23 @@
getList() {
this.apipost("/api/product/GetProductGoodsDialogList", this.msg, res => {
if (res.data.resultCode == 1) {
this.total=res.data.data.count;
this.dataList=res.data.data.pageData;
this.total = res.data.data.count;
this.dataList = res.data.data.pageData;
console.log(this.dataList,'this.dataList');
} else {
this.Info(res.data.message);
}
})
},
handleSelectionChange(val){
this.selectRow=JSON.parse(JSON.stringify(val));
handleSelectionChange(val) {
this.selectRow = JSON.parse(JSON.stringify(val));
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
//父组件调用方法
getChoicedGoods(){
getChoicedGoods() {
return this.selectRow;
},
//清空多选方法
......@@ -76,7 +80,7 @@
} else {
this.$refs.multipleTable.clearSelection();
}
},
},
},
mounted() {
this.getList();
......
......@@ -291,7 +291,9 @@
background: rgba(0, 0, 0, 0.2);
letter-spacing: -1px;
}
.goodsDialog .el-dialog__body{
padding:10px 20px;
}
</style>
<template>
<div :class="{'active':goodData.isCked}">
......@@ -539,7 +541,7 @@
</span>
</el-dialog>
<!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods">
<el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choiceGood ref="choiceGood"></choiceGood>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="quxiaoGoods()">取 消</el-button>
......
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