mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-27 19:15:13 +00:00
perf: Style adjustment
This commit is contained in:
parent
292aad0d59
commit
d5d9f8024c
@ -1,22 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
:title="$t('确认运行资产')"
|
:title="$t('ConfirmRunningAssets')"
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-buttons="true"
|
:show-buttons="true"
|
||||||
:show-confirm="true"
|
:show-confirm="true"
|
||||||
:show-cancel="true"
|
:show-cancel="true"
|
||||||
width="1000px"
|
width="1200px"
|
||||||
@confirm="onConfirm"
|
@confirm="onConfirm"
|
||||||
@cancel="onCancel"
|
@cancel="onCancel"
|
||||||
>
|
>
|
||||||
<div class="confirm-run-assets-dialog">
|
<div class="confirm-run-assets-dialog">
|
||||||
<div class="assets-list">
|
<div class="runnable-assets">
|
||||||
<div class="asset-group">
|
<div class="asset-group">
|
||||||
<div class="group-title">可运行资产:</div>
|
<div class="group-title">
|
||||||
|
{{ $t('RunnableAssets') }}
|
||||||
|
</div>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="checkAll"
|
v-model="checkAll"
|
||||||
:indeterminate="isIndeterminate"
|
:indeterminate="isIndeterminate"
|
||||||
style="margin-left: 10px"
|
style="padding-bottom: 5px"
|
||||||
@change="handleCheckAllChange"
|
@change="handleCheckAllChange"
|
||||||
>
|
>
|
||||||
{{ $t('All') }}
|
{{ $t('All') }}
|
||||||
@ -29,34 +31,24 @@
|
|||||||
class="asset-item"
|
class="asset-item"
|
||||||
>
|
>
|
||||||
<div class="asset-item">
|
<div class="asset-item">
|
||||||
<span>{{ asset.name }}</span>
|
<span>{{ asset.name }}({{ asset.ip }})</span>
|
||||||
<span class="asset-ip">{{ asset.ip }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="asset-group">
|
<div class="error-assets">
|
||||||
<div class="group-title">不可运行资产:</div>
|
<div class="group-title">{{ $t('NonRunnableAssets') }}</div>
|
||||||
<el-checkbox-group class="group-assets">
|
<div class="group-assets">
|
||||||
<el-checkbox
|
<div v-for="asset in failedAssets" :key="asset.id" class="asset-item">
|
||||||
v-for="asset in failedAssets"
|
<span><i class="fa fa-times-circle icon" />{{ asset.name }}</span>
|
||||||
:key="asset.id"
|
<span class="asset-status">{{ asset.error }}</span>
|
||||||
:label="asset.name"
|
</div>
|
||||||
class="asset-item"
|
</div>
|
||||||
disabled
|
|
||||||
>
|
|
||||||
<div class="asset-item">
|
|
||||||
<span>{{ asset.name }}</span>
|
|
||||||
<span class="asset-status">{{ asset.error }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="selected-count">已选 {{ selectedAssets.length }} 个资产</div>
|
<div class="selected-count">{{ $t('AssetsSelected', {count: selectedAssets.length}) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -82,7 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
checkAll: false,
|
checkAll: true,
|
||||||
selectedAssets: [],
|
selectedAssets: [],
|
||||||
isIndeterminate: true
|
isIndeterminate: true
|
||||||
}
|
}
|
||||||
@ -95,6 +87,13 @@ export default {
|
|||||||
return this.assets.error
|
return this.assets.error
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
visible(val) {
|
||||||
|
if (val === true) {
|
||||||
|
this.selectedAssets = this.runnableAssets.map((item) => item.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
@ -118,51 +117,65 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.confirm-run-assets-dialog {
|
.confirm-run-assets-dialog {
|
||||||
|
.runnable-assets {
|
||||||
.assets-list {
|
padding-right: 10px
|
||||||
max-height: 300px;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.asset-group {
|
display: grid;
|
||||||
margin-bottom: 16px;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-column-gap: 10px;
|
||||||
|
|
||||||
.group-title {
|
.group-title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
font-size: 15px;
|
||||||
|
background: #fbfbfd;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-assets {
|
||||||
|
::v-deep .el-checkbox__label {
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 10px;
|
||||||
|
line-height: 19px;
|
||||||
|
font-size: 13px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.group-assets {
|
max-height: 300px;
|
||||||
::v-deep .el-checkbox__label {
|
overflow-y: auto;
|
||||||
display: inline-block;
|
scrollbar-width: none;
|
||||||
padding-left: 10px;
|
display: grid;
|
||||||
line-height: 19px;
|
grid-template-columns: 1fr;
|
||||||
font-size: 13px;
|
grid-row-gap: 5px;
|
||||||
width: 100%;
|
justify-items: start;
|
||||||
}
|
|
||||||
|
|
||||||
display: grid;
|
.asset-item {
|
||||||
|
display: flex;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-row-gap: 5px;
|
justify-content: space-between;
|
||||||
justify-items: start;
|
width: 100%;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
|
||||||
.asset-item {
|
.icon {
|
||||||
display: flex;
|
color: #ed5565;
|
||||||
grid-template-columns: 1fr 1fr;
|
padding-right: 3px
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.asset-ip {
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.asset-status {
|
|
||||||
padding-right: 10px;
|
|
||||||
color: #ed5565
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.asset-ip {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-status {
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #ed5565
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-assets::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
Loading…
Reference in New Issue
Block a user