1、联调业务下发管理 2、联调交换机管理 3、拓扑管理列表和表单添加新字段 4、修改知识分享库搜索样式
This commit is contained in:
@@ -340,3 +340,11 @@ export function delBusDeploy(roleId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 提交审核
|
||||||
|
export function reviewBusiness(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/businessDeploy/reviewBusiness',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -408,3 +408,121 @@ export function delAgentManage(Ids) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** --------------交换机管理--------------- */
|
||||||
|
// 查询列表
|
||||||
|
export function listSwitchManage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchManagement/list',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 所有列表
|
||||||
|
export function listAllSwitchName(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchManagement/getAllSwitchName',
|
||||||
|
method: 'post',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询详细
|
||||||
|
export function getSwitchManage(Id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchManagement/' + Id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function addSwitchManage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchManagement',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function updateSwitchManage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchManagement',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 图形监控-基础信息
|
||||||
|
export function switchMonitorData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/rocketmq/switchOtherData/getSwitchMonitorMsg',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 图形监控-设备cpu使用率
|
||||||
|
export function switchCpuData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/rocketmq/switchOtherData/getSwitchCpuUseMsg',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 图形监控-设备内存使用率
|
||||||
|
export function switchMemData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/rocketmq/switchOtherData/getSwitchMemUseMsg',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 图形监控-功率
|
||||||
|
export function switchPowerData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/rocketmq/switchOtherData/getSwitchPowerMsg',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** --------------接口备注信息--------------- */
|
||||||
|
// 查询列表
|
||||||
|
// export function listAllSwitchInterface(query) {
|
||||||
|
// return request({
|
||||||
|
// url: '/system/switchInterfaceInfo/list',
|
||||||
|
// method: 'post',
|
||||||
|
// data: query
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 查询详细
|
||||||
|
export function getSwitchInterface(Id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchInterfaceInfo/' + Id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增
|
||||||
|
export function addSwitchInterface(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchInterfaceInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
export function updateSwitchInterface(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchInterfaceInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function delSwitchInterface(Ids) {
|
||||||
|
return request({
|
||||||
|
url: '/system/switchInterfaceInfo/' + Ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,7 +22,11 @@
|
|||||||
@[formVal.eventName]="(val) => handleChange(key,val,formVal)"></el-input>
|
@[formVal.eventName]="(val) => handleChange(key,val,formVal)"></el-input>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="formVal.type === 'textarea'">
|
<template v-if="formVal.type === 'textarea'">
|
||||||
|
<div v-if="toBoolean(formVal.disabled || formItem.config.readonly)">
|
||||||
|
<span style="color: #C0C4CC;">{{ruleForm[key]}}</span>
|
||||||
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
|
v-else
|
||||||
v-model="ruleForm[key]"
|
v-model="ruleForm[key]"
|
||||||
:disabled="toBoolean(formVal.disabled || formItem.config.readonly)"
|
:disabled="toBoolean(formVal.disabled || formItem.config.readonly)"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@@ -159,21 +163,21 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表单操作按钮 -->
|
|
||||||
<el-row v-if="config && config['buttonGroup'] || !config['buttonGroup']" style="float: right;">
|
|
||||||
<template v-if="config['buttonGroup'] && config['buttonGroup'].length > 0">
|
|
||||||
<el-form-item>
|
|
||||||
<el-button v-for="item of config['buttonGroup']" :type="item.type" @click="fnEventChange(item)">{{item.title}}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<template v-else-if="!config['buttonGroup'] || config['buttonGroup'] && config['buttonGroup'].length !== 0">
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
|
||||||
<el-button @click="handleReset">返回</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 表单操作按钮 -->
|
||||||
|
<el-row v-if="config && config['buttonGroup'] || !config['buttonGroup']" style="float: right;">
|
||||||
|
<template v-if="config['buttonGroup'] && config['buttonGroup'].length > 0">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button v-for="item of config['buttonGroup']" :type="item.type" @click="fnEventChange(item)">{{item.title}}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="!config['buttonGroup'] || config['buttonGroup'] && config['buttonGroup'].length !== 0">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="submitForm('submit')">提交</el-button>
|
||||||
|
<el-button @click="handleReset">返回</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -239,7 +243,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm(fnCodeName) {
|
||||||
let forList = {...this.ruleForm};
|
let forList = {...this.ruleForm};
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -252,7 +256,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$emit('fnClick', {fnCode: 'submit'}, {...forList});
|
this.$emit('fnClick', {fnCode: fnCodeName}, {...forList});
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -280,6 +284,7 @@
|
|||||||
this.handleReset();
|
this.handleReset();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
this.submitForm(result.fnCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import TableList from "@/components/table/index.vue"
|
import TableList from "@/components/table/index.vue"
|
||||||
import {listBusDeploy, delBusDeploy} from "@/api/disRevenue/earnManage"
|
import {listBusDeploy, delBusDeploy, updateBusDeploy} from "@/api/disRevenue/earnManage"
|
||||||
export default {
|
export default {
|
||||||
name: 'BusinessIssued',
|
name: 'BusinessIssued',
|
||||||
components: {TableList},
|
components: {TableList},
|
||||||
@@ -65,11 +65,11 @@
|
|||||||
{content: '导出', fnCode: 'export', type: 'warning', icon: 'el-icon-download', hasPermi: 'earnManage:businessIssued:export'},
|
{content: '导出', fnCode: 'export', type: 'warning', icon: 'el-icon-download', hasPermi: 'earnManage:businessIssued:export'},
|
||||||
],
|
],
|
||||||
line: [
|
line: [
|
||||||
{content: '修改', fnCode: 'edit', type: 'text', icon: 'el-icon-edit', hasPermi: 'disRevenue:earnManage:businessIssued:edit'},
|
{content: '修改', fnCode: 'edit', type: 'text', icon: 'el-icon-edit', showName: 'reviewStatus', showVal: ['0', '3'], hasPermi: 'disRevenue:earnManage:businessIssued:edit'},
|
||||||
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:earnManage:businessIssued:details'},
|
{content: '详情', fnCode: 'details', type: 'text', icon: 'el-icon-view', hasPermi: 'disRevenue:earnManage:businessIssued:details'},
|
||||||
{content: '删除', fnCode: 'delete', type: 'text', icon: 'el-icon-delete', hasPermi: 'disRevenue:earnManage:businessIssued:delete'},
|
{content: '删除', fnCode: 'delete', type: 'text', icon: 'el-icon-delete', showName: 'reviewStatus', showVal: ['0', '3'], hasPermi: 'disRevenue:earnManage:businessIssued:delete'},
|
||||||
{content: '审核', fnCode: 'audit', type: 'text', showName: 'reviewStatus', showVal: '1', icon: 'el-icon-document-add', hasPermi: 'disRevenue:earnManage:businessIssued:audit'},
|
{content: '审核', fnCode: 'audit', type: 'text', showName: 'reviewStatus', showVal: '1', icon: 'el-icon-document-add', hasPermi: 'disRevenue:earnManage:businessIssued:audit'},
|
||||||
{content: '提交审核', fnCode: 'upAudit', type: 'text', showName: 'reviewStatus', showVal: ['0', '1', '3'], icon: 'el-icon-document-checked', hasPermi: 'disRevenue:earnManage:businessIssued:upAudit'},
|
{content: '提交审核', fnCode: 'upAudit', type: 'text', showName: 'reviewStatus', showVal: ['0', '3'], icon: 'el-icon-document-checked', hasPermi: 'disRevenue:earnManage:businessIssued:upAudit'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
path:'/earnManage/businessIssued/details',
|
path:'/earnManage/businessIssued/details',
|
||||||
query:{
|
query:{
|
||||||
id: rowData.id,
|
id: rowData.id,
|
||||||
audit: true
|
reviewStatus: rowData.reviewStatus
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@@ -152,11 +152,14 @@
|
|||||||
let content = '<p style="font-size: 1rem;font-weight: 600;">提交审核</p>' +
|
let content = '<p style="font-size: 1rem;font-weight: 600;">提交审核</p>' +
|
||||||
'<p style="height: 0px;margin:10px 0 50px;">提交审核后,相关的任务内容将不能修改</p>';
|
'<p style="height: 0px;margin:10px 0 50px;">提交审核后,相关的任务内容将不能修改</p>';
|
||||||
this.$modal.confirm(content, {submitTitle: '继续提交'}).then(() => {
|
this.$modal.confirm(content, {submitTitle: '继续提交'}).then(() => {
|
||||||
// rowData['registrationStatus'] = '0';
|
let params = {
|
||||||
// updateregisterType(rowData).then(res => {
|
id: rowData.id,
|
||||||
// this.$modal.msgSuccess("取消注册成功!");
|
reviewStatus: '1'
|
||||||
// this.getList();
|
};
|
||||||
// });
|
updateBusDeploy(params).then(res => {
|
||||||
|
this.$modal.msgSuccess("提交审核成功!");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<Form :formList="formList" :ruleFormData="ruleForm" @fnClick="callback"></Form>
|
<Form :formList="formList" :ruleFormData="ruleForm" :config="config" @fnClick="callback"></Form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Form from '@/components/form/index.vue';
|
import Form from '@/components/form/index.vue';
|
||||||
import {addBusDeploy, getBusDeploy, updateBusDeploy, listAllBusinessList, getAllBusScriptName} from "@/api/disRevenue/earnManage"
|
import {addBusDeploy, getBusDeploy, updateBusDeploy, listAllBusinessList, getAllBusScriptName, reviewBusiness} from "@/api/disRevenue/earnManage"
|
||||||
export default {
|
export default {
|
||||||
name: 'BusinessIssuedDetails',
|
name: 'BusinessIssuedDetails',
|
||||||
components: {Form},
|
components: {Form},
|
||||||
@@ -17,11 +17,25 @@
|
|||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
formList: [],
|
formList: [],
|
||||||
scriptList: {},
|
scriptList: {},
|
||||||
paramsData: {}
|
paramsData: {},
|
||||||
|
config: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.paramsData = this.$route && this.$route.query;
|
this.paramsData = this.$route && this.$route.query;
|
||||||
|
if (this.paramsData && this.paramsData.readonly) {
|
||||||
|
this.config = {
|
||||||
|
buttonGroup: [{title: '返回', fnCode: 'goBack'}]
|
||||||
|
};
|
||||||
|
} else if (this.paramsData && this.paramsData.reviewStatus) {
|
||||||
|
this.config = {
|
||||||
|
buttonGroup: [
|
||||||
|
{title: '返回', fnCode: 'goBack'},
|
||||||
|
{title: '审核驳回', fnCode: 'rejection'},
|
||||||
|
{title: '审核通过', fnCode: 'byMeans', type: 'primary'},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
if (this.paramsData && this.paramsData.id) {
|
if (this.paramsData && this.paramsData.id) {
|
||||||
this.getFormDataList(this.paramsData.id);
|
this.getFormDataList(this.paramsData.id);
|
||||||
}
|
}
|
||||||
@@ -32,25 +46,51 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// formList集合
|
// formList集合
|
||||||
fnFormList(objVal) {
|
fnFormList(objVal) {
|
||||||
this.formList = [{
|
if (this.paramsData && this.paramsData.reviewStatus) {
|
||||||
config: {title: '基本信息', colSpan: this.paramsData && this.paramsData.readonly ? '' : 'disBlock', readonly: this.paramsData && this.paramsData.readonly},
|
this.formList = [{
|
||||||
controls: {
|
config: {title: '基本信息', colSpan: 'disBlock', readonly: true},
|
||||||
id: {label: 'ID',hidden: true},
|
controls: {
|
||||||
taskName: {label: '任务名称', span: 12, type: 'input', required: true},
|
id: {label: 'ID',hidden: true},
|
||||||
businessName: {label: '业务名称', span: 12, type: 'select', options: [], required: true},
|
taskName: {label: '任务名称', span: 12, type: 'input', required: true},
|
||||||
scriptName: {label: '脚本名称', span: 12, type: 'select', options: [], eventName: 'change', required: true},
|
scriptName: {label: '脚本名称', span: 12, type: 'select', options: [], eventName: 'change', required: true},
|
||||||
scriptPath: {label: '脚本文件地址', span: 12, type: 'input', required: true, disabled: true},
|
scriptPath: {label: '脚本文件地址', span: 12, type: 'input', required: true},
|
||||||
scriptParams: {label: '脚本参数', span: 12, type: 'input'},
|
scriptParams: {label: '脚本参数', span: 12, type: 'input'},
|
||||||
submitBy: {label: '提交人', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
businessName: {label: '业务名称', span: 12, type: 'select', options: [], required: true},
|
||||||
reviewStatus: {label: '审核状态', span: 12, type: 'select', options: this.dict.type.eps_business_review_status, hidden: !(this.paramsData && this.paramsData.readonly)},
|
submitBy: {label: '提交人', span: 12, type: 'input'},
|
||||||
reviewBy: {label: '审核人', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
// reviewBy: {label: '审核人', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
reviewTime: {label: '审核时间', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
// reviewTime: {label: '审核时间', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
reviewComment: {label: '审核意见', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
updateTime: {label: '修改时间', span: 12, type: 'date'},
|
||||||
createTime: {label: '创建时间', span: 12, type: 'date', hidden: !(this.paramsData && this.paramsData.readonly)},
|
createTime: {label: '创建时间', span: 12, type: 'date'},
|
||||||
updateTime: {label: '修改时间', span: 12, type: 'date', hidden: !(this.paramsData && this.paramsData.readonly)},
|
reviewStatus: {label: '审核状态', span: 12, type: 'select', options: this.dict.type.eps_business_review_status,},
|
||||||
deployDevice: {label: '部署设备', span: 18, type: 'textarea', rows: 15, required: true},
|
deployDevice: {label: '部署设备', span: 18, type: 'textarea', rows: 15, required: true},
|
||||||
}
|
}
|
||||||
}];
|
},{
|
||||||
|
config: {},
|
||||||
|
controls: {
|
||||||
|
reviewComment: {label: '审核意见', span: 18, type: 'textarea'},
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
} else {
|
||||||
|
this.formList = [{
|
||||||
|
config: {title: '基本信息', colSpan: this.paramsData && this.paramsData.readonly ? '' : 'disBlock', readonly: this.paramsData && this.paramsData.readonly},
|
||||||
|
controls: {
|
||||||
|
id: {label: 'ID',hidden: true},
|
||||||
|
taskName: {label: '任务名称', span: 12, type: 'input', required: true},
|
||||||
|
businessName: {label: '业务名称', span: 12, type: 'select', options: [], required: true},
|
||||||
|
scriptName: {label: '脚本名称', span: 12, type: 'select', options: [], eventName: 'change', required: true},
|
||||||
|
scriptPath: {label: '脚本文件地址', span: 12, type: 'input', required: true, disabled: true},
|
||||||
|
scriptParams: {label: '脚本参数', span: 12, type: 'input'},
|
||||||
|
submitBy: {label: '提交人', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
reviewStatus: {label: '审核状态', span: 12, type: 'select', options: this.dict.type.eps_business_review_status, hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
reviewBy: {label: '审核人', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
reviewTime: {label: '审核时间', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
reviewComment: {label: '审核意见', span: 12, type: 'input', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
createTime: {label: '创建时间', span: 12, type: 'date', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
updateTime: {label: '修改时间', span: 12, type: 'date', hidden: !(this.paramsData && this.paramsData.readonly)},
|
||||||
|
deployDevice: {label: '部署设备', span: 18, type: 'textarea', rows: 15, required: true},
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
getFormDataList(id) {
|
getFormDataList(id) {
|
||||||
@@ -82,6 +122,7 @@
|
|||||||
},
|
},
|
||||||
// 监听事件
|
// 监听事件
|
||||||
callback(result, dataVal, formVal) {
|
callback(result, dataVal, formVal) {
|
||||||
|
console.log('result===',result);
|
||||||
if (result && result.fnCode) {
|
if (result && result.fnCode) {
|
||||||
switch (result.fnCode) {
|
switch (result.fnCode) {
|
||||||
case 'scriptName':
|
case 'scriptName':
|
||||||
@@ -106,6 +147,32 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'rejection': // 审核驳回
|
||||||
|
let params = {
|
||||||
|
id: dataVal.id,
|
||||||
|
reviewStatus: '3',
|
||||||
|
reviewComment: dataVal.reviewComment
|
||||||
|
};
|
||||||
|
reviewBusiness(params).then(res => {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
this.$router.push("/earnManage/businessIssued");
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.msgError("操作失败");
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 'byMeans': // 审核通过
|
||||||
|
let paramsBy = {
|
||||||
|
id: dataVal.id,
|
||||||
|
reviewStatus: '2',
|
||||||
|
reviewComment: dataVal.reviewComment
|
||||||
|
};
|
||||||
|
reviewBusiness(paramsBy).then(res => {
|
||||||
|
this.$modal.msgSuccess(res.msg);
|
||||||
|
this.$router.push("/earnManage/businessIssued");
|
||||||
|
}).catch(() => {
|
||||||
|
this.$modal.msgError("操作失败");
|
||||||
|
});
|
||||||
|
break;
|
||||||
case 'cancel':
|
case 'cancel':
|
||||||
this.$router.push("/earnManage/businessIssued");
|
this.$router.push("/earnManage/businessIssued");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
<div class="app-container pageTopForm">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" size="small" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" size="small" label-width="130px">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="节点名称" prop="nodeName">
|
<el-form-item label="ClientID" prop="nodeName">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.nodeName"
|
v-model="queryParams.nodeName"
|
||||||
placeholder="请选择节点名称"
|
placeholder="请选择ClientID"
|
||||||
clearable>
|
clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_normal_disable"
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
columns: {
|
columns: {
|
||||||
id: {label: `ID`, visible: false},
|
id: {label: `ID`, visible: false},
|
||||||
createTime: {label: `修改时间`, visible: true},
|
createTime: {label: `修改时间`, visible: true},
|
||||||
nodeName: {label: `节点名称`, minWidth: '130', visible: true},
|
nodeName: {label: `ClientID`, minWidth: '130', visible: true},
|
||||||
hardwareSn: {label: `硬件SN`},
|
hardwareSn: {label: `硬件SN`},
|
||||||
changeContent: {label: `修改内容`, minWidth: '350', visible: true},
|
changeContent: {label: `修改内容`, minWidth: '350', visible: true},
|
||||||
creatBy: {label: `修改人`, width: '80', visible: true},
|
creatBy: {label: `修改人`, width: '80', visible: true},
|
||||||
|
|||||||
@@ -4,17 +4,17 @@
|
|||||||
<div v-if="this.paramsData && this.paramsData.readonly">
|
<div v-if="this.paramsData && this.paramsData.readonly">
|
||||||
<p style="font-size: 1rem;font-weight: 500;border-bottom: 1px solid #ddd;">接口备注信息</p>
|
<p style="font-size: 1rem;font-weight: 500;border-bottom: 1px solid #ddd;">接口备注信息</p>
|
||||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback">
|
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback">
|
||||||
<template #tempHandle="{ row, column }">
|
<template #tempChange="{ row, column }">
|
||||||
<div>
|
<div>
|
||||||
<!-- 非编辑状态:显示文本 -->
|
<!-- 非编辑状态:显示文本 -->
|
||||||
<template v-if="!row.editStatus">
|
<template v-if="!row.editStatus">
|
||||||
<span>{{ row.resourceName }}</span>
|
<span>{{ row.interfaceRemark }}</span>
|
||||||
<el-button icon="el-icon-edit" type="text" @click="rowDataChange(row)"></el-button>
|
<el-button icon="el-icon-edit" type="text" @click="rowDataChange(row)"></el-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<!-- 编辑状态:显示输入框 -->
|
<!-- 编辑状态:显示输入框 -->
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-input v-model="row.resourceName" size="mini"></el-input>
|
<el-input v-model="row.interfaceRemark" size="mini"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-button size="mini" type="primary" @click="submit(row)">确定</el-button>
|
<el-button size="mini" type="primary" @click="submit(row)">确定</el-button>
|
||||||
@@ -29,27 +29,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Handle">
|
<script setup>
|
||||||
import Form from '@/components/form/index.vue';
|
import Form from '@/components/form/index.vue';
|
||||||
import TableList from '@/components/table/index.vue';
|
import TableList from '@/components/table/index.vue';
|
||||||
import {addHandle, getHandle, updateHandle,listHandle, delTopology} from "@/api/disRevenue/resource"
|
import {addSwitchManage, getSwitchManage, updateSwitchManage,updateSwitchInterface, delSwitchInterface} from "@/api/disRevenue/resource"
|
||||||
export default {
|
export default {
|
||||||
name: 'RegisterHandle',
|
name: 'RegisterHandle',
|
||||||
components: {Form, TableList},
|
components: {Form, TableList},
|
||||||
dicts: ['rm_register_resource_type', 'rm_register_online_state','rm_register_version', 'rm_register_security_level', 'rm_register_permission', 'rm_register_encryption'],
|
dicts: ['switch_type', 'rm_register_online_state','rm_register_version', 'rm_register_security_level', 'rm_register_permission', 'rm_register_encryption'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
resourceVersion: '1',
|
snmpVersion: '1',
|
||||||
securityLevel: '2',
|
securityLevel: '2',
|
||||||
rwPermission: '2',
|
readWritePermission: '2',
|
||||||
encryption: '2',
|
encryptionMethod: '2',
|
||||||
switchNum: '3次',
|
heartbeatCount: '3次',
|
||||||
switchWeek: '5秒',
|
heartbeatInterval: '30s',
|
||||||
switchOID: '1.3.6.1.2.1.1.5',
|
heartbeatOid: '1.3.6.1.2.1.1.5',
|
||||||
// agentWeek: '5秒',
|
|
||||||
// agentNum: '3次',
|
|
||||||
// agentOID: '1.3.6.1.2.1.1.5'
|
|
||||||
},
|
},
|
||||||
formList: [],
|
formList: [],
|
||||||
paramsData: {},
|
paramsData: {},
|
||||||
@@ -57,8 +54,8 @@
|
|||||||
// 列显隐信息
|
// 列显隐信息
|
||||||
columns: {
|
columns: {
|
||||||
id: { label: `ID`,width: '80'},
|
id: { label: `ID`,width: '80'},
|
||||||
resourceName: { label: `接口名称`, slotName: 'tempHandle', visible: true, minWidth: '200'},
|
interfaceName: { label: `接口名称`, visible: true, minWidth: '200'},
|
||||||
hardwareSn: { label: `接口备注`, visible: true, minWidth: '250'},
|
interfaceRemark: { label: `接口备注`, slotName: 'tempChange', visible: true, minWidth: '250'},
|
||||||
},
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -83,20 +80,17 @@
|
|||||||
} else {
|
} else {
|
||||||
this.fnFormList(this.ruleForm);
|
this.fnFormList(this.ruleForm);
|
||||||
}
|
}
|
||||||
if(this.paramsData && this.paramsData.readonly) {
|
|
||||||
this.getList();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rowDataChange(row) {
|
rowDataChange(row) {
|
||||||
this.$set(row, 'editStatus', true);
|
this.$set(row, 'editStatus', true);
|
||||||
},
|
},
|
||||||
getList(){
|
// getList(){
|
||||||
listHandle(this.addDateRange(this.queryParams)).then(response => {
|
// listHandle(this.addDateRange(this.queryParams)).then(response => {
|
||||||
this.tableList = response.rows;
|
// this.tableList = response.rows;
|
||||||
this.queryParams.total = response.total;
|
// this.queryParams.total = response.total;
|
||||||
})
|
// })
|
||||||
},
|
// },
|
||||||
// formList集合
|
// formList集合
|
||||||
fnFormList(objVal) {
|
fnFormList(objVal) {
|
||||||
this.formList = [{
|
this.formList = [{
|
||||||
@@ -105,45 +99,52 @@
|
|||||||
id: {label: 'ID',hidden: true},
|
id: {label: 'ID',hidden: true},
|
||||||
switchName: {label: '交换机名称', span: 12, type: 'input', required: true},
|
switchName: {label: '交换机名称', span: 12, type: 'input', required: true},
|
||||||
hardwareSn: {label: '硬件SN', span: 12, type: 'input'},
|
hardwareSn: {label: '硬件SN', span: 12, type: 'input'},
|
||||||
switchNum: {label: '交换机心跳检测次数', span: 12, type: 'input', disabled: true},
|
heartbeatCount: {label: '交换机心跳检测次数', span: 12, type: 'input', disabled: true},
|
||||||
switchWeek: {label: '交换机心跳检测周期', span: 12, type: 'input', disabled: true},
|
heartbeatInterval: {label: '交换机心跳检测周期', span: 12, type: 'input', disabled: true},
|
||||||
switchOID: {label: '交换机心跳检测OID', span: 12, type: 'input', disabled: true},
|
heartbeatOid: {label: '交换机心跳检测OID', span: 12, type: 'input', disabled: true},
|
||||||
resourceVersion: {label: 'SNMP版本', span: 12, type: 'radio', eventName: 'change', required: true, options: this.dict.type.rm_register_version},
|
snmpVersion: {label: 'SNMP版本', span: 12, type: 'radio', eventName: 'change', required: true, options: this.dict.type.rm_register_version},
|
||||||
rwPermission: {label: '读写权限', span: 12, type: 'radio', options: this.dict.type.rm_register_permission},
|
readWritePermission: {label: '读写权限', span: 12, type: 'radio', options: this.dict.type.rm_register_permission},
|
||||||
securityLevel: {label: '安全级别', span: 12, type: 'radio', options: this.dict.type.rm_register_security_level, hidden: objVal && objVal.resourceVersion === '1' ? true : false},
|
securityLevel: {label: '安全级别', span: 12, type: 'radio', options: this.dict.type.rm_register_security_level, hidden: objVal && objVal.snmpVersion === '1' ? true : false},
|
||||||
encryption: {label: '加密方式', span: 12, type: 'radio', options: this.dict.type.rm_register_encryption, hidden: objVal && objVal.resourceVersion === '1' ? true : false},
|
encryptionMethod: {label: '加密方式', span: 12, type: 'radio', options: this.dict.type.rm_register_encryption, hidden: objVal && objVal.snmpVersion === '1' ? true : false},
|
||||||
teamName: {label: '团体名称', span: 12, type: 'input'},
|
communityName: {label: '团体名称', span: 12, type: 'input'},
|
||||||
snmpCollectAddr: {label: 'SNMP采集地址', span: 12, type: 'input',required: true},
|
snmpAddress: {label: 'SNMP采集地址', span: 12, type: 'input',required: true},
|
||||||
snmpCollectPort: {label: 'SNMP采集端口', span: 12, type: 'input',required: true},
|
snmpPort: {label: 'SNMP采集端口', span: 12, type: 'input',required: true},
|
||||||
resourceUserName: {label: '用户名', span: 12, type: 'input', hidden: objVal && objVal.resourceVersion === '1' ? true : false},
|
switchUser: {label: '用户名', span: 12, type: 'input', hidden: objVal && objVal.snmpVersion === '1' ? true : false},
|
||||||
resourcePwd: {label: '密码', span: 12, type: 'input', hidden: objVal && objVal.resourceVersion === '1' ? true : false},
|
switchPassword: {label: '密码', span: 12, type: 'input', hidden: objVal && objVal.snmpVersion === '1' ? true : false},
|
||||||
updateTime: {label: '修改时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
updateTime: {label: '修改时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||||
createTime: {label: '创建时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
createTime: {label: '创建时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||||
onlineStatus: {label: '在线状态', span: 12, type: 'select', options: this.dict.type.rm_register_online_state, hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
onlineStatus: {label: '在线状态', span: 12, type: 'select', options: this.dict.type.rm_register_online_state, hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||||
resourceType: {label: '交换机类型', span: 12, type: 'select', required: true, options: this.dict.type.rm_register_resource_type},
|
switchType: {label: '交换机类型', span: 12, type: 'select', required: true, options: this.dict.type.switch_type},
|
||||||
showTime: {label: '上机时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
upTime: {label: '上机时间', span: 12, type: 'date', hidden: this.paramsData && this.paramsData.readonly ? false : true},
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
getFormDataList(id) {
|
getFormDataList(id) {
|
||||||
getHandle(id).then(val => {
|
getSwitchManage(id).then(val => {
|
||||||
this.ruleForm = val && val.data;
|
if (val && val.data) {
|
||||||
this.fnFormList(this.ruleForm);
|
// val.data['switchType'] = val.data['switchType'] && val.data['switchType'].toString();
|
||||||
|
this.ruleForm = val && val.data;
|
||||||
|
this.fnFormList(this.ruleForm);
|
||||||
|
if(this.paramsData && this.paramsData.readonly) {
|
||||||
|
this.tableList = val.data['switchInterfaceInfoList'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.fnFormList(this.ruleForm);
|
this.fnFormList(this.ruleForm);
|
||||||
this.$modal.msgError("操作失败")
|
this.$modal.msgError("操作失败")
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 列表上修改名称
|
||||||
submit(rowData) {
|
submit(rowData) {
|
||||||
this.$set(rowData, 'editStatus', false);
|
this.$set(rowData, 'editStatus', false);
|
||||||
// updateHandle(rowData).then(response => {
|
updateSwitchInterface(rowData).then(response => {
|
||||||
// this.$set(rowData, 'editStatus', false);
|
this.$modal.msgSuccess(response.msg);
|
||||||
// this.getList();
|
this.$set(rowData, 'editStatus', false);
|
||||||
// this.$modal.msgSuccess(response.msg);
|
this.getFormDataList(this.paramsData.id);
|
||||||
// }).catch(() => {
|
}).catch(() => {
|
||||||
// this.$modal.msgError("操作失败");
|
// this.$modal.msgError("操作失败");
|
||||||
// });
|
});
|
||||||
},
|
},
|
||||||
// 取消列表修改
|
// 取消列表修改
|
||||||
cancel(rowData) {
|
cancel(rowData) {
|
||||||
@@ -151,26 +152,26 @@
|
|||||||
},
|
},
|
||||||
// 监听事件
|
// 监听事件
|
||||||
callback(result, dataVal, selectChange) {
|
callback(result, dataVal, selectChange) {
|
||||||
console.log('result===',result);
|
// console.log('result===',result);
|
||||||
if (result && result.fnCode) {
|
if (result && result.fnCode) {
|
||||||
switch (result.fnCode) {
|
switch (result.fnCode) {
|
||||||
case 'resourceVersion':
|
case 'snmpVersion':
|
||||||
if (dataVal === '2') {
|
if (dataVal === '2') {
|
||||||
this.formList[0].controls.securityLevel['hidden'] = false;
|
this.formList[0].controls.securityLevel['hidden'] = false;
|
||||||
this.formList[0].controls.encryption['hidden'] = false;
|
this.formList[0].controls.encryptionMethod['hidden'] = false;
|
||||||
this.formList[0].controls.resourceUserName['hidden'] = false;
|
this.formList[0].controls.switchUser['hidden'] = false;
|
||||||
this.formList[0].controls.resourcePwd['hidden'] = false;
|
this.formList[0].controls.switchPassword['hidden'] = false;
|
||||||
} else {
|
} else {
|
||||||
this.formList[0].controls.securityLevel['hidden'] = true;
|
this.formList[0].controls.securityLevel['hidden'] = true;
|
||||||
this.formList[0].controls.encryption['hidden'] = true;
|
this.formList[0].controls.encryptionMethod['hidden'] = true;
|
||||||
this.formList[0].controls.resourceUserName['hidden'] = true;
|
this.formList[0].controls.switchUser['hidden'] = true;
|
||||||
this.formList[0].controls.resourcePwd['hidden'] = true;
|
this.formList[0].controls.switchPassword['hidden'] = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'submit':
|
case 'submit':
|
||||||
let fnType = addHandle;
|
let fnType = addSwitchManage;
|
||||||
if (dataVal && dataVal.id) {
|
if (dataVal && dataVal.id) {
|
||||||
fnType = updateHandle;
|
fnType = updateSwitchManage;
|
||||||
}
|
}
|
||||||
fnType(dataVal).then(response => {
|
fnType(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
@@ -184,9 +185,9 @@
|
|||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delTopology(selectChange)
|
return delSwitchInterface(dataVal.id)
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getFormDataList(this.paramsData.id);
|
||||||
this.$modal.msgSuccess("删除成功")
|
this.$modal.msgSuccess("删除成功")
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
<div class="app-container pageTopForm">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" size="small" label-width="auto">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" size="small" label-width="auto">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="交换机名称" prop="resourceName">
|
<el-form-item label="交换机名称" title="交换机名称" prop="switchName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.resourceName"
|
v-model="queryParams.switchName"
|
||||||
placeholder="请输入交换机名称"
|
placeholder="请输入交换机名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="交换机在线状态" title="交换机在线状态" prop="switchStatus">
|
<el-form-item label="交换机在线状态" title="交换机在线状态" prop="onlineStatus">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.switchStatus"
|
v-model="queryParams.onlineStatus"
|
||||||
placeholder="请选择交换机在线状态"
|
placeholder="请选择交换机在线状态"
|
||||||
clearable>
|
clearable>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -63,11 +63,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Register">
|
<script setup name="Register">
|
||||||
import {listHandle, updateregisterType} from '@/api/disRevenue/resource';
|
import {listSwitchManage} from '@/api/disRevenue/resource';
|
||||||
import TableList from '@/components/table/index.vue';
|
import TableList from '@/components/table/index.vue';
|
||||||
import MonitorStrategy from './monitorStrategy';
|
import MonitorStrategy from './monitorStrategy';
|
||||||
export default {
|
export default {
|
||||||
name: 'RegisterIndex',
|
name: 'SwitchRegister',
|
||||||
components: {TableList, MonitorStrategy},
|
components: {TableList, MonitorStrategy},
|
||||||
dicts: ['rm_register_resource_type', 'rm_register_protocol', 'rm_register_status', 'rm_register_port', 'rm_register_online_state'],
|
dicts: ['rm_register_resource_type', 'rm_register_protocol', 'rm_register_status', 'rm_register_port', 'rm_register_online_state'],
|
||||||
data() {
|
data() {
|
||||||
@@ -85,20 +85,20 @@
|
|||||||
switchName: { label: `交换机名称`, visible: true, minWidth: '200'},
|
switchName: { label: `交换机名称`, visible: true, minWidth: '200'},
|
||||||
hardwareSn: { label: `硬件SN`,minWidth: '250'},
|
hardwareSn: { label: `硬件SN`,minWidth: '250'},
|
||||||
resourceType: { label: `交换机类型`, minWidth: '100', slotName: 'tempType'},
|
resourceType: { label: `交换机类型`, minWidth: '100', slotName: 'tempType'},
|
||||||
snmpCollectAddr: { label: `SNMP采集地址`, visible: true, minWidth: '150'},
|
snmpAddress: { label: `SNMP采集地址`, visible: true, minWidth: '150'},
|
||||||
snmpCollectPort: { label: `SNMP采集端口`, visible: true, minWidth: '150'},
|
snmpPort: { label: `SNMP采集端口`, visible: true, minWidth: '150'},
|
||||||
onlineStatus: { label: `在线状态`, slotName: 'tempOnlineStatus', minWidth: '120', visible: true },
|
onlineStatus: { label: `在线状态`, slotName: 'tempOnlineStatus', minWidth: '120', visible: true },
|
||||||
showTime:{ label: `上机时间`,minWidth: '160'},
|
upTime:{ label: `上机时间`,minWidth: '160'},
|
||||||
updateTime:{ label: `修改时间`,minWidth: '160'},
|
updateTime:{ label: `修改时间`,minWidth: '160'},
|
||||||
createTime:{ label: `创建时间`,minWidth: '160'},
|
createTime:{ label: `创建时间`,minWidth: '160'},
|
||||||
agentNum: { label: `交换机心跳检测次数`, minWidth: '180'},
|
heartbeatCount: { label: `交换机心跳检测次数`, minWidth: '180'},
|
||||||
agentWeek: { label: `交换机心跳检测周期`, minWidth: '180'},
|
heartbeatInterval: { label: `交换机心跳检测周期`, minWidth: '180'},
|
||||||
agentOID: { label: `交换机心跳检测OID`, minWidth: '180'},
|
heartbeatOid: { label: `交换机心跳检测OID`, minWidth: '180'},
|
||||||
protocol: { label: `SNMP版本`, minWidth: '80'},
|
protocol: { label: `SNMP版本`, minWidth: '80'},
|
||||||
rwPermission: { label: `读写权限`, minWidth: '120'},
|
readWritePermission: { label: `读写权限`, minWidth: '120'},
|
||||||
securityLevel: { label: `安全级别`, minWidth: '120'},
|
securityLevel: { label: `安全级别`, minWidth: '120'},
|
||||||
encryption: { label: `加密方式`, minWidth: '120'},
|
encryptionMethod: { label: `加密方式`, minWidth: '120'},
|
||||||
teamName: { label: `团体名称`, minWidth: '120'},
|
communityName: { label: `团体名称`, minWidth: '120'},
|
||||||
resourceUserName: { label: `用户名`, minWidth: '120'},
|
resourceUserName: { label: `用户名`, minWidth: '120'},
|
||||||
resourcePwd: { label: `密码`, minWidth: '120'}
|
resourcePwd: { label: `密码`, minWidth: '120'}
|
||||||
},
|
},
|
||||||
@@ -132,6 +132,11 @@
|
|||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
activated() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 处理子组件传递的新值
|
// 处理子组件传递的新值
|
||||||
handleValueChange(newValue) {
|
handleValueChange(newValue) {
|
||||||
@@ -142,7 +147,7 @@
|
|||||||
/** 查询角色列表 */
|
/** 查询角色列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
listHandle(this.addDateRange(this.queryParams)).then(response => {
|
listSwitchManage(this.addDateRange(this.queryParams)).then(response => {
|
||||||
this.roleList = response.rows;
|
this.roleList = response.rows;
|
||||||
this.queryParams.total = response.total;
|
this.queryParams.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@@ -173,37 +178,38 @@
|
|||||||
this.open = false;
|
this.open = false;
|
||||||
},
|
},
|
||||||
callback(result, rowData, selectChange) {
|
callback(result, rowData, selectChange) {
|
||||||
console.log('result==',result);
|
// console.log('result==',result);
|
||||||
if (result && result.fnCode) {
|
if (result && result.fnCode) {
|
||||||
switch (result.fnCode) {
|
switch (result.fnCode) {
|
||||||
case 'add':
|
case 'add':
|
||||||
this.$router.push("/resource/switchRegister/edit/index");
|
this.$router.push("/resource/switchRegister/edit/index");
|
||||||
break;
|
break;
|
||||||
case 'portRemarks':
|
case 'portRemarks':
|
||||||
if (selectChange && selectChange.length <= 0) {
|
// if (selectChange && selectChange.length <= 0) {
|
||||||
this.$modal.msgWarning("请选择数据!");
|
// this.$modal.msgWarning("请选择数据!");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/resource/switchRegister/portRemarks',
|
path: '/resource/switchRegister/portRemarks',
|
||||||
query: {ids: selectChange}
|
// query: {ids: selectChange}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'edit':
|
case 'edit':
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/resource/switchRegister/edit/index/',
|
path:'/resource/switchRegister/edit/index',
|
||||||
query: {id: rowData.id}
|
query: {id: rowData.id}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'details':
|
case 'details':
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/resource/switchRegister/edit/index/',
|
path:'/resource/switchRegister/edit/index',
|
||||||
query: {id: rowData.id, readonly: true}
|
query: {id: rowData.id, readonly: true}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'echartView':
|
case 'echartView':
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/resource/switchRegister/monitorChart'
|
path:'/resource/switchRegister/monitorChart',
|
||||||
|
query: {clientId: rowData.hardwareSn}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'monitorStrategy':
|
case 'monitorStrategy':
|
||||||
@@ -218,7 +224,7 @@
|
|||||||
// });
|
// });
|
||||||
// this.download("/system/registration/export", {properties: dataList,}, `资源管理_${new Date().getTime()}.xlsx`);
|
// this.download("/system/registration/export", {properties: dataList,}, `资源管理_${new Date().getTime()}.xlsx`);
|
||||||
let paramsList = Object.assign({}, this.queryParams,rowData);
|
let paramsList = Object.assign({}, this.queryParams,rowData);
|
||||||
this.download("system/registration/export", paramsList, `资源注册_${new Date().getTime()}.xlsx`, null, 'json');
|
this.download("system/switchManagement/export", paramsList, `交换机管理_${new Date().getTime()}.xlsx`, null, 'json');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Form from '@/components/form/index.vue';
|
import Form from '@/components/form/index.vue';
|
||||||
import {listHandle, resNameBtType, addTopology, getTopology, updateTopology, postInterFaceName} from "@/api/disRevenue/resource"
|
import {listAllSwitchName, addSwitchInterface, getSwitchInterface, updateSwitchInterface, postInterFaceName} from "@/api/disRevenue/resource"
|
||||||
export default {
|
export default {
|
||||||
name: 'PortRemarks',
|
name: 'PortRemarks',
|
||||||
components: {Form},
|
components: {Form},
|
||||||
@@ -39,28 +39,25 @@
|
|||||||
controls: {
|
controls: {
|
||||||
id: {label: 'ID',hidden: true},
|
id: {label: 'ID',hidden: true},
|
||||||
switchName: {label: '交换机名称', span: 18, type: 'select', eventName: 'change', options:[], required: true},
|
switchName: {label: '交换机名称', span: 18, type: 'select', eventName: 'change', options:[], required: true},
|
||||||
interfaceName: {label: '交换机端口名称', span: 18, type: 'select', options:[], required: true},
|
interfaceName: {label: '交换机接口名称', span: 18, type: 'select', options:[], required: true},
|
||||||
serverPort: {label: '端口备注', span: 18, type: 'textarea', required: true},
|
interfaceRemark: {label: '端口备注', span: 18, type: 'textarea', required: true},
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
// 获取交换机下拉
|
// 获取交换机下拉
|
||||||
switchList() {
|
switchList() {
|
||||||
resNameBtType({resourceType: 2}).then(val => {
|
listAllSwitchName({}).then(val => {
|
||||||
this.switchNameList = val && val;
|
if(val && val.data) {
|
||||||
this.formList[0].controls.switchName['options'] = val && val.map(item => {
|
this.switchNameList = val && val.data;
|
||||||
if (this.paramsData && this.paramsData.id) {
|
this.formList[0].controls.switchName['options'] = val && val.data.map(item => {
|
||||||
if (item.resourceName === this.ruleForm.switchName) {
|
return Object.assign({label: item.switchName, value: item.id});
|
||||||
this.fnInterFaceNameList({switchIp: item.ipAddress});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return Object.assign({label: item.resourceName, value: item.resourceName});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 接口名称
|
// 接口名称
|
||||||
fnInterFaceNameList(val) {
|
fnInterFaceNameList(val) {
|
||||||
postInterFaceName(Object.assign({},{resourceType: 2}, val)).then(res => {
|
postInterFaceName(val).then(res => {
|
||||||
this.interfaceNameList = res;
|
this.interfaceNameList = res;
|
||||||
this.formList[0].controls.interfaceName['options'] = res && res.map(item => {
|
this.formList[0].controls.interfaceName['options'] = res && res.map(item => {
|
||||||
return Object.assign({label: item.interfaceName, value: item.id});
|
return Object.assign({label: item.interfaceName, value: item.id});
|
||||||
@@ -69,7 +66,7 @@
|
|||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
getFormDataList(id) {
|
getFormDataList(id) {
|
||||||
getTopology(id).then(val => {
|
getSwitchInterface(id).then(val => {
|
||||||
this.ruleForm = val && val.data;
|
this.ruleForm = val && val.data;
|
||||||
this.switchList();
|
this.switchList();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@@ -83,17 +80,17 @@
|
|||||||
case 'switchName':
|
case 'switchName':
|
||||||
let switchIp = '';
|
let switchIp = '';
|
||||||
this.switchNameList.find(item => {
|
this.switchNameList.find(item => {
|
||||||
if (item.resourceName === dataVal) {
|
if (item.id === dataVal) {
|
||||||
switchIp = item.ipAddress;
|
switchIp = item.snmpAddress;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.fnInterFaceNameList({switchIp: switchIp});
|
this.fnInterFaceNameList({switchIp: switchIp});
|
||||||
break;
|
break;
|
||||||
case 'submit':
|
case 'submit':
|
||||||
this.switchNameList.find(item => {
|
this.switchNameList.find(item => {
|
||||||
if (item.resourceName === dataVal['switchName'] || item.resourceName === dataVal['switchName']) {
|
if (item.id === dataVal['switchName']) {
|
||||||
dataVal['switchName'] = item.resourceName;
|
dataVal['switchName'] = item.switchName;
|
||||||
dataVal['switchIpAddress'] = item.ipAddress;
|
// dataVal['switchIpAddress'] = item.ipAddress;
|
||||||
dataVal['switchSn'] = item.hardwareSn;
|
dataVal['switchSn'] = item.hardwareSn;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -102,9 +99,9 @@
|
|||||||
dataVal['interfaceName'] = item.interfaceName;
|
dataVal['interfaceName'] = item.interfaceName;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
let fnType = addTopology;
|
let fnType = addSwitchInterface;
|
||||||
if (dataVal && dataVal.id) {
|
if (dataVal && dataVal.id) {
|
||||||
fnType = updateTopology;
|
fnType = updateSwitchInterface;
|
||||||
}
|
}
|
||||||
if(this.loading) return;
|
if(this.loading) return;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
id: {label: 'ID',hidden: true},
|
id: {label: 'ID',hidden: true},
|
||||||
switchName: {label: '交换机名称', span: 12, type: 'select', eventName: 'change', options:[], rules: [{required: true, message: '请输入硬件SN', trigger: 'blur'}]},
|
switchName: {label: '交换机名称', span: 12, type: 'select', eventName: 'change', options:[], rules: [{required: true, message: '请输入硬件SN', trigger: 'blur'}]},
|
||||||
interfaceName: {label: '接口名称', span: 12, type: 'select', options:[]},
|
interfaceName: {label: '接口名称', span: 12, type: 'select', options:[]},
|
||||||
connectedDeviceType: {label: '接口连接设备类型', span: 12, type: 'select', options:this.dict.type.rm_topology_type},
|
connectedDeviceType: {label: '接口连接设备类型', span: 12, type: 'radio', options:this.dict.type.rm_topology_type},
|
||||||
serverName: {label: '服务器名称', span: 12, eventName: 'change', options:[], type: 'select'},
|
serverClientId: {label: '服务器ClientID', span: 12, eventName: 'change', options:[], type: 'select'},
|
||||||
serverPort: {label: '服务器网口', span: 12, options:[], type: 'select'},
|
serverPort: {label: '服务器网口', span: 12, options:[], type: 'select'},
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
@@ -76,9 +76,9 @@
|
|||||||
fnServerNameList(){
|
fnServerNameList(){
|
||||||
resNameBtType({resourceType: 1}).then(val => {
|
resNameBtType({resourceType: 1}).then(val => {
|
||||||
this.serverNameList = val && val;
|
this.serverNameList = val && val;
|
||||||
this.formList[0].controls.serverName['options'] = val && val.map(item => {
|
this.formList[0].controls.serverClientId['options'] = val && val.map(item => {
|
||||||
if (this.paramsData && this.paramsData.id) {
|
if (this.paramsData && this.paramsData.id) {
|
||||||
if (item.resourceName === this.ruleForm.serverName) {
|
if (item.resourceName === this.ruleForm.serverClientId) {
|
||||||
this.fnServerPortList({serverIp: item.ipAddress});
|
this.fnServerPortList({serverIp: item.ipAddress});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
});
|
});
|
||||||
this.fnInterFaceNameList({switchIp: switchIp});
|
this.fnInterFaceNameList({switchIp: switchIp});
|
||||||
break;
|
break;
|
||||||
case 'serverName':
|
case 'serverClientId':
|
||||||
let serverIp = '';
|
let serverIp = '';
|
||||||
this.serverNameList.find(item => {
|
this.serverNameList.find(item => {
|
||||||
if (item.resourceName === dataVal) {
|
if (item.resourceName === dataVal) {
|
||||||
@@ -136,8 +136,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.serverNameList.find(item => {
|
this.serverNameList.find(item => {
|
||||||
if (item.resourceName === dataVal['serverName'] || item.resourceName === dataVal['serverName']) {
|
if (item.resourceName === dataVal['serverClientId'] || item.resourceName === dataVal['serverClientId']) {
|
||||||
dataVal['serverName'] = item.resourceName;
|
dataVal['serverClientId'] = item.resourceName;
|
||||||
dataVal['serverSn'] = item.hardwareSn;
|
dataVal['serverSn'] = item.hardwareSn;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -175,5 +175,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style scoped>
|
||||||
|
::v-deep .el-radio {
|
||||||
|
margin-right: 15px!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-form-item label="交换机名称" prop="switchName">
|
<el-form-item label="交换机名称" prop="switchName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.switchName"
|
v-model="queryParams.switchName"
|
||||||
placeholder="请输入交互机名称"
|
placeholder="请输入交换机名称"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"/>
|
@keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -46,14 +46,16 @@
|
|||||||
columns: {
|
columns: {
|
||||||
id: { label: `ID`, width: '50', visible: false },
|
id: { label: `ID`, width: '50', visible: false },
|
||||||
switchName: { label: `交换机名称`, minWidth: '150', visible: true },
|
switchName: { label: `交换机名称`, minWidth: '150', visible: true },
|
||||||
switchSn: { label: `交换机硬件SN`, minWidth: '200', visible: false},
|
switchSn: { label: `交换机硬件SN`, minWidth: '200'},
|
||||||
interfaceName: { label: `接口名称`, minWidth: '100', visible: true },
|
interfaceName: { label: `接口名称`, minWidth: '100', visible: true },
|
||||||
connectedDeviceType: { label: `接口连接设备类型`, slotName: 'tempType', minWidth: '150', visible: true },
|
connectedDeviceType: { label: `接口连接设备类型`, slotName: 'tempType', minWidth: '150', visible: true },
|
||||||
serverName: { label: `服务器名称`, minWidth: '200', visible: true},
|
serverName: { label: `服务器ClientID`, minWidth: '200', visible: true},
|
||||||
serverSn: { label: `服务器硬件SN`, minWidth: '200', visible: false},
|
serverSn: { label: `服务器硬件SN`, minWidth: '200', visible: false},
|
||||||
serverPort: { label: `服务器网口`, minWidth: '250', visible: true },
|
serverPort: { label: `服务器网口`, minWidth: '250', visible: true },
|
||||||
createTime: { label: `创建时间`, minWidth: '150', visible: false},
|
peerSwitchName: { label: `对端交换机名称`, minWidth: '250', visible: true },
|
||||||
updateTime:{ label: `修改时间`, minWidth: '150', visible: false}
|
peerSwitchInterface: { label: `对端交换机接口`, minWidth: '250', visible: true },
|
||||||
|
createTime: { label: `创建时间`, minWidth: '150'},
|
||||||
|
updateTime:{ label: `修改时间`, minWidth: '150'}
|
||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
searcherForm: [
|
searcherForm: [
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" size="small" label-width="80px" class="demo-ruleForm">
|
||||||
<el-form-item label="标题" prop="title">
|
<el-col :span="8">
|
||||||
<el-col :span="4">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
placeholder="请输入标题"
|
placeholder="请输入标题"
|
||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
@keyup.enter.native="handleQuery"
|
||||||
@keyup.enter.native="handleQuery"
|
/>
|
||||||
/>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
<el-col :span="8">
|
||||||
<el-form-item>
|
<el-form-item class="lastBtnSty">
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
<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">
|
||||||
<template #tempTitle="{ row, column }">
|
<template #tempTitle="{ row, column }">
|
||||||
@@ -160,3 +161,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
::v-deep .lastBtnSty .el-form-item__content{
|
||||||
|
margin-left: 10px!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user