Ben Lin
2024-07-19 a41c87a94a0b52688420a7af3b242bc771628e28
登录logo更新
已修改13个文件
118 ■■■■ 文件已修改
.env 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/tigerapi/model/router.ts 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Application/src/AppLogo.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Application/src/LoginLogo.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/hooks/setting/index.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layouts/default/header/components/user-dropdown/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/env.ts 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/workbench/components/WorkbenchHeader.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sys/login/Login.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tigerprojects/mes/eng/route/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
types/config.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
types/global.d.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env
@@ -2,3 +2,6 @@
VITE_GLOB_APP_TITLE = HongHu NX
# port
VITE_PORT = 3100
#systm type WMS/MES
VITE_APP_TYPE = WMS
src/api/tigerapi/model/router.ts
@@ -101,7 +101,8 @@
  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;
src/components/Application/src/AppLogo.vue
@@ -4,7 +4,7 @@
 * @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
@@ -45,8 +45,8 @@
  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(() => [
src/components/Application/src/LoginLogo.vue
@@ -4,18 +4,18 @@
 * @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';
@@ -41,7 +41,8 @@
  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(() => [
src/hooks/setting/index.ts
@@ -1,23 +1,28 @@
/*
 * @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> = {
@@ -31,6 +36,7 @@
    mapKey: VITE_GLOB_MAP_KEY,
    downloadUrl: VITE_GLOB_DOWNLOAD_URL,
    useOrg: VITE_USE_ORG,
    systemType: VITE_APP_TYPE,
  };
  return glob as Readonly<GlobConfig>;
};
src/layouts/default/header/components/user-dropdown/index.vue
@@ -44,7 +44,7 @@
<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';
@@ -55,6 +55,7 @@
  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';
@@ -72,10 +73,11 @@
  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();
src/utils/env.ts
@@ -1,10 +1,10 @@
/*
 * @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';
@@ -38,12 +38,17 @@
    ? // 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) || '{}');
@@ -59,6 +64,7 @@
    VITE_GLOB_TSK_API_URL,
    VITE_GLOB_DOWNLOAD_URL,
    VITE_USE_ORG,
    VITE_APP_TYPE,
  };
}
src/views/dashboard/workbench/components/WorkbenchHeader.vue
@@ -4,12 +4,12 @@
 * @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>
@@ -17,13 +17,16 @@
  </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>
src/views/sys/login/Login.vue
@@ -24,8 +24,8 @@
              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('未来可见 数字化智造平台') }}
@@ -54,7 +54,7 @@
  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';
@@ -73,6 +73,7 @@
  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';
src/views/tigerprojects/mes/eng/route/components/ActionItemProps.vue
@@ -3,8 +3,8 @@
 * @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: 表单项属性,控件属性面板
@@ -72,6 +72,14 @@
          :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"
@@ -120,6 +128,16 @@
      label: '无需设置',
    },
  ]);
  const needResetOptions = ref<SelectTypes['options']>([
    {
      value: 'Y',
      label: '是',
    },
    {
      value: 'N',
      label: '否',
    },
  ]);
  const actTypeLable = unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name';
  watch(
    () => routeConfig.currentAct,
@@ -135,6 +153,7 @@
          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;
src/views/tigerprojects/mes/eng/route/index.vue
@@ -234,6 +234,7 @@
              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,
@@ -484,7 +485,8 @@
          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: '',
@@ -521,6 +523,7 @@
        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,
types/config.d.ts
@@ -154,6 +154,7 @@
  mapKey: string;
  downloadUrl: string;
  useOrg: boolean;
  systemType: string;
}
export interface GlobEnvConfig {
  // Site title
@@ -169,4 +170,5 @@
  VITE_GLOB_MAP_KEY: string;
  VITE_GLOB_DOWNLOAD_URL: string;
  VITE_USE_ORG: boolean;
  VITE_APP_TYPE: string;
}
types/global.d.ts
@@ -1,3 +1,11 @@
/*
 * @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,
@@ -67,6 +75,7 @@
    VITE_USE_MOCK: boolean;
    VITE_PUBLIC_PATH: string;
    VITE_GLOB_APP_TITLE: string;
    VITE_APP_TYPE: string;
    VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
  }