修復版本管理
This commit is contained in:
@@ -174,7 +174,34 @@ var publishTimePicker = $('#publishTime').datetimepicker({
|
|||||||
export default {
|
export default {
|
||||||
name: "VersionAdminView",
|
name: "VersionAdminView",
|
||||||
setup() {
|
setup() {
|
||||||
return {};
|
|
||||||
|
function setSelectOption(id, obj) {
|
||||||
|
var os = $(obj).val();
|
||||||
|
var channel = $("#old_" + id).val();
|
||||||
|
$.ajax({
|
||||||
|
type: "get",
|
||||||
|
url: '/admin/version/getPlatform.action',
|
||||||
|
data: {
|
||||||
|
os: os
|
||||||
|
},
|
||||||
|
dataType: 'json',
|
||||||
|
success: function (json) {
|
||||||
|
if (json.data) {
|
||||||
|
makeOption(id, json.data, channel);
|
||||||
|
if (channel != '' && channel != 'undefined') {
|
||||||
|
$('.selectpicker').selectpicker('val', channel);
|
||||||
|
} else {
|
||||||
|
$('.selectpicker').selectpicker('val', '');
|
||||||
|
}
|
||||||
|
$('.selectpicker').selectpicker('refresh');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
window.setSelectOption = setSelectOption;
|
||||||
|
return {
|
||||||
|
setSelectOption
|
||||||
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@@ -196,7 +223,7 @@ export default {
|
|||||||
initTable();
|
initTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
setSelectOption("platform_query", $("#os_query"));
|
window.setSelectOption("platform_query", $("#os_query"));
|
||||||
|
|
||||||
$("#table").on("click", '.opt-remove', function () {
|
$("#table").on("click", '.opt-remove', function () {
|
||||||
var id = $(this).attr("data-id");
|
var id = $(this).attr("data-id");
|
||||||
@@ -238,7 +265,7 @@ export default {
|
|||||||
$("#version").removeAttr("disabled", "disabled");
|
$("#version").removeAttr("disabled", "disabled");
|
||||||
$("#platform").removeAttr("disabled", "disabled");
|
$("#platform").removeAttr("disabled", "disabled");
|
||||||
$('#save').attr("disabled", false);
|
$('#save').attr("disabled", false);
|
||||||
setSelectOption("platform", $("#os"));
|
window.setSelectOption("platform", $("#os"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#multiDel").click(function () {
|
$("#multiDel").click(function () {
|
||||||
@@ -405,7 +432,7 @@ export default {
|
|||||||
$("#description").val(json.entity.description);
|
$("#description").val(json.entity.description);
|
||||||
$("#status").val(json.entity.status);
|
$("#status").val(json.entity.status);
|
||||||
ComboboxHelper.setDef("#status", json.entity.status);
|
ComboboxHelper.setDef("#status", json.entity.status);
|
||||||
setSelectOption("platform", $("#os"));
|
window.setSelectOption("platform", $("#os"));
|
||||||
$("#publishTime").val(publishDate);
|
$("#publishTime").val(publishDate);
|
||||||
$("#downloadLink").val(json.entity.downloadLink);
|
$("#downloadLink").val(json.entity.downloadLink);
|
||||||
$("#fileMd5").val(json.entity.fileMd5);
|
$("#fileMd5").val(json.entity.fileMd5);
|
||||||
@@ -475,30 +502,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function setSelectOption(id, obj) {
|
|
||||||
var os = $(obj).val();
|
|
||||||
var channel = $("#old_" + id).val();
|
|
||||||
$.ajax({
|
|
||||||
type: "get",
|
|
||||||
url: '/admin/version/getPlatform.action',
|
|
||||||
data: {
|
|
||||||
os: os
|
|
||||||
},
|
|
||||||
dataType: 'json',
|
|
||||||
success: function (json) {
|
|
||||||
if (json.data) {
|
|
||||||
makeOption(id, json.data, channel);
|
|
||||||
if (channel != '' && channel != 'undefined') {
|
|
||||||
$('.selectpicker').selectpicker('val', channel);
|
|
||||||
} else {
|
|
||||||
$('.selectpicker').selectpicker('val', '');
|
|
||||||
}
|
|
||||||
$('.selectpicker').selectpicker('refresh');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeOption(id, data, channel) {
|
function makeOption(id, data, channel) {
|
||||||
console.log("id=" + id + ",channel=" + channel);
|
console.log("id=" + id + ",channel=" + channel);
|
||||||
var str = "";
|
var str = "";
|
||||||
|
Reference in New Issue
Block a user