|
@@ -23,7 +23,13 @@
|
|
|
<!-- 图片 -->
|
|
|
<template slot="imgs" slot-scope="text, record">
|
|
|
<div class="addType-img">
|
|
|
- <img :src="record.iconUrl" alt="图片走丢啦" width="60" height="60" :id="'shoppingManagementList-img-'+record.id"/>
|
|
|
+ <img
|
|
|
+ :src="record.iconUrl"
|
|
|
+ alt="图片走丢啦"
|
|
|
+ width="40"
|
|
|
+ height="40"
|
|
|
+ @click="handleImg(record)"
|
|
|
+ :id="'shoppingManagementList-img-'+record.id"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
<!-- 状态 -->
|
|
@@ -79,6 +85,8 @@
|
|
|
:parentData="parentData"
|
|
|
@ok="handleCategoryOk"
|
|
|
@close="closeCategory"></addCategoryModal>
|
|
|
+ <!-- 查看图片 -->
|
|
|
+ <imgShowModal v-drag ref="checkedImg" :openModal="openCheckedImgModal" @close="openCheckedImgModal=false"></imgShowModal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
@@ -87,12 +95,13 @@ import { commonMixin } from '@/utils/mixin'
|
|
|
// 组件
|
|
|
import { VSelect } from '@/components'
|
|
|
import addCategoryModal from './addCategoryModal.vue'
|
|
|
+import imgShowModal from './imgShowModal.vue'
|
|
|
// 接口
|
|
|
import { shopCategoryList, getChildList, shopCategoryUpdateStatus, shopCategoryDel } from '@/api/shopCategory'
|
|
|
export default {
|
|
|
name: 'ShoppingManagementList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { VSelect, addCategoryModal },
|
|
|
+ components: { VSelect, addCategoryModal, imgShowModal },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -100,17 +109,18 @@ export default {
|
|
|
openCategoryModal: false, // 打开新增类目弹窗
|
|
|
// 表头
|
|
|
columns: [
|
|
|
- { title: '类目名称', dataIndex: 'categoryName', width: '20%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '图片', scopedSlots: { customRender: 'imgs' }, width: '15%', align: 'center' },
|
|
|
- { title: '易码通优先级', dataIndex: 'sort', width: '15%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, ellipsis: true },
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '类目名称', dataIndex: 'categoryName', width: '23%', align: 'left', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '图片', scopedSlots: { customRender: 'imgs' }, width: '10%', align: 'center' },
|
|
|
+ { title: '易码通优先级', dataIndex: 'sort', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' }, ellipsis: true },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '状态', scopedSlots: { customRender: 'enabledFlag' }, width: '15%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '23%', align: 'center' }
|
|
|
],
|
|
|
parentData: null, // 父级类目一行数据
|
|
|
loadDataList: [], // 表格数据
|
|
|
pageType: null, // 按钮类型
|
|
|
- expandedRowKeys: []// 展开的类目sn合集
|
|
|
+ expandedRowKeys: [], // 展开的类目sn合集
|
|
|
+ openCheckedImgModal: false// 查看图片弹窗
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -176,6 +186,14 @@ export default {
|
|
|
handleAddProduct (row) {
|
|
|
this.$router.push({ name: 'chooseProductList', params: { sn: row.categorySn } })
|
|
|
},
|
|
|
+ // 查看图片
|
|
|
+ handleImg (row) {
|
|
|
+ this.openCheckedImgModal = true
|
|
|
+ const _this = this
|
|
|
+ _this.$nextTick(() => {
|
|
|
+ _this.$refs.checkedImg.pageInit(row.iconUrl)
|
|
|
+ })
|
|
|
+ },
|
|
|
// 删除
|
|
|
handleDel (row) {
|
|
|
const _this = this
|