调整C端展示
This commit is contained in:
@@ -18,13 +18,15 @@
|
||||
<img :src="item.img" />
|
||||
</div>
|
||||
<div class="test_button">
|
||||
<el-button size="large" type="primary" @click="handelOpen(item)" :disabled="!item.activated">
|
||||
进入检测
|
||||
<el-button size="large" type="primary" @click="handelOpen(item)">
|
||||
{{ item.activated ? '进入检测' : '待激活' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
<!-- versionRegisterDialog -->
|
||||
<VersionDialog ref="versionRegisterRef"></VersionDialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
@@ -32,6 +34,8 @@ import { useAppSceneStore, useModeStore } from '@/stores/modules/mode' // 引入
|
||||
import { getCurrentScene } from '@/api/user/login'
|
||||
import { initDynamicRouter } from '@/routers/modules/dynamicRouter'
|
||||
import { useTabsStore } from '@/stores/modules/tabs'
|
||||
import VersionDialog from '@/views/system/versionRegister/index.vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const modeStore = useModeStore() // 使用模式 store
|
||||
@@ -39,6 +43,7 @@ const AppSceneStore = useAppSceneStore()
|
||||
const activateInfo = authStore.activateInfo
|
||||
const isActivateOpen = import.meta.env.VITE_ACTIVATE_OPEN
|
||||
const tabsStore = useTabsStore()
|
||||
const versionRegisterRef = ref<InstanceType<typeof VersionDialog> | null>(null)
|
||||
const modeList = [
|
||||
{
|
||||
name: '模拟式模块',
|
||||
@@ -64,7 +69,8 @@ const modeList = [
|
||||
]
|
||||
const handelOpen = async (item: any) => {
|
||||
if (!item.activated) {
|
||||
ElMessage.warning(`${item.name}未激活`)
|
||||
// 打开版本激活弹窗
|
||||
versionRegisterRef.value?.openDialog()
|
||||
return
|
||||
}
|
||||
modeStore.setCurrentMode(item.code) // 将模式code存入 store
|
||||
|
||||
Reference in New Issue
Block a user