Commit aa6d19d9 authored by Xuguangxing's avatar Xuguangxing

feat: 增加导航配置列表页

parent c50c239a
// 导航配置api
import http from '../service/http.service';
import config from '../config';
import axios from 'axios';
export default {
getPageList(params) {
return http.get('editor/get/list', { params });
}
};
\ No newline at end of file
......@@ -62,6 +62,12 @@ export default {
icon: 'ios-compose',
path: 'template',
children: []
},
{
name: '导航配置',
icon: 'ios-compose',
path: 'template',
children: []
}]
}
},
......
......@@ -41,6 +41,7 @@ export default class Layout extends Vue {
}
select(name) {
console.log();
this.$router.push({
name
});
......
......@@ -7,6 +7,7 @@
<Menu-item v-if="tenant.workist" name="list">作品列表</Menu-item>
<Menu-item v-if="tenant.draftList" name="my">我的草稿</Menu-item>
<Menu-item v-if="tenant.tmplList" name="template">创意模板</Menu-item>
<Menu-item name="navigator">导航配置</Menu-item>
</Menu>
</i-col>
<i-col :span="21" class="layout-menu-right">
......
......@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
const hostMap = {
apiHost: `http://localhost:7002/`,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: 'https://quantum-blocks-test1.liangkebang.net/',
h5Host: 'https://quantum-h5-test1.liangkebang.net',
// apiHost: 'https://quantum-blocks-bfe.liangkebang.net/',
h5Host: 'https://quantum-h5-bfe.liangkebang.net',
qiniuHost: `https://appsync.lkbang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
opapiHost: `https://opapi-test1.liangkebang.net`,
opapiHost: `https://opapi-bfe.liangkebang.net`,
qiniuUpHost: `${protocol}//up-z0.qiniup.com`,
// kdspHost: 'https://kdsp-api-test1.liangkebang.net',
talosHost: 'https://talos-test1.liangkebang.net',
kdspHost: 'https://kdsp-api-test1.liangkebang.net',
// kdspHost: 'https://kdsp-api-bfe.liangkebang.net',
talosHost: 'https://talos-bfe.liangkebang.net',
kdspHost: 'https://kdsp-api-bfe.liangkebang.net',
yxmTenantId: 560761,
appIdMap: {
560761: 'wxe16bf9293671506c',
......
......@@ -3,6 +3,7 @@ import VueRouter from 'vue-router';
import Dashboard from '../view/dashboard/index.vue';
import PageList from '../view/pageList/index.vue';
import MyPage from '../view/myPage/index.vue';
import Navigator from '../view/navigator/index.vue';
import Template from '../view/template/index.vue';
import localStorage from '@/service/localStorage.service';
......@@ -29,6 +30,12 @@ export default function createRouter() {
component: PageList
// component: () => import('../view/pageList/index.vue')
},
{
name: 'navigator',
path: '/navigator',
component: Navigator
// component: () => import('../view/pageList/index.vue')
},
{
name: 'my',
path: '/my',
......
<template>
<div class="tableComStyle">
<div class="searchFormStyle">
<Form @submit.native.prevent inline ref="searchForm" :model="searchForm" class="inline">
<Form-item label="名称" prop="name">
<Input v-model="searchForm.name" class="comWidth" placeholder="请输入名称" />
</Form-item>
<Form-item label="作者" prop="author">
<Input v-model="searchForm.author" class="comWidth" placeholder="请输入作者" />
</Form-item>
<FormItem class="btnGroupStyle">
<div>
<Button class="btnStyle" @click="reset()">重置</Button>
<Button type="primary" class="btnStyle" @click="query">查询</Button>
</div>
</FormItem>
</Form>
</div>
<div class="tableGroupStyle">
<div class="toolBarStyle">
<h3>查询数据</h3>
<div>
<Button type="primary" class="btnStyle" @click="add()">新增</Button>
<slot></slot>
</div>
</div>
<Table
:columns="columns"
:data="tableData"
class="tableStyle"
/>
<Page
:total="total"
v-if="total > 0"
show-elevator
show-sizer
class="pageStyle"
:current="searchForm.pageNo"
:pageSize="searchForm.pageSize"
@on-change="changePageNo"
@on-page-size-change="changePageSize"
/>
</div>
</div>
</template>
<script>
export default {
data() {
return {
searchForm: {
pageSize: 20,
pageNo: 1,
name: '',
author: ''
},
tableData: [
{
id: 1,
name: '测试数据页面',
pages: 'aaa',
author: '徐光星',
updateTime: '2022-04-12',
}
],
columns: [
{
align: 'center',
title: "ID",
key: 'id',
width: 80
},
{
align: 'center',
title: '名称',
key: 'name'
},
{
align: 'center',
title: "所选页面",
key: 'pages'
},
{
align: 'center',
title: "作者",
key: 'author'
},
{
align: 'center',
title: '更新时间',
key: 'updateTime'
},
{
align: 'center',
title: '操作',
key: 'updateTime',
render: (h, params) => {
const row = params.row;
return h('div', [
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.showAddr(row)
}
}
}, '地址列表'),
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.preview(row)
}
}
}, '预览'),
h('Button', {
props: {
type: 'primary',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
this.edit(row)
}
}
}, '修改'),
h('Button', {
props: {
type: 'error',
size: 'small'
},
on: {
click: () => {
this.delete(row)
}
}
}, '删除'),
])
},
width: 300
}
],
total: 100
}
},
methods: {
query() {
console.log(1);
},
add() {
console.log(2);
},
changePageSize(size) {
// 变更每页条数
this.query();
},
changePageNo(page) {
// 变更页码
this.query(page);
},
showAddr(row) {
// 查看地址列表
console.log(row);
},
preview(row) {
// 预览,默认预览第一个导航页面
console.log(row);
},
edit(row) {
// 编辑
console.log(row);
},
delete(row) {
// 删除
console.log(row);
},
reset() {
// 重置表单
// this.resetForm('searchForm');
this.$refs.searchForm.resetFields();
this.searchForm.pageSize = 20;
this.searchForm.pageNo = 1;
this.searchForm.name = '';
this.searchForm.author = '';
},
}
}
</script>
<style scoped lang="less">
@padding: 25px;
.tableStyle {
margin-top: 15px;
}
.inline {
display: inline-block;
}
.comWidth {
width: 200px;
}
.tableComStyle {
height: 100%;
background: #f5f5f5;
padding: 15px;
// min-height: 1000px;
.searchFormStyle {
text-align: left;
clear: both;
background-color: #fff;
padding: @padding;
min-height: 70px;
font-size: 0;
.btnGroupStyle{
button{
margin-right: 6px;
}
}
/deep/ .ivu-form-item{
margin-bottom: 0;
}
/deep/ .ivu-form-item-label {
font-weight: bold;
display: inline-block;
}
/deep/.ivu-form-item-content {
display: inline-block;
}
}
.tableGroupStyle {
background: #fff;
padding: @padding;
margin-top: 15px;
.toolBarStyle {
display: flex;
justify-content: space-between;
align-items: center;
}
.pageStyle {
margin-top: 20px;
width: 100%;
text-align: right;
}
}
}
</style>
\ No newline at end of file
......@@ -8,7 +8,7 @@
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4",
"dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=test1 npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002",
"dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=bfe npm run apollo && egg-bin dev -r egg-ts-helper/register --port 7002",
"debug": "egg-bin debug -r egg-ts-helper/register",
"apollo": "node bin/apollo.js",
"build": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool",
......
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