diff --git a/.eslintrc.js b/.eslintrc.js index be4e8fc03660b599a10548642c8c65568542efc9..2ec1e8f41cce7ecb731eae4dd5dcb4e4c8c88662 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,11 +5,7 @@ module.exports = { ecmaVersion: 2020, sourceType: 'module', }, - extends: [ - 'plugin:vue/vue3-recommended', - '@vue/typescript/recommended', - '@vue/prettier', - ], + extends: ['plugin:vue/vue3-recommended', '@vue/typescript/recommended', '@vue/prettier'], plugins: ['@typescript-eslint'], env: { browser: true, @@ -25,7 +21,6 @@ module.exports = { 'one-var-declaration-per-line': 'error', 'no-multi-assign': 'error', 'prefer-destructuring': 'error', - complexity: ['error', 20], eqeqeq: 'error', '@typescript-eslint/no-explicit-any': [ 'warn', diff --git a/.npmrc b/.npmrc index fa4e095233fbfba3ff88d57fb03190fd96b72d99..07a29be03721bc842d18172fbcd4bd5d660e623b 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ -strict-peer-dependencies=false \ No newline at end of file +strict-peer-dependencies=false +registry=https://registry.npmmirror.com/ \ No newline at end of file diff --git a/deploy/euler/Dockerfile b/deploy/euler/Dockerfile index ac78a658f19a7f7ed29e7c8348e7c2aac02261c2..c724bcdc395a58403e5a539ee609c44008e629b9 100644 --- a/deploy/euler/Dockerfile +++ b/deploy/euler/Dockerfile @@ -8,18 +8,15 @@ RUN pnpm install RUN pnpm build:euler -FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:1.22.0-22.03-lts - +FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:latest as NginxBuilder +RUN yum update -y && yum install -y pcre-devel COPY --from=Builder /home/openeuler-datastat/web/dist/openeuler /usr/share/nginx/html/ RUN chmod -R 755 /usr/share/nginx/html COPY ./deploy/euler/nginx.conf /etc/nginx/nginx.conf -RUN touch /var/run/nginx.pid \ - && chown -R nginx:nginx /var/log/nginx \ - && chown -R nginx:nginx /var/run/nginx.pid \ - && chown -R nginx:nginx /etc/nginx +ENV RUN_USER nginx +ENV RUN_GROUP nginx EXPOSE 8080 -USER nginx ENTRYPOINT ["nginx", "-g", "daemon off;"] diff --git a/deploy/euler/nginx.conf b/deploy/euler/nginx.conf index b487dc70688013ba27fe5837864e9ca84efe62b2..1901ebf4e9fe30abc6302177c91c546b2ec968cf 100644 --- a/deploy/euler/nginx.conf +++ b/deploy/euler/nginx.conf @@ -26,6 +26,7 @@ http { keepalive_requests 100; proxy_read_timeout 900; proxy_connect_timeout 60; + proxy_hide_header X-Powered-by; proxy_send_timeout 60; client_header_timeout 60; @@ -52,55 +53,73 @@ http { gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/x-httpd-php application/json; gzip_vary on; - # # openeuler - # server { - # # listen 443 ssl; - # # server_name localhost; - # # charset utf-8; - - # listen 8080; - # server_name datastat.openeuler.org; - # charset utf-8; - # limit_conn perserver 50; - # if ($request_method = 'OPTIONS') { - # return 401; - # } - - # location / { - # location /assets { - # # publish every two weeks - # expires 14d; - # add_header Cache-Control public; - # } - # location / { - # add_header Cache-Control no-cache; - # } - # root /usr/share/nginx/html/openeuler; - # index index.html; - # # error_page 404 /404.html; - # } - - - # location ~ ^/(en|zh)/(overview|detail|mobile|about) { - # try_files $uri /index.html; - # } - - # error_page 500 501 502 503 504 505 /500.html; - # error_page 401 /401.html; - # error_page 404 /404.html; - - # location = /401.html { - # root /usr/share/nginx/html; - # } - - # location = /404.html { - # root /usr/share/nginx/html; - # } - - # location = /500.html { - # root /usr/share/nginx/html; - # } - # } - - include /etc/nginx/conf.d/*.conf; + server { + listen 8080; + server_name datastat.openeuler.org; + charset utf-8; + limit_conn perserver 50; + + add_header X-XSS-Protection "1;mode=block"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options DENY; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma no-cache; + add_header Expires 0; + proxy_set_header X-Forwarded-For $http_x_real_ip; + + if ($request_method = 'OPTIONS') { + return 401; + } + if ($request_method !~ ^(GET|POST)$) { + return 403; + } + + location / { + location /assets { + # publish every two weeks + expires 14d; + add_header Cache-Control public; + } + root /usr/share/nginx/html; + index index.html; + # error_page 404 /404.html; + } + + location /oneid/ { + proxy_pass https://omapi.osinfra.cn; + } + + location /query/ { + proxy_pass https://dsapi.osinfra.cn/query/; + } + + location /api-dsapi/ { + proxy_pass https://dsapi.osinfra.cn/; + } + + location /ip-api/ { + proxy_pass http://ip-api.com/json/; + } + + location ~ ^/(en|zh) { + try_files $uri /index.html; + } + + error_page 500 501 502 503 504 505 /500.html; + error_page 401 /401.html; + error_page 404 /index.html; + + location = /401.html { + root /usr/share/nginx/html; + } + + location = /404.html { + root /usr/share/nginx/html; + } + + location = /500.html { + root /usr/share/nginx/html; + } + } } \ No newline at end of file diff --git a/deploy/gauss/Dockerfile b/deploy/gauss/Dockerfile index 0f59ba7179d2484fbe907cfc39abda62cb8a9325..ad9c9faeeef363a5e7043a9f1286aaa108c596fe 100644 --- a/deploy/gauss/Dockerfile +++ b/deploy/gauss/Dockerfile @@ -1,25 +1,22 @@ -FROM gplane/pnpm as Builder +FROM node:18.14.1 as Builder RUN mkdir -p /home/opengauss-datastat/web WORKDIR /home/opengauss-datastat/web COPY . /home/opengauss-datastat/web +RUN npm install pnpm -g RUN pnpm install - RUN pnpm build:gauss -FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:1.22.0-22.03-lts - +FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:latest as NginxBuilder +RUN yum update -y && yum install -y pcre-devel COPY --from=Builder /home/opengauss-datastat/web/dist/opengauss /usr/share/nginx/html/ RUN chmod -R 755 /usr/share/nginx/html COPY ./deploy/gauss/nginx.conf /etc/nginx/nginx.conf -RUN touch /var/run/nginx.pid \ - && chown -R nginx:nginx /var/log/nginx \ - && chown -R nginx:nginx /var/run/nginx.pid \ - && chown -R nginx:nginx /etc/nginx +ENV RUN_USER nginx +ENV RUN_GROUP nginx EXPOSE 8080 -USER nginx ENTRYPOINT ["nginx", "-g", "daemon off;"] diff --git a/deploy/gauss/nginx.conf b/deploy/gauss/nginx.conf index 643e4d24e292242c69956923303234af6ff054dc..291ef5bcf62d92a4fa23a1e99d3f31811ceadcbf 100644 --- a/deploy/gauss/nginx.conf +++ b/deploy/gauss/nginx.conf @@ -26,6 +26,7 @@ http { keepalive_requests 100; proxy_read_timeout 900; proxy_connect_timeout 60; + proxy_hide_header X-Powered-by; proxy_send_timeout 60; client_header_timeout 60; @@ -52,46 +53,78 @@ http { gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/x-httpd-php application/json; gzip_vary on; - # # opengauss - # server { - # # listen 443 ssl; - # # server_name localhost; - # # charset utf-8; - # listen 8080; - # server_name datastat.opengauss.org; - # charset utf-8; - # limit_conn perserver 50; - # if ($request_method = 'OPTIONS') { - # return 401; - # } - # location / { - # location /opengauss/assets { - # # publish every two weeks - # expires 14d; - # add_header Cache-Control public; - # } - # location /opengauss { - # add_header Cache-Control no-cache; - # } - # root /usr/share/nginx/html/opengauss; - # index index.html; - # # error_page 404 /404.html; - # } - # location ~ ^/(en|zh)/(overview|detail|mobile|about) { - # try_files $uri /index.html; - # } - # error_page 500 501 502 503 504 505 /500.html; - # error_page 401 /401.html; - # error_page 404 /404.html; - # location = /401.html { - # root /usr/share/nginx/html; - # } - # location = /404.html { - # root /usr/share/nginx/html; - # } - # location = /500.html { - # root /usr/share/nginx/html; - # } - # } - include /etc/nginx/conf.d/*.conf; + server { + # listen 443 ssl; + # server_name localhost; + # charset utf-8; + + listen 8080; + server_name datastat.opengauss.org; + charset utf-8; + limit_conn perserver 50; + + add_header X-XSS-Protection "1;mode=block"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options DENY; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; + add_header Content-Seecurity-Policy "default-src 'self'"; + add_header Cache-control "no-cache, no-store, must-revalidate"; + add_header Pragma no-cache; + add_header Expires 0; + proxy_set_header X-Forwarded-For $http_x_real_ip; + + if ($request_method = 'OPTIONS') { + return 401; + } + if ($request_method !~ ^(GET|POST)$) { + return 403; + } + + location / { + location /assets { + # publish every two weeks + expires 14d; + add_header Cache-Control public; + } + root /usr/share/nginx/html; + index index.html; + # error_page 404 /404.html; + } + + location /oneid/ { + proxy_pass https://omapi.osinfra.cn; + } + + location /query/ { + proxy_pass https://dsapi.osinfra.cn/query/; + } + + location /api-dsapi/ { + proxy_pass https://dsapi.osinfra.cn/; + } + + location /ip-api/ { + proxy_pass http://ip-api.com/json/; + } + + location ~ ^/(en|zh) { + try_files $uri /index.html; + } + + error_page 500 501 502 503 504 505 /500.html; + error_page 401 /401.html; + error_page 404 /index.html; + + location = /401.html { + root /usr/share/nginx/html; + } + + location = /404.html { + root /usr/share/nginx/html; + } + + location = /500.html { + root /usr/share/nginx/html; + } + } } \ No newline at end of file diff --git a/deploy/lookeng/Dockerfile b/deploy/lookeng/Dockerfile index 5c51b84017543cd4e8d23b8390d02532ad4feabb..090687e131a25f45e25606c07ceb437dca76715b 100644 --- a/deploy/lookeng/Dockerfile +++ b/deploy/lookeng/Dockerfile @@ -8,17 +8,14 @@ RUN pnpm install RUN pnpm build:lookeng -FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:1.22.0-22.03-lts +FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:latest as NginxBuilder COPY --from=Builder /home/openlookeng-datastat/web/dist/openlookeng /usr/share/nginx/html/ RUN chmod -R 755 /usr/share/nginx/html COPY ./deploy/lookeng/nginx.conf /etc/nginx/nginx.conf -RUN touch /var/run/nginx.pid \ - && chown -R nginx:nginx /var/log/nginx \ - && chown -R nginx:nginx /var/run/nginx.pid \ - && chown -R nginx:nginx /etc/nginx +ENV RUN_USER nginx +ENV RUN_GROUP nginx EXPOSE 8080 -USER nginx ENTRYPOINT ["nginx", "-g", "daemon off;"] diff --git a/deploy/mindspore/Dockerfile b/deploy/mindspore/Dockerfile index 58d689f329979addee5330d8f69535e4d2196233..95d7d218fc79212c5b7fdc0c6971057a8354ca36 100644 --- a/deploy/mindspore/Dockerfile +++ b/deploy/mindspore/Dockerfile @@ -8,19 +8,16 @@ RUN pnpm install RUN pnpm build:mindspore -FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:1.22.0-22.03-lts - +FROM swr.cn-north-4.myhuaweicloud.com/opensourceway/openeuler/nginx:latest as NginxBuilder +RUN yum update -y && yum install -y pcre-devel COPY --from=Builder /home/mindspore-datastat/web/dist/mindspore /usr/share/nginx/html/ RUN chmod -R 755 /usr/share/nginx/html COPY ./deploy/mindspore/nginx.conf /etc/nginx/nginx.conf -RUN touch /var/run/nginx.pid \ - && chown -R nginx:nginx /var/log/nginx \ - && chown -R nginx:nginx /var/run/nginx.pid \ - && chown -R nginx:nginx /etc/nginx +ENV RUN_USER nginx +ENV RUN_GROUP nginx EXPOSE 8080 -USER nginx ENTRYPOINT ["nginx", "-g", "daemon off;"] diff --git a/deploy/mindspore/nginx.conf b/deploy/mindspore/nginx.conf index 33451f4346dcded6bae44d461d94153e886c35e6..073057b2d25afc5681a7d074cb24fcd449bb803b 100644 --- a/deploy/mindspore/nginx.conf +++ b/deploy/mindspore/nginx.conf @@ -26,6 +26,7 @@ http { keepalive_requests 100; proxy_read_timeout 900; proxy_connect_timeout 60; + proxy_hide_header X-Powered-by; proxy_send_timeout 60; client_header_timeout 60; @@ -52,46 +53,77 @@ http { gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/x-httpd-php application/json; gzip_vary on; - # # mindspore - # server { - # # listen 443 ssl; - # # server_name localhost; - # # charset utf-8; - # listen 8080; - # server_name datastat.mindspore.cn; - # charset utf-8; - # limit_conn perserver 50; - # if ($request_method = 'OPTIONS') { - # return 401; - # } - # location / { - # location /mindspore/assets { - # # publish every two weeks - # expires 14d; - # add_header Cache-Control public; - # } - # location /mindspore { - # add_header Cache-Control no-cache; - # } - # root /usr/share/nginx/html/mindspore; - # index index.html; - # # error_page 404 /404.html; - # } - # location ~ ^/(en|zh)/(overview|detail|mobile|about) { - # try_files $uri /index.html; - # } - # error_page 500 501 502 503 504 505 /500.html; - # error_page 401 /401.html; - # error_page 404 /404.html; - # location = /401.html { - # root /usr/share/nginx/html; - # } - # location = /404.html { - # root /usr/share/nginx/html; - # } - # location = /500.html { - # root /usr/share/nginx/html; - # } - # } - include /etc/nginx/conf.d/*.conf; + server { + # listen 443 ssl; + # server_name localhost; + # charset utf-8; + + listen 8080; + server_name datastat.mindspore.cn; + charset utf-8; + limit_conn perserver 50; + add_header X-XSS-Protection "1;mode=block"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options DENY; + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; + add_header Content-Seecurity-Policy "default-src 'self'"; + add_header Cache-control "no-cache, no-store, must-revalidate"; + add_header Pragma no-cache; + add_header Expires 0; + proxy_set_header X-Forwarded-For $http_x_real_ip; + + if ($request_method = 'OPTIONS') { + return 401; + } + if ($request_method !~ ^(GET|POST)$) { + return 403; + } + + location / { + location /assets { + # publish every two weeks + expires 14d; + add_header Cache-Control public; + } + root /usr/share/nginx/html; + index index.html; + # error_page 404 /404.html; + } + + location /oneid/ { + proxy_pass https://omapi.osinfra.cn; + } + + location /query/ { + proxy_pass https://dsapi.osinfra.cn/query/; + } + + location /api-dsapi/ { + proxy_pass https://dsapi.osinfra.cn/; + } + + location /ip-api/ { + proxy_pass http://ip-api.com/json/; + } + + location ~ ^/(en|zh) { + try_files $uri /index.html; + } + + error_page 500 501 502 503 504 505 /500.html; + error_page 401 /401.html; + error_page 404 /index.html; + + location = /401.html { + root /usr/share/nginx/html; + } + + location = /404.html { + root /usr/share/nginx/html; + } + + location = /500.html { + root /usr/share/nginx/html; + } + } } \ No newline at end of file diff --git a/package.json b/package.json index 58d14ca03fcc5da36e0e5e5a3b8fa6a6bf2100d1..9c8fc8603e77cc98f1f567cff26ff722edff06bd 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,9 @@ "build": "pnpm build:euler && pnpm build:gauss && pnpm build:lookeng && pnpm build:mindspore && pnpm build:harmony" }, "dependencies": { - "@authing/native-js-ui-components": "^3.1.16", "@element-plus/icons-vue": "^2.0.4", + "@opensig/open-analytics": "^0.0.9", "@types/d3": "^7.4.0", - "authing-js-sdk": "^4.23.33", "axios": "^0.26.0", "d3": "^7.4.4", "echarts": "^5.3.2", @@ -28,19 +27,17 @@ "lodash-es": "^4.17.21", "normalize.css": "^8.0.1", "pinia": "^2.0.11", - "sa-sdk-javascript": "^1.25.10", "swiper": "^8.0.7", "vue": "^3.2.25", "vue-i18n": "^9.1.9", "vue-router": "^4.0.13" }, "devDependencies": { - "@intlify/vite-plugin-vue-i18n": "^3.3.1", "@types/lodash-es": "^4.17.6", "@types/node": "^17.0.21", "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", - "@vitejs/plugin-vue": "^2.2.0", + "@vitejs/plugin-vue": "^4.6.2", "@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-typescript": "^10.0.0", "eslint": "^8.9.0", @@ -48,9 +45,9 @@ "prettier": "^2.5.1", "sass": "^1.49.9", "typescript": "^4.5.4", - "unplugin-auto-import": "^0.7.1", - "unplugin-vue-components": "^0.19.2", - "vite": "^2.8.0", - "vue-tsc": "^0.29.8" + "unplugin-auto-import": "^0.11.5", + "unplugin-vue-components": "^0.26.0", + "vite": "^4.5.3", + "vue-tsc": "^1.8.25" } } diff --git a/packages/euler/.env.development b/packages/euler/.env.development index fa9f8afc1c40d69dda48a13102f7991f731cbdd7..d5a75c74803f55f386b0b745dada3e7367c07696 100644 --- a/packages/euler/.env.development +++ b/packages/euler/.env.development @@ -1,8 +1,3 @@ VITE_COOKIE_DOMAIN = localhost VITE_LOGIN_ORIGIN = https://id.openeuler.org - - -# Manage tripartite links - -VITE_SENSOR_SERVER = https://omapi.osinfra.cn/query/track?community=openEuler diff --git a/packages/euler/.env.production b/packages/euler/.env.production index 6f48d977ac719f7732fb301bd0450c8d301aa217..79e379e6cfc388457ae92c706e79625c7ed410a8 100644 --- a/packages/euler/.env.production +++ b/packages/euler/.env.production @@ -1,8 +1,3 @@ VITE_COOKIE_DOMAIN = .openeuler.org -VITE_LOGIN_ORIGIN = https://id.openeuler.org/ - - -# Manage tripartite links - -VITE_SENSOR_SERVER = https://omapi.osinfra.cn/query/track?community=openEuler +VITE_LOGIN_ORIGIN = https://id.openeuler.org diff --git a/packages/euler/auto-imports.d.ts b/packages/euler/auto-imports.d.ts index 5e073f1fc0759622df2567b32aedf0c638682a3c..08908edd6a4136cad144e7a483f291f9d9618be2 100644 --- a/packages/euler/auto-imports.d.ts +++ b/packages/euler/auto-imports.d.ts @@ -1,6 +1,5 @@ // Generated by 'unplugin-auto-import' -// We suggest you to commit this file into source control +export {} declare global { } -export {} diff --git a/packages/euler/components.d.ts b/packages/euler/components.d.ts index 28512e43535ceab9d7f8fdf645a7fbdcae73684a..6ffaf080bc321b9f7025ef01ab816688e0eda63d 100644 --- a/packages/euler/components.d.ts +++ b/packages/euler/components.d.ts @@ -1,8 +1,11 @@ -// generated by unplugin-vue-components -// We suggest you to commit this file into source control -// Read more: https://github.com/vuejs/vue-next/pull/3399 +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by unplugin-vue-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} -declare module '@vue/runtime-core' { +declare module 'vue' { export interface GlobalComponents { AppFooter: typeof import('./src/components/AppFooter.vue')['default'] AppHeader: typeof import('./src/components/AppHeader.vue')['default'] @@ -11,6 +14,8 @@ declare module '@vue/runtime-core' { ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElCol: typeof import('element-plus/es')['ElCol'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] @@ -19,30 +24,29 @@ declare module '@vue/runtime-core' { ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] - ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] + ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElProgress: typeof import('element-plus/es')['ElProgress'] ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRow: typeof import('element-plus/es')['ElRow'] - ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSelect: typeof import('element-plus/es')['ElSelect'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - Loading: typeof import('element-plus/es')['ElLoadingDirective'] LoadingArc: typeof import('./src/components/LoadingArc.vue')['default'] MobileTemplate: typeof import('./src/components/MobileTemplate.vue')['default'] OFormRadio: typeof import('./src/components/OFormRadio.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] TheBar: typeof import('./src/components/TheBar.vue')['default'] - TheBarTemplate: typeof import('./src/components/TheBarTemplate.vue')['default'] TheForm: typeof import('./src/components/TheForm.vue')['default'] TheList: typeof import('./src/components/TheList.vue')['default'] TheProgress: typeof import('./src/components/TheProgress.vue')['default'] } + export interface ComponentCustomProperties { + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] + } } - -export { } diff --git a/packages/euler/index.html b/packages/euler/index.html index 9374896e877bf6c531865c150ab0e9438f6559b6..313116c0ce1cab11c750ab3ea397d26ea19621e7 100644 --- a/packages/euler/index.html +++ b/packages/euler/index.html @@ -3,33 +3,37 @@ - + openEuler DATASTAT
- - - + {{ openCommunityInfo.email }} + -

{{ t('userContributor') }}

{ margin-top: 20px; } } - + \ No newline at end of file diff --git a/packages/euler/src/views/contributors/SoftwareContribute.vue b/packages/euler/src/views/contributors/SoftwareContribute.vue deleted file mode 100644 index 0b9e37cfa6c814b1c0c98650ba084c1ca6bf9252..0000000000000000000000000000000000000000 --- a/packages/euler/src/views/contributors/SoftwareContribute.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - diff --git a/packages/euler/src/views/mobile/Index.vue b/packages/euler/src/views/mobile/Index.vue index 3b37eec8e0b343be300b5a0a0e7da92d33366704..fa2814778b514f9a81d7f6eb69c0dae1ab9db292 100644 --- a/packages/euler/src/views/mobile/Index.vue +++ b/packages/euler/src/views/mobile/Index.vue @@ -14,10 +14,12 @@ import { useCommonStore } from '@/stores/common'; import { hasPermission, hasPermissions } from 'shared/utils/login'; import TheForm from '@/components/TheForm.vue'; import OMobileTemplate from 'shared/components/OMobileTemplate.vue'; +import MenberAndGroupRelationship from './current/MenberAndGroupRelationship.vue'; import { formatNumber, toThousands, percentageTotal, + getYearByOffset, } from 'shared/utils/helper'; import logo from '@/assets/datastat-black.png'; import logoZh from '@/assets/datastat-zh-black.png'; @@ -29,6 +31,7 @@ import CommitteeAndSpecialGroupRelationship from './current/CommitteeAndSpecialG import { useRoute, useRouter } from 'vue-router'; import { IObject } from 'shared/@types/interface'; import MobileTemplate from '@/components/MobileTemplate.vue'; +import { Right } from '@element-plus/icons-vue'; import { useStaffStore } from '@/stores/staff'; const useStaff = useStaffStore(); const router = useRouter(); @@ -187,6 +190,7 @@ const goToCompany = (data: IObject) => { ) { data; router.push(`/${useCommon.language}/mobile/company/${data.company_cn}`); + } else { } }; const goToSigs = (title: any) => { @@ -259,6 +263,10 @@ const goToUser = (data: IObject) => { {{ t('home.repos') }}{{ toThousands(useCommon.allData.repos) }}

+

+ {{ t('home.isv') + }}{{ toThousands(useCommon.allData.isv) }} +

{{ useCommon.time }}

@@ -434,6 +442,52 @@ const goToUser = (data: IObject) => { + + @@ -221,7 +227,7 @@ const goTo = (item: Form) => { } .wrapper { display: grid; - grid-template-columns: repeat(4, 1fr); + grid-template-columns: repeat(4, 1fr); // 宽度平均分成四等份 /* 声明行间距和列间距 */ grid-gap: 8px; margin-bottom: 16px; diff --git a/packages/euler/src/views/mobile/person/ContributionDynamic.vue b/packages/euler/src/views/mobile/person/ContributionDynamic.vue index 37e907e62de35937f0c364ad083d30ed28b318ed..5f7ad54976095dc2c653bb81829972378d94d95a 100644 --- a/packages/euler/src/views/mobile/person/ContributionDynamic.vue +++ b/packages/euler/src/views/mobile/person/ContributionDynamic.vue @@ -1,56 +1,58 @@ - - diff --git a/packages/euler/src/views/mobile/sig/MobileTableList.vue b/packages/euler/src/views/mobile/sig/MobileTableList.vue index 599b12f74895dd8b25286d09e453d54b6e0ee627..6015c194ee64014bfee0d55d03147bfc90a28761 100644 --- a/packages/euler/src/views/mobile/sig/MobileTableList.vue +++ b/packages/euler/src/views/mobile/sig/MobileTableList.vue @@ -1,20 +1,21 @@ @@ -204,9 +208,7 @@ const goToCompany = (data: IObject) => { @clear="clearSearchInput" > @@ -220,19 +222,17 @@ const goToCompany = (data: IObject) => { class="bar-content-item" >

+ {{ - useCommon.language === 'zh' + useCommon.language === "zh" ? item.company_cn - : item.company_en === '' + : item.company_en === "" ? item.company_cn : item.company_en }} { }" @click="goToCompany(item)" >{{ - useCommon.language === 'zh' + useCommon.language === "zh" ? item.company_cn - : item.company_en === '' + : item.company_en === "" ? item.company_cn : item.company_en }} { + \ No newline at end of file diff --git a/packages/euler/src/views/person/DataShow.vue b/packages/euler/src/views/person/DataShow.vue index c36249a3f0be1e8d7b14872dfddd382d9f95f1ff..394d87dd57b7ee17c962815417803eb1448d50bd 100644 --- a/packages/euler/src/views/person/DataShow.vue +++ b/packages/euler/src/views/person/DataShow.vue @@ -2,7 +2,7 @@

- {{ t(timeTitle) }}{{ t('zhcontribut') }} + {{ t(timeTitle) }}{{t('zhcontribut')}}
- {{ t('Mergerequest') }} PR + {{ t("Mergerequest") }} PR
{{ toThousands(mergeRequest) }}
- {{ t('NeedsProblems') }} Issue + {{ t("NeedsProblems") }} Issue
{{ toThousands(issueData) }}
- {{ t('review') }} Comment + {{ t("review") }} Comment
{{ toThousands(comment) }}
- {{ t('SIGNumber') }} + {{ t("SIGNumber") }}
{{ toThousands(contributors) }}
@@ -47,17 +45,17 @@
@@ -179,13 +193,14 @@ onMounted(() => { } } .btnc { - background-image: url('@/assets/linedown.png'); + background-image: url("@/assets/linedown.png"); width: 24px; height: 24px; margin-left: 8px; } .main-left-title { display: flex; + // width: 160px; height: 24px; font-size: 16px; font-family: PingFangSC-Medium, PingFang SC; diff --git a/packages/euler/src/views/person/SigContribution.vue b/packages/euler/src/views/person/SigContribution.vue index 591a3d39e58b146cf682316e7c760c6b74d5e6e2..d8e55bae9a46d9fda6226d5f758b14d6cb4c49b1 100644 --- a/packages/euler/src/views/person/SigContribution.vue +++ b/packages/euler/src/views/person/SigContribution.vue @@ -1,7 +1,9 @@