修复获取roomUid问题
This commit is contained in:
@@ -167,10 +167,10 @@ export default {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: '10%',
|
width: '10%',
|
||||||
formatter: function (val, row, index) {
|
formatter: function (val, row, index) {
|
||||||
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" >' +
|
return '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id="' + val + '" data-index="' + index + '">' +
|
||||||
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
|
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>' +
|
||||||
' <button class="btn btn-sm btn-danger opt-remove" data-id="' + val +
|
' <button class="btn btn-sm btn-danger opt-remove" data-id="' + val +
|
||||||
'"><i class="glyphicon glyphicon-remove"></i>删除</button>';
|
'" data-index="' + index + '"><i class="glyphicon glyphicon-remove"></i>删除</button>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -280,6 +280,9 @@ export default {
|
|||||||
// 获取信息
|
// 获取信息
|
||||||
$("#table").on("click", '.opt-edit', function () {
|
$("#table").on("click", '.opt-edit', function () {
|
||||||
var id = $(this).attr("data-id");
|
var id = $(this).attr("data-id");
|
||||||
|
const index = $(this).data('index');
|
||||||
|
const record = TableHelper.getData('#table')[index];
|
||||||
|
$('#roomUid').val(record.roomUid);
|
||||||
if (id && id != 'null') {
|
if (id && id != 'null') {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "get",
|
type: "get",
|
||||||
@@ -290,7 +293,6 @@ export default {
|
|||||||
if (ret.code == 200) {
|
if (ret.code == 200) {
|
||||||
var json = ret.data.roomTabHome;
|
var json = ret.data.roomTabHome;
|
||||||
$("#id").val(id);
|
$("#id").val(id);
|
||||||
$('#roomUid').val(json.roomUid);
|
|
||||||
$("#modal_iconContent").val(json.iconContent);
|
$("#modal_iconContent").val(json.iconContent);
|
||||||
$("#modal_seq").val(json.seq);
|
$("#modal_seq").val(json.seq);
|
||||||
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
$("#modal_isTop").val(json.isTop ? 1 : 0);
|
||||||
|
Reference in New Issue
Block a user