a25db879 by 任超

style:code配置化的完成

1 parent c7c6dddb
1 { 1 {
2 "TITLE": "汉中市数据上报系统", 2 "TITLE": "汉中市数据上报系统",
3 "THEME": "sb", 3 "THEME": "sb",
4 "CODE": "BDCSBPT",
4 "SERVERAPI": "/bdcsjsb", 5 "SERVERAPI": "/bdcsjsb",
5 "MANAGEMENTAPI": "http://192.168.2.38:8090/management" 6 "MANAGEMENTAPI": "http://192.168.2.38:8090/management"
6 } 7 }
...\ No newline at end of file ...\ No newline at end of file
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-03-23 16:37:20 4 * @LastEditTime: 2023-03-24 16:59:29
5 */ 5 */
6 import Vue from 'vue' 6 import Vue from 'vue'
7 import router from "./router"; 7 import router from "./router";
...@@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => {
25 localStorage.removeItem("token"); 25 localStorage.removeItem("token");
26 next(); 26 next();
27 } else { 27 } else {
28 let code = Vue.prototype.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT" 28 let code = Vue.prototype.BASE_API.CODE
29 //判断token是否存在 29 //判断token是否存在
30 const hasToken = localStorage.getItem("token"); 30 const hasToken = localStorage.getItem("token");
31 if (hasToken) { 31 if (hasToken) {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
22 </div> 22 </div>
23 </template> 23 </template>
24 <script> 24 <script>
25 import { getMenuInfo } from "@/api/user";
26 import { loginIn } from "@/api/login.js"; 25 import { loginIn } from "@/api/login.js";
27 export default { 26 export default {
28 name: "jgLogin", 27 name: "jgLogin",
......
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
108 if (valid) { 108 if (valid) {
109 let res = await loginIn(self.user.account, self.user.password) 109 let res = await loginIn(self.user.account, self.user.password)
110 if (res.status == 1) { 110 if (res.status == 1) {
111 let code = this.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT" 111 let code = this.BASE_API.CODE;
112 localStorage.setItem("token", `Bearer ${res.content}`); 112 localStorage.setItem("token", `Bearer ${res.content}`);
113 const { result: getMenuData } = (await getMenuInfo(code)) || []; 113 const { result: getMenuData } = (await getMenuInfo(code)) || [];
114 let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path 114 let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path
......
...@@ -29,20 +29,20 @@ ...@@ -29,20 +29,20 @@
29 </div> 29 </div>
30 </template> 30 </template>
31 <script> 31 <script>
32 // 定时任务 32 // 定时任务
33 import data from "./data"; 33 import data from "./data";
34 import { deleteAction, getAction, api } from "@/api/manageApi"; 34 import { deleteAction, getAction, api } from "@/api/manageApi";
35 import EditDialog from "./edit-dialog.vue"; 35 import EditDialog from "./edit-dialog.vue";
36 import { mapGetters } from "vuex"; 36 import { mapGetters } from "vuex";
37 import { getMenuInfo } from "@/api/user"; 37 import { getMenuInfo } from "@/api/user";
38 import { 38 import {
39 getUuid, 39 getUuid,
40 judgeSort, 40 judgeSort,
41 realMove, 41 realMove,
42 findParents, 42 findParents,
43 removeTreeListItem, 43 removeTreeListItem,
44 } from "@/utils/operation"; 44 } from "@/utils/operation";
45 export default { 45 export default {
46 name: "menus", 46 name: "menus",
47 components: { 47 components: {
48 EditDialog, 48 EditDialog,
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
152 }, 152 },
153 // 加载表格数据 153 // 加载表格数据
154 getTableList () { 154 getTableList () {
155 getMenuInfo(sessionStorage.getItem("products")).then((res) => { 155 getMenuInfo(this.BASE_API.CODE).then((res) => {
156 if (res.code === 200) { 156 if (res.code === 200) {
157 this.tablelistData = judgeSort(res.result) 157 this.tablelistData = judgeSort(res.result)
158 this.listData = this.tablelistData 158 this.listData = this.tablelistData
...@@ -245,14 +245,14 @@ ...@@ -245,14 +245,14 @@
245 this.getTableList() 245 this.getTableList()
246 }, 246 },
247 }, 247 },
248 }; 248 };
249 </script> 249 </script>
250 <style scoped lang="scss"> 250 <style scoped lang="scss">
251 @import "~@/styles/mixin.scss"; 251 @import "~@/styles/mixin.scss";
252 252
253 // @import "~@/styles/public.scss"; 253 // @import "~@/styles/public.scss";
254 254
255 /deep/.el-table__expand-icon { 255 /deep/.el-table__expand-icon {
256 color: #fff; 256 color: #fff;
257 } 257 }
258 </style> 258 </style>
......
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
19 </el-form> 19 </el-form>
20 </div> 20 </div>
21 <div class="from-clues-content"> 21 <div class="from-clues-content">
22 <lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200" @p-current-change="handleCurrentChange" 22 <lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200"
23 :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid"> 23 @p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata" :expand-row-keys="keyList"
24 row-key="dictid">
24 </lb-table> 25 </lb-table>
25 </div> 26 </div>
26 <EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" /> 27 <EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" />
...@@ -28,24 +29,24 @@ ...@@ -28,24 +29,24 @@
28 </div> 29 </div>
29 </template> 30 </template>
30 <script> 31 <script>
31 import { 32 import {
32 getUuid, 33 getUuid,
33 judgeSort, 34 judgeSort,
34 realMove, 35 realMove,
35 findParents, 36 findParents,
36 removeTreeListItem, 37 removeTreeListItem,
37 } from "@/utils/operation"; 38 } from "@/utils/operation";
38 import { getRolesById, getAuthorityListAction } from "@/api/authorityManage"; 39 import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
39 import { getUserRoles } from "@/api/personnelManage"; 40 import { getUserRoles } from "@/api/personnelManage";
40 import data from "./data"; 41 import data from "./data";
41 import { getMenuInfo } from "@/api/user"; 42 import { getMenuInfo } from "@/api/user";
42 import { api, getAction, deleteAction } from "@/api/manageApi"; 43 import { api, getAction, deleteAction } from "@/api/manageApi";
43 import tableMixin from "@/mixins/tableMixin.js"; 44 import tableMixin from "@/mixins/tableMixin.js";
44 import EditDialog from "./edit-dialog.vue"; 45 import EditDialog from "./edit-dialog.vue";
45 import Roleslistdiglog from "./roleslistdiglog.vue"; 46 import Roleslistdiglog from "./roleslistdiglog.vue";
46 import { mapGetters } from "vuex"; 47 import { mapGetters } from "vuex";
47 import { updateOrder } from "@/api/orders" 48 import { updateOrder } from "@/api/orders"
48 export default { 49 export default {
49 name: "menus", 50 name: "menus",
50 mixins: [tableMixin], 51 mixins: [tableMixin],
51 components: { 52 components: {
...@@ -286,7 +287,7 @@ ...@@ -286,7 +287,7 @@
286 287
287 // 获取菜单列表 288 // 获取菜单列表
288 getTableList () { 289 getTableList () {
289 getMenuInfo(sessionStorage.getItem("products")).then((res) => { 290 getMenuInfo(this.BASE_API.CODE).then((res) => {
290 if (res.code === 200) { 291 if (res.code === 200) {
291 this.menutablelistData = judgeSort(res.result) 292 this.menutablelistData = judgeSort(res.result)
292 } else { 293 } else {
...@@ -502,16 +503,16 @@ ...@@ -502,16 +503,16 @@
502 this.getTableData(); 503 this.getTableData();
503 }, 504 },
504 }, 505 },
505 }; 506 };
506 </script> 507 </script>
507 <style scoped lang="scss"> 508 <style scoped lang="scss">
508 @import "~@/styles/mixin.scss"; 509 @import "~@/styles/mixin.scss";
509 // @import "~@/styles/public.scss"; 510 // @import "~@/styles/public.scss";
510 511
511 /deep/.el-button.is-disabled.el-button--text { 512 /deep/.el-button.is-disabled.el-button--text {
512 width: 64px; 513 width: 64px;
513 height: 28px; 514 height: 28px;
514 background: rgba(255, 255, 255, 0.1); 515 background: rgba(255, 255, 255, 0.1);
515 border-radius: 16px; 516 border-radius: 16px;
516 } 517 }
517 </style> 518 </style>
......