Merge pull request '系统设置服务接入改为分组切换' (#104) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 24s
自动发布测试环境 Nacos 配置 / publish (push) Successful in 24s
Reviewed-on: #104
This commit was merged in pull request #104.
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
:key="item.id"
|
:key="item.id"
|
||||||
type="button"
|
type="button"
|
||||||
:class="['settings-subnav__item', { 'is-active': activeGroup === item.id }]"
|
:class="['settings-subnav__item', { 'is-active': activeGroup === item.id }]"
|
||||||
@click="scrollToGroup(item.id)"
|
@click="handleGroupNavClick(item.id)"
|
||||||
>
|
>
|
||||||
<span>{{ item.label }}</span>
|
<span>{{ item.label }}</span>
|
||||||
<em v-if="item.badge">{{ item.badge }}</em>
|
<em v-if="item.badge">{{ item.badge }}</em>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="activeSection === 'services'" class="settings-groups">
|
<div v-else-if="activeSection === 'services'" class="settings-groups">
|
||||||
<section id="settings-group-probe" class="settings-group">
|
<section v-if="activeServiceGroup === 'settings-group-probe'" id="settings-group-probe" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>接入诊断</h2><span class="tag">TEST</span></div>
|
<div class="settings-group__title"><h2>接入诊断</h2><span class="tag">TEST</span></div>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="settings-group-map" class="settings-group">
|
<section v-if="activeServiceGroup === 'settings-group-map'" id="settings-group-map" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>地图服务</h2><span class="tag">安全接入</span></div>
|
<div class="settings-group__title"><h2>地图服务</h2><span class="tag">安全接入</span></div>
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="settings-group-moderation" class="settings-group">
|
<section v-if="activeServiceGroup === 'settings-group-moderation'" id="settings-group-moderation" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>微信内容审核</h2><span class="tag">安全回调</span></div>
|
<div class="settings-group__title"><h2>微信内容审核</h2><span class="tag">安全回调</span></div>
|
||||||
@@ -388,7 +388,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="settings-group-storage" class="settings-group">
|
<section v-if="activeServiceGroup === 'settings-group-storage'" id="settings-group-storage" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>对象存储读取顺序</h2><span class="tag">FILE</span></div>
|
<div class="settings-group__title"><h2>对象存储读取顺序</h2><span class="tag">FILE</span></div>
|
||||||
@@ -419,7 +419,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="settings-group-sms" class="settings-group">
|
<section v-if="activeServiceGroup === 'settings-group-sms'" id="settings-group-sms" class="settings-group">
|
||||||
<header class="settings-group__head">
|
<header class="settings-group__head">
|
||||||
<div class="settings-group__head-main">
|
<div class="settings-group__head-main">
|
||||||
<div class="settings-group__title"><h2>短信服务</h2><span class="tag">SMS</span></div>
|
<div class="settings-group__title"><h2>短信服务</h2><span class="tag">SMS</span></div>
|
||||||
@@ -782,6 +782,8 @@ const toggleProbeDetail = (service: string, operation: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const activeGroup = ref('')
|
const activeGroup = ref('')
|
||||||
|
/** activeServiceGroup switches the five service groups so only one is rendered at a time. */
|
||||||
|
const activeServiceGroup = ref('settings-group-probe')
|
||||||
const groupNavItems = computed<Array<{ id: string; label: string; badge?: string }>>(() => {
|
const groupNavItems = computed<Array<{ id: string; label: string; badge?: string }>>(() => {
|
||||||
if (activeSection.value === 'runtime') {
|
if (activeSection.value === 'runtime') {
|
||||||
return [{ id: 'settings-group-account', label: '账号与登录' }, { id: 'settings-group-shop', label: '门店经营' }]
|
return [{ id: 'settings-group-account', label: '账号与登录' }, { id: 'settings-group-shop', label: '门店经营' }]
|
||||||
@@ -828,8 +830,18 @@ const scrollToGroup = (id: string) => {
|
|||||||
element.classList.add('is-located')
|
element.classList.add('is-located')
|
||||||
window.setTimeout(() => element.classList.remove('is-located'), 1500)
|
window.setTimeout(() => element.classList.remove('is-located'), 1500)
|
||||||
}
|
}
|
||||||
|
const handleGroupNavClick = (id: string) => {
|
||||||
|
if (activeSection.value === 'services') {
|
||||||
|
activeServiceGroup.value = id
|
||||||
|
activeGroup.value = id
|
||||||
|
return
|
||||||
|
}
|
||||||
|
scrollToGroup(id)
|
||||||
|
}
|
||||||
watch(activeSection, () => {
|
watch(activeSection, () => {
|
||||||
activeGroup.value = groupNavItems.value[0]?.id || ''
|
activeGroup.value = activeSection.value === 'services'
|
||||||
|
? activeServiceGroup.value
|
||||||
|
: groupNavItems.value[0]?.id || ''
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
const runProbe = async (service: string, operation: string) => {
|
const runProbe = async (service: string, operation: string) => {
|
||||||
const key = `${service}:${operation}`
|
const key = `${service}:${operation}`
|
||||||
|
|||||||
Reference in New Issue
Block a user