2019-12-18 17:00:44 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<transition name="right-box">
|
2020-02-26 18:26:55 +08:00
|
|
|
|
<div class="right-box right-box-module" v-if="rightBox.show" v-clickoutside="clickos">
|
2019-12-19 17:22:18 +08:00
|
|
|
|
<!-- begin--顶部按钮-->
|
|
|
|
|
|
<div class="right-box-top-btns">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<button id="module-del" type="button" v-if="currentModule.id != '' && rightBox.isEdit" @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light nz-btn-min-width-82">
|
2020-01-17 09:54:01 +08:00
|
|
|
|
<span class="right-box-top-btn-icon"><i class="el-icon-delete"></i></span>
|
|
|
|
|
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</button>
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<button v-if="!rightBox.isEdit && currentModule.buildIn != 1" id="module-save" type="button" @click="saveOrToEdit" class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light nz-btn-min-width-82">
|
2020-01-17 09:54:01 +08:00
|
|
|
|
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-edit"></i></span>
|
|
|
|
|
|
<span class="right-box-top-btn-txt">{{$t('overall.edit')}}</span>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</button>
|
2019-12-19 17:22:18 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<!-- end--顶部按钮-->
|
2019-12-18 17:00:44 +08:00
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
|
<!-- begin--标题-->
|
|
|
|
|
|
<div class="right-box-title">{{rightBox.title}}</div>
|
|
|
|
|
|
<!-- end--标题-->
|
2019-12-18 17:00:44 +08:00
|
|
|
|
|
2019-12-19 17:22:18 +08:00
|
|
|
|
<!-- begin--表单-->
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-scrollbar class="right-box-form-box" ref="scrollbar">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-form class="right-box-form" :model="currentModule" label-position="top" :rules="rules" ref="moduleForm">
|
2020-01-02 18:13:01 +08:00
|
|
|
|
<el-form-item :label='$t("project.project.project")' prop="project">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-select v-if="rightBox.isEdit" value-key="id" popper-class="config-dropdown" v-model="currentModule.project" placeholder="" size="small">
|
2020-01-13 18:48:25 +08:00
|
|
|
|
<el-option :id="'module-project-'+item.id" v-for="item in projectList" :key="item.id" :label="item.name" :value="item"></el-option>
|
2019-12-19 17:22:18 +08:00
|
|
|
|
</el-select>
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<div v-if="!rightBox.isEdit && currentModule.project" class="right-box-form-content-txt">{{currentModule.project.name}}</div>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label='$t("project.module.moduleName")' prop="name">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-if="rightBox.isEdit" placeholder="" maxlength="64" show-word-limit v-model="currentModule.name" size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{currentModule.name}}</div>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form-item>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<div class="nz-tab module-box-type">
|
|
|
|
|
|
<div class="nz-tab-item-box" @click="changeType('http')" id="module-type-1">
|
|
|
|
|
|
<div class="nz-tab-item" :class="{'nz-tab-item-active' : currentModule.type.toLowerCase() == 'http', 'unclickable': currentModule.id}">HTTP</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div @click="changeType('snmp')" class="nz-tab-item-box" id="module-type-2">
|
|
|
|
|
|
<div class="nz-tab-item" :class="{'nz-tab-item-active' : currentModule.type.toLowerCase() == 'snmp', 'unclickable': currentModule.id}">SNMP</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- snmp表单 -->
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<template v-if="currentModule.type && currentModule.type == 'snmp'">
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<div class="right-box-sub-title">SNMP settings</div>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<div class="line-100 right-box-line"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label sub-label-required">{{$t('project.module.walk')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<el-form-item prop="walk">
|
2020-04-04 21:10:52 +08:00
|
|
|
|
<select-walk ref="selectWalk" :walkData="walkData" :expandedWalk="expandedWalkData" :placement="'bottom-start'" @selectWalk="selectWalk" :currentWalk="currentModule.walk">
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<template v-slot:trigger>
|
2020-04-04 21:10:52 +08:00
|
|
|
|
<div class="el-cascader">
|
|
|
|
|
|
<div class="el-input">
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<input type="text" readonly="readonly" autocomplete="off" class="el-input__inner" aria-expanded="false">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="el-cascader__tags">
|
2020-04-04 21:10:52 +08:00
|
|
|
|
<el-scrollbar style="height: 100%;" ref="walkScrollbar">
|
|
|
|
|
|
<span class="el-tag el-tag--info el-tag--small el-tag--light" v-for="item in currentModule.walk">
|
|
|
|
|
|
<span>{{item}}</span>
|
|
|
|
|
|
<i @click.stop="removeWalk(item)" class="el-tag__close el-icon-close"></i>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</el-scrollbar>
|
2020-04-02 20:23:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</select-walk>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.version')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="version">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-radio-group v-model.number="currentModule.version" size="small">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-radio-button :label="2"></el-radio-button>
|
|
|
|
|
|
<el-radio-button :label="3"></el-radio-button>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.maxRepetitions')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="max_repetitions">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.number="currentModule.max_repetitions" size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.retries')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="retries">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.number="currentModule.retries" size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.timeout')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="timeout">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.number="currentModule.timeout" size="small">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<template slot="append">second</template>
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="1"> </el-col>
|
|
|
|
|
|
<el-col :span="23">
|
|
|
|
|
|
<div class="right-box-sub-title">Auth</div>
|
|
|
|
|
|
<div class="line-100 right-box-line"></div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label sub-label-required">{{$t('project.module.community')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="community">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.trim="currentModule.community" maxlength="64" show-word-limit size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<!--SNMP V3 setting-->
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<template v-if="currentModule.version == 3">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label sub-label-required">{{$t('login.username')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="username">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.trim="currentModule.username" maxlength="64" show-word-limit size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.securityLevel')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="security_level">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-radio-group v-model="currentModule.security_level" size="small" @change="updateScrollbar">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-radio-button label="noAuthNoPriv"></el-radio-button>
|
|
|
|
|
|
<el-radio-button label="authNoPriv"></el-radio-button>
|
|
|
|
|
|
<el-radio-button label="authPriv"></el-radio-button>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-row v-if="currentModule.security_level == 'authNoPriv' || currentModule.security_level == 'authPriv'">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label sub-label-required">{{$t('login.password')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="password">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.trim="currentModule.password" maxlength="64" show-word-limit size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-row v-if="currentModule.security_level == 'authNoPriv' || currentModule.security_level == 'authPriv'">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.authProtocol')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="auth_protocol">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-radio-group v-model="currentModule.auth_protocol" size="small">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-radio-button label="MD5"></el-radio-button>
|
|
|
|
|
|
<el-radio-button label="SHA"></el-radio-button>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-row v-if="currentModule.security_level == 'authPriv'">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.privProtocol')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="priv_protocol">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-radio-group v-model="currentModule.priv_protocol" size="small">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-radio-button label="DES"></el-radio-button>
|
|
|
|
|
|
<el-radio-button label="AES"></el-radio-button>
|
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-row v-if="currentModule.security_level == 'authPriv'">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label sub-label-required">{{$t('project.module.privPassword')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="priv_password">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.trim="currentModule.priv_password" maxlength="64" show-word-limit size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
|
<div class="sub-label">{{$t('project.module.contextName')}}</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="18">
|
|
|
|
|
|
<el-form-item prop="context_name">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-model.trim="currentModule.context_name" maxlength="64" show-word-limit size="small"></el-input>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2020-01-06 19:03:38 +08:00
|
|
|
|
<div class="right-box-form-tip" v-if="rightBox.isEdit">
|
2019-12-27 17:53:17 +08:00
|
|
|
|
{{$t('project.module.tip.defaultEndpointSet')}}
|
|
|
|
|
|
<div class="line-100"></div>
|
|
|
|
|
|
{{$t('project.module.tip.relation')}}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</div>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
|
|
|
|
|
<el-form-item :label='$t("project.endpoint.port")' prop="port" >
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-input v-if="rightBox.isEdit" placeholder="" v-model.number="currentModule.port" size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{currentModule.port}}</div>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form-item>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<el-form-item v-if="currentModule.type && currentModule.type.toLowerCase() == 'http'" :label='$t("project.endpoint.path")' prop="path">
|
|
|
|
|
|
<el-input v-if="rightBox.isEdit" placeholder="" v-model="currentModule.path" size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{currentModule.path}}</div>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form-item>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<el-form-item class="right-box-form-param" v-if="currentModule.type.toLowerCase() == 'http'">
|
2019-12-27 17:53:17 +08:00
|
|
|
|
<template slot="label">
|
2019-12-31 19:02:58 +08:00
|
|
|
|
<span>{{$t('project.endpoint.param')}}</span>
|
2020-01-06 19:03:38 +08:00
|
|
|
|
<div class="right-box-form-btns" v-if="rightBox.isEdit">
|
2019-12-27 17:53:17 +08:00
|
|
|
|
<button style="display: none;">第一个button会出现意料之外的hover样式,找不到原因,只好加个不可见的button规避问题</button>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<button id="module-clear-all" type="button" @click="clearAllParam" class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<span class="top-tool-btn-txt">{{$t('overall.clear')}}</span>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</button>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<button id="module-add-param" type="button" @click="addParam" class="nz-btn nz-btn-size-normal nz-btn-style-normal">
|
2019-12-27 17:53:17 +08:00
|
|
|
|
<span class="top-tool-btn-txt">{{$t('overall.add')}}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
|
2020-01-19 19:34:38 +08:00
|
|
|
|
<div v-if="rightBox.isEdit" class="param-box param-box-module">
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<div class="param-box-row" v-for="(item, index) in currentModule.paramObj">
|
2019-12-27 17:53:17 +08:00
|
|
|
|
<el-form-item class="param-box-row-key" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}" :prop="'paramObj.' + index + '.key'">
|
|
|
|
|
|
<el-input placeholder="key" size="mini" v-model="item.key"></el-input>
|
|
|
|
|
|
</el-form-item>
|
2019-12-19 17:22:18 +08:00
|
|
|
|
<span class="param-box-row-eq">=</span>
|
2019-12-27 17:53:17 +08:00
|
|
|
|
<el-form-item class="param-box-row-value" :rules="{required: true, message: $t('validate.required'), trigger: 'blur'}" :prop="'paramObj.' + index + '.value'">
|
|
|
|
|
|
<el-input placeholder="value" size="mini" v-model="item.value"></el-input>
|
|
|
|
|
|
</el-form-item>
|
2020-01-13 18:48:25 +08:00
|
|
|
|
<span class="param-box-row-symbol" :id="'moduel-remove-param-'+index" @click="removeParam(index)"><i class="nz-icon nz-icon-minus-square"></i></span>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</div>
|
2020-01-19 19:34:38 +08:00
|
|
|
|
</div>
|
2020-04-02 14:33:46 +08:00
|
|
|
|
<div v-for="(item, index) in currentModule.paramObj" v-if="!rightBox.isEdit">
|
2020-01-19 19:34:38 +08:00
|
|
|
|
<div class="right-box-form-content-txt">{{item.key}}={{item.value}}</div>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</div>
|
2020-01-06 19:03:38 +08:00
|
|
|
|
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<el-form-item :label='$t("project.module.description")' prop="remark">
|
|
|
|
|
|
<el-input v-if="rightBox.isEdit" type="textarea" placeholder="" maxlength="1024" show-word-limit v-model="currentModule.remark" size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{currentModule.remark}}</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
2019-12-27 17:53:17 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
|
</el-scrollbar>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
|
|
|
|
|
|
<!--底部按钮-->
|
|
|
|
|
|
<div class="right-box-bottom-btns">
|
2020-02-17 17:29:15 +08:00
|
|
|
|
<button @click="esc" id="module-box-esc" class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100">
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<span>{{$t('overall.cancel')}}</span>
|
|
|
|
|
|
</button>
|
2020-02-17 17:29:15 +08:00
|
|
|
|
<button v-if="rightBox.isEdit" @click="saveOrToEdit" id="module-box-save" class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<span>{{$t('overall.save')}}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2020-04-02 14:33:46 +08:00
|
|
|
|
import {noSpecialChar, port, nzNumber} from "../js/validate";
|
2020-04-02 20:23:52 +08:00
|
|
|
|
import selectWalk from "../popBox/selectWalk";
|
2020-01-17 10:35:09 +08:00
|
|
|
|
|
2019-12-18 17:00:44 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "moduleBox",
|
|
|
|
|
|
props: {
|
|
|
|
|
|
module: Object,
|
|
|
|
|
|
currentProject: Object
|
|
|
|
|
|
},
|
2020-04-02 20:23:52 +08:00
|
|
|
|
components: {
|
|
|
|
|
|
'select-walk': selectWalk
|
|
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
walkData: [],
|
2020-04-04 21:10:52 +08:00
|
|
|
|
expandedWalkData: [],
|
2020-04-02 14:33:46 +08:00
|
|
|
|
currentModule: {},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
rightBox: {
|
|
|
|
|
|
show: false,
|
2020-01-06 19:03:38 +08:00
|
|
|
|
title: '',
|
|
|
|
|
|
isEdit:false
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
2019-12-27 17:53:17 +08:00
|
|
|
|
rules: {
|
|
|
|
|
|
name: [
|
2020-01-17 10:35:09 +08:00
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'},
|
|
|
|
|
|
{validator:noSpecialChar,trigger: "change"}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
],
|
|
|
|
|
|
project: [
|
2020-01-02 18:13:01 +08:00
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
],
|
|
|
|
|
|
port: [
|
2020-01-19 19:50:12 +08:00
|
|
|
|
{validator:port, trigger: 'blur'},
|
2019-12-27 17:53:17 +08:00
|
|
|
|
],
|
2020-04-02 20:23:52 +08:00
|
|
|
|
/*walk: [
|
2020-04-01 21:21:42 +08:00
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
],*/
|
2020-04-01 21:21:42 +08:00
|
|
|
|
username: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
|
|
|
|
|
],
|
|
|
|
|
|
password: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
|
|
|
|
|
],
|
|
|
|
|
|
priv_password: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
|
|
|
|
|
],
|
2020-04-02 14:33:46 +08:00
|
|
|
|
max_repetitions: [
|
|
|
|
|
|
{validator:nzNumber, trigger: 'blur'},
|
|
|
|
|
|
],
|
|
|
|
|
|
retries: [
|
|
|
|
|
|
{validator:nzNumber, trigger: 'blur'},
|
|
|
|
|
|
],
|
|
|
|
|
|
timeout: [
|
|
|
|
|
|
{validator:nzNumber, trigger: 'blur'},
|
|
|
|
|
|
],
|
2019-12-27 17:53:17 +08:00
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
projectList: [],
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2020-04-04 21:10:52 +08:00
|
|
|
|
selectWalk(walk) {
|
|
|
|
|
|
if (this.currentModule.walk.indexOf(walk) != -1) {
|
|
|
|
|
|
this.currentModule.walk.splice(this.currentModule.walk.indexOf(walk), 1);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.currentModule.walk.push(walk);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.walkScrollbar.update();
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
removeWalk(walk) {
|
|
|
|
|
|
this.currentModule.walk.splice(this.currentModule.walk.indexOf(walk), 1);
|
|
|
|
|
|
this.$refs.selectWalk.$refs.walkTree.setChecked(walk, false);
|
|
|
|
|
|
},
|
2020-04-02 20:23:52 +08:00
|
|
|
|
|
2020-04-04 21:10:52 +08:00
|
|
|
|
initWalk() {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs.selectWalk.show();
|
|
|
|
|
|
})
|
2020-04-02 20:23:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getWalkData() {
|
2020-04-04 21:10:52 +08:00
|
|
|
|
this.$get('mib/tree', {pageSize: -1, pageNo: 1}).then(response => {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
if (response.code === 200) {
|
2020-04-04 21:10:52 +08:00
|
|
|
|
let obj = JSON.parse(response.data);
|
|
|
|
|
|
this.walkData = [];
|
|
|
|
|
|
for (let item in obj) {
|
|
|
|
|
|
this.walkData.push({name: item, subTree: obj[item]});
|
|
|
|
|
|
}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
}
|
2020-04-04 21:10:52 +08:00
|
|
|
|
});
|
2020-04-02 20:23:52 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
2020-01-06 20:57:49 +08:00
|
|
|
|
show(show, isEdit) {
|
2019-12-18 17:00:44 +08:00
|
|
|
|
this.rightBox.show = show;
|
2020-01-06 20:57:49 +08:00
|
|
|
|
this.rightBox.isEdit = isEdit;
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/*关闭弹框*/
|
|
|
|
|
|
esc() {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2020-02-26 18:26:55 +08:00
|
|
|
|
clickos() {
|
|
|
|
|
|
this.esc();
|
|
|
|
|
|
},
|
2020-04-02 14:33:46 +08:00
|
|
|
|
changeType(type) {
|
|
|
|
|
|
if (this.currentModule.id) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.currentModule.type = type;
|
|
|
|
|
|
this.updateScrollbar();
|
|
|
|
|
|
},
|
2020-04-01 21:21:42 +08:00
|
|
|
|
//转化snmpParam属性
|
2020-04-02 14:33:46 +08:00
|
|
|
|
parseSnmpParam(module) {
|
2020-04-01 21:21:42 +08:00
|
|
|
|
let snmpObj = { //下划线命名是因为业务需求
|
2020-04-02 20:23:52 +08:00
|
|
|
|
walk: module.walk,
|
2020-04-02 14:33:46 +08:00
|
|
|
|
version: module.version, //2/3
|
|
|
|
|
|
max_repetitions: module.max_repetitions ? module.max_repetitions : 25,
|
|
|
|
|
|
retries: module.retries ? module.retries : 3,
|
|
|
|
|
|
timeout: module.timeout ? module.timeout + "s" : "10s", //s
|
2020-04-01 21:21:42 +08:00
|
|
|
|
auth: {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
community: module.community,
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
};
|
2020-04-02 14:33:46 +08:00
|
|
|
|
if (module.version == 3) {
|
|
|
|
|
|
snmpObj.auth.username = module.username;
|
|
|
|
|
|
snmpObj.auth.security_level = module.security_level;
|
|
|
|
|
|
snmpObj.auth.context_name = module.context_name;
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
2020-04-02 14:33:46 +08:00
|
|
|
|
if (module.security_level == "authNoPriv" || module.security_level == "authPriv") {
|
|
|
|
|
|
snmpObj.auth.password = module.password;
|
|
|
|
|
|
snmpObj.auth.auth_protocol = module.auth_protocol;
|
|
|
|
|
|
if (module.security_level != "authNoPriv") {
|
|
|
|
|
|
snmpObj.auth.priv_password = module.priv_password;
|
|
|
|
|
|
snmpObj.auth.priv_protocol = module.priv_protocol;
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-04-02 14:33:46 +08:00
|
|
|
|
module.snmpParam = JSON.stringify(snmpObj);
|
2020-04-01 21:21:42 +08:00
|
|
|
|
},
|
|
|
|
|
|
//回显时解析snmpParam
|
|
|
|
|
|
reparseSnmpParam(module) {
|
|
|
|
|
|
let snmpObj = JSON.parse(module.snmpParam);
|
2020-04-02 20:23:52 +08:00
|
|
|
|
module.walk = snmpObj.walk;
|
2020-04-01 21:21:42 +08:00
|
|
|
|
module.version = snmpObj.version;
|
|
|
|
|
|
module.max_repetitions = snmpObj.max_repetitions;
|
|
|
|
|
|
module.retries = snmpObj.retries;
|
|
|
|
|
|
module.timeout = parseInt(snmpObj.timeout.replace("s", ""));
|
|
|
|
|
|
module.community = snmpObj.auth.community;
|
|
|
|
|
|
if (snmpObj.version == 3) {
|
|
|
|
|
|
module.username = snmpObj.auth.username;
|
|
|
|
|
|
module.security_level = snmpObj.auth.security_level;
|
2020-04-02 14:33:46 +08:00
|
|
|
|
module.context_name = snmpObj.auth.context_name;
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (snmpObj.auth.security_level == "authNoPriv" || snmpObj.auth.security_level == "authPriv") {
|
|
|
|
|
|
module.password = snmpObj.auth.password;
|
|
|
|
|
|
module.auth_protocol = snmpObj.auth.auth_protocol;
|
|
|
|
|
|
if (snmpObj.auth.security_level != "authNoPriv") {
|
|
|
|
|
|
module.priv_password = snmpObj.auth.priv_password;
|
|
|
|
|
|
module.priv_protocol = snmpObj.auth.priv_protocol;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
/*保存*/
|
|
|
|
|
|
save() {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.currentModule.param = this.paramToJson(this.currentModule.paramObj);
|
2019-12-27 17:53:17 +08:00
|
|
|
|
this.$refs.moduleForm.validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
if (this.currentModule.type.toLowerCase() == 'snmp') {
|
|
|
|
|
|
this.parseSnmpParam(this.currentModule);
|
2020-04-01 21:21:42 +08:00
|
|
|
|
} else {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
if (this.currentModule.snmpParam) {
|
|
|
|
|
|
this.currentModule.snmpParam = "";
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.currentModule.projectId = this.currentModule.project.id;
|
|
|
|
|
|
if (this.currentModule.id) {
|
|
|
|
|
|
this.$put('module', this.currentModule).then(response => {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
2019-12-31 19:02:58 +08:00
|
|
|
|
this.$store.commit('moduleListChange');
|
2019-12-27 17:53:17 +08:00
|
|
|
|
this.rightBox.show = false;
|
2020-01-06 20:57:49 +08:00
|
|
|
|
this.$emit('reload');
|
2019-12-27 17:53:17 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
} else {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.$post('module', this.currentModule).then(response => {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
2019-12-31 19:02:58 +08:00
|
|
|
|
this.$store.commit('moduleListChange');
|
2019-12-27 17:53:17 +08:00
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
2019-12-27 17:53:17 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
2020-01-06 19:03:38 +08:00
|
|
|
|
saveOrToEdit: function() {
|
|
|
|
|
|
if (!this.rightBox.isEdit) {
|
|
|
|
|
|
this.rightBox.isEdit = true;
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.rightBox.title = this.$t("project.module.editModule") + " ID:" + this.currentModule.id;
|
2020-01-06 19:03:38 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.save();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
/*删除*/
|
|
|
|
|
|
del() {
|
|
|
|
|
|
this.$confirm(this.$t("tip.confirmDelete"), {
|
|
|
|
|
|
confirmButtonText: this.$t("tip.yes"),
|
|
|
|
|
|
cancelButtonText: this.$t("tip.no"),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.$delete("module?ids=" + this.currentModule.id).then(response => {
|
2019-12-18 17:00:44 +08:00
|
|
|
|
if (response.code === 200) {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
this.rightBox.show = false;
|
2019-12-31 19:02:58 +08:00
|
|
|
|
this.$store.commit('moduleListChange');
|
2019-12-18 17:00:44 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/*获取project列表*/
|
|
|
|
|
|
getProjectList: function() {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
this.$get('project', {pageSize: -1, pageNo: 1}).then(response => {
|
2019-12-18 17:00:44 +08:00
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.projectList = response.data.list;
|
|
|
|
|
|
if (this.currentProject && this.currentProject.id) {
|
2019-12-19 17:22:18 +08:00
|
|
|
|
/*for (let i = 0; i < this.projectList.length; i++) {
|
2019-12-18 17:00:44 +08:00
|
|
|
|
if (this.projectList[i].id == this.currentProject.id) {
|
|
|
|
|
|
this.currentProject = this.projectList[i];
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}*/
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 清除param
|
|
|
|
|
|
clearAllParam: function() {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.currentModule.paramObj = [];
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 新增param
|
|
|
|
|
|
addParam: function() {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.currentModule.paramObj.push({key: '', value: ''});
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
// 移除单个param
|
|
|
|
|
|
removeParam: function(index) {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
this.currentModule.paramObj.splice(index, 1);
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//将param转为json字符串格式
|
|
|
|
|
|
paramToJson: function(param) {
|
|
|
|
|
|
let tempParam = {};
|
|
|
|
|
|
for (let i = 0; i < param.length; i++) {
|
2019-12-27 17:53:17 +08:00
|
|
|
|
eval('tempParam["' + param[i].key + '"]="' + param[i].value + '"');
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
let jsonString = JSON.stringify(tempParam);
|
|
|
|
|
|
if (jsonString == '{}') {
|
|
|
|
|
|
return "";
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return jsonString;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-04-01 21:21:42 +08:00
|
|
|
|
updateScrollbar() {
|
|
|
|
|
|
this.$refs.scrollbar.update();
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
},
|
2020-04-02 20:23:52 +08:00
|
|
|
|
mounted() {
|
|
|
|
|
|
this.getWalkData();
|
|
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
created() {
|
|
|
|
|
|
this.getProjectList();
|
|
|
|
|
|
},
|
2019-12-31 19:02:58 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
projectListReloadWatch() {
|
|
|
|
|
|
return this.$store.state.projectListChange;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2019-12-18 17:00:44 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
module: {
|
|
|
|
|
|
immediate: true,
|
2020-04-01 21:21:42 +08:00
|
|
|
|
deep: true,
|
2019-12-18 17:00:44 +08:00
|
|
|
|
handler(n, o) {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
this.currentModule = JSON.parse(JSON.stringify(n));
|
2019-12-18 17:00:44 +08:00
|
|
|
|
if (n && n.id) {
|
2020-01-06 19:03:38 +08:00
|
|
|
|
this.rightBox.title =this.rightBox.isEdit? this.$t("project.module.editModule") + " ID:" + n.id : this.$t("project.module.module") + " ID:" + n.id ;
|
2020-04-02 14:33:46 +08:00
|
|
|
|
if (n.snmpParam) {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
this.reparseSnmpParam(this.currentModule);
|
2020-04-02 14:33:46 +08:00
|
|
|
|
}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
|
2020-04-02 14:33:46 +08:00
|
|
|
|
} else if (n) {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
this.rightBox.title = this.$t("project.module.createModule");
|
2020-04-01 21:21:42 +08:00
|
|
|
|
if (!n.type) {
|
|
|
|
|
|
n.type = 'http';
|
2020-04-02 14:33:46 +08:00
|
|
|
|
} else if (n.type.toLowerCase() == 'snmp') {
|
|
|
|
|
|
if (n.snmpParam) {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
this.reparseSnmpParam(this.currentModule);
|
2020-04-02 14:33:46 +08:00
|
|
|
|
}
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
2020-04-02 14:33:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
currentModule: {
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler(n, o) {
|
2020-04-02 20:23:52 +08:00
|
|
|
|
if (n.type && n.type.toLowerCase() == 'snmp') {
|
2020-04-02 14:33:46 +08:00
|
|
|
|
n.port = 161;
|
2020-04-04 21:10:52 +08:00
|
|
|
|
this.expandedWalkData = [];
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.$refs.selectWalk.show();
|
|
|
|
|
|
});
|
|
|
|
|
|
for (let i = 0; i < n.walk.length; i++) {
|
|
|
|
|
|
this.expandedWalkData.push(n.walk[i].substring(0, n.walk[i].lastIndexOf(".")));
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-12-31 19:02:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
projectListReloadWatch(n, o) {
|
|
|
|
|
|
this.getProjectList();
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2020-04-02 20:23:52 +08:00
|
|
|
|
<style scoped>
|
|
|
|
|
|
.module-walk-box {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
border: 1px solid #DCDFE6;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
min-height: 32px;
|
|
|
|
|
|
margin-bottom: 22px;
|
|
|
|
|
|
padding: 3px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.module-walk-box i {
|
|
|
|
|
|
color: #C0C4CC;
|
|
|
|
|
|
}
|
|
|
|
|
|
.walk-box-item {
|
|
|
|
|
|
padding: 5px 15px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.walk-box-item-txt {
|
|
|
|
|
|
color: #606266;
|
|
|
|
|
|
}
|
|
|
|
|
|
.walk-box-item-op span:first-of-type {
|
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.walk-box-item-op span {
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
.walk-box-op {
|
|
|
|
|
|
width: 18px;
|
|
|
|
|
|
margin: 5px 0 5px 15px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
2020-04-04 21:10:52 +08:00
|
|
|
|
.el-cascader {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-cascader__tags {
|
|
|
|
|
|
height: calc(100% - 10px);
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.right-box-module .el-cascader .el-input__inner {
|
|
|
|
|
|
height: 150px;
|
|
|
|
|
|
}
|
2020-04-02 20:23:52 +08:00
|
|
|
|
</style>
|
2020-04-01 21:21:42 +08:00
|
|
|
|
<style>
|
|
|
|
|
|
.sub-label {
|
|
|
|
|
|
padding-right: 15px;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #666;
|
|
|
|
|
|
text-align: right;
|
2020-04-02 20:23:52 +08:00
|
|
|
|
line-height: 30px
|
2020-04-01 21:21:42 +08:00
|
|
|
|
}
|
|
|
|
|
|
.sub-label-required::before {
|
|
|
|
|
|
content: '*';
|
|
|
|
|
|
color: #F56C6C;
|
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
|
}
|
2020-04-02 14:33:46 +08:00
|
|
|
|
.module-box-type {
|
|
|
|
|
|
margin: 25px 0 10px -15px;
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
</style>
|