Browse Source

增加公开私有两个属性

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.12.1^2
zouap 3 years ago
parent
commit
5c67b586d1
3 changed files with 10 additions and 17 deletions
  1. +2
    -1
      templates/repo/modelmanage/index.tmpl
  2. +7
    -15
      web_src/js/components/Model.vue
  3. +1
    -1
      web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue

+ 2
- 1
templates/repo/modelmanage/index.tmpl View File

@@ -44,7 +44,7 @@
}
</style>
<link rel="stylesheet" href="/self/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script>var REPO_IS_PRIVATE = {{.Repository.IsPrivate}};</script>

<!-- 弹窗 -->
<div id="mask">
@@ -57,6 +57,7 @@
</div>
</div>
{{$repository := .Repository.ID}}

<!-- 提示框 -->
<div class="alert"></div>



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

@@ -137,26 +137,17 @@
>
<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
)
"
>{{ i18n.model_create_new_ver }}</a
>-->
<a class="op-btn"
v-show="scope.row.modelType == 1"
:href="url + 'create_local_model_1?type=1&name=' + encodeURIComponent(scope.row.name) + '&id=' + scope.row.id"
: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="scope.repoIsPrivate == false && scope.row.isPrivate==true" style="color:transparent;cursor:default;" >设为公开</a>
<a class="op-btn" v-show="scope.repoIsPrivate == false && scope.row.isPrivate==false" style="color:transparent;cursor:default;" >设为私有</a>
<a class="op-btn"
:href="loadhref + scope.row.id"
:class="{ disabled: !scope.row.isCanOper }"
@@ -191,7 +182,7 @@

<script>
const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config;
const REPOISPRIVATE = window.REPO_IS_PRIVATE;
export default {
components: {},
data() {
@@ -211,6 +202,7 @@ export default {
data: "",
timer: null,
timerFlag: false,
repoIsPrivate: REPOISPRIVATE,
};
},
methods: {


+ 1
- 1
web_src/vuepages/pages/modelmanage/local/modelmanage-local-create-1.vue View File

@@ -157,7 +157,7 @@ export default {
nameErr: false,
isShowVersion: false,
engineList: MODEL_ENGINES,
repoIsPrivate: REPOISPRIVATE
repoIsPrivate: REPOISPRIVATE,
};
},
components: {},


Loading…
Cancel
Save