2019-12-18 17:00:44 +08:00
|
|
|
|
<template>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<div v-clickoutside="{obj:endpoint,func:clickOutside}" :class="{'right-box-add-endpoint-snmp': currentModule.type && currentModule.type.toLowerCase() == 'snmp'}" class="right-box right-box-add-endpoint">
|
2021-04-23 11:47:38 +08:00
|
|
|
|
<div class="right-box__header">
|
|
|
|
|
|
<!-- begin--标题-->
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<div class="header__title">{{$t("overall.createEndpoint")}}</div>
|
2021-04-23 11:47:38 +08:00
|
|
|
|
<!-- end--标题-->
|
2021-04-25 14:58:03 +08:00
|
|
|
|
<div class="header__operation">
|
|
|
|
|
|
<span v-cancel="{obj: object, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
|
|
|
|
|
</div>
|
2021-04-23 11:47:38 +08:00
|
|
|
|
</div>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- begin--表单-->
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<div class="right-box__container">
|
|
|
|
|
|
<div class="container__form">
|
|
|
|
|
|
<el-form ref="addEndpoint" :model="endpoint" :rules="rules" label-position = "top">
|
|
|
|
|
|
<!--project-->
|
|
|
|
|
|
<el-form-item :label='$t("project.project.projectName")' class="select-warp" prop="projectId">
|
|
|
|
|
|
<el-select id="add-endpoint-project" v-model="currentProject" class="right-box__select" placeholder="" popper-class="right-box-select-dropdown prevent-clickoutside" size="small" value-key="id" @change="((val) => {changeProject(val)})">
|
|
|
|
|
|
<el-option v-for="item in projectList" :id="'project-'+item.id" :key="item.id" :label="item.name" :value="item"></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--module-->
|
|
|
|
|
|
<el-form-item :label='$t("project.module.module")' class="select-warp" prop="moduleId">
|
|
|
|
|
|
<el-select id="add-endpoint-module" v-model="currentModule" :disabled="!currentProject.id" class="right-box__select" placeholder="" popper-class="right-box-select-dropdown prevent-clickoutside" size="small" value-key="id" @change="((val) => {changeModule(val)})">
|
|
|
|
|
|
<el-option v-for="item in moduleList" :id="'module-'+item.id" :key="item.id" :label="item.name" :value="item"></el-option>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--asset和endpoint-->
|
|
|
|
|
|
<div class="asset-and-endpoint">
|
|
|
|
|
|
<!--asset-->
|
|
|
|
|
|
<div class="right-box-asset-table">
|
|
|
|
|
|
<div v-show="!currentModule.id" class="disabled-asset-table">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-box">
|
|
|
|
|
|
<search-input
|
|
|
|
|
|
ref="searchInput"
|
|
|
|
|
|
:placeholder="$t('overall.placeHolder')"
|
|
|
|
|
|
:searchMsg="searchMsg"
|
|
|
|
|
|
:show-history="false"
|
|
|
|
|
|
:show-search="false"
|
|
|
|
|
|
style="width:100%"
|
|
|
|
|
|
@search="search"
|
|
|
|
|
|
></search-input>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
|
:data="assetTableData"
|
|
|
|
|
|
:row-class-name="setRowShow"
|
|
|
|
|
|
class="asset-table"
|
|
|
|
|
|
height="calc(100% - 97px)"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
tooltip-effect="dark"
|
|
|
|
|
|
@selection-change="handleSelectionChangeAsset">
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
type="selection"
|
|
|
|
|
|
width="55">
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
v-for="(item, index) in assetTableTitle"
|
|
|
|
|
|
:key="`col-${index}`"
|
|
|
|
|
|
:fixed="item.fixed"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
:min-width="`${item.minWidth}`"
|
|
|
|
|
|
:prop="item.prop"
|
|
|
|
|
|
:resizable="true"
|
|
|
|
|
|
:sort-orders="['ascending', 'descending']"
|
|
|
|
|
|
:width="`${item.width}`"
|
|
|
|
|
|
class="data-column"
|
2021-04-27 17:38:58 +08:00
|
|
|
|
|
2021-05-21 18:29:40 +08:00
|
|
|
|
>
|
|
|
|
|
|
<template slot="header">
|
|
|
|
|
|
<span>{{item.label}}</span>
|
|
|
|
|
|
<div class="col-resize-area"></div>
|
2021-04-15 11:47:44 +08:00
|
|
|
|
</template>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<template slot-scope="scope" :column="item">
|
|
|
|
|
|
<template v-if="item.prop == 'brand'">
|
|
|
|
|
|
<span>{{scope.row[item.prop].name}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="item.prop == 'model'">
|
|
|
|
|
|
<span>{{scope.row[item.prop]?scope.row[item.prop].name : ''}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="item.prop == 'dc'">
|
|
|
|
|
|
<span>{{scope.row[item.prop]?scope.row[item.prop].name : ''}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="item.prop == 'cabinet'">
|
|
|
|
|
|
<span>{{scope.row[item.prop]?scope.row[item.prop].name : ''}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="item.prop == 'type'">
|
|
|
|
|
|
<span>{{scope.row[item.prop]?scope.row[item.prop].name : ''}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template v-else-if="item.prop == 'state'">
|
|
|
|
|
|
<span>{{scope.row[item.prop]?scope.row[item.prop].name : ''}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<span v-else>{{scope.row[item.prop] ? scope.row[item.prop] : ''}}</span>
|
2021-04-15 11:47:44 +08:00
|
|
|
|
</template>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<div class="table-bottom">
|
2021-04-16 15:02:40 +08:00
|
|
|
|
<el-pagination
|
|
|
|
|
|
style="padding-top:10px"
|
|
|
|
|
|
small
|
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
|
@current-change="handleSizeChange"
|
|
|
|
|
|
:current-page.sync="pageObj.pageNo"
|
|
|
|
|
|
:page-size="pageObj.pageSize"
|
|
|
|
|
|
layout="prev, slot, next"
|
|
|
|
|
|
:total="pages.total">
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<el-input ref="jumpInput" class="jump-input" v-model.number="pages.pageNo" size="small" @change="handleCurrentChange" @keyup.enter.native="handleCurrentChange"/>
|
|
|
|
|
|
<span class="jump-pages">/ {{pages.pages}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-pagination>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<span class="add-endpoint" @click="addEndpoint">
|
2021-04-16 15:02:40 +08:00
|
|
|
|
<i class="nz-icon nz-icon-arrow-right"></i>
|
|
|
|
|
|
</span>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div v-if="selectAssetAll" class="asset-allselect">
|
|
|
|
|
|
{{$t('project.endpoint.allselect')}}
|
|
|
|
|
|
</div>
|
2021-04-16 15:02:40 +08:00
|
|
|
|
</div>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<!--endpoint-->
|
2021-07-02 14:03:17 +08:00
|
|
|
|
<div class="right-box-endpoint-table" :class="showError?'error' : ''">
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<div class="search-box" style="display: flex;justify-content: flex-end">
|
|
|
|
|
|
<el-button class="top-tool-btn" type="button" @click="showRightBox">
|
|
|
|
|
|
<i class="nz-icon-gear nz-icon"></i>
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button class="top-tool-btn" type="button" @click="editAllEndpoint">
|
|
|
|
|
|
<i class="nz-icon-batch-edit nz-icon"></i>
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
id="add-endpoint-asset-table"
|
|
|
|
|
|
ref="endpointTable"
|
|
|
|
|
|
:data="endpointTableData"
|
|
|
|
|
|
empty-text=" "
|
|
|
|
|
|
height="calc(100% - 95px)"
|
|
|
|
|
|
style="width:100%;border-radius: 4px;"
|
|
|
|
|
|
@selection-change="handleSelectionChangeEndpoint">
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
style="padding: 0 1px;"
|
|
|
|
|
|
type="selection"
|
|
|
|
|
|
width="25">
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
v-for="(title, index) in endpointTableTitle"
|
|
|
|
|
|
v-if="title.show"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
:label="title.label"
|
|
|
|
|
|
:min-width="title.width"
|
|
|
|
|
|
:resizable="true"
|
|
|
|
|
|
label-class-name="endpoints-box-endpoints-title"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope" :column="title">
|
|
|
|
|
|
<span v-if="title.prop == 'asset'">{{scope.row.assetName}}</span>
|
|
|
|
|
|
<span v-else-if="title.prop == 'name'">
|
2021-04-23 18:10:25 +08:00
|
|
|
|
{{scope.row.name}}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
</span>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
<template v-else-if="title.prop === 'configs'">
|
|
|
|
|
|
<el-tooltip effect="light" placement="right" popper-class="prevent-clickoutside">
|
|
|
|
|
|
<span class="configs-endpoint">{ ... }</span>
|
|
|
|
|
|
<div slot="content" class="endpointConfigsTips">
|
|
|
|
|
|
<!-- <span class="copy-value-content"> <i class="nz-icon nz-icon-override" @click="copyValue(scope.row[title.prop])"></i></span>-->
|
|
|
|
|
|
<pre >{{JSON.stringify(scope.row[title.prop],null,2)}}</pre>
|
|
|
|
|
|
<!-- <pre>{{}}</pre>-->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</template>
|
2021-04-23 18:10:25 +08:00
|
|
|
|
</template>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column fixed="right" label="" width="56">
|
|
|
|
|
|
<template slot-scope="scope" style="text-align: center">
|
2021-04-16 15:02:40 +08:00
|
|
|
|
<span @click="editEndpointRow(scope.row, scope.$index)">
|
|
|
|
|
|
<i class="nz-icon-gear nz-icon"></i>
|
|
|
|
|
|
</span>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<div class="table-bottom">
|
2021-04-16 15:02:40 +08:00
|
|
|
|
<span class="add-endpoint" @click="removeEndpoint" style="margin-left: 10px">
|
|
|
|
|
|
<i class="nz-icon nz-icon-arrow-left"></i>
|
|
|
|
|
|
</span>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</div>
|
2021-04-16 15:02:40 +08:00
|
|
|
|
</div>
|
2021-07-02 14:03:17 +08:00
|
|
|
|
<div v-if="showError" class="el-form-item__error">{{this.$t('validate.required')}}</div>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</div>
|
2021-05-21 18:29:40 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
2020-12-14 20:25:24 +08:00
|
|
|
|
</div>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
|
|
|
|
|
|
<!--底部按钮-->
|
2021-05-11 10:37:58 +08:00
|
|
|
|
<div class="right-box__footer">
|
|
|
|
|
|
<button v-cancel="{obj:endpoint,func:esc}" id="ep-esc" class="footer__btn footer__btn--light">
|
2020-07-28 19:42:25 +08:00
|
|
|
|
<span>{{$t('overall.cancel')}}</span>
|
|
|
|
|
|
</button>
|
2021-05-11 10:37:58 +08:00
|
|
|
|
<button @click="save" class="footer__btn" id="ep-add">
|
2020-07-28 19:42:25 +08:00
|
|
|
|
<span>{{$t('overall.save')}}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2021-04-16 15:02:40 +08:00
|
|
|
|
<!-- edit endpoint-->
|
|
|
|
|
|
<transition name="right-box">
|
2021-04-21 18:54:15 +08:00
|
|
|
|
<edit-endpoint-box-new v-if="rightBox.show" :module="object" @close="closeRightBox" :disabled="true" :type="'add'" :optionType="optionType"></edit-endpoint-box-new>
|
2020-11-10 14:11:29 +08:00
|
|
|
|
</transition>
|
2020-07-28 19:42:25 +08:00
|
|
|
|
</div>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-04-16 15:02:40 +08:00
|
|
|
|
import editEndpointBoxNew from './editEndpointBoxNew'
|
2021-03-19 18:52:19 +08:00
|
|
|
|
export default {
|
2021-06-17 11:24:38 +08:00
|
|
|
|
name: 'addEndpointBox',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
components: {
|
|
|
|
|
|
'edit-endpoint-box-new': editEndpointBoxNew
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
projectId: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
2019-12-20 22:00:04 +08:00
|
|
|
|
],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
moduleId: [
|
|
|
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2021-04-15 11:47:44 +08:00
|
|
|
|
pageObj: {
|
|
|
|
|
|
pageNo: 1,
|
2021-04-21 16:35:48 +08:00
|
|
|
|
pageSize: 10
|
2021-04-16 15:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
pages: {
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
pages: 0,
|
|
|
|
|
|
pageNo: 1
|
2021-04-15 11:47:44 +08:00
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
object: {},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
vendorAndModelOptionData: [],
|
|
|
|
|
|
paramBorderColor: '#dcdfe6',
|
|
|
|
|
|
endpointTouch: false,
|
|
|
|
|
|
endpoint: { projectId: '', moduleId: '', endpointList: [] },
|
2021-05-21 18:29:40 +08:00
|
|
|
|
currentModule: {},
|
|
|
|
|
|
currentProject: { id: '' },
|
2021-03-19 18:52:19 +08:00
|
|
|
|
tempParamObj: [],
|
|
|
|
|
|
tempLabelModule: [],
|
|
|
|
|
|
inputKeyErr: [],
|
|
|
|
|
|
tempEndpoint: {},
|
|
|
|
|
|
tempEndpoint2: {},
|
|
|
|
|
|
assetLoading: true,
|
|
|
|
|
|
rightBox: { show: false, title: this.$t('project.endpoint.createEndpoint'), isEdit: false },
|
2021-04-21 18:54:15 +08:00
|
|
|
|
optionType: 'batch',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
blankEndpoint: {
|
|
|
|
|
|
id: '',
|
|
|
|
|
|
projectId: '',
|
|
|
|
|
|
endpointNameTmpl: '{{module.name}}-{{asset.name}}',
|
|
|
|
|
|
type: 'http',
|
2021-05-21 18:29:40 +08:00
|
|
|
|
port: '',
|
2021-06-01 17:24:57 +08:00
|
|
|
|
enabled: 1,
|
2021-04-16 15:02:40 +08:00
|
|
|
|
configs: {
|
|
|
|
|
|
walk: [],
|
|
|
|
|
|
snmpCredentialsId: '',
|
|
|
|
|
|
metrics_path: '',
|
2021-05-21 18:29:40 +08:00
|
|
|
|
port: '',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
host: '{{asset.manageIp}}',
|
|
|
|
|
|
scrape_interval: '',
|
|
|
|
|
|
scrape_timeout: '',
|
|
|
|
|
|
params: '',
|
|
|
|
|
|
labels: '',
|
|
|
|
|
|
paramObj: [],
|
|
|
|
|
|
labelModule: [],
|
|
|
|
|
|
basic_auth: {
|
|
|
|
|
|
username: '',
|
2021-04-27 20:31:54 +08:00
|
|
|
|
pin: ''
|
2021-04-16 15:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
bearer_token: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
walk: [],
|
|
|
|
|
|
labelModule: [{
|
|
|
|
|
|
key: '',
|
|
|
|
|
|
value: ''
|
|
|
|
|
|
}],
|
|
|
|
|
|
paramObj: [{
|
|
|
|
|
|
key: '',
|
|
|
|
|
|
value: []
|
|
|
|
|
|
}]
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
editParamBox: { show: false, top: 0, left: 0, type: 0 }, // param编辑弹框
|
|
|
|
|
|
editLabelsBox: { show: false, top: 0, left: 0, type: 0 }, // param编辑弹框
|
|
|
|
|
|
moduleParamShow: false, // module默认参数param悬浮窗
|
|
|
|
|
|
assetSearch: { host: '', sn: '', text: '', label: 'Host', typeIds: '', modelId: '', idcId: '', dropdownShow: false }, // 侧滑框中asset的搜索相关
|
|
|
|
|
|
selectedAssets: [], // 侧滑框中选中的asset
|
|
|
|
|
|
projectList: [],
|
|
|
|
|
|
moduleList: [],
|
|
|
|
|
|
assetList: [],
|
|
|
|
|
|
endpointList: [],
|
|
|
|
|
|
endpointTableTitle: [
|
|
|
|
|
|
{
|
2021-04-23 18:10:25 +08:00
|
|
|
|
label: this.$t('project.endpoint.name'),
|
|
|
|
|
|
prop: 'name',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
width: 150,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
show: true
|
|
|
|
|
|
}, {
|
2021-04-23 18:10:25 +08:00
|
|
|
|
label: this.$t('project.endpoint.asset'),
|
|
|
|
|
|
prop: 'asset',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
width: 80,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
show: true
|
|
|
|
|
|
}, {
|
2021-04-23 18:10:25 +08:00
|
|
|
|
label: this.$t('project.endpoint.configs'),
|
|
|
|
|
|
prop: 'configs',
|
|
|
|
|
|
width: 80,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
show: true
|
|
|
|
|
|
}
|
2021-04-23 18:10:25 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
],
|
|
|
|
|
|
assetListAll: false,
|
|
|
|
|
|
assetListHalf: false,
|
2021-04-15 11:47:44 +08:00
|
|
|
|
assetTableTitle: [
|
2021-04-23 18:10:25 +08:00
|
|
|
|
{
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.name'),
|
2021-04-23 18:10:25 +08:00
|
|
|
|
prop: 'name',
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
allowed: true,
|
|
|
|
|
|
minWidth: '200'
|
|
|
|
|
|
},
|
2021-04-15 11:47:44 +08:00
|
|
|
|
{
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.sn'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'sn',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '200'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.manageIp'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'manageIp',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '200'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.brand'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'brand',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.model'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'model',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.dc'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'dc',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.cabinet'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'cabinet',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.type'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'type',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}, {
|
2021-04-25 16:28:09 +08:00
|
|
|
|
label: this.$t('asset.state'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
prop: 'state',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
show: true,
|
|
|
|
|
|
minWidth: '100'
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}],
|
2021-03-19 18:52:19 +08:00
|
|
|
|
typeList: [],
|
|
|
|
|
|
dcList: [],
|
2021-04-15 11:47:44 +08:00
|
|
|
|
modelList: [],
|
|
|
|
|
|
assetTableData: [],
|
2021-04-16 15:02:40 +08:00
|
|
|
|
assetSelection: [],
|
|
|
|
|
|
endpointSelection: [],
|
|
|
|
|
|
selectAssetAll: 0,
|
|
|
|
|
|
endpointTableData: [],
|
2021-04-15 11:47:44 +08:00
|
|
|
|
seachLabel: [],
|
|
|
|
|
|
searchMsg: { // 给搜索框子组件传递的信息
|
|
|
|
|
|
zheze_none: true,
|
|
|
|
|
|
searchLabelList: [{
|
|
|
|
|
|
id: 10,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.sn'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'sn',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.name'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'name',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2021-04-16 15:02:40 +08:00
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.manageIp'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'manageIp',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.brand'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'brand',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.model'),
|
2021-04-15 11:47:44 +08:00
|
|
|
|
type: 'input',
|
2021-04-16 15:02:40 +08:00
|
|
|
|
label: 'model',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.dc'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'dc',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.cabinet'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'cabinet',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.type'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'type',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 11,
|
2021-04-25 16:28:09 +08:00
|
|
|
|
name: this.$t('asset.state'),
|
2021-04-16 15:02:40 +08:00
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'state',
|
2021-04-15 11:47:44 +08:00
|
|
|
|
disabled: false
|
|
|
|
|
|
}]
|
2021-07-02 14:03:17 +08:00
|
|
|
|
},
|
|
|
|
|
|
showError: false,
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
clickOutside () {
|
|
|
|
|
|
this.esc(false)
|
|
|
|
|
|
},
|
2020-02-26 18:26:55 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
/* 关闭弹框 */
|
|
|
|
|
|
esc (refresh) {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
this.$emit('close', refresh)
|
|
|
|
|
|
},
|
2019-12-19 17:22:18 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
/* 获取project列表 */
|
|
|
|
|
|
getProjectList () {
|
2021-04-14 18:55:01 +08:00
|
|
|
|
this.$get('monitor/project', { pageSize: -1, pageNo: 1 }).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.projectList = response.data.list
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.getModuleList(this.currentProject.id)
|
2019-12-23 17:39:15 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
// 获取endpoint弹框中module下拉框数据
|
|
|
|
|
|
getModuleList (projectId) {
|
|
|
|
|
|
this.$get('monitor/module', { projectIds: projectId, pageSize: -1 }).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
if (response.code === 200) {
|
2021-04-16 15:02:40 +08:00
|
|
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const param = response.data.list[i].param || '{}'
|
|
|
|
|
|
const tempObj = JSON.parse(param)
|
|
|
|
|
|
const labels = response.data.list[i].labels || '{}'
|
|
|
|
|
|
const tempObj1 = JSON.parse(labels)
|
|
|
|
|
|
response.data.list[i].paramObj = []
|
|
|
|
|
|
response.data.list[i].labelsModule = []
|
|
|
|
|
|
for (const k in tempObj) {
|
|
|
|
|
|
response.data.list[i].paramObj.push({ key: k, value: tempObj[k] })
|
2020-11-18 17:32:20 +08:00
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
for (const k in tempObj1) {
|
|
|
|
|
|
response.data.list[i].labelsModule.push({ key: k, value: tempObj1[k] })
|
2020-11-18 17:32:20 +08:00
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
} catch (err) {
|
|
|
|
|
|
// console.info(response.data.list[i], err);
|
2020-11-18 17:32:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.moduleList = response.data.list
|
2020-10-29 10:09:51 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2019-12-19 17:22:18 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
changeProject (project) {
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.currentModule = {}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.endpoint.moduleId = ''
|
|
|
|
|
|
this.endpoint.projectId = project.id
|
|
|
|
|
|
this.editParamBox.show = false
|
|
|
|
|
|
this.editLabelsBox.show = false
|
|
|
|
|
|
this.tempParamObj = []
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.endpointTableData = []
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.getAssetList()
|
|
|
|
|
|
this.getModuleList(project.id)
|
|
|
|
|
|
},
|
2019-12-24 17:31:51 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
changeModule (module) {
|
|
|
|
|
|
this.endpoint.moduleId = module.id
|
|
|
|
|
|
this.editParamBox.show = false
|
|
|
|
|
|
this.editLabelsBox.show = false
|
|
|
|
|
|
this.tempParamObj = []
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.endpointTableData = []
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
handleSizeChange (val) {
|
|
|
|
|
|
this.getAssetList()
|
|
|
|
|
|
},
|
|
|
|
|
|
handleCurrentChange () {
|
|
|
|
|
|
this.$refs.jumpInput.blur()
|
|
|
|
|
|
if (this.pages.pageNo > this.pages.pages) {
|
|
|
|
|
|
this.pages.pageNo = this.pageObj.pageNo
|
|
|
|
|
|
return
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.pageObj.pageNo = this.pages.pageNo
|
|
|
|
|
|
this.getAssetList()
|
2021-03-19 18:52:19 +08:00
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
search (seachLabel) {
|
|
|
|
|
|
this.seachLabel = { ...seachLabel }
|
|
|
|
|
|
this.getAssetList()
|
|
|
|
|
|
},
|
|
|
|
|
|
// 获取endpoint弹框中的asset子弹框里asset列表数据
|
|
|
|
|
|
getAssetList () {
|
|
|
|
|
|
this.assetLoading = true
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
...this.pageObj,
|
|
|
|
|
|
...this.seachLabel
|
|
|
|
|
|
}
|
|
|
|
|
|
this.$get('asset/asset', params).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
if (response.code === 200) {
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.assetTableData = response.data.list
|
|
|
|
|
|
this.pages.pages = response.data.pages
|
|
|
|
|
|
this.pages.total = response.data.total
|
|
|
|
|
|
this.pages.pageNo = response.data.pageNo
|
2019-12-24 17:31:51 +08:00
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.assetLoading = false
|
|
|
|
|
|
}, 200)
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
handleSelectionChangeAsset (val) {
|
|
|
|
|
|
this.assetSelection = val
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSelectionChangeEndpoint (val) {
|
|
|
|
|
|
this.endpointSelection = val
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
// 保存endpoint
|
|
|
|
|
|
save () {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.endpoint.projectId = this.currentProject.id
|
|
|
|
|
|
this.endpoint.moduleId = this.currentModule.id
|
|
|
|
|
|
if (this.endpointTableData.length === 0) {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.endpointTouch = true
|
|
|
|
|
|
this.$refs.addEndpoint.validate()
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
// 对endpointList进行处理,避免携带过多无用数据
|
|
|
|
|
|
const endpointList = []
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.endpointTableData.forEach((item, index) => {
|
|
|
|
|
|
const endpoint = {
|
|
|
|
|
|
moduleId: item.moduleId,
|
|
|
|
|
|
assetId: item.assetId,
|
|
|
|
|
|
name: item.name,
|
2021-04-22 18:03:56 +08:00
|
|
|
|
configs: JSON.stringify(item.configs)
|
2021-04-16 15:02:40 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
endpointList.push(endpoint)
|
|
|
|
|
|
})
|
2021-07-02 14:03:17 +08:00
|
|
|
|
if (endpointList.length === 0) {
|
|
|
|
|
|
this.showError = true
|
|
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$refs.addEndpoint.validate((valid) => {
|
2021-07-02 14:03:17 +08:00
|
|
|
|
if (valid && !this.showError) {
|
2021-04-15 11:47:44 +08:00
|
|
|
|
this.$post('monitor/endpoint', endpointList).then(response => {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.prevent_opt.save = false
|
2019-12-19 17:22:18 +08:00
|
|
|
|
if (response.code === 200) {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
|
|
|
|
|
|
this.esc(true)
|
2019-12-19 17:22:18 +08:00
|
|
|
|
} else {
|
2021-03-19 18:52:19 +08:00
|
|
|
|
this.$message.error(response.msg)
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
return false
|
2020-11-21 11:44:44 +08:00
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2020-01-02 18:13:01 +08:00
|
|
|
|
|
2021-03-19 18:52:19 +08:00
|
|
|
|
// 删除endpoint
|
|
|
|
|
|
del () {
|
|
|
|
|
|
if (this.prevent_opt.save) { return } ;
|
|
|
|
|
|
this.prevent_opt.save = true
|
|
|
|
|
|
this.$confirm(this.$t('tip.confirmDelete'), {
|
|
|
|
|
|
confirmButtonText: this.$t('tip.yes'),
|
|
|
|
|
|
cancelButtonText: this.$t('tip.no'),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$delete('endpoint?ids=' + this.endpoint.id).then(response => {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.deleteSuccess') })
|
|
|
|
|
|
this.esc(true)
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
this.prevent_opt.save = false
|
|
|
|
|
|
})
|
2021-04-16 15:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
addEndpoint () {
|
2021-07-02 14:03:17 +08:00
|
|
|
|
this.showError = false
|
2021-04-23 11:47:38 +08:00
|
|
|
|
const arr = []
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.assetSelection.forEach(item => {
|
|
|
|
|
|
if (this.endpointTableData.find(endpoint => endpoint.assetId === item.id)) {
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const obj = {
|
|
|
|
|
|
assetId: item.id,
|
|
|
|
|
|
assetName: item.name,
|
2021-04-23 11:47:38 +08:00
|
|
|
|
// asset: item,
|
2021-05-21 18:29:40 +08:00
|
|
|
|
type: this.currentModule.type,
|
|
|
|
|
|
projectId: this.currentModule.projectId,
|
|
|
|
|
|
configs: { ...JSON.parse(this.currentModule.configs), host: item.manageIp },
|
|
|
|
|
|
moduleId: this.currentModule.id
|
2021-04-16 15:02:40 +08:00
|
|
|
|
}
|
2021-05-21 18:29:40 +08:00
|
|
|
|
obj.name = this.currentModule.endpointNameTmpl
|
2021-04-23 11:47:38 +08:00
|
|
|
|
obj.configs = JSON.stringify(obj.configs)
|
|
|
|
|
|
arr.push(obj)
|
2021-04-16 15:02:40 +08:00
|
|
|
|
})
|
2021-04-23 11:47:38 +08:00
|
|
|
|
this.$put('monitor/endpoint/render', arr).then(res => {
|
2021-04-23 18:10:25 +08:00
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
res.data.list.forEach((item, index) => {
|
|
|
|
|
|
const obj = item
|
2021-07-01 19:15:08 +08:00
|
|
|
|
if (obj.name.length > 64) {
|
|
|
|
|
|
const length = obj.name.length - 64
|
|
|
|
|
|
const lastIndex = obj.name.lastIndexOf('-')
|
|
|
|
|
|
obj.name = obj.name.substring(0, 64 - length) + obj.name.substring(lastIndex)
|
|
|
|
|
|
}
|
2021-04-23 18:10:25 +08:00
|
|
|
|
obj.configs = JSON.parse(obj.configs)
|
|
|
|
|
|
obj.labelModule = []
|
|
|
|
|
|
if (obj.configs.labels !== '{}' && obj.configs.labels) {
|
|
|
|
|
|
Object.keys(obj.configs.labels).forEach(key => {
|
|
|
|
|
|
obj.labelModule.push({ key, value: obj.configs.labels[key] })
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
obj.labelModule.push({ key: '', value: '' })
|
|
|
|
|
|
}
|
|
|
|
|
|
obj.paramObj = []
|
|
|
|
|
|
if (obj.configs.params !== '{}' && obj.configs.params) {
|
|
|
|
|
|
Object.keys(obj.configs.params).forEach(key => {
|
|
|
|
|
|
obj.paramObj.push({ key, value: obj.configs.params[key] })
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
obj.paramObj.push({ key: '', value: [] })
|
|
|
|
|
|
}
|
|
|
|
|
|
this.endpointTableData.push({
|
|
|
|
|
|
...arr[index],
|
|
|
|
|
|
...obj
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2021-04-23 11:47:38 +08:00
|
|
|
|
})
|
2021-04-23 18:10:25 +08:00
|
|
|
|
this.assetTableData = [...this.assetTableData]
|
|
|
|
|
|
this.$refs.multipleTable.clearSelection()
|
2021-04-16 15:02:40 +08:00
|
|
|
|
},
|
|
|
|
|
|
removeEndpoint () {
|
|
|
|
|
|
if (this.endpointSelection.length === 0) {
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.endpointTableData = this.endpointTableData.filter(item => !this.endpointSelection.find(item1 => item1.assetId === item.assetId))
|
|
|
|
|
|
this.assetTableData = [...this.assetTableData]
|
|
|
|
|
|
},
|
|
|
|
|
|
setRowShow ({ row }) {
|
|
|
|
|
|
if (this.endpointTableData.find(endpoint => endpoint.assetId === row.id)) {
|
|
|
|
|
|
return 'hide-row'
|
|
|
|
|
|
}
|
|
|
|
|
|
return ''
|
|
|
|
|
|
},
|
|
|
|
|
|
editEndpointRow (u) {
|
2021-04-21 18:54:15 +08:00
|
|
|
|
this.optionType = 'add'
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.object = JSON.parse(JSON.stringify(u))
|
|
|
|
|
|
this.object.walk = this.object.configs.walk ? JSON.parse(JSON.stringify(this.object.configs.walk)) : []
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.object.configs.port && (this.object.port = this.object.configs.port)
|
2021-06-01 17:24:57 +08:00
|
|
|
|
// if (!this.object.enabled && !isNaN(this.object.enabled)) {
|
|
|
|
|
|
// this.object.enabled = 1
|
|
|
|
|
|
// }
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.rightBox.show = true
|
|
|
|
|
|
},
|
|
|
|
|
|
showRightBox () {
|
2021-04-21 18:54:15 +08:00
|
|
|
|
this.optionType = 'batch'
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.object = { ...JSON.parse(JSON.stringify(this.blankEndpoint)), projectId: this.currentModule.projectId, moduleId: this.currentModule.id, assetName: '', type: this.currentModule.type }
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.object.walk = this.object.configs.walk ? JSON.parse(JSON.stringify(this.object.configs.walk)) : []
|
2021-05-21 18:29:40 +08:00
|
|
|
|
this.object.configs.port && (this.object.port = this.object.configs.port)
|
2021-06-01 17:24:57 +08:00
|
|
|
|
// if (!this.object.enabled && !isNaN(this.object.enabled)) {
|
|
|
|
|
|
// this.object.enabled = 1
|
|
|
|
|
|
// }
|
2021-04-16 15:02:40 +08:00
|
|
|
|
this.rightBox.show = true
|
|
|
|
|
|
},
|
|
|
|
|
|
editAllEndpoint () {
|
|
|
|
|
|
this.endpointTableData.forEach((item, index) => {
|
2021-04-21 18:54:15 +08:00
|
|
|
|
if (this.endpointSelection.find(item1 => item1.assetId === item.assetId)) {
|
|
|
|
|
|
this.endpointTableData[index] = { ...this.endpointTableData[index], ...this.blankEndpoint }
|
|
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
})
|
|
|
|
|
|
this.endpointTableData = [...this.endpointTableData]
|
|
|
|
|
|
},
|
|
|
|
|
|
closeRightBox (isEdit, endpoint, isAll) {
|
|
|
|
|
|
this.rightBox.show = false
|
|
|
|
|
|
if (!isEdit) { return }
|
|
|
|
|
|
if (isAll) {
|
|
|
|
|
|
Object.keys(this.blankEndpoint).forEach(key => {
|
|
|
|
|
|
this.blankEndpoint[key] = endpoint[key]
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.endpointTableData.forEach((item, index) => {
|
|
|
|
|
|
if (item.assetId === endpoint.assetId) {
|
|
|
|
|
|
this.endpointTableData[index] = { ...endpoint }
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
this.endpointTableData = [...this.endpointTableData]
|
|
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
created () {
|
|
|
|
|
|
this.getProjectList()
|
|
|
|
|
|
this.getAssetList()
|
|
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
endpointList (n, o) {
|
|
|
|
|
|
this.endpoint.endpointList = n
|
|
|
|
|
|
if (n.length > 0) {
|
|
|
|
|
|
this.paramBorderColor = '#dcdfe6'
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.paramBorderColor = '#F56C6C'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2021-04-16 15:02:40 +08:00
|
|
|
|
assetTableData: {
|
|
|
|
|
|
handler (n) {
|
|
|
|
|
|
if (n) {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
const domarr = document.getElementsByClassName('hide-row')
|
|
|
|
|
|
this.selectAssetAll = domarr.length === this.pageObj.pageSize
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2021-03-19 18:52:19 +08:00
|
|
|
|
currentProject: {
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
currentModule: {
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
handler (n, o) {
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-03-19 18:52:19 +08:00
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2020-09-16 09:53:41 +08:00
|
|
|
|
.nz-icon.nz-icon-shanchu1 {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
/* start--param*/
|
|
|
|
|
|
.param-btn {
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
height: 27px;
|
|
|
|
|
|
margin-top: -3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-btn-active {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
border: 1px solid #656565;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-btn-active:hover, .param-btn-active:focus {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-btn-clear {
|
|
|
|
|
|
background-color: #D4D4D4;
|
|
|
|
|
|
border: 1px solid #D4D4D4;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-btn-clear:hover, .param-btn-clear:focus {
|
|
|
|
|
|
background-color: #D4D4D4;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.param-box {
|
2019-12-23 17:39:15 +08:00
|
|
|
|
height: 200px;
|
|
|
|
|
|
overflow: auto;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
border: none;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
.param-box-row {
|
2020-04-17 12:48:46 +08:00
|
|
|
|
padding: 7px 10px 0 10px;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-box-row:last-of-type {
|
|
|
|
|
|
padding-bottom: 7px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.param-box-row-key, .param-box-row-value {
|
|
|
|
|
|
display: inline-block;
|
2019-12-23 17:39:15 +08:00
|
|
|
|
width: 50px;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
.param-box-row-eq {
|
|
|
|
|
|
display: inline-block;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
width: 14px;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
text-align: center;
|
2019-12-23 17:39:15 +08:00
|
|
|
|
height: 22px;
|
|
|
|
|
|
line-height: 22px;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
color: #c4c7cF;
|
|
|
|
|
|
}
|
|
|
|
|
|
/* end--param*/
|
2019-12-20 17:18:30 +08:00
|
|
|
|
|
|
|
|
|
|
/* begin--小盒子*/
|
|
|
|
|
|
.right-child-boxes {
|
2020-10-15 09:28:40 +08:00
|
|
|
|
height: calc(100% - 120px);
|
2019-12-20 17:18:30 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-to-right-symbol {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: calc(50% - 28px);
|
|
|
|
|
|
left: 274px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.right-child-box {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.assets-box {
|
|
|
|
|
|
float: left;
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
border-radius: 4px;
|
2021-02-09 15:14:19 +08:00
|
|
|
|
width: 320px;
|
2019-12-20 17:18:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoints-box {
|
2021-02-09 15:14:19 +08:00
|
|
|
|
margin: 0 0 0 340px;
|
|
|
|
|
|
width: 445px;
|
2019-12-20 17:18:30 +08:00
|
|
|
|
}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
.endpoints-box.endpoints-box-snmp {
|
|
|
|
|
|
width: 380px;
|
|
|
|
|
|
}
|
2019-12-20 17:18:30 +08:00
|
|
|
|
.right-child-box .el-input-group {
|
|
|
|
|
|
width: 187px;
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
margin: 7px 5px 0 0;
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.right-child-box .module-info .el-input {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.right-child-box .module-info {
|
|
|
|
|
|
display: inline-block;
|
2020-01-17 16:06:35 +08:00
|
|
|
|
height: 22px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
position: absolute;
|
2019-12-23 17:39:15 +08:00
|
|
|
|
top: 5px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
2019-12-20 17:18:30 +08:00
|
|
|
|
.right-child-box-title {
|
2020-10-15 09:28:40 +08:00
|
|
|
|
padding: 9px 0 0 9px;
|
2019-12-20 17:18:30 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.endpoints-box-module-info {
|
|
|
|
|
|
background: #eeeeee;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 33px;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoints-box-module-info .title {
|
|
|
|
|
|
line-height: 33px;
|
|
|
|
|
|
color: #5e5e5e;
|
|
|
|
|
|
padding-left: 5px;
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
}
|
|
|
|
|
|
.module-info-port {
|
2019-12-31 19:02:58 +08:00
|
|
|
|
width: 53px;
|
2020-11-10 14:11:29 +08:00
|
|
|
|
right: 309px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
.module-info-port-snmp {
|
2020-11-10 14:11:29 +08:00
|
|
|
|
right: 142px;
|
2020-04-02 20:23:52 +08:00
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.module-info-param {
|
2019-12-31 19:02:58 +08:00
|
|
|
|
width: 89px;
|
|
|
|
|
|
right: 116px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
2020-11-10 14:11:29 +08:00
|
|
|
|
.module-info-labels {
|
|
|
|
|
|
width: 89px;
|
|
|
|
|
|
right: 216px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.module-info-labels-snmp {
|
|
|
|
|
|
right: 50px;
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.module-info-path {
|
2020-02-14 18:01:48 +08:00
|
|
|
|
width: 70px;
|
|
|
|
|
|
right: 42px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
2019-12-23 17:39:15 +08:00
|
|
|
|
.endpoint-info-param {
|
|
|
|
|
|
width: 80px;
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.right-child-box .module-info-cover {
|
|
|
|
|
|
right: 4px;
|
2020-02-14 18:01:48 +08:00
|
|
|
|
padding: 0px 6px;
|
|
|
|
|
|
margin-right: 5px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoints-box-endpoints {
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #dcdfe6;
|
|
|
|
|
|
height: calc(100% - 39px);
|
|
|
|
|
|
margin-top: 6px;
|
2020-01-02 18:13:01 +08:00
|
|
|
|
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoint-param-pop{
|
|
|
|
|
|
max-height: 200px;
|
|
|
|
|
|
overflow: auto;
|
|
|
|
|
|
}
|
2019-12-20 17:18:30 +08:00
|
|
|
|
/* end--小盒子*/
|
|
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
|
/* begin--子弹框*/
|
|
|
|
|
|
.right-sub-box {
|
2019-12-23 17:39:15 +08:00
|
|
|
|
width: 170px;
|
|
|
|
|
|
height: 225px;
|
|
|
|
|
|
position: fixed;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
z-index: 2;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
padding: 0;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
/* begin--搜索框*/
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search {
|
|
|
|
|
|
position: relative;
|
2020-11-18 17:32:20 +08:00
|
|
|
|
margin: 0;
|
|
|
|
|
|
z-index: 11;
|
2020-02-20 11:38:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoint-asset-search button {
|
2020-04-20 17:21:52 +08:00
|
|
|
|
height: 24px !important;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search-dropdown {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
position: absolute;
|
2020-02-20 18:14:38 +08:00
|
|
|
|
top: 25px;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
background-color: #444;
|
2020-11-18 17:32:20 +08:00
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
width: 58px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
left: 0;
|
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search-dropdown-item {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
height: 22px;
|
|
|
|
|
|
cursor: default;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
color: white;
|
|
|
|
|
|
font-size: 12px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoint-asset-label-txt {
|
|
|
|
|
|
display: inline-block;
|
2020-11-12 11:00:40 +08:00
|
|
|
|
min-width: 19px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search-dropdown-item:first-of-type {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search-dropdown-item:last-of-type {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
border-radius: 0 0 4px 4px;
|
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
.endpoint-asset-search-dropdown-item:hover {
|
|
|
|
|
|
background-color: #222;
|
|
|
|
|
|
color: #ff9900;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-asset-search-input {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
width: 100px;
|
2020-01-16 18:11:15 +08:00
|
|
|
|
vertical-align: top;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2020-11-05 16:41:58 +08:00
|
|
|
|
.checkbox-mc{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 14px;
|
|
|
|
|
|
height: 14px;
|
|
|
|
|
|
z-index:1;
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
/* end--搜索框*/
|
2019-12-31 19:02:58 +08:00
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
|
/* begin--table*/
|
|
|
|
|
|
.endpoint-sub-table {
|
2020-11-18 17:32:20 +08:00
|
|
|
|
padding-top: 13px;
|
2020-11-05 13:35:08 +08:00
|
|
|
|
height: calc(100% - 83px);
|
2021-02-09 17:12:42 +08:00
|
|
|
|
width: 320px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
.line-100 {
|
|
|
|
|
|
margin-bottom: 3px;
|
2021-02-09 15:14:19 +08:00
|
|
|
|
width: 320px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoint-sub-table-head {
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
height: 30px;
|
2020-11-18 17:32:20 +08:00
|
|
|
|
width: 600px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2019-12-25 17:15:09 +08:00
|
|
|
|
.endpoint-sub-table-row, .endpoint-sub-table-row-disabled {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
color: #656565;
|
2020-02-20 11:38:23 +08:00
|
|
|
|
position: relative;
|
2020-11-18 17:32:20 +08:00
|
|
|
|
width: 600px;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.endpoint-sub-table-row:hover {
|
|
|
|
|
|
background-color: #dadada;
|
|
|
|
|
|
cursor: default;
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
.endpoint-sub-table-row-active {
|
|
|
|
|
|
background-color: #dadada;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-sub-table-row-selected {
|
|
|
|
|
|
background-color: #656565;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-sub-table-col {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
padding-left: 10px;
|
2020-11-18 17:32:20 +08:00
|
|
|
|
width: 100px;
|
2020-01-16 17:54:04 +08:00
|
|
|
|
text-overflow: ellipsis;
|
2020-01-17 16:06:35 +08:00
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
.endpoint-sub-table-paginate-all {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 10px;
|
|
|
|
|
|
bottom: 17px;
|
|
|
|
|
|
color: #5a5a5a;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-sub-table-body {
|
|
|
|
|
|
font-size: 15px;
|
2019-12-25 17:15:09 +08:00
|
|
|
|
position: relative;
|
2020-04-28 11:48:13 +08:00
|
|
|
|
height: calc(100% - 37px);
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2019-12-25 17:15:09 +08:00
|
|
|
|
.endpoint-sub-table-body-dialog {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2020-02-20 11:38:23 +08:00
|
|
|
|
background-color: rgba(255, 255, 255, 0.7);
|
2019-12-25 17:15:09 +08:00
|
|
|
|
position: absolute;
|
2020-11-05 13:35:08 +08:00
|
|
|
|
z-index: 10;
|
|
|
|
|
|
top: 0;
|
2019-12-25 17:15:09 +08:00
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.endpoints-clear-btn {
|
2019-12-31 19:02:58 +08:00
|
|
|
|
margin: 6px 0 0 7px;
|
2019-12-20 22:00:04 +08:00
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
.asset-and-endpoint{
|
2021-04-15 11:47:44 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
height: 480px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.right-box-asset-table{
|
|
|
|
|
|
width: 37.5%;
|
|
|
|
|
|
margin-right: 2%;
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
border: 1px solid #E7EAED;
|
|
|
|
|
|
border-radius: 2px;
|
2021-04-16 15:02:40 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
.disabled-asset-table{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
width: calc(100% - 2px);
|
|
|
|
|
|
height: calc(100% - 2px);
|
|
|
|
|
|
z-index: 2;
|
|
|
|
|
|
background: #999999;
|
|
|
|
|
|
left: 1px;
|
|
|
|
|
|
top: 1px;
|
|
|
|
|
|
opacity: 0.1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.asset-allselect{
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translate(-50%,-50%);
|
2021-04-15 11:47:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
.right-box-endpoint-table{
|
2021-04-16 15:02:40 +08:00
|
|
|
|
|
|
|
|
|
|
width: 60%;
|
2021-04-15 11:47:44 +08:00
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
border: 1px solid #E7EAED;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
/* end--table*/
|
|
|
|
|
|
|
|
|
|
|
|
/* end--子弹框*/
|
2021-04-16 15:02:40 +08:00
|
|
|
|
.search-box{
|
|
|
|
|
|
width: calc(100% - 10px);
|
|
|
|
|
|
padding: 10px 5px;
|
|
|
|
|
|
border-bottom: 1px solid #E7EAED;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
}
|
|
|
|
|
|
/deep/ .new-search .search-input-all{
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
.jump-input{
|
|
|
|
|
|
width: 38px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.jump-pages{
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
line-height: 24px !important;
|
|
|
|
|
|
height: 24px !important;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
margin-left: 5px;
|
|
|
|
|
|
min-width: auto !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
/deep/ .jump-input .el-input__inner{
|
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.table-bottom{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
/deep/ .el-pagination .btn-next, /deep/ .el-pagination .btn-prev{
|
|
|
|
|
|
margin-top: 3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.add-endpoint{
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
background: #F9F9F9;
|
2021-04-27 17:38:58 +08:00
|
|
|
|
border: 1px solid #dedede;
|
2021-04-16 15:02:40 +08:00
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
margin: 7px 7px 0 0;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.top-tool-btn{
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
width: 32px;
|
2021-04-27 17:38:58 +08:00
|
|
|
|
border: 1px solid #dedede;
|
2021-04-16 15:02:40 +08:00
|
|
|
|
outline: none;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
background-color: #F9F9F9;
|
|
|
|
|
|
-webkit-transition: background-color linear .1s;
|
|
|
|
|
|
transition: background-color linear .1s;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.top-tool-btn:hover{
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
.top-tool-btn:focus{
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-color: #FBCEA4;
|
|
|
|
|
|
}
|
|
|
|
|
|
.top-tool-btn:focus .nz-icon{
|
|
|
|
|
|
color: #FBCEA4;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-table-btn{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</style>
|
2020-11-18 17:32:20 +08:00
|
|
|
|
<style lang="scss">
|
2021-04-16 15:02:40 +08:00
|
|
|
|
.el-table__row.hide-row{
|
|
|
|
|
|
display: none !important;
|
|
|
|
|
|
}
|
2020-11-26 14:16:46 +08:00
|
|
|
|
.right-box-add-endpoint {
|
|
|
|
|
|
.right-box-form>.el-form-item {
|
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.right-box-form-left.right-box-form .el-form-item .el-form-item__label {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
.asset-table /deep/ .el-table td ,.asset-table /deep/ .el-table th{
|
|
|
|
|
|
padding: 3px 0 !important;
|
|
|
|
|
|
}
|
2020-11-26 14:16:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-11-18 17:32:20 +08:00
|
|
|
|
.endpoint-asset-search .el-autocomplete>.el-input {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-asset-search .el-select {
|
|
|
|
|
|
width: 100px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoint-asset-search .el-cascader .el-input {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
line-height: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
.endpoints-box-endpoints-title {
|
|
|
|
|
|
color: black;
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
}
|
2021-04-16 15:02:40 +08:00
|
|
|
|
|
|
|
|
|
|
.right-box-endpoint-table .cell {
|
2019-12-20 22:00:04 +08:00
|
|
|
|
padding: 0 2px 0 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoints-box-endpoints .el-table .el-table__row td{
|
|
|
|
|
|
padding: 5px 0;
|
|
|
|
|
|
}
|
2019-12-23 17:39:15 +08:00
|
|
|
|
.module-info-param.el-input.is-disabled .el-input__inner, .endpoint-info-param.el-input.is-disabled .el-input__inner,
|
|
|
|
|
|
.endpoint-info-param.el-input.is-disabled .el-input__inner, .endpoint-info-param.el-input.is-disabled .el-input__inner {
|
2019-12-20 22:00:04 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
background-color: white;
|
|
|
|
|
|
border-color: #DCDFE6;
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
transition: border-color .2s cubic-bezier(.645,.045,.355,1);
|
|
|
|
|
|
}
|
2019-12-23 17:39:15 +08:00
|
|
|
|
.module-info-param.el-input.is-disabled .el-input__inner:hover, .endpoint-info-param.el-input.is-disabled .el-input__inner:hover,
|
|
|
|
|
|
.endpoint-info-param.el-input.is-disabled .el-input__inner:hover, .endpoint-info-param.el-input.is-disabled .el-input__inner:hover {
|
2019-12-20 22:00:04 +08:00
|
|
|
|
border-color: #c0c4cc;
|
|
|
|
|
|
}
|
2020-01-02 18:13:01 +08:00
|
|
|
|
|
|
|
|
|
|
.endpoints-box-endpoints .el-form-item {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.endpoints-box-endpoints .el-form-item.is-error {
|
|
|
|
|
|
margin-bottom: 22px;
|
|
|
|
|
|
}
|
2020-11-10 15:57:57 +08:00
|
|
|
|
.input-error .el-input__inner,.input-error .el-input__inner:hover,.input-error .el-input__inner:focus,
|
|
|
|
|
|
.input-error .input__inner,.input-error .input__inner:hover,.input-error .input__inner:focus {
|
|
|
|
|
|
border-color: #F56C6C !important;
|
|
|
|
|
|
}
|
2020-11-18 17:32:20 +08:00
|
|
|
|
|
|
|
|
|
|
.asset-tip {
|
|
|
|
|
|
display: table;
|
|
|
|
|
|
|
|
|
|
|
|
.tip-row {
|
|
|
|
|
|
display: table-row;
|
|
|
|
|
|
|
|
|
|
|
|
.tip-cell {
|
|
|
|
|
|
display: table-cell;
|
|
|
|
|
|
padding: 2px 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2021-07-02 14:03:17 +08:00
|
|
|
|
.error{
|
|
|
|
|
|
border-color: #F56C6C !important;
|
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
|
</style>
|