Browse Source

算力积分

tags/v1.22.9.2^2
chenshihai 3 years ago
parent
commit
b94812fcac
10 changed files with 37 additions and 26 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +1
    -0
      options/locale/locale_zh-CN.ini
  3. +2
    -2
      templates/base/head_navbar.tmpl
  4. +2
    -2
      templates/base/head_navbar_fluid.tmpl
  5. +2
    -2
      templates/base/head_navbar_home.tmpl
  6. +2
    -2
      templates/base/head_navbar_pro.tmpl
  7. +1
    -1
      web_src/vuepages/const/index.js
  8. +3
    -0
      web_src/vuepages/langs/config/en-US.js
  9. +3
    -0
      web_src/vuepages/langs/config/zh-CN.js
  10. +20
    -17
      web_src/vuepages/pages/reward/point/vp-point.vue

+ 1
- 0
options/locale/locale_en-US.ini View File

@@ -23,6 +23,7 @@ signed_in_as = Signed in as
enable_javascript = This website works better with JavaScript. enable_javascript = This website works better with JavaScript.
toc = Table of Contents toc = Table of Contents
return=Back OpenI return=Back OpenI
calculation_points = Calculation Points


username = Username username = Username
email = Email Address email = Email Address


+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -23,6 +23,7 @@ signed_in_as=已登录用户
enable_javascript=使用 JavaScript能使本网站更好的工作。 enable_javascript=使用 JavaScript能使本网站更好的工作。
toc=目录 toc=目录
return=返回OpenI return=返回OpenI
calculation_points=算力积分


username=用户名 username=用户名
email=电子邮件地址 email=电子邮件地址


+ 2
- 2
templates/base/head_navbar.tmpl View File

@@ -28,7 +28,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -60,7 +60,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>


+ 2
- 2
templates/base/head_navbar_fluid.tmpl View File

@@ -28,7 +28,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -59,7 +59,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>


+ 2
- 2
templates/base/head_navbar_home.tmpl View File

@@ -20,7 +20,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -51,7 +51,7 @@
<a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>


+ 2
- 2
templates/base/head_navbar_pro.tmpl View File

@@ -29,7 +29,7 @@
<a style="border: none;color: #000;white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000;white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>
@@ -61,7 +61,7 @@
<a style="border: none;color: #000;white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> <a style="border: none;color: #000;white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a> <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">算力积分</a>
<a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/reward/point">{{.i18n.Tr "calculation_points"}}</a>
</div> </div>
</div> </div>
</div> </div>


+ 1
- 1
web_src/vuepages/const/index.js View File

@@ -4,6 +4,6 @@ export const SOURCE_TYPE = [{ k: 'ACCOMPLISH_TASK', v: i18n.t('accomplishTask')
export const CONSUME_STATUS = [{ k: 'OPERATING', v: i18n.t('operating') }, { k: 'SUCCEEDED', v: i18n.t('succeeded') }]; export const CONSUME_STATUS = [{ k: 'OPERATING', v: i18n.t('operating') }, { k: 'SUCCEEDED', v: i18n.t('succeeded') }];
export const POINT_ACTIONS = [ export const POINT_ACTIONS = [
{ k: 1, v: i18n.t('createPublicProject') }, { k: 6, v: i18n.t('dailyPutforwardTasks') }, { k: 7, v: i18n.t('dailyPR') }, { k: 10, v: i18n.t('comment') }, { k: 24, v: i18n.t('uploadDatasetFile') }, { k: 30, v: i18n.t('importNewModel') }, { k: 34, v: i18n.t('completeWechatCodeScanningVerification') }, { k: 1, v: i18n.t('createPublicProject') }, { k: 6, v: i18n.t('dailyPutforwardTasks') }, { k: 7, v: i18n.t('dailyPR') }, { k: 10, v: i18n.t('comment') }, { k: 24, v: i18n.t('uploadDatasetFile') }, { k: 30, v: i18n.t('importNewModel') }, { k: 34, v: i18n.t('completeWechatCodeScanningVerification') },
{ k: 35, v: i18n.t('dailyRunCloudbrainTasks') }, { k: 36, v: i18n.t('datasetRecommendedByThePlatform') }, { k: 37, v: i18n.t('submitNewPublicImage') }, { k: 38, v: i18n.t('imageRecommendedByThePlatform') }, { k: 39, v: i18n.t('firstChangeofAvatar') }, { k: 40, v: i18n.t('dailyCommit') }, { k: 41, v: i18n.t('dailyFirstForkProject') },
{ k: 35, v: i18n.t('dailyRunCloudbrainTasks') }, { k: 36, v: i18n.t('datasetRecommendedByThePlatform') }, { k: 37, v: i18n.t('submitNewPublicImage') }, { k: 38, v: i18n.t('imageRecommendedByThePlatform') }, { k: 39, v: i18n.t('firstChangeofAvatar') }, { k: 40, v: i18n.t('dailyCommit') },
]; ];
export const JOB_TYPE = [{ k: 'DEBUG', v: i18n.t('debugTask') }, { k: 'TRAIN', v: i18n.t('trainTask') }, { k: 'INFERENCE', v: i18n.t('inferenceTask') }, { k: 'BENCHMARK', v: i18n.t('benchmarkTask') }]; export const JOB_TYPE = [{ k: 'DEBUG', v: i18n.t('debugTask') }, { k: 'TRAIN', v: i18n.t('trainTask') }, { k: 'INFERENCE', v: i18n.t('inferenceTask') }, { k: 'BENCHMARK', v: i18n.t('benchmarkTask') }];

+ 3
- 0
web_src/vuepages/langs/config/en-US.js View File

@@ -62,6 +62,9 @@ const en = {
memory: 'Memory', memory: 'Memory',
sharedMemory: 'Shared Memory', sharedMemory: 'Shared Memory',
';': ', ', ';': ', ',

noPointGainRecord: 'No Point Earn Record Yet',
noPointConsumeRecord: 'No Point Consume Record Yet',
} }


export default en; export default en;

+ 3
- 0
web_src/vuepages/langs/config/zh-CN.js View File

@@ -62,6 +62,9 @@ const zh = {
memory: '内存', memory: '内存',
sharedMemory: '共享内存', sharedMemory: '共享内存',
';': ';', ';': ';',

noPointGainRecord: '还没有积分获取记录',
noPointConsumeRecord: '还没有积分消耗记录',
} }


export default zh; export default zh;

+ 20
- 17
web_src/vuepages/pages/reward/point/vp-point.vue View File

@@ -42,7 +42,8 @@
</div> </div>
<div class="__r_p_table"> <div class="__r_p_table">
<div v-show="tabIndex === 0"> <div v-show="tabIndex === 0">
<el-table :data="tableData" row-key="sn" style="width: 100%" v-loading="loading" stripe>
<el-table :data="tableData" row-key="sn" style="width: 100%" v-loading="loading" stripe
v-if="tableData.length">
<el-table-column column-key="sn" prop="sn" :label="$t('serialNumber')" align="center" header-align="center" <el-table-column column-key="sn" prop="sn" :label="$t('serialNumber')" align="center" header-align="center"
width="180"> width="180">
</el-table-column> </el-table-column>
@@ -65,9 +66,11 @@
<span>{{ loading ? $t('loading') : $t('noData') }}</span> <span>{{ loading ? $t('loading') : $t('noData') }}</span>
</template> </template>
</el-table> </el-table>
<el-empty v-else :image-size="140" :description="$t('noPointGainRecord')"></el-empty>
</div> </div>
<div v-show="tabIndex === 1"> <div v-show="tabIndex === 1">
<el-table :data="tableData" row-key="sn" style="width: 100%" v-loading="loading" stripe>
<el-table :data="tableData" row-key="sn" style="width: 100%" v-loading="loading" stripe
v-if="tableData.length">
<el-table-column column-key="sn" prop="sn" :label="$t('serialNumber')" align="center" header-align="center" <el-table-column column-key="sn" prop="sn" :label="$t('serialNumber')" align="center" header-align="center"
width="180"> width="180">
</el-table-column> </el-table-column>
@@ -102,8 +105,9 @@
<span>{{ loading ? $t('loading') : $t('noData') }}</span> <span>{{ loading ? $t('loading') : $t('noData') }}</span>
</template> </template>
</el-table> </el-table>
<el-empty v-else :image-size="140" :description="$t('noPointConsumeRecord')"></el-empty>
</div> </div>
<div class="__r_p_pagination">
<div class="__r_p_pagination" v-if="tableData.length">
<div style="margin-top: 2rem"> <div style="margin-top: 2rem">
<div class="center"> <div class="center">
<el-pagination background @current-change="currentChange" :current-page="pageInfo.curpage" <el-pagination background @current-change="currentChange" :current-page="pageInfo.curpage"
@@ -172,21 +176,20 @@ export default {
Operate: this.tabIndex === 0 ? 'INCREASE' : 'DECREASE', Operate: this.tabIndex === 0 ? 'INCREASE' : 'DECREASE',
Page: this.pageInfo.curpage, Page: this.pageInfo.curpage,
// pageSize: this.pageInfo.pageSize, // pageSize: this.pageInfo.pageSize,
})
.then((res) => {
this.loading = false;
const tableData = [];
if (res.data && res.data.Code === 0) {
const data = res.data.Data;
const records = data.Records;
for (let i = 0, iLen = records.length; i < iLen; i++) {
const record = records[i];
tableData.push(getRewardPointRecordInfo(record));
}
this.tableData.splice(0, Infinity, ...tableData);
this.pageInfo.total = data.Total;
}).then((res) => {
this.loading = false;
const tableData = [];
if (res.data && res.data.Code === 0) {
const data = res.data.Data;
const records = data.Records;
for (let i = 0, iLen = records.length; i < iLen; i++) {
const record = records[i];
tableData.push(getRewardPointRecordInfo(record));
} }
})
this.tableData.splice(0, Infinity, ...tableData);
this.pageInfo.total = data.Total;
}
})
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
this.loading = false; this.loading = false;


Loading…
Cancel
Save