Authored by ‘superliu’

Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web into master-V32-LH

Showing 22 changed files with 288 additions and 56 deletions
... ... @@ -142,7 +142,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
, done: function (res) {
soulTable.render(this);
getResCount(bizId, newResType)
commonCols.colsClickEvent();
table.on('sort(bizResListTable)', function (obj) {
... ... @@ -173,7 +172,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
//树表格
function renderTreeTable(bizId, resType, reloadFlag) {
$(".biz_reslist_search").hide();
$(".biz_reslist_treetable_search").show();
$("#bizResListTableContent").hide();
... ... @@ -518,6 +516,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
}
if (resType == 'MIDDLEWARE_WEBLOGIC') {
$("#biz_reslist_res_colony_id").hide();
$("#biz_reslist_link_state_id").hide();
$('#biz_reslist_server_state_id').show();
} else {
... ... @@ -527,7 +526,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
if (targetId && searchType) {
var url = "/api-web/home/res-list/" + searchType + "?page=1&limit=50&busId=" + bizId;
if (searchType == 'MIDDLEWARE_WEBLOGIC') {
url += '&parentId=null'
//增加parentType=parent,解决sql查询中问题 joke add 20211130
url += '&parentId=null&parentType=parent';
}
admin.req({
url: common.domainName + url
... ...
... ... @@ -24,6 +24,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
domainAssetsManage: sessionStorage.getItem('domainAssetsManage'), // 资产系统地址
graphEditorOrigin: sessionStorage.getItem('graphEditorOrigin'), // 拓扑系统地址
workflowName: sessionStorage.getItem('workflow'),//流程系统地址
domainCMDBName: "http://120.236.178.177:7180/HGKJCMDB", //杭州咨源老cmdb系统地址
lineTimer: null,//性能曲线图全局定时器
detailTimer: [],//详细页的全局定时器
alarmTimer: null,//首页告警刷新定时器
... ...
... ... @@ -334,6 +334,10 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions','
//点击告警数字,跳转至告警页面
$("#indexbizhealth [data-index-banner-item='resType'] .index-banner-item-tips ").unbind('click').on("click", function () {
var restype = $(this).data('restype');
//不以资源类型不包括父节点的资源类型 包括阿里云、华为云
if("ALI_CLOUD_PLAT"== restype || "HUAWEI_CLOUD_PLAT" == restype){
restype =restype.substring(0,restype.lastIndexOf("_"));
}
var alink = document.createElement('a');
alink.setAttribute("lay-href", "/alarm/activewarning/restype=" + restype);
document.body.appendChild(alink);
... ...
... ... @@ -61,10 +61,11 @@
<button type="button" id="searchBtn" class="layui-btn layui-btn-sm layuiadmin-btn-comm">筛选
</button>
</div>
<div class="work-tab-right">
<button type="button" id="workIndexFlowBtn" class="layui-btn layui-btn-sm layui-btn-primary">发起流程
</button>
</div>
<!--去除发起流程 joke add 20211130-->
<!-- <div class="work-tab-right">-->
<!-- <button type="button" id="workIndexFlowBtn" class="layui-btn layui-btn-sm layui-btn-primary">发起流程-->
<!-- </button>-->
<!-- </div>-->
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="mt15" id="workIndexFlowByMe"></div>
... ...
... ... @@ -4,7 +4,9 @@
<div style="border-radius: 3px;background-color: white"
:style="{'height':height+'px','max-height':height + 'px','overflow':'auto'}">
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
<slot name="title">
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档管理</el-link>
</slot>
</div>
<!---->
<el-tree ref="tree" style="padding:6px;" :props="props" :data="treeData" node-key="id"
... ... @@ -164,7 +166,7 @@
</template>
</cm-dialog>
<cm-userright :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" @callback="selectUser"
<cm-userright :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser"
@hideDialog="showUserDialog"></cm-userright>
<cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile"
... ...
... ... @@ -525,6 +525,9 @@ export default {
// 用户授权
let showUserDialogVisible = Vue.ref(false);
let userFileRight = Vue.ref([]);
//获取用户
let userList = Vue.ref([]);
let isUser = Vue.ref("false");
let getCheckedFile = () => {
let arr = dataList.value.filter(function (v) {
if (v.checked != undefined && v.checked == true) {
... ... @@ -705,6 +708,7 @@ export default {
* 挂载完
*/
Vue.onMounted(() => {
getUserList();
// 预览模式 不展示左侧树
if (!props.isView) {
getTree();
... ... @@ -743,6 +747,35 @@ export default {
}
}
//获取用户数据
let getUserList=()=>{
proxy.userList = [];
// 查询信息中心的用户
proxy.$http.get("/api-user/org/getOrgUserList?orgCode=xxzx", {}, function (res) {
if (res && res.data) {
res.data.map(function (v) {
let desc = [];
let orgName = v.orgName;
let nickname = v.nickname;
if (orgName) {
desc.push(orgName);
}
if (nickname) {
desc.push(nickname);
}
proxy.userList.push({
value: v.username,
type:'USER',
desc: `${desc.join(' / ')}`,
props : v
})
});
}
},function (){},false)
}
return {
/* viewEdit,*/
... ... @@ -780,6 +813,8 @@ export default {
userFileRight,
selectUser,
showUserDialog,
userList,
isUser,
showUploadDialogVisible,
historyNode,
... ...
... ... @@ -43,6 +43,16 @@ export default {
type: Array,
default: ['取消', '授权']
},
//用户数据
userArr:{
type: Array,
default:[],
},
//是否获取所有用户数据
isUser:{
type: Boolean,
default: true
}
},
data() {
return {
... ... @@ -53,8 +63,11 @@ export default {
const {proxy} = Vue.getCurrentInstance();
let allArr = Vue.ref([]);
let userArr = Vue.ref([]);
let isUser = props.isUser;
if(!isUser){
userArr = props.userArr;
}
let roleArr = Vue.ref([]);
let orgArr = Vue.ref([]);
let activeName = Vue.ref('user');
... ... @@ -71,33 +84,30 @@ export default {
}
const getAllUser = () => {
if(userArr.value.length != 0){
return;
if(isUser){
// 查询全部用户
proxy.$http.get("/api-user/users?page=1&limit=10000&username=&nickname=&enabled=&orgId=&roles=", {}, function (res) {
if (res && res.data) {
res.data.map(function (v) {
let desc = [];
let orgName = v.orgName;
let nickname = v.nickname;
if (orgName) {
desc.push(orgName);
}
if (nickname) {
desc.push(nickname);
}
userArr.value.push({
value: v.username,
type:'USER',
desc: `${desc.join(' / ')}`,
props : v
})
});
}
},function (){},false)
}
// 查询全部用户
proxy.$http.get("/api-user/users?page=1&limit=10000&username=&nickname=&enabled=&orgId=&roles=", {}, function (res) {
if (res && res.data) {
res.data.map(function (v) {
let desc = [];
let orgName = v.orgName;
let nickname = v.nickname;
if (orgName) {
desc.push(orgName);
}
if (nickname) {
desc.push(nickname);
}
userArr.value.push({
value: v.username,
type:'USER',
desc: `${desc.join(' / ')}`,
props : v
})
});
}
},function (){},false)
}
const getAllRole = () => {
... ... @@ -266,7 +276,7 @@ export default {
hidedialog,
activeName,
userArr,
//userArr,
roleArr,
orgArr,
... ...
... ... @@ -43,6 +43,9 @@
<i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
</a>
</li>
<li class="layui-nav-item" lay-tips="大屏">
<a href="javascript:;" layadmin-event="toBigScreen" ><img src="/src/style/img/icon-daping.png" style="width: 16px;height: 16px"></a>
</li>
<script type="text/html" template lay-url="{{sessionStorage.getItem('domainName')}}/api-web/sxview/getbizListByUser?access_token={{localStorage.getItem('access_token')}}">
{{# if(d.data.length>0){ }}
... ... @@ -55,9 +58,7 @@
{{# } }}
</script>
<li class="layui-nav-item" lay-tips="大屏">
<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-unselect>
<a href="javascript:;" layadmin-event="refresh" title="刷新">
... ...
... ... @@ -64,7 +64,7 @@
}
.yfyw-user .zc-view .zc-img i {
font-size: 100px
font-size: 60px
}
.yfyw-user .zc-view .zc-info {
... ...
<div>
<span class="el-dropdown-link" @click="showMachineRoomDialog(true)" >
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
</template>
</cm-dialog>
</div>
... ...
export default {
name: 'machineRoomComponents',
template: '',
components: {
'GetMachineRoom': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/getMachineRoom/index')
),
},
props: {
// 资源名称
textString: {
type: String,
default: 0
},
resId: {
type: String,
default: ''
},
resTypeId: {
type: String,
default: ''
},
resType: {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
return {}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let dialogFlg = Vue.ref(false);
let commandNameData = Vue.ref([
{
name: '萧山IDC二号机房',
htmlName: 'xiaoshansecond',//html页面的名称
val: 'one'
},
{
name: '萧山IDC三号机房',
htmlName: 'xiaoshanthird',
val: 'two'
},
{
name: '萧山IDC七号机房',
htmlName: 'xiaoshanseven',
val: 'three'
}
]);
let showMachineRoomDialog = (flg) => {
dialogFlg.value = flg;
debugger
console.log(props.optionData);
}
return {
dialogFlg,
commandNameData,
showMachineRoomDialog,
}
}
}
... ...
<div>
<span class="el-dropdown-link" @click="showMachineRoomDialog(true)" >
{{textString}}
</span>
<cm-dialog title="收藏" width="500px" :showDialogVisible="dialogFlg" @hidedialog="showMachineRoomDialog">
<template v-slot>
<GetMachineRoom v-if="commandNameData" :commandNameData="commandNameData"></GetMachineRoom>
</template>
</cm-dialog>
</div>
... ...
export default {
name: 'machineRoomDetailComponents',
template: '',
components: {
'GetMachineRoom': Vue.defineAsyncComponent(
() => myImport('views/commonComponents/getMachineRoom/index')
),
},
props: {
// 资源名称
textString: {
type: String,
default: 0
},
resId: {
type: String,
default: ''
},
resTypeId: {
type: String,
default: ''
},
resType: {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
return {}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let dialogFlg = Vue.ref(false);
let commandNameData = Vue.ref([
{
name: '萧山IDC二号机房',
htmlName: 'xiaoshansecond',//html页面的名称
val: 'one'
},
{
name: '萧山IDC三号机房',
htmlName: 'xiaoshanthird',
val: 'two'
},
{
name: '萧山IDC七号机房',
htmlName: 'xiaoshanseven',
val: 'three'
}
]);
let showMachineRoomDialog = (flg) => {
dialogFlg.value = flg;
}
return {
dialogFlg,
commandNameData,
showMachineRoomDialog,
}
}
}
... ...
... ... @@ -23,6 +23,10 @@ export default {
type: String,
default: 0
},
optionData: {
type: Array,
default: []
}
},
data() {
return {
... ...
... ... @@ -33,6 +33,10 @@ export default {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
... ... @@ -110,25 +114,14 @@ export default {
return;
}
// 查询topoId
// proxy.$http.get(`/api-web/mxgraph/generateByResId`, {resId: props.resId}, function (res) {
// if (res && res.success) {
// let topoId = res.str;
// proxy.$global.openGraphEditor(topoId)
// } else {
// proxy.$global.showMsg('生成资源拓扑失败!', "error");
// }
// });
proxy.$global.viewResTopo(props.resId)
}
let openDetail = () => {
debugger
if (props.resId == '') {
proxy.$global.showMsg("资源编号不存在,请确认!","warning")
return;
}
proxy.$global.openDetail(props.resId,props.resType,props.title);
}
... ...
... ... @@ -18,6 +18,10 @@ export default {
type: String,
default: ''
},
optionData: {
type: Array,
default: []
}
},
data() {
... ...
... ... @@ -77,6 +77,8 @@
<el-option label="资源名称" :value="'resNameComponents'"></el-option>
<el-option label="状态组件" :value="'statusComponents'"></el-option>
<el-option label="使用率组件" :value="'rateComponents'"></el-option>
<el-option label="机房组件" :value="'machineRoomComponents'"></el-option>
<el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option>
</el-select>
</div>
... ...
... ... @@ -203,6 +203,12 @@ export default {
'statusComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/statusComponents/index')
),
'machineRoomComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/machineRoomComponents/index')
),
'machineRoomDetailComponents': Vue.defineAsyncComponent(
() => myImport('components/page/res/machineRoomDetailComponents/index')
),
},
data() {
return {
... ...
<div class="container">
<cm-document :isRecycle="true"></cm-document>
<cm-document :isRecycle="true">
<template #title>
<el-link type="info" :underline="false"><i class="iconfont icon-ziliaoku"></i> 文档回收站</el-link>
</template>
</cm-document>
</div>
... ...
... ... @@ -59,7 +59,7 @@ export default {
var params = {
// page: pageInfo.page,
// limit: pageInfo.limit,
username: '1',
username: localStorage.getItem("lgn"),
};
proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) {
if (res && res.data) {
... ...
... ... @@ -35,7 +35,8 @@
<component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents"
:resId="row.resId"
:resTypeId="currentNode.id"
:textString="row[prop] == undefined ? '' : row[prop].value"></component>
:textString="row[prop] == undefined ? '' : row[prop].value"
:optionData="row"></component>
<el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop] == undefined ? '' : row[prop].value }}</el-link>
</template>
</cm-table-page>
... ...
... ... @@ -182,7 +182,7 @@ export default {
}
const goJump=()=>{
// proxy.$router.push({path:'/zj/dp',query: {access_token:localStorage.getItem('access_token')}})
window.open(sessionStorage.getItem("ythView") + '?access_token=' + localStorage.getItem("access_token"));
window.open(window.location.origin + '/vue3/index.html#/zj/dp?access_token=' + localStorage.getItem("access_token"));
}
return{
... ...