f587b9a9 by yangwei

根据子系统code获取子系统详细信息

1 parent 7bdc3051
...@@ -5,13 +5,13 @@ const getters = { ...@@ -5,13 +5,13 @@ const getters = {
5 visitedViews: state => state.tagsView.visitedViews, 5 visitedViews: state => state.tagsView.visitedViews,
6 cachedViews: state => state.tagsView.cachedViews, 6 cachedViews: state => state.tagsView.cachedViews,
7 avatar: state => state.user.avatar, 7 avatar: state => state.user.avatar,
8 name: state => state.user.name, 8 userInfo: state => state.user.userInfo,
9 permission_routes: state => state.permission.routes, 9 permission_routes: state => state.permission.routes,
10 addRoutes: state => state.permission.addRoutes, 10 addRoutes: state => state.permission.addRoutes,
11 // business
12 rules: state => state.business.rules, 11 rules: state => state.business.rules,
13 dicData: state => state.dict.dicData, 12 dicData: state => state.dict.dicData,
14 Edit: state => state.business.Edit, 13 Edit: state => state.business.Edit,
15 businessInfo: state => state.dictionaries.businessInfo 14 businessInfo: state => state.dictionaries.businessInfo,
15 products: state => state.products.products
16 } 16 }
17 export default getters 17 export default getters
......
1
2 const state = {
3 products: null,
4 };
5 const mutations = {
6 SET_PRODUCTS: (state,data) => {
7 state.products = data;
8 },
9 };
10
11 const actions = {
12 setData({ commit },data) {
13 commit("SET_PRODUCTS",data);
14 },
15 };
16 export default {
17 namespaced: true,
18 state,
19 mutations,
20 actions,
21 };
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
39 39
40 <script> 40 <script>
41 import { loginIn } from "@/api/login.js"; 41 import { loginIn } from "@/api/login.js";
42 import { api, getAction } from "@/api/manageApi";
42 export default { 43 export default {
43 name: "Login", 44 name: "Login",
44 data: function () { 45 data() {
45 return { 46 return {
46 user: { 47 user: {
47 account: "", 48 account: "",
...@@ -54,7 +55,31 @@ export default { ...@@ -54,7 +55,31 @@ export default {
54 }, 55 },
55 }; 56 };
56 }, 57 },
57 mounted: function () { 58 created() {
59 const params = {};
60 const queryOptions = {
61 conditionGroup: {
62 conditions: [
63 {
64 property: "code",
65 value: "BDCJGPT",
66 operator: "EQ",
67 },
68 ],
69 queryRelation: "AND",
70 },
71 };
72 params.queryOptions = JSON.stringify(queryOptions);
73 //根据子系统code获取子系统详细信息
74 getAction(api.subsystem, params).then((res) => {
75 if (res.status === 1) {
76 this.$store.dispatch("products/setData", res.content[0]);
77 } else {
78 this.$message.error({ message: res.message, showClose: true });
79 }
80 });
81 },
82 mounted() {
58 // this.checkUserName(); 83 // this.checkUserName();
59 }, 84 },
60 methods: { 85 methods: {
...@@ -95,6 +120,11 @@ export default { ...@@ -95,6 +120,11 @@ export default {
95 }); 120 });
96 }, 121 },
97 }, 122 },
123 computed: {
124 productName() {
125 return this.$store.state.products.products.name;
126 },
127 },
98 components: {}, 128 components: {},
99 }; 129 };
100 </script> 130 </script>
...@@ -120,7 +150,7 @@ export default { ...@@ -120,7 +150,7 @@ export default {
120 150
121 .login .user_style { 151 .login .user_style {
122 margin: 40px 20px 0; 152 margin: 40px 20px 0;
123 h3{ 153 h3 {
124 color: #fff; 154 color: #fff;
125 font-weight: normal; 155 font-weight: normal;
126 text-align: center; 156 text-align: center;
...@@ -174,5 +204,4 @@ export default { ...@@ -174,5 +204,4 @@ export default {
174 color: #fff; 204 color: #fff;
175 } 205 }
176 </style> 206 </style>
177 <style> 207 <style></style>
178 </style>
......