feat:使用向导完善
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
custom-class="guild-pop"
|
custom-class="guild-pop"
|
||||||
width="1000px"
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
>
|
>
|
||||||
<div class="guide-list">
|
<div class="guide-list">
|
||||||
<div ref="guideShadow" class="guide-shadow"></div>
|
<div ref="guideShadow" class="guide-shadow"></div>
|
||||||
@@ -119,7 +120,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
close () {
|
close () {
|
||||||
this.visible = false
|
this.$emit('close')
|
||||||
},
|
},
|
||||||
enter (index) {
|
enter (index) {
|
||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
@@ -130,13 +131,27 @@ export default {
|
|||||||
this.interval && clearInterval(this.interval)
|
this.interval && clearInterval(this.interval)
|
||||||
},
|
},
|
||||||
downloadAgent () {
|
downloadAgent () {
|
||||||
// TODO
|
this.$emit('close')
|
||||||
|
this.$router.push({
|
||||||
|
path: '/agent',
|
||||||
|
query: {
|
||||||
|
t: +new Date(),
|
||||||
|
download: 'agent'
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
openTerminal () {
|
openTerminal () {
|
||||||
// TODO
|
this.$emit('close')
|
||||||
|
this.$router.push({
|
||||||
|
path: '/asset',
|
||||||
|
query: {
|
||||||
|
t: +new Date()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$store.commit('openConsole')
|
||||||
},
|
},
|
||||||
jump (route) {
|
jump (route) {
|
||||||
this.visible = false
|
this.$emit('close')
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: route,
|
path: route,
|
||||||
query: {
|
query: {
|
||||||
@@ -145,7 +160,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
jumpAndOpen (cmd, open) {
|
jumpAndOpen (cmd, open) {
|
||||||
this.visible = false
|
this.$emit('close')
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case 'dc': {
|
case 'dc': {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -177,6 +192,16 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case 'importAsset': {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/asset',
|
||||||
|
query: {
|
||||||
|
t: +new Date(),
|
||||||
|
importAsset: 'importAsset'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
case 'project': {
|
case 'project': {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/monitor/project',
|
path: '/monitor/project',
|
||||||
@@ -207,6 +232,16 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case 'importEndpoint': {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/monitor/endpoint',
|
||||||
|
query: {
|
||||||
|
t: +new Date(),
|
||||||
|
importEndpoint: 'importEndpoint'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
case 'panel': {
|
case 'panel': {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/panel',
|
path: '/panel',
|
||||||
@@ -237,12 +272,24 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case 'cabinet': {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/dc',
|
||||||
|
query: {
|
||||||
|
t: +new Date(),
|
||||||
|
add: 'cabinet'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
}
|
||||||
default: break
|
default: break
|
||||||
}
|
}
|
||||||
|
// location.reload()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
showDialog (n) {
|
showDialog (n) {
|
||||||
|
console.log(n)
|
||||||
this.visible = n
|
this.visible = n
|
||||||
},
|
},
|
||||||
activeIndex (n) {
|
activeIndex (n) {
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="right-box right-box-cabinet" v-clickoutside="{obj:editCabinet,func:clickOutside}">
|
<div class="right-box right-box-cabinet" v-clickoutside="{obj:editCabinet,func:clickOutside}">
|
||||||
<!-- begin--顶部按钮-->
|
<!-- <!– begin--顶部按钮–>-->
|
||||||
<div class="right-box-top-btns right-box-form-delete">
|
<!-- <div class="right-box-top-btns right-box-form-delete">-->
|
||||||
<button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="cab-del" type="button" v-has="'dc_cabinet_delete'" v-if="!editCabinet.id">
|
<!-- <button @click="del" class="nz-btn nz-btn-size-normal nz-btn-size-alien" id="cab-del" type="button" v-has="'dc_cabinet_delete'" v-if="!editCabinet.id">-->
|
||||||
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>
|
<!-- <span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-delete"></i></span>-->
|
||||||
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
<!-- <span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>-->
|
||||||
</button>
|
<!-- </button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<!-- end--顶部按钮-->
|
<!-- <!– end--顶部按钮–>-->
|
||||||
|
|
||||||
<!-- begin--标题-->
|
<!-- begin--标题-->
|
||||||
<div class="right-box-title">{{editCabinet.id ? $t("config.dc.editCabinet") : $t("overall.createCabinet")}}</div>
|
<div class="right-box__header">
|
||||||
|
<div class="header__title">{{editCabinet.id ? $t("config.dc.editCabinet") : $t("overall.createCabinet")}}</div>
|
||||||
|
<div class="header__operation">
|
||||||
|
<span v-cancel="{obj: editCabinet, func: esc}"><i class="nz-icon nz-icon-close"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- end--标题-->
|
<!-- end--标题-->
|
||||||
|
|
||||||
<!-- begin--表单-->
|
<!-- begin--表单-->
|
||||||
@@ -20,10 +25,13 @@
|
|||||||
<el-input size='mini' v-model="editCabinet.name" id="cabinet-box-input-name"/>
|
<el-input size='mini' v-model="editCabinet.name" id="cabinet-box-input-name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.dc.dc')" prop="idcId">
|
<el-form-item :label="$t('config.dc.dc')" prop="idcId">
|
||||||
<el-input size='mini' v-model="currentDc.name" disabled id="cabinet-box-input-dc"/>
|
<el-input v-if="dcDisabled" size='mini' v-model="currentDc.name" disabled id="cabinet-box-input-dc"/>
|
||||||
|
<el-select v-if="!dcDisabled" size='mini' v-model="editCabinet.idcId" id="cabinet-box-input-dc" :popper-class="'no-style-class'">
|
||||||
|
<el-option v-for="dc in dcData" :key="dc.id" :value="dc.id" :label="dc.name"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.uSize')" prop="uSize">
|
<el-form-item :label="$t('asset.uSize')" prop="uSize">
|
||||||
<el-input v-model.number="editCabinet.uSize" :max="47" id="cabinet-box-input-uSize"></el-input>
|
<el-input v-model.number="editCabinet.uSize" :max="47" size="small" id="cabinet-box-input-uSize"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('config.dc.remark')">
|
<el-form-item :label="$t('config.dc.remark')">
|
||||||
<el-input size='mini' v-model="editCabinet.remark" type="textarea" :rows="2" id="cabinet-box-input-remark"/>
|
<el-input size='mini' v-model="editCabinet.remark" type="textarea" :rows="2" id="cabinet-box-input-remark"/>
|
||||||
@@ -48,15 +56,23 @@ export default {
|
|||||||
name: 'cabinetBox',
|
name: 'cabinetBox',
|
||||||
props: {
|
props: {
|
||||||
obj: { type: Object },
|
obj: { type: Object },
|
||||||
currentDc: { type: Object }
|
currentDc: { type: Object },
|
||||||
|
dcDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
editCabinet: {},
|
editCabinet: {},
|
||||||
|
dcData: '',
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
|
idcId: [
|
||||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
||||||
|
],
|
||||||
uSize: [
|
uSize: [
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||||
{ type: 'number', min: 1, max: 47, message: this.$t('validate.uSize'), trigger: 'blur' }
|
{ type: 'number', min: 1, max: 47, message: this.$t('validate.uSize'), trigger: 'blur' }
|
||||||
@@ -75,9 +91,12 @@ export default {
|
|||||||
save () {
|
save () {
|
||||||
if (this.prevent_opt.save) { return } ;
|
if (this.prevent_opt.save) { return } ;
|
||||||
this.prevent_opt.save = true
|
this.prevent_opt.save = true
|
||||||
|
if (!this.editCabinet.idcId) {
|
||||||
|
this.editCabinet.idcId = this.currentDc.id
|
||||||
|
}
|
||||||
this.$refs.cabinetForm.validate(valid => {
|
this.$refs.cabinetForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.editCabinet.idcId = this.currentDc.id
|
this.editCabinet.dcId = this.currentDc.id || this.editCabinet.idcId
|
||||||
if (this.editCabinet.id) {
|
if (this.editCabinet.id) {
|
||||||
this.$put('/dc/cabinet', this.editCabinet).then(res => {
|
this.$put('/dc/cabinet', this.editCabinet).then(res => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
@@ -125,6 +144,11 @@ export default {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.prevent_opt.save = false
|
this.prevent_opt.save = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getDcData () {
|
||||||
|
this.$get('dc', { pageSize: -1 }).then(res => {
|
||||||
|
this.dcData = res.data.list
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -137,6 +161,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
if (!this.dcDisabled) {
|
||||||
|
this.getDcData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
url: '/panel',
|
url: 'visual/panel',
|
||||||
editPanel: {},
|
editPanel: {},
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
<change-password :cur-user="username" :show-dialog="showChangePin" @click="showPinDialog" @dialogClosed="dialogClosed"></change-password>
|
||||||
<guide :show-dialog="showGuide" @dialogClosed="dialogClosed"></guide>
|
<guide :show-dialog="showGuide" @dialogClosed="dialogClosed" @close="showGuide = false"></guide>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 是否弹出侧滑
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'alertRule') {
|
if (add === 'alertRule') {
|
||||||
@@ -170,5 +174,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<i class="nz-icon nz-icon-funnel"></i>
|
<i class="nz-icon nz-icon-funnel"></i>
|
||||||
</button>
|
</button>
|
||||||
<export-excel
|
<export-excel
|
||||||
|
ref="export"
|
||||||
id="asset-list"
|
id="asset-list"
|
||||||
:params="searchLabel"
|
:params="searchLabel"
|
||||||
:permissions="{import: 'asset_add', export: 'asset_view'}"
|
:permissions="{import: 'asset_add', export: 'asset_view'}"
|
||||||
@@ -434,14 +435,26 @@ export default {
|
|||||||
this.getSearchableMetaData()
|
this.getSearchableMetaData()
|
||||||
this.getSnmpCredentialData()
|
this.getSnmpCredentialData()
|
||||||
this.getFieldGroupData()
|
this.getFieldGroupData()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
|
const importAsset = this.$route.query.importAsset
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'asset') {
|
if (add === 'asset') {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (importAsset) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.export.showImportBox(1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -270,13 +270,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
|
const download = this.$route.query.download
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'agent') {
|
if (add === 'agent') {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (download) {
|
||||||
|
this.toDownloadAgent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -39,10 +39,14 @@
|
|||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<dc-box v-if="rightBox.show" :obj="object" :user-data="userData" @close="closeRightBox" @reload="getTableData"></dc-box>
|
<dc-box v-if="rightBox.show" :obj="object" :user-data="userData" @close="closeRightBox" @reload="getTableData"></dc-box>
|
||||||
</transition>
|
</transition>
|
||||||
|
<transition name="right-box">
|
||||||
|
<cabinetBox v-if="cabinetBoxShow" :obj="cabinet" :current-dc="{}" @close="closeRightBox" :dcDisabled="false" @reload="getTableData"></cabinetBox>
|
||||||
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import dcBox from '@/components/common/rightBox/dcBox' // dc弹框
|
import dcBox from '@/components/common/rightBox/dcBox' // dc弹框
|
||||||
|
import cabinetBox from '@/components/common/rightBox/cabinetBox' // dc弹框
|
||||||
import trafficSettingBox from '@/components/common/rightBox/trafficSetting/trafficSettingBox'
|
import trafficSettingBox from '@/components/common/rightBox/trafficSetting/trafficSettingBox'
|
||||||
import deleteButton from '@/components/common/deleteButton'
|
import deleteButton from '@/components/common/deleteButton'
|
||||||
import nzDataList from '@/components/common/table/nzDataList'
|
import nzDataList from '@/components/common/table/nzDataList'
|
||||||
@@ -55,7 +59,8 @@ export default {
|
|||||||
dcBox,
|
dcBox,
|
||||||
deleteButton,
|
deleteButton,
|
||||||
nzDataList,
|
nzDataList,
|
||||||
dcTable
|
dcTable,
|
||||||
|
cabinetBox
|
||||||
},
|
},
|
||||||
mixins: [dataListMixin],
|
mixins: [dataListMixin],
|
||||||
data () {
|
data () {
|
||||||
@@ -72,6 +77,14 @@ export default {
|
|||||||
longitude: undefined,
|
longitude: undefined,
|
||||||
latitude: undefined
|
latitude: undefined
|
||||||
},
|
},
|
||||||
|
cabinet: {
|
||||||
|
id: '',
|
||||||
|
idcId: '',
|
||||||
|
name: '',
|
||||||
|
remark: '',
|
||||||
|
seq: '',
|
||||||
|
uSize: 1
|
||||||
|
},
|
||||||
searchMsg: { // 给搜索框子组件传递的信息
|
searchMsg: { // 给搜索框子组件传递的信息
|
||||||
zheze_none: true,
|
zheze_none: true,
|
||||||
searchLabelList: [
|
searchLabelList: [
|
||||||
@@ -102,7 +115,8 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
regNum: /^[0-9]+.?[0-9]*/,
|
regNum: /^[0-9]+.?[0-9]*/,
|
||||||
userData: []
|
userData: [],
|
||||||
|
cabinetBoxShow: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -129,16 +143,37 @@ export default {
|
|||||||
},
|
},
|
||||||
regNumTest (val) { // 校验是否是数字
|
regNumTest (val) { // 校验是否是数字
|
||||||
return this.regNum.test(val)
|
return this.regNum.test(val)
|
||||||
|
},
|
||||||
|
addCabinet () {
|
||||||
|
this.cabinetBoxShow = true
|
||||||
|
},
|
||||||
|
closeRightBox (refresh) {
|
||||||
|
this.rightBox.show = false
|
||||||
|
this.cabinetBoxShow = false
|
||||||
|
if (refresh) {
|
||||||
|
this.delFlag = true
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getUserData()
|
this.getUserData()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'dc') {
|
if (add === 'dc') {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
|
if (add === 'cabinet') {
|
||||||
|
this.addCabinet()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,23 +18,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:top-tool-right>
|
<template v-slot:top-tool-right>
|
||||||
<export-excel
|
<!-- <export-excel-->
|
||||||
id="expression-template-list"
|
<!-- id="expression-template-list"-->
|
||||||
export-url="expression/tmpl/export"
|
<!-- export-url="expression/tmpl/export"-->
|
||||||
import-url="expression/tmpl/import"
|
<!-- import-url="expression/tmpl/import"-->
|
||||||
export-file-name="expression-template"
|
<!-- export-file-name="expression-template"-->
|
||||||
:params="searchLabel"
|
<!-- :params="searchLabel"-->
|
||||||
:permissions="{import: 'expressionTemplate_add', export: 'expressionTemplate_view'}"
|
<!-- :permissions="{import: 'expressionTemplate_add', export: 'expressionTemplate_view'}"-->
|
||||||
@afterImport="getTableData"
|
<!-- @afterImport="getTableData"-->
|
||||||
class="top-tool-export margin-r-10"
|
<!-- class="top-tool-export margin-r-10"-->
|
||||||
>
|
<!-- >-->
|
||||||
<template slot="optionZone">
|
<!-- <template slot="optionZone">-->
|
||||||
<button id="expr-tmpl-list-export" v-has="'expressionTemplate_add'" :title="$t('overall.createTemplate')" class="top-tool-btn"
|
<!-- -->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </export-excel>-->
|
||||||
|
<button id="expr-tmpl-list-export" v-has="'expressionTemplate_add'" :title="$t('overall.createTemplate')" class="top-tool-btn margin-r-10"
|
||||||
type="button" @click="add">
|
type="button" @click="add">
|
||||||
<i class="nz-icon nz-icon-create-square"></i>
|
<i class="nz-icon nz-icon-create-square"></i>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
|
||||||
</export-excel>
|
|
||||||
|
|
||||||
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData"
|
<delete-button :delete-objs="batchDeleteObjs" @after="getTableData"
|
||||||
id="alert-msg-batch-delete" v-has="'expressionTemplate_delete'" :api="url"></delete-button></template>
|
id="alert-msg-batch-delete" v-has="'expressionTemplate_delete'" :api="url"></delete-button></template>
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ export default {
|
|||||||
this.expressionList[this.index] = value
|
this.expressionList[this.index] = value
|
||||||
// this.$refs.editor.setContent(value)
|
// this.$refs.editor.setContent(value)
|
||||||
this.dropDownVisible = false
|
this.dropDownVisible = false
|
||||||
this.$emit('change', value)
|
// this.$emit('change', value)
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
this.cascaderValue = ''
|
this.cascaderValue = ''
|
||||||
},
|
},
|
||||||
@@ -299,7 +299,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
expressionChange: function () {
|
expressionChange: function () {
|
||||||
this.$emit('change')
|
// this.$emit('change')
|
||||||
},
|
},
|
||||||
setError: function (errMsg) {
|
setError: function (errMsg) {
|
||||||
// console.log(errMsg)
|
// console.log(errMsg)
|
||||||
@@ -393,7 +393,7 @@ export default {
|
|||||||
this.tempBoxShow = false
|
this.tempBoxShow = false
|
||||||
// eslint-disable-next-line vue/no-mutating-props
|
// eslint-disable-next-line vue/no-mutating-props
|
||||||
this.expressionList[this.index] = params.expression
|
this.expressionList[this.index] = params.expression
|
||||||
this.$emit('change', params.expression)
|
// this.$emit('change', params.expression)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ export default {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.tempBoxShow = false
|
this.tempBoxShow = false
|
||||||
this.expressionList[this.index] = res.data.expression
|
this.expressionList[this.index] = res.data.expression
|
||||||
this.$emit('change', res.data.expression)
|
// this.$emit('change', res.data.expression)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<chart-temp-box :obj="chart" :from="$CONSTANTS.fromRoute.panel" :panel-data="panelData" :show-panel="showPanel" @close="closeChartTempBox" @on-create-success="createSuccess" v-if="rightBox.chartTemp.show"></chart-temp-box>
|
<chart-temp-box :obj="chart" :from="$CONSTANTS.fromRoute.panel" :panel-data="panelData" :show-panel="showPanel" @close="closeChartTempBox" @on-create-success="createSuccess" v-if="rightBox.chartTemp.show"></chart-temp-box>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="right-box">
|
<transition name="right-box">
|
||||||
<panel-box v-if="rightBox.panel.show" ref="panelBox" :panel="panel" @reload="panelReload" @reloadForDel="panelReloadForDel"></panel-box>
|
<panel-box v-if="rightBox.panel.show" ref="panelBox" :panel="panel" @reload="panelReload" @reloadForDel="panelReloadForDel" @close="closePanelBox" ></panel-box>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -263,6 +263,7 @@ export default {
|
|||||||
if (!this.hasButton('panel_view')) {
|
if (!this.hasButton('panel_view')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.rightBox.panel.show = true
|
||||||
this.$refs.panelBox.show(true)
|
this.$refs.panelBox.show(true)
|
||||||
this.panel = {
|
this.panel = {
|
||||||
id: '',
|
id: '',
|
||||||
@@ -331,9 +332,9 @@ export default {
|
|||||||
},
|
},
|
||||||
closePanelBox (refresh) {
|
closePanelBox (refresh) {
|
||||||
this.rightBox.panel.show = false
|
this.rightBox.panel.show = false
|
||||||
/* if (refresh) {
|
if (refresh) {
|
||||||
|
this.getTableData()
|
||||||
} */
|
}
|
||||||
},
|
},
|
||||||
// 移除图表:弹出确认框询问
|
// 移除图表:弹出确认框询问
|
||||||
delChart (data, from) {
|
delChart (data, from) {
|
||||||
@@ -779,14 +780,6 @@ export default {
|
|||||||
this.onScroll()
|
this.onScroll()
|
||||||
document.querySelector('#tableList').addEventListener('mouseenter', this.tableListEnter)
|
document.querySelector('#tableList').addEventListener('mouseenter', this.tableListEnter)
|
||||||
document.querySelector('#tableList').addEventListener('mouseleave', this.tableListLeave)
|
document.querySelector('#tableList').addEventListener('mouseleave', this.tableListLeave)
|
||||||
|
|
||||||
// 是否弹出侧滑
|
|
||||||
const add = this.$route.query.add
|
|
||||||
if (add) {
|
|
||||||
if (add === 'chart') {
|
|
||||||
this.addChart()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'filter.searchName': function (n, o) {
|
'filter.searchName': function (n, o) {
|
||||||
@@ -794,6 +787,23 @@ export default {
|
|||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
temp.search()
|
temp.search()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
},
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
|
// 是否弹出侧滑
|
||||||
|
const add = this.$route.query.add
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (add) {
|
||||||
|
if (add === 'chart') {
|
||||||
|
this.addChart()
|
||||||
|
}
|
||||||
|
if (add === 'panel') {
|
||||||
|
this.toAdd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<i class="nz-icon nz-icon-funnel"></i>
|
<i class="nz-icon nz-icon-funnel"></i>
|
||||||
</button>
|
</button>
|
||||||
<export-excel
|
<export-excel
|
||||||
|
ref="export"
|
||||||
id="expression-template-list"
|
id="expression-template-list"
|
||||||
v-has="''"
|
|
||||||
export-url="monitor/endpoint/export"
|
export-url="monitor/endpoint/export"
|
||||||
import-url="monitor/endpoint/import"
|
import-url="monitor/endpoint/import"
|
||||||
export-file-name="expression-template"
|
export-file-name="expression-template"
|
||||||
@@ -319,14 +319,26 @@ export default {
|
|||||||
})
|
})
|
||||||
this.$refs.dataList.$refs.searchInput.sreach_num = 1
|
this.$refs.dataList.$refs.searchInput.sreach_num = 1
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
|
const importEndpoint = this.$route.query.importEndpoint
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'endpoint') {
|
if (add === 'endpoint') {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (importEndpoint) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.export.showImportBox(1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -213,6 +213,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
if (add) {
|
if (add) {
|
||||||
@@ -221,5 +226,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -23,15 +23,23 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {}
|
return {}
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {
|
||||||
mounted () {
|
$route: {
|
||||||
|
immediate: true,
|
||||||
|
handler () {
|
||||||
// 是否弹出侧滑
|
// 是否弹出侧滑
|
||||||
const add = this.$route.query.add
|
const add = this.$route.query.add
|
||||||
if (add) {
|
if (add) {
|
||||||
if (add === 'project') {
|
if (add === 'project') {
|
||||||
|
this.$nextTick(() => {
|
||||||
this.$refs.dataList.add()
|
this.$refs.dataList.add()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user