lisiyan před 5 měsíci
rodič
revize
8f5d351398

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 10651 - 37
package-lock.json


+ 1 - 0
package.json

@@ -13,6 +13,7 @@
     "clipboard": "^2.0.11",
     "crypto-js": "^4.1.1",
     "dayjs": "^1.11.6",
+    "driver.js": "^1.3.1",
     "echarts": "^5.4.0",
     "element-ui": "^2.15.12",
     "js-cookie": "^3.0.5",

+ 1 - 1
src/components/common/Aside.vue

@@ -177,7 +177,7 @@ export default class Aside extends Vue {
                 this.$nextTick(() => {
                   setTimeout(() => {
                     driverObj.moveNext()
-                  }, 250)
+                  }, 1000)
                 })
               },
               side: 'left',

+ 9 - 9
src/components/common/Header.vue

@@ -23,25 +23,25 @@
       </div>
       <nav>
         <a class="link" :href="apiDomain">API Tools</a>
-        <a class="link" :href="apiDomain + '/api/docs/introduction'">Documentation</a>
-        <a class="link" :href="apiDomain + '/api-libraries/overview'">API Libraries</a>
-        <a class="link" :href="apiDomain + '/api/pricing'">Pricing</a>
-        <a class="link btn" :href="apiDomain + '/contact-us'">Contact Us</a>
+        <a class="link" :href="apiDomain + '/api/docs/introduction'">{{ $t('aside.document') }}</a>
+        <a class="link" :href="apiDomain + '/api-libraries/overview'">{{ $t('aside.libraries') }}</a>
+        <a class="link" :href="apiDomain + '/api/pricing'">{{ $t('aside.pricing') }}</a>
+        <a class="link btn" :href="apiDomain + '/contact-us'">{{ $t('aside.contact') }}</a>
       </nav>
     </div>
     <div v-show="dropdownShow" class="dropdown-menu" :class="dropdownShow && 'active'">
-      <router-link @click.native="toggleDropdown" to="/dashboard" class="dropdown-item"><Dashboard /><span>Dashboard</span></router-link>
-      <div class="dropdown-item login-out" @click="loginOut"><Logout /><span>Log out</span></div>
+      <router-link @click.native="toggleDropdown" to="/dashboard" class="dropdown-item"><Dashboard /><span>{{ $t('aside.dashboard') }}</span></router-link>
+      <div class="dropdown-item login-out" @click="loginOut"><Logout /><span>{{ $t('aside.logout') }}</span></div>
     </div>
     <div v-if="$route.name !== 'login'" class="nav-right">
       <el-popover ref="popover" placement="bottom-start" popper-class="dropdown-content" trigger="hover" :visible-arrow="false">
-        <router-link class="dropdown-item" to="/dashboard"><Dashboard /><span>Dashboard</span></router-link>
+        <router-link class="dropdown-item" to="/dashboard"><Dashboard /><span>{{ $t('aside.dashboard') }}</span></router-link>
         <div class="dropdown-item login-out" @click="loginOut">
-          <Logout /><span>Log out</span>
+          <Logout /><span>{{ $t('aside.logout') }}</span>
         </div>
       </el-popover>
       <div class="user-photo" v-popover:popover><p>{{ user && user.name.slice(0, 1) }}</p></div>
-      <a class="link btn" :href="apiDomain + '/contact-us'">Contact Us</a>
+      <a class="link btn" :href="apiDomain + '/contact-us'">{{ $t('aside.contact') }}</a>
     </div>
   </div>
 </template>

+ 6 - 2
src/locales/en.ts

@@ -15,9 +15,11 @@ export default {
     information: 'Billing Information ',
     invoices: 'Invoices Center',
     support: 'Support',
-    document: 'Documentation ',
+    document: 'API Reference ',
     contact: 'Contact Us',
-    libraries: 'API Libraries'
+    pricing: 'Pricing',
+    logout: 'Log out',
+    libraries: 'Documentation'
   },
   dashboard: {
     title: 'Dashboard',
@@ -32,6 +34,8 @@ export default {
     customDate: 'Custom date range',
     successReq: 'Successful Requests',
     successReqTip: 'The sum of the files that have been successfully processed to completion.',
+    invalidReq: 'Invalid Request',
+    invalidReqTip: 'API requests not adhering to file input rules are invalid, such as not providing a required password to open a file.',
     errorReq: 'Error Requests',
     errorReqTip: 'The sum of the files that failed to be processed.',
     errorRatio: 'Error Ratio',

+ 6 - 2
src/locales/zh.ts

@@ -15,9 +15,11 @@ export default {
     information: '账单信息',
     invoices: '发票中心',
     support: '支持',
-    document: '开发文档 ',
+    document: 'API参考文档',
     contact: '联系我们',
-    libraries: 'API 库'
+    pricing: '价格',
+    logout: '退出登录',
+    libraries: 'API开发文档'
   },
   dashboard: {
     title: '看板',
@@ -32,6 +34,8 @@ export default {
     customDate: '自定义时间范围',
     successReq: '成功请求数',
     successReqTip: '已成功处理完成的文档总数。',
+    invalidReq: '无效请求数',
+    invalidReqTip: '不遵循文件输入规则的API请求会归为无效请求,例如,没有提供打开文件所需的密码。',
     errorReq: '错误请求数',
     errorReqTip: '发生错误请求,文档处理失败的总数。',
     errorRatio: '错误率',

+ 5 - 1
src/request/api.ts

@@ -31,8 +31,10 @@ export const getDetailedData = (index: number, params: object) => {
     return getErrorRequestDetailedData(params)
   } else if (index === 3) {
     return getErrorRatioDetailedData(params)
-  } else {
+  } else if (index === 4) {
     return getAverageProcessTimeDetailedData(params)
+  } else {
+    return getInvalidRatioDetailedData(params)
   }
 }
 // Dashboard - 获取成功数时间节点数据集合 Successful Requests
@@ -41,6 +43,8 @@ const getSuccessfulRequestDetailedData = (params: object) => get('/user-api/v1/c
 const getErrorRequestDetailedData = (params: object) => get('/user-api/v1/convert-data/getErrorRequestDetailedData', params)
 // Dashboard - 获取失败率 Error Ratio
 const getErrorRatioDetailedData = (params: object) => get('/user-api/v1/convert-data/getErrorRatioDetailedData', params)
+// Dashboard - 获取失败率 Error Ratio
+const getInvalidRatioDetailedData = (params: object) => get('/user-api/v1/convert-data/getInvalidRequestDetailedData', params)
 // Dashboard - 获取平均转换时间 Average Process Date
 const getAverageProcessTimeDetailedData = (params: object) => get('/user-api/v1/convert-data/getAverageProcessTimeDetailedData', params)
 // Dashboard - 导出报表

+ 49 - 1
src/views/projects/dashboard.vue

@@ -48,6 +48,19 @@
             <p>{{ analysisData && analysisData.successfulRequest }}</p>
           </div>
         </div>
+        <div class="data-box invalid-requests-box" :class="{'data-selected': dataSelected === 5}" @click="selectData(5)">
+          <img v-if="dataSelected === 5" src="../../../static/images/dashboard/invalid_selected@2x.png" alt="data_red">
+          <img v-else src="../../../static/images/dashboard/invalid@2x.png" alt="data_red">
+          <div>
+            <div>
+              <span>{{ $t('dashboard.invalidReq') }}</span>
+              <el-tooltip class="item" effect="dark" :content="$t('dashboard.invalidReqTip')" placement="bottom">
+                <img src="@/assets/images/common/info_white.svg" alt="info">
+              </el-tooltip>
+            </div>
+            <p>{{ analysisData && analysisData.invalidRequest }}</p>
+          </div>
+        </div>
         <div class="data-box error-requests-box" :class="{'data-selected': dataSelected === 2}" @click="selectData(2)">
           <img v-if="dataSelected === 2" src="../../../static/images/dashboard/data_red_selected@2x.png" alt="data_red">
           <img v-else src="../../../static/images/dashboard/data_red@2x.png" alt="data_red">
@@ -468,6 +481,39 @@ export default class dashBoard extends Vue {
           }
         }]
       })
+    } else if (this.dataSelected === 5) {
+      myChart.setOption({
+        title: {
+          text: this.$t('dashboard.invalidReq')
+        },
+        xAxis: {
+          axisPointer: {
+            lineStyle: {
+              color: 'rgba(255, 143, 107, 0.16)'
+            }
+          }
+        },
+        tooltip: {
+          formatter: '<span style="color: #396FFA; font-weight: 700; font-size: 18px; line-height: 24px;">{c}</span><br />{b}'
+        },
+        series: [{
+          lineStyle: {
+            color: '#396FFA'
+          },
+          areaStyle: {
+            color: {
+              colorStops: [{
+                offset: 0, color: 'rgba(246, 85, 91, 0.3)' // 0% 处的颜色
+              }, {
+                offset: 1, color: 'rgba(246, 85, 91, 0)' // 100% 处的颜色
+              }]
+            }
+          },
+          itemStyle: {
+            color: '#396FFA'
+          }
+        }]
+      })
     }
     window.onresize = function () {
       myChart.resize()
@@ -750,7 +796,6 @@ export default class dashBoard extends Vue {
         display: flex;
         align-items: center;
         width: 100%;
-        min-width: 236px;
         padding: 12px 0 12px 16px;
         border: 1px solid #E8E8E8;
         border-radius: 8px;
@@ -792,6 +837,9 @@ export default class dashBoard extends Vue {
           &.successful-box {
             background-color: rgba(81, 140, 255, 0.1);
           }
+          &.invalid-requests-box {
+            background-color: rgba(139, 168, 202, 0.1);
+          }
           &.error-requests-box {
             background-color: rgba(246, 85, 91, 0.1);
           }

binární
static/images/dashboard/invalid@2x.png


binární
static/images/dashboard/invalid_selected@2x.png