调整角色ID为uint格式,增加embed打包,更改日志格式。 (#1144)

* feature: 根据 #377 pr进行修改embed, 打包静态文件夹与配置文件

* 修改角色id为uint

* 修改日志格式

Co-authored-by: SliverHorn <503551462@qq.com>
Co-authored-by: cg81344 <cg831344@126.com>
This commit is contained in:
奇淼(piexlmax
2022-06-29 22:12:53 +08:00
committed by GitHub
parent cd68d1f198
commit 0610419e38
30 changed files with 223 additions and 76 deletions

View File

@@ -27,7 +27,7 @@ export default {
return
}
const waitUse = binding.value.toString().split(',')
let flag = waitUse.some(item => item === userInfo.authorityId)
let flag = waitUse.some(item => Number(item) === userInfo.authorityId)
if (binding.modifiers.not) {
flag = !flag
}

View File

@@ -111,9 +111,6 @@ import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useWeatherInfo } from '@/view/dashboard/weather.js'
import { useBtnAuth } from '@/utils/btnAuth'
const btnAuth = useBtnAuth()
const weatherInfo = useWeatherInfo()
const toolCards = ref([

View File

@@ -3,7 +3,7 @@
<warning-bar title="注:右上角头像下拉可切换角色" />
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="small" type="primary" icon="plus" @click="addAuthority('0')">新增角色</el-button>
<el-button size="small" type="primary" icon="plus" @click="addAuthority(0)">新增角色</el-button>
</div>
<el-table
:data="tableData"
@@ -125,7 +125,7 @@ const mustUint = (rule, value, callback) => {
const AuthorityOption = ref([
{
authorityId: '0',
authorityId: 0,
authorityName: '根角色'
}
])
@@ -139,20 +139,20 @@ const apiDialogFlag = ref(false)
const copyForm = ref({})
const form = ref({
authorityId: '',
authorityId: 0,
authorityName: '',
parentId: '0'
parentId: 0
})
const rules = ref({
authorityId: [
{ required: true, message: '请输入角色ID', trigger: 'blur' },
{ validator: mustUint, trigger: 'blur' }
{ validator: mustUint, trigger: 'blur', message: '必须为正整数' }
],
authorityName: [
{ required: true, message: '请输入角色名', trigger: 'blur' }
],
parentId: [
{ required: true, message: '请选择请求方式', trigger: 'blur' }
{ required: true, message: '请选择父角色', trigger: 'blur' },
]
})
@@ -239,9 +239,9 @@ const initForm = () => {
authorityForm.value.resetFields()
}
form.value = {
authorityId: '',
authorityId: 0,
authorityName: '',
parentId: '0'
parentId: 0
}
}
// 关闭窗口
@@ -253,7 +253,8 @@ const closeDialog = () => {
// 确定弹窗
const enterDialog = () => {
if (form.value.authorityId === '0') {
form.value.authorityId = Number(form.value.authorityId)
if (form.value.authorityId === 0) {
ElMessage({
type: 'error',
message: '角色id不能为0'
@@ -292,10 +293,10 @@ const enterDialog = () => {
case 'copy': {
const data = {
authority: {
authorityId: 'string',
authorityName: 'string',
authorityId: 0,
authorityName: '',
datauthorityId: [],
parentId: 'string'
parentId: 0
},
oldAuthorityId: 0
}
@@ -323,7 +324,7 @@ const enterDialog = () => {
const setOptions = () => {
AuthorityOption.value = [
{
authorityId: '0',
authorityId: 0,
authorityName: '根角色'
}
]