a25db879 by 任超

style:code配置化的完成

1 parent c7c6dddb
{
"TITLE": "汉中市数据上报系统",
"THEME": "sb",
"CODE": "BDCSBPT",
"SERVERAPI": "/bdcsjsb",
"MANAGEMENTAPI": "http://192.168.2.38:8090/management"
}
\ No newline at end of file
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-23 16:37:20
* @LastEditTime: 2023-03-24 16:59:29
*/
import Vue from 'vue'
import router from "./router";
......@@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => {
localStorage.removeItem("token");
next();
} else {
let code = Vue.prototype.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT"
let code = Vue.prototype.BASE_API.CODE
//判断token是否存在
const hasToken = localStorage.getItem("token");
if (hasToken) {
......
......@@ -22,7 +22,6 @@
</div>
</template>
<script>
import { getMenuInfo } from "@/api/user";
import { loginIn } from "@/api/login.js";
export default {
name: "jgLogin",
......
......@@ -108,7 +108,7 @@ export default {
if (valid) {
let res = await loginIn(self.user.account, self.user.password)
if (res.status == 1) {
let code = this.BASE_API.THEME == "sb" ? "BDCSBPT" : "BDCJGPT"
let code = this.BASE_API.CODE;
localStorage.setItem("token", `Bearer ${res.content}`);
const { result: getMenuData } = (await getMenuInfo(code)) || [];
let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path
......
......@@ -29,20 +29,20 @@
</div>
</template>
<script>
// 定时任务
import data from "./data";
import { deleteAction, getAction, api } from "@/api/manageApi";
import EditDialog from "./edit-dialog.vue";
import { mapGetters } from "vuex";
import { getMenuInfo } from "@/api/user";
import {
// 定时任务
import data from "./data";
import { deleteAction, getAction, api } from "@/api/manageApi";
import EditDialog from "./edit-dialog.vue";
import { mapGetters } from "vuex";
import { getMenuInfo } from "@/api/user";
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
export default {
} from "@/utils/operation";
export default {
name: "menus",
components: {
EditDialog,
......@@ -152,7 +152,7 @@
},
// 加载表格数据
getTableList () {
getMenuInfo(sessionStorage.getItem("products")).then((res) => {
getMenuInfo(this.BASE_API.CODE).then((res) => {
if (res.code === 200) {
this.tablelistData = judgeSort(res.result)
this.listData = this.tablelistData
......@@ -245,14 +245,14 @@
this.getTableList()
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
// @import "~@/styles/public.scss";
/deep/.el-table__expand-icon {
/deep/.el-table__expand-icon {
color: #fff;
}
}
</style>
......
......@@ -19,8 +19,9 @@
</el-form>
</div>
<div class="from-clues-content">
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200" @p-current-change="handleCurrentChange"
:column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid">
<lb-table :pagination="false" @size-change="handleSizeChange" :calcHeight="200"
@p-current-change="handleCurrentChange" :column="tableData.columns" :data="listdata" :expand-row-keys="keyList"
row-key="dictid">
</lb-table>
</div>
<EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" />
......@@ -28,24 +29,24 @@
</div>
</template>
<script>
import {
import {
getUuid,
judgeSort,
realMove,
findParents,
removeTreeListItem,
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
} from "@/utils/operation";
import { getRolesById, getAuthorityListAction } from "@/api/authorityManage";
import { getUserRoles } from "@/api/personnelManage";
import data from "./data";
import { getMenuInfo } from "@/api/user";
import { api, getAction, deleteAction } from "@/api/manageApi";
import tableMixin from "@/mixins/tableMixin.js";
import EditDialog from "./edit-dialog.vue";
import Roleslistdiglog from "./roleslistdiglog.vue";
import { mapGetters } from "vuex";
import { updateOrder } from "@/api/orders"
export default {
name: "menus",
mixins: [tableMixin],
components: {
......@@ -286,7 +287,7 @@
// 获取菜单列表
getTableList () {
getMenuInfo(sessionStorage.getItem("products")).then((res) => {
getMenuInfo(this.BASE_API.CODE).then((res) => {
if (res.code === 200) {
this.menutablelistData = judgeSort(res.result)
} else {
......@@ -502,16 +503,16 @@
this.getTableData();
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
@import "~@/styles/mixin.scss";
// @import "~@/styles/public.scss";
/deep/.el-button.is-disabled.el-button--text {
/deep/.el-button.is-disabled.el-button--text {
width: 64px;
height: 28px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
}
}
</style>
......