a9eaa675 by 任超
2 parents 9ab5dd1c 6c08504a
......@@ -2,12 +2,11 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-03-09 15:24:53
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-10 17:24:21
* @LastEditTime: 2023-03-13 09:03:16
* @FilePath: \上报\bdcjg-web\src\store\modules\permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import {constantRoutes} from '@/router'
console.log("HAHAHHAHAHAH");
import { constantRoutes } from '@/router'
import asyncRouter from '@/utils/asyncRouter.js'
const state = {
routes: [],
......
......@@ -226,7 +226,7 @@
width: 100%;
height: 100%;
flex-direction: column;
font-size: 0.0833rem;
font-size: 0.09977rem;
.bad {
color: #c97168;
......@@ -244,7 +244,7 @@
}
span:nth-child(2) {
font-size: 0.1042rem;
font-size: 0.1142rem;
font-weight: 900;
}
}
......
......@@ -28,6 +28,14 @@
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";
// import authorizationdiglog from "./authorizationdiglog.vue";
export default {
name: "menus",
......@@ -111,13 +119,20 @@
methods: {
// 加载表格数据
getTableList () {
getMenuInfo(sessionStorage.getItem("products")).then((res) => {
if (res.code === 200) {
this.tablelistData = judgeSort(res.result)
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
const queryOptionsid = {
conditionGroup: {
queryRelation: "AND",
conditions: [
{
property: "code",
value: sessionStorage.getItem("products"),
value: this.products,
operator: "EQ",
},
],
......@@ -130,45 +145,106 @@
getAction(this.meumurlid, params)
.then((res) => {
this.productId = res.content[0].id;
let queryOptions = {
conditionGroup: {
conditions: [
{
property: "productId",
value: this.productId,
operator: "EQ",
},
],
queryRelation: "AND",
},
orderBys: [{ property: "sort", direction: "desc" }],
};
if (!this.tableUrl) {
console.log("请设置tableUrl属性为接口地址!");
return;
}
if (this.queryOptions !== "") {
this.queryParam.queryOptions = JSON.stringify(queryOptions);
}
this.getAuthorityList(res.content[0].id, res.content[0].code)
this.selectedSubsystemCode = res.content[0].code
// let queryOptions = {
// conditionGroup: {
// conditions: [
// {
// property: "productId",
// value: this.productId,
// operator: "EQ",
// },
// ],
// queryRelation: "AND",
// },
// orderBys: [{ property: "sort", direction: "desc" }],
// };
// if (!this.tableUrl) {
// console.log("请设置tableUrl属性为接口地址!");
// return;
// }
// if (this.queryOptions !== "") {
// this.queryParam.queryOptions = JSON.stringify(queryOptions);
// }
// 查询系统菜单
getAction(this.tableUrl, this.queryParam)
.then((res) => {
if (res.status === 1) {
this.loading = false;
this.tablelistData = res.content;
} else {
this.$message.error({ message: res.message, showClose: true });
this.loading = false;
}
})
.catch((error) => {
console.log("er", error);
this.loading = false;
});
// getAction(this.tableUrl, this.queryParam)
// .then((res) => {
// if (res.status === 1) {
// this.loading = false;
// // this.menutablelistData = res.content;
// console.log("res.content菜单", res.content);
// } else {
// this.$message.error({ message: res.message, showClose: true });
// this.loading = false;
// }
// })
// .catch((error) => {
// console.log("er", error);
// this.loading = false;
// });
})
.catch((error) => {
console.log("er", error);
});
// const queryOptionsid = {
// conditionGroup: {
// queryRelation: "AND",
// conditions: [
// {
// property: "code",
// value: sessionStorage.getItem("products"),
// operator: "EQ",
// },
// ],
// },
// };
// const params = {
// queryOptions: queryOptionsid,
// };
// // 获取系统id
// getAction(this.meumurlid, params)
// .then((res) => {
// this.productId = res.content[0].id;
// let queryOptions = {
// conditionGroup: {
// conditions: [
// {
// property: "productId",
// value: this.productId,
// operator: "EQ",
// },
// ],
// queryRelation: "AND",
// },
// orderBys: [{ property: "sort", direction: "desc" }],
// };
// if (!this.tableUrl) {
// console.log("请设置tableUrl属性为接口地址!");
// return;
// }
// if (this.queryOptions !== "") {
// this.queryParam.queryOptions = JSON.stringify(queryOptions);
// }
// // 查询系统菜单
// getAction(this.tableUrl, this.queryParam)
// .then((res) => {
// if (res.status === 1) {
// this.loading = false;
// this.tablelistData = res.content;
// } else {
// this.$message.error({ message: res.message, showClose: true });
// this.loading = false;
// }
// })
// .catch((error) => {
// console.log("er", error);
// this.loading = false;
// });
// })
// .catch((error) => {
// console.log("er", error);
// });
},
// 新增菜单
handleAdd () {
......
......@@ -236,9 +236,7 @@
Publicrole = res.content;
this.listdata = Builtinrole.concat(Publicrole);
console.log("this.listdata1", Builtinrole.concat(Publicrole));
this.listdata = judgeSort(this.listdata);
console.log("this.listdata2", this.listdata);
})
.catch((e) => console.error(e));
})
......@@ -247,10 +245,8 @@
// 获取菜单列表
getTableList () {
console.log("角色走了");
getMenuInfo(sessionStorage.getItem("products")).then((res) => {
if (res.code === 200) {
console.log("列表", this.products, judgeSort(res.result));
this.menutablelistData = judgeSort(res.result)
} else {
this.$message.error({ message: res.message, showClose: true })
......