li.shaoyi 1 anno fa
parent
commit
857fc2fabe

+ 12 - 1
src/components/base/tabs/index.vue

@@ -4,7 +4,7 @@
             <ul class="tabs">
                 <li :class="['tabs-item', index === selectedIndex && 'is-active']" v-for="(item, index) in dataList"
                     :key="index" @click="onTabChange(index)">
-                    {{ item[propLabel] ?? '标签' + index }}
+                    <span>{{ item[propLabel] ?? '标签' + index }}</span>
                 </li>
             </ul>
             <slot name="navbar"></slot>
@@ -43,6 +43,17 @@ const props = defineProps({
 const emit = defineEmits(['update:dataIndex', 'change'])
 const selectedIndex = ref(props.dataIndex)
 
+// const getStyles = (index: number) => {
+//     const count = props.dataList.length
+//     const styles = {
+//         zIndex: count - index
+//     }
+//     if (index === selectedIndex.value) {
+//         styles.zIndex = count + 1
+//     }
+//     return styles
+// }
+
 const onTabChange = (index: number) => {
     if (selectedIndex.value !== index) {
         selectedIndex.value = index;

+ 2 - 2
src/constants/menu.ts

@@ -8,7 +8,7 @@ const { getEnumTypeName } = useEnumStore()
 export enum AuthType {
     Menu = 1, // 菜单
     Component = 2, // 组件
-    Button = 3, // 按钮
+    Operate = 3, // 操作
 }
 
 /**
@@ -28,7 +28,7 @@ export function getAuthTypeList() {
     return [
         { label: '菜单', value: AuthType.Menu },
         { label: '组件', value: AuthType.Component },
-        { label: '按钮', value: AuthType.Button },
+        { label: '操作', value: AuthType.Operate },
     ]
 }
 

+ 3 - 3
src/hooks/menu/index.ts

@@ -96,7 +96,7 @@ export function useMenu(authCode?: string) {
      */
     const getAuth = (authType: AuthType) => {
         const children = findChildren(userRoutes.value, authCode)
-        return children.reduce((res, cur) => {
+        return children.reduce<Model.UserRoutes[]>((res, cur) => {
             if (!cur.hidden && cur.authType === authType) {
                 if (!componentMap.get(cur.code) && cur.component) {
                     const componentString = cur.component.replace(/^\/+/, '') // 过滤字符串前面所有 '/' 字符
@@ -109,7 +109,7 @@ export function useMenu(authCode?: string) {
                 res.push(JSON.parse(JSON.stringify(cur)))
             }
             return res
-        }, [] as Model.UserRoutes[])
+        }, [])
     }
 
     /**
@@ -138,7 +138,7 @@ export function useMenu(authCode?: string) {
      * @param reverse 
      * @returns 
      */
-    const getAuthButtons = (filtered: string[] = [], reverse = false) => authFilter(AuthType.Button, filtered, reverse)
+    const getAuthButtons = (filtered: string[] = [], reverse = false) => authFilter(AuthType.Operate, filtered, reverse)
 
     /**
      * 获取权限组件

+ 3 - 3
src/hooks/menu/index@next.ts

@@ -96,7 +96,7 @@ export function useMenu(authCode?: string) {
      */
     const getAuth = (authType: AuthType) => {
         const children = findChildren(userRoutes.value, authCode)
-        return children.reduce((res, cur) => {
+        return children.reduce<Model.UserRoutes[]>((res, cur) => {
             if (!cur.hidden && cur.authType === authType) {
                 if (!componentMap.get(cur.code) && cur.component) {
                     const componentString = cur.component.replace(/^\/+/, '') // 过滤字符串前面所有 '/' 字符
@@ -109,7 +109,7 @@ export function useMenu(authCode?: string) {
                 res.push(JSON.parse(JSON.stringify(cur)))
             }
             return res
-        }, [] as Model.UserRoutes[])
+        }, [])
     }
 
     /**
@@ -138,7 +138,7 @@ export function useMenu(authCode?: string) {
      * @param reverse 
      * @returns 
      */
-    const getAuthButtons = (filtered: string[] = [], reverse = false) => authFilter(AuthType.Button, filtered, reverse)
+    const getAuthButtons = (filtered: string[] = [], reverse = false) => authFilter(AuthType.Operate, filtered, reverse)
 
     /**
      * 获取权限组件

+ 5 - 3
src/packages/mobile/components/layouts/login/index.vue

@@ -43,7 +43,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { Button, Field, CellGroup, Form, Checkbox, showFailToast, showToast } from 'vant'
-import { fullloading } from '@/utils/vant'
+import { fullloading, dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import { useNavigation } from '@mobile/router/navigation'
 import { useGlobalStore } from '@/stores'
@@ -100,8 +100,10 @@ const formSubmit = () => {
         userLogin().then((forcedPasswordChange) => {
           hideLoading()
           if (forcedPasswordChange) {
-            setGlobalUrlParams({ forcedPasswordChange })
-            routerTo('user-password', true)
+            dialog('为了您的账户安全,请修改密码!').then(() => {
+              setGlobalUrlParams({ forcedPasswordChange })
+              routerTo('user-password', true)
+            })
           } else {
             routerTo('report', true)
           }

+ 7 - 7
src/packages/mobile/views/order/position/components/goods/detail/Index.vue

@@ -43,9 +43,9 @@
                                 </li>
                             </ul>
                         </div>
-                        <div class="g-order-list__btnbar" v-if="item.trademode === 50 && item.holderqty">
+                        <!-- <div class="g-order-list__btnbar" v-if="item.trademode === 50 && item.holderqty">
                             <Button size="small" @click="showComponent('close', item)" round>转让</Button>
-                        </div>
+                        </div> -->
                     </div>
                 </div>
             </app-pull-refresh>
@@ -82,14 +82,14 @@ const { dataList, loading, run } = useRequest(queryTradeHolderDetail, {
 const selectedRow = shallowRef<Model.TradeHolderDetailRsp>()
 const pullRefreshRef = shallowRef()
 
-const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+const { componentRef, componentId, closeComponent } = useComponent(() => {
     pullRefreshRef.value?.refresh()
 })
 
-const showComponent = (componentName: string, row: Model.TradeHolderDetailRsp) => {
-    selectedRow.value = row
-    openComponent(componentName)
-}
+// const showComponent = (componentName: string, row: Model.TradeHolderDetailRsp) => {
+//     selectedRow.value = row
+//     openComponent(componentName)
+// }
 
 // 关闭弹窗
 const closed = (isRefresh = false) => {

+ 26 - 21
src/packages/pc/assets/themes/default/default.less

@@ -104,7 +104,7 @@
     --el-datepicker-inrange-bg-color: #5a6977;
     --el-datepicker-inrange-hover-bg-color: var(--el-datepicker-inrange-bg-color);
     --el-datepicker-active-color: var(--el-color-primary);
-    --el-fill-color-light:#343e47;
+    --el-fill-color-light: #343e47;
 }
 
 .el-form {
@@ -259,38 +259,43 @@
             padding: 2px;
 
             .tabs-item {
+                position: relative;
                 height: 26px;
                 line-height: 26px;
                 min-width: 120px;
                 color: #88a0ae;
                 text-align: center;
                 cursor: pointer;
-                background: linear-gradient(0deg, #262e35 0%, #283139 100%);
-                padding: 0 12px;
-
-                // &::before,
-                // &::after {
-                //     content: '';
-                //     display: inline-block;
-                //     width: 20px;
-                //     height: 20px;
-                // }
-
-                // &::before {
-                //     background: linear-gradient(-135deg, #fff 50%, transparent 50%);
-                // }
-
-                // &::after {
-                //     background: linear-gradient(135deg, #fff 50%, transparent 50%);
-                // }
+                background: #121618;
+                clip-path: polygon(0 0, 10px 100%, calc(100% - 10px) 100%, 100% 0);
+                padding: 0 20px;
 
                 &:not(:first-child) {
-                    margin-left: 3px;
+                    margin-left: -10px;
+                }
+
+                &::after {
+                    content: '';
+                    position: absolute;
+                    left: 0;
+                    width: 100%;
+                    height: 100%;
+                    background: linear-gradient(0deg, #262e35 0%, #283139 100%);
+                    clip-path: polygon(1px 0, 11px 100%, calc(100% - 11px) 100%, calc(100% - 1px) 0);
                 }
 
                 &.is-active {
+                    z-index: 1;
                     color: #fff;
-                    background: linear-gradient(0deg, #26487c 0%, #29538c 100%);
+
+                    &::after {
+                        background: linear-gradient(0deg, #26487c 0%, #29538c 100%);
+                    }
+                }
+
+                span {
+                    position: relative;
+                    z-index: 1;
                 }
             }
         }

+ 3 - 3
src/packages/pc/components/modules/auth-operation/index.vue

@@ -29,8 +29,8 @@
             </el-dropdown>
             <ul v-else>
                 <li v-for="(item, index) in dataList" :key="index">
-                    <el-button :class="item.className" :type="item.buttonType" size="small"
-                        :disabled="item.code === componentId" @click.stop="openComponent(item.code)" :link="linkButton">
+                    <el-button :class="item.className" size="small" :disabled="item.code === componentId"
+                        @click.stop="openComponent(item.code)" :link="linkButton">
                         <el-icon v-if="item.icon">
                             <component :is="item.icon" />
                         </el-icon>
@@ -87,7 +87,7 @@ const dataList = computed(() => {
     const menus = props.menus
     if (menus) {
         if (menus.length) {
-            return auth.value.filter((e) => menus.includes(e.code) || menus.includes(e.buttonName));
+            return auth.value.filter((e) => menus.includes(e.code));
         }
         return [];
     } else {

+ 1 - 1
src/packages/pc/views/footer/goods/detail/index.vue

@@ -61,7 +61,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'tradeid', label: '成交单号' },
     { prop: 'marketname', label: '市场' },
     { prop: 'tradetime', label: '交易时间' },
-    { prop: 'operate', label: '操作', fixed: 'right', width: 100 },
+    // { prop: 'operate', label: '操作', fixed: 'right', width: 100 },
 ])
 
 // 接收头寸变化通知通知

+ 2 - 2
src/packages/pc/views/system/menu/components/edit/index.vue

@@ -18,7 +18,7 @@
                 <el-form-item label="权限代码" prop="code" required>
                     <el-input v-model="form.code" />
                 </el-form-item>
-                <el-form-item label="按钮样式" v-if="form.authType === AuthType.Button">
+                <!-- <el-form-item label="按钮样式" v-if="form.authType === AuthType.Operate">
                     <el-select v-model="form.buttonType" style="margin-right:12px">
                         <el-option label="默认" value="default" />
                         <el-option label="主要" value="primary" />
@@ -31,7 +31,7 @@
                         <component :is="components.appIcon" :icon="form.icon" />
                         <span>{{ form.title }}</span>
                     </el-button>
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item label="图标">
                     <component :is="components.appIconSelect" v-model="form.icon" />
                 </el-form-item>

+ 6 - 4
src/packages/sbyj/views/user/login/Index.vue

@@ -42,8 +42,8 @@
 
 <script lang="ts" setup>
 import { shallowRef, onMounted, onUnmounted } from 'vue'
-import { FormInstance, Button, Field, CellGroup, Form, Checkbox, showFailToast, showSuccessToast, showToast } from 'vant'
-import { fullloading } from '@/utils/vant'
+import { FormInstance, Button, Field, CellGroup, Form, Checkbox, showFailToast, showToast } from 'vant'
+import { fullloading, dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import { useNavigation } from '@mobile/router/navigation'
 import service from '@/services'
@@ -88,8 +88,10 @@ const formSubmit = () => {
         userLogin().then((forcedPasswordChange) => {
           hideLoading()
           if (forcedPasswordChange) {
-            setGlobalUrlParams({ forcedPasswordChange })
-            routerTo('user-password', true)
+            dialog('为了您的账户安全,请修改密码!').then(() => {
+              setGlobalUrlParams({ forcedPasswordChange })
+              routerTo('user-password', true)
+            })
           } else {
             routerBack()
           }

+ 1 - 3
src/types/model/account.d.ts

@@ -291,13 +291,11 @@ declare global {
             id: number; // 自增ID
             authType: AuthType; // 权限类型
             title: string; // 标题
-            code: string;  // 菜单代码(主键)
+            code: string;  // 菜单代码
             urlType: UrlType; // 地址类型
             url: string; // 链接地址
             component: string; // 组件名或组件地址
             icon: string; // 菜单图标
-            buttonName: string; // 按钮名称
-            buttonType: string; // 按钮类型
             className: string; // 菜单样式
             sort: number; // 排序
             hidden: boolean; // 是否隐藏