Commit 2f31f999 by lixiaomin

新增商品分类图片

parent 2f359b85
...@@ -33,6 +33,15 @@ ...@@ -33,6 +33,15 @@
<a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a> <a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图片" align="center" >
<template slot-scope="scope">
<div class="image-tmp">
<el-image style="width: 100px; height: 100px" :src="scope.row.icon" :preview-src-list="getPicsBigList(scope.row.icon)">
<div slot="error" class="image-slot"></div>
</el-image>
</div>
</template>
</el-table-column>
<el-table-column label="编码" align="center" prop="code" /> <el-table-column label="编码" align="center" prop="code" />
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="商品数量" align="center" prop="goodsCount" /> <el-table-column label="商品数量" align="center" prop="goodsCount" />
...@@ -73,6 +82,9 @@ ...@@ -73,6 +82,9 @@
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="名称" minlength="1" maxlength="100"/> <el-input v-model="form.name" placeholder="名称" minlength="1" maxlength="100"/>
</el-form-item> </el-form-item>
<el-form-item label="添加商品分类图片">
<ImageUpload :value="form.icon" v-model="form.icon" :limit="1" />
</el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" maxlength="500"/> <el-input v-model="form.remarks" type="textarea" placeholder="请输入内容" maxlength="500"/>
</el-form-item> </el-form-item>
...@@ -149,6 +161,11 @@ export default { ...@@ -149,6 +161,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
getPicsBigList(str){
let list=[];
list.push(str)
return list;
},
turnClick(row,tag){ turnClick(row,tag){
turnList({"id":row.id,"pointer":tag}).then((response) => { turnList({"id":row.id,"pointer":tag}).then((response) => {
console.log("response",response); console.log("response",response);
......
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