fix:修改asset 顶部按钮,修改assetModel 上滑,修改module endpoint上滑编辑页面
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
<panel-tab-new v-if="from === fromRoute.chartTemp && targetTab === 'panel'" v-show="subResizeShow" :detail="detail" :from="from" :tabs="tabs.chartTemp.chartTempTabTitle" :obj="obj" :targetTab.sync="targetTab" @changeTab="changeTab"></panel-tab-new>
|
||||
<!--alertRule Tab-->
|
||||
<alertMessageTabNew v-if="from === fromRoute.alertRule && targetTab === 'alertRuleAlertMessage'" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.alertRule.alertRule" @changeTab="changeTab" :targetTab="targetTab"></alertMessageTabNew>
|
||||
<!--model 下滑-->
|
||||
<asset-tab v-if="(from === fromRoute.model) && targetTab === 'asset'" :tabs="tabs.model" ref="assetTab" :from="from" :obj="obj" @changeTab="changeTab" @exit="closeSubList"></asset-tab>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -157,14 +159,14 @@ export default {
|
||||
moduleTabTitle: [
|
||||
// { prop: 'panel', name: 'Detail' },
|
||||
{ prop: 'endpoint', name: this.$t('asset.endpoint') },
|
||||
{ prop: 'moduleAlertMessage', name: 'Alerts' }
|
||||
{ prop: 'moduleAlertMessage', name: 'Alert' }
|
||||
]
|
||||
},
|
||||
endpoint: {
|
||||
endpointTabTitle: [
|
||||
// { prop: 'panel', name: 'Detail' },
|
||||
{ prop: 'endpointQuery', name: 'Query' },
|
||||
{ prop: 'endpointAlertMessage', name: 'Alerts' }
|
||||
{ prop: 'endpointAlertMessage', name: 'Alert' }
|
||||
]
|
||||
},
|
||||
chartTemp: {
|
||||
@@ -174,9 +176,12 @@ export default {
|
||||
},
|
||||
alertRule: {
|
||||
alertRule: [
|
||||
{ prop: 'alertRuleAlertMessage', name: 'Alerts' }
|
||||
{ prop: 'alertRuleAlertMessage', name: 'Alert' }
|
||||
]
|
||||
},
|
||||
model: [
|
||||
{ prop: 'asset', name: this.$t('asset.assets'), active: true }
|
||||
],
|
||||
dc: {
|
||||
cabinet: [
|
||||
{ prop: 'cabinet', name: this.$t('config.dc.cabinets'), active: true },
|
||||
|
||||
@@ -52,6 +52,7 @@ import subDataListMixin from '@/components/common/mixin/subDataList'
|
||||
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
|
||||
import assetTable from '@/components/common/table/asset/assetTable'
|
||||
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
||||
import {fromRoute} from "@/components/common/js/constants";
|
||||
export default {
|
||||
name: 'assetTab',
|
||||
mixins: [dataListMixin, subDataListMixin],
|
||||
@@ -193,6 +194,10 @@ export default {
|
||||
deep: true,
|
||||
handler (n, o) {
|
||||
this.searchLabel.dcIds = n.id
|
||||
if ( this.from === fromRoute.model) {
|
||||
delete this.searchLabel.dcIds
|
||||
this.searchLabel.modelIds = n.id
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</template>
|
||||
</nz-bottom-data-list>
|
||||
<transition name="right-box">
|
||||
<edit-endpoint-box-new v-if="rightBox.editShow" :module="object" @close="closeRightEditBox" :disabled="true" :type="'edit'"></edit-endpoint-box-new>
|
||||
<edit-endpoint-box-new v-if="rightBox.editShow" :module="object" @close="closeRightEditBox" :disabled="true" :optionType="'edit'"></edit-endpoint-box-new>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -107,7 +107,8 @@ const cn = {
|
||||
copy: '复制',
|
||||
silence: '静默',
|
||||
labels: '标签',
|
||||
editType: '类型'
|
||||
editType: '类型',
|
||||
searchCondition: '搜索条件'
|
||||
},
|
||||
setup: {
|
||||
step0: '欢迎',
|
||||
|
||||
@@ -112,7 +112,8 @@ const en = {
|
||||
moreOption: 'More option',
|
||||
copy: 'Copy',
|
||||
silence: 'Silence',
|
||||
editType: 'Type'
|
||||
editType: 'Type',
|
||||
searchCondition: 'Search condition'
|
||||
},
|
||||
pageSize: '/page',
|
||||
setup: {
|
||||
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
rollbackImport () {
|
||||
let url
|
||||
if (this.importUrl.indexOf('asset') > -1) {
|
||||
url = '/asset/cancelImport'
|
||||
url = '/asset/asset/cancelImport'
|
||||
} else if (this.importUrl.indexOf('endpoint') > -1) {
|
||||
url = '/monitor/endpoint/cancelImport'
|
||||
} else if (this.importUrl.indexOf('rule') > -1) {
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
|
||||
let url = null
|
||||
if (this.importUrl.indexOf('asset') > -1) {
|
||||
url = '/asset/template'
|
||||
url = '/asset/asset/template'
|
||||
} else if (this.importUrl.indexOf('rule') > -1) {
|
||||
url = '/alert/rule/template'
|
||||
} else if (this.importUrl.indexOf('panel') > -1) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="right-box__header">
|
||||
<div class="header__title">{{$t('asset.batchEditAsset')}}</div>
|
||||
<div class="header__operation">
|
||||
<span><i class="nz-icon nz-icon-close"></i></span>
|
||||
<span @click="esc"><i class="nz-icon nz-icon-close"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-box__container">
|
||||
|
||||
@@ -60,13 +60,14 @@
|
||||
fixed="right">
|
||||
<div slot="header" class="table-operation-title">{{$t('overall.option')}}</div>
|
||||
<div slot-scope="scope" class="table-operation-items">
|
||||
<button class="table-operation-item" @click="showBottomBox('operationLogTab', scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
|
||||
<button class="table-operation-item" @click="$emit('edit', scope.row)"><i class="nz-icon nz-icon-edit"></i></button>
|
||||
<!-- <button class="table-operation-item" @click="showBottomBox('operationLogTab', scope.row)"><i class="nz-icon nz-icon-view1"></i></button>-->
|
||||
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
|
||||
<div class="table-operation-item table-operation-item--more">
|
||||
<span>…</span><i class="nz-icon nz-icon-arrow-down"></i>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="['edit', scope.row]"><i class="nz-icon nz-icon-edit"></i><span class="operation-dropdown-text">{{$t('overall.edit')}}</span></el-dropdown-item>
|
||||
<!-- <el-dropdown-item :command="['edit', scope.row]"><i class="nz-icon nz-icon-edit"></i><span class="operation-dropdown-text">{{$t('overall.edit')}}</span></el-dropdown-item>-->
|
||||
<el-dropdown-item :command="['delete', scope.row]" :disabled="scope.row.id === 1"><i class="nz-icon nz-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -88,19 +89,19 @@ export default {
|
||||
prop: 'id',
|
||||
show: true,
|
||||
width: 80,
|
||||
sortable:'custom'
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('config.model.name'),
|
||||
prop: 'name',
|
||||
show: true,
|
||||
width: 160,
|
||||
sortable:'custom'
|
||||
width: 450,
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('config.model.brand'),
|
||||
prop: 'brand',
|
||||
show: true,
|
||||
width: 160
|
||||
,sortable:'custom'
|
||||
width: 160,
|
||||
sortable: 'custom'
|
||||
}, {
|
||||
label: this.$t('config.model.remark'),
|
||||
prop: 'remark',
|
||||
@@ -110,7 +111,7 @@ export default {
|
||||
prop: 'assetNum',
|
||||
show: true,
|
||||
width: 200,
|
||||
sortable:'custom'
|
||||
sortable: 'custom'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -118,7 +119,7 @@ export default {
|
||||
methods: {
|
||||
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
},
|
||||
computed: {
|
||||
|
||||
|
||||
@@ -10,30 +10,34 @@
|
||||
@search="search"
|
||||
>
|
||||
<template v-slot:top-tool-right>
|
||||
<button id="asset-filter" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" class="top-tool-btn margin-r-10" @click.stop="showClickSearch">
|
||||
<i class="nz-icon nz-icon-funnel"></i>
|
||||
<delete-button id="asset-list-batch-delete" v-has="'asset_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
<button id="asset-create-asset" v-has="'asset_add'" :title="$t('overall.createAsset')" class="top-tool-btn" @click.stop="add">
|
||||
<i class="nz-icon nz-icon-create-square"></i>
|
||||
</button>
|
||||
<export-excel
|
||||
ref="export"
|
||||
id="asset-list"
|
||||
:params="searchLabel"
|
||||
:permissions="{import: 'asset_add', export: 'asset_view'}"
|
||||
class="top-tool-export margin-r-10"
|
||||
export-file-name="asset"
|
||||
<top-tool-more-options
|
||||
id="model"
|
||||
:params="filter"
|
||||
:permissions="{
|
||||
import: 'asset_add',
|
||||
export: 'asset_view'
|
||||
}"
|
||||
class="top-tool-export margin-l-10 margin-r-10"
|
||||
export-file-name="chart"
|
||||
export-url="/asset/asset/export"
|
||||
import-url="/asset/asset/import"
|
||||
@afterImport="getTableData"
|
||||
>
|
||||
<template slot="optionZone">
|
||||
<button id="asset-create-asset" v-has="'asset_add'" :title="$t('overall.createAsset')" class="top-tool-btn" @click.stop="add">
|
||||
<i class="nz-icon nz-icon-create-square"></i>
|
||||
</button>
|
||||
<template v-slot:before>
|
||||
<div>
|
||||
<el-dropdown-item>
|
||||
<div id="asset-batch-asset" v-has="'asset_edit'" @click.stop="batchEdit"><i class="nz-icon nz-icon-batch-edit"></i>{{$t('overall.batchEdit')}}</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<div id="asset-filte" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" v-has="'asset_edit'" @click.stop="showClickSearch"><i class="nz-icon nz-icon-funnel"></i>{{$t('overall.searchCondition')}}</div>
|
||||
</el-dropdown-item>
|
||||
</div>
|
||||
</template>
|
||||
</export-excel>
|
||||
<button id="asset-batch-asset" v-has="'asset_edit'" :title="$t('overall.batchEdit')" class="top-tool-btn margin-r-10" @click.stop="batchEdit">
|
||||
<i class="nz-icon nz-icon-batch-edit"></i>
|
||||
</button>
|
||||
<delete-button id="asset-list-batch-delete" v-has="'asset_delete'" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
||||
</top-tool-more-options>
|
||||
</template>
|
||||
<template v-slot:search>
|
||||
<click-search ref="clickSearch" :select-value.sync="selectValue" :title-search-list="titleSearchList" @reload="reloadTable"/>
|
||||
@@ -85,7 +89,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import exportXLSX from '@/components/common/exportXLSX'
|
||||
import deleteButton from '@/components/common/deleteButton'
|
||||
import assetBox from '@/components/common/rightBox/asset/assetBox'
|
||||
import assetBatchEditBox from '@/components/common/rightBox/asset/assetBatchEditBox'
|
||||
@@ -93,6 +96,7 @@ import nzDataList from '@/components/common/table/nzDataList'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import assetTable from '@/components/common/table/asset/assetTable'
|
||||
import clickSearch from '@/components/common/labelFilter/clickSearch'
|
||||
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
||||
|
||||
export default {
|
||||
name: 'asset',
|
||||
@@ -103,7 +107,7 @@ export default {
|
||||
assetBatchEditBox,
|
||||
assetTable,
|
||||
clickSearch,
|
||||
'export-excel': exportXLSX
|
||||
topToolMoreOptions
|
||||
},
|
||||
mixins: [dataListMixin],
|
||||
data () {
|
||||
|
||||
@@ -458,7 +458,7 @@ const tooltipPieOption = {
|
||||
{
|
||||
type: 'pie',
|
||||
animation: false,
|
||||
center: ['25%', '60%'],
|
||||
center: ['25%', '53%'],
|
||||
radius: [36, 48],
|
||||
data: [],
|
||||
label: {
|
||||
|
||||
@@ -621,6 +621,9 @@
|
||||
padding-bottom: 5px;
|
||||
box-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.12), -1px 1px 4px -1px rgba(205, 205, 205, 0.47);
|
||||
}
|
||||
#tooltip-chart--endpoint{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.over-num{
|
||||
|
||||
Reference in New Issue
Block a user