fix:修改ptoject 按钮样式统一 添加endpoint module的上传导出功能
This commit is contained in:
@@ -19,19 +19,19 @@ export const Tools = [
|
||||
group: 'General',
|
||||
children: [
|
||||
// {
|
||||
// name:'rectangleImg',
|
||||
// icon:'icon-rect',
|
||||
// data:{
|
||||
// text:'rect',
|
||||
// rect:{
|
||||
// width:100,
|
||||
// height:100
|
||||
// name: 'rectangle',
|
||||
// icon: 'icon-rect',
|
||||
// data: {
|
||||
// text: 'rect',
|
||||
// rect: {
|
||||
// width: 100,
|
||||
// height: 100
|
||||
// },
|
||||
// paddingLeft:10,
|
||||
// paddingRight:10,
|
||||
// paddingTop:10,
|
||||
// paddingBottom:10,
|
||||
// name:'rectangleImg',
|
||||
// paddingLeft: 10,
|
||||
// paddingRight: 10,
|
||||
// paddingTop: 10,
|
||||
// paddingBottom: 10,
|
||||
// name: 'rectangleImg',
|
||||
// icon: '\ue680',
|
||||
// iconFamily: 'nz-icon',
|
||||
// iconColor: ''
|
||||
|
||||
@@ -113,12 +113,12 @@
|
||||
<div style="width: 100%;display: flex;justify-content: space-between;padding-left: 10px" v-if="!editTopologyFlag&&!fromOverView" class="top-tool-main-right">
|
||||
<div>{{topologyInfo.name}}</div>
|
||||
<span class="edit-topologyLine" style="padding-top: 5px" v-show="!editTopologyFlag&&!fromPrev&&!fromOverView">
|
||||
<button @click="changeScreen" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right"
|
||||
<button @click="changeScreen" class="top-tool-btn float-right"
|
||||
style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px;margin-top: -2px" type="button"
|
||||
>
|
||||
<i class="nz-icon" :class="topoScreen?'nz-icon-exit-full-screen':'nz-icon-full-screen'"></i>
|
||||
</button>
|
||||
<button @click="editTopology" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right"
|
||||
<button @click="editTopology" class="top-tool-btn float-right"
|
||||
style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px;margin-top: -2px" type="button"
|
||||
>
|
||||
<i class="nz-icon nz-icon-edit" :title="$t('project.topology.edit')"></i>
|
||||
@@ -2605,4 +2605,25 @@ export default {
|
||||
color: #FA901C;
|
||||
}
|
||||
}
|
||||
.top-tool-btn{
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
border: 1px solid #DEDEDE;
|
||||
outline: none;
|
||||
border-radius: 2px;
|
||||
background-color: #F9F9F9;
|
||||
-webkit-transition: background-color linear .1s;
|
||||
transition: background-color linear .1s;
|
||||
padding: 0;
|
||||
}
|
||||
.top-tool-btn:hover{
|
||||
background-color: #fff;
|
||||
}
|
||||
.top-tool-btn:focus{
|
||||
background-color: #fff;
|
||||
border-color: #FBCEA4;
|
||||
}
|
||||
.top-tool-btn:focus .nz-icon{
|
||||
color: #FBCEA4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -110,15 +110,15 @@
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div style="width: 100%;display: flex;justify-content: space-between" v-if="!editTopologyFlag&&!fromOverView">
|
||||
<div style="width: 100%;display: flex;justify-content: space-between;padding-left: 10px" v-if="!editTopologyFlag&&!fromOverView" class="top-tool-main-right">
|
||||
<div>{{topologyInfo.name}}</div>
|
||||
<span class="edit-topologyLine" style="padding-top: 5px" v-show="!editTopologyFlag&&!fromPrev&&!fromOverView">
|
||||
<button @click="changeScreen" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right"
|
||||
<button @click="changeScreen" class="top-tool-btn float-right"
|
||||
style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px;margin-top: -2px" type="button"
|
||||
>
|
||||
<i class="nz-icon" :class="topoScreen?'nz-icon-exit-full-screen':'nz-icon-full-screen'"></i>
|
||||
</button>
|
||||
<button @click="editTopology" class="nz-btn nz-btn-size-normal nz-btn-style-light float-right"
|
||||
<button @click="editTopology" class="top-tool-btn float-right"
|
||||
style="border-right: 1px solid rgba(162,162,162,0.50);margin-right: 12px;margin-top: -2px" type="button"
|
||||
>
|
||||
<i class="nz-icon nz-icon-edit" :title="$t('project.topology.edit')"></i>
|
||||
@@ -330,8 +330,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Topology, registerNode } from '@topology/core'
|
||||
import {
|
||||
import { Topology, registerNode } from '@topology/core'
|
||||
import {
|
||||
Tools,
|
||||
canvasRegister,
|
||||
imageTemp,
|
||||
@@ -343,31 +343,31 @@ import {
|
||||
onChangeAnimateLine,
|
||||
myCubec,
|
||||
myCubeAnchors
|
||||
} from './L5/services/canvas.js'
|
||||
import { getTopology, setTopology } from '../js/common'
|
||||
import CanvasProps from './L5/CanvasProps'
|
||||
import topologyTopTool from './L5//topologyTopTool'
|
||||
import popDataMain from './popData/Main'
|
||||
import popDataInfo from './popData/Info'
|
||||
import alertTable from './popData/alertTable'
|
||||
import assetTable from './popData/assetTable'
|
||||
import endpointTable from './popData/endpointTable'
|
||||
import topoTooltip from './L5/topoTooltip'
|
||||
import { getMetricTypeValue } from '../js/tools'
|
||||
import bus from '../../../libs/bus'
|
||||
import topologyPrev from './topologyPrev'
|
||||
// 注册到画布
|
||||
registerNode('rectangleImg', myShape, myAnchors, myIconRect, myTextRect)
|
||||
registerNode('myCube', myCubec, myCubeAnchors, null, null)
|
||||
} from './L5/services/canvas.js'
|
||||
import { getTopology, setTopology } from '../js/common'
|
||||
import CanvasProps from './L5/CanvasProps'
|
||||
import topologyTopTool from './L5//topologyTopTool'
|
||||
import popDataMain from './popData/Main'
|
||||
import popDataInfo from './popData/Info'
|
||||
import alertTable from './popData/alertTable'
|
||||
import assetTable from './popData/assetTable'
|
||||
import endpointTable from './popData/endpointTable'
|
||||
import topoTooltip from './L5/topoTooltip'
|
||||
import { getMetricTypeValue } from '../js/tools'
|
||||
import bus from '../../../libs/bus'
|
||||
import topologyPrev from './topologyPrev'
|
||||
// 注册到画布
|
||||
registerNode('rectangleImg', myShape, myAnchors, myIconRect, myTextRect)
|
||||
registerNode('myCube', myCubec, myCubeAnchors, null, null)
|
||||
|
||||
const canvasOptions = {
|
||||
const canvasOptions = {
|
||||
rotateCursor: '/img/rotate.cur',
|
||||
translateKey: 'None',
|
||||
disableEmptyLine: true,
|
||||
autoExpandDistance: 0,
|
||||
minScale: 0.01
|
||||
}
|
||||
export default {
|
||||
}
|
||||
export default {
|
||||
name: 'topologyL5',
|
||||
data () {
|
||||
return {
|
||||
@@ -2025,7 +2025,7 @@ export default {
|
||||
}
|
||||
window.removeEventListener('resize', this.winResize)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.el-dropdown-menu {
|
||||
@@ -2469,13 +2469,14 @@ export default {
|
||||
position: relative;
|
||||
border-radius: 2px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
.pickTime{
|
||||
margin-top: -13px;
|
||||
}
|
||||
.project-title {
|
||||
height: 34px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
|
||||
.drag-header {
|
||||
@@ -2493,8 +2494,9 @@ export default {
|
||||
|
||||
.page {
|
||||
display: flex;
|
||||
height: calc(100% - 55px);
|
||||
width: 100%;
|
||||
height: calc(100% - 65px);
|
||||
width: calc(100% - 10px);
|
||||
margin: 5px;
|
||||
position: relative;
|
||||
|
||||
.tools {
|
||||
@@ -2603,4 +2605,25 @@ export default {
|
||||
color: #FA901C;
|
||||
}
|
||||
}
|
||||
.top-tool-btn{
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
border: 1px solid #DEDEDE;
|
||||
outline: none;
|
||||
border-radius: 2px;
|
||||
background-color: #F9F9F9;
|
||||
-webkit-transition: background-color linear .1s;
|
||||
transition: background-color linear .1s;
|
||||
padding: 0;
|
||||
}
|
||||
.top-tool-btn:hover{
|
||||
background-color: #fff;
|
||||
}
|
||||
.top-tool-btn:focus{
|
||||
background-color: #fff;
|
||||
border-color: #FBCEA4;
|
||||
}
|
||||
.top-tool-btn:focus .nz-icon{
|
||||
color: #FBCEA4;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<!--type-->
|
||||
<el-form-item :label='$t("project.endpoint.type")' prop="type">
|
||||
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.type" placeholder="" size="small" id="module-box-input-type" @change="changeAuthType">
|
||||
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.type" placeholder="" size="small" id="module-box-input-type" @change="changeAuthType" :disabled="!!editModule.id">
|
||||
<el-option :id="'module-type-'+item.id" v-for="item in typetList" :key="item.value" :label="item.name" :value="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@@ -8,10 +8,24 @@
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg">
|
||||
<template v-slot:top-tool-right>
|
||||
<button id="account-add" v-has="'monitor_endpoint_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-l-20 margin-r-20"
|
||||
<export-excel
|
||||
id="expression-template-list"
|
||||
v-has="''"
|
||||
export-url="monitor/endpoint/export"
|
||||
import-url="monitor/endpoint/import"
|
||||
export-file-name="expression-template"
|
||||
:params="searchLabel"
|
||||
:permissions="{import: 'asset_add', export: 'asset_add'}"
|
||||
@afterImport="getTableData"
|
||||
class="top-tool-export margin-r-10"
|
||||
>
|
||||
<template slot="optionZone">
|
||||
<button id="account-add" v-has="'monitor_endpoint_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-l-20"
|
||||
type="button" @click="add">
|
||||
<i class="nz-icon-create-square nz-icon"></i>
|
||||
</button>
|
||||
</template>
|
||||
</export-excel>
|
||||
<delete-button id="account-list-batch-delete" v-has="'monitor_endpoint_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
</template>
|
||||
<template v-slot="slotProps">
|
||||
@@ -45,6 +59,7 @@
|
||||
<script>
|
||||
import deleteButton from '@/components/common/deleteButton'
|
||||
import addEndpointBox from '@/components/common/rightBox/addEndpointBox'
|
||||
import exportXLSX from '@/components/common/exportXLSX'
|
||||
import nzDataList from '@/components/common/table/nzDataList'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import endpointTable from '@/components/common/table/settings/endpointTable'
|
||||
@@ -61,7 +76,8 @@ export default {
|
||||
nzDataList,
|
||||
addEndpointBox,
|
||||
deleteButton,
|
||||
endpointTable
|
||||
endpointTable,
|
||||
'export-excel': exportXLSX
|
||||
},
|
||||
mixins: [dataListMixin],
|
||||
data () {
|
||||
|
||||
@@ -8,10 +8,24 @@
|
||||
:layout="['searchInput', 'elementSet']"
|
||||
:search-msg="searchMsg">
|
||||
<template v-slot:top-tool-right>
|
||||
<button id="account-add" v-has="'monitor_module_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-l-20 margin-r-10"
|
||||
<export-excel
|
||||
id="expression-template-list"
|
||||
v-has="''"
|
||||
export-url="monitor/module/export"
|
||||
import-url="monitor/module/import"
|
||||
export-file-name="expression-template"
|
||||
:params="searchLabel"
|
||||
:permissions="{import: 'asset_add', export: 'asset_add'}"
|
||||
@afterImport="getTableData"
|
||||
class="top-tool-export margin-r-10"
|
||||
>
|
||||
<template slot="optionZone">
|
||||
<button id="account-add" v-has="'monitor_module_add'" :title="$t('overall.createUser')" class="top-tool-btn margin-l-20"
|
||||
type="button" @click="add">
|
||||
<i class="nz-icon-create-square nz-icon"></i>
|
||||
</button>
|
||||
</template>
|
||||
</export-excel>
|
||||
<delete-button id="account-list-batch-delete" v-has="'monitor_module_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
</template>
|
||||
<template v-slot="slotProps">
|
||||
@@ -45,7 +59,7 @@ import moduleBox from '@/components/common/rightBox/moduleBox'
|
||||
import nzDataList from '@/components/common/table/nzDataList'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import moduleTable from '@/components/common/table/settings/moduleTable'
|
||||
|
||||
import exportXLSX from '@/components/common/exportXLSX'
|
||||
export default {
|
||||
beforeRouteLeave (to, from, next) { // 路由离开之前触发
|
||||
localStorage.removeItem('moduleProjectId')
|
||||
@@ -56,7 +70,8 @@ export default {
|
||||
nzDataList,
|
||||
moduleBox,
|
||||
deleteButton,
|
||||
moduleTable
|
||||
moduleTable,
|
||||
'export-excel': exportXLSX
|
||||
},
|
||||
mixins: [dataListMixin],
|
||||
data () {
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
'@': path.resolve('src'),
|
||||
'@assets': path.resolve(__dirname, 'src/assets'),
|
||||
'@pages': path.resolve(__dirname, 'src/pages'),
|
||||
'@comp': path.resolve(__dirname, 'src/components'),
|
||||
'@/components': path.resolve(__dirname, 'src/components'),
|
||||
'@api': path.resolve(__dirname, 'src/api'),
|
||||
'@plug': path.resolve(__dirname, 'src/plugins'),
|
||||
'@utils': path.resolve(__dirname, 'src/utils')
|
||||
|
||||
Reference in New Issue
Block a user