Commit d0c68fc0 authored by “yiyousong”'s avatar “yiyousong”

pref:修改404返回首页地址,应用主题页面数据展示

parent f695bd72
......@@ -12,7 +12,7 @@
<a-tab-pane key="/appmarket/terminalapp" tab="终端应用"> </a-tab-pane>
<a-tab-pane key="/appmarket/moveapp" tab="移动端应用"> </a-tab-pane>
<a-tab-pane key="/appmarket/blackapp" tab="应用黑名单"> </a-tab-pane>
<a-tab-pane key="/appmarket/category" tab="应用分类"> </a-tab-pane>
<a-tab-pane key="/appmarket/appTheme" tab="应用主题"> </a-tab-pane>
</a-tabs>
<div class="app-out-box flex1">
<router-view></router-view>
......
......@@ -2,11 +2,12 @@
<div class="app-category">
<div class="header flex aic jcb mb20 pdr6">
<a-space>
<a-button type="primary" @click="handleAdd"> 新增分类 </a-button>
<a-button type="primary" @click="handleAdd"> 新增主题 </a-button>
<a-button type="danger" @click="handleDelAll"> 批量移除 </a-button>
</a-space>
<a-input-search
style="width: 300px"
placeholder="请输入分类名称搜索"
placeholder="请输入主题名称搜索"
enter-button="搜索"
v-model="searchVal"
allowClear
......@@ -43,6 +44,11 @@
(current - 1) * size + index + 1
}}</span>
<!-- 创建时间 -->
<template slot="createTime" slot-scope="text">
{{ text.createTime | dateFormat }}
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
......@@ -53,18 +59,18 @@
</a-table>
</div>
<!-- 新增、编辑分类 -->
<AddCategory
ref="AddCategory"
<AddTheme
ref="AddTheme"
:title="title"
:addVisile.sync="addVisile"
@addSuccess="getCategoryList"
></AddCategory>
></AddTheme>
</div>
</template>
<script>
import { getCategoryList, deleteCategory } from "@/services/market";
import AddCategory from "../modal/AddCategory";
import AddTheme from "../modal/AddTheme";
import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js";
const columns = [
......@@ -81,16 +87,22 @@ const columns = [
dataIndex: "siteName",
},
{
title: "分类名称",
title: "主题名称",
dataIndex: "categoryName",
},
{
title: "主题编码",
dataIndex: "categoryCode",
},
{
title: "排序",
dataIndex: "sort",
},
{
title: "创建时间",
dataIndex: "createTime",
scopedSlots: {
customRender: "createTime",
},
},
{
title: "操作",
......@@ -100,7 +112,7 @@ const columns = [
];
export default {
components: {
AddCategory,
AddTheme,
},
data() {
return {
......@@ -117,7 +129,7 @@ export default {
pageSizeOptions,
selectedRowKeys: [], // 表格勾选数据
AddVisible: false,
title: "新增分类",
title: "新增主题",
addVisile: false,
};
},
......@@ -149,13 +161,14 @@ export default {
// 新增
handleAdd() {
this.title = "新增分类";
this.$refs.AddCategory.onAdd();
this.title = "新增主题";
this.$refs.AddTheme.onAdd();
this.addVisile = true;
},
// 搜索
onSearch() {
this.current = 1;
this.selectedRowKeys = [];
this.getCategoryList();
},
// 翻页
......@@ -175,10 +188,19 @@ export default {
},
// 编辑
handleEdit(row) {
this.title = "编辑分类";
this.$refs.AddCategory.onEdit(row);
this.title = "编辑主题";
this.$refs.AddTheme.onEdit(row);
this.addVisile = true;
},
// 批量移除
handleDelAll() {
if (!this.selectedRowKeys.length) {
this.$message.warning("请先勾选数据");
return;
}
let ids = this.selectedRowKeys.join(",");
this.handleDel(ids);
},
// 删除
handleDel(id) {
let _this = this;
......@@ -196,6 +218,7 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
this.selectedRowKeys = [];
_this.getCategoryList();
}
},
......
......@@ -19,11 +19,11 @@
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<a-form-model-item label="分类名称" prop="categoryName">
<a-input v-model="form.categoryName" placeholder="请输入分类名称" />
<a-form-model-item label="主题名称" prop="categoryName">
<a-input v-model="form.categoryName" placeholder="请输入主题名称" />
</a-form-model-item>
<a-form-model-item label="分类编码" prop="categoryCode">
<a-input v-model="form.categoryCode" placeholder="请输入分类编码" />
<a-form-model-item label="主题编码" prop="categoryCode">
<a-input v-model="form.categoryCode" placeholder="请输入主题编码" />
</a-form-model-item>
<a-form-model-item label="排序" prop="sort">
<a-input-number v-model="form.sort" :min="1" />
......
<template>
<exception-page home-route="/demo" :style="`min-height: ${minHeight}`" type="404" />
<exception-page
home-route="/website"
:style="`min-height: ${minHeight}`"
type="404"
/>
</template>
<script>
import ExceptionPage from '@/components/exception/ExceptionPage'
import {mapState} from 'vuex'
import ExceptionPage from "@/components/exception/ExceptionPage";
import { mapState } from "vuex";
export default {
name: 'Exp404',
components: {ExceptionPage},
name: "Exp404",
components: { ExceptionPage },
computed: {
...mapState('setting', ['pageMinHeight']),
...mapState("setting", ["pageMinHeight"]),
minHeight() {
return this.pageMinHeight ? this.pageMinHeight + 'px' : '100vh'
}
}
}
return this.pageMinHeight ? this.pageMinHeight + "px" : "100vh";
},
},
};
</script>
<style scoped lang="less">
......
......@@ -265,9 +265,9 @@ const options = {
},
},
{
path: "category",
path: "appTheme",
component: () =>
import("@/pages/basicset/appmarket/components/AppCategory"),
import("@/pages/basicset/appmarket/components/AppTheme"),
meta: {
invisible: true,
},
......
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