Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev
This commit is contained in:
commit
09544943f2
|
@ -0,0 +1,19 @@
|
|||
<template>
|
||||
<div class='full-page-warp' ref='fullPage' :style='{ minHeight: `calc(100vh - ${y + 24}px)`}'>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts' name='FullPage'>
|
||||
import { useElementBounding } from '@vueuse/core'
|
||||
|
||||
const fullPage = ref(null)
|
||||
const { y } = useElementBounding(fullPage)
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.full-page-warp {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
|
@ -1,2 +1,3 @@
|
|||
export { default as BasicLayoutPage } from './BasicLayoutPage.vue'
|
||||
export { default as BlankLayoutPage } from './BlankLayoutPage.vue'
|
||||
export { default as FullPage } from './FullPage.vue'
|
|
@ -8,7 +8,7 @@ import Search from './Search'
|
|||
import NormalUpload from './NormalUpload/index.vue'
|
||||
import FileFormat from './FileFormat/index.vue'
|
||||
import JProUpload from './Upload/index.vue'
|
||||
import { BasicLayoutPage, BlankLayoutPage } from './Layout'
|
||||
import { BasicLayoutPage, BlankLayoutPage, FullPage } from './Layout'
|
||||
import { PageContainer, AIcon, Ellipsis } from 'jetlinks-ui-components'
|
||||
// import Ellipsis from './Ellipsis/index.vue'
|
||||
import JEmpty from './Empty/index.vue'
|
||||
|
@ -38,5 +38,6 @@ export default {
|
|||
.component('PathSimplifier', PathSimplifier)
|
||||
.component('ValueItem', ValueItem)
|
||||
.component('RowPagination', RowPagination)
|
||||
.component('FullPage', FullPage)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import menus, { LoginPath } from './menu'
|
||||
import menus, { AccountCenterBindPath, InitHomePath, LoginPath } from './menu'
|
||||
import { cleanToken, getToken } from '@/utils/comm'
|
||||
import { useUserInfo } from '@/store/userInfo'
|
||||
import { useSystem } from '@/store/system'
|
||||
|
@ -14,6 +14,8 @@ const router = createRouter({
|
|||
}
|
||||
})
|
||||
|
||||
const filterPath = [ InitHomePath, AccountCenterBindPath ]
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
// TODO 切换路由取消请求
|
||||
const token = getToken()
|
||||
|
@ -24,7 +26,7 @@ router.beforeEach((to, from, next) => {
|
|||
const userInfo = useUserInfo()
|
||||
const system = useSystem()
|
||||
const menu = useMenuStore()
|
||||
if (!menu.siderMenus.length) {
|
||||
if (!menu.siderMenus.length && !filterPath.includes(to.path)) {
|
||||
userInfo.getUserInfo().then(() => {
|
||||
system.getSystemVersion().then((menuData: any[]) => {
|
||||
menuData.forEach(r => {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
export const LoginPath = '/login'
|
||||
export const InitHomePath = '/init-home'
|
||||
export const AccountCenterBindPath = '/account/center/bind'
|
||||
|
||||
export const AccountMenu = {
|
||||
path: '/account',
|
||||
|
@ -55,11 +57,11 @@ export default [
|
|||
component: () => import('@/views/user/Login/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/account/center/bind',
|
||||
path: AccountCenterBindPath,
|
||||
component: () => import('@/views/account/Center/bind/index.vue')
|
||||
},
|
||||
{
|
||||
path: '/init-home', // 初始化
|
||||
path: InitHomePath, // 初始化
|
||||
component: () => import('@/views/init-home/index.vue')
|
||||
},
|
||||
|
||||
|
|
|
@ -106,13 +106,7 @@
|
|||
:column="2"
|
||||
/>
|
||||
</j-form-item>
|
||||
<div
|
||||
style="color: #616161"
|
||||
v-if="
|
||||
formData.configuration.endian ||
|
||||
formData.configuration.endianIn
|
||||
"
|
||||
>
|
||||
<div style="color: #616161" v-if="visibleEndian">
|
||||
<p>
|
||||
当前内存布局:{{
|
||||
endianMap.get(formData.configuration.endian)
|
||||
|
@ -123,6 +117,19 @@
|
|||
具有4种内存布局,其它只有ABCD、DCBA两种内存布局(以双字配置为准)
|
||||
</p>
|
||||
</div>
|
||||
<j-form-item
|
||||
label="请求超时时间配置"
|
||||
:name="['configuration', 'requsetTimeout']"
|
||||
>
|
||||
<j-input-number
|
||||
style="width: 100%"
|
||||
placeholder="请输入请求超时时间配置"
|
||||
v-model:value="formData.configuration.requsetTimeout"
|
||||
addon-after="ms"
|
||||
:max="9999999999999998"
|
||||
:min="1"
|
||||
/>
|
||||
</j-form-item>
|
||||
|
||||
<j-form-item label="说明" name="description">
|
||||
<j-textarea
|
||||
|
@ -188,6 +195,7 @@ const formData = ref({
|
|||
type: 'LowerFrequency',
|
||||
endian: 'BIG',
|
||||
endianIn: 'BIG',
|
||||
requsetTimeout: 2000,
|
||||
},
|
||||
circuitBreaker: {
|
||||
type: 'LowerFrequency',
|
||||
|
|
|
@ -129,7 +129,7 @@ let params = ref();
|
|||
*/
|
||||
const handleSearch = (e: any) => {
|
||||
params.value = e;
|
||||
expandedRowKeys.value = []
|
||||
expandedRowKeys.value = [];
|
||||
};
|
||||
/**
|
||||
* 操作栏按钮
|
||||
|
@ -210,21 +210,20 @@ const table = reactive({
|
|||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
ellipsis: true,
|
||||
width: 600,
|
||||
width: 500,
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'sortIndex',
|
||||
key: 'sortIndex',
|
||||
scopedSlots: true,
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '说明',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
ellipsis: true,
|
||||
width: 700,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
@ -232,6 +231,7 @@ const table = reactive({
|
|||
fixed: 'right',
|
||||
ellipsis: true,
|
||||
scopedSlots: true,
|
||||
width: 120,
|
||||
},
|
||||
],
|
||||
/**
|
||||
|
|
|
@ -220,7 +220,7 @@ Object.assign(formModel, props.value)
|
|||
formModel.when = props.value.when || []
|
||||
|
||||
watchEffect(() => {
|
||||
if(props.value?.period.unit === 'hours') {
|
||||
if(props.value?.period?.unit === 'hours') {
|
||||
unitMax.
|
||||
value = 99999
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<page-container>
|
||||
<FullPage>
|
||||
<div class='scene-warp'>
|
||||
<div class='header'>
|
||||
<Ellipsis :tooltip='data.name' style='max-width: 50%'>
|
||||
|
@ -37,6 +38,7 @@
|
|||
保存
|
||||
</PermissionButton>
|
||||
</div>
|
||||
<FullPage>
|
||||
</page-container>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<page-container>
|
||||
|
||||
<pro-search :columns="columns" target="scene" @search="handleSearch" />
|
||||
<FullPage>
|
||||
<JProTable
|
||||
ref="sceneRef"
|
||||
:columns="columns"
|
||||
|
@ -125,6 +127,7 @@
|
|||
</j-space>
|
||||
</template>
|
||||
</JProTable>
|
||||
</FullPage>
|
||||
<SaveModal v-if="visible" @close="visible = false" :data="current" />
|
||||
</page-container>
|
||||
</template>
|
||||
|
|
|
@ -237,7 +237,7 @@ const onFinish = async () => {
|
|||
username: form.username,
|
||||
});
|
||||
LocalStore.set(TOKEN_KEY, res?.result.token);
|
||||
if (res.result.username === 'admin') {
|
||||
if (res.result.user?.username === 'admin') {
|
||||
const resp: any = await getInitSet();
|
||||
if (resp.status === 200 && !resp.result.length) {
|
||||
window.location.href = '/#/init-home';
|
||||
|
|
Loading…
Reference in New Issue