yanghao пре 2 недеља
родитељ
комит
fff20122b4
5 измењених фајлова са 46 додато и 22 уклоњено
  1. 1 1
      .env.dev
  2. 5 1
      .env.prod
  3. 4 0
      components.d.ts
  4. 35 19
      src/components/home/CardItem.vue
  5. 1 1
      src/components/home/header.vue

+ 1 - 1
.env.dev

@@ -1,3 +1,3 @@
 VITE_BASE_URL='http://iot.deepoil.cc:5172'
 VITE_PMS_URL='https://iot.deepoil.cc'
-VITE_DINGTALK_REDIRECT_URI='http://iot.deepoil.cc:5172/login?loginType=dingding&type=20'
+VITE_DINGTALK_REDIRECT_URI='http://iot.deepoil.cc:5172/login?loginType=dingding&type=20'

+ 5 - 1
.env.prod

@@ -1,3 +1,7 @@
 VITE_BASE_URL='https://portal.deepoil.cc'
 VITE_PMS_URL='https://aims.deepoil.cc'
-VITE_DINGTALK_REDIRECT_URI='https://portal.deepoil.cc/login?loginType=dingding&type=20'
+VITE_DINGTALK_REDIRECT_URI='https://portal.deepoil.cc/login?loginType=dingding&type=20'
+
+
+VITE_DD_CORPID='dingbe7f9a7e8cffa2bd35c2f4657eb6378f'
+VITE_DD_CLIENTID='dingcnw10hmrqqkh28fw'

+ 4 - 0
components.d.ts

@@ -14,10 +14,14 @@ declare module 'vue' {
     CardItem: typeof import('./src/components/home/CardItem.vue')['default']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCard: typeof import('element-plus/es')['ElCard']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
     ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
+    ElForm: typeof import('element-plus/es')['ElForm']
+    ElFormItem: typeof import('element-plus/es')['ElFormItem']
+    ElInput: typeof import('element-plus/es')['ElInput']
     ElTabPane: typeof import('element-plus/es')['ElTabPane']
     ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']

+ 35 - 19
src/components/home/CardItem.vue

@@ -132,30 +132,30 @@ const props = defineProps<{
 
 // 创建图标映射表
 const iconMap: Record<string, string> = {
-  OA办公: oaimage,
+  "OA办公": oaimage,
   "经营驾驶舱(MC)": driveimage,
-  战略解码与执行: zhanlueimage,
+  "战略解码与执行": zhanlueimage,
   "财务管理(FM)": erpimage,
-  技术研发管理: jishuimage,
+  "技术研发管理": jishuimage,
   "客户管理(CRM)": crmimage,
   "人力资源(EHR)": ehrimage,
   "供应商管理(SRM)": scmimage,
-  组织资产管理: zuzhiimage,
-  风控合规管理: safeimage,
-  中航北斗: zhonghangimage,
+  "组织资产管理": zuzhiimage,
+  "风控合规管理": safeimage,
+  "中航北斗": zhonghangimage,
   "视频中心(VCS)": videoimage,
-  智能钻井: zuanjingimage,
-  智慧压裂: yalieimage,
-  智慧注气: zhuqiimage,
-  智慧连油: lianyouimage,
+  "智能钻井": zuanjingimage,
+  "智慧压裂": yalieimage,
+  "智慧注气": zhuqiimage,
+  "智慧连油": lianyouimage,
   "质量安全管理(QHSE)": qhseimage,
   "设备管理(PMS)": pmsimage,
   "项目管理(PM)": pmimage,
   "全局数据治理(数据中台)": dataimage,
-  智能决策: thinkimage,
-  行业AI大模型: aiimage,
+  "智能决策": thinkimage,
+  "行业AI大模型": aiimage,
   "AI智能体(智能交互)": agentimage,
-  数字油藏: youimage,
+  "数字油藏": youimage,
 };
 const isSpecialSystem = (label: string) => {
   const specialSystems = [
@@ -193,7 +193,7 @@ const handleView = async (item: Item) => {
       if (res) {
         window.open(
           "https://yfoa.keruioil.com/wui/index.html?ssoToken=" + res + "#/main",
-          "_blank",
+          "_blank"
         );
       }
     } else {
@@ -207,7 +207,7 @@ const handleView = async (item: Item) => {
         import.meta.env.VITE_PMS_URL +
           "/portalLogin?username=" +
           userStore.getUser.username,
-        "_blank",
+        "_blank"
       );
     } else {
       router.push({ path: "/login" });
@@ -228,7 +228,7 @@ const handleView = async (item: Item) => {
       window.open(
         "https://crm-tencent.xiaoshouyi.com/global/sso/callback/00APEB9EEEA9B2E338B686B7ECFA8585808C.action?token=" +
           getAccessToken(),
-        "_blank",
+        "_blank"
       );
     } else {
       router.push({ path: "/login" });
@@ -244,7 +244,7 @@ const handleView = async (item: Item) => {
           userStore.getUser.username +
           "&" +
           extraParam,
-        "_blank",
+        "_blank"
       );
     } else {
       router.push({ path: "/login" });
@@ -260,7 +260,7 @@ const handleView = async (item: Item) => {
           userStore.getUser.username +
           "&" +
           extraParam,
-        "_blank",
+        "_blank"
       );
     } else {
       router.push({ path: "/login" });
@@ -276,7 +276,23 @@ const handleView = async (item: Item) => {
           userStore.getUser.username +
           "&" +
           extraParam,
-        "_blank",
+        "_blank"
+      );
+    } else {
+      router.push({ path: "/login" });
+    }
+  }
+
+  if (item.label === "质量安全管理(QHSE)") {
+    const extraParam = "source=qhse";
+    if (userStore.getUser.username && getAccessToken()) {
+      window.open(
+        import.meta.env.VITE_PMS_URL +
+          "/portalLogin?username=" +
+          userStore.getUser.username +
+          "&" +
+          extraParam,
+        "_blank"
       );
     } else {
       router.push({ path: "/login" });

+ 1 - 1
src/components/home/header.vue

@@ -337,7 +337,7 @@ const onUserCommand = async (command: string) => {
   if (command === "logout") {
     await userStore.loginOut();
 
-    router.replace("/login");
+    router.replace("/");
   }
 };
 </script>