| | |
| | | VITE_GLOB_APP_TITLE = HongHu NX |
| | | # port |
| | | VITE_PORT = 3100 |
| | | |
| | | #systm type WMS/MES |
| | | VITE_APP_TYPE = WMS |
| | |
| | | GPH_Y: number; |
| | | GPH_PROP: string; |
| | | GPH_TEXT: string; |
| | | NEED_SETUP: number; |
| | | NEED_SETUP: string; |
| | | NEED_RESET: string; |
| | | // DO_TYPE: number; |
| | | // DO_METHOD: string; |
| | | // DO_IF_PASS: string; |
| | |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:25 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-17 10:00:16 |
| | | * @LastEditTime: 2024-07-19 17:12:04 |
| | | --> |
| | | <!-- |
| | | * @Author: Vben |
| | |
| | | const { prefixCls } = useDesign('app-logo'); |
| | | const { getCollapsedShowTitle } = useMenuSetting(); |
| | | const userStore = useUserStore(); |
| | | const { title, downloadUrl } = useGlobSetting(); |
| | | const logoUrl = ref(`${downloadUrl}\\logo-1.png`) |
| | | const { title, systemType, downloadUrl } = useGlobSetting(); |
| | | const logoUrl = ref(`${downloadUrl}\\${systemType}-logo.png`) |
| | | const go = useGo(); |
| | | |
| | | const getAppLogoClass = computed(() => [ |
| | |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:25 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-19 09:51:43 |
| | | * @LastEditTime: 2024-07-19 17:11:43 |
| | | --> |
| | | <template> |
| | | <div class="anticon" :class="getAppLogoClass" @click="goHome"> |
| | | <img src="../../../assets/images/loginlogo.png" /> |
| | | <img :src="loginLogoUrl" /> |
| | | <div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle"> |
| | | {{ title }} |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { computed, unref } from 'vue'; |
| | | import { computed, ref, unref } from 'vue'; |
| | | import { useGlobSetting } from '@/hooks/setting'; |
| | | import { useGo } from '@/hooks/web/usePage'; |
| | | import { useMenuSetting } from '@/hooks/setting/useMenuSetting'; |
| | |
| | | const { prefixCls } = useDesign('app-logo'); |
| | | const { getCollapsedShowTitle } = useMenuSetting(); |
| | | const userStore = useUserStore(); |
| | | const { title } = useGlobSetting(); |
| | | const { title, systemType, downloadUrl } = useGlobSetting(); |
| | | const loginLogoUrl = ref(`${downloadUrl}\\${systemType}-loginlogo.png`) |
| | | const go = useGo(); |
| | | |
| | | const getAppLogoClass = computed(() => [ |
| | |
| | | /* |
| | | * @Description: file content |
| | | * @Author: your name |
| | | * @version: |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:26 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-17 15:54:48 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-19 17:10:35 |
| | | */ |
| | | import type { GlobConfig } from '#/config'; |
| | | |
| | | import { getAppEnvConfig } from '@/utils/env'; |
| | | |
| | | export const useGlobSetting = (): Readonly<GlobConfig> => { |
| | | const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL, |
| | | const { |
| | | VITE_GLOB_APP_TITLE, |
| | | VITE_GLOB_API_URL, |
| | | VITE_GLOB_API_URL_PREFIX, |
| | | VITE_GLOB_UPLOAD_URL, |
| | | VITE_GLOB_SYS_API_URL, |
| | | VITE_GLOB_MAP_KEY, |
| | | VITE_GLOB_TSK_API_URL, |
| | | VITE_GLOB_DOWNLOAD_URL, |
| | | VITE_USE_ORG, } = |
| | | getAppEnvConfig(); |
| | | VITE_APP_TYPE, |
| | | VITE_USE_ORG, |
| | | } = getAppEnvConfig(); |
| | | |
| | | // Take global configuration |
| | | const glob: Readonly<GlobConfig> = { |
| | |
| | | mapKey: VITE_GLOB_MAP_KEY, |
| | | downloadUrl: VITE_GLOB_DOWNLOAD_URL, |
| | | useOrg: VITE_USE_ORG, |
| | | systemType: VITE_APP_TYPE, |
| | | }; |
| | | return glob as Readonly<GlobConfig>; |
| | | }; |
| | |
| | | <script lang="ts" setup> |
| | | import { Dropdown, Menu } from 'ant-design-vue'; |
| | | import type { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; |
| | | import { computed } from 'vue'; |
| | | import { computed, ref } from 'vue'; |
| | | import { DOC_URL } from '@/settings/siteSetting'; |
| | | import { useUserStore } from '@/store/modules/user'; |
| | | import { useHeaderSetting } from '@/hooks/setting/useHeaderSetting'; |
| | |
| | | import { propTypes } from '@/utils/propTypes'; |
| | | import { openWindow } from '@/utils'; |
| | | import { createAsyncComponent } from '@/utils/factory/createAsyncComponent'; |
| | | import { useGlobSetting } from '/@/hooks/setting'; |
| | | |
| | | type MenuEvent = 'logout' | 'doc' | 'lock' | 'api'; |
| | | |
| | |
| | | const { t } = useI18n(); |
| | | const { getShowDoc, getUseLockPage, getShowApi } = useHeaderSetting(); |
| | | const userStore = useUserStore(); |
| | | const { systemType, downloadUrl } = useGlobSetting(); |
| | | |
| | | const getUserInfo = computed(() => { |
| | | const { realName = '', avatar, desc } = userStore.getUserInfo || {}; |
| | | return { realName, avatar: avatar || headerImg, desc }; |
| | | return { realName, avatar: avatar || `${downloadUrl}\\${systemType}-header.jpg`, desc }; |
| | | }); |
| | | |
| | | const [register, { openModal }] = useModal(); |
| | |
| | | /* |
| | | * @Description: file content |
| | | * @Author: your name |
| | | * @version: |
| | | * @version: |
| | | * @Date: 2024-06-17 14:51:26 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-17 15:54:10 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-19 17:10:02 |
| | | */ |
| | | import type { GlobEnvConfig } from '#/config'; |
| | | import pkg from '../../package.json'; |
| | |
| | | ? // Get the global configuration (the configuration will be extracted independently when packaging) |
| | | (import.meta.env as unknown as GlobEnvConfig) |
| | | : (window[ENV_NAME] as unknown as GlobEnvConfig); |
| | | const { VITE_GLOB_APP_TITLE, VITE_GLOB_API_URL_PREFIX, VITE_GLOB_UPLOAD_URL, |
| | | const { |
| | | VITE_GLOB_APP_TITLE, |
| | | VITE_GLOB_API_URL_PREFIX, |
| | | VITE_GLOB_UPLOAD_URL, |
| | | VITE_GLOB_SYS_API_URL, |
| | | VITE_GLOB_MAP_KEY, |
| | | VITE_GLOB_TSK_API_URL, |
| | | VITE_GLOB_DOWNLOAD_URL, |
| | | VITE_USE_ORG, } = ENV; |
| | | VITE_APP_TYPE, |
| | | VITE_USE_ORG, |
| | | } = ENV; |
| | | let { VITE_GLOB_API_URL } = ENV; |
| | | if (localStorage.getItem(API_ADDRESS)) { |
| | | const address = JSON.parse(localStorage.getItem(API_ADDRESS) || '{}'); |
| | |
| | | VITE_GLOB_TSK_API_URL, |
| | | VITE_GLOB_DOWNLOAD_URL, |
| | | VITE_USE_ORG, |
| | | VITE_APP_TYPE, |
| | | }; |
| | | } |
| | | |
| | |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:48 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-17 03:16:28 |
| | | * @LastEditTime: 2024-07-19 17:11:23 |
| | | --> |
| | | <template> |
| | | <div class="lg:flex"> |
| | | <!-- !mx-auto --> |
| | | <Avatar :src="userinfo.avatar || headerImg" :size="64" :shape="square" class="!block"/> |
| | | <Avatar :src="userinfo.avatar || headerUrl" :size="64" :shape="square" class="!block"/> |
| | | <div class="md:ml-12 flex flex-col justify-start md:mt-0 mt-2"> |
| | | <h1 class="md:text-lg text-md">早安, {{ userinfo.realName }}, 开始您一天的工作吧!</h1> |
| | | <span class="text-secondary"> 今日晴,20℃ - 32℃! </span> |
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { computed } from 'vue'; |
| | | import { computed, ref } from 'vue'; |
| | | import { Avatar } from 'ant-design-vue'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | import headerImg from '/@/assets/images/header.jpg'; |
| | | // import headerImg from '/@/assets/images/header.jpg'; |
| | | import { useGlobSetting } from '@/hooks/setting'; |
| | | // import headerImg from '/@/assets/images/title.jpg'; |
| | | |
| | | const userStore = useUserStore(); |
| | | const userinfo = computed(() => userStore.getUserInfo); |
| | | const square = "square"; // "circle"; |
| | | const { systemType, downloadUrl } = useGlobSetting(); |
| | | const headerUrl = ref(`${downloadUrl}\\${systemType}-header.jpg`) |
| | | </script> |
| | |
| | | class="w-1/2 -mt-16 -enter-x" |
| | | /> --> |
| | | <div class="mt-10 font-medium text-white -enter-x"> |
| | | <span class="inline-block mt-4 text-3xl"> {{ t('鸿鹄智能智造MES系统') }}</span> |
| | | <!-- <span class="inline-block mt-4 text-3xl"> {{ t('创芯人智能智造WMS系统') }}</span> --> |
| | | <span v-if="!IsMes" class="inline-block mt-4 text-3xl"> {{ t('鸿鹄智能智造WMS系统') }}</span> |
| | | <span v-if="IsMes" class="inline-block mt-4 text-3xl"> {{ t('创芯人智能智造MES系统') }}</span> |
| | | </div> |
| | | <div class="mt-5 font-normal text-white dark:text-gray-500 -enter-x"> |
| | | {{ t('未来可见 数字化智造平台') }} |
| | |
| | | import { useDesign } from '@/hooks/web/useDesign'; |
| | | import { useI18n } from '@/hooks/web/useI18n'; |
| | | import { useLocaleStore } from '@/store/modules/locale'; |
| | | import { computed } from 'vue'; |
| | | import { computed, ref } from 'vue'; |
| | | import ForgetPasswordForm from './ForgetPasswordForm.vue'; |
| | | import LoginForm from './LoginForm.vue'; |
| | | import MobileForm from './MobileForm.vue'; |
| | |
| | | const localeStore = useLocaleStore(); |
| | | const showLocale = localeStore.getShowPicker; |
| | | const title = computed(() => globSetting?.title ?? ''); |
| | | const IsMes = ref(globSetting.systemType == 'MES'); |
| | | </script> |
| | | <style lang="less"> |
| | | @prefix-cls: ~'@{namespace}-login'; |
| | |
| | | * @Author: your name |
| | | * @version: |
| | | * @Date: 2024-05-01 17:18:49 |
| | | * @LastEditors: your name |
| | | * @LastEditTime: 2024-06-18 00:20:58 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-19 15:58:20 |
| | | --> |
| | | <!-- |
| | | * @Description: 表单项属性,控件属性面板 |
| | |
| | | :options="needSetupOptions" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="执行出错时,是否重置整个工序的操作(Y/N)" name="执行出错时,是否重置整个工序的操作(Y/N)"> |
| | | <Select |
| | | ref="select" |
| | | v-model:value="routeConfig.currentAct.NEED_RESET" |
| | | style="width: 150px" |
| | | :options="needResetOptions" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="是否启用" name="是否启用"> |
| | | <Select |
| | | ref="select" |
| | |
| | | label: '无需设置', |
| | | }, |
| | | ]); |
| | | const needResetOptions = ref<SelectTypes['options']>([ |
| | | { |
| | | value: 'Y', |
| | | label: '是', |
| | | }, |
| | | { |
| | | value: 'N', |
| | | label: '否', |
| | | }, |
| | | ]); |
| | | const actTypeLable = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name'; |
| | | watch( |
| | | () => routeConfig.currentAct, |
| | |
| | | r.ACT_TYPE = newVal.ACT_TYPE; |
| | | r.ACT_CODE = newVal.ACT_CODE; |
| | | r.NEED_SETUP = newVal.NEED_SETUP; |
| | | r.NEED_RESET = newVal.NEED_RESET; |
| | | // r.DO_TYPE = newVal.DO_TYPE; |
| | | // r.DO_METHOD = newVal.DO_METHOD; |
| | | // r.DO_IF_PASS = newVal.DO_IF_PASS; |
| | |
| | | ACT_NAME: isNullOrEmpty(a.ACT_NAME) ? `${n.text.value}_${_num}` : a.ACT_NAME, |
| | | ACT_CODE: a.ACT_CODE, |
| | | NEED_SETUP: a.NEED_SETUP, |
| | | NEED_RESET: a.NEED_RESET, |
| | | NODE_ID: a.NODE_ID, |
| | | ACT_TYPE: a.ACT_TYPE, |
| | | // DO_TYPE: a.DO_TYPE, |
| | |
| | | GPH_Y: selectnode.value.y, |
| | | GPH_PROP: JSON.stringify(selectnode.value.properties), |
| | | GPH_TEXT: selectnode.value.text.value, |
| | | NEED_SETUP: 0, |
| | | NEED_SETUP: 'Y', |
| | | NEED_RESET: 'N', |
| | | // DO_TYPE: 0, |
| | | // DO_METHOD: '', |
| | | // DO_IF_PASS: '', |
| | |
| | | GPH_PROP: JSON.stringify(selectnode.value.properties), |
| | | GPH_TEXT: selectnode.value.text.value, |
| | | NEED_SETUP: _act.NEED_SETUP, |
| | | NEED_RESET: _act.NEED_RESET, |
| | | // DO_TYPE: _act.DO_TYPE, |
| | | // DO_METHOD: _act.DO_METHOD, |
| | | // DO_IF_PASS: _act.DO_IF_PASS, |
| | |
| | | mapKey: string; |
| | | downloadUrl: string; |
| | | useOrg: boolean; |
| | | systemType: string; |
| | | } |
| | | export interface GlobEnvConfig { |
| | | // Site title |
| | |
| | | VITE_GLOB_MAP_KEY: string; |
| | | VITE_GLOB_DOWNLOAD_URL: string; |
| | | VITE_USE_ORG: boolean; |
| | | VITE_APP_TYPE: string; |
| | | } |
| | |
| | | /* |
| | | * @Description: file content |
| | | * @Author: Ben Lin |
| | | * @version: |
| | | * @Date: 2024-06-18 15:09:48 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-19 17:09:40 |
| | | */ |
| | | import type { |
| | | ComponentRenderProxy, |
| | | VNode, |
| | |
| | | VITE_USE_MOCK: boolean; |
| | | VITE_PUBLIC_PATH: string; |
| | | VITE_GLOB_APP_TITLE: string; |
| | | VITE_APP_TYPE: string; |
| | | VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; |
| | | } |
| | | |