| @@ -1,13 +1,13 @@ | |||
| <template> | |||
| <div> | |||
| <h4 id="about-desc" class="ui header desc-home">简介 | |||
| <h4 id="about-desc" class="ui header desc-home">{{$t('message.introduction')}} | |||
| <a class="edit-icon" v-if="IsPermit" id ="editBtn" href="javascript:void(0)" @click="editClick" > | |||
| <i class="gray edit outline icon" style="margin-right: 0;"></i> | |||
| </a> | |||
| </h4> | |||
| <edit-dialog-cmpt | |||
| :vmContext="vmContext" | |||
| dialogTitle="编辑仓库信息" | |||
| :dialogTitle="$t('message.edit_repository_information')" | |||
| v-model="editDataDialog" | |||
| :deleteCallback="editDataFunc" | |||
| :deleteLoading ="editDataListLoading" | |||
| @@ -19,11 +19,11 @@ | |||
| </div> | |||
| <div slot="content"> | |||
| <el-form label-position="top" :model="info" :rules="rule" ref="ruleForm"> | |||
| <el-form-item label="简介" prop="desc"> | |||
| <el-input v-model="info.desc" type="textarea" placeholder="请输入内容" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input> | |||
| <el-form-item :label="$t('message.introduction')" prop="desc"> | |||
| <el-input v-model="info.desc" type="textarea" :placeholder="$t('message.please_enter_content')" :autosize="{minRows:4,maxRows:6}" maxlength="255" show-word-limit></el-input> | |||
| </el-form-item> | |||
| <el-form-item label="主页" prop="index_web" > | |||
| <el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input> | |||
| <el-form-item :label="$t('message.home')" prop="index_web" > | |||
| <el-input v-model="info.index_web" :placeholder="$t('message.home_placeholder')"></el-input> | |||
| </el-form-item> | |||
| </el-form> | |||
| </div> | |||
| @@ -3,7 +3,7 @@ | |||
| <div class="input-search"> | |||
| <el-input v-model="input" clearable :autofocus="true" @input="changeValue" id="topics_input" @keyup.enter.native="postTopic" placeholder="$t('message.search_or_create_tags')搜索或创建标签"> | |||
| <el-input v-model="input" clearable :autofocus="true" @input="changeValue" id="topics_input" @keyup.enter.native="postTopic" :placeholder="$t('message.search_or_create_tags')"> | |||
| </el-input> | |||
| <div class="scrolling-menu"> | |||
| @@ -14,7 +14,7 @@ | |||
| <div class="text">{{arr.topic_name.toLowerCase()}} </div> | |||
| </div> | |||
| <div v-if="showInputValue" class="addition item-text" @click="postTopic"> | |||
| {{$t('message.click_or_enter_to_add')}}点击或回车添加<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签 | |||
| {{$t('message.click_or_enter_to_add')}}<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签 | |||
| </div> | |||
| <div v-if="showAddTopic" class="item-text" @click="addPostTopic"> | |||
| <div class="icon-wrapper"> | |||
| @@ -100,7 +100,7 @@ export default { | |||
| this.Post(data,topics) | |||
| this.$set(this.showInitTopic,item,false) | |||
| if(this.arrayTopics.length===0){ | |||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||
| }else{ | |||
| $('#repo-topics1').children('span').remove() | |||
| } | |||
| @@ -266,7 +266,7 @@ export default { | |||
| if(this.arrayTopics.length===0){ | |||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||
| }else{ | |||
| $('#repo-topics1').children('span').remove() | |||
| } | |||
| @@ -399,7 +399,7 @@ mounted() { | |||
| }); | |||
| if(this.arrayTopics.length===0){ | |||
| $('#repo-topics1').append('<span class="no-description text-italic">暂无标签</span>') | |||
| $('#repo-topics1').append('<span class="no-description text-italic">'+this.$t('message.No_label_yet')+'</span>') | |||
| } | |||
| this.changeValue(); | |||
| this.getLang() | |||
| @@ -3,18 +3,18 @@ | |||
| <div class="header-wrapper"> | |||
| <div class="ui container"> | |||
| <el-row class="image_text"> | |||
| <h1>{{$t('message.cloud_brain_mirror')}}云脑镜像</h1> | |||
| <h1>{{$t('message.cloud_brain_mirror')}}</h1> | |||
| </el-row> | |||
| </div> | |||
| </div> | |||
| <div class="ui container" id="header"> | |||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||
| <el-tab-pane label="$t(message.cloud_brain_mirror) 云脑镜像" name="first" v-loading="loading"> | |||
| <el-tab-pane :label="$t('message.cloud_brain_mirror')"name="first" v-loading="loading"> | |||
| <div class="ui sixteen wide column"> | |||
| <div class="ui two column stackable grid"> | |||
| <div class="column"> | |||
| <el-input placeholder="$t('message.enter_mirror_name_keyword')请输入镜像名称关健词" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}搜索</el-button> | |||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||
| <el-button id="success" slot="append" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}</el-button> | |||
| </el-input> | |||
| </div> | |||
| @@ -42,7 +42,7 @@ | |||
| :header-cell-style="tableHeaderStyle" | |||
| :default-sort="{prop:'createtime',order:'descending'}"> | |||
| <el-table-column | |||
| label="$t('message.mirror_name')镜像名称" | |||
| :label="$t('message.mirror_name')" | |||
| width="350" | |||
| align="left" | |||
| prop="name" | |||
| @@ -53,12 +53,12 @@ | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column | |||
| label="$t('message.file_path_image_description')文件路径/镜像描述" | |||
| :label="$t('message.file_path_image_description')" | |||
| width="450" | |||
| align="left" | |||
| > | |||
| <template slot-scope="scope"> | |||
| <el-tooltip class="item" effect="dark" content="$t('message.click_Copy_file_path')点击复制文件路径" placement="top"> | |||
| <el-tooltip class="item" effect="dark" :content="$t('message.click_Copy_file_path')" placement="top"> | |||
| <a class="text-over" style="display:block;" @click="copyUrl(scope.row.place)">{{ scope.row.place }}</a> | |||
| </el-tooltip> | |||
| @@ -67,14 +67,14 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="provider" | |||
| label="$t('message.provider')提供者" | |||
| :label="$t('message.provider')" | |||
| width="120" | |||
| align="left" | |||
| sortable> | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="createtime" | |||
| label="$t('message.creation_time')创建时间" | |||
| :label="$t('message.creation_time')" | |||
| align="center" | |||
| sortable> | |||
| <template slot-scope="scope"> | |||
| @@ -98,12 +98,12 @@ | |||
| </el-tab-pane> | |||
| <el-tab-pane label="$t('message.custom_mirror_1')自定义镜像(云脑1)" name="second" v-loading="loading1"> | |||
| <el-tab-pane :label="$t('message.custom_mirror_1')" name="second" v-loading="loading1"> | |||
| <div class="ui sixteen wide column"> | |||
| <div class="ui two column stackable grid"> | |||
| <div class="column"> | |||
| <el-input placeholder="$t('message.enter_mirror_name_keyword')请输入镜像名称关健词" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||
| <el-button slot="append" id="success" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}搜索</el-button> | |||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select" @keyup.enter.native="searchName()"> | |||
| <el-button slot="append" id="success" icon="el-icon-search" @click="searchName()">{{$t('message.search')}}</el-button> | |||
| </el-input> | |||
| </div> | |||
| @@ -133,7 +133,7 @@ | |||
| :header-cell-style="tableHeaderStyle" | |||
| :default-sort="{prop:'createtime',order:'descending'}"> | |||
| <el-table-column | |||
| label="$t('message.mirror_name')镜像名称" | |||
| :label="$t('message.mirror_name')" | |||
| width="350" | |||
| align="left" | |||
| prop="name" | |||
| @@ -144,13 +144,13 @@ | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column | |||
| label="$t('message.file_path_mirror_description')文件路径/镜像描述" | |||
| :label="$t('message.file_path_mirror_description')" | |||
| width="450" | |||
| align="left" | |||
| > | |||
| <template slot-scope="scope"> | |||
| <el-tooltip class="item" effect="dark" content="$t('message.click_Copy_file_path')点击复制文件路径" placement="top"> | |||
| <el-tooltip class="item" effect="dark" :content="$t('message.click_Copy_file_path')" placement="top"> | |||
| <a class="text-over" style="display:block;" @click="copyUrl(scope.row.place)">{{ scope.row.place }}</a> | |||
| </el-tooltip> | |||
| @@ -159,14 +159,14 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="provider" | |||
| label="$t('message.provider')提供者" | |||
| :label="$t('message.provider')" | |||
| width="120" | |||
| align="left" | |||
| sortable> | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="createtime" | |||
| label="$t('message.creation_time')创建时间" | |||
| :label="$t('message.creation_time')" | |||
| align="center" | |||
| sortable> | |||
| <template slot-scope="scope"> | |||
| @@ -190,13 +190,13 @@ | |||
| </el-tab-pane> | |||
| <el-tab-pane label="$t('message.public_mirror_2')公共镜像(云脑2)" name="third"> | |||
| <el-tab-pane :label="$t('message.public_mirror_2')" name="third"> | |||
| <div class="ui sixteen wide column"> | |||
| <div class="ui two column stackable grid"> | |||
| <div class="column"> | |||
| <el-input placeholder="$t('message.enter_mirror_name_keyword')请输入镜像名称关健词" v-model="search" class="input-with-select"> | |||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}搜索</el-button> | |||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select"> | |||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}</el-button> | |||
| </el-input> | |||
| </div> | |||
| @@ -220,13 +220,13 @@ | |||
| <el-empty :image-size="200"></el-empty> | |||
| </el-tab-pane> | |||
| <el-tab-pane label="$t('message.custom_mirror_2')自定义镜像(云脑2)" name="fourth"> | |||
| <el-tab-pane :label="$t('message.custom_mirror_2')" name="fourth"> | |||
| <div class="ui sixteen wide column"> | |||
| <div class="ui two column stackable grid"> | |||
| <div class="column"> | |||
| <el-input placeholder="$t('message.enter_mirror_name_keyword')请输入镜像名称关健词" v-model="search" class="input-with-select"> | |||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}搜索</el-button> | |||
| <el-input :placeholder="$t('message.enter_mirror_name_keyword')" v-model="search" class="input-with-select"> | |||
| <el-button slot="append" id="success" icon="el-icon-search">{{$t('message.search')}}</el-button> | |||
| </el-input> | |||
| </div> | |||
| @@ -14,7 +14,7 @@ | |||
| > | |||
| <el-table-column | |||
| prop="Name" | |||
| label="模型名称" | |||
| :label="$t('model.model_name')" | |||
| align="left" | |||
| min-width="18%" | |||
| > | |||
| @@ -28,7 +28,7 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="Version" | |||
| label="版本" | |||
| :label="$t('model.version')" | |||
| align="center" | |||
| min-width="6.5%" | |||
| > | |||
| @@ -39,7 +39,7 @@ | |||
| <el-table-column | |||
| prop="VersionCount" | |||
| label="版本数" | |||
| :label="$('model.version_number')" | |||
| align="center" | |||
| min-width="7.5%" | |||
| > | |||
| @@ -50,7 +50,7 @@ | |||
| <el-table-column | |||
| prop="Size" | |||
| label="模型大小" | |||
| :label="$t('model.model_size')" | |||
| align="center" | |||
| min-width="10.5%" | |||
| > | |||
| @@ -60,7 +60,7 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="EngineName" | |||
| label="AI引擎" | |||
| :label="$t('model.AI_engine')" | |||
| align="center" | |||
| min-width="8.5%" | |||
| > | |||
| @@ -70,7 +70,7 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="ComputeResource" | |||
| label="计算资源" | |||
| :label="$t('model.computing_resources')" | |||
| align="center" | |||
| min-width="10.5%" | |||
| > | |||
| @@ -80,7 +80,7 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="CreatedUnix" | |||
| label="创建时间" | |||
| :label="$t('model.creation_time')" | |||
| align="center" | |||
| min-width="13.75%" | |||
| > | |||
| @@ -90,7 +90,7 @@ | |||
| </el-table-column> | |||
| <el-table-column | |||
| prop="UserName" | |||
| label="创建者" | |||
| :label="$t('model.creator')" | |||
| align="center" | |||
| min-width="6.75%" | |||
| > | |||
| @@ -101,12 +101,12 @@ | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column label="操作" min-width="18%" align="center"> | |||
| <el-table-column :label="$t('model.operate')" min-width="18%" align="center"> | |||
| <template slot-scope="scope"> | |||
| <div class="space-around"> | |||
| <a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">创建新版本</a> | |||
| <a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">下载</a> | |||
| <a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName)">删除</a> | |||
| <a :style="{visibility:!scope.row.Children ? 'visible':'hidden'}" :class="{'disabled':!scope.row.IsCanOper}" @click="showcreateVue(scope.row.Name,scope.row.Version,scope.row.Label)">{{$t('model.create_version')}}</a> | |||
| <a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">{{$t('modle.download')}}</a> | |||
| <a :class="{'disabled':!scope.row.IsCanDelete}" @click="deleteModel(scope.row.ID,scope.row.cName)">{{$t('model.delete')}}</a> | |||
| </div> | |||
| </template> | |||
| @@ -200,7 +200,7 @@ export default { | |||
| .modal({ | |||
| centered: false, | |||
| onShow:function(){ | |||
| $('#model_header').text("创建模型新版本") | |||
| $('#model_header').text(this.$t('model.create_version_model')) | |||
| $('input[name="Name"]').addClass('model_disabled') | |||
| $('input[name="Name"]').attr('readonly','readonly') | |||
| $('input[name="Version"]').addClass('model_disabled') | |||
| @@ -339,9 +339,9 @@ export default { | |||
| }, | |||
| onHidden: function() { | |||
| if (flag == false) { | |||
| $('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||
| $('.alert').html(this.$t('modle.canceled_operation')).removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut(); | |||
| }else{ | |||
| $('.alert').html('删除成功').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||
| $('.alert').html(this.$t('modle.successfully_deleted')).removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); | |||
| } | |||
| } | |||
| }) | |||
| @@ -1,36 +1,47 @@ | |||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||
| const en = { | |||
| message: { | |||
| code: 'code', | |||
| contributor:'Contributor', | |||
| introduction: 'Introduction', | |||
| edit_repository_information: 'Edit repository information', | |||
| please_enter_content: 'Please enter content', | |||
| home: 'Home', | |||
| search_or_create_tags: 'Search or create tags', | |||
| click_or_enter_to_add: 'Click or enter to add', | |||
| label: 'Label', | |||
| No_label_yet: 'No label yet', | |||
| cloud_brain_mirror: 'Cloud Brain Mirror', | |||
| public_mirror_1: 'Public mirror (Cloud Brain 1)', | |||
| enter_mirror_name_keyword: 'Please enter the image name keyword', | |||
| search: 'Search', | |||
| mirror_name: 'Mirror Name', | |||
| file_path_mirror_description: 'File Path / Mirror Description', | |||
| click_Copy_file_path: 'Click Copy File Path', | |||
| provider: 'Provider', | |||
| creation_time: 'Creation Time', | |||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 1)', | |||
| public_mirror_2: 'Public Mirror (Cloud Brain 2)', | |||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 2)' | |||
| message: { | |||
| code: 'code', | |||
| contributor:'Contributor', | |||
| introduction: 'Introduction', | |||
| edit_repository_information: 'Edit repository information', | |||
| please_enter_content: 'Please enter content', | |||
| home: 'Home', | |||
| home_placeholder:'home(eg: https://git.openi.org.cn)', | |||
| search_or_create_tags: 'Search or create tags', | |||
| click_or_enter_to_add: 'Click or enter to add', | |||
| label: 'Label', | |||
| No_label_yet: 'No label', | |||
| cloud_brain_mirror: 'Cloud Brain Mirror', | |||
| public_mirror_1: 'Public mirror (Cloud Brain 1)', | |||
| enter_mirror_name_keyword: 'Please enter the image name keyword', | |||
| search: 'Search', | |||
| mirror_name: 'Mirror Name', | |||
| file_path_mirror_description: 'File Path / Mirror Description', | |||
| click_Copy_file_path: 'Click Copy File Path', | |||
| provider: 'Provider', | |||
| creation_time: 'Creation Time', | |||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 1)', | |||
| public_mirror_2: 'Public Mirror (Cloud Brain 2)', | |||
| custom_mirror_1: 'Custom Mirror (Cloud Brain 2)' | |||
| }, | |||
| model:{ | |||
| model_name:'Model Name', | |||
| version:'Version', | |||
| version_number:'Version Number', | |||
| model_size:'Model Size', | |||
| AI_engine:'AI Engine', | |||
| computing_resources:'Computing Resources', | |||
| creation_time:'Creation Time', | |||
| creator:'Creator', | |||
| operate:'Operate', | |||
| create_version:'Create a new version', | |||
| download:'Download', | |||
| delete:'Delete', | |||
| create_version_model:'Create a new version of the model', | |||
| canceled_operation:'You have canceled the operation', | |||
| successfully_deleted:'Successfully deleted' | |||
| } | |||
| } | |||
| @@ -1,33 +1,48 @@ | |||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||
| const zh = { | |||
| message: { | |||
| code: '代码', | |||
| contributor: '贡献者', | |||
| introduction: '简介', | |||
| edit_repository_information: '编辑仓库信息', | |||
| please_enter_content: '请输入内容', | |||
| home: '主页', | |||
| search_or_create_tags:'搜索或创建标签', | |||
| click_or_enter_to_add: '点击或回车添加', | |||
| label: '标签', | |||
| No_label_yet: '暂无标签', | |||
| cloud_brain_mirror: '云脑镜像', | |||
| public_mirror_1: '公共镜像(云脑1)', | |||
| enter_mirror_name_keyword: '请输入镜像名称关健词', | |||
| search: '搜索', | |||
| mirror_name: '镜像名称', | |||
| file_path_mirror_description: '文件路径/镜像描述', | |||
| click_Copy_file_path: '点击复制文件路径', | |||
| provider: '提供者', | |||
| creation_time: '创建时间', | |||
| custom_mirror_1: '自定义镜像(云脑1)', | |||
| public_mirror_2: '公共镜像(云脑2)', | |||
| custom_mirror_2: '自定义镜像(云脑2)' | |||
| } | |||
| message: { | |||
| code: '代码', | |||
| contributor: '贡献者', | |||
| introduction: '简介', | |||
| edit_repository_information: '编辑仓库信息', | |||
| please_enter_content: '请输入内容', | |||
| home: '主页', | |||
| home_placeholder:'主页(eg: https://git.openi.org.cn)', | |||
| search_or_create_tags:'搜索或创建标签', | |||
| click_or_enter_to_add: '点击或回车添加', | |||
| label: '标签', | |||
| No_label_yet: '暂无标签', | |||
| cloud_brain_mirror: '云脑镜像', | |||
| public_mirror_1: '公共镜像(云脑1)', | |||
| enter_mirror_name_keyword: '请输入镜像名称关健词', | |||
| search: '搜索', | |||
| mirror_name: '镜像名称', | |||
| file_path_mirror_description: '文件路径/镜像描述', | |||
| click_Copy_file_path: '点击复制文件路径', | |||
| provider: '提供者', | |||
| creation_time: '创建时间', | |||
| custom_mirror_1: '自定义镜像(云脑1)', | |||
| public_mirror_2: '公共镜像(云脑2)', | |||
| custom_mirror_2: '自定义镜像(云脑2)' | |||
| }, | |||
| model:{ | |||
| model_name:'模型名称', | |||
| version:'版本', | |||
| version_number:'版本数', | |||
| model_size:'模型大小', | |||
| AI_engine:'AI引擎', | |||
| computing_resources:'计算资源', | |||
| creation_time:'创建时间', | |||
| creator:'创建者', | |||
| operate:'操作', | |||
| create_version:'创建新版本', | |||
| download:'下载', | |||
| delete:'删除', | |||
| create_version_model:'创建模型新版本', | |||
| canceled_operation:'您已取消操作', | |||
| successfully_deleted:'删除成功' | |||
| } | |||
| } | |||
| export default zh | |||