NEZ-597 perf: 列表页面排序细分设置

This commit is contained in:
@changcode
2021-05-07 19:10:28 +08:00
parent 73950be33c
commit fbf4de1c69
28 changed files with 413 additions and 132 deletions

File diff suppressed because one or more lines are too long

View File

@@ -56,7 +56,7 @@ export default {
}, },
data () { data () {
return { return {
url: '/cabinet', url: 'dc/cabinet',
tableId: 'cabinetTable', tableId: 'cabinetTable',
blankObject: { blankObject: {
id: '', id: '',
@@ -92,6 +92,9 @@ export default {
} }
} }
}, },
created() {
console.log(this.$route);
},
methods: { methods: {
// 切换tab // 切换tab
changeTab (tab) { changeTab (tab) {

View File

@@ -722,8 +722,8 @@ const en = {
model: 'Asset model', model: 'Asset model',
brand: 'Brand', brand: 'Brand',
name: 'Name', name: 'Name',
ChartTemplate: 'ChartTemplate', ChartTemplate: 'Chart template',
assetNum: 'AssetNum', assetNum: 'Asset',
editModel: 'Edit model', editModel: 'Edit model',
createModel: 'New model', createModel: 'New model',
remark: 'Description', remark: 'Description',

View File

@@ -64,6 +64,7 @@ export default {
this.$emit('showBottomBox', targetTab, JSON.parse(JSON.stringify(row))) this.$emit('showBottomBox', targetTab, JSON.parse(JSON.stringify(row)))
}, },
tableDataSort (item) { tableDataSort (item) {
console.log(item)
let orderBy = '' let orderBy = ''
if (item.order === 'ascending') { if (item.order === 'ascending') {
orderBy = item.prop orderBy = item.prop
@@ -71,6 +72,7 @@ export default {
if (item.order === 'descending') { if (item.order === 'descending') {
orderBy = '-' + item.prop orderBy = '-' + item.prop
} }
console.log(orderBy)
this.$emit('orderBy', orderBy) this.$emit('orderBy', orderBy)
} }
} }

View File

@@ -31,7 +31,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="$tableSet.sortableShow(item.prop,'alertMessage')" :sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
> >
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
@@ -166,23 +166,28 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('alert.alertName'), label: this.$t('alert.alertName'),
prop: 'alertRule', prop: 'alertRule',
show: true, show: true,
width: 180 width: 180,
sortable:false,
sortable:'custom'
}, { }, {
label: this.$t('alert.list.labels'), label: this.$t('alert.list.labels'),
prop: 'labels', prop: 'labels',
show: true, show: true,
NotSet: true, NotSet: true,
minWidth: 250 minWidth: 250,
sortable:'custom'
}, { }, {
label: this.$t('alert.severity'), label: this.$t('alert.severity'),
prop: 'severity', prop: 'severity',
show: true, show: true,
width: 110 width: 110,
sortable:'custom'
}, { }, {
label: this.$t('alert.summary'), label: this.$t('alert.summary'),
prop: 'summary', prop: 'summary',
@@ -207,7 +212,8 @@ export default {
label: this.$t('alert.startAt'), label: this.$t('alert.startAt'),
prop: 'startAt', prop: 'startAt',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, { }, {
label: this.$t('config.terminallog.duration'), label: this.$t('config.terminallog.duration'),
prop: 'duration', prop: 'duration',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -83,11 +84,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('alert.alertName'), label: this.$t('alert.alertName'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('alert.config.expr'), label: this.$t('alert.config.expr'),
prop: 'expr', prop: 'expr',
@@ -107,7 +110,8 @@ export default {
}, { }, {
label: this.$t('alert.severity'), label: this.$t('alert.severity'),
prop: 'severity', prop: 'severity',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('alert.summary'), label: this.$t('alert.summary'),
prop: 'summary', prop: 'summary',
@@ -120,7 +124,8 @@ export default {
label: this.$t('alert.message'), label: this.$t('alert.message'),
prop: 'alertNum', prop: 'alertNum',
show: true, show: true,
width: 90 width: 90,
sortable:'custom'
}, { }, {
label: this.$t('alert.config.receiver'), label: this.$t('alert.config.receiver'),
prop: 'receivers', prop: 'receivers',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -102,16 +103,19 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: 'matchers', label: 'matchers',
prop: 'matchers', prop: 'matchers',
show: true show: true,
sortable:'custom'
}, { }, {
label: 'Start time', label: 'Start time',
prop: 'startAt', prop: 'startAt',
show: true, show: true,
width: 300 width: 300,
sortable:'custom'
}, { }, {
label: this.$t('config.terminallog.duration'), label: this.$t('config.terminallog.duration'),
prop: 'duration', prop: 'duration',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -93,20 +94,24 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.assetLabel.name'), label: this.$t('config.assetLabel.name'),
prop: 'name', prop: 'name',
show: true, show: true,
width: 100 width: 100,
sortable:'custom'
}, { }, {
label: this.$t('config.assetLabel.key'), label: this.$t('config.assetLabel.key'),
prop: 'metaKey', prop: 'metaKey',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.assetLabel.group'), label: this.$t('config.assetLabel.group'),
prop: 'group', prop: 'group',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.assetLabel.search'), label: this.$t('config.assetLabel.search'),
prop: 'search', prop: 'search',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -92,16 +93,19 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 110 width: 110,
sortable:'custom'
}, { }, {
label: this.$t('overall.name'), label: this.$t('overall.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('asset.manageIp'), label: this.$t('asset.manageIp'),
prop: 'manageIp', prop: 'manageIp',
show: true, show: true,
width: 120 width: 120,
sortable:'custom'
}, { }, {
label: this.$t('overall.parent'), label: this.$t('overall.parent'),
prop: 'parent', prop: 'parent',
@@ -111,42 +115,50 @@ export default {
label: this.$t('overall.type'), label: this.$t('overall.type'),
prop: 'type', prop: 'type',
show: true, show: true,
width: 140 width: 140,
sortable:'custom'
}, { }, {
label: this.$t('asset.state'), label: this.$t('asset.state'),
prop: 'state', prop: 'state',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('overall.dc'), label: this.$t('overall.dc'),
prop: 'dc', prop: 'dc',
show: true, show: true,
width: 110 width: 110,
sortable:'custom'
}, { }, {
label: this.$t('asset.cabinet'), label: this.$t('asset.cabinet'),
prop: 'cabinet', prop: 'cabinet',
show: true, show: true,
width: 110 width: 110,
sortable:'custom'
}, { }, {
label: this.$t('asset.alertNum'), label: this.$t('asset.alertNum'),
prop: 'alertNum', prop: 'alertNum',
show: true, show: true,
width: 140 width: 140,
sortable:'custom'
}, { }, {
label: this.$t('asset.endpointNum2'), label: this.$t('asset.endpointNum2'),
prop: 'endpointNum', prop: 'endpointNum',
show: true, show: true,
width: 140 width: 140,
sortable:'custom'
}, { }, {
label: this.$t('asset.brand'), label: this.$t('asset.brand'),
prop: 'brand', prop: 'brand',
show: true, show: true,
width: 120 width: 120,
sortable:'custom'
}, { }, {
label: this.$t('asset.model'), label: this.$t('asset.model'),
prop: 'model', prop: 'model',
show: true, show: true,
width: 110 width: 110,
sortable:'custom'
}, { }, {
label: 'SN', label: 'SN',
prop: 'sn', prop: 'sn',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -84,11 +85,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.agent.name'), label: this.$t('config.agent.name'),
prop: 'dc', prop: 'dc',
show: true show: true,
sortable:'custom'
}, { }, {
label: 'Host', label: 'Host',
prop: 'host', prop: 'host',
@@ -100,11 +103,13 @@ export default {
}, { }, {
label: this.$t('config.agent.type'), label: this.$t('config.agent.type'),
prop: 'type', prop: 'type',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('asset.state'), label: this.$t('asset.state'),
prop: 'status', prop: 'status',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.agent.checkTime'), label: this.$t('config.agent.checkTime'),
prop: 'checkTime', prop: 'checkTime',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
> >
<template slot="header"> <template slot="header">
@@ -97,12 +98,14 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.assetType.name'), label: this.$t('config.assetType.name'),
prop: 'name', prop: 'name',
show: true, show: true,
width: 120 width: 120,
sortable:'custom'
}, { }, {
label: this.$t('config.assetType.vm'), label: this.$t('config.assetType.vm'),
prop: 'vm', prop: 'vm',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -75,19 +76,23 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.name'), label: this.$t('config.exprTemp.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.type'), label: this.$t('config.exprTemp.type'),
prop: 'type', prop: 'type',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.varType'), label: this.$t('config.exprTemp.varType'),
prop: 'varType', prop: 'varType',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.remark'), label: this.$t('config.exprTemp.remark'),
prop: 'remark', prop: 'remark',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -96,15 +97,18 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('overall.name'), label: this.$t('overall.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.mib.credential.type'), label: this.$t('config.mib.credential.type'),
prop: 'type', prop: 'type',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.mib.credential.port'), label: this.$t('config.mib.credential.port'),
prop: 'port', prop: 'port',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -116,11 +117,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('overall.name'), label: this.$t('overall.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('asset.location'), label: this.$t('asset.location'),
prop: 'location', prop: 'location',
@@ -128,11 +131,13 @@ export default {
}, { }, {
label: this.$t('config.dc.cabinetNum'), label: this.$t('config.dc.cabinetNum'),
prop: 'cabinetNum', prop: 'cabinetNum',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.dc.assets'), label: this.$t('config.dc.assets'),
prop: 'assetNum', prop: 'assetNum',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.dc.alert'), label: this.$t('config.dc.alert'),
prop: 'alertNum', prop: 'alertNum',
@@ -156,7 +161,8 @@ export default {
}, { }, {
label: this.$t('config.dc.state'), label: this.$t('config.dc.state'),
prop: 'state', prop: 'state',
show: true show: true,
sortable:'custom'
} }
] ]
} }

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -120,11 +121,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('project.endpoint.name'), label: this.$t('project.endpoint.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('project.module.type'), label: this.$t('project.module.type'),
prop: 'type', prop: 'type',
@@ -132,12 +135,14 @@ export default {
}, { }, {
label: this.$t('project.project.project'), label: this.$t('project.project.project'),
prop: 'project', prop: 'project',
show: true show: true,
sortable:'custom'
}, },
{ {
label: this.$t('project.endpoint.asset'), label: this.$t('project.endpoint.asset'),
prop: 'asset', prop: 'asset',
show: true show: true,
sortable:'custom'
}, },
{ {
label: this.$t('project.module.module'), label: this.$t('project.module.module'),
@@ -152,12 +157,14 @@ export default {
{ {
label: this.$t('project.endpoint.alerts'), label: this.$t('project.endpoint.alerts'),
prop: 'alerts', prop: 'alerts',
show: true show: true,
sortable:'custom'
}, },
{ {
label: this.$t('project.endpoint.state'), label: this.$t('project.endpoint.state'),
prop: 'state', prop: 'state',
show: true show: true,
sortable:'custom'
} }
] ]
} }

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -70,15 +71,18 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.name'), label: this.$t('config.exprTemp.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.gname'), label: this.$t('config.exprTemp.gname'),
prop: 'gname', prop: 'gname',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.exprTemp.expression'), label: this.$t('config.exprTemp.expression'),
prop: 'expression', prop: 'expression',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -104,11 +105,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('overall.name'), label: this.$t('overall.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.mib.fileName'), label: this.$t('config.mib.fileName'),
prop: 'fileName', prop: 'fileName',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
> >
<template slot="header"> <template slot="header">
@@ -44,6 +45,12 @@
{{scope.row.brand.name}} {{scope.row.brand.name}}
</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>
<template v-else-if="item.prop === 'assetNum'">
<span class="endpoint-num" @click="showBottomBox('asset', scope.row)">
<i class="nz-icon nz-icon-overview-project monitorColor" :class="scope.row[item.prop]>0?'color23BF9A':'color23BF9A'"/>
{{scope.row[item.prop]}}
</span>
</template>
<span v-else>{{scope.row[item.prop]}}</span> <span v-else>{{scope.row[item.prop]}}</span>
</template> </template>
</el-table-column> </el-table-column>
@@ -80,17 +87,20 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.model.name'), label: this.$t('config.model.name'),
prop: 'name', prop: 'name',
show: true, show: true,
width: 160 width: 160,
sortable:'custom'
}, { }, {
label: this.$t('config.model.brand'), label: this.$t('config.model.brand'),
prop: 'brand', prop: 'brand',
show: true, show: true,
width: 160 width: 160
,sortable:'custom'
}, { }, {
label: this.$t('config.model.remark'), label: this.$t('config.model.remark'),
prop: 'remark', prop: 'remark',
@@ -99,7 +109,8 @@ export default {
label: this.$t('config.model.assetNum'), label: this.$t('config.model.assetNum'),
prop: 'assetNum', prop: 'assetNum',
show: true, show: true,
width: 200 width: 200,
sortable:'custom'
} }
] ]
} }

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -90,12 +91,14 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('project.module.moduleName'), label: this.$t('project.module.moduleName'),
prop: 'name', prop: 'name',
show: true, show: true,
minWidth: 200 minWidth: 200,
sortable:'custom'
}, { }, {
label: this.$t('project.module.type'), label: this.$t('project.module.type'),
prop: 'type', prop: 'type',
@@ -105,18 +108,21 @@ export default {
label: this.$t('project.project.project'), label: this.$t('project.project.project'),
prop: 'project', prop: 'project',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, },
{ {
label: this.$t('project.endpoint.endpoint'), label: this.$t('project.endpoint.endpoint'),
prop: 'endpointNum', prop: 'endpointNum',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, { }, {
label: this.$t('project.module.alerts'), label: this.$t('project.module.alerts'),
prop: 'alertNum', prop: 'alertNum',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, },
{ {
label: this.$t('overall.remark'), label: this.$t('overall.remark'),

View File

@@ -26,6 +26,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -93,27 +94,32 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('project.project.project'), label: this.$t('project.project.project'),
prop: 'name', prop: 'name',
show: true, show: true,
minWidth: 150 minWidth: 150,
sortable:'custom'
}, { }, {
label: this.$t('project.module.module'), label: this.$t('project.module.module'),
prop: 'moduleNum', prop: 'moduleNum',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, { }, {
label: this.$t('project.endpoint.endpoint'), label: this.$t('project.endpoint.endpoint'),
prop: 'endpointNum', prop: 'endpointNum',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, { }, {
label: this.$t('project.endpoint.alerts'), label: this.$t('project.endpoint.alerts'),
prop: 'alertNum', prop: 'alertNum',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, },
{ {
label: this.$t('overall.remark'), label: this.$t('overall.remark'),

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
class="data-column" class="data-column"
> >
@@ -79,11 +80,13 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.roles.name'), label: this.$t('config.roles.name'),
prop: 'name', prop: 'name',
show: true show: true,
sortable:'custom'
}, { }, {
label: this.$t('config.roles.description'), label: this.$t('config.roles.description'),
prop: 'remark', prop: 'remark',

View File

@@ -25,6 +25,7 @@
:prop="item.prop" :prop="item.prop"
:resizable="true" :resizable="true"
:sort-orders="['ascending', 'descending']" :sort-orders="['ascending', 'descending']"
:sortable="item.sortable"
:width="`${item.width}`" :width="`${item.width}`"
> >
<template slot="header"> <template slot="header">
@@ -87,12 +88,14 @@ export default {
label: 'ID', label: 'ID',
prop: 'id', prop: 'id',
show: true, show: true,
width: 80 width: 80,
sortable:'custom'
}, { }, {
label: this.$t('config.user.name'), label: this.$t('config.user.name'),
prop: 'name', prop: 'name',
show: true, show: true,
width: 150 width: 150,
sortable:'custom'
}, { }, {
label: this.$t('config.user.username'), label: this.$t('config.user.username'),
prop: 'username', prop: 'username',

View File

@@ -23,14 +23,15 @@
</div> </div>
</el-dropdown> </el-dropdown>
<el-dropdown> <el-dropdown>
<div class="header-menu__item"><i class="nz-icon nz-icon-create-square"></i></div> <div class="header-menu__item" @click="centerDialogVisible = true"><i class="nz-icon nz-icon-guide"></i></div>
<el-dropdown-menu slot="dropdown"> <!-- <el-dialog
<el-dropdown-item v-for="(item, createIndex) in createMenu" :key="createIndex" v-has="item.permission" :index="`${createIndex}`"> title="Get started in 6 steps"
<div :id="'create-box-'+createIndex"> :visible.sync="centerDialogVisible"
<span>{{item.label}}</span> :show="centerDialogVisible"
</div> center>
</el-dropdown-item> <path-navigation></path-navigation>
</el-dropdown-menu> </el-dialog> -->
<path-navigation :show.sync="centerDialogVisible"></path-navigation>
</el-dropdown> </el-dropdown>
</div> </div>
<!--个人操作--> <!--个人操作-->
@@ -68,10 +69,12 @@
import bus from '../../libs/bus' import bus from '../../libs/bus'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import changePin from '../page/config/changePin' import changePin from '../page/config/changePin'
import PathNavigation from './path_navigation/PathNavigation'
export default { export default {
name: 'Header', name: 'Header',
components: { components: {
'change-password': changePin, 'change-password': changePin,
PathNavigation
}, },
data () { data () {
return { return {
@@ -111,7 +114,8 @@ export default {
permission: 'header_add_rule' permission: 'header_add_rule'
} }
], ],
showChangePin: false showChangePin: false,
centerDialogVisible: false
} }
}, },
methods: { methods: {
@@ -239,6 +243,22 @@ export default {
text-align: center; text-align: center;
height: 36px; height: 36px;
line-height: 50px; line-height: 50px;
.el-dialog{
width: 1000px;
height: 70px;
.el-dialog__header{
background-color: orange;
.el-dialog__title{
color: #fff;
}
.el-dialog__close{
color: #fff;
line-height: 50px;
font-size: 30px;
}
}
}
} }
} }
.header-menu--item { .header-menu--item {

View File

@@ -0,0 +1,172 @@
<template>
<div class="navigation">
<el-dialog title="Get started in 6 steps" :visible.sync="show" center>
<el-tabs type="border-card">
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-datacenter1"></i> 我的行程</span
>
<div style="margin-top: 0">
1sadssssssssssssssssssssssasddddddddddddddddddddddddddddddddddddsdsadasdasdasdasdasdasdasdassssssssssssssssssssssssssssssssssssssssssddddd
</div>
<div style="margin-top: 0">
1sadssssssssssssssssssssssasddddddddddddddddddddddddddddddddddddsdasdassssssssssssssssssssssssssssssssssssssssssddddd
</div>
<el-button @click="addDatacenter">add a</el-button>
<el-button @click="addCabinet">add b</el-button>
</el-tab-pane>
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-agent"></i> 我的行程</span
>
<div>1</div>
<el-button @click="addAgent">add a</el-button>
<el-button @click="downloadAgent">add b</el-button>
</el-tab-pane>
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-menu-assets"></i> 我的行程</span
>
<div>1</div>
<el-button @click="addAsset">add a</el-button>
<el-button @click="importAsset">add b</el-button>
<el-button @click="webTerminal">add c</el-button>
</el-tab-pane>
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-menu-project"></i> 我的行程</span
>
<div>1</div>
<el-button @click="addPeoject">add a</el-button>
<el-button @click="addModule">add b</el-button>
<el-button @click="addEndpoint">add c</el-button>
<el-button @click="importEndpoint">add d</el-button>
</el-tab-pane>
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-visualization"></i> 我的行程</span
>
<div>1</div>
<el-button @click="addPanel">add a</el-button>
<el-button @click="addChart">add b</el-button>
</el-tab-pane>
<el-tab-pane>
<span slot="label"
><i class="nz-icon nz-icon-terminal-log"></i> 我的行程</span
>
<div>1</div>
<el-button @click="addAlertRule">add a</el-button>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<script>
import DcBox from "@/components/common/rightBox/dcBox";
export default {
props: {
show: Boolean,
},
components: {
DcBox
},
data() {
return {};
},
methods: {
// Datacenter
addDatacenter() {
this.$router.push({
path: "/dc",
});
this.$emit("update:show", false);
},
addCabinet() {
console.log(2);
console.log(this.$route);
this.$router.push({
path: "/dc/cabinet",
});
this.$emit("update:show", false);
},
// Angebt
addAgent() {
this.$router.push({
path: "/agent",
});
this.$emit("update:show", false);
},
downloadAgent() {
console.log(4);
},
// Asset
addAsset() {
this.$router.push({
path: "/asset",
});
this.$emit("update:show", false);
},
importAsset() {
console.log(6);
},
webTerminal() {
console.log(7);
},
// Monitor
addPeoject() {
this.$router.push({
path: "/monitor/project",
});
this.$emit("update:show", false);
},
addModule() {
console.log(9);
},
addEndpoint() {
console.log(10);
},
importEndpoint() {
console.log(11);
},
// Visualization
addPanel() {
this.$router.push({
path: "/panel",
});
this.$emit("update:show", false);
},
addChart() {
console.log(13);
},
// Alert
addAlertRule() {
this.$router.push({
path: "/alertRule",
});
this.$emit("update:show", false);
},
},
computed: {},
};
</script>
<style lang="scss">
.el-dialog__body {
background-color: #fff;
.el-tab-pane {
text-align: center;
div {
text-align: left;
line-height: 20px;
}
.el-button {
width: 156px;
height: 46px;
border-radius: 2px;
background-color: #666;
span {
color: #fff;
}
}
}
}
</style>

View File

@@ -363,6 +363,7 @@ export default {
delete this.searchLabel.endAt delete this.searchLabel.endAt
} }
this.tools.loading = true this.tools.loading = true
console.log(this.searchLabel)
this.$get(this.url, this.searchLabel).then(response => { this.$get(this.url, this.searchLabel).then(response => {
this.tools.loading = false this.tools.loading = false
if (response.code == 200) { if (response.code == 200) {
@@ -579,19 +580,6 @@ export default {
} }
this.getTableData() this.getTableData()
}, },
// 数据排序
tableDataSort (item) {
let orderBy = ''
if (item.order === 'ascending') {
orderBy = item.prop
}
if (item.order === 'descending') {
orderBy = '-' + item.prop
}
this.pageObj.orderBy = orderBy
this.$set(this.searchLabel, 'orderBy', orderBy)
this.getTableData()
}
} }
} }
</script> </script>