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

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

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