2019-12-18 17:00:44 +08:00
|
|
|
<template>
|
2020-01-03 18:10:26 +08:00
|
|
|
<transition name="right-box-840">
|
2019-12-24 17:31:51 +08:00
|
|
|
<div class="right-box right-box-add-endpoint" v-if="rightBox.show" @mousedown="showEditParamBox(false)">
|
2019-12-18 17:00:44 +08:00
|
|
|
<!-- begin--顶部按钮-->
|
|
|
|
|
<div class="right-box-top-btns">
|
2020-01-13 18:48:25 +08:00
|
|
|
<button type="button" @click="save" class="nz-btn nz-btn-size-normal nz-btn-style-normal" id="ep-add">
|
2019-12-31 19:02:58 +08:00
|
|
|
<span class="top-tool-btn-txt">{{$t('overall.save')}}</span>
|
|
|
|
|
</button>
|
2020-01-13 18:48:25 +08:00
|
|
|
<button type="button" @click="esc" class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-style-square" id="ep-esc">
|
2019-12-31 19:02:58 +08:00
|
|
|
<span class="top-tool-btn-txt"><i class="el-icon-close"></i></span>
|
|
|
|
|
</button>
|
2019-12-18 17:00:44 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- end--顶部按钮-->
|
|
|
|
|
|
|
|
|
|
<!-- begin--标题-->
|
|
|
|
|
<div class="right-box-title">{{rightBox.title}}</div>
|
|
|
|
|
<!-- end--标题-->
|
|
|
|
|
|
|
|
|
|
<!-- begin--表单-->
|
2019-12-31 19:02:58 +08:00
|
|
|
<el-scrollbar class="right-box-form-box">
|
|
|
|
|
<el-form class="right-box-form" label-position="top" ref="addEndpointForm" :model="endpointForm" :rules="rules">
|
|
|
|
|
<!--project-->
|
|
|
|
|
<el-form-item :label='$t("project.project.project")' prop="projectId">
|
2019-12-24 17:31:51 +08:00
|
|
|
<el-select @change="((val) => {changeProject(val)})" value-key="id" popper-class="config-dropdown" v-model="currentProject" placeholder="" size="small">
|
2020-01-13 18:48:25 +08:00
|
|
|
<el-option v-for="item in projectList" :key="item.id" :label="item.name" :value="item" :id="'project-'+item.id"></el-option>
|
2019-12-18 17:00:44 +08:00
|
|
|
</el-select>
|
2019-12-31 19:02:58 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<!--module-->
|
|
|
|
|
<el-form-item :label='$t("project.module.module")' prop="moduleId">
|
2019-12-24 17:31:51 +08:00
|
|
|
<el-select @change="((val) => {changeModule(val)})" value-key="id" popper-class="config-dropdown" v-model="currentModuleCopy" placeholder="" size="small">
|
2020-01-13 18:48:25 +08:00
|
|
|
<el-option v-for="item in moduleList" :key="item.id" :label="item.name" :value="item" :id="'module-'+item.id"></el-option>
|
2019-12-18 17:00:44 +08:00
|
|
|
</el-select>
|
2019-12-31 19:02:58 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
<!--asset和endpoint-->
|
|
|
|
|
<div class="right-box-form-row right-child-boxes">
|
|
|
|
|
<div class="right-child-box assets-box">
|
|
|
|
|
<!--begin--标题-->
|
|
|
|
|
<div class="right-child-box-title">{{$t('asset.asset')}}</div>
|
|
|
|
|
<!--end--标题-->
|
|
|
|
|
<!--begin--搜索框-->
|
|
|
|
|
<div class="endpoint-asset-search">
|
2020-01-13 18:48:25 +08:00
|
|
|
<button id="search-asset-drop" type="button" class="nz-btn nz-btn-size-small nz-btn-style-light nz-btn-style-square nz-input-group-prepend" @click="assetSearch.dropdownShow = !assetSearch.dropdownShow">
|
2019-12-31 19:02:58 +08:00
|
|
|
<span class="endpoint-asset-label-txt">{{assetSearch.label}}</span>
|
|
|
|
|
<span>
|
|
|
|
|
<i v-if="assetSearch.dropdownShow" class="el-icon-caret-top"></i>
|
|
|
|
|
<i v-if="!assetSearch.dropdownShow" class="el-icon-caret-bottom"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</button><div
|
|
|
|
|
class="endpoint-asset-search-input">
|
|
|
|
|
<el-input class="input-x-mini nz-input-group-middle" placeholder="" v-model="assetSearch.text"></el-input>
|
|
|
|
|
</div><button
|
2020-01-13 18:48:25 +08:00
|
|
|
type="button" class="nz-btn nz-btn-size-small nz-btn-style-light nz-btn-style-square nz-input-group-append" id="search-asset"><i @click="searchAsset" class="el-icon-search"></i></button>
|
2019-12-31 19:02:58 +08:00
|
|
|
|
|
|
|
|
<div class="endpoint-asset-search-dropdown" v-if="assetSearch.dropdownShow">
|
2020-01-13 18:48:25 +08:00
|
|
|
<div @click="dropdownSelect('IP')" class="endpoint-asset-search-dropdown-item" id="search-asset-ip">IP</div>
|
|
|
|
|
<div @click="dropdownSelect('SN')" class="endpoint-asset-search-dropdown-item" id="search-asset-sn">SN</div>
|
2019-12-20 17:18:30 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
|
|
|
|
|
<!--end--搜索框-->
|
|
|
|
|
<!-- begin--table-->
|
|
|
|
|
<div class="endpoint-sub-table">
|
|
|
|
|
<div class="endpoint-sub-table-head">
|
|
|
|
|
<div class="endpoint-sub-table-col">IP</div>
|
|
|
|
|
<div class="endpoint-sub-table-col">SN</div>
|
2019-12-20 17:18:30 +08:00
|
|
|
</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
<div class="line-100"></div>
|
|
|
|
|
<div class="endpoint-sub-table-body">
|
|
|
|
|
<div v-if="!currentModuleCopy.id" class="endpoint-sub-table-body-dialog"></div>
|
2020-01-13 18:48:25 +08:00
|
|
|
<div @click="selectAsset(item, index)" :data="item.id" v-for="item,index in assetList" class="endpoint-sub-table-row" :id="'select-asset-'+item.id">
|
2019-12-31 19:02:58 +08:00
|
|
|
<div class="endpoint-sub-table-col">{{item.host}}</div>
|
|
|
|
|
<div class="endpoint-sub-table-col">{{item.sn}}</div>
|
|
|
|
|
</div>
|
2019-12-20 22:00:04 +08:00
|
|
|
</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
</div>
|
|
|
|
|
<!--end--table-->
|
2019-12-20 22:00:04 +08:00
|
|
|
</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
<!--右侧endpoint列表-->
|
|
|
|
|
<div class="right-child-box endpoints-box">
|
|
|
|
|
<!--module-->
|
|
|
|
|
<div class="endpoints-box-module-info">
|
|
|
|
|
<div class="title">{{$t('project.endpoint.moduleParameter')}}:</div>
|
|
|
|
|
<el-input class="module-info module-info-port input-x-mini" v-model="currentModuleCopy.port"></el-input>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="bottom"
|
|
|
|
|
width="200"
|
|
|
|
|
trigger="hover"
|
2019-12-20 22:00:04 +08:00
|
|
|
>
|
2019-12-31 19:02:58 +08:00
|
|
|
<div class="endpoint-param-pop">
|
|
|
|
|
<div v-for="item,index in currentModuleCopy.paramObj">{{item.key}}={{item.value}}</div>
|
|
|
|
|
</div>
|
2020-01-13 18:48:25 +08:00
|
|
|
<el-input id="edit-param" @click.native.stop="showEditParamBox(true, currentModuleCopy, 1, $event)" slot="reference" disabled class="module-info module-info-param input-x-mini" v-model="currentModuleCopy.param"></el-input>
|
2019-12-31 19:02:58 +08:00
|
|
|
</el-popover>
|
|
|
|
|
<el-input class="module-info module-info-path input-x-mini" v-model="currentModuleCopy.path"></el-input>
|
2020-01-13 18:48:25 +08:00
|
|
|
<button type="button" id="cover-param" @click="coverEndpoint" class="nz-btn nz-btn-size-small nz-btn-style-light nz-btn-style-square module-info module-info-cover">{{$t('overall.cover')}}</button>
|
2019-12-31 19:02:58 +08:00
|
|
|
</div>
|
|
|
|
|
<!--endpoints-->
|
2020-01-02 18:13:01 +08:00
|
|
|
<div class="endpoints-box-endpoints" :style="{borderColor: endpointTouch ? paramBorderColor : '#dcdfe6'}">
|
2019-12-31 19:02:58 +08:00
|
|
|
<el-table
|
|
|
|
|
:data="endpointList"
|
|
|
|
|
ref="endpointTable"
|
|
|
|
|
style="width: 100%;border-radius: 4px;"
|
|
|
|
|
height="calc(100% - 36px)"
|
2020-01-02 18:13:01 +08:00
|
|
|
:row-class-name="setRowIndex"
|
2019-12-31 19:02:58 +08:00
|
|
|
empty-text=" ">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
width="25"
|
|
|
|
|
style="padding: 0 1px;">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label-class-name="endpoints-box-endpoints-title"
|
|
|
|
|
v-for="(title, index) in endpointTableTitle"
|
|
|
|
|
v-if="title.show"
|
|
|
|
|
:width="title.width"
|
|
|
|
|
:key="`col-${index}`"
|
|
|
|
|
:label="title.label"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope" :column="title">
|
|
|
|
|
<span v-if="title.prop == 'asset' && scope.row[title.prop]">{{scope.row[title.prop].host}}</span>
|
|
|
|
|
<span v-else-if="title.prop == 'param'">
|
|
|
|
|
<el-popover
|
2020-01-02 18:13:01 +08:00
|
|
|
v-if="!scope.row.isEdit"
|
2019-12-31 19:02:58 +08:00
|
|
|
placement="bottom"
|
|
|
|
|
width="200"
|
|
|
|
|
trigger="hover"
|
|
|
|
|
>
|
|
|
|
|
<div class="endpoint-param-pop">
|
|
|
|
|
<div v-for="p in scope.row.paramObj">{{p.key}}={{p.value}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span slot="reference">
|
2020-01-02 18:13:01 +08:00
|
|
|
<span @mousedown.stop>{{scope.row.param.length > 8 ? scope.row.param.substring(0, 8) + '...' : scope.row.param}}</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
</span>
|
|
|
|
|
</el-popover>
|
2020-01-02 18:13:01 +08:00
|
|
|
<span @mousedown.stop v-else @click.stop="showEditParamBox(true, scope.row, 2, $event)">
|
|
|
|
|
<el-form-item :prop="'endpointList[' + scope.row.index + '].param'" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}">
|
|
|
|
|
<el-input readonly class="endpoint-info endpoint-info-param input-x-mini" v-model="scope.row.param"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
</span>
|
|
|
|
|
<span v-else-if="title.prop == 'path'">
|
2020-01-02 18:13:01 +08:00
|
|
|
<el-popover
|
|
|
|
|
placement="bottom"
|
|
|
|
|
width="100"
|
|
|
|
|
trigger="hover"
|
|
|
|
|
:content="scope.row[title.prop]"
|
|
|
|
|
v-if="!scope.row.isEdit"
|
|
|
|
|
>
|
2020-01-13 18:48:25 +08:00
|
|
|
<span slot="reference" >
|
2020-01-02 18:13:01 +08:00
|
|
|
<span>{{scope.row.path.length > 5 ? scope.row.path.substring(0, 5) + '...' : scope.row.path}}</span>
|
|
|
|
|
</span>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<span @mousedown.stop v-else>
|
|
|
|
|
<el-form-item :prop="'endpointList[' + scope.row.index + '].path'" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}">
|
|
|
|
|
<el-input class="endpoint-info input-x-mini" v-model="scope.row.path"></el-input>
|
|
|
|
|
</el-form-item>
|
2019-12-23 17:39:15 +08:00
|
|
|
</span>
|
2020-01-02 18:13:01 +08:00
|
|
|
</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
<span v-else-if="title.prop == 'port'">
|
2020-01-02 18:13:01 +08:00
|
|
|
<span v-if="!scope.row.isEdit">{{scope.row.port}}</span>
|
|
|
|
|
<span @mousedown.stop v-else>
|
|
|
|
|
<el-form-item :prop="'endpointList[' + scope.row.index + '].port'" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}">
|
|
|
|
|
<el-input class="endpoint-info input-x-mini" v-model="scope.row.port"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
<span v-else-if="title.prop == 'host'">
|
2020-01-02 18:13:01 +08:00
|
|
|
<span v-if="!scope.row.isEdit">{{scope.row.host}}</span>
|
|
|
|
|
<span @mousedown.stop v-else>
|
|
|
|
|
<el-form-item :prop="'endpointList[' + scope.row.index + '].host'" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}">
|
|
|
|
|
<el-input class="endpoint-info input-x-mini" v-model="scope.row.host"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="" width="56">
|
|
|
|
|
<template slot-scope="scope" :column="title">
|
|
|
|
|
<div>
|
2020-01-13 18:48:25 +08:00
|
|
|
<span :id="'ep-asset-toedit-'+scope.row.assetId" v-if="!scope.row.isEdit" class="endpoint-box-row-symbol" @mousedown.stop @click="toEditEndpoint(scope.row)"><i class="el-icon-edit-outline"></i></span>
|
|
|
|
|
<span :id="'ep-asset-edit-'+scope.row.assetId" v-else class="endpoint-box-row-symbol" @mousedown.stop @click="editEndpoint(scope.row)"><i class="el-icon-check"></i></span>
|
|
|
|
|
<span :id="'ep-asset-remove-'+scope.row.assetId" class="endpoint-box-row-symbol" @click="removeEndpoint(scope.row)"><i class="nz-icon nz-icon-minus-square"></i></span>
|
2019-12-31 19:02:58 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
2020-01-02 18:13:01 +08:00
|
|
|
<div class="el-form-item__error" :style="{opacity: endpointTouch && this.endpointList.length == 0 ? '1' : '0'}" style="left: unset; transition: all .2s">{{$t('validate.required')}}</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
<div>
|
2020-01-13 18:48:25 +08:00
|
|
|
<button id="clear-select-asset" type="button" @click="clearSelection" class="nz-btn nz-btn-size-small nz-btn-style-light endpoints-clear-btn">{{$t('overall.clear')}}</button>
|
2019-12-31 19:02:58 +08:00
|
|
|
<span style="display: inline-block; font-size: 14px; float: right;line-height: 35px;padding-right: 15px;">All: {{this.endpointList.length}}</span>
|
|
|
|
|
</div>
|
2019-12-24 17:31:51 +08:00
|
|
|
</div>
|
2019-12-19 17:22:18 +08:00
|
|
|
</div>
|
2019-12-18 17:00:44 +08:00
|
|
|
</div>
|
2019-12-31 19:02:58 +08:00
|
|
|
</el-form>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
2019-12-31 19:02:58 +08:00
|
|
|
</el-scrollbar>
|
2019-12-19 17:22:18 +08:00
|
|
|
|
2019-12-23 17:39:15 +08:00
|
|
|
<!--start--param编辑框-->
|
|
|
|
|
<transition name="right-sub-box">
|
2019-12-24 17:31:51 +08:00
|
|
|
<div @mousedown.stop class="right-sub-box" v-if="editParamBox.show" :style="'top: ' + editParamBox.top + 'px; left: ' + editParamBox.left + 'px;'">
|
2019-12-23 17:39:15 +08:00
|
|
|
<div class="param-box">
|
|
|
|
|
<div class="param-box-row" v-for="(item, index) in tempParamObj">
|
2019-12-31 19:02:58 +08:00
|
|
|
<el-input placeholder="key" class="param-box-row-key input-x-mini" v-model="item.key"></el-input>
|
2019-12-23 17:39:15 +08:00
|
|
|
<span class="param-box-row-eq">=</span>
|
2019-12-31 19:02:58 +08:00
|
|
|
<el-input placeholder="value" class="param-box-row-value input-x-mini" v-model="item.value"></el-input>
|
2020-01-13 18:48:25 +08:00
|
|
|
<span class="param-box-row-symbol" :id="'remove-param-'+index" @click="removeParam(index)"><i class="nz-icon nz-icon-minus-square"></i></span>
|
2019-12-23 17:39:15 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 100%; text-align: center; height: 25px;">
|
2020-01-13 18:48:25 +08:00
|
|
|
<el-button @click="addParam" id="add-param" style="height: 18px; line-height: 18px; padding-top: 0; padding-bottom: 0;" size="mini"><i class="el-icon-plus"></i></el-button>
|
2019-12-23 17:39:15 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
<!--end--param编辑框-->
|
2019-12-18 17:00:44 +08:00
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "endpointBox",
|
|
|
|
|
props: {
|
|
|
|
|
currentProject: Object,
|
|
|
|
|
currentModule: Object
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2019-12-31 19:02:58 +08:00
|
|
|
rules: {
|
|
|
|
|
projectId: [
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
moduleId: [
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
|
|
|
|
],
|
|
|
|
|
},
|
2020-01-02 18:13:01 +08:00
|
|
|
paramBorderColor: '#dcdfe6',
|
|
|
|
|
endpointTouch: false,
|
|
|
|
|
endpointForm: {projectId: '', moduleId: '', endpointList: []},
|
2019-12-23 17:39:15 +08:00
|
|
|
currentModuleCopy: {},
|
|
|
|
|
tempParamObj: [],
|
|
|
|
|
tempEndpoint: {},
|
2020-01-02 18:13:01 +08:00
|
|
|
tempEndpoint2: {},
|
2019-12-20 17:18:30 +08:00
|
|
|
rightBox: {show: false, title: this.$t('project.endpoint.createEndpoint'),isEdit: false},
|
2019-12-24 17:31:51 +08:00
|
|
|
editParamBox: {show: false, top: 0, left: 0, type: 0}, //param编辑弹框
|
2019-12-20 22:00:04 +08:00
|
|
|
moduleParamShow: false, //module默认参数param悬浮窗
|
2019-12-19 17:22:18 +08:00
|
|
|
assetSearch: {host: '', sn: '', text: '', label: 'IP', dropdownShow: false}, //侧滑框中asset的搜索相关
|
2019-12-20 17:18:30 +08:00
|
|
|
assetPageObj: {pageNo: 1, pageSize: 9999},
|
|
|
|
|
selectedAssets: [], //侧滑框中选中的asset
|
2019-12-19 17:22:18 +08:00
|
|
|
projectList: [],
|
|
|
|
|
moduleList: [],
|
2019-12-20 22:00:04 +08:00
|
|
|
assetList: [],
|
|
|
|
|
endpointList: [],
|
|
|
|
|
endpointTableTitle: [
|
|
|
|
|
{
|
|
|
|
|
label: this.$t("project.endpoint.asset"),
|
|
|
|
|
prop: 'asset',
|
|
|
|
|
width: 123,
|
|
|
|
|
show: true,
|
|
|
|
|
},{
|
|
|
|
|
label: this.$t("project.endpoint.host"),
|
|
|
|
|
prop: 'host',
|
|
|
|
|
width: 123,
|
|
|
|
|
show: true,
|
|
|
|
|
},{
|
|
|
|
|
label: this.$t("project.endpoint.port"),
|
|
|
|
|
prop: 'port',
|
|
|
|
|
width: 55,
|
|
|
|
|
show: true,
|
|
|
|
|
},{
|
|
|
|
|
label: this.$t("project.endpoint.param"),
|
|
|
|
|
prop: 'param',
|
2020-01-02 18:13:01 +08:00
|
|
|
width: 90,
|
2019-12-20 22:00:04 +08:00
|
|
|
show: true,
|
|
|
|
|
},{
|
|
|
|
|
label: this.$t("project.endpoint.path"),
|
|
|
|
|
prop: 'path',
|
2020-01-02 18:13:01 +08:00
|
|
|
width: 66,
|
2019-12-20 22:00:04 +08:00
|
|
|
show: true,
|
|
|
|
|
}
|
|
|
|
|
],
|
2019-12-19 17:22:18 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
show(show) {
|
|
|
|
|
this.rightBox.show = show;
|
2019-12-26 16:31:53 +08:00
|
|
|
this.currentModuleCopy = JSON.parse(JSON.stringify(this.currentModule)); //打开弹框时将currentModule还原
|
2019-12-31 19:02:58 +08:00
|
|
|
this.endpointForm = {projectId: '', moduleId: '', endpointList:[]}
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
2019-12-23 17:39:15 +08:00
|
|
|
//子弹框控制 obj: module或endpoint对象 type:1module2endpoint
|
|
|
|
|
showEditParamBox(show, obj, type, e) {
|
|
|
|
|
if (show) {
|
|
|
|
|
let position = e.target.getBoundingClientRect();
|
|
|
|
|
this.editParamBox.type = type;
|
|
|
|
|
if (this.editParamBox.type == 2) {
|
|
|
|
|
this.tempEndpoint = obj;
|
|
|
|
|
}
|
|
|
|
|
this.editParamBox.top = position.top - 234;
|
|
|
|
|
this.editParamBox.left = position.left - 48;
|
|
|
|
|
if (!obj.param) {
|
|
|
|
|
this.$set(obj, 'paramObj', []);
|
|
|
|
|
this.tempParamObj = [];
|
|
|
|
|
} else {
|
|
|
|
|
this.tempParamObj = JSON.parse(JSON.stringify(obj.paramObj));
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2019-12-24 17:31:51 +08:00
|
|
|
if (!this.editParamBox.show) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2020-01-02 18:13:01 +08:00
|
|
|
for (let i = 0; i < this.tempParamObj.length; i++) {
|
|
|
|
|
if (!this.tempParamObj[i].key || !this.tempParamObj[i].value) {
|
|
|
|
|
this.tempParamObj.splice(i, 1);
|
|
|
|
|
i--;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-23 17:39:15 +08:00
|
|
|
if (this.editParamBox.type == 1) {
|
|
|
|
|
this.currentModuleCopy.paramObj = this.tempParamObj;
|
|
|
|
|
this.currentModuleCopy.param = this.paramToJson(this.tempParamObj);
|
|
|
|
|
} else if (this.editParamBox.type == 2) {
|
|
|
|
|
for (let i = 0; i < this.endpointList.length; i++) {
|
|
|
|
|
if (this.endpointList[i].asset.id == this.tempEndpoint.asset.id) {
|
|
|
|
|
this.endpointList[i].param = this.paramToJson(this.tempParamObj);
|
|
|
|
|
this.endpointList[i].paramObj = this.tempParamObj;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.tempParamObj = [];
|
|
|
|
|
}
|
2019-12-20 17:18:30 +08:00
|
|
|
this.editParamBox.show = show;
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/*关闭弹框*/
|
|
|
|
|
esc() {
|
|
|
|
|
this.rightBox.show = false;
|
2019-12-20 17:18:30 +08:00
|
|
|
this.editParamBox.show = false;
|
2020-01-02 18:13:01 +08:00
|
|
|
this.endpointTouch = false;
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 新增param
|
|
|
|
|
addParam() {
|
2019-12-24 17:31:51 +08:00
|
|
|
this.tempParamObj.push({key: '', value: ''});
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 移除单个param
|
|
|
|
|
removeParam(index) {
|
2019-12-24 17:31:51 +08:00
|
|
|
this.tempParamObj.splice(index, 1);
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
2019-12-23 17:39:15 +08:00
|
|
|
//编辑endpoint
|
|
|
|
|
toEditEndpoint(endpoint) {
|
2020-01-02 18:13:01 +08:00
|
|
|
for (let i = 0; i < this.endpointList.length; i++) {
|
|
|
|
|
if (this.endpointList[i].isEdit) {
|
|
|
|
|
this.endpointList.splice(i, 1, JSON.parse(JSON.stringify(this.tempEndpoint2)));
|
|
|
|
|
this.endpointList[i].isEdit = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-23 17:39:15 +08:00
|
|
|
endpoint.isEdit = true;
|
2020-01-02 18:13:01 +08:00
|
|
|
this.tempEndpoint2 = JSON.parse(JSON.stringify(endpoint));
|
2019-12-23 17:39:15 +08:00
|
|
|
},
|
|
|
|
|
editEndpoint(endpoint) {
|
2020-01-02 18:13:01 +08:00
|
|
|
this.$refs.addEndpointForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
endpoint.isEdit = false;
|
|
|
|
|
this.tempEndpoint2 = {};
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2019-12-23 17:39:15 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//移除endpoint
|
|
|
|
|
removeEndpoint(endpoint) {
|
|
|
|
|
endpoint.isEdit = false;
|
|
|
|
|
for (let i = 0; i < this.endpointList.length; i++) {
|
|
|
|
|
if (this.endpointList[i].assetId == endpoint.assetId) {
|
|
|
|
|
this.endpointList.splice(i, 1);
|
|
|
|
|
this.assetList.unshift(endpoint.asset);
|
2019-12-25 17:15:09 +08:00
|
|
|
i--;
|
2019-12-23 17:39:15 +08:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
/*获取project列表*/
|
|
|
|
|
getProjectList() {
|
|
|
|
|
this.$get('project', {pageSize: 999, pageNo: 1}).then(response => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.projectList = response.data.list;
|
2019-12-24 17:31:51 +08:00
|
|
|
if (this.moduleList.length == 0) {
|
|
|
|
|
this.getModuleList(this.currentProject.id);
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
}
|
2019-12-24 17:31:51 +08:00
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 获取endpoint弹框中的asset子弹框里asset列表数据
|
2019-12-20 17:18:30 +08:00
|
|
|
getAssetList() {
|
2019-12-19 17:22:18 +08:00
|
|
|
this.$get('asset', this.assetPageObj).then(response => {
|
|
|
|
|
if (response.code === 200) {
|
2019-12-25 17:15:09 +08:00
|
|
|
let respData = response.data.list;
|
|
|
|
|
for (let i = 0; i < respData.length; i++) {
|
|
|
|
|
for (let j = 0; j < this.endpointList.length; j++) {
|
|
|
|
|
if (respData[i].id == this.endpointList[j].assetId) {
|
|
|
|
|
respData.splice(i, 1);
|
|
|
|
|
i--;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
this.assetList = response.data.list;
|
2019-12-18 17:00:44 +08:00
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//endpoint弹框中的asset子弹框搜索
|
|
|
|
|
searchAsset() {
|
|
|
|
|
if (this.assetSearch.label == 'IP') {
|
|
|
|
|
this.assetSearch.host = this.assetSearch.text;
|
|
|
|
|
this.assetSearch.sn = '';
|
|
|
|
|
} else if (this.assetSearch.label == 'SN') {
|
|
|
|
|
this.assetSearch.sn = this.assetSearch.text;
|
|
|
|
|
this.assetSearch.host = '';
|
|
|
|
|
}
|
|
|
|
|
this.assetPageObj = Object.assign({}, this.assetPageObj, this.assetSearch);
|
2019-12-20 17:18:30 +08:00
|
|
|
this.getAssetList();
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
2019-12-24 17:31:51 +08:00
|
|
|
changeProject(project) {
|
|
|
|
|
this.currentModuleCopy = {};
|
2019-12-31 19:02:58 +08:00
|
|
|
this.endpointForm.moduleId = '';
|
|
|
|
|
this.endpointForm.projectId = project.id;
|
2019-12-24 17:31:51 +08:00
|
|
|
this.editParamBox.show = false;
|
|
|
|
|
this.tempParamObj = [];
|
2019-12-25 17:15:09 +08:00
|
|
|
this.endpointList = [];
|
|
|
|
|
this.getAssetList();
|
2019-12-24 17:31:51 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
changeModule(module) {
|
2019-12-31 19:02:58 +08:00
|
|
|
this.endpointForm.moduleId = module.id;
|
2019-12-24 17:31:51 +08:00
|
|
|
this.editParamBox.show = false;
|
|
|
|
|
this.tempParamObj = [];
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//清空勾选的endpoint
|
|
|
|
|
clearSelection() {
|
|
|
|
|
let selections = this.$refs.endpointTable.selection;
|
|
|
|
|
if (selections && selections.length > 0) {
|
|
|
|
|
for (let i = 0; i < selections.length; i++) {
|
|
|
|
|
this.removeEndpoint(selections[i])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
// endpoint弹框中的asset子弹框里asset选择事件
|
2019-12-20 22:00:04 +08:00
|
|
|
selectAsset(obj, index) {
|
|
|
|
|
this.endpointList.push({
|
2019-12-23 17:39:15 +08:00
|
|
|
isEdit: false,
|
2019-12-20 22:00:04 +08:00
|
|
|
assetId: obj.id,
|
|
|
|
|
asset: obj,
|
|
|
|
|
host: obj.host,
|
2019-12-23 17:39:15 +08:00
|
|
|
param: this.currentModuleCopy.param,
|
|
|
|
|
paramObj: this.currentModuleCopy.paramObj,
|
|
|
|
|
port: this.currentModuleCopy.port,
|
|
|
|
|
path: this.currentModuleCopy.path,
|
|
|
|
|
moduleId: this.currentModuleCopy.id
|
2019-12-20 22:00:04 +08:00
|
|
|
});
|
|
|
|
|
this.assetList.splice(index, 1);
|
2020-01-02 18:13:01 +08:00
|
|
|
this.endpointTouch = true;
|
|
|
|
|
this.endpointForm.projectId = this.currentProject.id;
|
|
|
|
|
this.endpointForm.moduleId = this.currentModuleCopy.id;
|
2019-12-20 22:00:04 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//将param转为json字符串格式
|
|
|
|
|
paramToJson(param) {
|
|
|
|
|
let tempParam = {};
|
|
|
|
|
for (let i = 0; i < param.length; i++) {
|
2019-12-24 17:31:51 +08:00
|
|
|
eval('tempParam["' + param[i].key + '"]="' + param[i].value + '"');
|
2019-12-20 22:00:04 +08:00
|
|
|
}
|
|
|
|
|
let jsonString = JSON.stringify(tempParam);
|
|
|
|
|
if (jsonString == '{}') {
|
|
|
|
|
return "";
|
|
|
|
|
} else {
|
|
|
|
|
return jsonString;
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 获取endpoint弹框中module下拉框数据
|
|
|
|
|
getModuleList(projectId) {
|
|
|
|
|
this.$get('module', {projectId: projectId}).then(response => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
|
|
|
try {
|
|
|
|
|
let tempObj = JSON.parse(response.data.list[i].param);
|
|
|
|
|
response.data.list[i].paramObj = [];
|
|
|
|
|
for (let k in tempObj) {
|
|
|
|
|
response.data.list[i].paramObj.push({key: k, value: tempObj[k]})
|
|
|
|
|
}
|
|
|
|
|
} catch(err) {
|
|
|
|
|
console.info(response.data.list[i], err);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.moduleList = response.data.list;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//保存endpoint
|
|
|
|
|
save() {
|
2019-12-31 19:02:58 +08:00
|
|
|
this.endpointForm.projectId = this.currentProject.id;
|
|
|
|
|
this.endpointForm.moduleId = this.currentModuleCopy.id;
|
2020-01-02 18:13:01 +08:00
|
|
|
if (this.endpointList.length == 0) {
|
|
|
|
|
this.endpointTouch = true;
|
|
|
|
|
this.$refs.addEndpointForm.validate();
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
this.$refs.addEndpointForm.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.$post('endpoint', this.endpointList).then(response => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
|
|
|
|
this.esc();
|
|
|
|
|
this.$emit("reload");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
}
|
|
|
|
|
});
|
2019-12-18 17:00:44 +08:00
|
|
|
} else {
|
2019-12-31 19:02:58 +08:00
|
|
|
return false;
|
2019-12-18 17:00:44 +08:00
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
})
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
|
|
|
|
|
2019-12-24 17:31:51 +08:00
|
|
|
//覆盖endpoint的port/path/param
|
|
|
|
|
coverEndpoint() {
|
|
|
|
|
if (this.endpointList.length > 0) {
|
|
|
|
|
for (let i = 0; i < this.endpointList.length; i++) {
|
|
|
|
|
this.endpointList[i].port = this.currentModuleCopy.port;
|
|
|
|
|
this.endpointList[i].param = this.currentModuleCopy.param;
|
|
|
|
|
this.endpointList[i].paramObj = this.currentModuleCopy.paramObj;
|
|
|
|
|
this.endpointList[i].path = this.currentModuleCopy.path;
|
|
|
|
|
}
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.coverSuccess")});
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
},
|
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
//删除endpoint
|
|
|
|
|
del() {
|
|
|
|
|
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 => {
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
|
|
|
|
this.$emit('reload');
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// endpoint弹框的asset子弹框顶部搜索条件选中事件
|
|
|
|
|
dropdownSelect(label) {
|
|
|
|
|
this.assetSearch.label = label;
|
|
|
|
|
this.assetSearch.dropdownShow = false;
|
|
|
|
|
},
|
2019-12-24 17:31:51 +08:00
|
|
|
|
|
|
|
|
clearEndpoints() {
|
|
|
|
|
this.getAssetList();
|
|
|
|
|
this.endpointList = [];
|
2020-01-02 18:13:01 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setRowIndex({row, rowIndex}) {
|
|
|
|
|
row.index = rowIndex;
|
2019-12-24 17:31:51 +08:00
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
},
|
2019-12-31 19:02:58 +08:00
|
|
|
computed: {
|
|
|
|
|
projectListReloadWatch() {
|
|
|
|
|
return this.$store.state.projectListChange;
|
|
|
|
|
},
|
|
|
|
|
moduleListReloadWatch() {
|
|
|
|
|
return this.$store.state.moduleListChange;
|
|
|
|
|
},
|
|
|
|
|
},
|
2019-12-19 17:22:18 +08:00
|
|
|
created() {
|
|
|
|
|
this.getProjectList();
|
|
|
|
|
this.getAssetList();
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
2020-01-02 18:13:01 +08:00
|
|
|
endpointList(n, o) {
|
|
|
|
|
this.endpointForm.endpointList = n;
|
|
|
|
|
if (n.length > 0) {
|
|
|
|
|
this.paramBorderColor = '#dcdfe6';
|
|
|
|
|
} else {
|
|
|
|
|
this.paramBorderColor = '#F56C6C';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
2019-12-23 17:39:15 +08:00
|
|
|
currentProject(n, o) {
|
2020-01-02 18:13:01 +08:00
|
|
|
this.endpointForm.projectId = n.id;
|
2019-12-23 17:39:15 +08:00
|
|
|
this.getModuleList(n.id);
|
|
|
|
|
},
|
2019-12-31 19:02:58 +08:00
|
|
|
currentModule: {
|
|
|
|
|
immediate: true,
|
|
|
|
|
handler(n, o) {
|
2020-01-02 18:13:01 +08:00
|
|
|
this.endpointForm.moduleId = n.id;
|
2019-12-31 19:02:58 +08:00
|
|
|
this.currentModuleCopy = JSON.parse(JSON.stringify(n));
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
projectListReloadWatch(n, o) {
|
|
|
|
|
this.getProjectList();
|
|
|
|
|
},
|
|
|
|
|
moduleListReloadWatch(n, o) {
|
|
|
|
|
this.getModuleList(this.currentProject.id);
|
2019-12-18 17:00:44 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
/* 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 {
|
|
|
|
|
padding: 7px 0 0 0;
|
|
|
|
|
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-01-02 18:13:01 +08:00
|
|
|
height: calc(100% - 216px);
|
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;
|
|
|
|
|
width: 260px;
|
|
|
|
|
}
|
|
|
|
|
.endpoints-box {
|
|
|
|
|
margin: 0 0 0 280px;
|
2019-12-20 22:00:04 +08:00
|
|
|
width: 540px;
|
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;
|
2019-12-23 17:39:15 +08:00
|
|
|
height: 24px;
|
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 {
|
|
|
|
|
padding: 9px 0 0 4px;
|
|
|
|
|
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;
|
|
|
|
|
right: 209px;
|
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
|
|
|
}
|
|
|
|
|
.module-info-path {
|
|
|
|
|
width: 60px;
|
|
|
|
|
right: 52px;
|
|
|
|
|
}
|
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;
|
2019-12-31 19:02:58 +08:00
|
|
|
padding: 2px 4px;
|
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 {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
float: right;
|
|
|
|
|
padding: 7px 8px 0 0;
|
|
|
|
|
position: relative;
|
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;
|
2019-12-31 19:02:58 +08:00
|
|
|
top: 34px;
|
|
|
|
|
background-color: #444;
|
2019-12-19 17:22:18 +08:00
|
|
|
border-radius: 4px;
|
2019-12-31 19:02:58 +08:00
|
|
|
width: 44px;
|
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;
|
|
|
|
|
width: 19px;
|
|
|
|
|
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;
|
|
|
|
|
vertical-align: middle;
|
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 {
|
2019-12-20 17:18:30 +08:00
|
|
|
padding-top: 15px;
|
2019-12-31 19:02:58 +08:00
|
|
|
height: calc(100% - 45px);
|
2019-12-19 17:22:18 +08:00
|
|
|
}
|
|
|
|
|
.line-100 {
|
|
|
|
|
margin-bottom: 3px;
|
|
|
|
|
}
|
|
|
|
|
.endpoint-sub-table-head {
|
|
|
|
|
line-height: 28px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
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;
|
|
|
|
|
}
|
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;
|
2019-12-20 17:18:30 +08:00
|
|
|
width: calc(50% - 15px);
|
2019-12-19 17:22:18 +08:00
|
|
|
padding-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
.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;
|
2019-12-20 17:18:30 +08:00
|
|
|
overflow: auto;
|
2019-12-31 19:02:58 +08:00
|
|
|
height: calc(100% - 34px);
|
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%;
|
|
|
|
|
background-color: #e9ebec;
|
|
|
|
|
position: absolute;
|
|
|
|
|
opacity: 0.2;
|
|
|
|
|
}
|
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
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
/* end--table*/
|
|
|
|
|
|
|
|
|
|
/* end--子弹框*/
|
2019-12-18 17:00:44 +08:00
|
|
|
</style>
|
2019-12-20 22:00:04 +08:00
|
|
|
<style>
|
|
|
|
|
.endpoints-box-endpoints-title {
|
|
|
|
|
color: black;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
}
|
2020-01-15 12:50:21 +08:00
|
|
|
.endpoints-box-endpoints .el-table td, .endpoints-box-endpoints .el-table th {
|
2019-12-20 22:00:04 +08:00
|
|
|
padding: 5px 0 !important;
|
|
|
|
|
}
|
|
|
|
|
.endpoints-box-endpoints .cell {
|
|
|
|
|
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;
|
|
|
|
|
}
|
2019-12-20 22:00:04 +08:00
|
|
|
</style>
|