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

# Conflicts:
#	nezha-fronted/src/components/common/language/cn.js
#	nezha-fronted/src/components/common/language/en.js
This commit is contained in:
zhangyu
2021-10-22 18:08:37 +08:00
63 changed files with 436 additions and 59 deletions

View File

@@ -177,3 +177,10 @@
padding-bottom: 10px; padding-bottom: 10px;
} }
} }
.icon {
width: 5rem;
height: 5rem;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}

View File

@@ -482,3 +482,10 @@
.fade-leave-active { .fade-leave-active {
transition: opacity 1s; transition: opacity 1s;
} }
.right-no-data /deep/ .icon {
width: 5rem;
height: 5rem;
}
.right-no-data {
line-height: 21px;
}

View File

@@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "nz-icon"; /* Project id 2030432 */ font-family: "nz-icon"; /* Project id 2030432 */
src: url('iconfont.woff2?t=1634867510407') format('woff2'), src: url('iconfont.woff2?t=1634897057336') format('woff2'),
url('iconfont.woff?t=1634867510407') format('woff'), url('iconfont.woff?t=1634897057336') format('woff'),
url('iconfont.ttf?t=1634867510407') format('truetype'); url('iconfont.ttf?t=1634897057336') format('truetype');
} }
.nz-icon { .nz-icon {
@@ -17,15 +17,15 @@
content: "\e74a"; content: "\e74a";
} }
.nz-icon-Panelkong:before { .nz-icon-no-data-panel:before {
content: "\e748"; content: "\e748";
} }
.nz-icon-Projectkong:before { .nz-icon-no-data-project:before {
content: "\e74f"; content: "\e74f";
} }
.nz-icon-Assetkong:before { .nz-icon-no-data-list:before {
content: "\e750"; content: "\e750";
} }

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "nz-icon"; /* Project id 2030432 */ font-family: "nz-icon"; /* Project id 2030432 */
src: url('./font/iconfont.woff2?t=1634867510407') format('woff2'), src: url('./font/iconfont.woff2?t=1634897057336') format('woff2'),
url('./font/iconfont.woff?t=1634867510407') format('woff'), url('./font/iconfont.woff?t=1634897057336') format('woff'),
url('./font/iconfont.ttf?t=1634867510407') format('truetype'); url('./font/iconfont.ttf?t=1634897057336') format('truetype');
} }
.nz-icon { .nz-icon {
@@ -17,15 +17,15 @@
content: "\e74a"; content: "\e74a";
} }
.nz-icon-Panelkong:before { .nz-icon-no-data-panel:before {
content: "\e748"; content: "\e748";
} }
.nz-icon-Projectkong:before { .nz-icon-no-data-project:before {
content: "\e74f"; content: "\e74f";
} }
.nz-icon-Assetkong:before { .nz-icon-no-data-list:before {
content: "\e750"; content: "\e750";
} }

View File

@@ -5,13 +5,34 @@
position:relative; position:relative;
box-sizing: border-box; box-sizing: border-box;
} }
.noData{ .no-data{
text-align: center height: 1189px;
width: 100%;
position: relative;
.icon {
width: 5rem;
height: 5rem;
position: absolute;
top: 50%;
left: 50%;
margin-top: -52px;
margin-left: -40px;
text-align: center;
}
.no-data-div {
position: absolute;
font-size: 16px;
color: #333333;
font-weight: 400;
margin-left: -29px;
top: 52.5%;
left: 50%
}
} }
.list-width{ .list-width{
width: 100%; width: 100%;
/*height: 100%;*/ /*height: 100%;*/
padding: 0 10px 5px 20px; padding: 0 10px 5px 10px;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden;/*避免鼠标第一次放到曲线时x轴出现滚动条后消失*/ overflow: hidden;/*避免鼠标第一次放到曲线时x轴出现滚动条后消失*/
@@ -241,7 +262,13 @@
:chart-index="index"></chart-group> :chart-index="index"></chart-group>
</div> </div>
</draggable> </draggable>
<el-row v-if="dataList.length === 0" class="noData"></el-row> <!-- <el-row v-if="dataList.length === 0" class="noData"></el-row>-->
<div v-if="dataList.length === 0" class="no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-panel"></use>
</svg>
<div class="no-data-div">No data</div>
</div>
<!--<div class="page-shadow" v-if="showShadow"></div>--> <!--<div class="page-shadow" v-if="showShadow"></div>-->
</div> </div>
</template> </template>

View File

@@ -159,6 +159,8 @@ const cn = {
unusual: '不正常', unusual: '不正常',
AuthenticationFailed: '认证失败', AuthenticationFailed: '认证失败',
clearAllSelect: '清除选择的内容', clearAllSelect: '清除选择的内容',
disabled: '已禁用',
enabled: '启用'
}, },
setup: { setup: {
step0: '欢迎', step0: '欢迎',
@@ -725,6 +727,7 @@ const cn = {
user: { user: {
userList: '用户列表', userList: '用户列表',
user: '用户', user: '用户',
state: '状态',
name: '姓名', // "用户" name: '姓名', // "用户"
username: '登录名', // 登录名 username: '登录名', // 登录名
roles: '角色', roles: '角色',

View File

@@ -163,7 +163,9 @@ const en = {
normal: 'Up', normal: 'Up',
unusual: 'Down', unusual: 'Down',
AuthenticationFailed: 'Authentication failed', AuthenticationFailed: 'Authentication failed',
clearAllSelect: 'Clear the selection' clearAllSelect: 'Clear the selection',
disabled: 'Disabled',
enabled: 'Enabled'
}, },
pageSize: '/page', pageSize: '/page',
setup: { setup: {
@@ -733,6 +735,7 @@ const en = {
user: { user: {
userList: 'User list', // "用户列表" userList: 'User list', // "用户列表"
user: 'User', user: 'User',
state: 'State',
// 列表表头 // 列表表头
name: 'Name', // "用户" name: 'Name', // "用户"
username: 'Username', // 登录名 username: 'Username', // 登录名

View File

@@ -545,3 +545,20 @@
.selpop { .selpop {
cursor: pointer; cursor: pointer;
} }
.topo-noData{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
.content{
text-align: center;
font-size: 16px;
color: #333333;
font-weight: 400;
}
}
.topo-noData /deep/ .icon{
width: 5rem;
height: 5rem;
}

View File

@@ -228,6 +228,12 @@
> >
<topoTooltip :chartDataParent="chartData" :filterTime="filterTime"/> <topoTooltip :chartDataParent="chartData" :filterTime="filterTime"/>
</div> </div>
<div v-show="showNoData" class="topo-noData">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-project"></use>
</svg>
<div class="content">No data</div>
</div>
</div> </div>
<!--endpoint--> <!--endpoint-->
<transition name="right-box"> <transition name="right-box">
@@ -393,6 +399,7 @@ export default {
bus.timeFormate(bus.getOffsetTimezoneData(-1), 'yyyy-MM-dd hh:mm:ss'), bus.timeFormate(bus.getOffsetTimezoneData(-1), 'yyyy-MM-dd hh:mm:ss'),
bus.timeFormate(bus.getOffsetTimezoneData(), 'yyyy-MM-dd hh:mm:ss') bus.timeFormate(bus.getOffsetTimezoneData(), 'yyyy-MM-dd hh:mm:ss')
], ],
showNoData: false,
topologyInfo: { topologyInfo: {
fontSize: 14, fontSize: 14,
align: 'left', align: 'left',
@@ -771,6 +778,11 @@ export default {
} }
this.$get('monitor/project/topo', { projectId: this.obj.id }).then(res => { this.$get('monitor/project/topo', { projectId: this.obj.id }).then(res => {
let data = res.data.topo let data = res.data.topo
if (!res.data.topo || !res.data.topo.pens.length) {
this.showNoData = true
} else {
this.showNoData = false
}
if (this.isPreview) { if (this.isPreview) {
data = this.previewData data = this.previewData
} }
@@ -1816,6 +1828,7 @@ export default {
editTopology (val) { editTopology (val) {
this.editTopologyFlag = true this.editTopologyFlag = true
this.showNoData = false
this.topoScreenState = JSON.parse(JSON.stringify(this.topoScreen)) this.topoScreenState = JSON.parse(JSON.stringify(this.topoScreen))
this.$store.commit('setShowTopoScreen', true) this.$store.commit('setShowTopoScreen', true)
setTimeout(() => { setTimeout(() => {

View File

@@ -86,7 +86,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--enable--> <!--enable-->
<el-form-item :label="$t('config.user.enable')"> <el-form-item :label="$t('config.user.state')">
<el-switch id="account-input-status" v-model="editUser.status" :disabled="isCurrentUser(editUser.username) || (editUser.username==='admin' && editUser.id==1) " active-color="#ee9d3f" active-value="1" <el-switch id="account-input-status" v-model="editUser.status" :disabled="isCurrentUser(editUser.username) || (editUser.username==='admin' && editUser.id==1) " active-color="#ee9d3f" active-value="1"
inactive-value="0"> inactive-value="0">
</el-switch> </el-switch>

View File

@@ -133,11 +133,11 @@
size="small" size="small"
> >
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.on')" :label="$t('overall.enabled')"
:value="1"> :value="1">
</el-option> </el-option>
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.off')" :label="$t('overall.disabled')"
:value="0"> :value="0">
</el-option> </el-option>
</el-select> </el-select>
@@ -168,11 +168,11 @@
size="small" size="small"
> >
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.on')" :label="$t('overall.enabled')"
:value="1"> :value="1">
</el-option> </el-option>
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.off')" :label="$t('overall.disabled')"
:value="0"> :value="0">
</el-option> </el-option>
</el-select> </el-select>
@@ -189,11 +189,11 @@
size="small" size="small"
> >
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.on')" :label="$t('overall.enabled')"
:value="1"> :value="1">
</el-option> </el-option>
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.off')" :label="$t('overall.disabled')"
:value="0"> :value="0">
</el-option> </el-option>
</el-select> </el-select>
@@ -258,11 +258,11 @@
@change="receiverAndNotifyValidate" @change="receiverAndNotifyValidate"
> >
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.on')" :label="$t('overall.enabled')"
:value="1"> :value="1">
</el-option> </el-option>
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.off')" :label="$t('overall.disabled')"
:value="0"> :value="0">
</el-option> </el-option>
</el-select> </el-select>
@@ -280,11 +280,11 @@
@change="receiverAndNotifyValidate" @change="receiverAndNotifyValidate"
> >
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.on')" :label="$t('overall.enabled')"
:value="1"> :value="1">
</el-option> </el-option>
<el-option <el-option
:label="$t('dashboard.panel.chartForm.lockList.off')" :label="$t('overall.disabled')"
:value="0"> :value="0">
</el-option> </el-option>
</el-select> </el-select>

View File

@@ -125,6 +125,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -152,7 +160,8 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
alertMessageTabNew: Boolean alertMessageTabNew: Boolean,
loading: Boolean
}, },
mixins: [table, bus], mixins: [table, bus],
data () { data () {

View File

@@ -90,15 +90,23 @@
<div ><i class="nz-icon nz-icon-dingshishijian"/>{{scope.row.schedStime+' - '+scope.row.schedEtime}}</div> <div ><i class="nz-icon nz-icon-dingshishijian"/>{{scope.row.schedStime+' - '+scope.row.schedEtime}}</div>
</div> </div>
</div> </div>
<el-switch <!-- <el-switch-->
slot="reference" <!-- slot="reference"-->
v-model="scope.row.state" <!-- v-model="scope.row.state"-->
:disabled="!hasButton('dc_edit') || !hasButton('dc_edit') || !!Number(scope.row.buildIn)" <!-- :disabled="!hasButton('dc_edit') || !hasButton('dc_edit') || !!Number(scope.row.buildIn)"-->
active-color="#ee9d3f" <!-- active-color="#ee9d3f"-->
:active-value="1" <!-- :active-value="1"-->
:inactive-value="0" <!-- :inactive-value="0"-->
@change="(val)=>{$emit('statusChange', scope.row)}" <!-- @change="(val)=>{$emit('statusChange', scope.row)}"-->
/> <!-- />-->
<div slot="reference" v-if="scope.row[item.prop] === 1">
<div class="active-icon green-bg inline-block"></div>
{{ $t('overall.enabled') }}
</div>
<div slot="reference" v-else-if="scope.row[item.prop] === 0">
<div class="active-icon red-bg inline-block"></div>
{{ $t('overall.disabled') }}
</div>
</el-popover> </el-popover>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
@@ -125,6 +133,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -134,6 +150,9 @@ import chartDataFormat from '@/components/charts/chartDataFormat'
export default { export default {
name: 'alertRuleTable', name: 'alertRuleTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -102,6 +102,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -116,6 +124,9 @@ export default {
nzAlertTag nzAlertTag
}, },
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
/* 表格相关 */ /* 表格相关 */

View File

@@ -81,6 +81,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -89,6 +97,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'assetLabelTable', name: 'assetLabelTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -132,6 +132,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -151,7 +159,8 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
assetTab: Boolean assetTab: Boolean,
loading: Boolean
}, },
data () { data () {
return { return {

View File

@@ -69,6 +69,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -77,6 +85,9 @@ import table from '@/components/common/mixin/table'
import { agent } from '@/components/common/js/constants' import { agent } from '@/components/common/js/constants'
export default { export default {
name: 'agentTable', name: 'agentTable',
props: {
loading: Boolean
},
mixins: [table], mixins: [table],
data () { data () {
return { return {

View File

@@ -83,6 +83,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -90,6 +98,9 @@
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
export default { export default {
name: 'asstTypeTable', name: 'asstTypeTable',
props: {
loading: Boolean
},
mixins: [table], mixins: [table],
data () { data () {
return { return {

View File

@@ -50,6 +50,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -60,6 +68,9 @@ export default {
name: 'cabinet Table', name: 'cabinet Table',
components: { Template }, components: { Template },
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -64,6 +64,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -73,6 +81,9 @@ import { chart as chartConstant } from '@/components/common/js/constants'
export default { export default {
name: 'chartTmplTable', name: 'chartTmplTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
chartTypeList: chartConstant.type, chartTypeList: chartConstant.type,

View File

@@ -83,6 +83,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -90,6 +98,9 @@
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
export default { export default {
name: 'credentialsTable', name: 'credentialsTable',
props: {
loading: Boolean
},
mixins: [table], mixins: [table],
data () { data () {
return { return {

View File

@@ -41,14 +41,14 @@
<template v-else>-</template> <template v-else>-</template>
</template> </template>
<template v-else-if="item.prop === 'state'"> <template v-else-if="item.prop === 'state'">
<el-switch <div v-if="scope.row[item.prop] === 'ON'">
v-model="scope.row.state" <div class="active-icon green-bg inline-block"></div>
:disabled="!hasButton('dc_edit') || !hasButton('dc_edit')" {{ $t('overall.enabled') }}
active-color="#ee9d3f" </div>
active-value="ON" <div v-else-if="scope.row[item.prop] === 'OFF'">
inactive-value="OFF" <div class="active-icon red-bg inline-block"></div>
@change="(val)=>{$emit('statusChange', scope.row)}" {{ $t('overall.disabled') }}
/> </div>
</template> </template>
<template v-else-if="item.prop === 'longitude'"> <template v-else-if="item.prop === 'longitude'">
<template v-if="regNumTest(scope.row.longitude)">{{scope.row.longitude}}</template> <template v-if="regNumTest(scope.row.longitude)">{{scope.row.longitude}}</template>
@@ -99,6 +99,15 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -108,6 +117,9 @@ import { showTableTooltip, hideTableTooltip } from '@/components/common/js/tools
export default { export default {
name: 'dcTable', name: 'dcTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
regNum: /^[0-9]+.?[0-9]*/, regNum: /^[0-9]+.?[0-9]*/,

View File

@@ -184,6 +184,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -201,7 +209,8 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
endpointTab: Boolean endpointTab: Boolean,
loading: Boolean
}, },
data () { data () {
return { return {

View File

@@ -56,6 +56,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -64,6 +72,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'exprTmplTable', name: 'exprTmplTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -72,6 +72,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -80,6 +88,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'menuTable', name: 'menuTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原table列 tableTitle: [ // 原table列

View File

@@ -89,6 +89,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -98,6 +106,9 @@ import axios from 'axios'
export default { export default {
name: 'mibTable', name: 'mibTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -76,6 +76,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -84,6 +92,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'modelTable', name: 'modelTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原始table列 tableTitle: [ // 原始table列

View File

@@ -81,6 +81,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -89,6 +97,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'moduleTable', name: 'moduleTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原始table列 tableTitle: [ // 原始table列

View File

@@ -45,6 +45,14 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -53,6 +61,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'operationLog', name: 'operationLog',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ tableTitle: [

View File

@@ -80,6 +80,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -88,6 +96,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'projectTable', name: 'projectTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原始table列 tableTitle: [ // 原始table列

View File

@@ -64,6 +64,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -72,6 +80,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'roleTable', name: 'roleTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原table列 tableTitle: [ // 原table列

View File

@@ -103,6 +103,14 @@
</template> </template>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -116,7 +124,8 @@ export default {
props: { props: {
nowTime: {}, nowTime: {},
terminalLogTab: Boolean, terminalLogTab: Boolean,
terminalLog: Boolean terminalLog: Boolean,
loading: Boolean
}, },
data () { data () {
return { return {

View File

@@ -54,14 +54,14 @@
</template> </template>
</template> </template>
<template v-else-if="item.prop === 'status'"> <template v-else-if="item.prop === 'status'">
<el-switch <div v-if="scope.row[item.prop] === 1">
v-model="scope.row.status" <div class="active-icon green-bg inline-block"></div>
:active-color="theme.themeColor" {{ $t('overall.enabled') }}
:disabled="isCurrentUser(scope.row.username) || !hasButton('user_edit') || (scope.row.username === 'admin' && scope.row.id === 1)" </div>
active-value="1" <div v-else-if="scope.row[item.prop] === 0">
inactive-value="0" <div class="active-icon red-bg inline-block"></div>
@change="val => {statusChange(scope.row)}"> {{ $t('overall.disabled') }}
</el-switch> </div>
</template> </template>
<span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span> <span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
<span v-else-if="item.prop === 'lastLoginTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span> <span v-else-if="item.prop === 'lastLoginTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
@@ -93,6 +93,14 @@
</el-dropdown> </el-dropdown>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -101,6 +109,9 @@ import table from '@/components/common/mixin/table'
export default { export default {
name: 'userTable', name: 'userTable',
mixins: [table], mixins: [table],
props: {
loading: Boolean
},
data () { data () {
return { return {
tableTitle: [ // 原始table列 tableTitle: [ // 原始table列
@@ -154,7 +165,7 @@ export default {
show: true, show: true,
width: 150 width: 150
}, { }, {
label: this.$t('config.user.enable'), label: this.$t('config.user.state'),
prop: 'status', prop: 'status',
show: true, show: true,
width: 100 width: 100

View File

@@ -126,6 +126,7 @@
ref="dataTable" ref="dataTable"
:orderByFa="orderBy" :orderByFa="orderBy"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -23,6 +23,7 @@
<agent-table <agent-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -41,6 +41,7 @@
<asset-meta-table <asset-meta-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -22,6 +22,7 @@
id="role-list-table" id="role-list-table"
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:data="tableData" :data="tableData"
:height="mainTableHeight" :height="mainTableHeight"
border border

View File

@@ -20,6 +20,7 @@
<asset-type-table <asset-type-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -31,6 +31,7 @@
<credentials-table <credentials-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -114,6 +114,7 @@
<dc-table <dc-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -18,6 +18,7 @@
<menu-table <menu-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -31,6 +31,7 @@
<mib-table <mib-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -41,6 +41,7 @@
<model-table <model-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -12,6 +12,7 @@
<operation-log-table <operation-log-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -20,6 +20,7 @@
v-if="profileShow" v-if="profileShow"
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -20,6 +20,7 @@
<role-table <role-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -20,6 +20,7 @@
<api-key-table <api-key-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:table-id="tableId" :table-id="tableId"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"

View File

@@ -98,6 +98,14 @@
</template> </template>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -106,6 +114,9 @@ import { tableCommon } from './systemCommon'
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
export default { export default {
name: 'apiKeyTable', name: 'apiKeyTable',
props: {
loading: Boolean
},
mixins: [table, tableCommon], mixins: [table, tableCommon],
data () { data () {
return { return {

View File

@@ -20,6 +20,7 @@
<link-table <link-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:table-id="tableId" :table-id="tableId"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"

View File

@@ -77,6 +77,14 @@
</template> </template>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -86,6 +94,9 @@ import bus from '../../../../libs/bus'
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
export default { export default {
name: 'linkTable', name: 'linkTable',
props: {
loading: Boolean
},
mixins: [table, tableCommon], mixins: [table, tableCommon],
data () { data () {
return { return {

View File

@@ -21,6 +21,7 @@
<notify-method-table <notify-method-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:table-id="tableId" :table-id="tableId"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"

View File

@@ -87,6 +87,14 @@
</template> </template>
</div> </div>
</el-table-column> </el-table-column>
<template v-if="!loading" slot="empty">
<div class="right-no-data">
<svg class="icon" aria-hidden="true">
<use xlink:href="#nz-icon-no-data-list"></use>
</svg>
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
</div>
</template>
</el-table> </el-table>
</template> </template>
@@ -95,6 +103,9 @@ import table from '@/components/common/mixin/table'
import { tableCommon } from './systemCommon' import { tableCommon } from './systemCommon'
export default { export default {
name: 'notifyMethodTable', name: 'notifyMethodTable',
props: {
loading: Boolean
},
mixins: [table, tableCommon], mixins: [table, tableCommon],
data () { data () {
return { return {

View File

@@ -67,6 +67,7 @@
<terminal-log-table <terminal-log-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -74,6 +74,7 @@
<user-table <user-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -79,7 +79,7 @@
</template> </template>
</div> </div>
<div id="tableList" class="table-list"> <div id="tableList" class="table-list">
<div ref="dashboardScrollbar" :class="overScroll10?'border-t-1-de':'border-t-1-tr'" id="dashboardScrollbar" style="height: calc(100% - 20px); overflow: auto;"> <div ref="dashboardScrollbar" id="dashboardScrollbar" class="border-t-1-de" style="height: calc(100% - 20px); overflow: auto;">
<div class="box-content"> <div class="box-content">
<chart-list ref="chartList" :class="{'show-top':showTopBtn}" :from="fromRoute.panel" :panel-lock="panelLock" @on-edit-chart="editChart" @on-refresh-time="refreshTime" @on-remove-chart="delChart" @on-add-group-item-chart="addGroupItem"></chart-list> <chart-list ref="chartList" :class="{'show-top':showTopBtn}" :from="fromRoute.panel" :panel-lock="panelLock" @on-edit-chart="editChart" @on-refresh-time="refreshTime" @on-remove-chart="delChart" @on-add-group-item-chart="addGroupItem"></chart-list>
</div> </div>
@@ -892,6 +892,7 @@ export default {
<style lang="scss"> <style lang="scss">
.border-t-1-de{ .border-t-1-de{
border-top: 1px solid #dedede; border-top: 1px solid #dedede;
padding-top: 10px;
} }
.border-t-1-tr{ .border-t-1-tr{
border-top: 1px solid transparent; border-top: 1px solid transparent;

View File

@@ -128,6 +128,7 @@
<endpoint-table <endpoint-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="mainTableHeight" :height="mainTableHeight"

View File

@@ -113,6 +113,7 @@
<module-table <module-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:tableId="tableId" :tableId="tableId"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"

View File

@@ -21,6 +21,7 @@
<project-table <project-table
ref="dataTable" ref="dataTable"
v-loading="tools.loading" v-loading="tools.loading"
:loading="tools.loading"
:api="url" :api="url"
:custom-table-title="tools.customTableTitle" :custom-table-title="tools.customTableTitle"
:height="projectTableHeight" :height="projectTableHeight"

View File

@@ -3,6 +3,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import 'xterm/dist/xterm.css' import 'xterm/dist/xterm.css'
import '@/assets/stylus/main.scss' import '@/assets/stylus/main.scss'
import '@/assets/css/main.scss' import '@/assets/css/main.scss'
import '@/assets/css/font/iconfont.js'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import i18n from './components/common/i18n' import i18n from './components/common/i18n'