Merge branch 'dev-3.4' of git.mesalab.cn:nezha/nezha-fronted into dev-3.4
This commit is contained in:
@@ -291,8 +291,11 @@ export function moveElementAwayFromCollision (layout, collidesWith, itemToMove,
|
|||||||
|
|
||||||
// Previously this was optimized to move below the collision directly, but this can cause problems
|
// Previously this was optimized to move below the collision directly, but this can cause problems
|
||||||
// with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
|
// with cascading moves, as an item may actually leapflog a collision and cause a reversal in order.
|
||||||
|
let addY = 0.15
|
||||||
return moveElement(layout, itemToMove, undefined, itemToMove.y + 0.15, preventCollision)
|
if (itemToMove.groupId) {
|
||||||
|
addY = 1
|
||||||
|
}
|
||||||
|
return moveElement(layout, itemToMove, undefined, itemToMove.y + addY, preventCollision)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -479,6 +479,9 @@ export default {
|
|||||||
// } catch (e) {
|
// } catch (e) {
|
||||||
// console.info(e)
|
// console.info(e)
|
||||||
// }
|
// }
|
||||||
|
if (item.y < 0) {
|
||||||
|
item.y = 0
|
||||||
|
}
|
||||||
height = (item.type === 'group' && item.param.collapse) ? this.headerH : item.height
|
height = (item.type === 'group' && item.param.collapse) ? this.headerH : item.height
|
||||||
// param.showHeader = true
|
// param.showHeader = true
|
||||||
if (param.valueMapping) {
|
if (param.valueMapping) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<el-input slot="reference" maxlength="64" show-word-limit v-model="scope.row[item.prop]" size="small" ></el-input>
|
<el-input slot="reference" maxlength="64" show-word-limit v-model="scope.row[item.prop]" size="small" ></el-input>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'role'">
|
<!-- <template v-if="item.prop == 'role'">
|
||||||
<el-popover :content="rules.roleId.message" placement="top" trigger="manual" v-model="rules.roleId.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.roleId)">
|
<el-popover :content="rules.roleId.message" placement="top" trigger="manual" v-model="rules.roleId.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.roleId)">
|
||||||
<el-select v-model="scope.row[item.prop]" size="small" :placeholder="$t('el.select.placeholder')" value-key="id" slot="reference" popper-class="api-select right-box-select-top right-public-box-dropdown-top role-system-table">
|
<el-select v-model="scope.row[item.prop]" size="small" :placeholder="$t('el.select.placeholder')" value-key="id" slot="reference" popper-class="api-select right-box-select-top right-public-box-dropdown-top role-system-table">
|
||||||
<template v-for="role in roles" >
|
<template v-for="role in roles" >
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template> -->
|
||||||
<template v-if="item.prop == 'expireAt'">
|
<template v-if="item.prop == 'expireAt'">
|
||||||
<!-- <el-popover :content="rules.expireAt.message" placement="top" trigger="manual" v-model="rules.expireAt.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.expireAt)">-->
|
<!-- <el-popover :content="rules.expireAt.message" placement="top" trigger="manual" v-model="rules.expireAt.switch" popper-class="small-pop warn-pop" @after-enter="popShow(rules.expireAt)">-->
|
||||||
<my-date-picker
|
<my-date-picker
|
||||||
@@ -68,15 +68,21 @@
|
|||||||
<template v-if="item.prop == 'createUser'">
|
<template v-if="item.prop == 'createUser'">
|
||||||
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop == 'role'">
|
<!-- <template v-else-if="item.prop == 'role'">
|
||||||
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
|
||||||
</template>
|
</template> -->
|
||||||
<template v-else-if="item.prop == 'expireAt'">
|
<template v-else-if="item.prop == 'expireAt'">
|
||||||
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}}
|
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop == 'createAt'">
|
<template v-else-if="item.prop == 'createAt'">
|
||||||
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}}
|
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}}
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop == 'token'">
|
||||||
|
<div style="cursor:text" class="document-copy-block">
|
||||||
|
<span class="document-copy-text"> {{scope.row[item.prop].replace(reg, '*')}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -133,12 +139,14 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
label: this.$t('apiKey.key'),
|
label: this.$t('apiKey.key'),
|
||||||
prop: 'token',
|
prop: 'token',
|
||||||
show: true
|
show: false
|
||||||
}, {
|
},
|
||||||
label: this.$t('profile.role'),
|
// {
|
||||||
prop: 'role',
|
// label: this.$t('profile.role'),
|
||||||
show: true
|
// prop: 'role',
|
||||||
}, {
|
// show: true
|
||||||
|
// },
|
||||||
|
{
|
||||||
label: this.$t('config.system.apiKey.expireAt'),
|
label: this.$t('config.system.apiKey.expireAt'),
|
||||||
prop: 'expireAt',
|
prop: 'expireAt',
|
||||||
show: true
|
show: true
|
||||||
@@ -164,7 +172,8 @@ export default {
|
|||||||
disabledDate (time) {
|
disabledDate (time) {
|
||||||
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
|
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
reg: new RegExp("(?<=.{8}).", 'g')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -203,7 +212,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'token'">
|
<template v-if="item.prop == 'token'">
|
||||||
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
|
<div style="cursor:text" class="document-copy-block">
|
||||||
|
<span class="document-copy-text"> {{scope.row[item.prop]?scope.row[item.prop].replace(reg, '*'):'-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="cursor: pointer;visibility: hidden" @click="onCopy(scope.row[item.prop])"></i>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.prop == 'expireAt'">
|
<template v-if="item.prop == 'expireAt'">
|
||||||
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
|
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
|
||||||
@@ -106,7 +109,7 @@ export default {
|
|||||||
label: this.$t('asset.talon.token'),
|
label: this.$t('asset.talon.token'),
|
||||||
prop: 'token',
|
prop: 'token',
|
||||||
minWidth: 180,
|
minWidth: 180,
|
||||||
show: true
|
show: false
|
||||||
}, {
|
}, {
|
||||||
label: this.$t('config.system.apiKey.expireAt'),
|
label: this.$t('config.system.apiKey.expireAt'),
|
||||||
prop: 'expireAt',
|
prop: 'expireAt',
|
||||||
@@ -123,7 +126,8 @@ export default {
|
|||||||
minWidth: 100,
|
minWidth: 100,
|
||||||
show: true
|
show: true
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
reg: new RegExp("(?<=.{8}).", 'g')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user