Explorar o código

srm移动端跳转

yanghao hai 1 semana
pai
achega
71e4a27a9e
Modificáronse 3 ficheiros con 70 adicións e 38 borrados
  1. 20 1
      src/i18n/lang/zh.json
  2. 33 20
      src/views/flow/srmTodo.vue
  3. 17 17
      src/views/flow/todoList.vue

+ 20 - 1
src/i18n/lang/zh.json

@@ -12,7 +12,8 @@
     "loginTip": "请使用钉钉扫描二维码登录",
     "refresh": "刷新",
     "normal": "正常",
-    "dot":"。"
+    "dot":"。",
+    "back": "返回"
   },
   "nav": {
     "title": "智慧经营平台",
@@ -104,6 +105,24 @@
     "market":"市场驾驶舱",
     "qhse":"QHSE"
 
+  },
+  "oatodo": {
+    "title":"OA待办任务列表",
+    "requestName":"请求标题",
+    "type":"流程类型",
+    "level":"紧急程度",
+    "status":"路径状态",
+    "system":"系统名称",
+    "createTime":"创建时间",
+    "createPerson":"创建人姓名",
+    "currentNode":"当前节点",
+    "lastOperateTime":"最后操作时间",
+    "lastUpdatePerson":"最后操作人",
+    "reciveTime":"接收时间",
+    "action":"操作",
+    "handle":"处理",
+    "index":"序号",
+    "flowName":"流程名称"
   }
   
 }

+ 33 - 20
src/views/flow/srmTodo.vue

@@ -133,31 +133,44 @@ const goBackPage = async (row) => {
     dialogVisible.value = true;
     return;
   }
+
+  const ua = window.navigator.userAgent; // const ua = navigator.userAgent;
+  const isDesktop =
+    ua.includes("DingTalk") &&
+    (ua.includes("Windows") || ua.includes("Macintosh"));
+
+  let ua2 = navigator.userAgent.toLowerCase();
+  let isMobile = ua2.indexOf("dingtalk") > -1;
   if (res) {
-    const ua = window.navigator.userAgent.toLowerCase();
-    if (ua.includes("dingtalk") || ua.includes("dingtalkwork")) {
-      dd.biz.util.openLink({
-        url: `https://srm.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
-        onSuccess: () => {
-          setTimeout(() => {
-            dd.biz.util.openLink({
-              url: `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`,
-            });
-          }, SRM_LOGIN_DELAY);
-        },
-      });
+    if (ua2.includes("dingtalk") || ua2.includes("dingtalkwork")) {
+      if (isMobile && !isDesktop) {
+        dd.biz.util.openLink({
+          url: `https://srm-m.deepoil.cc:7777?Authorization=${JSON.parse(res).msg}`,
+          // onSuccess: () => {
+          //   setTimeout(() => {
+          //     dd.biz.util.openLink({
+          //       url: `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`,
+          //     });
+          //   }, SRM_LOGIN_DELAY);
+          // },
+        });
+      } else if (isDesktop) {
+        dd.biz.util.openLink({
+          url: `https://srm.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`,
+          onSuccess: () => {
+            setTimeout(() => {
+              dd.biz.util.openLink({
+                url: `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`,
+              });
+            }, SRM_LOGIN_DELAY);
+          },
+        });
+      }
     } else {
-      const loading = ElLoading.service({
-        lock: true,
-        text: "正在跳转,请稍候...",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
       const newTab = window.open("", "_blank");
       newTab.location.href = `https://srm.deepoil.cc/#/mixed-page/view/MXP00048?Authorization=${JSON.parse(res).msg}`;
       setTimeout(function () {
-        setTimeout(() => {
-          loading.close();
-        }, 500);
+        setTimeout(() => {}, 500);
         newTab.location.href = `https://srm.deepoil.cc/#/workflow-process/request-${row.requestId}`;
       }, SRM_LOGIN_DELAY);
     }

+ 17 - 17
src/views/flow/todoList.vue

@@ -9,7 +9,7 @@
             icon="mynaui:arrow-up-down"
             class="icon pr-1 h-8 w-8"
             color="#014099"
-          />OA待办任务列表
+          />{{ $t("oatodo.title") }}
         </p>
 
         <el-button
@@ -23,7 +23,7 @@
             class="icon pr-1"
             width="20"
             height="20"
-          />&#36820;&#22238;</el-button
+          />{{ $t("common.back") }}</el-button
         >
       </div>
       <div v-loading="loading" class="table-wrapper">
@@ -43,7 +43,7 @@
         >
           <el-table-column
             type="index"
-            label="&#24207;&#21495;"
+            :label="$t('oatodo.index')"
             width="80"
             fixed="left"
             align="center"
@@ -51,83 +51,83 @@
           />
           <el-table-column
             prop="requestName"
-            label="&#35831;&#27714;&#26631;&#39064;"
+            :label="$t('oatodo.requestName')"
             min-width="250"
             align="center"
           />
           <el-table-column
             prop="workflowBaseInfo.workflowTypeName"
-            label="&#27969;&#31243;&#31867;&#22411;"
+            :label="$t('oatodo.type')"
             width="140"
             align="center"
           />
           <el-table-column
             prop="requestLevel"
-            label="&#32039;&#24613;&#31243;&#24230;"
+            :label="$t('oatodo.level')"
             width="100"
             align="center"
           />
           <el-table-column
             prop="status"
-            label="&#36335;&#24452;&#29366;&#24577;"
+            :abel="$t('oatodo.status')"
             width="100"
             align="center"
           />
           <el-table-column
             prop="sysName"
-            label="&#31995;&#32479;&#21517;&#31216;"
+            :label="$t('oatodo.system')"
             width="140"
             align="center"
           />
           <el-table-column
             prop="createTime"
-            label="&#21019;&#24314;&#26102;&#38388;"
+            :label="$t('oatodo.createTime')"
             width="180"
             align="center"
           />
 
           <el-table-column
             prop="creatorName"
-            label="&#21019;&#24314;&#20154;&#21517;&#31216;"
+            :label="$t('oatodo.createPerson')"
             width="120"
             align="center"
           />
 
           <el-table-column
             prop="currentNodeName"
-            label="&#24403;&#21069;&#33410;&#28857;&#21517;&#31216;"
+            :label="$t('oatodo.currentNode')"
             width="140"
             align="center"
           />
           <el-table-column
             prop="lastOperateTime"
-            label="&#26368;&#21518;&#25805;&#20316;&#26102;&#38388;"
+            :label="$t('oatodo.lastOperateTime')"
             width="180"
             align="center"
           />
 
           <el-table-column
             prop="lastOperatorName"
-            label="&#26368;&#21518;&#25805;&#20316;&#20154;&#21517;&#31216;"
+            :label="$t('oatodo.lastUpdatePerson')"
             width="140"
             align="center"
           />
           <el-table-column
             prop="receiveTime"
-            label="&#25509;&#25910;&#26102;&#38388;"
+            :label="$t('oatodo.reciveTime')"
             width="180"
             align="center"
           />
 
           <el-table-column
             prop="workflowBaseInfo.workflowName"
-            label="&#27969;&#31243;&#21517;&#31216;"
+            :label="$t('oatodo.flowName')"
             min-width="200"
             align="center"
           />
 
           <el-table-column
-            label="&#25805;&#20316;"
+            :label="$t('oatodo.action')"
             width="120"
             fixed="right"
             align="center"
@@ -136,7 +136,7 @@
               <span
                 class="text-[#1e90ff] cursor-pointer text-[13px]"
                 @click="goBackPage(scope.row)"
-                >&#22788;&#29702;</span
+                >{{ $t("oatodo.handle") }}</span
               >
             </template>
           </el-table-column>