|
@@ -0,0 +1,172 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <!-- <el-form
|
|
|
|
+ :model="queryParams"
|
|
|
|
+ ref="queryForm"
|
|
|
|
+ :inline="true"
|
|
|
|
+ v-show="showSearch"
|
|
|
|
+ label-width="90px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="位置">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="queryParams.location"
|
|
|
|
+ placeholder="请选择位置"
|
|
|
|
+ clearable
|
|
|
|
+ @change="queryParams.pageNum = 1;getList()"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ :label="item.dictLabel"
|
|
|
|
+ :value="item.dictValue"
|
|
|
|
+ v-for="(item, index) in bannerLocationList"
|
|
|
|
+ :key="index"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-search"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleQuery"
|
|
|
|
+ >搜索</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="getList(true)"
|
|
|
|
+ >重置</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form> -->
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleAdd"
|
|
|
|
+ v-hasPermi="['business:ticket:add']"
|
|
|
|
+ >添加分类</el-button
|
|
|
|
+ >
|
|
|
|
+ </el-col>
|
|
|
|
+ <right-toolbar
|
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
|
+ @queryTable="getList()"
|
|
|
|
+ ></right-toolbar>
|
|
|
|
+ </el-row>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <el-table ref="table" v-loading="loading" :data="list">
|
|
|
|
+ <el-table-column label="分类名称" prop="name" />
|
|
|
|
+ <el-table-column label="分类图片">
|
|
|
|
+ <div slot-scope="{ row }">
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
|
+ :src="row.picUrl"
|
|
|
|
+ :preview-src-list="[row.picUrl]"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="排序" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <div>{{ row.sort }}</div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="状态" prop="status" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <el-tag :type="row.isShow === 1 ? 'success' : 'info'">{{
|
|
|
|
+ row.isShow === 1 ? "显示" : "不显示"
|
|
|
|
+ }}</el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
|
+ <template>
|
|
|
|
+ <div>
|
|
|
|
+ <el-button v-hasPermi="['order:deliver:query']" type="text" disabled
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button v-hasPermi="['order:deliver:ship']" type="text" disabled
|
|
|
|
+ >删除</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total > 0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="pageParams.pageNum"
|
|
|
|
+ :limit.sync="pageParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <category-create v-if="createShow" :dialog-show="createShow" @close="close" />
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import { publicFileGetUrl } from "@/api/common";
|
|
|
|
+import {
|
|
|
|
+ goodsCategoryList,
|
|
|
|
+ goodsCategoryRemove,
|
|
|
|
+} from "@/api/business/category";
|
|
|
|
+import CategoryCreate from "./components/CategoryCreate";
|
|
|
|
+export default {
|
|
|
|
+ name: "ListCate",
|
|
|
|
+ components: {
|
|
|
|
+ CategoryCreate,
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ loading: false,
|
|
|
|
+ showSearch: true,
|
|
|
|
+ queryParams: {},
|
|
|
|
+ pageParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ },
|
|
|
|
+ // 总条数
|
|
|
|
+ total: 0,
|
|
|
|
+ list: [],
|
|
|
|
+ createShow: false,
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ goodsCategoryList(
|
|
|
|
+ "pageNum=" +
|
|
|
|
+ this.pageParams.pageNum +
|
|
|
|
+ "&pageSize=" +
|
|
|
|
+ this.pageParams.pageSize +
|
|
|
|
+ "&",
|
|
|
|
+ this.queryParams
|
|
|
|
+ )
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ res.rows.forEach((item) => {
|
|
|
|
+ item.picUrl = publicFileGetUrl + item.picUrl.split(",")[0];
|
|
|
|
+ });
|
|
|
|
+ this.total = res.total;
|
|
|
|
+ this.list = res.rows;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleQuery() {},
|
|
|
|
+ handleAdd() {
|
|
|
|
+ this.createShow = true;
|
|
|
|
+ },
|
|
|
|
+ // 关闭发货弹框
|
|
|
|
+ close() {
|
|
|
|
+ this.createShow = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+<style>
|
|
|
|
+</style>
|