fix:解决冲突

This commit is contained in:
zyh
2023-03-08 18:14:51 +08:00
6 changed files with 41 additions and 21 deletions

View File

@@ -155,6 +155,8 @@
<transition name="right-box"> <transition name="right-box">
<chart-temp-box v-if="rightBox.chartTemp.show" :from="from" :obj="chart" :panel-data="panelData" :show-panel="showPanel" @close="closeRightBox" @on-create-success="createSuccess"></chart-temp-box> <chart-temp-box v-if="rightBox.chartTemp.show" :from="from" :obj="chart" :panel-data="panelData" :show-panel="showPanel" @close="closeRightBox" @on-create-success="createSuccess"></chart-temp-box>
</transition> </transition>
<!-- 快照进度 -->
<snapshotProgress v-if="snapshotVisible" :showPanel="showPanel" :searchTime="searchTime" :snapshotVisible.sync="snapshotVisible"></snapshotProgress>
</div> </div>
</template> </template>
@@ -175,6 +177,8 @@ import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
import htmlToPdfMixin from '@/components/common/mixin/htmlToPdfMixin' import htmlToPdfMixin from '@/components/common/mixin/htmlToPdfMixin'
import exportHtmlMixin from '@/components/common/mixin/exportHtml' import exportHtmlMixin from '@/components/common/mixin/exportHtml'
import panelVariables from '@/components/common/panel/panelVariables' import panelVariables from '@/components/common/panel/panelVariables'
import snapshotProgress from '@/components/common/snapshotProgress/snapshotProgress.vue'
export default { export default {
name: 'panelTabNew', name: 'panelTabNew',
mixins: [subDataListMixin, detailViewRightMixin, htmlToPdfMixin, exportHtmlMixin], mixins: [subDataListMixin, detailViewRightMixin, htmlToPdfMixin, exportHtmlMixin],
@@ -311,7 +315,8 @@ export default {
nowTimeType: {}, nowTimeType: {},
chartDetailInfo: {}, chartDetailInfo: {},
variables: [], variables: [],
variablesInit: false variablesInit: false,
snapshotVisible: false
} }
}, },
components: { components: {
@@ -320,7 +325,8 @@ export default {
nzBottomDataList, nzBottomDataList,
topToolMoreOptions, topToolMoreOptions,
chartTempBox, chartTempBox,
panelVariables // 处理panel变量的组件 panelVariables, // 处理panel变量的组件
snapshotProgress // 快照进度
}, },
methods: { methods: {
// 刷新 // 刷新
@@ -844,7 +850,7 @@ export default {
if (type === 'PDF') { if (type === 'PDF') {
this.htmlToPdf() this.htmlToPdf()
} else { } else {
this.exportToHtml(this.obj.name) this.snapshotVisible = true
} }
}, },
getPanelData () { getPanelData () {

View File

@@ -108,7 +108,7 @@
<div class="export-box"> <div class="export-box">
<span class="export-title">{{$t('export.records')}}</span> <span class="export-title">{{$t('export.records')}}</span>
<el-radio-group v-model="importBox.record" size="small"> <el-radio-group v-model="importBox.record" size="small">
<el-radio-button :label="item.value" v-for="(item,index) in recordArr" :key="index" :disabled="item.value==='records'&&!deleteObjs.length"> <el-radio-button :label="item.value" v-for="(item,index) in recordArr" :key="index" :disabled="(item.value==='records'&&!deleteObjs.length) || (item.value==='all'&&assetOrEndpoint)">
{{item.name}} {{item.name}}
<span v-if="item.value==='records'&&deleteObjs.length">({{deleteObjs.length}})</span> <span v-if="item.value==='records'&&deleteObjs.length">({{deleteObjs.length}})</span>
</el-radio-button> </el-radio-button>
@@ -276,7 +276,7 @@ export default {
exportBoxShow: { exportBoxShow: {
type: Boolean, default: false type: Boolean, default: false
}, },
type:String type: String
}, },
computed: { computed: {
language () { return this.$store.getters.getLanguage }, language () { return this.$store.getters.getLanguage },
@@ -284,6 +284,10 @@ export default {
isDashboard () { isDashboard () {
return this.importUrl === '/visual/panel/import' return this.importUrl === '/visual/panel/import'
}, },
// assetendpoint dashboard导出选项不支持 all data
assetOrEndpoint () {
return this.paramsType === 'asset' || this.paramsType === 'endpoint'
},
// 是否同步更新关联的dashboard // 是否同步更新关联的dashboard
showSyncDashboard () { showSyncDashboard () {
// asset endpoint model // asset endpoint model
@@ -648,7 +652,7 @@ export default {
if (this.paramsType) { if (this.paramsType) {
params.type = this.paramsType params.type = this.paramsType
} }
if (params.from == 'asset') { if (this.assetOrEndpoint) {
delete params.type delete params.type
delete params.from delete params.from
} }
@@ -702,6 +706,10 @@ export default {
showImportBox (type) { showImportBox (type) {
this.importBox.show = true this.importBox.show = true
this.importBox.type = type this.importBox.type = type
if (this.assetOrEndpoint) {
this.importBox.record = 'current'
}
// isDashboard 只支持JSON // isDashboard 只支持JSON
if (this.isDashboard) { if (this.isDashboard) {
this.importBox.format = 3 this.importBox.format = 3

View File

@@ -194,7 +194,8 @@
<!-- 选择资产穿梭框 --> <!-- 选择资产穿梭框 -->
<div class="form__sub-title">{{$t('overall.select')}}</div> <div class="form__sub-title">{{$t('overall.select')}}</div>
<div style="position: relative"> <div style="position: relative">
<nz-transfer ref="transfer" <nz-transfer
ref="transfer"
:showError="showError" :showError="showError"
style="margin-bottom: 20px;" style="margin-bottom: 20px;"
:page-obj="transfer.pageObj" :page-obj="transfer.pageObj"
@@ -446,6 +447,10 @@ export default {
if (this.editData.editType === assetConstants.editTypeData.account) { if (this.editData.editType === assetConstants.editTypeData.account) {
searchLabel.authProtocol = this.editData.authProtocol searchLabel.authProtocol = this.editData.authProtocol
} }
// type为SNMP时 筛选掉不支持SNMP的资产
if (this.editData.editType === assetConstants.editTypeData.snmpCredential) {
searchLabel.snmpEnable = 1
}
this.$get(this.url, { ...searchLabel, ...this.transfer.pageObj }).then(response => { this.$get(this.url, { ...searchLabel, ...this.transfer.pageObj }).then(response => {
this.$refs.transfer.endLoading() this.$refs.transfer.endLoading()
if (response.code === 200) { if (response.code === 200) {
@@ -489,7 +494,7 @@ export default {
if (n !== assetConstants.editTypeData.account) { if (n !== assetConstants.editTypeData.account) {
this.editData.authProtocol = 1 this.editData.authProtocol = 1
} else { } else {
this.getTableData() // this.getTableData()
} }
} }
} }

View File

@@ -18,10 +18,11 @@
class="form-item--half-width" class="form-item--half-width"
prop="type" prop="type"
> >
<!-- group 类型编辑时类型不允许修改 -->
<el-select <el-select
id="chart-box-type" id="chart-box-type"
v-model="chartConfig.type" v-model="chartConfig.type"
:disabled="!!(chartConfig.type==='group'&&chartConfig.children&&chartConfig.children.length)" :disabled="!!(chartConfig.type==='group'&&chartConfig.id)"
:placeholder="$t('el.select.placeholder')" :placeholder="$t('el.select.placeholder')"
popper-class="right-box-select-top prevent-clickoutside" popper-class="right-box-select-top prevent-clickoutside"
size="small" size="small"

View File

@@ -7,7 +7,7 @@
<span @click="split"><i class="nz-icon nz-icon-close" :title="$t('overall.close')"></i></span> <span @click="split"><i class="nz-icon nz-icon-close" :title="$t('overall.close')"></i></span>
</div> </div>
<!-- 顶部工具栏 --> <!-- 顶部工具栏 -->
<div class="top-tools" style="z-index: 1"> <div class="top-tools" style="z-index: 2001;position:relative;">
<el-row class="block-col-2" style="width: 300px;"> <el-row class="block-col-2" style="width: 300px;">
<el-col> <el-col>
<el-dropdown trigger="click"> <el-dropdown trigger="click">

View File

@@ -11,7 +11,7 @@
</li> </li>
</ul> </ul>
<!-- Available Integration --> <!-- Available Integration -->
<p class="integration-title" style="margin-top:20px;">{{$t('integration.availableIntegration')}}</p> <p class="integration-title" v-if="dataList.length" style="margin-top:20px;">{{$t('integration.availableIntegration')}}</p>
<ul class="integration-list"> <ul class="integration-list">
<li class="integration-item" v-for="item in dataList" :key="item.id" @click="details(item)"> <li class="integration-item" v-for="item in dataList" :key="item.id" @click="details(item)">
<img class="integration-icon" :src="item.icon" alt=""> <img class="integration-icon" :src="item.icon" alt="">