update js

This commit is contained in:
zhangtao 2022-10-09 17:01:00 +08:00
parent bfc7805172
commit 7a232287b9
5 changed files with 98 additions and 8 deletions

View File

@ -2,7 +2,7 @@
VITE_PUBLIC_PATH = '/'
# 是否启用MOCK
VITE_APP_USE_MOCK = false
VITE_APP_USE_MOCK = true
# proxy
VITE_PROXY = [["/api-local","http://127.0.0.1:8002/api"],["/api-mock","http://127.0.0.1:8003"]]

View File

@ -2,7 +2,7 @@ const asyncRoutes = [
{
path: '/system',
component: 'Layout',
redirect: '/system/menu',
redirect: '/system-manage/menu',
pid: 0,
title: 'System',
meta: {
@ -11,7 +11,7 @@ const asyncRoutes = [
children: [
{
path: 'menu',
component: 'views/system/menu/index',
component: 'views/system-manage/menu-manage/index',
title: 'SystemMenu',
meta: {
title: '菜单管理'
@ -19,7 +19,7 @@ const asyncRoutes = [
},
{
path: 'user',
component: 'views/system/user/index',
component: 'views/system-manage/user-manage/index',
title: 'SystemUser',
meta: {
title: '用户管理'
@ -27,16 +27,16 @@ const asyncRoutes = [
},
{
path: 'role',
component: 'views/system/role/index',
name: 'SystemRole',
component: 'views/system-manage/role-manage/index',
title: 'SystemRole',
meta: {
title: '角色管理'
}
},
{
path: 'dept',
component: 'views/system/dept/index',
name: 'SystemDept',
component: 'views/system-manage/department-manage/index',
title: 'SystemDept',
meta: {
title: '部门管理'
}

59
src/api/common/upload.js Normal file
View File

@ -0,0 +1,59 @@
import { defAxios as request } from '@/utils/http'
/**
* @description: 获取音视频上传地址和凭证
* @param {Object} params
* @return {Object}
*/
export function getAuth(params) {
return request({
url: '/aliyuncsVod/createUploadVideo',
method: 'get',
params
})
}
/**
* @description: 刷新音/视频上传凭证
* @param {String} videoId
* @return {*}
*/
export function refreshAuth(videoId) {
return request({
url: '/aliyuncsVod/refreshUploadVideo',
method: 'get',
params: {
videoId
}
})
}
/**
* @description: 获取图片上传鉴权
* @param {String} objectName
* @return {*}
*/
export function getOssAuth(objectName) {
return request({
url: '/aliyunOss/getSecurityToken',
method: 'get',
responseAll: true,
params: {
objectName
}
})
}
/**
* @description: 上传离线视频地址
* @param {String} params
* @return {*}
*/
export function uploadVideoUrl(data) {
return request({
url: '/inspection/uploadVideoUrl',
method: 'post',
data
})
}

View File

@ -114,6 +114,7 @@ export const usePermissionStore = defineStore('permission', {
const res = await getMenu()
if (res.code === 0) {
const result = dataArrayToRoutes(res.data)
console.log(result)
this.accessRoutes = result
return Promise.resolve(result)
} else {

30
src/utils/dictionary.js Normal file
View File

@ -0,0 +1,30 @@
export const QUESTION_STATUS = [
{ label: '已确认', value: 1 },
{ label: '已忽略', value: 2 },
{ label: '待确认', value: 3 }
]
export const USER_STATUS = [
{ label: '正常', value: 1 },
{ label: '禁用', value: 2 }
]
export const MENU_TYPE = [
{ label: '菜单', value: 0 },
{ label: '按钮', value: 1 }
]
export const MENU_OPEN = [
{ label: '内部', value: '1' },
{ label: '外部', value: '2' }
]
export const MENU_VISIBLE = [
{ label: '可见', value: 0 },
{ label: '不可见', value: 1 }
]
export const MENU_STATUS = [
{ label: '在用', value: 1 },
{ label: '停用', value: 2 }
]