修复下拉框选项问题
This commit is contained in:
@@ -307,6 +307,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initDeviateRangeSelect: function () {
|
initDeviateRangeSelect: function () {
|
||||||
|
let options = $('#deviateRange').children();
|
||||||
|
if (options.length <= 0) {
|
||||||
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=1', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
@@ -317,9 +319,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initDiamondDeviateRangeSelect: function () {
|
initDiamondDeviateRangeSelect: function () {
|
||||||
|
let options = $('#diamondDeviateRange').children();
|
||||||
|
if (options.length <= 0) {
|
||||||
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
$.get('/admin/deviateRange/list?type=4', {}, function (res) {
|
||||||
if (res.total > 0) {
|
if (res.total > 0) {
|
||||||
var rows = res.rows;
|
var rows = res.rows;
|
||||||
@@ -330,9 +335,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
initReplacePrizeSelect: function () {
|
initReplacePrizeSelect: function () {
|
||||||
|
let options = $('#replaceAwardChoose').children();
|
||||||
|
if (options.length <= 0) {
|
||||||
$.get('/admin/prize/list/type?prizeType=2', {}, function (res) {
|
$.get('/admin/prize/list/type?prizeType=2', {}, function (res) {
|
||||||
$('#replaceAwardChoose').find('option').remove();
|
$('#replaceAwardChoose').find('option').remove();
|
||||||
for (var i in res.data) {
|
for (var i in res.data) {
|
||||||
@@ -341,6 +349,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
main.init();
|
main.init();
|
||||||
|
Reference in New Issue
Block a user