feat:module添加下拉弹窗

fix:修改panel chart不可移动的bug
This commit is contained in:
zhangyu
2021-04-20 14:38:24 +08:00
parent 74f1e800dc
commit 538d1a76e0
25 changed files with 1908 additions and 1700 deletions

View File

@@ -25,7 +25,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -19,7 +19,7 @@
<span v-show="!showList" class="collapse-content">({{chartData.children.length}} charts)</span>
</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -25,7 +25,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -25,7 +25,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -26,7 +26,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -13,7 +13,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -7,7 +7,7 @@
<div class="resize-box resize-box-echarts" ref="resizeBox">
<div class="line-chart-block" :id="'lineChartDiv'+chartIndex" @mouseenter="mouseEnterChart" @mouseleave="mouseLeaveChart">
<loading :ref="'localLoading'+chartIndex"></loading>
<div :class="{'drag-disabled': this.filter.from == $CONSTANTS.fromRoute.rule}" :id="'chartTitle'+chartIndex" class="clearfix chartTitle">
<div :class="{'drag-disabled': this.filter.from == $CONSTANTS.fromRoute.alertRule}" :id="'chartTitle'+chartIndex" class="clearfix chartTitle">
<el-popover
v-if="isError"
placement="top-start"

View File

@@ -13,7 +13,7 @@
<span class="el-dropdown-link chart-title">
<span class="chart-title-text">{{chartData.name}}</span>
<span class="chart-title-icon" :class="{'visible':caretShow,'hidden':!caretShow}">
<span>
<span v-if="chartData.remark">
<el-tooltip :content="chartData.remark" placement="top" effect="light">
<i class="nz-icon nz-icon-info-normal"></i>
</el-tooltip>

View File

@@ -21,7 +21,7 @@
<!--机柜-->
<cabinet-tab v-if="from === fromRoute.dc && targetTab === 'cabinet'" v-show="subResizeShow" :obj="obj" @changeTab="changeTab"></cabinet-tab>
<!--告警信息-->
<alert-message-tab v-if="((from === fromRoute.rule || from === fromRoute.asset || from === fromRoute.endpoint) && targetTab === 'alertMessage')" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></alert-message-tab>
<alert-message-tab v-if="((from === fromRoute.rule || from === fromRoute.asset || from === fromRoute.endpoint || from === fromRoute.project ) && targetTab === 'alertMessage')" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></alert-message-tab>
<!--asset页的endpoint列表-->
<endpoint-tab v-if="from === fromRoute.asset && targetTab === fromRoute.endpoint" v-show="subResizeShow" :from="from" :obj="obj" @changeTab="changeTab"></endpoint-tab>
<!--endpoint-query-->
@@ -40,6 +40,9 @@
<!--user列表的两个日志-->
<operation-log-tab v-if="from === fromRoute.user && targetTab === 'operationLogTab'" :from="from" :obj="obj" :tabs="tabs.user.operationLog" @changeTab="changeTab"></operation-log-tab>
<terminal-log-tab v-if="from === fromRoute.user && targetTab === 'terminalLogTab'" :from="from" :obj="obj" :tabs="tabs.user.terminalLog" @changeTab="changeTab"></terminal-log-tab>
<!--module列表的两个日志-->
<endpointTabNew v-if="from === fromRoute.module && targetTab === fromRoute.endpoint" v-show="subResizeShow" :from="from" :obj="obj" :tabs="tabs.user.moduleTabTitle" @changeTab="changeTab"></endpointTabNew>
</div>
</div>
</div>
@@ -50,6 +53,7 @@ import cabinetTab from './tabs/cabinetTab'
import alertMessageTab from './tabs/alertMessageTab'
import endpointQueryTab from './tabs/endpointQueryTab'
import endpointTab from './tabs/endpointTab'
import endpointTabNew from './tabs/endpointTabNew'
import panelTab from './tabs/panelTab'
import terminalLogRecordTab from './tabs/terminalLogRecordTab'
import terminalLogMonitorTab from './tabs/terminalLogMonitorTab'
@@ -70,7 +74,8 @@ export default {
terminalLogMonitorTab,
operationLogTab,
terminalLogTab,
'terminal-log-cmd-tab': terminalLogCMDTab
'terminal-log-cmd-tab': terminalLogCMDTab,
endpointTabNew
},
props: {
isFullScreen: Boolean, // 是否全屏
@@ -96,6 +101,10 @@ export default {
terminalLog: [
{ prop: 'operationLogTab', name: this.$t('config.operationlog.operationlog'), active: false },
{ prop: 'terminalLogTab', name: this.$t('config.terminallog.terminallog'), active: true }
],
moduleTabTitle: [
{ prop: 'endpoint', name: this.$t('asset.tableTitle.endpoint'), active: true },
{ prop: 'alertMessage', name: 'alertMessage', active: false }
]
}
}

View File

@@ -1,7 +1,12 @@
<template>
<span>
<div class="sub-top-tools">
<div class="sub-list-tabs">
<div class="sub-list-tabs" v-if="from===fromRoute.module">
<div class="sub-list-tab-title">{{obj.name}}</div>
<div @click="changeTab('endpoint')" class="sub-list-tab" id="endpoint-tab-change-endpoint">{{$t("asset.tableTitle.modules")}}</div>
<div class="sub-list-tab sub-list-tab-active" >{{$t("asset.tableTitle.alerts")}}</div>
</div>
<div class="sub-list-tabs" v-else>
<div class="sub-list-tab-title">
<template v-if="from == $CONSTANTS.fromRoute.asset">{{obj.host}}</template>
<template v-if="from == $CONSTANTS.fromRoute.rule">{{obj.alertName}}</template>
@@ -91,6 +96,7 @@ import axios from 'axios'
import bus from '../../../../libs/bus'
import alertMessageTable from '@/components/common/table/alert/alertMessageTable.vue'
import deleteButton from '../../deleteButton'
import { fromRoute } from '@/components/common/js/constants'
export default {
name: 'alertMessageTab',
components: {
@@ -104,6 +110,7 @@ export default {
data () {
return {
// 详情相关
fromRoute: fromRoute,
graphShow: false,
chartDatas: [],
legend: [],
@@ -686,29 +693,33 @@ export default {
immediate: true,
deep: true,
handler (n) {
if (n.alertNum === 0) {
this.defaultPick = 8
if (this.from === fromRoute.module) {
this.searchLabel.moduleIds = n.id
} else {
this.defaultPick = 12
}
if (this.from === this.$CONSTANTS.fromRoute.rule) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertName' && item.label !== 'severity'
})
this.searchLabel.ruleId = n.id
} else if (this.from === this.$CONSTANTS.fromRoute.asset) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertType' && item.label !== 'asset'
})
this.searchLabel.assetId = n.id
} else if (this.from === this.$CONSTANTS.fromRoute.endpoint) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertType' && item.label !== 'endpoint'
})
this.searchLabel.endpointId = n.id
}
if (n.alertNum) {
this.defaultSearchValue = 1
if (n.alertNum === 0) {
this.defaultPick = 8
} else {
this.defaultPick = 12
}
if (this.from === this.$CONSTANTS.fromRoute.rule) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertName' && item.label !== 'severity'
})
this.searchLabel.ruleId = n.id
} else if (this.from === this.$CONSTANTS.fromRoute.asset) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertType' && item.label !== 'asset'
})
this.searchLabel.assetId = n.id
} else if (this.from === this.$CONSTANTS.fromRoute.endpoint) {
this.searchMsg.searchLabelList = this.searchMsg.searchLabelList.filter((item, index) => {
return item.label !== 'alertType' && item.label !== 'endpoint'
})
this.searchLabel.endpointId = n.id
}
if (n.alertNum) {
this.defaultSearchValue = 1
}
}
this.getAlertList()
}

View File

@@ -1,11 +1,16 @@
<template>
<div style="height: 100%">
<div class="sub-top-tools">
<div class="sub-list-tabs">
<div class="sub-list-tab-title">{{obj.host}}</div><div
class="sub-list-tab" @click="changeTab('panel')" id="endpoint-tab-change-panel">{{$t("overall.detail")}}</div><div
@click="changeTab('alertMessage')" class="sub-list-tab" v-has="'asset_alerts_view'" id="endpoint-tab-change-alertmsg">{{$t("asset.tableTitle.alerts")}}</div><div
class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.modules")}}</div>
<div class="sub-list-tabs" v-if="from===fromRoute.asset">
<div class="sub-list-tab-title">{{obj.host}}</div>
<div class="sub-list-tab" @click="changeTab('panel')" id="endpoint-tab-change-panel">{{$t("overall.detail")}}</div>
<div @click="changeTab('alertMessage')" class="sub-list-tab" v-has="'asset_alerts_view'" id="endpoint-tab-change-alertmsg">{{$t("asset.tableTitle.alerts")}}</div>
<div class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.modules")}}</div>
</div>
<div class="sub-list-tabs" v-if="from===fromRoute.module">
<div class="sub-list-tab-title">{{obj.name}}</div>
<div class="sub-list-tab sub-list-tab-active">{{$t("asset.tableTitle.modules")}}</div>
<div @click="changeTab('alertMessage')" class="sub-list-tab" id="endpoint-tab-change-alertmsg">{{$t("asset.tableTitle.alerts")}}</div>
</div>
<div class="top-tool-right">
<div class="top-tool-search">
@@ -152,6 +157,7 @@
import exportXLSX from '../../exportXLSX'
import bus from '@/libs/bus'
import deleteButton from '../../deleteButton'
import { fromRoute } from '@/components/common/js/constants'
export default {
name: 'endpointTab',
components: {
@@ -159,10 +165,12 @@ export default {
'delete-button': deleteButton
},
props: {
obj: Object // 关联的实体对象
obj: Object, // 关联的实体对象
from: { type: String }
},
data () {
return {
fromRoute: fromRoute,
rightBox: {
add: { show: false },
edit: { show: false },
@@ -306,9 +314,13 @@ export default {
},
getTableData () {
this.tools.loading = true
this.$set(this.endpointSearchLabel, 'assetId', this.asset.id)
if (this.from === fromRoute.asset) {
this.$set(this.endpointSearchLabel, 'assetId', this.asset.id)
} else if (this.from === fromRoute.module) {
this.$set(this.endpointSearchLabel, 'moduleIds', this.module.id)
}
this.$set(this.endpointSearchLabel, 'pageSize', '-1')
this.$get('/endpoint', this.endpointSearchLabel).then(response => {
this.$get('monitor/endpoint', this.endpointSearchLabel).then(response => {
this.tools.loading = false
if (response.code === 200) {
for (let i = 0; i < response.data.list.length; i++) {
@@ -499,10 +511,17 @@ export default {
deep: true,
handler (n) {
if (n) {
this.asset = JSON.parse(JSON.stringify(n))
this.$nextTick(() => {
this.getTableData()
})
if (this.from === fromRoute.asset) {
this.asset = JSON.parse(JSON.stringify(n))
this.$nextTick(() => {
this.getTableData()
})
} else if (this.from === fromRoute.module) {
this.module = JSON.parse(JSON.stringify(n))
this.$nextTick(() => {
this.getTableData()
})
}
}
}
}

View File

@@ -0,0 +1,164 @@
<template>
<div class="full-width-height">
<nz-bottom-data-list
:api="url"
:custom-table-title.sync="tools.customTableTitle"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg"
:tabs="tabs"
@changeTab="changeTab"
class="full-width-height"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-slot>
<endpoint-table
ref="dataTable"
v-loading="tools.loading"
:api="url"
:custom-table-title="tools.customTableTitle"
:height="subTableHeight"
:now-time="nowTime"
:table-data="tableData"
@del="del"
@edit="edit"
@orderBy="tableDataSort"
@reload="getTableData"
@selectionChange="selectionChange"
></endpoint-table>
</template>
<template v-slot:pagination>
<Pagination ref="Pagination" :pageObj="pageObj" :tableId="tableId" @pageNo='pageNo' @pageSize='pageSize'></Pagination>
</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>
</transition>
</div>
</template>
<script>
import dataListMixin from '@/components/common/mixin/dataList'
import subDataListMixin from '@/components/common/mixin/subDataList'
import nzBottomDataList from '@/components/common/bottomBox/nzBottomDataList'
import endpointTable from '@/components/common/table/settings/endpointTable'
import EditEndpointBoxNew from '@/components/common/rightBox/editEndpointBoxNew'
export default {
name: 'terminalLogTab',
mixins: [dataListMixin, subDataListMixin],
components: {
nzBottomDataList,
endpointTable,
EditEndpointBoxNew
},
watch: {
obj: {
immediate: true,
handler (n) {
console.log(n)
if (n) {
this.getTableData()
}
}
}
},
data () {
return {
url: 'monitor/endpoint',
tableId: 'endpointTab', // 需要分页的table的id用于记录每页数量
searchMsg: { // 给搜索框子组件传递的信息
zheze_none: true,
searchLabelList: [{
id: 12,
name: 'endpoint name',
type: 'input',
label: 'name',
disabled: false
},
{
id: 13,
name: 'endpoint id',
type: 'input',
label: 'id',
disabled: false
}]
},
nowTime: '',
rightBox: {
editShow: false,
show: false
},
fromBottom: true
}
},
methods: {
getTableData () {
const params = {
...this.searchLabel,
pageNo: this.pageObj.pageNo,
pageSize: this.pageObj.pageSize
}
params.moduleIds = this.obj.id
this.$get(this.url, params).then(response => {
this.tools.loading = false
if (response.code === 200) {
this.tableData = response.data.list
this.nowTime = this.utcTimeToTimezoneStr(response.time)
this.pageObj.total = response.data.total
if (!this.scrollbarWrap) {
this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap)
})
}
}
})
},
edit (row) {
this.$get('monitor/endpoint/' + row.id).then(res => {
const u = res.data
this.object = JSON.parse(JSON.stringify(u))
this.object.configs = JSON.parse(this.object.configs)
this.object.walk = this.object.configs.walk ? JSON.parse(JSON.stringify(this.object.configs.walk)) : []
this.object.port = this.object.configs.port ? JSON.parse(JSON.stringify(this.object.configs.port)) : 9100
this.object.paramObj = []
this.object.labelModule = []
if (JSON.stringify(this.object.configs.labels) !== '{}' && this.object.configs.labels) {
Object.keys(this.object.configs.labels).forEach(key => {
this.object.labelModule.push({ key, value: this.object.configs.labels[key] })
})
} else {
this.object.labelModule.push({ key: '', value: '' })
}
if (JSON.stringify(this.object.configs.params) !== '{}' && this.object.configs.params) {
Object.keys(this.object.configs.params).forEach(key => {
this.object.paramObj.push({ key, value: this.object.configs.params[key] })
})
} else {
this.object.paramObj.push({ key: '', value: [] })
}
this.object.assetName = this.object.asset ? this.object.asset.name : ''
this.object.projectId = this.object.project.id
this.object.moduleId = this.object.module.id
this.object.type = this.object.module.type
this.rightBox.editShow = true
})
console.log(1)
},
closeRightEditBox (refresh) {
console.log(2)
this.rightBox.editShow = false
if (refresh) {
this.delFlag = true
this.getTableData()
}
}
}
}
</script>
<style scoped>
.full-width-height{
width: 100%;
height: 100%;
}
</style>

View File

@@ -175,8 +175,9 @@ export const fromRoute = {
agent: 'agent',
dc: 'dc',
role: 'role',
endpoint: 'endpoint',
project: 'project',
module: 'module',
endpoint: 'endpoint',
endpointQuery: 'endpointQuery',
terminalLog: 'terminalLog',
operationLog: 'operationLog',

View File

@@ -589,7 +589,8 @@ const cn = {
brand: '品牌ID',
dc: '数据中心',
type: '主机地址',
state: '主机状态'
state: '主机状态',
endpoint: 'Endpoint',
},
tagTableTitle: {
projectName: '系统名称',

View File

@@ -640,7 +640,8 @@ const en = {
brand: 'BrandID',
dc: 'DataCenter',
type: 'typeIds',
state: 'state'
state: 'state',
endpoint: 'Endpoint',
},
tagTableTitle: {
projectName: 'Project name', // '系统名称'

View File

@@ -27,7 +27,7 @@ export default {
searchLabel: {}, // 搜索参数
scrollbarWrap: null,
delFlag: false,
fromBottom: false,
operationWidth: '165' // 操作列宽
}
},
@@ -84,6 +84,7 @@ export default {
})
},
del (row) {
const self = this
this.$confirm(this.$t('tip.confirmDelete'), {
confirmButtonText: this.$t('tip.yes'),
cancelButtonText: this.$t('tip.no'),
@@ -91,9 +92,9 @@ export default {
}).then(() => {
this.$delete(this.url + '?ids=' + row.id).then(response => {
if (response.code === 200) {
this.delFlag = true
self.delFlag = true
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
this.getTableData()
self.getTableData()
} else {
this.$message.error(response.msg)
}
@@ -210,7 +211,10 @@ export default {
this.tools.customTableTitle = localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId)
? JSON.parse(localStorage.getItem('nz-tableTitle-' + localStorage.getItem('nz-username') + '-' + this.tableId))
: this.$refs.dataTable.tableTitle
this.getTableData()
console.log(this.fromBottom)
if (!this.fromBottom) {
this.getTableData()
}
},
beforeDestroy () {
if (this.scrollbarWrap) {

File diff suppressed because it is too large Load Diff

View File

@@ -664,16 +664,16 @@ export default {
configs: { ...JSON.parse(this.currentModuleCopy.configs), host: item.manageIp },
moduleId: this.currentModuleCopy.id
}
obj.labelModule = []
if (obj.configs.labels !== '{}' && obj.configs.labels) {
obj.labelModule = []
Object.keys(obj.configs.labels).forEach(key => {
obj.labelModule.push({ key, value: obj.configs.labels[key] })
})
} else {
obj.labelModule.push({ key: '', value: '' })
}
obj.paramObj = []
if (obj.configs.params !== '{}' && obj.configs.params) {
obj.paramObj = []
Object.keys(obj.configs.params).forEach(key => {
obj.paramObj.push({ key, value: obj.configs.params[key] })
})

View File

@@ -135,8 +135,9 @@
</el-form-item>
<!--scrape_timeout-->
<el-form-item :label='$t("project.endpoint.scrape_timeout")' prop="scrape_timeout" class="half-form-item">
<el-input :placeholder='$t("project.endpoint.scrape_timeout_placeholder")' v-model.number="editEndpoint.configs.scrape_timeout" size="small" id="module-box-input-scrape_timeout"></el-input>
<template slot="append">s</template>
<el-input :placeholder='$t("project.endpoint.scrape_timeout_placeholder")' v-model.number="editEndpoint.configs.scrape_timeout" size="small" id="module-box-input-scrape_timeout">
<template slot="append">s</template>
</el-input>
</el-form-item>
</div>
</transition>

View File

@@ -22,7 +22,7 @@
</el-form-item>
<!--project-->
<el-form-item :label='$t("project.project.project")' prop="projectId">
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.projectId" placeholder="" size="small" id="module-box-input-project">
<el-select value-key="id" popper-class="config-dropdown" v-model="editModule.projectId" placeholder="" size="small" id="module-box-input-project" :disabled="!!editModule.id">
<el-option :id="'module-project-'+item.id" v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
@@ -137,8 +137,9 @@
</el-form-item>
<!--scrape_timeout-->
<el-form-item :label='$t("project.endpoint.scrape_timeout")' prop="scrape_timeout" class="half-form-item">
<el-input :placeholder='$t("project.endpoint.scrape_timeout_placeholder")' v-model.number="editModule.configs.scrape_timeout" size="small" id="module-box-input-scrape_timeout"></el-input>
<template slot="append">s</template>
<el-input :placeholder='$t("project.endpoint.scrape_timeout_placeholder")' v-model.number="editModule.configs.scrape_timeout" size="small" id="module-box-input-scrape_timeout">
<template slot="append">s</template>
</el-input>
</el-form-item>
</div>
</transition>

View File

@@ -68,7 +68,7 @@
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( scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
<button class="table-operation-item" @click="showBottomBox('endpointQuery', 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>

View File

@@ -57,7 +57,7 @@
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( scope.row)"><i class="nz-icon nz-icon-view1"></i></button>
<button class="table-operation-item" @click="showBottomBox('endpoint', 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>
@@ -89,7 +89,6 @@ export default {
label: this.$t('project.module.moduleName'),
prop: 'name',
show: true,
width: 150
}, {
label: this.$t('project.module.type'),
prop: 'type',
@@ -122,9 +121,7 @@ export default {
}
},
methods: {
showBottomBox (project) {
this.$store.commit('currentProjectChange', project)
}
},
computed: {
isCurrentUser () {

View File

@@ -4,7 +4,7 @@
ref="dataList"
:api="url"
:custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.user"
:from="fromRoute.endpoint"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg">
<template v-slot:top-tool-right>
@@ -140,7 +140,7 @@ export default {
} else {
this.object.paramObj.push({ key: '', value: [] })
}
this.object.assetName = this.object.asset.name
this.object.assetName = this.object.asset ? this.object.asset.name : ''
this.object.projectId = this.object.project.id
this.object.moduleId = this.object.module.id
this.object.type = this.object.module.type

View File

@@ -4,7 +4,7 @@
ref="dataList"
:api="url"
:custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.user"
:from="fromRoute.module"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg">
<template v-slot:top-tool-right>
@@ -136,7 +136,6 @@ export default {
disabled: false
}]
},
roles: []
}
},
methods: {

View File

@@ -4,7 +4,7 @@
ref="dataList"
:api="url"
:custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.user"
:from="fromRoute.project"
:layout="['searchInput', 'elementSet']"
:search-msg="searchMsg">
<template v-slot:top-tool-right>