学院信息维护-查询学院信息03

<!--修改学院 模态框(Modal) -->
<divclass="modal fade"id="UpdateModal">
<divclass="modal-dialog">
<divclass="modal-content">
<divclass="modal-header">
<h4class="modal-titlefont-weight-bolder">修改学院</h4>
<buttontype="button"class="close"data-dismiss="modal">&times;</button>
</div>
<divclass="modal-body">
<formid="frAcademeUpdate">
<!--隐藏域-->
<inputtype="text"hiddenid="academeIDU"name="academeId"/>
<divclass="form-grouprow">
<labelfor="academeNameU"class="col-3col-form-label text-right">学院名称</label>
<divclass="col-9">
<inputtype="text"class="form-control"id="academeNameU"name="academeName">
</div>
</div>
<divclass="form-grouprow">
<labelfor="academeCodeU"class="col-3col-form-label text-right">学院编号</label>
<divclass="col-9">
<inputtype="text"class="form-control"id="academeCodeU"name="academeCode"placeholder="请输入2位数的编号!">
</div>
</div>
</form>
</div>
<divclass="modal-footer">
<buttontype="button"class="btnbtn-secondary"data-dismiss="modal">取消</button>
<buttontype="button"class="btnbtn-primary">保存</button>
</div>
</div><!--/.modal-content -->
</div><!--/.modal-dialog -->
</div>
<!--jQuery库必须在bootstrap之前引入-->
<scriptsrc="~/Content/js/jquery-3.2.1.min.js"></script>
<!--bootstrap框架-->
<scriptsrc="~/Content/bootstrap-4.5.3-dist/js/bootstrap.min.js"></script>
<!--layui框架-->
<scriptsrc="~/Content/layui/layui.js"></script>
<script>
//接收弹出层的模块,接收layui里的table模块
var layer, layuiTable;
var tableAcademe;
$(function () {
//加载&初始化layui模块
layui.use(["layer", "table"], function () {
layer = layui.layer;
layuiTable = layui.table;
//渲染数据表
layuiTable.render({
elem: "#tabAcademe",//数据容器 根据id来获取
//url:"/MySchoolInfoManage/Academe/selectAcademe",//数据接口
cols: [[//表头 二维数组
{ type: "radio", fixed: "left" },
{ type: "numbers", title: "序号" },
{ field: "academeName", title: "学院名称" },
{ field: "academeCode", title: "学院代号" },
{ title: "操作", templet:setOperate, fixed: "right",width: 200 }
]],
page: true,
data: []
});
seachAcademe();
});
});
//自定义列
function setOperate(rowData){
var AcaDemeId =rowData.academeID;
return'<buttontype="button" class="layui-btn layui-btn-sm">修改</button>' +
'<buttontype="button" class="layui-btn layui-btn-smlayui-btn-danger">删除</button>';
}
//条件查询
function seachAcademe() {
//获取查询条件
var searchTxt = $("#searchText").val();
//重载表格
//方法一:
layuiTable.reload("tabAcademe", {
url: "/MySchoolInfoManage/Academe/selectAcademe",//数据接口
where: {
searchTxt: searchTxt
},
page: {
curr: 1 //重新从第1页开始显示
}
});
}
</script>
</body>
</html>

上一篇:gua214.html:16 Uncaught TypeError: watchEffect(...).mount is not a function


下一篇:图片压缩