Browse Source

fix issue

tags/v1.21.12.1^2
zhoupzh 3 years ago
parent
commit
a956ab97de
1 changed files with 30 additions and 10 deletions
  1. +30
    -10
      web_src/js/components/Model.vue

+ 30
- 10
web_src/js/components/Model.vue View File

@@ -105,7 +105,7 @@
<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)">创建新版本</a>
<a :href="loadhref+scope.row.ID" :class="{'disabled':!scope.row.IsCanOper}">下载</a>
<a :class="{'disabled':!scope.row.IsCanOper}" @click="deleteModel(scope.row.ID)">删除</a>
<a :class="{'disabled':!scope.row.IsCanOper}" @click="deleteModel(scope.row.Name)">删除</a>
</div>
</template>
@@ -171,7 +171,6 @@ export default {
tableData[i].Name=''
tableData[i].VersionCount = ''
tableData[i].Children = true

}
console.log("=====-----tabledata---",tableData)
resolve(tableData)
@@ -213,14 +212,35 @@ export default {
.modal('show')
},
deleteModel(id){
this.$axios.delete(this.url+'delete_model',{
params:{
ID:id
}}).then((res)=>{
console.log(res)
this.getModelList()
})
deleteModel(name){
let tree={Name:name}
let _this = this
console.log("_tree",tree)
let flag=1
$('.ui.basic.modal.first')
.modal({
onDeny: function() {
flag = false
},
onApprove: function() {
_this.$axios.delete(_this.url+'delete_model',{
params:{
ID:id
}}).then((res)=>{
console.log(res,tree)
_this.getModelList()
_this.load(tree)
})
flag = true
},
onHidden: function() {
if (flag == false) {
$('.alert').html('您已取消操作').removeClass('alert-success').addClass('alert-danger').show().delay(1500).fadeOut();
}
}
})
.modal('show')
},
getModelList(){
this.fullscreenLoading = false


Loading…
Cancel
Save