CN-906 fix: 知识库列表简版;调整一些目录名
This commit is contained in:
@@ -6,9 +6,9 @@
|
|||||||
@import './components/common/pagination';
|
@import './components/common/pagination';
|
||||||
// @import './components/entities/entities';
|
// @import './components/entities/entities';
|
||||||
@import './components/layout/layout';
|
@import './components/layout/layout';
|
||||||
@import 'components/rightBox/settings/chart-box';
|
@import 'components/rightBox/administration/chart-box';
|
||||||
@import 'components/setting/galaxy-proxy-debug';
|
@import 'components/setting/galaxy-proxy-debug';
|
||||||
@import 'components/table/settings/galaxy-proxy-table';
|
@import 'components/table/administration/galaxy-proxy-table';
|
||||||
@import './components/table/common';
|
@import './components/table/common';
|
||||||
@import './views/charts/chart';
|
@import './views/charts/chart';
|
||||||
@import 'views/entityExplorer/entity-explorer';
|
@import 'views/entityExplorer/entity-explorer';
|
||||||
@@ -77,3 +77,4 @@
|
|||||||
|
|
||||||
@import 'views/administration/AdministrationTabs';
|
@import 'views/administration/AdministrationTabs';
|
||||||
|
|
||||||
|
@import 'views/setting/knowledgeBase';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<template #label>
|
<template #label>
|
||||||
<div class="chart-tabs__label">
|
<div class="chart-tabs__label">
|
||||||
<i :class="tab.icon"></i>
|
<i :class="tab.icon"></i>
|
||||||
<span>{{ $t(tab.i18n) }}</span>
|
<span>{{ $t(tab.i18n || tab.name) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ export default {
|
|||||||
return this.$store.getters.menuList.find(menu => menu.code === 'networkAnalytics')
|
return this.$store.getters.menuList.find(menu => menu.code === 'networkAnalytics')
|
||||||
},
|
},
|
||||||
otherMenu () {
|
otherMenu () {
|
||||||
return this.$store.getters.menuList.filter(menu => menu.code !== 'networkAnalytics')
|
return this.$store.getters.menuList.filter(menu => ['networkAnalytics', 'chart', 'I18N'].indexOf(menu.code) === -1)
|
||||||
|
|
||||||
/* function excludeButton (menu) {
|
/* function excludeButton (menu) {
|
||||||
for (let i = 0; i < menu.length; i++) {
|
for (let i = 0; i < menu.length; i++) {
|
||||||
@@ -334,6 +334,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
result = breadcrumb ? [breadcrumb.parentName, breadcrumb.name] : []
|
result = breadcrumb ? [breadcrumb.parentName, breadcrumb.name] : []
|
||||||
}
|
}
|
||||||
|
if (!breadcrumb.parentName) {
|
||||||
|
result = result.filter((r, i) => i > 0)
|
||||||
|
}
|
||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
showEntityTypeSelector () {
|
showEntityTypeSelector () {
|
||||||
|
|||||||
@@ -2,22 +2,21 @@
|
|||||||
<div :class="from" class="list-page">
|
<div :class="from" class="list-page">
|
||||||
<!-- 主页面 -->
|
<!-- 主页面 -->
|
||||||
<div class="main-list">
|
<div class="main-list">
|
||||||
<!-- 顶部工具栏 -->
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
|
<!-- 顶部工具栏 -->
|
||||||
<div class="top-tools">
|
<div class="top-tools">
|
||||||
<div class="top-tool-left" style="min-width: 300px">
|
<div class="top-tool-left" style="min-width: 300px">
|
||||||
<slot name="top-tool-left"></slot>
|
<slot name="top-tool-left"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-tool-right">
|
<div class="top-tool-right">
|
||||||
<!-- <el-input v-model="keyWord" value="keyWord"></el-input>
|
<!-- <el-input v-model="keyWord" value="keyWord"></el-input>
|
||||||
<el-button @click="onsearch" icon="el-icon-search" type="info" size="mini" style="margin-right: 10px"></el-button>-->
|
<el-button @click="onSearch" icon="el-icon-search" type="info" size="mini" style="margin-right: 10px"></el-button>-->
|
||||||
<div v-if="showLayout.indexOf('search') > -1" class="top-tool-search margin-r-20">
|
<div v-if="showLayout.indexOf('search') > -1" class="top-tool-search margin-r-20">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<el-input
|
<el-input v-model="keyWord" size="small" @keyup.enter="onSearch"></el-input>
|
||||||
v-model="keyWord" size="small" @keyup.enter="onsearch"></el-input>
|
<!-- <el-button icon="el-icon-search" @click="onSearch" size="small"></el-button>-->
|
||||||
<!-- <el-button icon="el-icon-search" @click="onsearch" size="small"></el-button>-->
|
<button class="top-tool-btn" style="border-radius: 0"
|
||||||
<button class="top-tool-btn" style="border-radius: 0px"
|
type="button" @click="onSearch">
|
||||||
type="button" @click="onsearch">
|
|
||||||
<i class="el-icon-search"></i>
|
<i class="el-icon-search"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,7 +93,7 @@ export default {
|
|||||||
updateCustomTableTitle (custom) {
|
updateCustomTableTitle (custom) {
|
||||||
this.$emit('update:customTableTitle', custom)
|
this.$emit('update:customTableTitle', custom)
|
||||||
},
|
},
|
||||||
onsearch () {
|
onSearch () {
|
||||||
const params = {
|
const params = {
|
||||||
q: this.keyWord
|
q: this.keyWord
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ export default {
|
|||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('config.operationlog.type'),
|
label: this.$t('overall.type'),
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
113
src/components/table/setting/KnowledgeBaseTable.vue
Normal file
113
src/components/table/setting/KnowledgeBaseTable.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<el-table
|
||||||
|
id="knowledgeBaseTable"
|
||||||
|
ref="dataTable"
|
||||||
|
:data="tableData"
|
||||||
|
:height="height"
|
||||||
|
border
|
||||||
|
@header-dragend="dragend"
|
||||||
|
@sort-change="tableDataSort"
|
||||||
|
@selection-change="selectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="false"
|
||||||
|
align="center"
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-for="(item, index) in customTableTitles"
|
||||||
|
:key="`col-${index}`"
|
||||||
|
:fixed="item.fixed"
|
||||||
|
:label="item.label"
|
||||||
|
:min-width="`${item.minWidth}`"
|
||||||
|
:prop="item.prop"
|
||||||
|
:resizable="true"
|
||||||
|
:sort-orders="['ascending', 'descending']"
|
||||||
|
:sortable="item.sortable"
|
||||||
|
:width="`${item.width}`"
|
||||||
|
class="data-column"
|
||||||
|
>
|
||||||
|
<template #header>
|
||||||
|
<span class="data-column__span">{{item.label}}</span>
|
||||||
|
<div class="col-resize-area"></div>
|
||||||
|
</template>
|
||||||
|
<template #default="scope" :column="item">
|
||||||
|
<template v-if="item.prop === 'name'">
|
||||||
|
<template v-if="scope.row.i18n">
|
||||||
|
<span>{{$t(scope.row.i18n)}}</span>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="scope.row.name">
|
||||||
|
<span>{{scope.row.name}}</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<span>-</span>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:resizable="false"
|
||||||
|
:width="operationWidth"
|
||||||
|
fixed="right">
|
||||||
|
<template #header>
|
||||||
|
<div class="table-operation-title">{{$t('overall.option')}}</div>
|
||||||
|
</template>
|
||||||
|
<template #default="scope">
|
||||||
|
<div class="table-operation-items">
|
||||||
|
<button class="table-operation-item" @click="tableOperation(['edit', scope.row])"><i class="cn-icon cn-icon-edit"></i></button>
|
||||||
|
<el-dropdown size="medium" trigger="hover" @command="tableOperation">
|
||||||
|
<div class="table-operation-item table-operation-item--more">
|
||||||
|
<i class="cn-icon cn-icon-more-arrow-down"></i>
|
||||||
|
</div>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu >
|
||||||
|
<el-dropdown-item :command="['delete', scope.row]" :disabled="scope.row.id === 1"><i class="cn-icon cn-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import table from '@/mixins/table'
|
||||||
|
export default {
|
||||||
|
name: 'knowledgeBaseTable',
|
||||||
|
mixins: [table],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
tableTitle: [ // 原table列
|
||||||
|
{
|
||||||
|
label: 'ID',
|
||||||
|
prop: 'id',
|
||||||
|
show: true,
|
||||||
|
width: 100,
|
||||||
|
sortable: 'custom'
|
||||||
|
}, {
|
||||||
|
label: this.$t('config.roles.name'),
|
||||||
|
prop: 'tagName',
|
||||||
|
show: true,
|
||||||
|
sortable: 'custom'
|
||||||
|
}, {
|
||||||
|
label: this.$t('overall.type'),
|
||||||
|
prop: 'tagType',
|
||||||
|
show: true,
|
||||||
|
sortable: 'custom'
|
||||||
|
}, {
|
||||||
|
label: this.$t('overall.remark'),
|
||||||
|
prop: 'remark',
|
||||||
|
show: true
|
||||||
|
}, {
|
||||||
|
label: this.$t('overall.updateTime'),
|
||||||
|
prop: 'updateTime',
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -35,6 +35,10 @@ const routes = [
|
|||||||
path: '/businessLog/viewer',
|
path: '/businessLog/viewer',
|
||||||
component: () => import('@/views/businessLog/Viewer')
|
component: () => import('@/views/businessLog/Viewer')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/knowledgeBase',
|
||||||
|
component: () => import('@/views/setting/KnowledgeBase')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Administration',
|
name: 'Administration',
|
||||||
path: '/administration',
|
path: '/administration',
|
||||||
@@ -51,27 +55,22 @@ const routes = [
|
|||||||
path: '/administration/role',
|
path: '/administration/role',
|
||||||
component: () => import('@/views/administration/Roles')
|
component: () => import('@/views/administration/Roles')
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'I18n',
|
|
||||||
path: '/administration/i18n',
|
|
||||||
component: () => import('@/views/administration/I18n')
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'OperationLog',
|
name: 'OperationLog',
|
||||||
path: '/administration/operationLog',
|
path: '/administration/operationLog',
|
||||||
component: () => import('@/views/administration/OperationLog')
|
component: () => import('@/views/administration/OperationLog')
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GalaxyProxy',
|
|
||||||
path: '/administration/galaxyProxy',
|
|
||||||
component: () => import('@/views/administration/GalaxyProxy')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Chart',
|
|
||||||
path: '/administration/chart',
|
|
||||||
component: () => import('@/views/administration/Chart')
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'I18n',
|
||||||
|
path: '/i18n',
|
||||||
|
component: () => import('@/views/administration/I18n')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Chart',
|
||||||
|
path: '/chart',
|
||||||
|
component: () => import('@/views/administration/Chart')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ export const api = {
|
|||||||
chartList: '/visual/chart/list',
|
chartList: '/visual/chart/list',
|
||||||
// galaxyProxy
|
// galaxyProxy
|
||||||
galaxyProxy: '/galaxy/setting',
|
galaxyProxy: '/galaxy/setting',
|
||||||
|
// 知识库
|
||||||
|
knowledgeBase: '/knowledgeBase',
|
||||||
|
|
||||||
// 报告相关
|
// 报告相关
|
||||||
reportJob: '/report/job',
|
reportJob: '/report/job',
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import chartTable from '@/components/table/settings/ChartTable'
|
import chartTable from '@/components/table/administration/ChartTable'
|
||||||
import chartBox from '@/components/rightBox/settings/ChartBox'
|
import chartBox from '@/components/rightBox/settings/ChartBox'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import galaxyProxyBox from '@/components/rightBox/settings/GalaxyProxyBox'
|
import galaxyProxyBox from '@/components/rightBox/settings/GalaxyProxyBox'
|
||||||
import galaxyProxyTable from '@/components/table/settings/GalaxyProxyTable'
|
import galaxyProxyTable from '@/components/table/administration/GalaxyProxyTable'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { get, put } from '@/utils/http'
|
import { get, put } from '@/utils/http'
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import i18nTable from '@/components/table/settings/I18nTable'
|
import i18nTable from '@/components/table/administration/I18nTable'
|
||||||
import i18nBox from '@/components/rightBox/settings/I18nBox'
|
import i18nBox from '@/components/rightBox/settings/I18nBox'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
|
|
||||||
|
|||||||
@@ -16,35 +16,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ChartTabs from '@/components/common/ChartTabs'
|
import ChartTabs from '@/components/common/ChartTabs'
|
||||||
|
import { useStore } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: {
|
components: {
|
||||||
ChartTabs
|
ChartTabs
|
||||||
},
|
},
|
||||||
data () {
|
setup () {
|
||||||
|
const store = useStore()
|
||||||
|
const menu = store.getters.menuList.find(m => m.code === 'administration')
|
||||||
|
const tabsData = menu.children.map(l => ({
|
||||||
|
...l,
|
||||||
|
path: l.route
|
||||||
|
})).sort((a, b) => a.sort - b.sort)
|
||||||
return {
|
return {
|
||||||
tabsData: [
|
tabsData
|
||||||
{
|
|
||||||
i18n: 'overall.user',
|
|
||||||
path: '/administration/user',
|
|
||||||
icon: 'cn-icon cn-icon-user2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
i18n: 'overall.role',
|
|
||||||
path: '/administration/role',
|
|
||||||
icon: 'cn-icon cn-icon-role2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
i18n: 'overall.operationLog',
|
|
||||||
path: '/administration/operationLog',
|
|
||||||
icon: 'cn-icon cn-icon-operation-log'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
i18n: 'I18n',
|
|
||||||
path: '/administration/i18n',
|
|
||||||
icon: 'cn-icon cn-icon-i18n'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import operationLogTable from '@/components/table/settings/OperationLogTable'
|
import operationLogTable from '@/components/table/administration/OperationLogTable'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import rolesTable from '@/components/table/settings/RoleTable'
|
import rolesTable from '@/components/table/administration/RoleTable'
|
||||||
import roleBox from '@/components/rightBox/settings/RoleBox'
|
import roleBox from '@/components/rightBox/settings/RoleBox'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { get } from '@/utils/http'
|
import { get } from '@/utils/http'
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
import dataListMixin from '@/mixins/data-list'
|
import dataListMixin from '@/mixins/data-list'
|
||||||
import userTable from '@/components/table/settings/UserTable'
|
import userTable from '@/components/table/administration/UserTable'
|
||||||
import userBox from '@/components/rightBox/settings/UserBox'
|
import userBox from '@/components/rightBox/settings/UserBox'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
|
|
||||||
|
|||||||
41
src/views/setting/Index.vue
Normal file
41
src/views/setting/Index.vue
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<div class="administration entity-explorer entity-explorer--show-list">
|
||||||
|
<!-- 顶部工具栏,在列表页显示 -->
|
||||||
|
<div class="explorer-top-tools explorer-detection-top-tools">
|
||||||
|
<div class="explorer-top-tools-title">{{$t('overall.knowledgeBase')}}</div>
|
||||||
|
</div>
|
||||||
|
<div style="width: 100%;padding-bottom: 26px;">
|
||||||
|
<chart-tabs :data="tabsData" router></chart-tabs>
|
||||||
|
</div>
|
||||||
|
<!-- 内容区 -->
|
||||||
|
<div class="explorer-container administration-container">
|
||||||
|
<router-view />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ChartTabs from '@/components/common/ChartTabs'
|
||||||
|
import { useStore } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
ChartTabs
|
||||||
|
},
|
||||||
|
setup () {
|
||||||
|
const store = useStore()
|
||||||
|
const menu = store.getters.menuList.find(m => m.code === 'setting')
|
||||||
|
const tabsData = menu.children.map(l => ({
|
||||||
|
...l,
|
||||||
|
path: l.route
|
||||||
|
})).sort((a, b) => a.sort - b.sort)
|
||||||
|
return {
|
||||||
|
tabsData
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
101
src/views/setting/KnowledgeBase.vue
Normal file
101
src/views/setting/KnowledgeBase.vue
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 100%;">
|
||||||
|
<cn-data-list
|
||||||
|
ref="dataList"
|
||||||
|
:tableId="tableId"
|
||||||
|
v-model:custom-table-title="tools.customTableTitle"
|
||||||
|
:api="url"
|
||||||
|
from="knowledge-base"
|
||||||
|
:layout="['columnCustomize','elementSet','search']"
|
||||||
|
@search="search"
|
||||||
|
>
|
||||||
|
<template v-slot:top-tool-right>
|
||||||
|
<button id="roles-add" :title="$t('overall.createRole')" class="top-tool-btn margin-r-10"
|
||||||
|
type="button" @click="add">
|
||||||
|
<i class="cn-icon-add cn-icon"></i>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
<template v-slot:default>
|
||||||
|
<knowledge-base-table
|
||||||
|
ref="dataTable"
|
||||||
|
v-loading="tools.loading"
|
||||||
|
:api="url"
|
||||||
|
:custom-table-title="tools.customTableTitle"
|
||||||
|
:height="mainTableHeight"
|
||||||
|
:table-data="tableData"
|
||||||
|
@delete="del"
|
||||||
|
@edit="edit"
|
||||||
|
@orderBy="tableDataSort"
|
||||||
|
@reload="getTableData"
|
||||||
|
@selectionChange="selectionChange"
|
||||||
|
></knowledge-base-table>
|
||||||
|
</template>
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<template #pagination>
|
||||||
|
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
||||||
|
</template>
|
||||||
|
</cn-data-list>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import cnDataList from '@/components/table/CnDataList'
|
||||||
|
import dataListMixin from '@/mixins/data-list'
|
||||||
|
import KnowledgeBaseTable from '@/components/table/setting/KnowledgeBaseTable'
|
||||||
|
import { api } from '@/utils/api'
|
||||||
|
import { get } from '@/utils/http'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'knowledgeBase',
|
||||||
|
components: {
|
||||||
|
cnDataList,
|
||||||
|
KnowledgeBaseTable
|
||||||
|
},
|
||||||
|
mixins: [dataListMixin],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
url: api.knowledgeBase,
|
||||||
|
tableId: 'knowledgeBaseTable', // 需要分页的table的id,用于记录每页数量
|
||||||
|
blankObject: { // 空白对象
|
||||||
|
tagName: '',
|
||||||
|
buildIn: '',
|
||||||
|
id: '',
|
||||||
|
tagType: '',
|
||||||
|
remark: '',
|
||||||
|
updateTime: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
edit (u) {
|
||||||
|
get(`${this.url}`, { ids: u.id }).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.object = response.data.list[0]
|
||||||
|
this.rightBox.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTableData () {
|
||||||
|
this.tools.loading = false
|
||||||
|
this.tableData = [
|
||||||
|
{
|
||||||
|
tagName: '我的IP库',
|
||||||
|
buildIn: 0,
|
||||||
|
id: 1,
|
||||||
|
tagType: 'ip',
|
||||||
|
remark: '我的IP库描述',
|
||||||
|
updateTime: new Date()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tagName: '我的domain库',
|
||||||
|
buildIn: 0,
|
||||||
|
id: 2,
|
||||||
|
tagType: 'domain',
|
||||||
|
remark: '我的domain库描述',
|
||||||
|
updateTime: new Date()
|
||||||
|
}
|
||||||
|
]
|
||||||
|
this.pageObj.total = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:tableId="tableId"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:api="url"
|
|
||||||
:from="fromRoute.chart"
|
|
||||||
:layout="['columnCustomize','elementSet','search']"
|
|
||||||
@search="search"
|
|
||||||
>
|
|
||||||
<template #top-tool-right>
|
|
||||||
<button
|
|
||||||
id="account-add"
|
|
||||||
class="top-tool-btn margin-r-10"
|
|
||||||
type="button"
|
|
||||||
@click="add"
|
|
||||||
>
|
|
||||||
<i class="cn-icon-add cn-icon"/>
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<chart-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@delete="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
<el-drawer
|
|
||||||
v-model="rightBox.show"
|
|
||||||
direction="rtl"
|
|
||||||
:with-header="false"
|
|
||||||
destroy-on-close>
|
|
||||||
<chart-box
|
|
||||||
:object="object"
|
|
||||||
@close="closeRightBox"
|
|
||||||
/>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import chartTable from '@/components/table/settings/ChartTable'
|
|
||||||
import chartBox from '@/components/rightBox/settings/ChartBox'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Chart',
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
chartTable,
|
|
||||||
chartBox
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.chart,
|
|
||||||
listUrl: api.chartList,
|
|
||||||
blankObject: { // 空白对象
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
params: '',
|
|
||||||
i18n: ''
|
|
||||||
},
|
|
||||||
tableId: 'chartTable'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,144 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:tableId="tableId"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:api="url"
|
|
||||||
:from="fromRoute.galaxyProxy"
|
|
||||||
:layout="['columnCustomize','elementSet','search']"
|
|
||||||
@search="search"
|
|
||||||
>
|
|
||||||
<template v-slot:top-tool-right>
|
|
||||||
<button id="galaxy-proxy-clear-cache" class="top-tool-btn margin-r-10" :title="$t('overall.clearCache')"
|
|
||||||
type="button" @click="clearCache">
|
|
||||||
<i class="cn-icon cn-icon-clear-cache"></i>
|
|
||||||
</button>
|
|
||||||
<button id="galaxy-proxy-add" class="top-tool-btn margin-r-10"
|
|
||||||
type="button" @click="add">
|
|
||||||
<i class="cn-icon-add cn-icon"></i>
|
|
||||||
</button>
|
|
||||||
<button id="galaxy-proxy-debug" class="top-tool-btn margin-r-10" :title="$t('overall.debug')"
|
|
||||||
type="button" @click="debug(true,{})">
|
|
||||||
<i class="cn-icon-category cn-icon"></i>
|
|
||||||
</button>
|
|
||||||
<top-tool-more-options
|
|
||||||
ref="export"
|
|
||||||
id="model"
|
|
||||||
:params="searchLabel"
|
|
||||||
class="top-tool-export margin-l-10 margin-r-10"
|
|
||||||
export-file-name="galaxyProxy"
|
|
||||||
export-url="/galaxy/setting/export"
|
|
||||||
import-url="/galaxy/setting/import"
|
|
||||||
@afterImport="getTableData"
|
|
||||||
>
|
|
||||||
<template v-slot:before>
|
|
||||||
</template>
|
|
||||||
</top-tool-more-options>
|
|
||||||
</template>
|
|
||||||
<template v-slot:default>
|
|
||||||
<galaxy-proxy-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@delete="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
@copy="copy"
|
|
||||||
@debug="debugRow"
|
|
||||||
></galaxy-proxy-table>
|
|
||||||
</template>
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
<el-drawer
|
|
||||||
v-model="rightBox.show"
|
|
||||||
direction="rtl"
|
|
||||||
:with-header="false"
|
|
||||||
destroy-on-close>
|
|
||||||
<galaxy-proxy-box :object="object" @close="closeRightBox"></galaxy-proxy-box>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
|
||||||
<galaxy-proxy-debug
|
|
||||||
v-model:show-debug="showDebug"
|
|
||||||
top="5vh"
|
|
||||||
:show-close="false"
|
|
||||||
:curGalaxyProxy="curGalaxyProxy"></galaxy-proxy-debug>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import galaxyProxyBox from '@/components/rightBox/settings/GalaxyProxyBox'
|
|
||||||
import galaxyProxyTable from '@/components/table/settings/GalaxyProxyTable'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
import { get, put } from '@/utils/http'
|
|
||||||
import TopToolMoreOptions from '@/components/common/popBox/TopToolMoreOptions'
|
|
||||||
import galaxyProxyDebug from '@/components/setting/GalaxyProxyDebug'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'GalaxyProxy',
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
galaxyProxyBox,
|
|
||||||
galaxyProxyTable,
|
|
||||||
TopToolMoreOptions,
|
|
||||||
galaxyProxyDebug
|
|
||||||
},
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.galaxyProxy,
|
|
||||||
tableId: 'galaxySettingTable', // 需要分页的table的id,用于记录每页数量
|
|
||||||
blankObject: { // 空白对象
|
|
||||||
name: ''
|
|
||||||
},
|
|
||||||
showDebug: false,
|
|
||||||
curGalaxyProxy: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
edit (u) {
|
|
||||||
get(`${this.url}/${u.id}`).then(response => {
|
|
||||||
if (response.code === 200) {
|
|
||||||
const editObject = response.data
|
|
||||||
editObject.targetHeader || (editObject.targetHeader = '')
|
|
||||||
editObject.preHandle || (editObject.preHandle = '')
|
|
||||||
editObject.postHandle || (editObject.postHandle = '')
|
|
||||||
editObject.targetParam || (editObject.targetParam = '')
|
|
||||||
this.object = editObject
|
|
||||||
this.rightBox.show = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
debug (isTopDebug, u) {
|
|
||||||
if (!isTopDebug && u) {
|
|
||||||
this.curGalaxyProxy = JSON.parse(JSON.stringify(u))
|
|
||||||
}
|
|
||||||
this.showDebug = true
|
|
||||||
},
|
|
||||||
debugRow (u) {
|
|
||||||
this.debug(false, u)
|
|
||||||
},
|
|
||||||
clearCache () {
|
|
||||||
put(`${this.url}/clearCache`).then(response => {
|
|
||||||
if (response.code === 200) {
|
|
||||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.success') })
|
|
||||||
} else {
|
|
||||||
this.$message.error(response.msg || response.message)
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message.error(this.$t('tip.unknownError'))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:tableId="tableId"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:api="url"
|
|
||||||
:from="fromRoute.user"
|
|
||||||
:layout="['columnCustomize','elementSet','search']"
|
|
||||||
@search="search"
|
|
||||||
>
|
|
||||||
<template #top-tool-right>
|
|
||||||
<button
|
|
||||||
id="account-add"
|
|
||||||
v-has="'user_add'"
|
|
||||||
class="top-tool-btn margin-r-10"
|
|
||||||
type="button"
|
|
||||||
@click="add"
|
|
||||||
>
|
|
||||||
<i class="cn-icon-add cn-icon"/>
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<i18n-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@delete="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
<el-drawer
|
|
||||||
v-model="rightBox.show"
|
|
||||||
direction="rtl"
|
|
||||||
:with-header="false"
|
|
||||||
destroy-on-close>
|
|
||||||
<i18n-box
|
|
||||||
:object="object"
|
|
||||||
@close="closeRightBox"
|
|
||||||
/>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import i18nTable from '@/components/table/settings/I18nTable'
|
|
||||||
import i18nBox from '@/components/rightBox/settings/I18nBox'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'I18n',
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
i18nTable,
|
|
||||||
i18nBox
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.i18nSys,
|
|
||||||
blankObject: { // 空白对象
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
code: '',
|
|
||||||
lang: '',
|
|
||||||
value: ''
|
|
||||||
},
|
|
||||||
tableId: 'i18nTable'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:api="url"
|
|
||||||
:tableId="tableId"
|
|
||||||
:layout="['search', 'elementSet','search']"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:from="fromRoute.operationLog"
|
|
||||||
@search="search">
|
|
||||||
<template v-slot:default>
|
|
||||||
<operation-log-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@del="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"></operation-log-table>
|
|
||||||
@search="search"
|
|
||||||
</template>
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import operationLogTable from '@/components/table/settings/OperationLogTable'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'operationLog',
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
operationLogTable
|
|
||||||
},
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.operationLog,
|
|
||||||
tableId: 'operationLogTable' // 需要分页的table的id,用于记录每页数量
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:tableId="tableId"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:api="url"
|
|
||||||
:from="fromRoute.roles"
|
|
||||||
:layout="['columnCustomize','elementSet','search']"
|
|
||||||
@search="search"
|
|
||||||
>
|
|
||||||
<template v-slot:top-tool-right>
|
|
||||||
<button id="roles-add" :title="$t('overall.createRole')" class="top-tool-btn margin-r-10"
|
|
||||||
type="button" @click="add">
|
|
||||||
<i class="cn-icon-add cn-icon"></i>
|
|
||||||
</button>
|
|
||||||
<delete-button id="role-list-batch-delete" :api="url" :delete-objs="batchDeleteObjs" @after="getTableData" @before="delFlag=true"></delete-button>
|
|
||||||
</template>
|
|
||||||
<template v-slot:default>
|
|
||||||
<roles-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@delete="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
></roles-table>
|
|
||||||
</template>
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
<el-drawer
|
|
||||||
v-model="rightBox.show"
|
|
||||||
direction="rtl"
|
|
||||||
:with-header="false"
|
|
||||||
destroy-on-close>
|
|
||||||
<role-box :object="object" @close="closeRightBox"></role-box>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import rolesTable from '@/components/table/settings/RoleTable'
|
|
||||||
import roleBox from '@/components/rightBox/settings/RoleBox'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
import { get } from '@/utils/http'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'roles',
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
roleBox,
|
|
||||||
rolesTable
|
|
||||||
},
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.role,
|
|
||||||
tableId: 'rolesTable', // 需要分页的table的id,用于记录每页数量
|
|
||||||
blankObject: { // 空白对象
|
|
||||||
name: '',
|
|
||||||
buildIn: '',
|
|
||||||
i18n: '',
|
|
||||||
id: '',
|
|
||||||
menuIds: [],
|
|
||||||
remark: '',
|
|
||||||
uby: 0,
|
|
||||||
utime: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
edit (u) {
|
|
||||||
get(`${this.url}`, { ids: u.id }).then(response => {
|
|
||||||
if (response.code === 200) {
|
|
||||||
this.object = response.data.list[0]
|
|
||||||
this.rightBox.show = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div style="height: 100%;">
|
|
||||||
<cn-data-list
|
|
||||||
ref="dataList"
|
|
||||||
:tableId="tableId"
|
|
||||||
v-model:custom-table-title="tools.customTableTitle"
|
|
||||||
:api="url"
|
|
||||||
:from="fromRoute.user"
|
|
||||||
:layout="['columnCustomize','elementSet','search']"
|
|
||||||
@search="search"
|
|
||||||
>
|
|
||||||
<template #top-tool-right>
|
|
||||||
<button
|
|
||||||
id="account-add"
|
|
||||||
class="top-tool-btn margin-r-10"
|
|
||||||
type="button"
|
|
||||||
@click="add"
|
|
||||||
>
|
|
||||||
<i class="cn-icon-add cn-icon"/>
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<user-table
|
|
||||||
ref="dataTable"
|
|
||||||
v-loading="tools.loading"
|
|
||||||
:api="url"
|
|
||||||
:custom-table-title="tools.customTableTitle"
|
|
||||||
:height="mainTableHeight"
|
|
||||||
:table-data="tableData"
|
|
||||||
@delete="del"
|
|
||||||
@edit="edit"
|
|
||||||
@orderBy="tableDataSort"
|
|
||||||
@reload="getTableData"
|
|
||||||
@selectionChange="selectionChange"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #pagination>
|
|
||||||
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
|
|
||||||
</template>
|
|
||||||
</cn-data-list>
|
|
||||||
<el-drawer
|
|
||||||
v-model="rightBox.show"
|
|
||||||
direction="rtl"
|
|
||||||
:with-header="false"
|
|
||||||
destroy-on-close>
|
|
||||||
<user-box
|
|
||||||
:object="object"
|
|
||||||
@close="closeRightBox"
|
|
||||||
/>
|
|
||||||
</el-drawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cnDataList from '@/components/table/CnDataList'
|
|
||||||
import dataListMixin from '@/mixins/data-list'
|
|
||||||
import userTable from '@/components/table/settings/UserTable'
|
|
||||||
import userBox from '@/components/rightBox/settings/UserBox'
|
|
||||||
import { api } from '@/utils/api'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'User',
|
|
||||||
mixins: [dataListMixin],
|
|
||||||
components: {
|
|
||||||
cnDataList,
|
|
||||||
userTable,
|
|
||||||
userBox
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
url: api.user,
|
|
||||||
blankObject: { // 空白对象
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
username: '',
|
|
||||||
email: '',
|
|
||||||
pin: '',
|
|
||||||
mobile: '',
|
|
||||||
status: 1,
|
|
||||||
roleIds: '',
|
|
||||||
pinChange: ''
|
|
||||||
},
|
|
||||||
tableId: 'userTable'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user