2024-01-04 09:02:38 +08:00
|
|
|
import { post } from "@/request/axios";
|
|
|
|
|
|
|
|
// 按钮权限
|
2024-01-05 14:32:49 +08:00
|
|
|
export default async function useButtonJurisdiction(type) {
|
2024-01-04 09:02:38 +08:00
|
|
|
const keys = `${type}:add,${type}:del,${type}:edit,toExcel`;
|
2024-01-05 14:32:49 +08:00
|
|
|
const resData = await post("/head/hasButton", {
|
2024-01-04 09:02:38 +08:00
|
|
|
loading: false,
|
|
|
|
keys,
|
|
|
|
});
|
|
|
|
return {
|
|
|
|
add: resData[`${type}fhadminadd`],
|
|
|
|
del: resData[`${type}fhadmindel`],
|
|
|
|
edit: resData[`${type}fhadminedit`],
|
|
|
|
excel: resData.toExcel,
|
|
|
|
};
|
2024-01-05 14:32:49 +08:00
|
|
|
}
|