NEZ-2196 feat:Endpoint批量导入页面开发
This commit is contained in:
@@ -1215,6 +1215,7 @@ li {
|
|||||||
}
|
}
|
||||||
.result-success-txt{
|
.result-success-txt{
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
color: $--color-text-primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.result-body{
|
.result-body{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="importBox.type!=3" destroy-on-close :show-close="true" :title="importBox.title" :visible.sync="importBox.show" :width="importBox.width" append-to-body class="nz-dialog" @close="closeDialog">
|
<el-dialog :close-on-click-modal="importBox.type!=3" destroy-on-close :show-close="true" :title="importBox.title" :visible.sync="importBox.show" :width="importBox.width" append-to-body class="nz-dialog" @close="closeDialog">
|
||||||
|
|
||||||
<!-- 新版导入 -->
|
<!-- 新版导入 -->
|
||||||
<div v-if="importBox.type == 1&&importType">
|
<div v-if="importBox.type == 1&&importType">
|
||||||
<div class="upload-body">
|
<div class="upload-body">
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="footer">
|
<div class="footer">
|
||||||
<div class="el-message-box__btns" style="text-align: right;">
|
<div class="el-message-box__btns" style="text-align: right;">
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
@@ -82,6 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 导入 -->
|
<!-- 导入 -->
|
||||||
<div v-else-if="importBox.type == 1">
|
<div v-else-if="importBox.type == 1">
|
||||||
<div class="upload-body">
|
<div class="upload-body">
|
||||||
@@ -170,7 +172,7 @@
|
|||||||
<div class="result-success-txt">{{$t('overall.result.successfully')}}</div>
|
<div class="result-success-txt">{{$t('overall.result.successfully')}}</div>
|
||||||
<div class="result-success-txt">
|
<div class="result-success-txt">
|
||||||
{{$t('overall.result.imported')}}
|
{{$t('overall.result.imported')}}
|
||||||
<span style="color: #333333" v-if="importResult">{{importResult.successNum}}</span>
|
<span v-if="importResult">{{importResult.successNum}}</span>
|
||||||
{{$t('overall.result.records')}}
|
{{$t('overall.result.records')}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -238,26 +240,31 @@ export default {
|
|||||||
language () { return this.$store.getters.getLanguage },
|
language () { return this.$store.getters.getLanguage },
|
||||||
// 显示新版导入
|
// 显示新版导入
|
||||||
importType () {
|
importType () {
|
||||||
const arr = ['/asset/asset/import', '/monitor/module/import']
|
// asset module endpoint
|
||||||
|
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import']
|
||||||
return arr.some(item => item === this.importUrl)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 已存在的内容处理方式
|
// 已存在的内容处理方式
|
||||||
showEexisted () {
|
showEexisted () {
|
||||||
const arr = ['/asset/asset/import', '/monitor/module/import']
|
// asset module endpoint
|
||||||
|
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import']
|
||||||
return arr.some(item => item === this.importUrl)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 遇到错误是否继续导入
|
// 遇到错误是否继续导入
|
||||||
showIgnoreError () {
|
showIgnoreError () {
|
||||||
const arr = ['/asset/asset/import', '/monitor/module/import']
|
// asset module endpoint
|
||||||
|
const arr = ['/asset/asset/import', '/monitor/module/import', '/monitor/endpoint/import']
|
||||||
return arr.some(item => item === this.importUrl)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 是否同步更新关联的dashboard
|
// 是否同步更新关联的dashboard
|
||||||
showSyncDashboard () {
|
showSyncDashboard () {
|
||||||
const arr = ['/asset/asset/import']
|
// asset endpoint
|
||||||
|
const arr = ['/asset/asset/import', '/monitor/endpoint/import']
|
||||||
return arr.some(item => item === this.importUrl)
|
return arr.some(item => item === this.importUrl)
|
||||||
},
|
},
|
||||||
// 是否同步更新关联的endpoint
|
// 是否同步更新关联的endpoint
|
||||||
showSyncEndpoint () {
|
showSyncEndpoint () {
|
||||||
|
// asset module
|
||||||
const arr = ['/asset/asset/import', '/monitor/module/import']
|
const arr = ['/asset/asset/import', '/monitor/module/import']
|
||||||
return arr.some(item => item === this.importUrl)
|
return arr.some(item => item === this.importUrl)
|
||||||
}
|
}
|
||||||
@@ -673,16 +680,13 @@ export default {
|
|||||||
const split = '-'
|
const split = '-'
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
const year = date.getFullYear()
|
const year = date.getFullYear()
|
||||||
const month = this.formatNum(date.getMonth() + 1)
|
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
const day = this.formatNum(date.getDate())
|
const day = String(date.getDate()).padStart(2, '0')
|
||||||
const hours = this.formatNum(date.getHours())
|
const hours = String(date.getHours()).padStart(2, '0')
|
||||||
const minutes = this.formatNum(date.getMinutes())
|
const minutes = String(date.getMinutes()).padStart(2, '0')
|
||||||
const seconds = this.formatNum(date.getSeconds())
|
const seconds = String(date.getSeconds()).padStart(2, '0')
|
||||||
return year + split + month + split + day + ' ' + hours + split + minutes + split + seconds
|
return year + split + month + split + day + ' ' + hours + split + minutes + split + seconds
|
||||||
},
|
},
|
||||||
formatNum (num) {
|
|
||||||
return num > 9 ? num : '0' + num
|
|
||||||
},
|
|
||||||
editPanel () {
|
editPanel () {
|
||||||
this.$get('visual/panel/' + this.params.panelId).then(res => {
|
this.$get('visual/panel/' + this.params.panelId).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -744,6 +748,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -86,8 +86,7 @@
|
|||||||
<button id="asset-filter" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" class="top-tool-btn margin-r-10" @click.stop="showClickSearch" :title="$t('dashboard.panel.chartForm.filter')">
|
<button id="asset-filter" :class="{ 'is-focus': dataListLayout.indexOf('clickSearch') > -1 }" class="top-tool-btn margin-r-10" @click.stop="showClickSearch" :title="$t('dashboard.panel.chartForm.filter')">
|
||||||
<i class="nz-icon nz-icon-funnel"></i>
|
<i class="nz-icon nz-icon-funnel"></i>
|
||||||
</button>
|
</button>
|
||||||
<button id="account-add" v-has="'monitor_endpoint_add'" :title="$t('overall.createEndpoint')" class="top-tool-btn"
|
<button id="account-add" v-has="'monitor_endpoint_add'" :title="$t('overall.createEndpoint')" class="top-tool-btn" type="button" @click="add">
|
||||||
type="button" @click="add">
|
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<top-tool-more-options
|
<top-tool-more-options
|
||||||
@@ -179,11 +178,15 @@
|
|||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<batchAddEndpoint v-if="rightBox.batchAdd" @close="closeRightBatchAdd"></batchAddEndpoint>
|
<batchAddEndpoint v-if="rightBox.batchAdd" @close="closeRightBatchAdd"></batchAddEndpoint>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box"><alert-silence-box v-if='silenceBoxShow' :alert-silence="objectSilence" @close="closeSilenceBox"></alert-silence-box></transition>
|
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<batchEditEndpoint v-if="rightBox.batchShow"
|
<alert-silence-box v-if='silenceBoxShow' :alert-silence="objectSilence" @close="closeSilenceBox"></alert-silence-box>
|
||||||
|
</transition>
|
||||||
|
<transition name="right-box">
|
||||||
|
<batchEditEndpoint
|
||||||
|
v-if="rightBox.batchShow"
|
||||||
@close="closeRightBatchModify"
|
@close="closeRightBatchModify"
|
||||||
@refresh="getTableData"></batchEditEndpoint>
|
@refresh="getTableData">
|
||||||
|
</batchEditEndpoint>
|
||||||
</transition>
|
</transition>
|
||||||
<el-dialog :close-on-click-modal="false" :show-close="true" destroy-on-close :title='$t("overall.batchAddEndpoint")' :visible.sync="importBoxShow" :width="'600px'" append-to-body class="nz-dialog" @close="closeDialog">
|
<el-dialog :close-on-click-modal="false" :show-close="true" destroy-on-close :title='$t("overall.batchAddEndpoint")' :visible.sync="importBoxShow" :width="'600px'" append-to-body class="nz-dialog" @close="closeDialog">
|
||||||
<div class="upload-body result-body">
|
<div class="upload-body result-body">
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
@search="search"
|
@search="search"
|
||||||
>
|
>
|
||||||
<template v-slot:top-tool-right>
|
<template v-slot:top-tool-right>
|
||||||
<button id="account-add" v-has="'project_add'" :title="$t('overall.createProject')" class="top-tool-btn margin-r-10"
|
<button id="account-add" v-has="'project_add'" :title="$t('overall.createProject')" class="top-tool-btn margin-r-10" type="button" @click="add">
|
||||||
type="button" @click="add">
|
|
||||||
<i class="nz-icon-create-square nz-icon"></i>
|
<i class="nz-icon-create-square nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<delete-button
|
<delete-button
|
||||||
@@ -52,8 +51,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:pagination>
|
<template v-slot:pagination>
|
||||||
<div class="project-page">
|
<div class="project-page">
|
||||||
<Pagination ref="Pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo'
|
<Pagination ref="Pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
|
||||||
@pageSize='pageSize'></Pagination>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</nz-data-list>
|
</nz-data-list>
|
||||||
|
|||||||
Reference in New Issue
Block a user