Commit cc0e9642 authored by gaia's avatar gaia

Merge remote-tracking branch 'origin/feature/20240301_1544_sale' into release_pre_20240613161600

parents 95170205 910ed931
...@@ -35,7 +35,15 @@ ...@@ -35,7 +35,15 @@
<el-table-column align="center" min-width="100px" prop="id" label="商品ID" /> <el-table-column align="center" min-width="100px" prop="id" label="商品ID" />
<el-table-column align="center" label="封面图" prop="itemImg"> <el-table-column align="center" label="封面图" prop="itemImg">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px"> <!-- <img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px" @click="handleShowPreview(scope.row.images)">-->
<div class="image_preview">
<el-image
:preview-src-list="scope.row.images.split(';')"
:src="scope.row.images.split(';')[0]"
class="table-td-thumb"
/>
</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -95,6 +103,9 @@ ...@@ -95,6 +103,9 @@
:page.sync="listQuery.page" :page.sync="listQuery.page"
:limit.sync="listQuery.limit" :limit.sync="listQuery.limit"
@pagination="getList" /> @pagination="getList" />
<ImagePreview
v-if="isShowPreview"
:imglist="imagesPreviewList"/>
</div> </div>
</template> </template>
...@@ -146,7 +157,9 @@ export default { ...@@ -146,7 +157,9 @@ export default {
finishSettlementDialogShow: false, finishSettlementDialogShow: false,
// 取消 // 取消
cancelConsignDialogShow: false, cancelConsignDialogShow: false,
currentSaleId: '' isShowPreview: false,
currentSaleId: '',
imagesPreviewList: []
} }
}, },
created() { created() {
...@@ -172,6 +185,12 @@ export default { ...@@ -172,6 +185,12 @@ export default {
}) })
}) })
}, },
handleShowPreview(images) {
if (images) {
this.imagesPreviewList = images.split(';')
this.isShowPreview = true
}
},
handleCreate() { handleCreate() {
this.$router.push({ path: '/sale/saleAdd' }) this.$router.push({ path: '/sale/saleAdd' })
}, },
...@@ -288,6 +307,12 @@ export default { ...@@ -288,6 +307,12 @@ export default {
.page_consignList { .page_consignList {
padding: 20px; padding: 20px;
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
.filter-container { .filter-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -28,7 +28,13 @@ ...@@ -28,7 +28,13 @@
<el-table-column align="center" min-width="100px" prop="id" label="商品ID" /> <el-table-column align="center" min-width="100px" prop="id" label="商品ID" />
<el-table-column align="center" label="封面图" prop="itemImg"> <el-table-column align="center" label="封面图" prop="itemImg">
<template slot-scope="scope"> <template slot-scope="scope">
<img v-if="scope.row.images" :src="scope.row.images.split(';')[0]" width="60px" height="60px"> <div class="image_preview">
<el-image
:preview-src-list="scope.row.images.split(';')"
:src="scope.row.images.split(';')[0]"
class="table-td-thumb"
/>
</div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -245,6 +251,12 @@ export default { ...@@ -245,6 +251,12 @@ export default {
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} }
.image_preview {
width: 60px;
height: 60px;
align-content: center;
justify-content: center;
}
} }
</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