| @@ -3669,6 +3669,28 @@ function initVueDataset() { | |||
| items.push($(this).data('private')) | |||
| }) | |||
| let num_stars = $('#dataset-range-value').data('num-stars') | |||
| const ruleForm = {} | |||
| if(document.getElementById('dataset-edit-value')){ | |||
| let $this = $('#dataset-edit-value') | |||
| ruleForm.title = $this.data('edit-title') || '' | |||
| ruleForm.description = $this.data('edit-description') || '' | |||
| ruleForm.category = $this.data('edit-category') || '' | |||
| ruleForm.task = $this.data('edit-task') || '' | |||
| ruleForm.license = $this.data('edit-license') || '' | |||
| ruleForm.id = $this.data('edit-id')|| '' | |||
| } | |||
| console.log(ruleForm) | |||
| // getEditInit(){ | |||
| // if($('#dataset-edit-value')){ | |||
| // $this = $('#dataset-edit-value') | |||
| // this.ruleForm.title = $this.data('edit-title') || '' | |||
| // this.ruleForm.description = $this.data('edit-description') || '' | |||
| // this.ruleForm.category = $this.data('edit-category') || '' | |||
| // this.ruleForm.task = $this.data('edit-task') || '' | |||
| // this.ruleForm.license = $this.data('edit-license') || '' | |||
| // this.ruleForm.id = $this.data('edit-id')|| '' | |||
| // } | |||
| // }, | |||
| new Vue({ | |||
| delimiters: ['${', '}'], | |||
| el, | |||
| @@ -3727,7 +3749,8 @@ function initVueDataset() { | |||
| } | |||
| this.privates = items | |||
| this.num_stars = num_stars | |||
| this.getEditInit() | |||
| this.ruleForm = ruleForm | |||
| // this.getEditInit() | |||
| }, | |||
| methods:{ | |||
| @@ -3798,20 +3821,17 @@ function initVueDataset() { | |||
| }) | |||
| .modal('show'); | |||
| }, | |||
| getEditInit(){ | |||
| console.log(this.ruleForm) | |||
| if($('#dataset-edit-value')){ | |||
| console.log("==========") | |||
| let $this = $('#dataset-edit-value') | |||
| this.ruleForm.title = $this.data('edit-title') || '' | |||
| this.ruleForm.description = $this.data('edit-description') || '' | |||
| this.ruleForm.category = $this.data('edit-category') || '' | |||
| this.ruleForm.task = $this.data('edit-task') || '' | |||
| this.ruleForm.license = $this.data('edit-license') || '' | |||
| this.ruleForm.id = $this.data('edit-id') || '' | |||
| } | |||
| console.log(this.ruleForm) | |||
| }, | |||
| // getEditInit(){ | |||
| // if($('#dataset-edit-value')){ | |||
| // $this = $('#dataset-edit-value') | |||
| // this.ruleForm.title = $this.data('edit-title') || '' | |||
| // this.ruleForm.description = $this.data('edit-description') || '' | |||
| // this.ruleForm.category = $this.data('edit-category') || '' | |||
| // this.ruleForm.task = $this.data('edit-task') || '' | |||
| // this.ruleForm.license = $this.data('edit-license') || '' | |||
| // this.ruleForm.id = $this.data('edit-id')|| '' | |||
| // } | |||
| // }, | |||
| editDataset(formName,id){ | |||
| let _this = this | |||
| console.log(this.url) | |||