Merge branch 'dev-3.2' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.3

This commit is contained in:
zhangyu
2022-03-18 18:10:15 +08:00
8 changed files with 20 additions and 31 deletions

View File

@@ -146,7 +146,7 @@ export default {
minWidth: 110 minWidth: 110
}, { }, {
label: 'Talon', label: 'Talon',
prop: 'clientState', prop: 'talon',
show: true, show: true,
sortable: 'custom', sortable: 'custom',
minWidth: 150 minWidth: 150

View File

@@ -91,21 +91,21 @@
<!-- <span v-else-if="scope.row.pid == -1"> <i class="nz-icon nz-icon-overview-project monitorColor color23BF9A"></i> 0 </span>--> <!-- <span v-else-if="scope.row.pid == -1"> <i class="nz-icon nz-icon-overview-project monitorColor color23BF9A"></i> 0 </span>-->
<span v-else> - </span> <span v-else> - </span>
</template> </template>
<template v-else-if="item.prop === 'clientState'"> <template v-else-if="item.prop === 'talon'">
<div v-if="scope.row[item.prop]===1"> <div v-if="scope.row['clientState']===1">
<div class="active-icon green-bg inline-block"></div> <div class="active-icon green-bg inline-block"></div>
OK OK
</div> </div>
<div v-else-if="scope.row[item.prop]===0"> <div v-else-if="scope.row['clientState']===0">
<div class="active-icon gray-bg inline-block"></div> {{ $t('config.user.disable') }} <div class="active-icon gray-bg inline-block"></div> {{ $t('config.user.disable') }}
</div> </div>
<div v-else-if="scope.row[item.prop]===2"> <div v-else-if="scope.row['clientState']===2">
<div class="active-icon red-bg inline-block"></div> {{ $t('asset.connectionTimedOut') }} <div class="active-icon red-bg inline-block"></div> {{ $t('asset.connectionTimedOut') }}
</div> </div>
<div v-else-if="scope.row[item.prop]===3"> <div v-else-if="scope.row['clientState']===3">
<div class="active-icon red-bg inline-block"></div> {{ $t('overall.AuthenticationFailed') }} <div class="active-icon red-bg inline-block"></div> {{ $t('overall.AuthenticationFailed') }}
</div> </div>
<div v-else-if="scope.row[item.prop]===4"> <div v-else-if="scope.row['clientState']===4">
<div class="active-icon red-bg inline-block"></div> {{ $t('config.terminallog.statusItem.unknownError') }} <div class="active-icon red-bg inline-block"></div> {{ $t('config.terminallog.statusItem.unknownError') }}
</div> </div>
<template v-else>-</template> <template v-else>-</template>
@@ -281,7 +281,8 @@ export default {
minWidth: 110 minWidth: 110
}, { }, {
label: 'Talon', label: 'Talon',
prop: 'clientState', // prop: 'clientState',
prop: 'talon',
show: true, show: true,
sortable: 'custom', sortable: 'custom',
minWidth: 150 minWidth: 150
@@ -303,10 +304,10 @@ export default {
if (str === 'dc') { if (str === 'dc') {
orderBy = str orderBy = str
} }
if (str === 'clientState') { // if (str === 'clientState') {
str = 'talon_status' // str = 'talon_status'
orderBy = str // orderBy = str
} // }
if (item.order === 'ascending') { if (item.order === 'ascending') {
orderBy = str orderBy = str
} }

View File

@@ -5,6 +5,7 @@
:data="tableData" :data="tableData"
:height="height" :height="height"
border border
:default-sort="orderBy"
@header-dragend="dragend" @header-dragend="dragend"
@sort-change="tableDataSort" @sort-change="tableDataSort"
@selection-change="selectionChange" @selection-change="selectionChange"

View File

@@ -5,6 +5,7 @@
:data="tableData" :data="tableData"
:height="height" :height="height"
border border
:default-sort="orderBy"
@header-dragend="dragend" @header-dragend="dragend"
@sort-change="tableDataSort" @sort-change="tableDataSort"
@selection-change="selectionChange" @selection-change="selectionChange"

View File

@@ -5,6 +5,7 @@
:data="tableData" :data="tableData"
:height="height" :height="height"
border border
:default-sort="orderBy"
@header-dragend="dragend" @header-dragend="dragend"
@sort-change="tableDataSort" @sort-change="tableDataSort"
@selection-change="selectionChange" @selection-change="selectionChange"

View File

@@ -18,6 +18,7 @@
<template v-slot:default="slotProps"> <template v-slot:default="slotProps">
<credentials-table <credentials-table
ref="dataTable" ref="dataTable"
:orderByFa="orderBy"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading" :loading="tools.loading"
:api="url" :api="url"

View File

@@ -19,6 +19,7 @@
<template v-slot:default="slotProps"> <template v-slot:default="slotProps">
<globalization-table <globalization-table
ref="dataTable" ref="dataTable"
:orderByFa="orderBy"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading" :loading="tools.loading"
:api="url" :api="url"
@@ -27,7 +28,6 @@
:table-data="tableData" :table-data="tableData"
@del="del" @del="del"
@edit="edit" @edit="edit"
@copy="copy"
@orderBy="tableDataSort" @orderBy="tableDataSort"
@reload="getTableData" @reload="getTableData"
@selectionChange="selectionChange" @selectionChange="selectionChange"
@@ -62,7 +62,7 @@ export default {
url: 'sys/i18n', url: 'sys/i18n',
tableId: 'i18nTable', // 需要分页的table的id用于记录每页数量 tableId: 'i18nTable', // 需要分页的table的id用于记录每页数量
blankObject: { blankObject: {
ids: '', id: '',
name: '', name: '',
code: '', code: '',
lang: 'en', lang: 'en',
@@ -129,23 +129,6 @@ export default {
mounted () { mounted () {
this.getUserData() this.getUserData()
} }
// watch: {
// $route: {
// immediate: true,
// handler () {
// // 是否弹出侧滑
// const add = this.$route.query.add
// if (add) {
// if (add === 'dc') {
// this.add()
// }
// if (add === 'cabinet') {
// this.addCabinet()
// }
// }
// }
// }
// }
} }
</script> </script>
<style scoped> <style scoped>

View File

@@ -18,6 +18,7 @@
<template v-slot:default="slotProps"> <template v-slot:default="slotProps">
<mib-table <mib-table
ref="dataTable" ref="dataTable"
:orderByFa="orderBy"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading" :loading="tools.loading"
:api="url" :api="url"