7258f6ee by 任超

style:title

1 parent 981e0cd7
1 /*
2 * @Description: 这个是所有api的前缀配置文件
3 * @Autor: renchao
4 * @LastEditTime: 2023-03-15 17:14:19
5 */
6
7 export default {
8 TITLE: '汉中市数据上报系统',
9 SERVERAPI: '/bdcsjsb', //赵千
10 MANAGEMENTAPI: 'http://192.168.2.236/management'
11 }
...\ No newline at end of file ...\ No newline at end of file
1 {
2 "TITLE": "汉中市数据上报系统"
3 }
...\ No newline at end of file ...\ No newline at end of file
1 /* 1 /*
2 * @Description: 这个是所有api的前缀配置文件 2 * @Description: 这个是所有api的前缀配置文件
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-03-01 15:35:44 4 * @LastEditTime: 2023-03-16 13:37:11
5 */ 5 */
6 export default { 6 export default {
7 TITLE: '汉中市数据上报系统',
8 SERVERAPI: '/bdcsjsb', //赵千 7 SERVERAPI: '/bdcsjsb', //赵千
9 MANAGEMENTAPI: 'http://192.168.2.236/management' 8 MANAGEMENTAPI: 'http://192.168.2.236/management'
10 } 9 }
......
1 import Vue from 'vue'
1 import request from '@/utils/request' 2 import request from '@/utils/request'
3 console.log(Vue.prototype, Vue.prototype.$BASE_API);
2 import SERVER from './config' 4 import SERVER from './config'
3 // 获取用户信息 5 // 获取用户信息
4 export function getUserInfo () { 6 export function getUserInfo () {
......
1 <template> 1 <template>
2 <Echart 2 <Echart :options="options" id="centreLeft1Chart" :key="key" height="1.0417rem" width="80%"></Echart>
3 :options="options"
4 id="centreLeft1Chart"
5 :key="key"
6 height="1.0417rem"
7 width="80%"></Echart>
8 </template> 3 </template>
9 <script> 4 <script>
10 import Echart from "@/common/echart"; 5 import Echart from "@/common/echart";
11 export default { 6 export default {
12 components: { 7 components: {
13 Echart, 8 Echart,
9 },
10 data () {
11 return {
12 key: 0,
13 };
14 },
15 props: {
16 cdata: {
17 type: Array,
18 default: () => ([]),
14 }, 19 },
15 data () { 20 },
16 return { 21 watch: {
17 key: 0, 22 cdata: {
18 }; 23 handler (newData) {
19 },
20 props: {
21 cdata: {
22 type: Array,
23 default: () => ([]),
24 },
25 },
26 watch: {
27 cdata: {
28 handler (newData) {
29 console.log("newData", newData);
30 this.options = {
31 color: [
32 "#37a2da",
33 "#32c5e9",
34 "#9fe6b8",
35 "#ffdb5c",
36 "#ff9f7f",
37 "#fb7293",
38 "#e7bcf3",
39 "#8378ea"
40 24
41 ], 25 this.options = {
42 tooltip: { 26 color: [
43 trigger: "item", 27 "#37a2da",
44 formatter: "<br/>{b} : {c} ({d}%)", 28 "#32c5e9",
45 }, 29 "#9fe6b8",
46 series: [ 30 "#ffdb5c",
47 { 31 "#ff9f7f",
48 name: "Access From", 32 "#fb7293",
49 type: "pie", 33 "#e7bcf3",
50 radius: '60%', 34 "#8378ea"
51 avoidLabelOverlap: true, 35
52 label: { 36 ],
53 formatter: (params) => { 37 tooltip: {
54 return `${params.name}`; 38 trigger: "item",
55 }, 39 formatter: "<br/>{b} : {c} ({d}%)",
56 position: "outer", 40 },
57 alignTo: "edge", 41 series: [
58 margin: 10, 42 {
59 normal: { 43 name: "Access From",
60 show: true, 44 type: "pie",
61 textStyle: { 45 radius: '60%',
62 fontSize: 12 46 avoidLabelOverlap: true,
63 } 47 label: {
64 }, 48 formatter: (params) => {
49 return `${params.name}`;
50 },
51 position: "outer",
52 alignTo: "edge",
53 margin: 10,
54 normal: {
55 show: true,
56 textStyle: {
57 fontSize: 12
58 }
65 }, 59 },
60 },
66 61
67 62
68 data: newData, 63 data: newData,
69 } 64 }
70 ], 65 ],
71 }; 66 };
72 this.key++; 67 this.key++;
73 },
74 immediate: true,
75 deep: true,
76 }, 68 },
69 immediate: true,
70 deep: true,
77 }, 71 },
78 }; 72 },
73 };
79 </script> 74 </script>
80 75
81 <style lang="scss" scoped> 76 <style lang="scss" scoped>
82 #centreLeft1Chart { 77 #centreLeft1Chart {
83 margin-bottom: 0.0521rem; 78 margin-bottom: 0.0521rem;
84 margin-left: 0.3125rem; 79 margin-left: 0.3125rem;
85 } 80 }
86 </style> 81 </style>
......
...@@ -9,40 +9,37 @@ ...@@ -9,40 +9,37 @@
9 </template> 9 </template>
10 10
11 <script> 11 <script>
12 import { mapGetters } from 'vuex' 12 import { mapGetters } from 'vuex'
13 import Logo from './Logo' 13 import Logo from './Logo'
14 import SidebarItem from './SidebarItem' 14 import SidebarItem from './SidebarItem'
15 import variables from '@/styles/variables.scss' 15 import variables from '@/styles/variables.scss'
16 import { asyncRoutes } from '@/router' 16 import { asyncRoutes } from '@/router'
17 export default { 17 export default {
18 components: { SidebarItem, Logo }, 18 components: { SidebarItem, Logo },
19 computed: { 19 computed: {
20 ...mapGetters(['permission_routes', 'sidebar']), 20 ...mapGetters(['permission_routes', 'sidebar']),
21 21
22 activeMenu () { 22 activeMenu () {
23 23
24 const route = this.$route 24 const route = this.$route
25 const { meta, path } = route 25 const { meta, path } = route
26 if (meta.activeMenu) { 26 if (meta.activeMenu) {
27 return meta.activeMenu 27 return meta.activeMenu
28 }
29 return path
30 },
31 variables () {
32 return variables
33 },
34 asyncRoutes () {
35 return asyncRoutes.slice(0, 3)
36 } 28 }
29 return path
37 }, 30 },
38 mounted () { 31 variables () {
39 console.log("permission_routes", this.permission_routes); 32 return variables
33 },
34 asyncRoutes () {
35 return asyncRoutes.slice(0, 3)
40 } 36 }
41 } 37 }
38 }
42 </script> 39 </script>
43 <style scoped lang="scss"> 40 <style scoped lang="scss">
44 .el-menu--horizontal { 41 .el-menu--horizontal {
45 display: flex; 42 display: flex;
46 background: none !important; 43 background: none !important;
47 } 44 }
48 </style> 45 </style>
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-03-10 14:59:43 4 * @LastEditTime: 2023-03-16 11:15:48
5 --> 5 -->
6 <template> 6 <template>
7 <div class="app-wrapper jgWrapper"> 7 <div class="app-wrapper jgWrapper">
...@@ -12,61 +12,60 @@ ...@@ -12,61 +12,60 @@
12 </div> 12 </div>
13 </template> 13 </template>
14 <script> 14 <script>
15 import { AppMain, Navbar, Sidebar, TagsView } from './components' 15 import { AppMain, Navbar, Sidebar, TagsView } from './components'
16 import ResizeMixin from './mixin/ResizeHandler' 16 import ResizeMixin from './mixin/ResizeHandler'
17 import { mapState } from 'vuex' 17 import { mapState } from 'vuex'
18 export default { 18 export default {
19 name: 'Layout', 19 name: 'Layout',
20 components: { 20 components: {
21 AppMain, 21 AppMain,
22 Navbar, 22 Navbar,
23 Sidebar, 23 Sidebar,
24 TagsView 24 TagsView
25 }, 25 },
26 created () { 26 created () {
27 this.$store.dispatch("products/setData", "BDCJGPT"); 27 this.$store.dispatch("products/setData", "BDCJGPT");
28 console.log("ZOULEJG"); 28 },
29 }, 29 mixins: [ResizeMixin],
30 mixins: [ResizeMixin], 30 computed: {
31 computed: { 31 ...mapState({
32 ...mapState({ 32 sidebar: state => state.app.sidebar,
33 sidebar: state => state.app.sidebar, 33 needTagsView: state => state.settings.tagsView,
34 needTagsView: state => state.settings.tagsView, 34 fixedHeader: state => state.settings.fixedHeader
35 fixedHeader: state => state.settings.fixedHeader 35 })
36 })
37 }
38 } 36 }
37 }
39 </script> 38 </script>
40 <style lang="scss"> 39 <style lang="scss">
41 @import "~@/styles/jgSidebar.scss"; 40 @import "~@/styles/jgSidebar.scss";
42 </style> 41 </style>
43 <style lang="scss" scoped> 42 <style lang="scss" scoped>
44 @import "~@/styles/mixin.scss"; 43 @import "~@/styles/mixin.scss";
45 44
46 .app-wrapper { 45 .app-wrapper {
47 @include clearfix; 46 @include clearfix;
48 position: relative; 47 position: relative;
49 height: 100%; 48 height: 100%;
50 width: 100%; 49 width: 100%;
51 min-width: 1280px; 50 min-width: 1280px;
52 background: url("~@/image/bg.png") no-repeat; 51 background: url("~@/image/bg.png") no-repeat;
53 background-size: 100% 100%; 52 background-size: 100% 100%;
54 padding: 12px; 53 padding: 12px;
55 box-sizing: border-box; 54 box-sizing: border-box;
56 55
57 &.mobile.openSidebar { 56 &.mobile.openSidebar {
58 position: fixed; 57 position: fixed;
59 top: 0; 58 top: 0;
60 }
61 } 59 }
60 }
62 61
63 .appMain { 62 .appMain {
64 // min-width: 1280px; 63 // min-width: 1280px;
65 height: calc(100vh - 101px) !important; 64 height: calc(100vh - 101px) !important;
66 box-sizing: border-box; 65 box-sizing: border-box;
67 66
68 .app-main { 67 .app-main {
69 height: 100%; 68 height: 100%;
70 }
71 } 69 }
70 }
72 </style> 71 </style>
......
...@@ -13,66 +13,65 @@ ...@@ -13,66 +13,65 @@
13 </div> 13 </div>
14 </template> 14 </template>
15 <script> 15 <script>
16 import { AppMain, Navbar, Sidebar, TagsView } from './components' 16 import { AppMain, Navbar, Sidebar, TagsView } from './components'
17 import ResizeMixin from './mixin/ResizeHandler' 17 import ResizeMixin from './mixin/ResizeHandler'
18 import { mapState } from 'vuex' 18 import { mapState } from 'vuex'
19 export default { 19 export default {
20 name: 'Layout', 20 name: 'Layout',
21 components: { 21 components: {
22 AppMain, 22 AppMain,
23 Navbar, 23 Navbar,
24 Sidebar, 24 Sidebar,
25 TagsView 25 TagsView
26 }, 26 },
27 mixins: [ResizeMixin], 27 mixins: [ResizeMixin],
28 created () { 28 created () {
29 this.$store.dispatch("products/setData", "BDCSBPT"); 29 this.$store.dispatch("products/setData", "BDCSBPT");
30 console.log("ZOULEJG"); 30 },
31 }, 31 computed: {
32 computed: { 32 ...mapState({
33 ...mapState({ 33 sidebar: state => state.app.sidebar,
34 sidebar: state => state.app.sidebar, 34 needTagsView: state => state.settings.tagsView,
35 needTagsView: state => state.settings.tagsView, 35 fixedHeader: state => state.settings.fixedHeader
36 fixedHeader: state => state.settings.fixedHeader 36 })
37 })
38 }
39 } 37 }
38 }
40 </script> 39 </script>
41 <style lang="scss"> 40 <style lang="scss">
42 @import "~@/styles/mixin.scss"; 41 @import "~@/styles/mixin.scss";
43 @import "~@/styles/sbSidebar.scss"; 42 @import "~@/styles/sbSidebar.scss";
44 43
45 .app-wrapper { 44 .app-wrapper {
46 @include clearfix; 45 @include clearfix;
47 position: relative; 46 position: relative;
48 height: 100%; 47 height: 100%;
49 width: 100%; 48 width: 100%;
50 // background-color: $containerbg; 49 // background-color: $containerbg;
51 padding: 0; 50 padding: 0;
52 51
53 &.mobile.openSidebar { 52 &.mobile.openSidebar {
54 position: fixed; 53 position: fixed;
55 top: 0;
56 }
57 }
58
59 .drawer-bg {
60 background: #000;
61 opacity: 0.3;
62 width: 100%;
63 top: 0; 54 top: 0;
64 height: 100%;
65 position: absolute;
66 z-index: 999;
67 } 55 }
56 }
68 57
69 .fixed-header { 58 .drawer-bg {
70 width: 100%; 59 background: #000;
71 transition: width 0.28s; 60 opacity: 0.3;
72 } 61 width: 100%;
62 top: 0;
63 height: 100%;
64 position: absolute;
65 z-index: 999;
66 }
73 67
74 .el-dropdown-menu--small { 68 .fixed-header {
75 padding: 0; 69 width: 100%;
76 width: 5px; 70 transition: width 0.28s;
77 } 71 }
72
73 .el-dropdown-menu--small {
74 padding: 0;
75 width: 5px;
76 }
78 </style> 77 </style>
......
...@@ -6,7 +6,7 @@ import '@/styles/element-variables.scss' ...@@ -6,7 +6,7 @@ import '@/styles/element-variables.scss'
6 import '@/styles/index.scss' 6 import '@/styles/index.scss'
7 import Base from './base' // 全局组件引入 7 import Base from './base' // 全局组件引入
8 import mixin from '@/utils/mixin/theme.js' 8 import mixin from '@/utils/mixin/theme.js'
9 9 import axios from 'axios'
10 import dataV from '@jiaminghi/data-view'; 10 import dataV from '@jiaminghi/data-view';
11 import echarts from "echarts" 11 import echarts from "echarts"
12 import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading' 12 import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading'
...@@ -41,15 +41,21 @@ import './image/icons' // icon ...@@ -41,15 +41,21 @@ import './image/icons' // icon
41 import store from './store' 41 import store from './store'
42 import router from './router' 42 import router from './router'
43 import _ from 'lodash' 43 import _ from 'lodash'
44 import './permission' // permission control
45 Vue.use(Element, { size: 'small', zIndex: 1000 }) 44 Vue.use(Element, { size: 'small', zIndex: 1000 })
46 Vue.use(Base) 45 Vue.use(Base)
47 Vue.component('icon', Icon); 46 Vue.component('icon', Icon);
48 Vue.prototype.$echarts = echarts 47 Vue.prototype.$echarts = echarts
49 Vue.use(dataV) 48 Vue.use(dataV)
50 new Vue({ 49 axios.get("./config.json")
51 el: '#app', 50 .then((res) => {
52 router, 51 Vue.prototype.BASE_API = res.data
53 store, 52 require('./permission')
54 render: h => h(App) 53 new Vue({
55 }) 54 el: '#app',
55 router,
56 store,
57 render: h => h(App)
58 })
59
60 })
61
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-03-15 17:14:42 4 * @LastEditTime: 2023-03-16 13:31:27
5 */ 5 */
6 // 获取浏览器便签标题 6 // 获取浏览器便签标题
7 import config from '/public/config' 7 import Vue from 'vue'
8 const title = config.TITLE 8 const title = Vue.prototype.BASE_API.TITLE
9 9
10 export default function getPageTitle (pageTitle) { 10 export default function getPageTitle (pageTitle) {
11 if (pageTitle) { 11 if (pageTitle) {
......