vue2-client 1.4.49 → 1.4.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.4.51 -2022-11-13 @江超**
5
+ - 自定义路由名称
6
+
7
+ **1.4.50 -2022-11-11 @江超**
8
+ - footer自定义
9
+
4
10
  **1.4.49 -2022-11-10 @江超**
5
11
  - 增加一种“经典”主题配色
6
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.4.49",
3
+ "version": "1.4.51",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,41 +1,44 @@
1
- // 此配置为系统默认设置
2
- module.exports = {
3
- lang: 'CN', // 语言,可选 CN(简体)、HK(繁体)、US(英语),也可扩展其它语言
4
- theme: { // 主题
5
- color: '#1890ff', // 主题色
6
- mode: 'dark', // 主题模式 可选 dark、 light 和 night
7
- success: '#52c41a', // 成功色
8
- warning: '#faad14', // 警告色
9
- error: '#f5222f' // 错误色
10
- },
11
- layout: 'side', // 导航布局,可选 side 和 head,分别为侧边导航和顶部导航
12
- fixedHeader: true, // 固定头部状态栏,true:固定,false:不固定
13
- fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
14
- fixedTabs: true, // 固定页签头,true:固定,false:不固定
15
- pageWidth: 'fixed', // 内容区域宽度,fixed:固定宽度,fluid:流式宽度
16
- weekMode: false, // 色弱模式,true:开启,false:不开启
17
- multiPage: true, // 多页签模式,true:开启,false:不开启
18
- cachePage: true, // 是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
19
- hideSetting: false, // 隐藏设置抽屉,true:隐藏,false:不隐藏
20
- homePage: '/dashboard/workplace', // 首页路由, 登陆后默认打开
21
- ticketPage: '/submitTicket', // 提交工单路由
22
- systemName: 'V4基础组件平台', // 系统名称
23
- logoSrc: '/defaultLogo.png', // LOGO路径
24
- systemNameFontSize: '20px', // 系统名称字体大小
25
- systemDesc: '为PC端中、后台系统业务开发提供支持', // 系统描述
26
- copyright: '2022 AoFengSoft', // copyright
27
- asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
28
- showPageTitle: true, // 是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
29
- filterMenu: true, // 根据权限过滤菜单,true:过滤,false:不过滤
30
- animate: { // 动画设置
31
- disabled: true, // 禁用动画,true:禁用,false:启用
32
- name: 'lightSpeed', // 动画效果,支持的动画效果可参考 ./animate.config.js
33
- direction: 'left' // 动画方向,切换页面时动画的方向,参考 ./animate.config.js
34
- },
35
- footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
36
- ],
37
- // 旧系统路径
38
- iframeSrc: '../singlepage/page.html',
39
- // 兼容旧版本 V3(最新V3产品) OA(公司OA)
40
- compatible: 'V3'
41
- }
1
+ // 此配置为系统默认设置
2
+ module.exports = {
3
+ lang: 'CN', // 语言,可选 CN(简体)、HK(繁体)、US(英语),也可扩展其它语言
4
+ theme: { // 主题
5
+ color: '#1890ff', // 主题色
6
+ mode: 'dark', // 主题模式 可选 dark、 light 和 night
7
+ success: '#52c41a', // 成功色
8
+ warning: '#faad14', // 警告色
9
+ error: '#f5222f' // 错误色
10
+ },
11
+ layout: 'side', // 导航布局,可选 side 和 head,分别为侧边导航和顶部导航
12
+ fixedHeader: true, // 固定头部状态栏,true:固定,false:不固定
13
+ fixedSideBar: true, // 固定侧边栏,true:固定,false:不固定
14
+ fixedTabs: true, // 固定页签头,true:固定,false:不固定
15
+ pageWidth: 'fixed', // 内容区域宽度,fixed:固定宽度,fluid:流式宽度
16
+ weekMode: false, // 色弱模式,true:开启,false:不开启
17
+ multiPage: true, // 多页签模式,true:开启,false:不开启
18
+ cachePage: true, // 是否缓存页面数据,仅多页签模式下生效,true 缓存, false 不缓存
19
+ hideSetting: false, // 隐藏设置抽屉,true:隐藏,false:不隐藏
20
+ homePage: '/dashboard/workplace', // 首页路由, 登陆后默认打开
21
+ ticketPage: '/submitTicket', // 提交工单路由
22
+ systemName: 'V4基础组件平台', // 系统名称
23
+ logoSrc: '/defaultLogo.png', // LOGO路径
24
+ systemNameFontSize: '20px', // 系统名称字体大小
25
+ systemDesc: '为PC端中、后台系统业务开发提供支持', // 系统描述
26
+ copyright: '2022 AoFengSoft', // copyright
27
+ copyrightStyle: undefined,
28
+ asyncRoutes: true, // 异步加载路由,true:开启,false:不开启
29
+ showPageTitle: true, // 是否显示页面标题(PageLayout 布局中的页面标题),true:显示,false:不显示
30
+ filterMenu: true, // 根据权限过滤菜单,true:过滤,false:不过滤
31
+ animate: { // 动画设置
32
+ disabled: true, // 禁用动画,true:禁用,false:启用
33
+ name: 'lightSpeed', // 动画效果,支持的动画效果可参考 ./animate.config.js
34
+ direction: 'left' // 动画方向,切换页面时动画的方向,参考 ./animate.config.js
35
+ },
36
+ footerLinks: [ // 页面底部链接,{link: '链接地址', name: '名称/显示文字', icon: '图标,支持 ant design vue 图标库'}
37
+ ],
38
+ // 旧系统路径
39
+ iframeSrc: '../singlepage/page.html',
40
+ // 兼容旧版本 V3(最新V3产品) OA(公司OA)
41
+ compatible: 'V3',
42
+ // 路由资源名称
43
+ routeName: '智慧燃气'
44
+ }
@@ -1,42 +1,42 @@
1
- <template>
2
- <div class="common-layout">
3
- <div class="content"><slot></slot></div>
4
- <page-footer :link-list="footerLinks" :copyright="copyright"></page-footer>
5
- </div>
6
- </template>
7
-
8
- <script>
9
- import PageFooter from '@vue2-client/layouts/footer/PageFooter'
10
- import { mapState } from 'vuex'
11
-
12
- export default {
13
- name: 'CommonLayout',
14
- components: { PageFooter },
15
- computed: {
16
- ...mapState('setting', ['footerLinks', 'copyright'])
17
- }
18
- }
19
- </script>
20
-
21
- <style scoped lang="less">
22
- .common-layout{
23
- display: flex;
24
- flex-direction: column;
25
- height: 100vh;
26
- overflow: auto;
27
- background-color: @layout-body-background;
28
- background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
29
- background-repeat: no-repeat;
30
- background-position-x: center;
31
- background-position-y: 110px;
32
- background-size: 100%;
33
- .content{
34
- padding: 32px 0;
35
- flex: 1;
36
- @media (min-width: 768px){
37
-
38
- padding: 112px 0 24px;
39
- }
40
- }
41
- }
42
- </style>
1
+ <template>
2
+ <div class="common-layout">
3
+ <div class="content"><slot></slot></div>
4
+ <page-footer :link-list="footerLinks" :copyright="copyright" :copyrightStyle="copyrightStyle"></page-footer>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import PageFooter from '@vue2-client/layouts/footer/PageFooter'
10
+ import { mapState } from 'vuex'
11
+
12
+ export default {
13
+ name: 'CommonLayout',
14
+ components: { PageFooter },
15
+ computed: {
16
+ ...mapState('setting', ['footerLinks', 'copyright', 'copyrightStyle'])
17
+ }
18
+ }
19
+ </script>
20
+
21
+ <style scoped lang="less">
22
+ .common-layout{
23
+ display: flex;
24
+ flex-direction: column;
25
+ height: 100vh;
26
+ overflow: auto;
27
+ background-color: @layout-body-background;
28
+ background-image: url('https://gw.alipayobjects.com/zos/rmsportal/TVYTbAXWheQpRcWDaDMu.svg');
29
+ background-repeat: no-repeat;
30
+ background-position-x: center;
31
+ background-position-y: 110px;
32
+ background-size: 100%;
33
+ .content{
34
+ padding: 32px 0;
35
+ flex: 1;
36
+ @media (min-width: 768px){
37
+
38
+ padding: 112px 0 24px;
39
+ }
40
+ }
41
+ }
42
+ </style>
@@ -1,46 +1,49 @@
1
- <template>
2
- <div class="footer">
3
- <div class="links">
4
- <a target="_blank" :key="index" :href="item.link ? item.link : 'javascript: void(0)'" v-for="(item, index) in linkList">
5
- <a-icon v-if="item.icon" :type="item.icon"/>{{ item.name }}
6
- </a>
7
- </div>
8
- <div class="copyright">
9
- Copyright<a-icon type="copyright" />{{ copyright }}
10
- </div>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- export default {
16
- name: 'PageFooter',
17
- // eslint-disable-next-line vue/require-prop-types
18
- props: ['copyright', 'linkList']
19
- }
20
- </script>
21
-
22
- <style lang="less" scoped>
23
- .footer{
24
- padding: 48px 16px 24px;
25
- /*margin: 48px 0 24px;*/
26
- text-align: center;
27
- .copyright{
28
- color: @text-color-second;
29
- font-size: 14px;
30
- i {
31
- margin: 0 4px;
32
- }
33
- }
34
- .links{
35
- margin-bottom: 8px;
36
- a:not(:last-child) {
37
- margin-right: 40px;
38
- }
39
- a{
40
- color: @text-color-second;
41
- -webkit-transition: all .3s;
42
- transition: all .3s;
43
- }
44
- }
45
- }
46
- </style>
1
+ <template>
2
+ <div class="footer">
3
+ <div class="links">
4
+ <a target="_blank" :key="index" :href="item.link ? item.link : 'javascript: void(0)'" v-for="(item, index) in linkList">
5
+ <a-icon v-if="item.icon" :type="item.icon"/>{{ item.name }}
6
+ </a>
7
+ </div>
8
+ <div class="copyright" v-if="!copyrightStyle">
9
+ Copyright<a-icon type="copyright" />{{ copyright }}
10
+ </div>
11
+ <div class="copyright2" :style="copyrightStyle" v-else>
12
+ {{ copyright }}
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ name: 'PageFooter',
20
+ // eslint-disable-next-line vue/require-prop-types
21
+ props: ['copyright', 'linkList', 'copyrightStyle']
22
+ }
23
+ </script>
24
+
25
+ <style lang="less" scoped>
26
+ .footer{
27
+ padding: 48px 16px 24px;
28
+ /*margin: 48px 0 24px;*/
29
+ text-align: center;
30
+ .copyright{
31
+ color: @text-color-second;
32
+ font-size: 14px;
33
+ i {
34
+ margin: 0 4px;
35
+ }
36
+ }
37
+ .links{
38
+ margin-bottom: 8px;
39
+ a:not(:last-child) {
40
+ margin-right: 40px;
41
+ }
42
+ a{
43
+ color: @text-color-second;
44
+ -webkit-transition: all .3s;
45
+ transition: all .3s;
46
+ }
47
+ }
48
+ }
49
+ </style>
@@ -75,7 +75,7 @@ export default {
75
75
  }
76
76
  },
77
77
  computed: {
78
- ...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible'])
78
+ ...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible', 'routeName'])
79
79
  },
80
80
  methods: {
81
81
  ...mapMutations('account', ['setUser', 'setPermissions', 'setRoles']),
@@ -138,7 +138,7 @@ export default {
138
138
  encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
139
139
  const data = encrypt.encrypt(JSON.stringify({ username: name, password: password }))
140
140
  // 获取路由配置
141
- getRoutesConfig(data).then(result => {
141
+ getRoutesConfig(data, this.routeName).then(result => {
142
142
  this.$login.login(result).then(() => {
143
143
  // V3任何情况首位加入资源管理
144
144
  const resourceManageMain = {
@@ -6,7 +6,7 @@ module.exports = {
6
6
  LOGIN: `/rs/logic/getLogin`,
7
7
  V4_LOGIN: '/auth/login',
8
8
  V4_LOGOUT: '/auth/logout',
9
- ROUTES: `/rs/user/userLogin/智慧燃气`,
9
+ ROUTES: `/rs/user/userLogin`,
10
10
  SEARCH: `/rs/search`,
11
11
  GOODS: `/goods`,
12
12
  GOODS_COLUMNS: `/columns`
@@ -25,8 +25,8 @@ export async function V4GetInfo () {
25
25
  return request(V4_GET_INFO, METHOD.POST, {})
26
26
  }
27
27
 
28
- export async function getRoutesConfig (value) {
29
- return request(ROUTES, METHOD.POST, value)
28
+ export async function getRoutesConfig (value, routeName = '智慧燃气') {
29
+ return request(ROUTES + '/' + routeName, METHOD.POST, value)
30
30
  }
31
31
 
32
32
  /**