mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-13 05:39:06 +00:00
perf: 修改系统设置布局
This commit is contained in:
@@ -1528,6 +1528,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"TaskList": "Task list",
|
||||||
|
"Announcement": "Announcement",
|
||||||
|
"Features": "Features enable",
|
||||||
|
"PasswordRule": "Password rule",
|
||||||
|
"PasswordSecurity": "Password security",
|
||||||
|
"SessionSecurity": "Session security",
|
||||||
|
"AuthSecurity": "Auth security",
|
||||||
|
"MsgSubscribe": "Message subscribe",
|
||||||
|
"Message": "Message setting",
|
||||||
"ServerTime": "Server time",
|
"ServerTime": "Server time",
|
||||||
"Custom": "Custom",
|
"Custom": "Custom",
|
||||||
"CleanHelpText": "Regular cleanup tasks will be executed at 2 o'clock in the morning every day, and the cleaned data cannot be recovered",
|
"CleanHelpText": "Regular cleanup tasks will be executed at 2 o'clock in the morning every day, and the cleaned data cannot be recovered",
|
||||||
|
@@ -1523,6 +1523,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"TaskList": "タスクリスト",
|
||||||
|
"Announcement": "公告",
|
||||||
|
"Features": "機能有効",
|
||||||
|
"PasswordRule": "パスワードルール",
|
||||||
|
"PasswordSecurity": "パスワードセキュリティ",
|
||||||
|
"SessionSecurity": "セッションセキュリティ",
|
||||||
|
"AuthSecurity": "認証とセキュリティ",
|
||||||
|
"MsgSubscribe": "メッセージ購読",
|
||||||
|
"Message": "メッセージ設定",
|
||||||
"ServerTime": "サーバータイムです",
|
"ServerTime": "サーバータイムです",
|
||||||
"Custom": "カスタムです",
|
"Custom": "カスタムです",
|
||||||
"CleanHelpText": "定期清理タスクは毎日午前2時に実行され、クリーンアップ後のデータは復元できません",
|
"CleanHelpText": "定期清理タスクは毎日午前2時に実行され、クリーンアップ後のデータは復元できません",
|
||||||
|
@@ -1520,6 +1520,15 @@
|
|||||||
"PublishStatus": "发布状态"
|
"PublishStatus": "发布状态"
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
|
"TaskList": "任务列表",
|
||||||
|
"Announcement": "公告",
|
||||||
|
"Features": "功能启用",
|
||||||
|
"PasswordRule": "密码规则",
|
||||||
|
"PasswordSecurity": "密码安全",
|
||||||
|
"SessionSecurity": "会话安全",
|
||||||
|
"AuthSecurity": "认证安全",
|
||||||
|
"MsgSubscribe": "消息订阅",
|
||||||
|
"Message": "消息通知",
|
||||||
"Vault": "密钥匣子",
|
"Vault": "密钥匣子",
|
||||||
"ServerTime": "服务器时间",
|
"ServerTime": "服务器时间",
|
||||||
"Custom": "自定义",
|
"Custom": "自定义",
|
||||||
|
@@ -125,7 +125,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取提交的方法
|
// 获取提交的方法
|
||||||
submitMethod: {
|
submitMethod: {
|
||||||
type: Function,
|
type: [Function, String],
|
||||||
default: function() {
|
default: function() {
|
||||||
const params = this.$route.params
|
const params = this.$route.params
|
||||||
if (params.id) {
|
if (params.id) {
|
||||||
@@ -271,7 +271,11 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
method() {
|
method() {
|
||||||
return this.submitMethod(this)
|
if (this.submitMethod instanceof Function) {
|
||||||
|
return this.submitMethod(this)
|
||||||
|
} else {
|
||||||
|
return this.submitMethod
|
||||||
|
}
|
||||||
},
|
},
|
||||||
iUrl() {
|
iUrl() {
|
||||||
// 更新或创建的url
|
// 更新或创建的url
|
||||||
|
@@ -7,7 +7,7 @@ import i18n from '@/i18n/i18n'
|
|||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: '/ops/celery/task/:id/log/',
|
path: '/ops/celery/task/:id/log/',
|
||||||
component: () => import('@/views/tasks/CeleryTaskLog'),
|
component: () => import('@/views/settings/Task/CeleryTaskLog'),
|
||||||
name: 'CeleryTaskLog',
|
name: 'CeleryTaskLog',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -17,7 +17,7 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/ops/ansible/task/:id/log/',
|
path: '/ops/ansible/task/:id/log/',
|
||||||
component: () => import('@/views/tasks/CeleryTaskLog'),
|
component: () => import('@/views/settings/Task/CeleryTaskLog'),
|
||||||
name: 'AnsibleTaskLog',
|
name: 'AnsibleTaskLog',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -27,7 +27,7 @@ export default [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/ops/task/task/:id/log/',
|
path: '/ops/task/task/:id/log/',
|
||||||
component: () => import('@/views/tasks/CeleryTaskLog'),
|
component: () => import('@/views/settings/Task/CeleryTaskLog'),
|
||||||
name: 'TaskLog',
|
name: 'TaskLog',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
|
@@ -30,11 +30,76 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/settings/email',
|
path: '/settings/orgs',
|
||||||
name: 'Email',
|
component: empty,
|
||||||
component: () => import('@/views/settings/Email'),
|
redirect: '',
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('setting.Email'),
|
app: 'orgs',
|
||||||
|
resource: 'organization',
|
||||||
|
permissions: ['orgs.view_organization'],
|
||||||
|
licenseRequired: true
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: () => import('@/views/settings/Org/OrganizationList'),
|
||||||
|
name: 'OrganizationList',
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('xpack.Organization.OrganizationList'),
|
||||||
|
icon: 'organization-set',
|
||||||
|
permissions: ['orgs.view_organization']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'create',
|
||||||
|
component: () => import('@/views/settings/Org/OrganizationCreateUpdate'),
|
||||||
|
name: 'OrganizationCreate',
|
||||||
|
hidden: true,
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('xpack.Organization.OrganizationCreate'),
|
||||||
|
action: 'create',
|
||||||
|
permissions: ['orgs.add_organization']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id/update',
|
||||||
|
component: () => import('@/views/settings/Org/OrganizationCreateUpdate'),
|
||||||
|
name: 'OrganizationUpdate',
|
||||||
|
hidden: true,
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('xpack.Organization.OrganizationUpdate'),
|
||||||
|
action: 'update',
|
||||||
|
permissions: ['orgs.change_organization']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: ':id',
|
||||||
|
component: () => import('@/views/settings/Org/OrganizationDetail/index'),
|
||||||
|
name: 'OrganizationDetail',
|
||||||
|
hidden: true,
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('xpack.Organization.OrganizationDetail'),
|
||||||
|
permissions: ['orgs.view_organization']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settings/msg',
|
||||||
|
name: 'Msg',
|
||||||
|
component: () => import('@/views/settings/Msg'),
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('setting.Message'),
|
||||||
|
icon: 'email-set',
|
||||||
|
permissions: ['settings.change_email']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/settings/features',
|
||||||
|
name: 'Feature',
|
||||||
|
component: () => import('@/views/settings/Feature'),
|
||||||
|
meta: {
|
||||||
|
title: i18n.t('setting.Features'),
|
||||||
icon: 'email-set',
|
icon: 'email-set',
|
||||||
permissions: ['settings.change_email']
|
permissions: ['settings.change_email']
|
||||||
}
|
}
|
||||||
@@ -49,37 +114,6 @@ export default {
|
|||||||
permissions: ['settings.change_auth']
|
permissions: ['settings.change_auth']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/settings/vault',
|
|
||||||
name: 'Vault',
|
|
||||||
component: () => import('@/views/settings/Vault'),
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('setting.Vault'),
|
|
||||||
icon: 'security',
|
|
||||||
permissions: ['settings.change_vault']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/settings/message',
|
|
||||||
name: 'SysMessageSub',
|
|
||||||
component: () => import('@/views/settings/Message'),
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('setting.MessageSub'),
|
|
||||||
icon: 'remind',
|
|
||||||
permissions: ['settings.change_systemmsgsubscription']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/settings/sms',
|
|
||||||
name: 'SMS',
|
|
||||||
component: () => import('@/views/settings/SMS'),
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('setting.SMS'),
|
|
||||||
icon: 'short-message',
|
|
||||||
permissions: ['settings.change_sms'],
|
|
||||||
licenseRequired: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/settings/terminal',
|
path: '/settings/terminal',
|
||||||
component: empty,
|
component: empty,
|
||||||
@@ -286,16 +320,6 @@ export default {
|
|||||||
permissions: ['settings.change_security']
|
permissions: ['settings.change_security']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/settings/clean',
|
|
||||||
name: 'Clean',
|
|
||||||
component: () => import('@/views/settings/Clean'),
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('setting.Cleaning'),
|
|
||||||
icon: 'clean',
|
|
||||||
permissions: ['settings.change_clean']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/settings/interface',
|
path: '/settings/interface',
|
||||||
name: 'Interface',
|
name: 'Interface',
|
||||||
@@ -307,61 +331,6 @@ export default {
|
|||||||
permissions: ['settings.change_interface']
|
permissions: ['settings.change_interface']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/settings/orgs',
|
|
||||||
component: empty,
|
|
||||||
redirect: '',
|
|
||||||
meta: {
|
|
||||||
app: 'orgs',
|
|
||||||
resource: 'organization',
|
|
||||||
permissions: ['orgs.view_organization'],
|
|
||||||
licenseRequired: true
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: () => import('@/views/settings/Org/OrganizationList'),
|
|
||||||
name: 'OrganizationList',
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('xpack.Organization.OrganizationList'),
|
|
||||||
icon: 'organization-set',
|
|
||||||
permissions: ['orgs.view_organization']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'create',
|
|
||||||
component: () => import('@/views/settings/Org/OrganizationCreateUpdate'),
|
|
||||||
name: 'OrganizationCreate',
|
|
||||||
hidden: true,
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('xpack.Organization.OrganizationCreate'),
|
|
||||||
action: 'create',
|
|
||||||
permissions: ['orgs.add_organization']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: ':id/update',
|
|
||||||
component: () => import('@/views/settings/Org/OrganizationCreateUpdate'),
|
|
||||||
name: 'OrganizationUpdate',
|
|
||||||
hidden: true,
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('xpack.Organization.OrganizationUpdate'),
|
|
||||||
action: 'update',
|
|
||||||
permissions: ['orgs.change_organization']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: ':id',
|
|
||||||
component: () => import('@/views/settings/Org/OrganizationDetail/index'),
|
|
||||||
name: 'OrganizationDetail',
|
|
||||||
hidden: true,
|
|
||||||
meta: {
|
|
||||||
title: i18n.t('xpack.Organization.OrganizationDetail'),
|
|
||||||
permissions: ['orgs.view_organization']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/settings/tools',
|
path: '/settings/tools',
|
||||||
@@ -385,7 +354,7 @@ export default {
|
|||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
name: 'TaskList',
|
name: 'TaskList',
|
||||||
component: () => import('@/views/tasks/TaskList'),
|
component: () => import('@/views/settings/Task/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: i18n.t('route.TaskList'),
|
title: i18n.t('route.TaskList'),
|
||||||
permissions: ['ops.view_celerytask']
|
permissions: ['ops.view_celerytask']
|
||||||
@@ -393,7 +362,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':id',
|
path: ':id',
|
||||||
component: () => import('@/views/tasks/TaskDetail'),
|
component: () => import('@/views/settings/Task/TaskDetail'),
|
||||||
name: 'TaskDetail',
|
name: 'TaskDetail',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
|
@@ -43,9 +43,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
|
import { DEFAULT_ORG_ID, SYSTEM_ORG_ID } from '@/utils/org'
|
||||||
import ListTable from '@/components/Table/ListTable'
|
import ListTable from '@/components/Table/ListTable/index.vue'
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog/index.vue'
|
||||||
import Select2 from '@/components/Form/FormFields/Select2'
|
import Select2 from '@/components/Form/FormFields/Select2.vue'
|
||||||
import { importLdapUser, refreshLdapUserCache, startLdapUserCache } from '@/api/settings'
|
import { importLdapUser, refreshLdapUserCache, startLdapUserCache } from '@/api/settings'
|
||||||
import { getErrorResponseMsg } from '@/utils/common'
|
import { getErrorResponseMsg } from '@/utils/common'
|
||||||
|
|
@@ -20,7 +20,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
import { CronTab, Dialog } from '@/components'
|
import { CronTab, Dialog } from '@/components'
|
||||||
import Select2 from '@/components/Form/FormFields/Select2'
|
import Select2 from '@/components/Form/FormFields/Select2.vue'
|
||||||
import { Required } from '@/components/Form/DataForm/rules'
|
import { Required } from '@/components/Form/DataForm/rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-bind="$attrs"
|
|
||||||
:title="$tc('setting.testLdapLoginTitle') "
|
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
:loading-status="testLdapLoginStatus"
|
:loading-status="testLdapLoginStatus"
|
||||||
:show-cancel="false"
|
:show-cancel="false"
|
||||||
v-on="$listeners"
|
:title="$tc('setting.testLdapLoginTitle') "
|
||||||
|
v-bind="$attrs"
|
||||||
@confirm="testUserLoginClick()"
|
@confirm="testUserLoginClick()"
|
||||||
|
v-on="$listeners"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
:model="userLoginForm"
|
:model="userLoginForm"
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
<el-form-item :label="$tc('setting.password')">
|
<el-form-item :label="$tc('setting.password')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="userLoginForm.password"
|
v-model="userLoginForm.password"
|
||||||
type="password"
|
|
||||||
:placeholder="$tc('setting.passwordPlaceholder')"
|
:placeholder="$tc('setting.passwordPlaceholder')"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
type="password"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog/index.vue'
|
||||||
import { testLdapUserLogin } from '@/api/settings'
|
import { testLdapUserLogin } from '@/api/settings'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -7,11 +7,11 @@
|
|||||||
</IBox>
|
</IBox>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
import { testLdapSetting } from '@/api/settings'
|
import { testLdapSetting } from '@/api/settings'
|
||||||
import ImportDialog from './ImportDialog'
|
import ImportDialog from './ImportDialog.vue'
|
||||||
import TestLoginDialog from './TestLoginDialog'
|
import TestLoginDialog from './TestLoginDialog.vue'
|
||||||
import SyncSettingDialog from './SyncSettingDialog'
|
import SyncSettingDialog from './SyncSettingDialog.vue'
|
||||||
import { IBox } from '@/components'
|
import { IBox } from '@/components'
|
||||||
import rules, { JsonRequired } from '@/components/Form/DataForm/rules'
|
import rules, { JsonRequired } from '@/components/Form/DataForm/rules'
|
||||||
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
|
import { JsonEditor, UpdateToken } from '@/components/Form/FormFields'
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TabPage from '@/layout/components/TabPage'
|
import TabPage from '@/layout/components/TabPage'
|
||||||
import LDAP from '../Ldap'
|
import LDAP from './Ldap'
|
||||||
import Base from './Base'
|
import Base from './Base'
|
||||||
import Basic from './Basic'
|
import Basic from './Basic'
|
||||||
import CAS from './CAS'
|
import CAS from './CAS'
|
||||||
|
62
src/views/settings/Basic/Common.vue
Normal file
62
src/views/settings/Basic/Common.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm
|
||||||
|
:create-success-next-route="successUrl"
|
||||||
|
:has-detail-in-msg="false"
|
||||||
|
:submit-method="submitMethod"
|
||||||
|
:update-success-next-route="successUrl"
|
||||||
|
v-bind="$data"
|
||||||
|
/>
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { IBox } from '@/components'
|
||||||
|
import rules from '@/components/Form/DataForm/rules'
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Basic',
|
||||||
|
components: {
|
||||||
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('common.BasicInfo'), [
|
||||||
|
'SITE_URL', // 'USER_GUIDE_URL',
|
||||||
|
'GLOBAL_ORG_DISPLAY_NAME'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
SITE_URL: {
|
||||||
|
rules: [rules.Required]
|
||||||
|
},
|
||||||
|
GLOBAL_ORG_DISPLAY_NAME: {
|
||||||
|
hidden: () => {
|
||||||
|
return !this.$store.getters.hasValidLicense
|
||||||
|
}
|
||||||
|
},
|
||||||
|
TICKETS_ENABLED: {
|
||||||
|
hidden: () => {
|
||||||
|
return !this.$store.getters.hasValidLicense
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
successUrl: { name: 'Basic' },
|
||||||
|
url: '/api/v1/settings/setting/?category=basic'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitMethod() {
|
||||||
|
return 'patch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
@@ -1,68 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericCreateUpdatePage
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
v-bind="$data"
|
<keep-alive>
|
||||||
:update-success-next-route="successUrl"
|
<component :is="activeMenu" />
|
||||||
:create-success-next-route="successUrl"
|
</keep-alive>
|
||||||
:has-detail-in-msg="false"
|
</TabPage>
|
||||||
:submit-method="submitMethod"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import TabPage from '@/layout/components/TabPage/index.vue'
|
||||||
import rules from '@/components/Form/DataForm/rules'
|
import Basic from './Common.vue'
|
||||||
import Announcement from './announcement'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Basic',
|
name: 'Index',
|
||||||
components: {
|
components: { TabPage, Basic },
|
||||||
GenericCreateUpdatePage
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fields: [
|
activeMenu: 'Basic',
|
||||||
[
|
submenu: [
|
||||||
this.$t('common.BasicInfo'), [
|
{
|
||||||
'SITE_URL', // 'USER_GUIDE_URL',
|
title: this.$t('common.Basic'),
|
||||||
'GLOBAL_ORG_DISPLAY_NAME'
|
name: 'Basic'
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
this.$t('setting.Feature'), [
|
|
||||||
'TICKETS_ENABLED',
|
|
||||||
'ANNOUNCEMENT_ENABLED'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
fieldsMeta: {
|
|
||||||
SITE_URL: {
|
|
||||||
rules: [rules.Required]
|
|
||||||
},
|
|
||||||
GLOBAL_ORG_DISPLAY_NAME: {
|
|
||||||
hidden: () => {
|
|
||||||
return !this.$store.getters.hasValidLicense
|
|
||||||
}
|
|
||||||
},
|
|
||||||
TICKETS_ENABLED: {
|
|
||||||
hidden: () => {
|
|
||||||
return !this.$store.getters.hasValidLicense
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ANNOUNCEMENT_ENABLED: {
|
|
||||||
component: Announcement
|
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
successUrl: { name: 'Basic' },
|
|
||||||
url: '/api/v1/settings/setting/?category=basic'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
submitMethod() {
|
|
||||||
return 'patch'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,29 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<IBox>
|
||||||
<el-button v-if="!value" type="default" size="mini" @click="visible=true">{{ $t('setting.Enable') }}</el-button>
|
<GenericCreateUpdateForm v-bind="config" @submitSuccess="submitSuccess" />
|
||||||
<el-button v-else type="primary" size="mini" @click="visible=true">{{ $t('setting.Setting') }}</el-button>
|
</IBox>
|
||||||
<Dialog
|
|
||||||
v-if="visible"
|
|
||||||
:visible.sync="visible"
|
|
||||||
:title="title"
|
|
||||||
:destroy-on-close="true"
|
|
||||||
:show-cancel="false"
|
|
||||||
:show-confirm="false"
|
|
||||||
width="70%"
|
|
||||||
v-on="$listeners"
|
|
||||||
>
|
|
||||||
<GenericCreateUpdateForm v-bind="config" @submitSuccess="submitSuccess" />
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Dialog from '@/components/Dialog'
|
|
||||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
|
import { IBox } from '@/components'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Announcement',
|
name: 'Announcement',
|
||||||
components: {
|
components: {
|
||||||
Dialog, GenericCreateUpdateForm
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
50
src/views/settings/Feature/Basic.vue
Normal file
50
src/views/settings/Feature/Basic.vue
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm
|
||||||
|
:create-success-next-route="successUrl"
|
||||||
|
:has-detail-in-msg="false"
|
||||||
|
:submit-method="submitMethod"
|
||||||
|
:update-success-next-route="successUrl"
|
||||||
|
v-bind="$data"
|
||||||
|
/>
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { IBox } from '@/components'
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Basic',
|
||||||
|
components: {
|
||||||
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('setting.Basic'), [
|
||||||
|
'TICKETS_ENABLED'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
TICKETS_ENABLED: {
|
||||||
|
disabled: this.$store.getters.hasValidLicense
|
||||||
|
}
|
||||||
|
},
|
||||||
|
successUrl: { name: 'Basic' },
|
||||||
|
url: '/api/v1/settings/setting/?category=basic'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitMethod() {
|
||||||
|
return 'patch'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-alert type="warning" v-html="helpText" />
|
<el-alert type="success" v-html="helpText" />
|
||||||
<IBox>
|
<IBox>
|
||||||
<GenericCreateUpdateForm v-bind="$data" />
|
<GenericCreateUpdateForm v-bind="$data" />
|
||||||
</IBox>
|
</IBox>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
import IBox from '@/components/IBox'
|
import IBox from '@/components/IBox/index.vue'
|
||||||
import { openTaskPage } from '@/utils/jms'
|
import { openTaskPage } from '@/utils/jms'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
43
src/views/settings/Feature/index.vue
Normal file
43
src/views/settings/Feature/index.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
|
<keep-alive>
|
||||||
|
<component :is="activeMenu" />
|
||||||
|
</keep-alive>
|
||||||
|
</TabPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TabPage from '@/layout/components/TabPage/index.vue'
|
||||||
|
import Announcement from './Announcement.vue'
|
||||||
|
import Basic from './Basic.vue'
|
||||||
|
import Vault from './Vault.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Feature',
|
||||||
|
components: { TabPage, Basic, Announcement, Vault },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeMenu: 'Basic',
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
title: this.$t('common.Basic'),
|
||||||
|
name: 'Basic'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.Announcement'),
|
||||||
|
name: 'Announcement'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.Vault'),
|
||||||
|
name: 'Vault',
|
||||||
|
hidden: !this.$hasPerm('settings.change_vault')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -3,10 +3,10 @@
|
|||||||
<el-button size="mini" type="primary" @click="visible = !visible"> {{ $t("setting.Setting") }} </el-button>
|
<el-button size="mini" type="primary" @click="visible = !visible"> {{ $t("setting.Setting") }} </el-button>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-if="visible"
|
v-if="visible"
|
||||||
:title="$tc('setting.CreateUserSetting')"
|
|
||||||
:visible.sync="visible"
|
|
||||||
:show-cancel="false"
|
:show-cancel="false"
|
||||||
:show-confirm="false"
|
:show-confirm="false"
|
||||||
|
:title="$tc('setting.CreateUserSetting')"
|
||||||
|
:visible.sync="visible"
|
||||||
width="70%"
|
width="70%"
|
||||||
@confirm="onConfirm()"
|
@confirm="onConfirm()"
|
||||||
>
|
>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
import { Dialog } from '@/components'
|
import { Dialog } from '@/components'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
import { Dialog } from '@/components'
|
import { Dialog } from '@/components'
|
||||||
import { UpdateToken } from '@/components/Form/FormFields'
|
import { UpdateToken } from '@/components/Form/FormFields'
|
||||||
|
|
@@ -1,22 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericCreateUpdatePage
|
<IBox>
|
||||||
v-bind="$data"
|
<GenericCreateUpdateForm
|
||||||
:update-success-next-route="successUrl"
|
:create-success-next-route="successUrl"
|
||||||
:create-success-next-route="successUrl"
|
:update-success-next-route="successUrl"
|
||||||
/>
|
v-bind="$data"
|
||||||
|
/>
|
||||||
|
</IBox>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import { IBox } from '@/components'
|
||||||
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
import { testEmailSetting } from '@/api/settings'
|
import { testEmailSetting } from '@/api/settings'
|
||||||
import EmailContent from './EmailContent'
|
import EmailContent from './EmailContent.vue'
|
||||||
import SMTP from './SMTP'
|
import SMTP from './SMTP.vue'
|
||||||
import rules from '@/components/Form/DataForm/rules'
|
import rules from '@/components/Form/DataForm/rules'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Email',
|
name: 'Email',
|
||||||
components: {
|
components: {
|
||||||
GenericCreateUpdatePage
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const vm = this
|
const vm = this
|
||||||
@@ -43,7 +48,7 @@ export default {
|
|||||||
[
|
[
|
||||||
this.$t('common.Other'),
|
this.$t('common.Other'),
|
||||||
[
|
[
|
||||||
'EMAIL_RECIPIENT'
|
'EMAIL_RECIPIENT', 'EMAIL_SUFFIX'
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" size="mini" @click="visible=true">{{ $t('setting.Setting') }}</el-button>
|
<el-button size="mini" type="primary" @click="visible=true">{{ $t('setting.Setting') }}</el-button>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-if="visible"
|
v-if="visible"
|
||||||
:visible.sync="visible"
|
|
||||||
:title="title"
|
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
:show-cancel="false"
|
:show-cancel="false"
|
||||||
:show-confirm="false"
|
:show-confirm="false"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="visible"
|
||||||
width="70%"
|
width="70%"
|
||||||
v-on="$listeners"
|
|
||||||
@confirm="onConfirm()"
|
@confirm="onConfirm()"
|
||||||
|
v-on="$listeners"
|
||||||
>
|
>
|
||||||
<GenericCreateUpdateForm ref="form" v-bind="iConfig" @submitSuccess="submitSuccess" />
|
<GenericCreateUpdateForm ref="form" v-bind="iConfig" @submitSuccess="submitSuccess" />
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -18,8 +18,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog/index.vue'
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Base',
|
name: 'Base',
|
||||||
components: {
|
components: {
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base.vue'
|
||||||
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base.vue'
|
||||||
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base.vue'
|
||||||
import { JsonEditor, PhoneInput } from '@/components/Form/FormFields'
|
import { JsonEditor, PhoneInput } from '@/components/Form/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base.vue'
|
||||||
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseSMS from './Base'
|
import BaseSMS from './Base.vue'
|
||||||
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
import { PhoneInput, UpdateToken } from '@/components/Form/FormFields'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -1,19 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericCreateUpdatePage v-bind="$data" class="form" />
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm class="form" v-bind="$data" />
|
||||||
|
</IBox>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
import SMSAlibaba from './SMSAlibaba'
|
import SMSAlibaba from './SMSAlibaba.vue'
|
||||||
import SMSTencent from './SMSTencent'
|
import SMSTencent from './SMSTencent.vue'
|
||||||
import SMSHuawei from './SMSHuawei'
|
import SMSHuawei from './SMSHuawei.vue'
|
||||||
import SMSCustom from './SMSCustom'
|
import SMSCustom from './SMSCustom.vue'
|
||||||
import CMPP2 from './CMPP2'
|
import CMPP2 from './CMPP2.vue'
|
||||||
|
import { IBox } from '@/components'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Auth',
|
name: 'Auth',
|
||||||
components: {
|
components: {
|
||||||
GenericCreateUpdatePage
|
GenericCreateUpdateForm,
|
||||||
|
IBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
@@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Dialog from '@/components/Dialog'
|
import Dialog from '@/components/Dialog/index.vue'
|
||||||
import { krryPaging } from 'krry-transfer'
|
import { krryPaging } from 'krry-transfer'
|
||||||
import { getUserList } from '@/api/users'
|
import { getUserList } from '@/api/users'
|
||||||
|
|
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<Page v-bind="$attrs">
|
<IBox v-bind="$attrs">
|
||||||
<div>
|
<div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
row-key="id"
|
|
||||||
default-expand-all
|
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
||||||
:span-method="spanMethod"
|
:span-method="spanMethod"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
|
default-expand-all
|
||||||
|
row-key="id"
|
||||||
>
|
>
|
||||||
<el-table-column :label="$tc('notifications.MessageType')" width="230">
|
<el-table-column :label="$tc('notifications.MessageType')" width="230">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
v-model="scope.row.receiveBackends[header.name]"
|
v-model="scope.row.receiveBackends[header.name]"
|
||||||
@change="onCheckReceiveBackend(scope.row)"
|
@change="onCheckReceiveBackend(scope.row)"
|
||||||
/>
|
/>
|
||||||
<el-checkbox v-else :value="true" :disabled="true" />
|
<el-checkbox v-else :disabled="true" :value="true" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -44,23 +44,23 @@
|
|||||||
|
|
||||||
<SelectDialog
|
<SelectDialog
|
||||||
v-if="dialogVisible"
|
v-if="dialogVisible"
|
||||||
:visible.sync="dialogVisible"
|
|
||||||
:title="$tc('notifications.ChangeReceiver')"
|
|
||||||
:selected-users="dialogSelectedUsers"
|
:selected-users="dialogSelectedUsers"
|
||||||
@submit="onDialogSelectSubmit"
|
:title="$tc('notifications.ChangeReceiver')"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
@cancel="dialogVisible=false"
|
@cancel="dialogVisible=false"
|
||||||
|
@submit="onDialogSelectSubmit"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
</IBox>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Page from '@/layout/components/Page'
|
import SelectDialog from './SelectDialog.vue'
|
||||||
import SelectDialog from './SelectDialog'
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Page,
|
IBox,
|
||||||
SelectDialog
|
SelectDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
45
src/views/settings/Msg/index.vue
Normal file
45
src/views/settings/Msg/index.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
|
<keep-alive>
|
||||||
|
<component :is="activeMenu" />
|
||||||
|
</keep-alive>
|
||||||
|
</TabPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TabPage from '@/layout/components/TabPage/index.vue'
|
||||||
|
import Email from './Email/index.vue'
|
||||||
|
import Subscribe from './Subscribe/index.vue'
|
||||||
|
import SMS from './SMS/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: { TabPage, Email, Subscribe, SMS },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeMenu: 'Email',
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
title: this.$t('setting.Email'),
|
||||||
|
name: 'Email',
|
||||||
|
hidden: !this.$hasPerm('settings.change_email')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.SMS'),
|
||||||
|
name: 'SMS',
|
||||||
|
hidden: !this.$hasPerm('settings.change_sms')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.MsgSubscribe'),
|
||||||
|
name: 'Subscribe',
|
||||||
|
hidden: !this.$hasPerm('settings.change_systemmsgsubscription')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -31,12 +31,6 @@ export default {
|
|||||||
'EMAIL_SUFFIX'
|
'EMAIL_SUFFIX'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
|
||||||
this.$t('setting.OTP'),
|
|
||||||
[
|
|
||||||
'OTP_ISSUER_NAME', 'OTP_VALID_WINDOW'
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
this.$t('setting.Perm'),
|
this.$t('setting.Perm'),
|
||||||
[
|
[
|
||||||
|
85
src/views/settings/Security/Auth.vue
Normal file
85
src/views/settings/Security/Auth.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm submit-method="patch" v-bind="config" />
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Auth',
|
||||||
|
components: { GenericCreateUpdateForm, IBox },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config: {
|
||||||
|
url: '/api/v1/settings/setting/?category=security',
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('common.Basic'),
|
||||||
|
[
|
||||||
|
'SECURITY_LOGIN_CAPTCHA_ENABLED',
|
||||||
|
'SECURITY_LOGIN_CHALLENGE_ENABLED',
|
||||||
|
'SECURITY_UNCOMMON_USERS_TTL',
|
||||||
|
'SECURITY_CHECK_DIFFERENT_CITY_LOGIN'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'MFA',
|
||||||
|
[
|
||||||
|
'SECURITY_MFA_AUTH',
|
||||||
|
'SECURITY_MFA_IN_LOGIN_PAGE',
|
||||||
|
'SECURITY_MFA_AUTH_ENABLED_FOR_THIRD_PARTY',
|
||||||
|
'SECURITY_MFA_VERIFY_TTL',
|
||||||
|
'OTP_ISSUER_NAME', 'OTP_VALID_WINDOW'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
SECURITY_LOGIN_CHALLENGE_ENABLED: {
|
||||||
|
on: {
|
||||||
|
change: ([val], updateForm) => {
|
||||||
|
if (val) {
|
||||||
|
updateForm({ SECURITY_MFA_IN_LOGIN_PAGE: false })
|
||||||
|
updateForm({ SECURITY_LOGIN_CAPTCHA_ENABLED: false })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SECURITY_MFA_IN_LOGIN_PAGE: {
|
||||||
|
hidden: (form) => {
|
||||||
|
return form['SECURITY_MFA_AUTH'] !== 1 || !this.$store.getters.hasValidLicense
|
||||||
|
},
|
||||||
|
on: {
|
||||||
|
change: ([val], updateForm) => {
|
||||||
|
if (val) {
|
||||||
|
updateForm({ SECURITY_LOGIN_CHALLENGE_ENABLED: false })
|
||||||
|
updateForm({ SECURITY_LOGIN_CAPTCHA_ENABLED: false })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
SECURITY_LOGIN_CAPTCHA_ENABLED: {
|
||||||
|
on: {
|
||||||
|
change: ([val], updateForm) => {
|
||||||
|
if (val) {
|
||||||
|
updateForm({ SECURITY_LOGIN_CHALLENGE_ENABLED: false })
|
||||||
|
updateForm({ SECURITY_MFA_IN_LOGIN_PAGE: false })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
VERIFY_CODE_TTL: {
|
||||||
|
label: this.$t('setting.ExpirationTimeout')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -1,40 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<IBox>
|
||||||
<el-button size="mini" type="primary" @click="visible = !visible">
|
<GenericCreateUpdateForm
|
||||||
{{ $t('setting.Setting') }}
|
:fields="fields"
|
||||||
</el-button>
|
:fields-meta="fieldsMeta"
|
||||||
<Dialog
|
:has-detail-in-msg="false"
|
||||||
:title="$tc('setting.AuthLimit')"
|
:submit-method="submitMethod"
|
||||||
:visible.sync="visible"
|
:url="url"
|
||||||
:destroy-on-close="true"
|
v-bind="$data"
|
||||||
:show-cancel="false"
|
/>
|
||||||
:show-confirm="false"
|
</IBox>
|
||||||
width="70%"
|
|
||||||
top="10%"
|
|
||||||
@confirm="onConfirm()"
|
|
||||||
>
|
|
||||||
<GenericCreateUpdateForm
|
|
||||||
v-bind="$data"
|
|
||||||
:fields="fields"
|
|
||||||
:url="url"
|
|
||||||
:fields-meta="fieldsMeta"
|
|
||||||
:submit-method="submitMethod"
|
|
||||||
:has-detail-in-msg="false"
|
|
||||||
/>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
||||||
import { Dialog } from '@/components'
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EmailContent',
|
name: 'EmailContent',
|
||||||
components: {
|
components: {
|
||||||
GenericCreateUpdateForm,
|
IBox,
|
||||||
Dialog
|
GenericCreateUpdateForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
39
src/views/settings/Security/Basic.vue
Normal file
39
src/views/settings/Security/Basic.vue
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm submit-method="patch" v-bind="config" />
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Basic',
|
||||||
|
components: { GenericCreateUpdateForm, IBox },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config: {
|
||||||
|
url: '/api/v1/settings/setting/?category=security',
|
||||||
|
hasDetailInMsg: false,
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('common.Basic'),
|
||||||
|
[
|
||||||
|
'SECURITY_COMMAND_EXECUTION',
|
||||||
|
'SECURITY_COMMAND_BLACKLIST',
|
||||||
|
'SECURITY_SERVICE_ACCOUNT_REGISTRATION'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
61
src/views/settings/Security/Password.vue
Normal file
61
src/views/settings/Security/Password.vue
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm
|
||||||
|
:fields="fields"
|
||||||
|
:fields-meta="fieldsMeta"
|
||||||
|
:has-detail-in-msg="false"
|
||||||
|
:submit-method="submitMethod"
|
||||||
|
:url="url"
|
||||||
|
/>
|
||||||
|
</IBox>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
||||||
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EmailContent',
|
||||||
|
components: {
|
||||||
|
IBox,
|
||||||
|
GenericCreateUpdateForm
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('common.Basic'),
|
||||||
|
[
|
||||||
|
'SECURITY_PASSWORD_EXPIRATION_TIME',
|
||||||
|
'OLD_PASSWORD_HISTORY_LIMIT_COUNT'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
this.$t('setting.PasswordRule'),
|
||||||
|
[
|
||||||
|
'SECURITY_PASSWORD_MIN_LENGTH', 'SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH',
|
||||||
|
'SECURITY_PASSWORD_UPPER_CASE', 'SECURITY_PASSWORD_LOWER_CASE',
|
||||||
|
'SECURITY_PASSWORD_NUMBER', 'SECURITY_PASSWORD_SPECIAL_CHAR'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
||||||
|
fieldsMeta: {},
|
||||||
|
url: '/api/v1/settings/setting/?category=security'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitMethod() {
|
||||||
|
return 'patch'
|
||||||
|
},
|
||||||
|
onConfirm() {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -1,63 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-button size="mini" type="primary" @click="visible = !visible">
|
|
||||||
{{ $t('setting.Setting') }}
|
|
||||||
</el-button>
|
|
||||||
<Dialog
|
|
||||||
:title="$tc('setting.PasswordCheckRule')"
|
|
||||||
:visible.sync="visible"
|
|
||||||
:destroy-on-close="true"
|
|
||||||
:show-cancel="false"
|
|
||||||
:show-confirm="false"
|
|
||||||
width="70%"
|
|
||||||
top="10%"
|
|
||||||
@confirm="onConfirm()"
|
|
||||||
>
|
|
||||||
<GenericCreateUpdateForm
|
|
||||||
:fields="fields"
|
|
||||||
:url="url"
|
|
||||||
:fields-meta="fieldsMeta"
|
|
||||||
:submit-method="submitMethod"
|
|
||||||
:has-detail-in-msg="false"
|
|
||||||
/>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm'
|
|
||||||
import { Dialog } from '@/components'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EmailContent',
|
|
||||||
components: {
|
|
||||||
GenericCreateUpdateForm,
|
|
||||||
Dialog
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
fields: [
|
|
||||||
'SECURITY_PASSWORD_MIN_LENGTH', 'SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH', 'SECURITY_PASSWORD_UPPER_CASE',
|
|
||||||
'SECURITY_PASSWORD_LOWER_CASE', 'SECURITY_PASSWORD_NUMBER', 'SECURITY_PASSWORD_SPECIAL_CHAR',
|
|
||||||
'OLD_PASSWORD_HISTORY_LIMIT_COUNT'
|
|
||||||
],
|
|
||||||
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
|
||||||
fieldsMeta: {},
|
|
||||||
url: '/api/v1/settings/setting/?category=security'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
submitMethod() {
|
|
||||||
return 'patch'
|
|
||||||
},
|
|
||||||
onConfirm() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
40
src/views/settings/Security/Session.vue
Normal file
40
src/views/settings/Security/Session.vue
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<IBox>
|
||||||
|
<GenericCreateUpdateForm submit-method="patch" v-bind="config" />
|
||||||
|
</IBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import IBox from '@/components/IBox/index.vue'
|
||||||
|
import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SessionSecurity',
|
||||||
|
components: { GenericCreateUpdateForm, IBox },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
config: {
|
||||||
|
url: '/api/v1/settings/setting/?category=security',
|
||||||
|
hasDetailInMsg: false,
|
||||||
|
fields: [
|
||||||
|
[
|
||||||
|
this.$t('common.Basic'),
|
||||||
|
[
|
||||||
|
'SECURITY_WATERMARK_ENABLED',
|
||||||
|
'SECURITY_SESSION_SHARE',
|
||||||
|
'SECURITY_MAX_IDLE_TIME',
|
||||||
|
'SECURITY_MAX_SESSION_TIME'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
fieldsMeta: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -1,110 +1,52 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericCreateUpdatePage
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
v-bind="$data"
|
<keep-alive>
|
||||||
:submit-method="submitMethod"
|
<component :is="activeMenu" />
|
||||||
:has-detail-in-msg="false"
|
</keep-alive>
|
||||||
/>
|
</TabPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericCreateUpdatePage } from '@/layout/components'
|
import TabPage from '@/layout/components/TabPage/index.vue'
|
||||||
import PasswordRule from './PasswordRule'
|
import Basic from './Basic.vue'
|
||||||
import AuthLimit from './AuthLimit'
|
import Auth from './Auth.vue'
|
||||||
|
import Password from './Password.vue'
|
||||||
|
import AuthLimit from './AuthLimit.vue'
|
||||||
|
import Session from './Session.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Security',
|
name: 'Index',
|
||||||
components: {
|
components: { TabPage, Basic, Auth, Password, AuthLimit, Session },
|
||||||
GenericCreateUpdatePage
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fields: [
|
activeMenu: 'Basic',
|
||||||
[
|
submenu: [
|
||||||
this.$t('common.Basic'),
|
{
|
||||||
[
|
title: this.$t('setting.Basic'),
|
||||||
'SECURITY_COMMAND_EXECUTION',
|
name: 'Basic'
|
||||||
'SECURITY_COMMAND_BLACKLIST',
|
|
||||||
'SECURITY_SERVICE_ACCOUNT_REGISTRATION',
|
|
||||||
'SECURITY_MAX_IDLE_TIME',
|
|
||||||
'SECURITY_MAX_SESSION_TIME',
|
|
||||||
'SECURITY_WATERMARK_ENABLED',
|
|
||||||
'SECURITY_SESSION_SHARE'
|
|
||||||
]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
this.$t('common.Auth'),
|
|
||||||
[
|
|
||||||
'SECURITY_MFA_AUTH',
|
|
||||||
'SECURITY_MFA_IN_LOGIN_PAGE',
|
|
||||||
'SECURITY_MFA_AUTH_ENABLED_FOR_THIRD_PARTY',
|
|
||||||
'SECURITY_LOGIN_CHALLENGE_ENABLED',
|
|
||||||
'SECURITY_LOGIN_CAPTCHA_ENABLED',
|
|
||||||
'SECURITY_PASSWORD_EXPIRATION_TIME',
|
|
||||||
'VERIFY_CODE_TTL',
|
|
||||||
'SECURITY_MFA_VERIFY_TTL',
|
|
||||||
'SECURITY_UNCOMMON_USERS_TTL',
|
|
||||||
'SECURITY_CHECK_DIFFERENT_CITY_LOGIN',
|
|
||||||
'AuthLimit',
|
|
||||||
'PasswordRule'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
fieldsMeta: {
|
|
||||||
SECURITY_LOGIN_CHALLENGE_ENABLED: {
|
|
||||||
on: {
|
|
||||||
change: ([val], updateForm) => {
|
|
||||||
if (val) {
|
|
||||||
updateForm({ SECURITY_MFA_IN_LOGIN_PAGE: false })
|
|
||||||
updateForm({ SECURITY_LOGIN_CAPTCHA_ENABLED: false })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
SECURITY_MFA_IN_LOGIN_PAGE: {
|
{
|
||||||
hidden: (form) => {
|
title: this.$t('setting.AuthSecurity'),
|
||||||
return form['SECURITY_MFA_AUTH'] !== 1 || !this.$store.getters.hasValidLicense
|
name: 'Auth'
|
||||||
},
|
|
||||||
on: {
|
|
||||||
change: ([val], updateForm) => {
|
|
||||||
if (val) {
|
|
||||||
updateForm({ SECURITY_LOGIN_CHALLENGE_ENABLED: false })
|
|
||||||
updateForm({ SECURITY_LOGIN_CAPTCHA_ENABLED: false })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
SECURITY_LOGIN_CAPTCHA_ENABLED: {
|
{
|
||||||
on: {
|
title: this.$t('setting.AuthLimit'),
|
||||||
change: ([val], updateForm) => {
|
name: 'AuthLimit'
|
||||||
if (val) {
|
|
||||||
updateForm({ SECURITY_LOGIN_CHALLENGE_ENABLED: false })
|
|
||||||
updateForm({ SECURITY_MFA_IN_LOGIN_PAGE: false })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
VERIFY_CODE_TTL: {
|
{
|
||||||
label: this.$t('setting.ExpirationTimeout')
|
title: this.$t('setting.PasswordSecurity'),
|
||||||
|
name: 'Password'
|
||||||
},
|
},
|
||||||
PasswordRule: {
|
{
|
||||||
label: this.$t('setting.PasswordCheckRule'),
|
title: this.$t('setting.SessionSecurity'),
|
||||||
component: PasswordRule
|
name: 'Session'
|
||||||
},
|
|
||||||
AuthLimit: {
|
|
||||||
label: this.$t('setting.AuthLimit'),
|
|
||||||
component: AuthLimit
|
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
url: '/api/v1/settings/setting/?category=security'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
submitMethod() {
|
|
||||||
return 'patch'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,20 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<Page :help-message="helpText">
|
<IBox>
|
||||||
<IBox>
|
<GenericCreateUpdateForm v-bind="$data" />
|
||||||
<GenericCreateUpdateForm v-bind="$data" />
|
</IBox>
|
||||||
</IBox>
|
|
||||||
</Page>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { CronTab, IBox } from '@/components'
|
import { CronTab, IBox } from '@/components'
|
||||||
import { GenericCreateUpdateForm, Page } from '@/layout/components'
|
import { GenericCreateUpdateForm } from '@/layout/components'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Senior',
|
name: 'Senior',
|
||||||
components: {
|
components: {
|
||||||
IBox,
|
IBox,
|
||||||
Page,
|
|
||||||
GenericCreateUpdateForm
|
GenericCreateUpdateForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -26,8 +23,9 @@ export default {
|
|||||||
[
|
[
|
||||||
this.$t('common.Logging'),
|
this.$t('common.Logging'),
|
||||||
[
|
[
|
||||||
'LOGIN_LOG_KEEP_DAYS', 'TASK_LOG_KEEP_DAYS', 'OPERATE_LOG_KEEP_DAYS',
|
'LOGIN_LOG_KEEP_DAYS', 'TASK_LOG_KEEP_DAYS',
|
||||||
'FTP_LOG_KEEP_DAYS', 'TERMINAL_SESSION_KEEP_DURATION', 'ACTIVITY_LOG_KEEP_DAYS'
|
'OPERATE_LOG_KEEP_DAYS', 'FTP_LOG_KEEP_DAYS',
|
||||||
|
'TERMINAL_SESSION_KEEP_DURATION', 'ACTIVITY_LOG_KEEP_DAYS'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
@@ -7,7 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/jsx">
|
<script type="text/jsx">
|
||||||
import DetailCard from '@/components/Cards/DetailCard'
|
import DetailCard from '@/components/Cards/DetailCard/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TaskDetail',
|
name: 'TaskDetail',
|
@@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/jsx">
|
<script type="text/jsx">
|
||||||
import ListTable from '@/components/Table/ListTable'
|
import ListTable from '@/components/Table/ListTable/index.vue'
|
||||||
import { openTaskPage } from '@/utils/jms'
|
import { openTaskPage } from '@/utils/jms'
|
||||||
|
|
||||||
export default {
|
export default {
|
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericDetailPage
|
<GenericDetailPage
|
||||||
:title="getTitle"
|
|
||||||
:object.sync="taskDetail"
|
|
||||||
:active-menu.sync="config.activeMenu"
|
:active-menu.sync="config.activeMenu"
|
||||||
|
:object.sync="taskDetail"
|
||||||
|
:title="getTitle"
|
||||||
v-bind="config"
|
v-bind="config"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
>
|
>
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GenericDetailPage, TabPage } from '@/layout/components'
|
import { GenericDetailPage, TabPage } from '@/layout/components'
|
||||||
import TaskDetail from './TaskDetail'
|
import TaskDetail from './TaskDetail.vue'
|
||||||
import TaskHistory from './TaskHistory'
|
import TaskHistory from './TaskHistory.vue'
|
||||||
import CeleryTaskLog from '../CeleryTaskLog'
|
import CeleryTaskLog from '../CeleryTaskLog.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
@@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<GenericListPage :header-actions="headerActions" :table-config="tableConfig" />
|
<ListTable :header-actions="headerActions" :table-config="tableConfig" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/jsx">
|
<script type="text/jsx">
|
||||||
import { GenericListPage } from '@/layout/components'
|
|
||||||
import { ChoicesFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
import { ChoicesFormatter, DetailFormatter } from '@/components/Table/TableFormatters'
|
||||||
import { BASE_URL } from '@/utils/common'
|
import { BASE_URL } from '@/utils/common'
|
||||||
|
import ListTable from '@/components/Table/ListTable/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
GenericListPage
|
ListTable
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
38
src/views/settings/Task/index.vue
Normal file
38
src/views/settings/Task/index.vue
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
|
<keep-alive>
|
||||||
|
<component :is="activeMenu" />
|
||||||
|
</keep-alive>
|
||||||
|
</TabPage>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import TabPage from '@/layout/components/TabPage/index.vue'
|
||||||
|
import TaskList from './TaskList.vue'
|
||||||
|
import Clean from './Clean.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: { TabPage, TaskList, Clean },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeMenu: 'TaskList',
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
title: this.$t('setting.TaskList'),
|
||||||
|
name: 'TaskList'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('setting.Cleaning'),
|
||||||
|
name: 'Clean',
|
||||||
|
hidden: !this.$hasPerm('settings.change_clean')
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
|
||||||
|
</style>
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<TabPage :submenu="submenu" :active-menu.sync="activeMenu">
|
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
||||||
<div>
|
<div>
|
||||||
<el-alert v-if="currentTime" :closable="false" type="info">
|
<el-alert v-if="currentTime" :closable="false" type="success">
|
||||||
{{ `${this.$t('setting.ServerTime')}: ${currentTime}` }}
|
{{ `${this.$t('setting.ServerTime')}: ${currentTime}` }}
|
||||||
</el-alert>
|
</el-alert>
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
|
@@ -1,47 +0,0 @@
|
|||||||
<template>
|
|
||||||
<IBox>
|
|
||||||
<GenericCreateUpdateForm v-bind="iConfig" @submitSuccess="submitSuccess" />
|
|
||||||
</IBox>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import IBox from '@/components/IBox'
|
|
||||||
import { GenericCreateUpdateForm } from '@/layout/components'
|
|
||||||
export default {
|
|
||||||
name: 'Base',
|
|
||||||
components: {
|
|
||||||
IBox,
|
|
||||||
GenericCreateUpdateForm
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
config: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
},
|
|
||||||
enableField: {
|
|
||||||
type: String,
|
|
||||||
default: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
iConfig() {
|
|
||||||
return this.config
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
submitSuccess(res) {
|
|
||||||
this.$emit('input', !!res[this.enableField])
|
|
||||||
this.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
@@ -1,45 +0,0 @@
|
|||||||
<template>
|
|
||||||
<TabPage :active-menu.sync="activeMenu" :submenu="submenu">
|
|
||||||
<keep-alive>
|
|
||||||
<component :is="activeMenu" />
|
|
||||||
</keep-alive>
|
|
||||||
</TabPage>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import TabPage from '@/layout/components/TabPage'
|
|
||||||
import Base from './Base'
|
|
||||||
import Vault from './Vault'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
TabPage,
|
|
||||||
Base,
|
|
||||||
Vault
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: true,
|
|
||||||
activeMenu: 'Vault',
|
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
title: this.$t('setting.Vault'),
|
|
||||||
name: 'Vault'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
componentData() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
Reference in New Issue
Block a user