文件管理、资源注册添加搜索条件和form字段
This commit is contained in:
@@ -92,6 +92,9 @@ div:focus {
|
|||||||
.mtb10 {
|
.mtb10 {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
.mt50 {
|
||||||
|
margin-top: 50px;
|
||||||
|
}
|
||||||
.fontSize15 {
|
.fontSize15 {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
@@ -270,7 +273,8 @@ aside {
|
|||||||
.pageTopForm .el-form-item__label {
|
.pageTopForm .el-form-item__label {
|
||||||
width: 68px!important;
|
width: 68px!important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 36px;
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
// table列表上方 form搜索条件 label后面的选项框
|
// table列表上方 form搜索条件 label后面的选项框
|
||||||
.pageTopForm .el-form-item__content {
|
.pageTopForm .el-form-item__content {
|
||||||
@@ -291,11 +295,12 @@ aside {
|
|||||||
right: 0px;
|
right: 0px;
|
||||||
}
|
}
|
||||||
// form表单只读时
|
// form表单只读时
|
||||||
.el-input.is-disabled .el-input__inner {
|
.el-textarea.is-disabled .el-textarea__inner , .el-input.is-disabled .el-input__inner {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
color: #C0C4CC;
|
color: #C0C4CC;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
resize: none;
|
||||||
}
|
}
|
||||||
.el-input.is-disabled .el-input__icon {
|
.el-input.is-disabled .el-input__icon {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-width="config && config.labelWidth || '130px'" class="demo-ruleForm">
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-width="config && config.labelWidth || '130px'" class="demo-ruleForm">
|
||||||
<el-row v-for="(formItem,index) of formList">
|
<template v-for="(formItem,index) of formList">
|
||||||
<h4 v-if="formItem && formItem.config && formItem.config.title" class="form-header h4">{{formItem.config.title}}</h4>
|
<h4 v-if="formItem && formItem.config && formItem.config.title" class="form-header h4">{{formItem.config.title}}</h4>
|
||||||
<el-col v-for="(formVal,key,index) of formItem['controls']" :span="formVal.span" v-if="!formVal.hidden" :style="formVal.style">
|
<el-row>
|
||||||
|
<el-col v-for="(formVal,key,index) of formItem['controls']" :span="formVal.span" v-if="!formVal.hidden" :class="formItem.config.colSpan" :style="formVal.style">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="formVal.label + ':'"
|
:label="formVal.label + ':'"
|
||||||
|
:title="formVal.label"
|
||||||
:prop="key"
|
:prop="key"
|
||||||
:required="formVal.required">
|
:required="formVal.required">
|
||||||
<template v-if="formVal.type === 'input'">
|
<template v-if="formVal.type === 'input'">
|
||||||
@@ -133,19 +135,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表单操作按钮 -->
|
<!-- 表单操作按钮 -->
|
||||||
<el-row v-if="!config['buttonGroup'] || config['buttonGroup'].length !== 0" style="float: right;">
|
<el-row v-if="config && config['buttonGroup'] || !config['buttonGroup']" style="float: right;">
|
||||||
<template v-if="config['buttonGroup'].length > 0">
|
<template v-if="config['buttonGroup'] && config['buttonGroup'].length > 0">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button v-for="item of config['buttonGroup']" :type="item.type" @click="fnEventChange(item)">{{item.title}}</el-button>
|
<el-button v-for="item of config['buttonGroup']" :type="item.type" @click="fnEventChange(item)">{{item.title}}</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else-if="!config['buttonGroup'] || config['buttonGroup'] && config['buttonGroup'].length !== 0">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||||
<el-button @click="handleReset">返回</el-button>
|
<el-button @click="handleReset">返回</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -259,5 +262,10 @@
|
|||||||
::v-deep .cursorAuto textarea {
|
::v-deep .cursorAuto textarea {
|
||||||
cursor: auto!important;
|
cursor: auto!important;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-form-item__label {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ export default {
|
|||||||
return MessageBox.confirm(content, "系统提示", {
|
return MessageBox.confirm(content, "系统提示", {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
dangerouslyUseHTMLString: true,
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -442,6 +442,21 @@ export const dynamicRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// 文件管理
|
||||||
|
{
|
||||||
|
path: '/disRevenue/resource/fileManage/view',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['disRevenue:resource:fileManage:view'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: ':id?',
|
||||||
|
component: () => import('@/views/disRevenue/resource/fileManage/fileManageView'),
|
||||||
|
name: 'fileManageView',
|
||||||
|
meta: { title: '文件管理信息', activeMenu: '/disRevenue/resource/fileManage' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
// agent采集数据
|
// agent采集数据
|
||||||
{
|
{
|
||||||
path: '/agentCollect/cpuData/view',
|
path: '/agentCollect/cpuData/view',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container pageTopForm">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" size="small" v-show="showSearch" label-width="auto">
|
<el-form :model="queryParams" ref="queryRef" size="small" v-show="showSearch" label-width="auto">
|
||||||
<el-col :span="8">
|
<el-col :span="6">
|
||||||
<el-form-item label="搜索" prop="switchName">
|
<el-form-item label="搜索" prop="switchName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.switchName"
|
v-model="queryParams.switchName"
|
||||||
|
|||||||
@@ -42,31 +42,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item class="lastBtnSty">
|
<el-form-item class="lastBtnSty">
|
||||||
<el-button type="primary" size="mini" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" size="mini" icon="Search" @click="handleQuery(1)">搜索</el-button>
|
||||||
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
<input type="file" ref="fileInput" @change="handleFileChange" style="display: none;">
|
<input type="file" ref="fileInput" @change="handleFileChange" style="display: none;">
|
||||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange">
|
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="roleList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||||
<template #tempType="{ row, column }">
|
|
||||||
<div @click="fnDetails(row, '1')">
|
|
||||||
<a href="javascript:;" style="color: #51afff;text-decoration: underline;">{{row.connectedDeviceType}}</a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #tempAuto="{ row, column }">
|
|
||||||
<div @click="fnDetails(row)">
|
|
||||||
<a href="javascript:;" style="color: #51afff;text-decoration: underline;">{{row.connectedDeviceType}}</a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</TableList>
|
|
||||||
<!-- 新建文件夹 -->
|
<!-- 新建文件夹 -->
|
||||||
<el-dialog title="新建文件夹" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog title="新建文件夹" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="noticeRef" :rules="rules" :model="formList" label-width="90px">
|
<el-form ref="noticeRef" :rules="rules" :model="formList" label-width="90px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form-item label="名称" prop="fileName">
|
<el-form-item label="名称" prop="switchName">
|
||||||
<el-input v-model="formList.fileName" />
|
<el-input v-model="formList.switchName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -86,7 +75,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 移动 -->
|
<!-- 移动 -->
|
||||||
<el-dialog class="towDialog" title="移动" :visible.sync="openMove" width="700px" append-to-body>
|
<el-dialog class="towDialog" :title="title" :visible.sync="openMove" width="700px" append-to-body>
|
||||||
<div class="w100" style="height: 300px">
|
<div class="w100" style="height: 300px">
|
||||||
<div>
|
<div>
|
||||||
将<template v-for="(item,index) of moveList">
|
将<template v-for="(item,index) of moveList">
|
||||||
@@ -94,7 +83,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="w100 mt10">
|
<div class="w100 mt10">
|
||||||
<span style="width: 13%;">移动到:</span>
|
<span style="width: 13%;">{{title}}到:</span>
|
||||||
<treeselect v-model="catalogList" :options="deptOptions" class="disInlineBlock" style="width: 87%;vertical-align: middle;" :show-count="true" placeholder="请选择目录" />
|
<treeselect v-model="catalogList" :options="deptOptions" class="disInlineBlock" style="width: 87%;vertical-align: middle;" :show-count="true" placeholder="请选择目录" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,7 +122,8 @@
|
|||||||
deptOptions: undefined,
|
deptOptions: undefined,
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label",
|
||||||
|
disabled: true
|
||||||
},
|
},
|
||||||
|
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
@@ -162,30 +152,31 @@
|
|||||||
],
|
],
|
||||||
tableButton: {
|
tableButton: {
|
||||||
top: [
|
top: [
|
||||||
{content: '上传文件', fnCode: 'upload', type: 'warning', icon: 'el-icon-download', hasPermi: 'disRevenue:resource:fileManage:upload'},
|
{content: '上传文件', fnCode: 'upload', type: 'success', icon: 'el-icon-upload2', hasPermi: 'disRevenue:resource:fileManage:upload'},
|
||||||
{content: '新建文件夹', fnCode: 'newFile', type: 'warning', icon: 'el-icon-download', hasPermi: 'disRevenue:resource:fileManage:file'},
|
{content: '新建文件夹', fnCode: 'newFile', type: 'primary', icon: 'el-icon-plus', hasPermi: 'disRevenue:resource:fileManage:file'},
|
||||||
{content: '移动', fnCode: 'move', type: 'warning', icon: 'el-icon-download', hasPermi: 'disRevenue:resource:fileManage:move'},
|
{content: '移动', fnCode: 'move', type: 'warning', icon: 'el-icon-sort', hasPermi: 'disRevenue:resource:fileManage:move'},
|
||||||
],
|
],
|
||||||
line: [
|
line: [
|
||||||
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:resource:fileManage:details'},
|
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:resource:fileManage:details'},
|
||||||
{content: '修改', fnCode: 'edit', type: 'text', icon: 'el-icon-edit', hasPermi: 'disRevenue:resource:fileManage:edit'},
|
{content: '修改', fnCode: 'edit', type: 'text', icon: 'el-icon-edit', hasPermi: 'disRevenue:resource:fileManage:edit'},
|
||||||
{content: '删除', fnCode: 'delete', type: 'text', icon: 'el-icon-delete', hasPermi: 'disRevenue:resource:fileManage:delete'},
|
{content: '删除', fnCode: 'delete', type: 'text', icon: 'el-icon-delete', hasPermi: 'disRevenue:resource:fileManage:delete'},
|
||||||
{content: '移动', fnCode: 'move', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:resource:fileManage:move'},
|
{content: '移动', fnCode: 'move', type: 'text', icon: 'el-icon-sort', hasPermi: 'disRevenue:resource:fileManage:move'},
|
||||||
{content: '复制', fnCode: 'copy', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:resource:fileManage:copy'},
|
{content: '复制', fnCode: 'copy', type: 'text', icon: 'el-icon-document-copy', hasPermi: 'disRevenue:resource:fileManage:copy'},
|
||||||
{content: '下载', fnCode: 'download', type: 'text', icon: 'el-icon-download', hasPermi: 'disRevenue:resource:fileManage:download'},
|
{content: '下载', fnCode: 'download', type: 'text', icon: 'el-icon-download', hasPermi: 'disRevenue:resource:fileManage:download'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
open: false,
|
open: false,
|
||||||
openMove: false,
|
openMove: false,
|
||||||
|
title: '',
|
||||||
moveList: [],
|
moveList: [],
|
||||||
catalogList: null,
|
catalogList: null,
|
||||||
formList:{
|
formList:{
|
||||||
fileName: '',
|
switchName: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
fileName: [
|
switchName: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -264,7 +255,10 @@
|
|||||||
// console.log('父组件拿到新值:', newValue);
|
// console.log('父组件拿到新值:', newValue);
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery(val) {
|
||||||
|
if (val && val === 1) {
|
||||||
|
delete this.queryParams.deptId;
|
||||||
|
}
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
@@ -291,6 +285,7 @@
|
|||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.openMove = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
callback(result, rowData, selectChange, selectList) {
|
callback(result, rowData, selectChange, selectList) {
|
||||||
@@ -306,18 +301,42 @@
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'move':
|
case 'move':
|
||||||
console.log('rowData==',rowData);
|
this.title = '移动';
|
||||||
this.openMove = true;
|
if (rowData && rowData.id) {
|
||||||
|
this.moveList = [rowData];
|
||||||
|
} else {
|
||||||
|
if (selectList && selectList.length <= 0) {
|
||||||
|
this.$modal.msgWarning("请选择数据!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.moveList = selectList;
|
this.moveList = selectList;
|
||||||
|
}
|
||||||
|
this.openMove = true;
|
||||||
break;
|
break;
|
||||||
case 'details':
|
case 'copy':
|
||||||
|
this.title = '复制';
|
||||||
|
this.moveList = [rowData];
|
||||||
|
this.openMove = true;
|
||||||
|
break;
|
||||||
|
case 'edit':
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/disRevenue/resource/resMonitor/details/index',
|
path:'/disRevenue/resource/fileManage/view',
|
||||||
query:{
|
query:{
|
||||||
id: rowData.id
|
id: rowData.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'details':
|
||||||
|
this.$router.push({
|
||||||
|
path:'/disRevenue/resource/fileManage/view',
|
||||||
|
query:{
|
||||||
|
id: rowData.id,
|
||||||
|
readonly: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'download':
|
||||||
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delTopology(selectChange)
|
return delTopology(selectChange)
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container mt20">
|
||||||
|
<Form :formList="formList" :ruleFormData="ruleForm" :config="paramsData && paramsData.readonly === 'true' ? {buttonGroup: []} : {}" @fnClick="callback"></Form>
|
||||||
|
<div v-if="paramsData && paramsData.readonly === 'true'" class="w100 mt50">
|
||||||
|
<p style="font-size: 1.2rem;font-weight: 500;border-bottom: 1px solid #e7e7e7;">{{netWorkCard.title}}</p>
|
||||||
|
<div v-for="item of netWorkCard.list" class="mt50">
|
||||||
|
<div v-for="(val,index) of item.data" style="width: 80%;margin: auto;" :class="index + 1 === item.data.length ? 'border' : 'borderType'">
|
||||||
|
<div style="width: 20%;border-right: 1px solid #e7e7e7;" class="ml10 disInlineBlock"><p>{{val.name}}</p></div>
|
||||||
|
<p style="width: 75%" class="ml10 disInlineBlock">{{val.content}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-button v-if="paramsData && paramsData.readonly === 'true'" class="mb20 mt20" style="float: right;" @click="callback({fnCode: 'cancle'})">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Handle">
|
||||||
|
import Form from '@/components/form/index.vue';
|
||||||
|
import {addGroup, getGroup, updateGroup, resNameList} from "@/api/disRevenue/resource"
|
||||||
|
export default {
|
||||||
|
name: 'FileManageView',
|
||||||
|
components: {Form},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
ruleForm: {},
|
||||||
|
formList: [],
|
||||||
|
paramsData: {},
|
||||||
|
netWorkCard: {
|
||||||
|
title: '网卡信息',
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
data: [
|
||||||
|
{name: '接口名称', content: 'eno1(Intel Corporation Ethernet Connection X722 for 10GbE SFP+)'},
|
||||||
|
{name: 'MAC地址', content: '7c:c3:85:b6:61:bf'},
|
||||||
|
{name: '接口类型', content: 'Ethernet'},
|
||||||
|
{name: 'IPv4地址', content: '172.16.15.103'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
data: [
|
||||||
|
{name: '接口名称', content: 'eno1(Intel Corporation Ethernet Connection X722 for 10GbE SFP+)'},
|
||||||
|
{name: 'MAC地址', content: '7c:c3:85:b6:61:bf'},
|
||||||
|
{name: '接口类型', content: 'Ethernet'},
|
||||||
|
{name: 'IPv4地址', content: '172.16.15.103'}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.paramsData = this.$route && this.$route.query;
|
||||||
|
if (this.paramsData && this.paramsData.id) {
|
||||||
|
this.getFormDataList(this.paramsData.id);
|
||||||
|
}
|
||||||
|
this.fnFormList();
|
||||||
|
this.getResNameList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// formList集合
|
||||||
|
fnFormList(objVal) {
|
||||||
|
this.formList = [{
|
||||||
|
config: {title: '', colSpan: 'disBlock', readonly: this.paramsData.readonly},
|
||||||
|
controls: {
|
||||||
|
id: {label: 'ID',hidden: true},
|
||||||
|
groupName: {label: '名称', span: 12, type: 'input'},
|
||||||
|
type: {label: '类型', span: 12, type: 'input', disabled: true},
|
||||||
|
description: {label: '描述', span: 12, type: 'textarea'},
|
||||||
|
createTime: {label: '创建时间', span: 12, type: 'date', disabled: true},
|
||||||
|
includedDevices: {label: '修改时间', span: 12, type: 'date', disabled: true},
|
||||||
|
num: {label: '大小(KB)', span: 12, type: 'input', disabled: true},
|
||||||
|
md5: {label: 'MD5值', span: 12, type: 'input', disabled: true},
|
||||||
|
router: {label: '路径', span: 12, type: 'input', disabled: true},
|
||||||
|
createBy: {label: '创建人', span: 12, type: 'input', disabled: true},
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
},
|
||||||
|
// 获取详情
|
||||||
|
getFormDataList(id) {
|
||||||
|
getGroup(id).then(val => {
|
||||||
|
if (val && val.data) {
|
||||||
|
this.ruleForm = val.data;
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.msgError("操作失败")
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 包含设备
|
||||||
|
getResNameList() {
|
||||||
|
resNameList().then(val => {
|
||||||
|
this.formList[0].controls['includedDevices']['options']= val && val.map(item => {
|
||||||
|
return Object.assign({label: item.resourceName, key: item.resourceName});
|
||||||
|
});
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.msgError("操作失败")
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 监听事件
|
||||||
|
callback(result, dataVal, formVal) {
|
||||||
|
if (result && result.fnCode) {
|
||||||
|
switch (result.fnCode) {
|
||||||
|
case 'submit':
|
||||||
|
let fnType = addGroup;
|
||||||
|
if (dataVal && dataVal.id) {
|
||||||
|
fnType = updateGroup;
|
||||||
|
}
|
||||||
|
fnType(dataVal).then(response => {
|
||||||
|
this.$modal.msgSuccess(response.msg);
|
||||||
|
this.$router.push("/resource/fileManage")
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.msgError("操作失败")
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'cancle':
|
||||||
|
this.$router.push("/resource/fileManage");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.borderType {
|
||||||
|
border-top: 1px solid #e7e7e7;
|
||||||
|
border-left: 1px solid #e7e7e7;
|
||||||
|
border-right: 1px solid #e7e7e7;
|
||||||
|
}
|
||||||
|
.border {
|
||||||
|
border: 1px solid #e7e7e7;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -42,11 +42,13 @@
|
|||||||
getFormDataList(id) {
|
getFormDataList(id) {
|
||||||
getGroup(id).then(val => {
|
getGroup(id).then(val => {
|
||||||
if (val && val.data) {
|
if (val && val.data) {
|
||||||
|
if (val.data && val.data['includedDevices']) {
|
||||||
val.data['includedDevices'] = val.data['includedDevices'].split(',');
|
val.data['includedDevices'] = val.data['includedDevices'].split(',');
|
||||||
|
}
|
||||||
this.ruleForm = val.data;
|
this.ruleForm = val.data;
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError("操作失败")
|
// this.$modal.msgError("操作失败")
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 包含设备
|
// 包含设备
|
||||||
|
|||||||
@@ -16,11 +16,14 @@
|
|||||||
ruleForm: {
|
ruleForm: {
|
||||||
resourceType: '1',
|
resourceType: '1',
|
||||||
snmpDetect: '1',
|
snmpDetect: '1',
|
||||||
protocol: '1',
|
protocol: '2',
|
||||||
resourceVersion: '1',
|
resourceVersion: '1',
|
||||||
securityLevel: '1',
|
securityLevel: '1',
|
||||||
rwPermission: '1',
|
rwPermission: '1',
|
||||||
encryption: '1',
|
encryption: '1',
|
||||||
|
agentWeek: '5秒',
|
||||||
|
agentNum: '3次',
|
||||||
|
agentOID: '1.3.6.1.2.1.1.5'
|
||||||
},
|
},
|
||||||
formList: [],
|
formList: [],
|
||||||
paramsData: {}
|
paramsData: {}
|
||||||
@@ -44,25 +47,28 @@
|
|||||||
hardwareSn: {label: '硬件SN', span: 12, type: 'input',
|
hardwareSn: {label: '硬件SN', span: 12, type: 'input',
|
||||||
disabled: objVal && objVal.id ? true : false, required: true},
|
disabled: objVal && objVal.id ? true : false, required: true},
|
||||||
resourceName: {label: '资源名称', span: 12, type: 'input',required: true},
|
resourceName: {label: '资源名称', span: 12, type: 'input',required: true},
|
||||||
resourceType: {label: '资源类型', span: 12, type: 'radio', options: this.dict.type.rm_register_resource_type},
|
resourceType: {label: '资源类型', span: 12, type: 'radio', options: this.dict.type.rm_register_resource_type, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
ipAddress: {label: 'IP地址', span: 12, type: 'input',required: true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
ipAddress: {label: 'IP地址', span: 12, type: 'input',required: true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
protocol: {label: '协议', span: 12, type: 'radio', options: this.dict.type.rm_register_protocol, required: true},
|
protocol: {label: '协议', span: 12, type: 'radio', options: this.dict.type.rm_register_protocol, required: true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
resourcePort: {label: '端口', span: 12, type: 'input',required: true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
resourcePort: {label: '端口', span: 12, type: 'input',required: true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
// otherPortName: {label: ' ', span: 4, type: 'input',
|
// otherPortName: {label: ' ', span: 4, type: 'input',
|
||||||
// hidden: objVal && objVal.resourcePort === '2' ? false : true},
|
// hidden: objVal && objVal.resourcePort === '2' ? false : true},
|
||||||
snmpDetect: {label: 'SNMP探测', span: 12, type: 'radio', eventName: 'change',required: true, options: this.dict.type.rm_register_snmp_detect},
|
snmpDetect: {label: 'SNMP探测', span: 12, type: 'radio', eventName: 'change',required: true, options: this.dict.type.rm_register_snmp_detect, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
resourceVersion: {label: 'SNMP版本', span: 12, type: 'radio',required: true, options: this.dict.type.rm_register_version,hidden: objVal && objVal.snmpDetect === '1' ? false : true},
|
resourceVersion: {label: 'SNMP版本', span: 12, type: 'radio',required: true, options: this.dict.type.rm_register_version,hidden: objVal && objVal.snmpDetect === '1' ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
rwPermission: {label: '读写权限', span: 12, type: 'radio', options: this.dict.type.rm_register_permission,hidden: objVal && objVal.snmpDetect === '1' ? false : true},
|
rwPermission: {label: '读写权限', span: 12, type: 'radio', options: this.dict.type.rm_register_permission,hidden: objVal && objVal.snmpDetect === '1' ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
securityLevel: {label: '安全级别', span: 12, type: 'radio', options: this.dict.type.rm_register_security_level,hidden: objVal && objVal.id ? false : true},
|
securityLevel: {label: '安全级别', span: 12, type: 'radio', options: this.dict.type.rm_register_security_level,hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
encryption: {label: '加密方式', span: 12, type: 'radio', options: this.dict.type.rm_register_encryption,hidden: objVal && objVal.id ? false : true},
|
encryption: {label: '加密方式', span: 12, type: 'radio', options: this.dict.type.rm_register_encryption,hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
teamName: {label: '团体名称', span: 12, type: 'input', hidden: objVal && objVal.snmpDetect === '1' ? false : true,disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
teamName: {label: '团体名称', span: 12, type: 'input', hidden: objVal && objVal.snmpDetect === '1' ? false : true,disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
snmpCollectAddr: {label: 'SNMP采集地址', span: 12, type: 'input',required: true, hidden: objVal && objVal.snmpDetect === '1' ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
snmpCollectAddr: {label: 'SNMP采集地址', span: 12, type: 'input',required: true, hidden: objVal && objVal.snmpDetect === '1' ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
resourceUserName: {label: '用户名', span: 12, type: 'input', hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
resourceUserName: {label: '用户名', span: 12, type: 'input', hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
resourcePwd: {label: '密码', span: 12, type: 'input', hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
resourcePwd: {label: '密码', span: 12, type: 'input', hidden: objVal && objVal.id ? false : true, disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
description: {label: '描述', span: 12, type: 'textarea'},
|
description: {label: '描述', span: 12, type: 'textarea',disabled: objVal && objVal.registrationStatus === '1' ? true : false},
|
||||||
agentVersion: {label: 'AGENT版本', span: 12, type: 'input',disabled: objVal && objVal.id ? true : false},
|
agentVersion: {label: 'AGENT版本', span: 12, type: 'input',disabled: objVal && objVal.id ? true : false},
|
||||||
// customerName: {label: '设备业务客户', span: 12, type: 'input'},
|
// customerName: {label: '设备业务客户', span: 12, type: 'input'},
|
||||||
// serviceNumber: {label: '业务号', span: 12, type: 'input'},
|
// serviceNumber: {label: '业务号', span: 12, type: 'input'},
|
||||||
|
agentWeek: {label: 'Agent与交换机心跳检测周期', span: 12, type: 'input', disabled: true},
|
||||||
|
agentNum: {label: 'Agent与交换机心跳检测次数', span: 12, type: 'input', disabled: true},
|
||||||
|
agentOID: {label: 'Agent与交换机心跳检测OID', span: 12, type: 'input', disabled: true},
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,62 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
<el-form-item label="资源类型" prop="resourceType">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.resourceType"
|
||||||
|
placeholder="请选择资源类型"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.rm_register_resource_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="Agent注册状态" title="Agent注册状态" prop="registrationStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.registrationStatus"
|
||||||
|
placeholder="请选择Agent注册状态"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.rm_register_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="Agent在线状态" title="Agent在线状态" prop="onlineStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.onlineStatus"
|
||||||
|
placeholder="请选择Agent在线状态"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.rm_register_online_state"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="交换机在线状态" title="交换机在线状态" prop="onlineStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.onlineStatus"
|
||||||
|
placeholder="请选择交换机在线状态"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.rm_register_online_state"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
<el-form-item class="lastBtnSty">
|
<el-form-item class="lastBtnSty">
|
||||||
<el-button type="primary" size="mini" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" size="mini" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@@ -68,8 +124,9 @@
|
|||||||
ipAddress: { label: `IP地址`, minWidth: '200', visible: true },
|
ipAddress: { label: `IP地址`, minWidth: '200', visible: true },
|
||||||
resourcePort: { label: `端口`, slotName: 'tempPort', minWidth: '80', visible: true },
|
resourcePort: { label: `端口`, slotName: 'tempPort', minWidth: '80', visible: true },
|
||||||
protocol: { label: `协议`, minWidth: '80', slotName: 'tempProtocol', visible: true },
|
protocol: { label: `协议`, minWidth: '80', slotName: 'tempProtocol', visible: true },
|
||||||
registrationStatus: { label: `注册状态`, slotName: 'tempStatus', minWidth: '80', visible: true },
|
registrationStatus: { label: `Agent注册状态`, slotName: 'tempStatus', minWidth: '120', visible: true },
|
||||||
onlineStatus: { label: `在线状态`, slotName: 'tempOnlineStatus', minWidth: '80', visible: true }
|
onlineStatus: { label: `Agent在线状态`, slotName: 'tempOnlineStatus', minWidth: '120', visible: true },
|
||||||
|
switchStatus: { label: `交换机在线状态`, slotName: 'tempOnlineStatus', minWidth: '120', visible: true }
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
searcherForm: [
|
searcherForm: [
|
||||||
@@ -154,11 +211,15 @@
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'unenroll':
|
case 'unenroll':
|
||||||
|
let content = '<p style="font-size: 1rem;font-weight: 600;">资源进行取消注册操作</p>' +
|
||||||
|
'<p style="height: 0px;margin:10px 0 50px;">相关的服务器收益或者交换机带宽收益记录中将不在统计相关信息,拓扑中也会将相关的连接删除</p>';
|
||||||
|
this.$modal.confirm(content).then(() => {
|
||||||
rowData['registrationStatus'] = '0';
|
rowData['registrationStatus'] = '0';
|
||||||
updateregisterType(rowData).then(res => {
|
updateregisterType(rowData).then(res => {
|
||||||
this.$modal.msgSuccess("取消注册成功!");
|
this.$modal.msgSuccess("取消注册成功!");
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
}).catch(() => {});
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
// let dataList = [];
|
// let dataList = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user