Browse Source

增加公开私有两个属性

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.12.1^2
zouap 2 years ago
parent
commit
caf9e9bb89
2 changed files with 31 additions and 15 deletions
  1. +23
    -15
      web_src/js/components/Model.vue
  2. +8
    -0
      web_src/js/features/i18nVue.js

+ 23
- 15
web_src/js/components/Model.vue View File

@@ -101,6 +101,19 @@
<span class="text-over">{{ scope.row.computeResource }}</span>
</template>
</el-table-column>
<el-table-column
prop="isPrivate"
:label="i18n.model_access"
align="center"
min-width="6.75%"
>
<template slot-scope="scope">
<span class="text-over" :title="scope.row.isPrivate">
{{transStatus(scope.row.isPrivate)}}
</span>
</template>
</el-table-column>

<el-table-column
prop="createdUnix"
:label="i18n.model_create_time"
@@ -130,19 +143,6 @@
</template>
</el-table-column>

<el-table-column
prop="isPrivate"
:label="i18n.model_access"
align="center"
min-width="6.75%"
>
<template slot-scope="scope">
<span class="text-over" :title="scope.row.isPrivate">{{
scope.row.isPrivate
}}</span>
</template>
</el-table-column>

<el-table-column
:label="i18n.model_operation"
min-width="15%"
@@ -157,8 +157,8 @@
:class="{ disabled: !scope.row.isCanOper }"
>{{ i18n.modify }}</a>
<a class="op-btn" v-show="scope.row.modelType != 1" style="color:transparent;cursor:default;" >{{ i18n.modify }}</a>
<a class="op-btn" v-show="repoIsPrivate == false && scope.row.isPrivate==true">设为公开</a>
<a class="op-btn" v-show="repoIsPrivate == false && scope.row.isPrivate==false">设为私有</a>
<a class="op-btn" v-show="repoIsPrivate == false && scope.row.isPrivate==true">>{{ i18n.modelaccess_setpublic }}</a>
<a class="op-btn" v-show="repoIsPrivate == false && scope.row.isPrivate==false">>{{ i18n.modelaccess_setprivate }}</a>
<a class="op-btn"
:href="loadhref + scope.row.id"
@@ -546,6 +546,14 @@ export default {
showinfoHref() {
return this.url + "show_model_info?name=";
},
transStatus(){
return function (state) {
if(state){
return this.i18n.modelaccess_private;
}
return this.i18n.modelaccess_public;
}
},
transTime() {
return function (time) {
let date = new Date(time * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000


+ 8
- 0
web_src/js/features/i18nVue.js View File

@@ -93,6 +93,10 @@ export const i18nVue = {
model_creator: "创建者",
model_operation: "操作",
model_access: "权限",
modelaccess_public:"公开",
modelaccess_private:"私有",
modelaccess_setpublic:"设为公开",
modelaccess_setprivate:"设为私有",
model_create_new_ver: "创建新版本",
model_download: "下载",
model_delete: "删除",
@@ -210,6 +214,10 @@ export const i18nVue = {
model_creator: "Creator",
model_operation: "Operation",
model_access: "Access",
modelaccess_public:"Public",
modelaccess_private:"Private",
modelaccess_setpublic:"Set Public",
modelaccess_setprivate:"Set Private",
model_create_new_ver: "New Version",
model_download: "Download",
model_delete: "Delete",


Loading…
Cancel
Save