Showing 30 changed files with 748 additions and 94 deletions
... ... @@ -671,7 +671,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
resType = 'X86SERVER_BMC';
}
//如果是HOST_X86SERVER服务器并且协议为snmp,或共享存储则根据厂商和型号判断类型
if (resType.indexOf("HOST_X86SERVER") !== -1 || resType.indexOf("STORAGE_SHARE") != -1) {
if ((resType.indexOf("HOST_X86SERVER") !== -1 && protocol =='SNMP') || resType.indexOf("STORAGE_SHARE") != -1) {
resType = this.detailPathByProviderAndModel(resType,resId);
}
//如果是虚拟化相关资源类型,则根据采集协议判断去那个页面
... ...
... ... @@ -2517,6 +2517,58 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
{field: 'lastColTime', title: '最近采集时间', minWidth: x_170, align: 'center', sort: true},
{field: 'linkState', title: '连接状态', align: 'center', minWidth: x_120, templet: '#linkStateTpl', sort: true}
],
"HUAWEI_CLOUD_PLAT":[
{field: 'ip', title: 'IP地址', minWidth: x_130, align: 'center', sort: true},
{
field: 'resName', title: '资源名称', minWidth: x_300, sort: true,
templet: '#resindex_resName'
},
{field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'},
// {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'},
{field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
{field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
{field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
{field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
{field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
{field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
{field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
{field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
{field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
{field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
{field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true},
{field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
{field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
{field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'}
],
"ALI_CLOUD_PLAT":[
{field: 'ip', title: 'IP地址', minWidth: x_130, align: 'center', sort: true},
{
field: 'resName', title: '资源名称', minWidth: x_300, sort: true,
templet: '#resindex_resName'
},
{field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'},
// {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'},
{field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true},
{field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'},
{field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'},
{field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'},
{field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true},
{field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'},
{field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'},
{field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true},
{field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true},
{field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'},
{field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'},
{field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true},
{field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true},
{field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true},
{field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true},
{field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'},
{field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'}
],
},
//列点击事件
colsClickEvent: function (editFlag) {
... ...
... ... @@ -232,7 +232,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
return;
}
var useraccount=$(this).attr('data-useraccount');
var dutyTime=$(this).attr('data-dutytime');
var dutyTime = $(this).attr('data-dutytime');
var dutyDuration = $(this).attr('data-dutyduration');
//权限判断
var judge=false;
//角色
... ... @@ -264,7 +265,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
//自己不能调换自己
var id = $(this).attr('data-id');
exchange(id);
exchange(id, dutyTime, dutyDuration);
});
}
... ... @@ -356,7 +357,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
//调换
function exchange(id) {
function exchange(id, changeDutyTime, changeDutyDuration) {
layer.open({
type: 1 //Page层类型
, area: ['40%', '46%']
... ... @@ -384,11 +385,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
form.render();
}
, yes: function (index, layero) {
var changeUserName = '';
var changeUserAccount = '';
//调班
if(exchangeSign==1){
if (exchangeSign == 1) {
//如果已经选择了调班对象,不能再选择其他对象
var judge=iSExchange(id);
if(!judge){
var judge = iSExchange(id);
if (!judge) {
layer.msg('调班过程中不能再次调班!', {icon: 7, time: 3000});
return;
}
... ... @@ -402,6 +406,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
if (v.value == changeUserId[0]) {
if (v.code == user) {
flagUser = 1;
} else {
changeUserName = v.name;
changeUserAccount = v.code;
}
}
});
... ... @@ -431,6 +438,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
if (v.value == changeUserId[0]) {
if (v.code == user) {
flagUser = 1;
} else {
changeUserName = v.name;
changeUserAccount = v.code;
}
}
});
... ... @@ -441,9 +451,13 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl
}
var duty = {
id: id,
changeUserId: changeUserId[0]?changeUserId[0]:'',
changeDateTimeId:changeDataTime?changeDataTime.toString():'',
exchangeSign:exchangeSign?exchangeSign.toString():''
changeUserId: changeUserId[0] ? changeUserId[0] : '',
changeDateTimeId: changeDataTime ? changeDataTime.toString() : '',
exchangeSign: exchangeSign ? exchangeSign.toString() : '',
changeDutyTime,
changeDutyDuration,
changeUserName,
changeUserAccount
}
admin.req({
url: domainName + '/api-web/manage/duty/save?access_token=' + accessToken,
... ...
... ... @@ -661,6 +661,9 @@ layui.define(['view'], function(exports){
, toBigScreen: function () {
window.open(sessionStorage.getItem("bigScreen") + '?access_token=' + localStorage.getItem("access_token"));
}
, toSxView: function () {
window.open(sessionStorage.getItem("sxView") + '?access_token=' + localStorage.getItem("access_token"));
}
//向右滚动页面标签
, leftPage: function () {
... ...
... ... @@ -58,6 +58,9 @@
<li class="layui-nav-item layui-hide-xs" lay-tips="全局搜索">
<a href="javascript:;" layadmin-event="globalSearch"><i class="layui-icon layui-icon-search"></i></a>
</li>
<li class="layui-nav-item" lay-tips="一体化视图">
<a href="javascript:;" layadmin-event="toSxView"><i class="layui-icon layui-icon-chart-screen"></i></a>
</li>
<li class="layui-nav-item" lay-tips="大屏">
<a href="javascript:;" layadmin-event="toBigScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>
</li>
... ...
... ... @@ -39,6 +39,7 @@
sessionStorage.setItem('graphEditorOrigin', res1[0].mxgraph_editor);
sessionStorage.setItem('tingyun', res1[0].tingyun);
sessionStorage.setItem('bigScreen', res1[0].bigScreen);
sessionStorage.setItem('sxView', res1[0].sxView);
sessionStorage.setItem('workflow', res1[0].workflow);
sessionStorage.setItem('mp3', res2[0].mp3);
sessionStorage.setItem('jimuReport', res1[0].jimuReport);
... ...
... ... @@ -7,6 +7,14 @@
background: white;
background-color: #CCCCCC;
padding: 3px 3px;
width:calc(100% - 10px);
overflow:hidden;
}
.container .cm-card{
overflow-y:auto;
background: white;
border-radius: 3px
}
/*
... ...
... ... @@ -14,8 +14,8 @@
<div style="width: calc(100% - 85px);max-width: calc(100% - 85px);overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="nodeClick(node, data)" :title="node.label">
{{node.label }}
</div>
<div style="width: 60px;">
<a @click="showFolder(true)" style="margin-right: 10px;">
<div style="width: 60px;" v-if="isAdmin()">
<a @click="showFolder(true,false)" style="margin-right: 10px;">
<i class="el-icon-plus"></i>
</a>
<a @click="deleteDocument(data.id,'folder')">
... ... @@ -43,6 +43,10 @@
<i class="iconfont icon-icon--download"></i>
下载
</el-button>
<el-button :size="$global.elementSize" @click="showFolder(true,true)">
<i class="iconfont icon-weidaqiadewenjianjia"></i>
新增文件夹
</el-button>
<el-button type="primary" :size="$global.elementSize" @click="showUploadFile(true)">
<i class="iconfont icon-icon--shangchuan"></i>
上传
... ... @@ -51,6 +55,7 @@
<i class="iconfont icon-shanchuwenjianjia"></i>
删除
</el-button>
</div>
<div style="text-align: right;width: 150px">
<el-button-group>
... ... @@ -71,26 +76,44 @@
:showBorder="false" :showSelection="true"
:showPage="false" :height="height - 54"></cm-table-page>
</div>
<div v-if="activeBtn == 'view'" style="display: flex;flex-wrap: wrap;background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}">
<div v-for="file in dataList" style="width: 120px;margin: 10px;position: relative">
<div style="position: absolute;right: 5px">
<el-checkbox v-model="file.checked" label="" :size="$global.elementSize"></el-checkbox>
<!--<el-link type="primary" :underline="false" @click="getFile(file)" style="margin-left: 5px">
<i class="iconfont icon-icon&#45;&#45;download"></i>
</el-link>-->
</div>
<el-link type="primary" :underline="false" @click="getFile(file)">
<i class="iconfont "
:class="iconclass[file.type] == undefined ? 'icon-wenjian' : iconclass[file.type]"
style="font-size: 50px;margin-right: 10px;"/>
</el-link>
<br/>
<el-link type="info" :underline="false" @click="getFile(file)">
{{file.fileName}}
</el-link>
<div v-if="activeBtn == 'view'" style="background-color: white" :style="{'height':(height -50) +'px','max-height':(height -50) + 'px','overflow':'auto'}">
<div style="text-align: left;margin: 6px;border-bottom: solid 1px #F2F6FC;padding-bottom: 5px;" v-if="!isView">
<!--
<span v-for="(item,index) in historyNode">
<el-link type="primary" @click="clickTopNav(item,index)" style="margin-left: 5px">
<i class="el-icon-arrow-right"></i>&nbsp;{{item[props.label]}}
</el-link>
</span>
-->
<el-tag v-for="(item,index) in historyNode" :size="$global.elementSize" :key="item.id" closable
@close="tagHandleClose(index)" @click="clickTopNav(item,index)"
:type="item.id == currentNodeData.id ? 'success' :'info' "
type="info" style="margin: 0px 3px">
{{item[props.label]}}
</el-tag>
</div>
<div v-if="dataList.length == 0" style=" text-align: center; width: 100%;">
<el-empty description="没有文件哦!"></el-empty>
<div style="display: flex;flex-wrap: wrap;">
<div v-for="file in dataList" style="width: 120px;margin: 10px;position: relative">
<div style="position: absolute;right: 5px">
<el-checkbox v-model="file.checked" label="" :size="$global.elementSize"></el-checkbox>
<!--<el-link type="primary" :underline="false" @click="getFile(file)" style="margin-left: 5px">
<i class="iconfont icon-icon&#45;&#45;download"></i>
</el-link>-->
</div>
<el-link type="primary" :underline="false" @click="getFile(file)">
<i class="iconfont "
:class="iconclass[file.type] == undefined ? 'icon-wenjian' : iconclass[file.type]"
style="font-size: 50px;margin-right: 10px;"/>
</el-link>
<br/>
<el-link type="info" :underline="false" @click="getFile(file)">
{{file.fileName}}
</el-link>
</div>
<div v-if="dataList.length == 0" style=" text-align: center; width: 100%;">
<el-empty description="没有文件哦!"></el-empty>
</div>
</div>
</div>
</div>
... ... @@ -111,13 +134,16 @@
<el-input :size="$global.elementSize" v-model="docForm.name" clearable ></el-input>
</el-form-item>
<el-form-item label="文档编号" prop="docNo">
<el-input :size="$global.elementSize" v-model="docForm.docNo" clearable></el-input>
</el-form-item>
<div v-if="!isUserFolder">
<el-form-item label="文档编号" prop="docNo">
<el-input :size="$global.elementSize" v-model="docForm.docNo" clearable></el-input>
</el-form-item>
<el-form-item label="文档类型" prop="type">
<el-input :size="$global.elementSize" v-model="docForm.type" clearable></el-input>
</el-form-item>
</div>
<el-form-item label="文档类型" prop="type">
<el-input :size="$global.elementSize" v-model="docForm.type" clearable></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input :size="$global.elementSize" type="number" v-model="docForm.sort" clearable></el-input>
... ...
... ... @@ -102,11 +102,38 @@ export default {
// 默认打开节点
let defaultExpandedKeys = Vue.ref([]);
// 历史默认节点
let historyNode = Vue.ref([]);
let isUserFolder = Vue.ref(false);
let addHistoryNode = (item) =>{
if(item.name == undefined && item.fileName){
item['name'] = item.fileName;
}
let arr = historyNode.value;
let id = item.id;
let size = arr.filter(function (v) {
if(v.id == id){
return v;
}
})
if(size.length == 0){
arr.push(item);
historyNode.value = arr;
}
currentNodeData.value = item;
}
// 获取文件列表或者打开文件
let getFile = (item) => {
let id = item.id;
let type = item.type;
if (id && type && type == 'folder') {
addHistoryNode(item);
getPage(id);
} else {
proxy.$global.viewer(item.localPath);
... ... @@ -161,12 +188,15 @@ export default {
if (res && res.data) {
treeData.value = res.data;
let first = res.data[0];
currentNodeData.value = first;
//currentNodeData.value = first;
let arr = [];
arr.push(first.id);
defaultExpandedKeys.value = arr;
//historyNode.value.push(first);
addHistoryNode(first);
// 加载第一个节点数据
getPage(first.id);
}
... ... @@ -197,11 +227,15 @@ export default {
*/
let nodeClick = (node, data) => {
let id = data.id;
currentNodeData.value = data;
//currentNodeData.value = data;
let arr = [];
arr.push(id);
defaultExpandedKeys.value = arr;
addHistoryNode(data);
getPage(id);
}
... ... @@ -215,6 +249,7 @@ export default {
// 刷新
let reload = (loadTree) => {
//historyNode.value = [];
// 属性tree
setTimeout(function () {
let id = currentNodeData.value.id;
... ... @@ -277,13 +312,14 @@ export default {
type: '',
sort: 100
});
let showFolder = (flg) => {
let showFolder = (flg,isUser) => {
docForm.value = {
name: '',
docNo: '',
type: '',
sort: 100
};
isUserFolder.value = isUser;
addDialogVisible.value = flg;
}
... ... @@ -297,6 +333,11 @@ export default {
if (valid) {
let params = docForm.value;
params.pid = currentNodeData.value.id;
if(isUserFolder.value){
params.docNo="user";
params.type="user";
}
// 新增
proxy.$http.get(`/inspection-report/file/file/insertFolder`, params, function (res) {
if (res && res.code == 0) {
... ... @@ -306,7 +347,7 @@ export default {
// 属性tree
reload(true);
showFolder(false);
showFolder(false,isUserFolder.value);
} else {
console.log('error submit!!')
return false
... ... @@ -433,8 +474,37 @@ export default {
}
proxy.$http.downloadFile('/inspection-report/file/download',params);
}
/**
* TODO
* @param item
* @param index
*/
let clickTopNav = (item,index) =>{
let arr = historyNode.value;
// // 删除当前节点后面的路径
// arr.filter(function (v,i) {
// if(i > index){
// arr.splice(i,1);
// }
// })
addHistoryNode(item);
getPage(item.id);
}
/**
* 点击标签关闭
* @param index
*/
let tagHandleClose = (index) =>{
historyNode.value.splice(index,1);
}
let isAdmin = () =>{
return localStorage.getItem('lgn') == 'admin';
}
... ... @@ -484,6 +554,7 @@ export default {
currentNodeData,
docForm,
addFolder,
isUserFolder,
addDialogVisible,
showFolder,
... ... @@ -493,7 +564,11 @@ export default {
selectUser,
showUserDialog,
showUploadDialogVisible
showUploadDialogVisible,
historyNode,
clickTopNav,
tagHandleClose,
isAdmin
}
}
... ...
... ... @@ -2,12 +2,12 @@
<!-- 表格-->
<el-table :border="showBorder" v-loading="loading" :data="dataList" stripe header-row-class-name="tbl-header-class" :height="height"
style="width: 100%;margin: 0px 0px;">
<el-table-column v-if="showIndex" type="index" :label="indexLabel" align="center" width="50"/>
<el-table-column v-if="showSelection" type="selection" width="55" />
<el-table-column v-if="showIndex && columns.length > 0" type="index" :label="indexLabel" align="center" width="50"/>
<el-table-column v-if="showSelection && columns.length > 0" type="selection" width="55" />
<el-table-column v-for="item in columns" :prop="item.prop" :label="item.label" :sortable="item.sortable == undefined ? false : item.sortable" :align="item.align == undefined ? 'center' : item.align "
:width="item.width">
<template #default="scope" v-if="item.prop =='resName'">
<!--<template #default="scope" v-if="item.prop =='resName'">
<el-link type="primary" @click="openDetailPage(scope.row)">{{scope.row.resName}}</el-link>
</template>
<template #default="scope" v-else>
... ... @@ -23,6 +23,23 @@
<span v-else>
{{scope.row[item.prop]}}
</span>
</template>-->
<template #default="scope">
<slot :row="scope.row" :prop="item.prop" :column="item">
<div v-if="typeof(item.render) == 'function'" >
<div v-if="typeof(item.click) == 'function'">
<el-link :type="linkType" :underline="isLink" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link>
</div>
<div v-else>
<el-link :type="linkType" :underline="isLink" v-html="item.render(scope.row)"></el-link>
</div>
</div>
<span v-else>
{{scope.row[item.prop]}}
</span>
</slot>
</template>
</el-table-column>
</el-table>
... ...
-- 文档管理
ALTER TABLE `inspection-report`.`b_inspection_document`
ADD column fileSize varchar(50) DEFAULT NULL COMMENT '文件大小';
ALTER TABLE `inspection-report`.`b_inspection_document`
ADD COLUMN `status` int(1) DEFAULT '0' COMMENT '删除状态 0 正常,1删除,默认0';
ALTER TABLE `inspection-report`.`b_insepectionreport_type`
ADD COLUMN `status` int(1) DEFAULT '0' COMMENT '删除状态 0 正常,1删除,默认0';
... ...
/*
Navicat Premium Data Transfer
Source Server : hg-69-zj
Source Server Type : MySQL
Source Server Version : 80022
Source Host : 192.168.0.69:3306
Source Schema : cloud_backend_monitor
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
Date: 15/10/2021 02:07:06
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for b_res_list_tree_v32
-- ----------------------------
DROP TABLE IF EXISTS `b_res_list_tree_v32`;
CREATE TABLE `b_res_list_tree_v32` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '资源类型id',
`parentId` int(0) NULL DEFAULT NULL COMMENT '父资源类型',
`resType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源类型CODE',
`nodeName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点名称',
`nodeDesc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点描述',
`nodeType` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点分类',
`sort` int(0) NULL DEFAULT NULL COMMENT '排序',
`options` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置信息',
`detailProps` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详情页属性、参数( JSON)',
`detailPage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情页 对应字典:DETAIL_PAGE',
`ext1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`querySub` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否查询子节点 0是1否,默认0,相同的资源类型值相同,否则按照否处理',
`excludeResType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询排除类型(TODO) ',
`veiwName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询视图名称,默认值:v_resource',
`createTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `resType`(`id`, `resType`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50023 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '资源类型信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of b_res_list_tree_v32
-- ----------------------------
INSERT INTO `b_res_list_tree_v32` VALUES (11100, 0, 'HOST_MINICOMPUTER', '整机', '计算存储', '', 11100, '', '', '', '', '', '', '', '', '', '', 'v_resource_minipc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11102, 0, 'HOST_MINICOMPUTER_PARTITION', '分区', '计算存储', '', 11102, '', '', '', '', '', '', '', '', '', '', 'v_resource_minipc_part', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11200, 0, 'HOST_X86SERVER', 'PC服务器', '计算存储', '', 11200, '', '', '', '', '', '', '', '', '', '', 'v_resource_pc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11300, 0, 'HOST_ONECOMPUTER', '一体机', '计算存储', '', 11300, '', '', '', '', '', '', '', '', '', '', 'v_resource_pc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12100, 0, 'VIRTUALIZATION_VMWARE', 'VMWARE', '计算存储', '', 12100, '', NULL, '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12110, 12100, 'VIRTUALIZATION_VMWARE_CLUSTER', 'vm资源池', '计算存储', '', 12110, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12120, 12100, 'VIRTUALIZATION_VMWARE_PHYSICSHOST', 'vm宿主机', '计算存储', '', 12120, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12130, 12100, 'VIRTUALIZATION_VMWARE_VHOST', 'vm虚拟机', '计算存储', '', 12130, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12900, 12100, 'VIRTUALIZATION_VHOST', '虚拟机', '计算存储', '', 12900, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13000, 0, 'HUAWEI_CLOUD_PLAT', '华为云', '计算存储', '', 13000, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13100, 13000, 'HUAWEI_CLOUD_COLONY', '资源池', '计算存储', '', 13100, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13101, 13000, 'HUAWEI_CLOUD_STORAGE', '存储', '计算存储', '', 13101, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13102, 13000, 'HUAWEI_CLOUD_SWITCHBOARD', '交换机', '计算存储', '', 13102, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13103, 13000, 'HUAWEI_CLOUD_FIREWALL', '防火墙', '计算存储', '', 13103, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13110, 13000, 'HUAWEI_CLOUD_CLUSTER', '集群', '计算存储', '', 13110, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13111, 13000, 'HUAWEI_CLOUD_CLUSTER_OST', '物理机', '计算存储', '', 13111, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13112, 13000, 'HUAWEI_CLOUD_VIRTUALHOST', '虚拟机', '计算存储', '', 13112, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14000, 0, 'ALI_CLOUD_PLAT', '阿里云', '计算存储', '', 14000, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14100, 14000, 'ALI_CLOUD_ECS', 'ECS-云服务器', '计算存储', '', 14100, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14200, 14000, 'ALI_CLOUD_RDS', 'RDS-云数据库', '计算存储', '', 14200, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14300, 14000, 'ALI_CLOUD_SLB', 'SLB-负载均衡', '计算存储', '', 14300, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14400, 14000, 'ALI_CLOUD_OSS', 'OSS-对象存储', '计算存储', '', 14400, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15000, 0, 'STORAGE', '存储设备', '计算存储', '', 15000, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15100, 15000, 'STORAGE_SHARE', '共享存储', '计算存储', '', 15100, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15101, 15100, 'STORAGE_SHARE_LUN', 'LUN', '计算存储', '', 15100, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage_lun', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15300, 15000, 'STORAGE_TAPELIBRARY', '物理带库', '计算存储', '', 15300, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15400, 15000, 'STORAGE_VTAPELIBRARY', '虚拟带库', '计算存储', '', 15400, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16000, 0, 'DATABASE', '数据库', '系统软件', '', 20001, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16100, 16000, 'DATABASE_ORACLE', 'oracle', '系统软件', '', 16100, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16101, 16000, 'DATABASE_RAC', 'oracle集群', '系统软件', '', 16101, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16200, 16000, 'DATABASE_OGG', 'ogg', '系统软件', '', 16200, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16300, 16000, 'DATABASE_MYSQL', 'mysql', '系统软件', '', 16300, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16400, 16000, 'DATABASE_REDIS', 'redis', '系统软件', '', 16400, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16500, 16000, 'DATABASE_ELASTICSEARCH', 'elasticsearch', '系统软件', '', 16500, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16600, 16000, 'DATABASE_MONGODB', 'mongodb', '系统软件', '', 16600, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17000, 0, 'MIDDLEWARE', '中间件', '系统软件', '', 20002, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17100, 17000, 'MIDDLEWARE_WEBLOGIC', 'weblogic', '系统软件', '', 17100, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17200, 17000, 'MIDDLEWARE_KAFKA', 'kafka', '系统软件', '', 17200, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17300, 17000, 'MIDDLEWARE_NGINX', 'nginx', '系统软件', '', 17300, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17400, 17000, 'MIDDLEWARE_ZOOKEEPER', 'zookeeper', '系统软件', '', 17400, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17500, 17000, 'MIDDLEWARE_TOMCAT', 'tomcat', '系统软件', '', 17500, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17600, 17000, 'MIDDLEWARE_MQ', 'MQ', '系统软件', '', 17600, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18000, 0, 'NETHARDWARE', '计算机网络设备', '网络系统', '', 18000, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18100, 18000, 'NETHARDWARE_ROUTER', '路由器', '网络系统', '', 18100, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18200, 18000, 'NETHARDWARE_SWITCHBOARD', '交换机', '网络系统', '', 18200, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18300, 18000, 'NETHARDWARE_LOADBALANCING', '负载均衡', '网络系统', '', 18300, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (19000, 0, 'NETSAFE', '安全设备', '安全设备', '', 19000, '', '', '', '', '', '', '', '', '', '', 'v_resource_netsafe', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (19100, 19000, 'NETSAFE_FIREWALL', '防火墙', '安全设备', '', 19100, '', '', '', '', '', '', '', '', '', '', 'v_resource_netsafe', '2021-10-14 11:28:32');
SET FOREIGN_KEY_CHECKS = 1;
... ...
/*
Navicat Premium Data Transfer
Source Server : hg-69-zj
Source Server Type : MySQL
Source Server Version : 80022
Source Host : 192.168.0.69:3306
Source Schema : cloud_backend_monitor
Target Server Type : MySQL
Target Server Version : 80022
File Encoding : 65001
Date: 15/10/2021 02:06:47
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for b_res_list_config_v32
-- ----------------------------
DROP TABLE IF EXISTS `b_res_list_config_v32`;
CREATE TABLE `b_res_list_config_v32` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`resListId` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源类型(b_restype_config_v32主键)',
`colKey` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '展示行key',
`colAlias` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '别名,默认当前属性key名称',
`colType` int(0) NULL DEFAULT NULL COMMENT '类型 ',
`colWidth` double(10, 0) NULL DEFAULT 120 COMMENT '宽度,默认120,单位px',
`colGroup` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分组标识',
`colIsTd` int(0) NULL DEFAULT 1 COMMENT '是否是二维 0是1否,,默认1',
`colProps` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '字段扩展',
`colSort` int(0) NULL DEFAULT NULL COMMENT '排序',
`colStatus` int(0) NULL DEFAULT 0 COMMENT '是否启用 0是1否 默认0',
`showUsers` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '对那些用户展示,多个,分割(用户登录账号) TODO',
`queryType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询类型 ddic(ddic::字典code)和input两种类型 ',
`isQuery` int(0) NULL DEFAULT NULL COMMENT '是否查询字段',
`isFilter` int(0) NULL DEFAULT 1 COMMENT '是否筛选、0是1否 默认1',
`status` int(0) NULL DEFAULT 0 COMMENT '是否启用、0是1否 默认0',
`ext1` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext2` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext3` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`createTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP,
`crearteUser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`createNickName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '资源视图展示字段配置表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of b_res_list_config_v32
-- ----------------------------
INSERT INTO `b_res_list_config_v32` VALUES (3, '1', 'resId', '资源编号', NULL, 220, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:00', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (4, '2', 'resName', '资源名称', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:01', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (5, '3', 'ip', 'IP', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:02', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (6, '5', 'resType', '资源类型', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:03', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (7, '6', 'os', '系统', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:03', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (8, '8', 'provider', '厂商', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:05', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (9, '9', 'resDomain', '所属域', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:05', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (10, '1', 'platform', '平台', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:07', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (11, '1', 'model', '型号', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:08', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (12, '1', 'resAdminMaster', '资源管理员', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:08', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (13, '1', 'busId', '业务id', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:09', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (14, '1', 'monitorState', '监控状态', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:09', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (15, '1', 'health', '健康度', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:10', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (16, '1', 'resPositon', '所属机房', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:10', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (17, '1', 'cabinetNo', '机柜编号', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:11', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (18, '1', 'uLocation', 'U位', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:11', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (19, '1', 'resourceSN', '序列号(SN)', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:12', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (20, '1', 'partitionNum', '分区数量', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:12', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (21, '1', 'cpuNucleus', 'CPU核数', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:13', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (22, '11', 'memoryTotal', '内存总大小', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:14', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (23, '1', 'maintenanceProvider', '维保厂商', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:14', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (24, '1', 'maintenanceEnd', '维保截止日期', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:15', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (25, '1', 'parentId', '所属资源编号', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:15', NULL, NULL);
INSERT INTO `b_res_list_config_v32` VALUES (26, '1', 'manageIp', '管理IP', NULL, 120, NULL, 1, NULL, NULL, 0, NULL, NULL, 1, 1, 0, NULL, NULL, NULL, '2021-10-14 23:27:16', NULL, NULL);
-- ----------------------------
-- Table structure for b_res_list_tree_v32
-- ----------------------------
DROP TABLE IF EXISTS `b_res_list_tree_v32`;
CREATE TABLE `b_res_list_tree_v32` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '资源类型id',
`parentId` int(0) NULL DEFAULT NULL COMMENT '父资源类型',
`resType` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源类型CODE',
`nodeName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点名称',
`nodeDesc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点描述',
`nodeType` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点分类',
`sort` int(0) NULL DEFAULT NULL COMMENT '排序',
`options` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置信息',
`detailProps` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详情页属性、参数( JSON)',
`detailPage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '详情页 对应字典:DETAIL_PAGE',
`ext1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`ext5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展字段',
`querySub` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否查询子节点 0是1否,默认0,相同的资源类型值相同,否则按照否处理',
`excludeResType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询排除类型(TODO) ',
`veiwName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询视图名称,默认值:v_resource',
`createTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `resType`(`id`, `resType`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 50023 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '资源类型信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of b_res_list_tree_v32
-- ----------------------------
INSERT INTO `b_res_list_tree_v32` VALUES (11100, 0, 'HOST_MINICOMPUTER', '整机', '计算存储', '', 11100, '', '', '', '', '', '', '', '', '', '', 'v_resource_minipc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11102, 0, 'HOST_MINICOMPUTER_PARTITION', '分区', '计算存储', '', 11102, '', '', '', '', '', '', '', '', '', '', 'v_resource_minipc_part', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11200, 0, 'HOST_X86SERVER', 'PC服务器', '计算存储', '', 11200, '', '', '', '', '', '', '', '', '', '', 'v_resource_pc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (11300, 0, 'HOST_ONECOMPUTER', '一体机', '计算存储', '', 11300, '', '', '', '', '', '', '', '', '', '', 'v_resource_pc', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12100, 0, 'VIRTUALIZATION_VMWARE', 'VMWARE', '计算存储', '', 12100, '', NULL, '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12110, 12100, 'VIRTUALIZATION_VMWARE_CLUSTER', 'vm资源池', '计算存储', '', 12110, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12120, 12100, 'VIRTUALIZATION_VMWARE_PHYSICSHOST', 'vm宿主机', '计算存储', '', 12120, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12130, 12100, 'VIRTUALIZATION_VMWARE_VHOST', 'vm虚拟机', '计算存储', '', 12130, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (12900, 12100, 'VIRTUALIZATION_VHOST', '虚拟机', '计算存储', '', 12900, '', '', '', '', '', '', '', '', '', '', 'v_resource_vmware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13000, 0, 'HUAWEI_CLOUD_PLAT', '华为云', '计算存储', '', 13000, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13100, 13000, 'HUAWEI_CLOUD_COLONY', '资源池', '计算存储', '', 13100, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13101, 13000, 'HUAWEI_CLOUD_STORAGE', '存储', '计算存储', '', 13101, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13102, 13000, 'HUAWEI_CLOUD_SWITCHBOARD', '交换机', '计算存储', '', 13102, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13103, 13000, 'HUAWEI_CLOUD_FIREWALL', '防火墙', '计算存储', '', 13103, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13110, 13000, 'HUAWEI_CLOUD_CLUSTER', '集群', '计算存储', '', 13110, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13111, 13000, 'HUAWEI_CLOUD_CLUSTER_OST', '物理机', '计算存储', '', 13111, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (13112, 13000, 'HUAWEI_CLOUD_VIRTUALHOST', '虚拟机', '计算存储', '', 13112, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_hw', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14000, 0, 'ALI_CLOUD_PLAT', '阿里云', '计算存储', '', 14000, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14100, 14000, 'ALI_CLOUD_ECS', 'ECS-云服务器', '计算存储', '', 14100, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14200, 14000, 'ALI_CLOUD_RDS', 'RDS-云数据库', '计算存储', '', 14200, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14300, 14000, 'ALI_CLOUD_SLB', 'SLB-负载均衡', '计算存储', '', 14300, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (14400, 14000, 'ALI_CLOUD_OSS', 'OSS-对象存储', '计算存储', '', 14400, '', '', '', '', '', '', '', '', '', '', 'v_resource_cloud_ali', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15000, 0, 'STORAGE', '存储设备', '计算存储', '', 15000, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15100, 15000, 'STORAGE_SHARE', '共享存储', '计算存储', '', 15100, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15101, 15100, 'STORAGE_SHARE_LUN', 'LUN', '计算存储', '', 15100, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage_lun', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15300, 15000, 'STORAGE_TAPELIBRARY', '物理带库', '计算存储', '', 15300, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (15400, 15000, 'STORAGE_VTAPELIBRARY', '虚拟带库', '计算存储', '', 15400, '', '', '', '', '', '', '', '', '', '', 'v_resource_storage', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16000, 0, 'DATABASE', '数据库', '系统软件', '', 20001, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16100, 16000, 'DATABASE_ORACLE', 'oracle', '系统软件', '', 16100, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16101, 16000, 'DATABASE_RAC', 'oracle集群', '系统软件', '', 16101, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16200, 16000, 'DATABASE_OGG', 'ogg', '系统软件', '', 16200, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16300, 16000, 'DATABASE_MYSQL', 'mysql', '系统软件', '', 16300, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16400, 16000, 'DATABASE_REDIS', 'redis', '系统软件', '', 16400, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16500, 16000, 'DATABASE_ELASTICSEARCH', 'elasticsearch', '系统软件', '', 16500, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (16600, 16000, 'DATABASE_MONGODB', 'mongodb', '系统软件', '', 16600, '', '', '', '', '', '', '', '', '', '', 'v_resource_database', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17000, 0, 'MIDDLEWARE', '中间件', '系统软件', '', 20002, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17100, 17000, 'MIDDLEWARE_WEBLOGIC', 'weblogic', '系统软件', '', 17100, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17200, 17000, 'MIDDLEWARE_KAFKA', 'kafka', '系统软件', '', 17200, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17300, 17000, 'MIDDLEWARE_NGINX', 'nginx', '系统软件', '', 17300, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17400, 17000, 'MIDDLEWARE_ZOOKEEPER', 'zookeeper', '系统软件', '', 17400, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17500, 17000, 'MIDDLEWARE_TOMCAT', 'tomcat', '系统软件', '', 17500, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (17600, 17000, 'MIDDLEWARE_MQ', 'MQ', '系统软件', '', 17600, '', '', '', '', '', '', '', '', '', '', 'v_resource_middleware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18000, 0, 'NETHARDWARE', '计算机网络设备', '网络系统', '', 18000, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18100, 18000, 'NETHARDWARE_ROUTER', '路由器', '网络系统', '', 18100, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18200, 18000, 'NETHARDWARE_SWITCHBOARD', '交换机', '网络系统', '', 18200, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (18300, 18000, 'NETHARDWARE_LOADBALANCING', '负载均衡', '网络系统', '', 18300, '', '', '', '', '', '', '', '', '', '', 'v_resource_nethardware', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (19000, 0, 'NETSAFE', '安全设备', '安全设备', '', 19000, '', '', '', '', '', '', '', '', '', '', 'v_resource_netsafe', '2021-10-14 11:28:32');
INSERT INTO `b_res_list_tree_v32` VALUES (19100, 19000, 'NETSAFE_FIREWALL', '防火墙', '安全设备', '', 19100, '', '', '', '', '', '', '', '', '', '', 'v_resource_netsafe', '2021-10-14 11:28:32');
SET FOREIGN_KEY_CHECKS = 1;
... ...
文档管理表结构修改
V1015_3_alter.sql
新版资源列表 (依赖11个视图)
V1015_4_b_res_list_tree_v32.sql
V1015__4_b_res_list_config_v32.sql
... ...
... ... @@ -12,7 +12,7 @@ server:
key-store-password: Hg0801..
key-password: Hg0801..
url:
gateway: http://172.16.20.43:8080
gateway: http://127.0.0.1:8080
inspection_web: http://127.0.0.1:8082
assetsweb: http://127.0.0.1:8082
mxgraph_editor: http://127.0.0.1:8085
... ...
... ... @@ -664,6 +664,9 @@ layui.define(['view'], function(exports){
, toYTHViewScreen: function () {
window.open(sessionStorage.getItem("ythView") + '?access_token=' + localStorage.getItem("access_token"));
}
, toDZSWJScreen: function () {
window.open(window.location.origin + '/vue3/index.html#/zj/dp?access_token=' + localStorage.getItem("access_token"));
}
//向右滚动页面标签
, leftPage: function () {
... ...
... ... @@ -59,10 +59,16 @@
<a href="javascript:;" layadmin-event="globalSearch"><i class="layui-icon layui-icon-search"></i></a>
</li>
<li class="layui-nav-item" lay-tips="一体化视图">
<a href="javascript:;" layadmin-event="toYTHViewScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>
<!-- <a href="javascript:;" layadmin-event="toYTHViewScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>-->
<a href="javascript:;" layadmin-event="toYTHViewScreen" ><img src="/src/style/img/icon-yitihuadaping.png" style="width: 16px;height: 16px"></a>
</li>
<li class="layui-nav-item" lay-tips="大屏">
<a href="javascript:;" layadmin-event="toBigScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>
<!-- <a href="javascript:;" layadmin-event="toBigScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>-->
<a href="javascript:;" layadmin-event="toBigScreen" ><img src="/src/style/img/icon-daping.png" style="width: 16px;height: 16px"></a>
</li>
<li class="layui-nav-item" lay-tips="电子税务局">
<!-- <a href="javascript:;" layadmin-event="toBigScreen"><i class="layui-icon layui-icon-chart-screen"></i></a>-->
<a href="javascript:;" layadmin-event="toDZSWJScreen" ><img src="/src/style/img/icon-dianzishuiwuju.png" style="width: 16px;height: 16px"></a>
</li>
<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
<a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
... ...
<title>资源视图</title>
<iframe src="/vue3/index.html#/res/list" class="layadmin-iframe"/>
<iframe src="/vue3/index.html#/res/list" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
<title>资源视图</title>
<iframe src="/vue3/index.html#/res/list" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
... ... @@ -7,7 +7,21 @@ export default {
}
},
setup() {
props:{
treeNode: {
type: Object,
default: {}
},
parentNode: {
type: Object,
default: {}
},
projectId: {
type: String,
default: ''
}
},
setup(props, {attrs, slots, emit}) {
let height = Vue.ref(window.innerHeight - 130);
const {proxy} = Vue.getCurrentInstance();
... ... @@ -78,7 +92,7 @@ export default {
proxy.$http.post("/api-web/bOpsPerson/personCollect", {
"page":1,
"limit":10,
"projectId":"1"
"projectId": treeNode.map.nodeType.projectId
}, function (res) {
if (res && res.data) {
dataList.value = res.data
... ... @@ -92,6 +106,11 @@ export default {
getPage();
})
// 监听编辑状态
Vue.watch(() => props.treeNode, (newValue, oldVlaue) => {
getPage();
});
return {
columns,
... ...
... ... @@ -3,8 +3,15 @@
<el-row :gutter="5">
<el-col :span="4">
<div :style="{'min-height':height+'px','height':'100%','overflow':'auto'}" style="background-color: white;border-radius: 3px">
<el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps"
@node-click="handleNodeClick"/>
<el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" >
<template #default="{ node, data }">
<div style=" width: 100%;">
<div style="width: 100%;max-width: 100%;overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="handleNodeClick(data)" :title="node.label">
{{node.label }}
</div>
</div>
</template>
</el-tree>
</div>
</el-col>
<el-col :span="20" >
... ...
<!--:style="{'height':height+'px','max-height':height+'px','overflow':'auto'}"-->
<div class="container tree-config" :style="{'height':height+'px','max-height':height+'px','overflow':'auto'}">
<el-row :gutter="5">
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<el-row :gutter="5" >
<el-col :span="4" >
<cm-res-type-tree-view :treeData="treeData" :show-tools="true"></cm-res-type-tree-view>
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<el-link type="info" :underline="false"><i class="iconfont icon-liebiao"></i> 资源类型</el-link>
</div>
<el-tree :data="treeData" :default-expanded-keys="[1]" node-key="id" @node-click="handleNodeClick"/>
</div>
</el-col>
<el-col :span="20" >
<div class="card-item">
<div style="padding: 3px 6px;text-align: right">
<el-button type="primary" @click="showDialog">配置</el-button>
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" >
<div style="height: 80px;text-align: left;width: 80%;margin-left: 10px;margin-top: 10px;">
<el-form :inline="true" :model="searchForm" class="demo-form-inline">
<el-form-item label="资源名称">
<el-input v-model="searchForm.resName" placeholder="请输入资源名称"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-table :data="tableData" style="width: 100%">
<el-table-column fixed prop="date" label="Date" width="150" />
<el-table-column prop="name" label="Name" width="120" />
<el-table-column prop="state" label="State" width="120" />
<el-table-column prop="city" label="City" width="120" />
<el-table-column prop="address" label="Address" width="600" />
<el-table-column prop="zip" label="Zip" width="120" />
<el-table-column fixed="right" label="Operations" width="120">
<template #default>
<el-button type="text" size="small" @click="handleClick">Detail</el-button>
<el-button type="text" size="small">Edit</el-button>
</template>
</el-table-column>
</el-table>
<cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true"
:showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
:showPage="true" :height="(height - 80)">
<template #default="{row,prop,column}">
<el-link v-if="prop == 'resPositon' || prop == 'cabinetNo'" :underline="true" @click="cellClick(row,prop,column)">{{row[prop]}}</el-link>
<el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop]}}</el-link>
</template>
</cm-table-page>
</div>
</el-col>
</el-row>
<el-dialog top="2vh" :title="dialog.title" v-model="dialogVisible" custom-class="config-dialog" width="80%" destroy-on-close>
<tree-config></tree-config>
</el-dialog>
<cm-dialog :title="cellDetail.title" width="60%" :showDialogVisible="dialogFlg" :showFooter="true" @hidedialog="showDialog" :showOkBtn="false" cancelText="关闭">
<template v-slot>
<img v-if="cellDetail.prop == 'cabinetNo'" src="/vue3/src/assets/images/res/img01.png" style="width: 50%">
<img v-if="cellDetail.prop == 'resPositon'" src="/vue3/src/assets/images/res/img02.jpg" style="width: 50%">
<!--<div v-if="cellDetail.prop == 'cabinetNo'" :style="{'background-image':'url(/vue3/src/assets/images/res/img01.png)'}" > </div>
<div v-if="cellDetail.prop == 'resPositon'" :style="{'background-image':'url(/vue3/src/assets/images/res/img02.png)'}" > </div>-->
<div>
{{cellDetail.row[cellDetail.prop]}}
</div>
</template>
</cm-dialog>
</div>
... ...
... ... @@ -9,51 +9,106 @@ export default {
data() {
return {
props : {
label:'title',
label:'label',
children:'children'
}
}
},
setup() {
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight - 50);
let height = Vue.ref(window.innerHeight -10);
// 树数据
const treeData = Vue.ref([]);
const tableData = Vue.ref([]);
const dialog = Vue.ref({
title: '资源类型配置',
activeName: ''
// 表格数据对象
const obj = Vue.ref({});
// 当前点击
const currentNode = Vue.ref({});
// 搜索框内容
const searchForm = Vue.ref({
resName:''
});
const dialogVisible = Vue.ref(false);
// 弹框
let showDialog = () => {
dialogVisible.value = true;
}
// 单元格点及保存的数据
let cellDetail = Vue.ref({});
// 展示U位弹框
let dialogFlg = Vue.ref(false);
// const dialog = Vue.ref({
// title: '资源类型配置',
// activeName: ''
// });
// const dialogVisible = Vue.ref(false);
//
// // 弹框
// let showDialog = () => {
// dialogVisible.value = true;
// }
// 获取左侧树结构
let loadTree = () => {
proxy.$http.get("/api-web/res/list/tree", {}, function (res) {
proxy.$http.get("/api-web/v32/res/list/tree", {}, function (res) {
if (res && res.data) {
treeData.value = res.data
currentNode.value = res.data[0];
loadResList();
}
});
}
let loadResList = () =>{
if(currentNode.value){
proxy.$http.get(`/api-web/v32/res/list/list/${currentNode.value.id}`, {}, function (res) {
if (res && res.object) {
obj.value = res.object
}
});
}
}
let handleNodeClick =(data) =>{
console.log(data)
currentNode.value = data;
loadResList();
}
// 展示机房或者机柜信息
let showDialog = (flg) =>{
dialogFlg.value = flg;
}
let cellClick = (row,prop,column) =>{
showDialog(true);
cellDetail.value['prop'] = prop;
cellDetail.value['row'] = row;
cellDetail.value['title'] = column.label + '详情';
}
// 挂载完
Vue.onMounted(() => {
loadTree();
console.log('onMounted');
})
return {
/*showDialog,
dialogVisible,
dialog*/
currentNode,
treeData,
searchForm,
height,
obj,
handleNodeClick,
loadResList,
dialogFlg,
showDialog,
dialogVisible,
tableData,
dialog
cellDetail,
cellClick
}
}
}
... ...
<div class="container" :style="{'height':height+'px','max-height':height+'px'}">
<el-row :gutter="5" >
<el-col :span="4" >
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
<el-tree :data="treeData" :default-expanded-keys="[1]" @node-click="handleNodeClick"/>
</div>
</el-col>
<el-col :span="20" >
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" >
</div>
</el-col>
</el-row>
</div>
... ...
export default {
name: 'resIndex',
template: '',
components: {
'tree-config': Vue.defineAsyncComponent(
() => myImport('components/page/res/treeconfig/index')
),
},
data() {
return {
props : {
label:'label',
children:'children'
}
}
},
setup() {
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight -10);
const treeData = Vue.ref([]);
const tableData = Vue.ref([]);
const dialog = Vue.ref({
title: '资源类型配置',
activeName: ''
});
const dialogVisible = Vue.ref(false);
// 弹框
let showDialog = () => {
dialogVisible.value = true;
}
// 获取左侧树结构
let loadTree = () => {
proxy.$http.get("/api-web/v32/res/list/tree", {}, function (res) {
if (res && res.data) {
treeData.value = res.data
}
});
}
let handleNodeClick =(data) =>{
console.log(data)
}
// 挂载完
Vue.onMounted(() => {
loadTree();
console.log('onMounted');
})
return {
treeData,
height,
showDialog,
dialogVisible,
tableData,
dialog
}
}
}
... ...