integrated_traffic_vue/src/assets/js/useButtonJurisdiction.js

17 lines
431 B
JavaScript

import { post } from "@/request/axios";
// 按钮权限
export default async function useButtonJurisdiction(type) {
const keys = `${type}:add,${type}:del,${type}:edit,toExcel`;
const resData = await post("/head/hasButton", {
loading: false,
keys,
});
return {
add: resData[`${type}fhadminadd`],
del: resData[`${type}fhadmindel`],
edit: resData[`${type}fhadminedit`],
excel: resData.toExcel,
};
}