修复置顶问题
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="id" id="id" />
|
||||
<input type="hidden" name="roomUid" id="roomUid" />
|
||||
<div class="form-group">
|
||||
<label for="modal_isTop" class="col-sm-3 control-label">是否置顶<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
@@ -158,10 +159,10 @@ export default {
|
||||
align: 'center',
|
||||
width: '10%',
|
||||
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>' +
|
||||
' <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>';
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -226,6 +227,7 @@ export default {
|
||||
// 编辑或者新增
|
||||
$("#btnConfirm").click(function () {
|
||||
var id = $("#id").val();
|
||||
var roomUid = $('#roomUid').val();
|
||||
var seq = $("#modal_seq").val();
|
||||
var isTop = $("#modal_isTop").val();
|
||||
var iconContent = $("#modal_iconContent").val();
|
||||
@@ -238,6 +240,7 @@ export default {
|
||||
url: "/admin/roomTabHome/save.action",
|
||||
data: {
|
||||
id: id,
|
||||
roomUid: roomUid,
|
||||
seq: seq,
|
||||
isTop: isTop,
|
||||
iconContent: iconContent,
|
||||
@@ -266,6 +269,9 @@ export default {
|
||||
// 获取信息
|
||||
$("#table").on("click", '.opt-edit', function () {
|
||||
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') {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
|
Reference in New Issue
Block a user