2020-02-06 12:04:41 +08:00
|
|
|
|
<style lang="scss">
|
2020-05-31 22:33:16 +08:00
|
|
|
|
@import '../../charts/chart';
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2020-03-17 17:14:07 +08:00
|
|
|
|
.project-calendar .el-input__inner {
|
2020-11-10 14:11:29 +08:00
|
|
|
|
height: 24px;
|
2020-03-17 17:14:07 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2020-02-17 16:32:40 +08:00
|
|
|
|
.change-time-height {
|
|
|
|
|
|
height: 23px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2020-02-17 16:32:40 +08:00
|
|
|
|
.date-pick-group {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2020-02-17 16:32:40 +08:00
|
|
|
|
.date-pick-group button:first-of-type {
|
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2020-02-17 16:32:40 +08:00
|
|
|
|
.date-pick-group button:last-of-type {
|
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
}
|
2020-02-10 16:50:34 +08:00
|
|
|
|
</style>
|
2019-11-29 15:00:26 +08:00
|
|
|
|
<template>
|
2019-12-10 17:00:28 +08:00
|
|
|
|
<div class="project">
|
2020-08-03 20:12:20 +08:00
|
|
|
|
<template v-if="pageType == 'endpoint'">
|
2020-07-24 19:22:52 +08:00
|
|
|
|
<div class="main-list" :class="{'main-list-with-sub': bottomBox.showSubList}">
|
|
|
|
|
|
<div class="main-modal"></div>
|
|
|
|
|
|
<div class="top-tools" v-show="bottomBox.mainResizeShow">
|
|
|
|
|
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<div class="top-tool-search">
|
|
|
|
|
|
<search-input :searchMsg="endpointSearchMsg" @search="endpointSearch" ref="projectSearch"></search-input>
|
|
|
|
|
|
</div>
|
2020-03-18 16:00:06 +08:00
|
|
|
|
<export-excel
|
2021-02-04 11:21:00 +08:00
|
|
|
|
id="endpoint-list"
|
2020-03-18 16:00:06 +08:00
|
|
|
|
export-file-name="endpoint"
|
|
|
|
|
|
export-url="/endpoint/export"
|
2020-05-08 16:10:04 +08:00
|
|
|
|
import-url="/endpoint/import"
|
2020-03-18 16:00:06 +08:00
|
|
|
|
:params="endpointSearchLabel"
|
2020-12-08 21:53:37 +08:00
|
|
|
|
:permissions="{import: 'project_endpoint_import', export: 'project_endpoint_export'}"
|
2020-10-13 18:13:29 +08:00
|
|
|
|
@afterImport="afterCloseImport"
|
2020-03-18 20:38:16 +08:00
|
|
|
|
class="margin-l-20"
|
|
|
|
|
|
>
|
2020-03-18 16:00:06 +08:00
|
|
|
|
<template slot="optionZone">
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<button :title="$t('overall.createEndpoint')" @click.stop="addEndpoint" v-has="'project_endpoint_toAdd'"
|
2020-11-10 14:11:29 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="project-create-project">
|
2020-05-15 17:52:17 +08:00
|
|
|
|
<i class="nz-icon nz-icon-create-square"></i>
|
|
|
|
|
|
</button>
|
2020-03-18 16:00:06 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</export-excel>
|
2020-12-31 17:41:40 +08:00
|
|
|
|
<delete-button :delete-objs="batchDeleteObjs" @after="afterCloseImport" @before="delFlag=true" api="endpoint" v-has="'project_endpoint_delete'"></delete-button>
|
2020-03-18 16:00:06 +08:00
|
|
|
|
</div>
|
2020-03-20 21:05:31 +08:00
|
|
|
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
2020-03-18 16:00:06 +08:00
|
|
|
|
</div>
|
2020-08-04 21:53:06 +08:00
|
|
|
|
<!-- 自定义table列 -->
|
|
|
|
|
|
<transition name="el-zoom-in-top">
|
|
|
|
|
|
<element-set
|
2021-02-04 11:21:00 +08:00
|
|
|
|
id="endpoint-list"
|
2020-08-04 21:53:06 +08:00
|
|
|
|
v-if="tools.showCustomTableTitle"
|
|
|
|
|
|
@close="tools.showCustomTableTitle = false"
|
|
|
|
|
|
:custom-table-title.sync="tools.customTableTitle"
|
|
|
|
|
|
:original-table-title="tableTitle"
|
|
|
|
|
|
ref="customTableTitle"
|
|
|
|
|
|
></element-set>
|
|
|
|
|
|
</transition>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<el-table
|
2021-02-04 11:21:00 +08:00
|
|
|
|
id="endpoint-list-table"
|
2020-03-16 15:38:03 +08:00
|
|
|
|
:data="endpointTableData"
|
|
|
|
|
|
border
|
|
|
|
|
|
class="nz-table endpoint-table"
|
2020-03-18 16:00:06 +08:00
|
|
|
|
:height="mainTableHeight"
|
2020-07-24 19:22:52 +08:00
|
|
|
|
v-show="bottomBox.mainResizeShow"
|
2020-03-16 15:38:03 +08:00
|
|
|
|
ref="endpointTable"
|
2020-09-25 15:33:02 +08:00
|
|
|
|
:cell-class-name="messageStyle"
|
2020-07-24 19:22:52 +08:00
|
|
|
|
v-loading="tools.loading"
|
2020-07-15 18:32:25 +08:00
|
|
|
|
style="width: 100%;"
|
|
|
|
|
|
@sort-change="tableDataSort"
|
2020-09-24 11:38:13 +08:00
|
|
|
|
@row-dblclick="detailEndpoint"
|
2020-10-29 19:11:46 +08:00
|
|
|
|
@selection-change="(selection)=>{this.batchDeleteObjs=selection}"
|
2020-11-04 15:38:34 +08:00
|
|
|
|
@header-dragend="()=>{this.$refs.endpointTable.doLayout();}"
|
2020-07-15 18:32:25 +08:00
|
|
|
|
>
|
2020-10-29 19:11:46 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
:resizable="false"
|
|
|
|
|
|
type="selection"
|
|
|
|
|
|
width="40"
|
|
|
|
|
|
align="center">
|
|
|
|
|
|
</el-table-column>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<el-table-column
|
2020-11-04 15:38:34 +08:00
|
|
|
|
:resizable="true"
|
2020-08-04 21:53:06 +08:00
|
|
|
|
v-for="(item, index) in tools.customTableTitle"
|
2020-03-16 15:38:03 +08:00
|
|
|
|
v-if="item.show"
|
|
|
|
|
|
:key="`col-${index}`"
|
|
|
|
|
|
:label="item.label"
|
2020-11-12 10:11:18 +08:00
|
|
|
|
:min-width="item.width || item.minWidth"
|
2020-08-07 11:11:43 +08:00
|
|
|
|
:sortable="$tableSet.sortableShow(item.prop,'project')"
|
|
|
|
|
|
:prop="$tableSet.propTitle(item.prop,'project')"
|
2020-07-28 11:45:37 +08:00
|
|
|
|
:sort-orders="['ascending', 'descending']"
|
2020-03-16 15:38:03 +08:00
|
|
|
|
>
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<template slot-scope="scope" :column="item">
|
2020-10-29 16:05:19 +08:00
|
|
|
|
<span v-if="item.prop == 'asset' && scope.row[item.prop]" class="link" @click="detailEndpoint(scope.row)">
|
|
|
|
|
|
{{scope.row[item.prop].sn}} :
|
|
|
|
|
|
({{scope.row[item.prop].host}})
|
|
|
|
|
|
</span>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<span v-else-if="item.prop == 'param'">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<template v-if="scope.row.paramObj">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span v-for="(p,i) in scope.row.paramObj">{{p.key}}={{p.value}}<span
|
|
|
|
|
|
v-if="i < scope.row.paramObj.length-1">,</span></span>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else>-</template>
|
|
|
|
|
|
</span>
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span v-else-if="item.prop == 'labels'">
|
|
|
|
|
|
<template v-if="scope.row.labelModule">
|
|
|
|
|
|
<span v-for="(p,i) in scope.row.labelModule">{{p.key}}={{p.value}}<span
|
|
|
|
|
|
v-if="i < scope.row.labelModule.length-1">,</span></span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else>-</template>
|
|
|
|
|
|
</span>
|
2020-09-25 15:33:02 +08:00
|
|
|
|
<template v-else-if="item.prop=='alerts'">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<el-tooltip :content="scope.row.alertNum+' '+$t('overall.active')" placement="top" effect="light"
|
|
|
|
|
|
:disabled=" scope.row.alertNum < 99">
|
2020-09-25 15:33:02 +08:00
|
|
|
|
<span :id="'endpoint-alerts-'+scope.row.id" @click="jumpToAlertMsg(scope.row)" class="link">
|
|
|
|
|
|
{{(scope.row.alertNum < 99 ? scope.row.alertNum : 99)}}
|
|
|
|
|
|
<sup class="linkSup" v-if="scope.row.alertNum > 99">+</sup>
|
|
|
|
|
|
{{' ' + $t('overall.active')}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</template>
|
2020-05-12 11:54:35 +08:00
|
|
|
|
<template v-else-if="item.prop == 'type'">{{currentModule.type}}</template>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<div v-else-if="item.prop == 'option'" class="content-right-options">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span :title="$t('overall.view')" @click="detailEndpoint(scope.row)" class="content-right-option"
|
|
|
|
|
|
:id="'edp-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span :title="$t('overall.query')" @click="query(scope.row)" class="content-right-option"
|
|
|
|
|
|
:id="'edp-query-'+scope.row.id"><i class="nz-icon nz-icon-search"></i></span>
|
2020-06-11 20:18:33 +08:00
|
|
|
|
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<span :title="$t('overall.edit')" @click="editEndpoint(scope.row)" class="content-right-option" v-has="'project_endpoint_toEdit'"
|
2020-11-10 14:11:29 +08:00
|
|
|
|
:id="'edp-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
2020-10-14 12:23:40 +08:00
|
|
|
|
|
2020-12-08 21:53:37 +08:00
|
|
|
|
<span :title="$t('overall.delete')" @click.stop="delEndpoint(scope.row)" class="content-right-option" v-has="'project_endpoint_delete'"
|
2020-11-10 14:11:29 +08:00
|
|
|
|
:id="'asset-del-'+scope.row.id"><i class="nz-icon nz-icon-delete"></i></span>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
</div>
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span v-else-if="item.prop == 'state'">
|
|
|
|
|
|
<el-popover placement="right" width="50" trigger="hover"
|
|
|
|
|
|
:popper-class="scope.row.state == '1'?'small-pop':''">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<div slot="reference" style="width: 20px">
|
2020-11-22 18:26:12 +08:00
|
|
|
|
<div :class="{'active-icon green':scope.row.state == '1', 'active-icon red':scope.row.state == '0', 'active-icon gray':scope.row.state == '2'}"></div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</div>
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<div v-if="scope.row.state == '1'">up</div>
|
2020-11-22 18:26:12 +08:00
|
|
|
|
<div v-else-if="scope.row.state == '0'">down:<br/>{{getStateErrorMsg(scope.row)}}</div>
|
|
|
|
|
|
<div v-else-if="scope.row.state == '2'">suspended</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-popover>
|
|
|
|
|
|
</span>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
|
|
|
|
|
|
<template v-else>-</template>
|
2020-02-26 15:38:56 +08:00
|
|
|
|
</template>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
</el-table-column>
|
2020-11-04 15:38:34 +08:00
|
|
|
|
<el-table-column width="28" :resizable="true">
|
2020-03-16 15:38:03 +08:00
|
|
|
|
<template slot="header" slot-scope="scope">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<span @mousedown.stop="!tools.showCustomTableTitle && (tools.showCustomTableTitle = true)"
|
|
|
|
|
|
class="nz-table-gear">
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<i class="nz-icon nz-icon-gear"></i>
|
|
|
|
|
|
</span>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
</template>
|
2020-04-21 18:00:21 +08:00
|
|
|
|
<template v-slot="scope">
|
|
|
|
|
|
</template>
|
2020-03-16 15:38:03 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2021-02-04 11:21:00 +08:00
|
|
|
|
<button class="to-top" :style="{top: tools.toTopBtnTop}" id="endpoint-list-totop"
|
2020-11-21 15:33:40 +08:00
|
|
|
|
:class="{'to-top-is-hover': tools.tableHover}"
|
2020-12-15 21:13:07 +08:00
|
|
|
|
@click="toTop(scrollbarWrap)" v-show="tools.showTopBtn && bottomBox.mainResizeShow"><i
|
2020-11-21 15:33:40 +08:00
|
|
|
|
class="nz-icon nz-icon-top"></i></button>
|
2020-07-24 19:22:52 +08:00
|
|
|
|
<div class="pagination-bottom" v-show="!bottomBox.showSubList">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<Pagination :tableId="tableId" v-cloak :pageObj="endpointPageObj" @pageNo='endpointPageNo'
|
|
|
|
|
|
@pageSize='endpointPageSize' ref="endpointPagination"></Pagination>
|
2020-03-20 14:36:28 +08:00
|
|
|
|
</div>
|
2020-02-04 18:52:09 +08:00
|
|
|
|
</div>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</template>
|
2020-08-03 20:12:20 +08:00
|
|
|
|
<template v-else-if="pageType == 'project'">
|
2020-08-19 11:44:26 +08:00
|
|
|
|
<!--<panel-tab from="project" :obj="currentProject" targetTab.sync="panel"></panel-tab>-->
|
2021-01-29 19:09:21 +08:00
|
|
|
|
<!--<facade :obj="currentProject" targetTab.sync="panel" ref="facade" v-if="reloadFacade"/>-->
|
|
|
|
|
|
<topologyL5 :obj="currentProject" targetTab.sync="panel" ref="facade" v-if="reloadFacade"/>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</template>
|
2020-08-04 21:53:06 +08:00
|
|
|
|
|
2020-08-02 22:43:53 +08:00
|
|
|
|
<transition name="el-zoom-in-bottom">
|
2020-09-25 15:33:02 +08:00
|
|
|
|
<bottom-box v-if="bottomBox.showSubList"
|
|
|
|
|
|
:sub-resize-show="bottomBox.subResizeShow"
|
|
|
|
|
|
:is-full-screen="bottomBox.isFullScreen"
|
2020-12-08 21:53:37 +08:00
|
|
|
|
:from="$CONSTANTS.fromRoute.endpoint"
|
2020-09-25 15:33:02 +08:00
|
|
|
|
:target-tab.sync="bottomBox.targetTab"
|
|
|
|
|
|
:detail="bottomBox.endpointDetail"
|
|
|
|
|
|
:obj="endpoint"
|
|
|
|
|
|
:detail-list="bottomBox.alertList"
|
|
|
|
|
|
:asset-detail="bottomBox.assetDetail"
|
|
|
|
|
|
@closeSubList="bottomBox.showSubList = false"
|
|
|
|
|
|
@fullScreen="fullScreen"
|
|
|
|
|
|
@exitFullScreen="exitFullScreen"
|
2020-11-10 14:11:29 +08:00
|
|
|
|
@listResize="listResize"></bottom-box>
|
2020-08-02 22:43:53 +08:00
|
|
|
|
</transition>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
<transition name="right-box">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<add-endpoint-box v-if="rightBox.addEndpoint.show" :current-project="currentProject"
|
|
|
|
|
|
:current-module="currentModule" @close="closeAddEndpointRightBox"
|
|
|
|
|
|
ref="addEndpointBox"></add-endpoint-box>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
</transition>
|
|
|
|
|
|
<transition name="right-box">
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<edit-endpoint-box v-if="rightBox.editEndpoint.show" :project="currentProject" :module="currentModule"
|
|
|
|
|
|
:endpoint="endpoint" @close="closeEditEndpointRightBox"
|
|
|
|
|
|
ref="editEndpointBox"></edit-endpoint-box>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
</transition>
|
2019-12-10 17:00:28 +08:00
|
|
|
|
</div>
|
2019-11-29 15:00:26 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-02-26 15:38:56 +08:00
|
|
|
|
import exportXLSX from "../../common/exportXLSX";
|
2020-03-11 18:48:05 +08:00
|
|
|
|
import loading from "../../common/loading";
|
2020-05-20 19:30:22 +08:00
|
|
|
|
import panelTab from '../../common/bottomBox/tabs/panelTab'
|
2020-08-02 22:43:53 +08:00
|
|
|
|
import bus from '../../../libs/bus'
|
2020-08-19 11:44:26 +08:00
|
|
|
|
import facade from '@/components/common/project/projectFacade'
|
2021-01-29 19:09:21 +08:00
|
|
|
|
import topologyL5 from '@/components/common/project/topologyL5'
|
2020-10-29 19:11:46 +08:00
|
|
|
|
import deleteButton from "../../common/deleteButton";
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
export default {
|
2020-11-10 14:11:29 +08:00
|
|
|
|
name:"project2",
|
|
|
|
|
|
components:{
|
2020-03-11 18:48:05 +08:00
|
|
|
|
'export-excel':exportXLSX,
|
2020-11-10 14:11:29 +08:00
|
|
|
|
'loading':loading,
|
|
|
|
|
|
'panel-tab':panelTab,
|
2020-08-19 11:44:26 +08:00
|
|
|
|
facade,
|
2021-01-29 19:09:21 +08:00
|
|
|
|
topologyL5,
|
2020-10-29 19:11:46 +08:00
|
|
|
|
'delete-button':deleteButton,
|
2020-02-10 16:50:34 +08:00
|
|
|
|
},
|
2021-01-13 18:58:50 +08:00
|
|
|
|
computed:{
|
|
|
|
|
|
currentProjectChange() {
|
|
|
|
|
|
return this.$store.state.currentProject;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
data(){
|
2019-12-25 20:33:58 +08:00
|
|
|
|
return {
|
2020-11-10 14:11:29 +08:00
|
|
|
|
rightBox:{
|
|
|
|
|
|
module:{show:false},
|
|
|
|
|
|
addEndpoint:{show:false},
|
|
|
|
|
|
editEndpoint:{show:false},
|
2020-07-28 19:42:25 +08:00
|
|
|
|
},
|
2020-07-24 19:22:52 +08:00
|
|
|
|
/*二级页面相关*/
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bottomBox:{
|
|
|
|
|
|
endpoint:{}, //asset详情
|
|
|
|
|
|
endpointDetail:null,
|
|
|
|
|
|
mainResizeShow:true, //dom高度改变时部分内容是否展示
|
|
|
|
|
|
subResizeShow:true,
|
|
|
|
|
|
isFullScreen:false, //是否是全屏,用来控制拖动条是否展示,
|
|
|
|
|
|
showSubList:false,
|
|
|
|
|
|
targetTab:'',
|
2020-07-24 19:22:52 +08:00
|
|
|
|
},
|
2020-07-28 19:42:25 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
mainTableHeight:this.$tableHeight.normal, //主列表table高度
|
|
|
|
|
|
ready:false,
|
2020-07-24 19:22:52 +08:00
|
|
|
|
|
|
|
|
|
|
/*工具参数*/
|
2020-11-10 14:11:29 +08:00
|
|
|
|
tools:{
|
|
|
|
|
|
loading:false, //是否显示table加载动画
|
|
|
|
|
|
toTopBtnTop:this.$tableHeight.toTopBtnTop, //to-top按钮的top属性
|
|
|
|
|
|
tableHover:false, //控制滚动条和top按钮同时出现
|
|
|
|
|
|
showTopBtn:false, //显示To top按钮
|
|
|
|
|
|
showCustomTableTitle:false, //自定义列弹框是否显示
|
|
|
|
|
|
customTableTitle:[], //自定义列工具的数据
|
2020-07-24 19:22:52 +08:00
|
|
|
|
},
|
2020-10-29 19:11:46 +08:00
|
|
|
|
batchDeleteObjs:[],
|
2020-07-28 19:42:25 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
tableId:'projectTable', //需要分页的table的id,用于记录每页数量
|
|
|
|
|
|
userData:[],
|
2020-07-24 19:22:52 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpoint:{
|
|
|
|
|
|
id:'',
|
|
|
|
|
|
host:'',
|
|
|
|
|
|
port:'',
|
|
|
|
|
|
param:'',
|
|
|
|
|
|
path:'',
|
|
|
|
|
|
asset:{},
|
|
|
|
|
|
project:{},
|
|
|
|
|
|
module:{},
|
|
|
|
|
|
moduleId:'',
|
|
|
|
|
|
assetId:'',
|
|
|
|
|
|
paramObj:[]
|
|
|
|
|
|
},
|
|
|
|
|
|
tableTitle:[
|
2019-12-25 20:33:58 +08:00
|
|
|
|
{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.endpointId"),
|
|
|
|
|
|
prop:'id',
|
|
|
|
|
|
show:true,
|
|
|
|
|
|
width:150
|
2020-01-08 22:19:46 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.asset"),
|
|
|
|
|
|
prop:'asset',
|
|
|
|
|
|
show:true,
|
2020-11-12 10:11:18 +08:00
|
|
|
|
minWidth:400,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.host"),
|
|
|
|
|
|
prop:'host',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:43:49 +08:00
|
|
|
|
width:200,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.port"),
|
|
|
|
|
|
prop:'port',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:05:19 +08:00
|
|
|
|
width:100,
|
2020-05-12 11:54:35 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("overall.type"),
|
|
|
|
|
|
prop:'type',
|
|
|
|
|
|
show:false,
|
|
|
|
|
|
width:200,
|
|
|
|
|
|
},{
|
|
|
|
|
|
label:this.$t("project.endpoint.labels"),
|
|
|
|
|
|
prop:'labels',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:43:49 +08:00
|
|
|
|
width:200,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.param"),
|
|
|
|
|
|
prop:'param',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:43:49 +08:00
|
|
|
|
width:200,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.path"),
|
|
|
|
|
|
prop:'path',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:43:49 +08:00
|
|
|
|
width:200,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("alert.list.state"),
|
|
|
|
|
|
prop:'state',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:05:19 +08:00
|
|
|
|
width:80,
|
2020-09-27 17:08:58 +08:00
|
|
|
|
},{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t("project.endpoint.alerts"),
|
|
|
|
|
|
prop:'alerts',
|
|
|
|
|
|
show:true,
|
2020-10-29 16:43:49 +08:00
|
|
|
|
width:150,
|
2020-03-09 08:41:21 +08:00
|
|
|
|
},
|
2020-04-17 13:58:00 +08:00
|
|
|
|
// {
|
|
|
|
|
|
// label: this.$t("project.endpoint.lastUpdate"),
|
|
|
|
|
|
// prop: 'lastUpdate',
|
|
|
|
|
|
// show: true,
|
|
|
|
|
|
// },
|
2020-03-09 08:41:21 +08:00
|
|
|
|
{
|
2020-11-10 14:11:29 +08:00
|
|
|
|
label:this.$t('config.account.option'),
|
|
|
|
|
|
prop:'option',
|
|
|
|
|
|
show:true,
|
|
|
|
|
|
width:120
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpointTableData:[],
|
|
|
|
|
|
endpointPageObj:{
|
2020-12-17 11:07:57 +08:00
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: this.$CONSTANTS.defaultPageSize,
|
|
|
|
|
|
total: 0
|
2019-12-10 17:00:28 +08:00
|
|
|
|
},
|
2020-07-24 19:22:52 +08:00
|
|
|
|
|
2020-04-16 19:25:29 +08:00
|
|
|
|
currentProjectTitle:'',
|
2020-11-10 14:11:29 +08:00
|
|
|
|
moduleList:[],
|
|
|
|
|
|
projectList:[],
|
|
|
|
|
|
pageType:'project', //project endpoint
|
|
|
|
|
|
currentProject:{id:'',name:'',remark:''}, //endpoint弹框、module列表用来回显project
|
|
|
|
|
|
module:{}, //编辑的module
|
|
|
|
|
|
blankModule:{id:'',type:'',name:'',project:{},port:'',path:'',param:'',paramObj:[],snmpParam:''}, //空白module
|
|
|
|
|
|
currentModule:{id:'',type:'',name:'',project:{},port:'',path:'',param:'',paramObj:[],snmpParam:''}, //用来回显的module
|
|
|
|
|
|
endpointSearchLabel:{moduleId:''}, //endpoint搜索参数
|
|
|
|
|
|
endpointSearchMsg:{ //给搜索框子组件传递的信息
|
|
|
|
|
|
zheze_none:true,
|
|
|
|
|
|
searchLabelList:[{
|
|
|
|
|
|
id:1,
|
|
|
|
|
|
name:"ID",
|
|
|
|
|
|
type:'input',
|
|
|
|
|
|
label:'id',
|
|
|
|
|
|
disabled:false
|
|
|
|
|
|
},{
|
|
|
|
|
|
id:11,
|
|
|
|
|
|
name:this.$t('asset.asset'),
|
2020-10-29 16:05:19 +08:00
|
|
|
|
// name: this.$t('asset.asset'),
|
2020-11-10 14:11:29 +08:00
|
|
|
|
type:'query',
|
|
|
|
|
|
label:'query',
|
|
|
|
|
|
disabled:false
|
2020-11-17 16:41:52 +08:00
|
|
|
|
},{
|
|
|
|
|
|
id:33,
|
|
|
|
|
|
name:this.$t('asset.state'),
|
|
|
|
|
|
// name: this.$t('asset.asset'),
|
2020-11-22 19:24:24 +08:00
|
|
|
|
type:'select',
|
|
|
|
|
|
label:'endpointState',
|
2020-11-17 16:41:52 +08:00
|
|
|
|
disabled:false,
|
|
|
|
|
|
readonly:true,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}],
|
2019-12-13 17:08:35 +08:00
|
|
|
|
},
|
2020-12-31 17:41:40 +08:00
|
|
|
|
scrollbarWrap: null,
|
|
|
|
|
|
delFlag:false,
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}
|
2019-12-11 17:15:23 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
methods:{
|
2020-03-30 14:14:09 +08:00
|
|
|
|
// 全屏
|
2020-11-10 14:11:29 +08:00
|
|
|
|
fullScreen(){
|
|
|
|
|
|
let vm=this;
|
2020-03-30 14:14:09 +08:00
|
|
|
|
this.$bottomBoxWindow.fullScreen(vm);
|
2020-03-17 17:14:07 +08:00
|
|
|
|
},
|
2020-03-30 14:14:09 +08:00
|
|
|
|
// 退出全屏
|
2020-11-10 14:11:29 +08:00
|
|
|
|
exitFullScreen(){
|
|
|
|
|
|
let vm=this;
|
2020-03-30 14:14:09 +08:00
|
|
|
|
this.$bottomBoxWindow.exitFullScreen(vm);
|
2020-03-17 17:14:07 +08:00
|
|
|
|
},
|
2020-03-30 14:14:09 +08:00
|
|
|
|
// 鼠标拖动二级列表
|
2020-11-10 14:11:29 +08:00
|
|
|
|
listResize(e){
|
|
|
|
|
|
let vm=this;
|
|
|
|
|
|
this.$bottomBoxWindow.listResize(vm,e);
|
2020-03-17 17:14:07 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getEndpointTableData(){
|
|
|
|
|
|
if(this.currentModule&&this.currentModule.id){
|
|
|
|
|
|
this.pageType='endpoint';
|
|
|
|
|
|
this.endpointSearchLabel.moduleId=this.currentModule.id;
|
|
|
|
|
|
this.$set(this.endpointSearchLabel,'pageNo',this.endpointPageObj.pageNo);
|
|
|
|
|
|
this.$set(this.endpointSearchLabel,'pageSize',this.endpointPageObj.pageSize);
|
|
|
|
|
|
this.tools.loading=true;
|
|
|
|
|
|
this.$get('endpoint',this.endpointSearchLabel).then(response=>{
|
|
|
|
|
|
this.tools.loading=false;
|
|
|
|
|
|
if(response.code===200){
|
|
|
|
|
|
for(let i=0; i<response.data.list.length; i++){
|
|
|
|
|
|
try{
|
2020-11-10 15:57:57 +08:00
|
|
|
|
let param=response.data.list[i].param || '{}'
|
|
|
|
|
|
let tempObj=JSON.parse(param);
|
|
|
|
|
|
let labels=response.data.list[i].labels|| '{}';
|
|
|
|
|
|
let tempObj1=JSON.parse(labels);
|
2020-11-10 14:11:29 +08:00
|
|
|
|
response.data.list[i].paramObj=[];
|
|
|
|
|
|
response.data.list[i].labelModule=[];
|
|
|
|
|
|
for(let k in tempObj){
|
|
|
|
|
|
response.data.list[i].paramObj.push({key:k,value:tempObj[k]})
|
|
|
|
|
|
}
|
|
|
|
|
|
for(let k in tempObj1){
|
|
|
|
|
|
response.data.list[i].labelModule.push({key:k,value:tempObj1[k]})
|
2020-04-17 12:48:46 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}catch(err){
|
2020-11-10 15:57:57 +08:00
|
|
|
|
// console.error(response.data.list[i], err);
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.endpointTableData=response.data.list;
|
|
|
|
|
|
this.endpointPageObj.total=response.data.total;
|
2020-12-15 21:13:07 +08:00
|
|
|
|
if (!this.scrollbarWrap) {
|
2020-12-14 20:25:24 +08:00
|
|
|
|
this.$nextTick(() => {
|
2020-12-15 21:13:07 +08:00
|
|
|
|
this.scrollbarWrap = this.$refs.endpointTable.bodyWrapper;
|
|
|
|
|
|
this.toTopBtnHandler(this.scrollbarWrap);
|
2020-12-14 20:25:24 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
2019-12-11 17:15:23 +08:00
|
|
|
|
}
|
2020-04-17 12:48:46 +08:00
|
|
|
|
});
|
|
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},
|
2020-10-13 18:13:29 +08:00
|
|
|
|
afterCloseImport:function(){
|
|
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
bus.$emit('module-list-change')
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpointPageNo(val){
|
|
|
|
|
|
this.endpointPageObj.pageNo=val;
|
2019-12-25 20:33:58 +08:00
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpointPageSize(val){
|
|
|
|
|
|
this.endpointPageObj.pageSize=val;
|
|
|
|
|
|
localStorage.setItem('nz-pageSize-'+localStorage.getItem('nz-username')+'-'+this.tableId,val);
|
2019-12-25 20:33:58 +08:00
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getProjectList(){
|
|
|
|
|
|
this.$get('project',{pageSize:-1}).then(response=>{
|
|
|
|
|
|
if(response.code==200){
|
|
|
|
|
|
this.projectList=response.data.list;
|
2020-04-16 19:25:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getProjectModule(projectId){
|
|
|
|
|
|
let moduleList=JSON.parse(JSON.stringify(this.moduleList));
|
|
|
|
|
|
return moduleList.filter((item,index)=>{
|
|
|
|
|
|
return item.project.id==projectId;
|
2020-04-16 19:25:29 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
detailProject(project){
|
|
|
|
|
|
this.pageType='project';
|
|
|
|
|
|
if(project){
|
|
|
|
|
|
this.currentProject=project;
|
|
|
|
|
|
this.currentProjectTitle=project.id+"";
|
2020-07-28 19:42:25 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.currentModule={};
|
2020-07-28 19:42:25 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
closeAddEndpointRightBox(refresh){
|
|
|
|
|
|
this.rightBox.addEndpoint.show=false;
|
|
|
|
|
|
if(refresh){
|
2020-07-28 19:42:25 +08:00
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
closeEditEndpointRightBox(refresh){
|
|
|
|
|
|
this.rightBox.editEndpoint.show=false;
|
|
|
|
|
|
if(refresh){
|
2020-07-28 19:42:25 +08:00
|
|
|
|
this.getEndpointTableData();
|
2020-04-16 19:25:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getModuleList(){
|
|
|
|
|
|
this.$get('module',{pageSize:-1,pageNo:1}).then(response=>{
|
|
|
|
|
|
if(response.code===200){
|
|
|
|
|
|
this.moduleList=response.data.list;
|
|
|
|
|
|
for(let i=0; i<this.moduleList.length; i++){
|
|
|
|
|
|
try{
|
2020-11-10 15:57:57 +08:00
|
|
|
|
let param= this.moduleList[i].param || '{}';
|
|
|
|
|
|
let tempObj=JSON.parse(param);
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.$set(this.moduleList[i],'paramObj',[]);
|
|
|
|
|
|
for(let k in tempObj){
|
|
|
|
|
|
this.moduleList[i].paramObj.push({key:k,value:tempObj[k]});
|
2020-04-16 19:25:29 +08:00
|
|
|
|
}
|
2020-11-10 15:57:57 +08:00
|
|
|
|
let labels= this.moduleList[i].labels || '{}';
|
|
|
|
|
|
let tempObj1=JSON.parse(labels);
|
|
|
|
|
|
this.$set(this.moduleList[i],'labelModule',[]);
|
|
|
|
|
|
for(let k in tempObj1){
|
|
|
|
|
|
this.moduleList[i].labelModule.push({key:k,value:tempObj1[k]});
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}catch(err){
|
2020-11-10 15:57:57 +08:00
|
|
|
|
console.error(response.data.list[i], err);
|
2020-04-16 19:25:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2019-12-25 20:33:58 +08:00
|
|
|
|
//左侧module列表选中切换
|
2020-11-10 14:11:29 +08:00
|
|
|
|
changeModule(project,module){
|
|
|
|
|
|
this.currentModule=module;
|
|
|
|
|
|
this.endpointSearchLabel={moduleId:''};
|
2019-12-27 17:53:17 +08:00
|
|
|
|
this.$refs.projectSearch.clearSearch();
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.bottomBox.showSubList=false;
|
|
|
|
|
|
this.currentProject=project;
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
//弹出endpoint编辑页
|
2020-11-10 14:11:29 +08:00
|
|
|
|
editEndpoint(endpoint){
|
|
|
|
|
|
this.endpoint=JSON.parse(JSON.stringify(endpoint));
|
2020-07-28 19:42:25 +08:00
|
|
|
|
this.$set(this.endpoint,'projectId',this.currentModule.project.id)
|
|
|
|
|
|
this.$set(this.endpoint,'moduleId',this.currentModule.id)
|
2020-05-09 16:54:41 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.rightBox.editEndpoint.show=true;
|
|
|
|
|
|
if(!this.endpoint.paramObj){
|
|
|
|
|
|
this.$set(this.endpoint,'paramObj',[]);
|
|
|
|
|
|
}
|
|
|
|
|
|
if(!this.endpoint.labelModule){
|
|
|
|
|
|
this.$set(this.endpoint,'labelModule',[]);
|
2019-12-12 17:15:33 +08:00
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
addEndpoint(){
|
|
|
|
|
|
this.endpoint.project=Object.assign({},this.currentModule.project);
|
|
|
|
|
|
this.endpoint.module=Object.assign({},this.currentModule);
|
|
|
|
|
|
this.rightBox.addEndpoint.show=true;
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//查看endpoint详情
|
2020-11-10 14:11:29 +08:00
|
|
|
|
detailEndpoint(endpoint){
|
|
|
|
|
|
this.endpoint=Object.assign({},endpoint);
|
|
|
|
|
|
this.bottomBox.targetTab="panel";
|
|
|
|
|
|
this.bottomBox.showSubList=true;
|
2019-12-25 20:33:58 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
delEndpoint(endpoint){
|
|
|
|
|
|
this.$confirm(this.$t("tip.confirmDelete"),{
|
|
|
|
|
|
confirmButtonText:this.$t("tip.yes"),
|
|
|
|
|
|
cancelButtonText:this.$t("tip.no"),
|
|
|
|
|
|
type:'warning'
|
|
|
|
|
|
}).then(()=>{
|
|
|
|
|
|
this.$delete("endpoint?ids="+endpoint.id).then(response=>{
|
|
|
|
|
|
if(response.code===200){
|
2020-12-31 17:41:40 +08:00
|
|
|
|
this.delFlag=true;
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.$message({duration:1000,type:'success',message:this.$t("tip.deleteSuccess")});
|
2020-10-14 12:23:40 +08:00
|
|
|
|
this.getEndpointTableData();
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}else{
|
2020-10-14 12:23:40 +08:00
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
jumpToAlertMsg(endpoint){
|
2020-12-15 21:13:07 +08:00
|
|
|
|
if (!this.hasButton('project_endpoint_alerts_view')) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.endpoint=Object.assign({},endpoint);
|
|
|
|
|
|
this.bottomBox.targetTab='alertMessage';
|
|
|
|
|
|
this.bottomBox.showSubList=true;
|
2020-09-25 15:33:02 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
addModule(){
|
|
|
|
|
|
this.module=this.newModule();
|
|
|
|
|
|
this.rightBox.module.show=true;
|
|
|
|
|
|
this.$nextTick(()=>{
|
2020-05-13 19:10:01 +08:00
|
|
|
|
this.$refs.moduleBox.initWalk();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
newModule(){
|
2020-07-28 19:42:25 +08:00
|
|
|
|
return JSON.parse(JSON.stringify(this.blankModule));
|
|
|
|
|
|
},
|
2019-12-12 17:15:33 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
//搜索
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpointSearch(searchObj){
|
2020-07-15 18:32:25 +08:00
|
|
|
|
let orderBy='';
|
|
|
|
|
|
if(this.endpointSearchLabel.orderBy){
|
|
|
|
|
|
orderBy=this.endpointSearchLabel.orderBy
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.endpointSearchLabel={};
|
|
|
|
|
|
this.endpointPageObj.pageNo=1;
|
|
|
|
|
|
for(let item in searchObj){
|
2020-11-22 19:32:15 +08:00
|
|
|
|
if(searchObj[item] || searchObj[item] === 0){
|
2020-11-22 19:24:24 +08:00
|
|
|
|
if (item === "endpointState") {
|
|
|
|
|
|
this.$set(this.endpointSearchLabel, 'state', searchObj[item]);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$set(this.endpointSearchLabel,item,searchObj[item]);
|
|
|
|
|
|
}
|
2019-12-13 17:08:35 +08:00
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}
|
2020-07-15 18:32:25 +08:00
|
|
|
|
if(orderBy){
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.$set(this.endpointSearchLabel,'orderBy',orderBy);
|
2020-07-15 18:32:25 +08:00
|
|
|
|
}
|
2020-11-17 09:05:43 +08:00
|
|
|
|
if(this.$refs.endpointTable&&this.$refs.endpointTable.bodyWrapper){
|
|
|
|
|
|
this.$refs.endpointTable.bodyWrapper.scrollTop = 0;
|
|
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
},
|
2019-12-13 20:41:32 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
dateFormat(time){
|
|
|
|
|
|
if(!time){
|
2020-03-30 19:46:03 +08:00
|
|
|
|
return '-';
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
let date=new Date(time*1000);
|
|
|
|
|
|
let year=date.getFullYear();
|
|
|
|
|
|
let month=date.getMonth()+1<10?"0"+(date.getMonth()+1):date.getMonth()+1;
|
|
|
|
|
|
let day=date.getDate()<10?"0"+date.getDate():date.getDate();
|
|
|
|
|
|
let hours=date.getHours()<10?"0"+date.getHours():date.getHours();
|
|
|
|
|
|
let minutes=date.getMinutes()<10?"0"+date.getMinutes():date.getMinutes();
|
|
|
|
|
|
let seconds=date.getSeconds()<10?"0"+date.getSeconds():date.getSeconds();
|
|
|
|
|
|
|
|
|
|
|
|
return year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
|
2020-01-06 19:03:38 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
viewAsset(endpoint){
|
|
|
|
|
|
this.endpoint=Object.assign({},endpoint);
|
|
|
|
|
|
this.bottomBox.targetTab='assetDetail';
|
|
|
|
|
|
this.bottomBox.showSubList=true;
|
2020-02-04 18:52:09 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
query(endpoint){
|
|
|
|
|
|
this.endpoint=Object.assign({},endpoint);
|
|
|
|
|
|
this.bottomBox.targetTab='endpointQuery';
|
|
|
|
|
|
this.bottomBox.showSubList=true;
|
2020-03-05 21:30:45 +08:00
|
|
|
|
},
|
2020-03-10 22:40:45 +08:00
|
|
|
|
getStateContent:function(row){
|
|
|
|
|
|
if(row){
|
2020-11-10 14:11:29 +08:00
|
|
|
|
if(row.state==1){
|
2020-04-17 13:58:00 +08:00
|
|
|
|
return 'up';
|
2020-03-10 22:40:45 +08:00
|
|
|
|
}else{
|
2020-04-17 15:21:39 +08:00
|
|
|
|
return `down:${this.getStateErrorMsg(row)}`
|
2020-03-10 22:40:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
convertToDetail(obj){
|
|
|
|
|
|
let detail={
|
|
|
|
|
|
project:obj.project.name,
|
|
|
|
|
|
module:obj.module.name,
|
|
|
|
|
|
asset:obj.asset.host,
|
|
|
|
|
|
host:obj.host,
|
|
|
|
|
|
port:obj.port,
|
|
|
|
|
|
path:obj.path,
|
|
|
|
|
|
param:obj.param
|
2020-06-15 22:23:56 +08:00
|
|
|
|
};
|
2020-03-29 16:33:49 +08:00
|
|
|
|
return detail;
|
|
|
|
|
|
},
|
2020-03-10 22:40:45 +08:00
|
|
|
|
formatUpdateTime:function(date){
|
|
|
|
|
|
let time=new Date(date);
|
|
|
|
|
|
let hours=time.getHours()>9?time.getHours():'0'+time.getHours();
|
|
|
|
|
|
let minutes=time.getMinutes()>9?time.getMinutes():'0'+time.getMinutes();
|
|
|
|
|
|
|
|
|
|
|
|
return hours+':'+minutes;
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getStateErrorMsg(row){
|
|
|
|
|
|
let errCodes=[230009,230010,230011];
|
2020-03-10 22:40:45 +08:00
|
|
|
|
if(row){
|
2020-11-10 14:11:29 +08:00
|
|
|
|
if(row.state==0){
|
|
|
|
|
|
if(errCodes.find((item)=>{
|
|
|
|
|
|
return row.stateInfo.code==item
|
|
|
|
|
|
})){
|
2020-03-10 22:40:45 +08:00
|
|
|
|
return this.$t('project.endpoint.stateInfo_'+row.stateInfo.code)
|
|
|
|
|
|
}else{
|
|
|
|
|
|
return row.stateInfo.msg;
|
|
|
|
|
|
this.$message.error('state code error');
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-03-30 16:39:29 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
assetConvertToDetail(obj){
|
|
|
|
|
|
let detail=JSON.parse(JSON.stringify(obj));
|
|
|
|
|
|
detail.state=obj.state==1?this.$t('asset.inStock'):this.$t('asset.notInStock');
|
|
|
|
|
|
detail.assetType=obj.model.type.value;
|
|
|
|
|
|
detail.vendorModel=obj.model.vendor.value+" "+obj.model.name;
|
|
|
|
|
|
detail.dataCenter=obj.idc?obj.idc.name:"";
|
|
|
|
|
|
detail.location=obj.idc?obj.idc.location:"";
|
|
|
|
|
|
detail.principal=obj.idc?this.getPrincipalName(obj.idc.principal):"";
|
|
|
|
|
|
detail.tel=obj.idc?obj.idc.tel:"";
|
|
|
|
|
|
detail.cabinet=obj.cabinet?obj.cabinet.name:"";
|
|
|
|
|
|
detail.uSize=obj.cabinet?obj.cabinet.uSize:"";
|
|
|
|
|
|
detail.remark=obj.idc?obj.idc.remark:"";
|
|
|
|
|
|
!obj.accounts&&(obj.accounts=[]);
|
|
|
|
|
|
if(obj.accounts.length>0){
|
|
|
|
|
|
let account=obj.accounts[0];
|
|
|
|
|
|
detail.protocol=account.protocol;
|
|
|
|
|
|
detail.account=account.user;
|
|
|
|
|
|
let loginType="";
|
|
|
|
|
|
if(account.authType==1){
|
2021-01-05 11:54:33 +08:00
|
|
|
|
loginType=this.$t('asset.password');
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}else if(account.authType==2){
|
|
|
|
|
|
loginType=this.$t('asset.ssh');
|
2020-06-17 19:52:03 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
detail.loginType=loginType;
|
|
|
|
|
|
detail.port=account.port;
|
2020-06-17 19:52:03 +08:00
|
|
|
|
}
|
2020-03-30 16:39:29 +08:00
|
|
|
|
return detail;
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getPrincipalName(data){
|
|
|
|
|
|
for(let item in this.userData){
|
|
|
|
|
|
if(this.userData[item].userId===data){
|
2020-03-30 16:39:29 +08:00
|
|
|
|
return this.userData[item].username
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
getUserData(){
|
|
|
|
|
|
this.$get('sys/user/list').then(response=>{
|
|
|
|
|
|
if(response.code===200){
|
|
|
|
|
|
this.userData=response.data.list
|
2020-03-30 16:39:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
2020-07-15 18:32:25 +08:00
|
|
|
|
},
|
2020-09-02 18:03:26 +08:00
|
|
|
|
//刷新拓扑图
|
|
|
|
|
|
visNetworkReload(){
|
|
|
|
|
|
this.$refs['facade'].$refs['visNetwork'].reload()
|
|
|
|
|
|
},
|
2020-07-15 18:32:25 +08:00
|
|
|
|
// 数据排序
|
|
|
|
|
|
tableDataSort(item){
|
|
|
|
|
|
let orderBy='';
|
|
|
|
|
|
if(item.order==='ascending'){
|
|
|
|
|
|
orderBy=item.prop;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(item.order==='descending'){
|
|
|
|
|
|
orderBy='-'+item.prop;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.$set(this.endpointSearchLabel,"orderBy",orderBy);
|
2020-07-15 18:32:25 +08:00
|
|
|
|
this.getEndpointTableData();
|
2020-08-03 21:33:13 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
initEvent(){
|
|
|
|
|
|
bus.$on("project-page-type",pageType=>{
|
|
|
|
|
|
this.pageType=pageType;
|
2020-08-03 21:33:13 +08:00
|
|
|
|
});
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bus.$on("current-project-change",project=>{
|
|
|
|
|
|
this.currentProject=project;
|
2020-08-03 21:33:13 +08:00
|
|
|
|
});
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bus.$on("current-module-change",module=>{
|
|
|
|
|
|
this.currentModule=module;
|
2020-09-18 11:36:02 +08:00
|
|
|
|
this.bottomBox.showSubList=false;
|
2020-08-03 21:33:13 +08:00
|
|
|
|
});
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bus.$on("project-list-change",()=>{
|
2020-08-03 21:33:13 +08:00
|
|
|
|
this.getProjectList();
|
|
|
|
|
|
});
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bus.$on("module-list-change",menu=>{
|
2020-08-03 21:33:13 +08:00
|
|
|
|
this.getModuleList();
|
|
|
|
|
|
});
|
2020-11-10 14:11:29 +08:00
|
|
|
|
bus.$on("endpoint-list-change",menu=>{
|
2020-08-03 21:33:13 +08:00
|
|
|
|
this.getEndpointTableData();
|
|
|
|
|
|
});
|
2020-11-17 17:14:12 +08:00
|
|
|
|
bus.$on('alert-message-change',()=>{
|
|
|
|
|
|
this.getEndpointTableData()
|
|
|
|
|
|
})
|
2020-09-25 15:33:02 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
messageStyle(e){
|
|
|
|
|
|
if(e.column.label=='Alerts'||e.column.label==this.$t("project.endpoint.alerts")){
|
|
|
|
|
|
if(e.row.alertNum>0){
|
2020-09-25 15:33:02 +08:00
|
|
|
|
return 'danger';
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}else{
|
2020-09-25 15:33:02 +08:00
|
|
|
|
return 'success';
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return '';
|
|
|
|
|
|
},
|
2019-12-12 17:15:33 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
created(){
|
|
|
|
|
|
this.currentProject=this.$store.state.currentProject;
|
2020-11-21 12:21:27 +08:00
|
|
|
|
//是否存在分页缓存
|
|
|
|
|
|
let pageSize=localStorage.getItem('nz-pageSize-'+localStorage.getItem('nz-username')+'-'+this.tableId);
|
|
|
|
|
|
if(pageSize){
|
|
|
|
|
|
this.endpointPageObj.pageSize=pageSize
|
|
|
|
|
|
}
|
2020-07-30 18:37:04 +08:00
|
|
|
|
this.getModuleList();
|
2020-03-30 16:39:29 +08:00
|
|
|
|
this.getUserData();
|
2020-04-16 19:25:29 +08:00
|
|
|
|
this.getProjectList();
|
2019-12-13 20:41:32 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
mounted(){
|
2020-08-04 21:53:06 +08:00
|
|
|
|
//初始化表头
|
2020-11-10 14:11:29 +08:00
|
|
|
|
this.tools.customTableTitle=localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path)
|
|
|
|
|
|
?JSON.parse(localStorage.getItem("nz-tableTitle-"+localStorage.getItem("nz-username")+"-"+this.$route.path))
|
|
|
|
|
|
:this.tableTitle;
|
2020-12-24 11:07:44 +08:00
|
|
|
|
this.tableTitleReset(this.tableTitle,this.tools.customTableTitle);
|
2020-11-10 14:11:29 +08:00
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
|
this.ready=true;
|
|
|
|
|
|
},300);
|
2020-08-03 21:33:13 +08:00
|
|
|
|
|
|
|
|
|
|
this.initEvent();
|
2019-12-13 20:41:32 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
computed:{
|
|
|
|
|
|
itemTip(){
|
|
|
|
|
|
return function(id,content,ready){
|
|
|
|
|
|
let className="item-tip-show";
|
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
|
if(ready){
|
|
|
|
|
|
let cellDom=document.querySelector(`#module-${id}`);
|
|
|
|
|
|
let spanDom=document.querySelector(`#module-${id}>span`);
|
|
|
|
|
|
if(cellDom.offsetWidth-16<=spanDom.offsetWidth){
|
2020-07-08 21:39:43 +08:00
|
|
|
|
document.querySelector(`#module-${id}>.el-popover`).classList.add(className);
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}else{
|
2020-07-08 21:39:43 +08:00
|
|
|
|
document.querySelector(`#module-${id}>.el-popover`).classList.remove(className);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-09-03 14:31:21 +08:00
|
|
|
|
reloadFacade(){
|
|
|
|
|
|
return this.$store.getters.getReloadFacade
|
|
|
|
|
|
},
|
2019-12-13 20:41:32 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
watch:{
|
|
|
|
|
|
currentModule(n,o){
|
|
|
|
|
|
this.endpointPageObj.pageNo=1;
|
|
|
|
|
|
if(n&&n.id){
|
2019-12-25 20:33:58 +08:00
|
|
|
|
this.getEndpointTableData();
|
2020-11-10 14:11:29 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
this.endpointTableData=[];
|
2019-12-25 20:33:58 +08:00
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
},
|
2020-08-03 21:33:13 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
"bottomBox.showSubList":function(n){
|
|
|
|
|
|
let vm=this;
|
|
|
|
|
|
this.$bottomBoxWindow.showSubListWatch(vm,n);
|
2020-03-29 16:33:49 +08:00
|
|
|
|
},
|
2020-11-10 14:11:29 +08:00
|
|
|
|
endpoint:{
|
|
|
|
|
|
deep:true,
|
|
|
|
|
|
handler(n){
|
|
|
|
|
|
this.bottomBox.endpointDetail=this.convertToDetail(n);
|
|
|
|
|
|
this.$get('asset',{id:n.assetId}).then(response=>{
|
|
|
|
|
|
if(response.code===200){
|
|
|
|
|
|
this.bottomBox.assetDetail=this.assetConvertToDetail(response.data.list[0]);
|
2020-03-30 16:39:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
});
|
2020-03-29 16:33:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-12-29 15:38:04 +08:00
|
|
|
|
endpointTableData: {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler(n) {
|
|
|
|
|
|
if (n.length === 0 && this.endpointPageObj.pageNo > 1) {
|
|
|
|
|
|
this.endpointPageNo(this.endpointPageObj.pageNo-1);
|
|
|
|
|
|
}
|
2021-01-13 18:58:50 +08:00
|
|
|
|
if(!this.delFlag&&this.pageType==='endpoint'){ // 不是删除时回到顶部 以及修改时
|
2020-12-31 17:41:40 +08:00
|
|
|
|
this.$refs.endpointTable.bodyWrapper.scrollTop = 0
|
|
|
|
|
|
}else{
|
|
|
|
|
|
this.delFlag=false;
|
|
|
|
|
|
}
|
2020-12-29 15:38:04 +08:00
|
|
|
|
}
|
2021-01-13 18:58:50 +08:00
|
|
|
|
},
|
2020-03-09 18:05:43 +08:00
|
|
|
|
},
|
2020-12-14 20:25:24 +08:00
|
|
|
|
beforeDestroy() {
|
2020-11-20 10:15:17 +08:00
|
|
|
|
bus.$off("project-page-type");
|
|
|
|
|
|
bus.$off("current-project-change");
|
|
|
|
|
|
bus.$off("current-module-change");
|
|
|
|
|
|
bus.$off("project-list-change");
|
|
|
|
|
|
bus.$off("module-list-change");
|
|
|
|
|
|
bus.$off("endpoint-list-change");
|
2020-12-14 20:25:24 +08:00
|
|
|
|
bus.$off('alert-message-change');
|
2021-01-13 18:58:50 +08:00
|
|
|
|
if(this.scrollbarWrap){
|
|
|
|
|
|
this.scrollbarWrap.removeEventListener('scroll', bus.debounce);
|
|
|
|
|
|
};
|
2020-11-20 15:02:36 +08:00
|
|
|
|
},
|
2019-11-29 15:00:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2019-12-25 20:33:58 +08:00
|
|
|
|
|
2020-11-10 14:11:29 +08:00
|
|
|
|
<style scoped lang="scss">
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.project {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
/* .content-right-option {
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-option .nz-icon-delete {
|
|
|
|
|
|
color: #F98D9A;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-option .nz-icon-delete:hover {
|
|
|
|
|
|
color: #D96D7A;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-option .nz-icon-view {
|
|
|
|
|
|
color: #60BEFF;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-option .nz-icon-view:hover {
|
|
|
|
|
|
color: #409EFF;
|
|
|
|
|
|
}*/
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* start--param*/
|
|
|
|
|
|
.param-btn {
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
height: 27px;
|
|
|
|
|
|
margin-top: -3px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-btn-active {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
border: 1px solid #656565;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-btn-active:hover, .param-btn-active:focus {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-btn-clear {
|
|
|
|
|
|
background-color: #D4D4D4;
|
|
|
|
|
|
border: 1px solid #D4D4D4;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-btn-clear:hover, .param-btn-clear:focus {
|
|
|
|
|
|
background-color: #D4D4D4;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.param-box {
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-endpoint {
|
|
|
|
|
|
height: 325px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-module {
|
|
|
|
|
|
height: 227px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-row {
|
|
|
|
|
|
padding: 7px 0 0 0;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-row:last-of-type {
|
|
|
|
|
|
padding-bottom: 7px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-row-key, .param-box-row-value {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 41.5%;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-row-eq {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 22px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
line-height: 32px;
|
|
|
|
|
|
color: #c4c7cF;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.param-box-row-symbol {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #c4c7cF;
|
|
|
|
|
|
border: 1px solid #c4c7cF;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
height: 12px;
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 17px;
|
|
|
|
|
|
right: 25px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.param-box-row-symbol > i {
|
2019-12-25 20:33:58 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 1px;
|
|
|
|
|
|
right: 1px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* end--param*/
|
|
|
|
|
|
|
|
|
|
|
|
/* begin--子弹框*/
|
|
|
|
|
|
.right-sub-box {
|
|
|
|
|
|
width: 380px;
|
|
|
|
|
|
height: 520px;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 380px;
|
|
|
|
|
|
right: 100px;
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-input-group {
|
|
|
|
|
|
width: 227px;
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
margin: 7px 0 0 0;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* begin--搜索框*/
|
|
|
|
|
|
.endpoint-asset-prepend {
|
|
|
|
|
|
border-radius: 4px 0 0 4px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-label {
|
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
height: 26px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-dropdown {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 27px;
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
width: 52px;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-dropdown-item {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
height: 22px;
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-label-txt {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 19px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-dropdown-item:first-of-type {
|
|
|
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-dropdown-item:last-of-type {
|
|
|
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-asset-dropdown-item:hover {
|
|
|
|
|
|
background-color: #3a8ee6;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* end--搜索框*/
|
|
|
|
|
|
/* begin--table*/
|
|
|
|
|
|
.endpoint-sub-table {
|
|
|
|
|
|
margin-top: 25px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.line-100 {
|
|
|
|
|
|
margin-bottom: 3px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-head {
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-row {
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
color: #656565;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-row-active {
|
|
|
|
|
|
background-color: #dadada;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-col {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 45%;
|
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-paginate-all {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 10px;
|
|
|
|
|
|
bottom: 17px;
|
|
|
|
|
|
color: #5a5a5a;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-body {
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* end--table*/
|
|
|
|
|
|
|
|
|
|
|
|
/* end--子弹框*/
|
2020-07-08 21:39:43 +08:00
|
|
|
|
|
|
|
|
|
|
.item-tip-hide {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
bottom: 34px;
|
|
|
|
|
|
min-width: 50px;
|
|
|
|
|
|
white-space: normal;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.item-tip:hover > .item-tip-show {
|
2020-07-08 21:39:43 +08:00
|
|
|
|
display: block;
|
|
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
</style>
|
|
|
|
|
|
<style>
|
|
|
|
|
|
/* begin--覆盖分页组件样式*/
|
|
|
|
|
|
.right-sub-box .el-pagination.is-background .btn-next, .right-sub-box .el-pagination.is-background .btn-prev, .right-sub-box .el-pagination.is-background .el-pager li {
|
|
|
|
|
|
margin: 0 3px;
|
|
|
|
|
|
min-width: 25px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination button, .right-sub-box .el-pagination span:not([class*=suffix]) {
|
|
|
|
|
|
margin: 0 3px;
|
|
|
|
|
|
height: 25px;
|
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pager li {
|
|
|
|
|
|
height: 25px;
|
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination.is-background .el-pager li:not(.disabled).active {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
border: 1px solid #656565;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination.is-background .btn-next, .right-sub-box .el-pagination.is-background .btn-prev, .right-sub-box .el-pagination.is-background .el-pager li {
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination button, .right-sub-box .el-pager li {
|
|
|
|
|
|
border: 1px solid #DADADA;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.right-sub-box .el-pager li.active + li {
|
2019-12-25 20:33:58 +08:00
|
|
|
|
border: 1px solid #DADADA;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination.is-background .el-pager li:not(.disabled):hover {
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.right-sub-box .el-pagination.is-background .el-pager li.active:hover {
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
.endpoint-sub-table-paginate .el-pagination {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 10px;
|
|
|
|
|
|
bottom: 13px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.el-input-group__append > i {
|
2019-12-25 20:33:58 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.el-table .disabledCheck .cell .el-checkbox__inner {
|
2020-02-06 12:04:41 +08:00
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.el-table .disabledCheck .cell::before {
|
2020-02-20 18:17:36 +08:00
|
|
|
|
/*content: '\e627';*/
|
|
|
|
|
|
/*font-family: 'nz-icon';*/
|
2020-02-06 12:04:41 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 37px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
2019-12-25 20:33:58 +08:00
|
|
|
|
/* end--覆盖分页组件样式*/
|
2020-02-14 18:07:21 +08:00
|
|
|
|
|
2020-02-17 18:41:38 +08:00
|
|
|
|
/* 列表搜索框 样式重写*/
|
2020-11-10 14:11:29 +08:00
|
|
|
|
.relative-position {
|
2020-02-17 18:41:38 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.query-input-inactive {
|
|
|
|
|
|
left: 213px;
|
2020-02-17 18:41:38 +08:00
|
|
|
|
width: 18%;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.query-input-inactive .el-input__inner {
|
2020-02-17 18:41:38 +08:00
|
|
|
|
height: 26px;
|
|
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.metric-tip-icon {
|
2020-02-19 10:43:58 +08:00
|
|
|
|
vertical-align: middle;
|
2020-04-06 22:11:25 +08:00
|
|
|
|
transform: scale(0.6);
|
2020-11-10 14:11:29 +08:00
|
|
|
|
display: inline-block;
|
2020-02-19 10:43:58 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.metirc-tip-list {
|
2020-02-19 10:43:58 +08:00
|
|
|
|
line-height: 26px;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.table-header-inner {
|
2020-02-20 18:17:36 +08:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
z-index: 1;
|
2020-04-20 12:19:11 +08:00
|
|
|
|
top: 38px;
|
2020-03-18 21:36:37 +08:00
|
|
|
|
left: 11px;
|
|
|
|
|
|
cursor: pointer;
|
2020-02-20 18:17:36 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.control-icon-unchecked {
|
2020-03-13 13:12:47 +08:00
|
|
|
|
color: #d1d1d1;
|
2020-02-20 18:17:36 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
|
|
|
|
|
|
.control-icon-checked {
|
|
|
|
|
|
color: #666;
|
2020-02-20 18:17:36 +08:00
|
|
|
|
}
|
2019-12-25 20:33:58 +08:00
|
|
|
|
</style>
|