添加项目文件。
This commit is contained in:
185
HT.Cloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml
Normal file
185
HT.Cloud.Web/Areas/SystemOrganize/Views/SystemSet/Index.cshtml
Normal file
@ -0,0 +1,185 @@
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
Layout = "~/Views/Shared/_Index.cshtml";
|
||||
}
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset layui-hide" id="searchField">
|
||||
<div>
|
||||
<form class="layui-form layui-form-pane">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">关键字:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="txt_keyword" name="txt_keyword" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button type="submit" class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container" id="toolbar">
|
||||
<button id="NF-add" authorize="yes" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon"></i>新增</button>
|
||||
<button id="NF-edit" authorize="yes" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="edit"><i class="layui-icon"></i>修改</button>
|
||||
<button id="NF-details" authorize="yes" class="layui-btn layui-btn-sm layui-btn-normal" lay-event="details"> <i class="layui-icon"></i>查看</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="currentTableBar">
|
||||
<a id="NF-edit" authorize class="layui-btn layui-btn-xs layui-btn-warm" lay-event="edit">修改</a>
|
||||
<a id="NF-details" authorize class="layui-btn layui-btn-xs layui-btn-normal" lay-event="details">查看</a>
|
||||
</script>
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use(['jquery', 'form', 'table', 'common','commonTable', 'layer', 'optimizeSelectOption'], function () {
|
||||
var form = layui.form,
|
||||
commonTable = layui.commonTable,
|
||||
table = layui.table,
|
||||
common = layui.common;
|
||||
wcLoading.close();
|
||||
//权限控制(js是值传递)
|
||||
currentTableBar.innerHTML = common.authorizeButtonNew(currentTableBar.innerHTML);
|
||||
toolbarDemo.innerHTML = common.authorizeButtonNew(toolbarDemo.innerHTML);
|
||||
commonTable.rendertable({
|
||||
elem: '#currentTableId',
|
||||
id: 'currentTableId',
|
||||
url: '/SystemOrganize/SystemSet/GetGridJson',
|
||||
cols: [[
|
||||
{ type: "radio", width: 50, fixed: 'left' },
|
||||
{ field: 'F_ProjectName', title: '项目名称', width: 120, sort: true },
|
||||
{ field: 'F_CompanyName', title: '公司名称', width: 120, sort: true },
|
||||
{ field: 'F_PrincipalMan', title: '联系人', width: 120, sort: true },
|
||||
{ field: 'F_MobilePhone', title: '联系方式', width: 120, sort: true },
|
||||
{ field: 'F_Logo', title: 'Logo图标', width: 120, sort: true },
|
||||
{ field: 'F_LogoCode', title: 'Logo编号', width: 120, sort: true },
|
||||
{ field: 'F_AdminAccount', title: '系统账户', width: 120, sort: true },
|
||||
{ field: 'F_DbString', title: '连接字符串', width: 120, sort: true },
|
||||
{ field: 'F_DBProvider', title: '数据库类型', width: 120, sort: true },
|
||||
{ field: 'F_DbNumber', title: '数据库序号', width: 120, sort: true },
|
||||
{ field: 'F_HostUrl', title: '域名', width: 120, sort: true },
|
||||
{
|
||||
field: 'F_CreatorTime', title: '创建时间', minWidth: 120, sort: true,
|
||||
templet: function (d) {
|
||||
if (d.F_CreatorTime) {
|
||||
var time = new Date(d.F_CreatorTime);
|
||||
return time.Format("yyyy-MM-dd");
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'F_EndTime', title: '到期时间', width: 120, sort: true, templet: function (d) {
|
||||
if (d.F_EndTime) {
|
||||
var time = new Date(d.F_EndTime);
|
||||
return time.Format("yyyy-MM-dd");
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'F_EnabledMark', title: '状态', width: 80, sort: true,
|
||||
templet: function (d) {
|
||||
if (d.F_EnabledMark == true) {
|
||||
return "<span class='layui-btn layui-btn-normal layui-btn-xs'>有效</span>";
|
||||
} else {
|
||||
return "<span class='layui-btn layui-btn-warm layui-btn-xs'>无效</span>";
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'F_Description', title: '备注', minWidth: 120, sort: true },
|
||||
{ title: '操作', width: 120, toolbar: '#currentTableBar', align: "center", fixed: 'right' }
|
||||
]]
|
||||
});
|
||||
// 监听搜索操作
|
||||
form.on('submit(data-search-btn)', function (data) {
|
||||
//执行搜索重载
|
||||
commonTable.reloadtable({
|
||||
elem: 'currentTableId',
|
||||
curr: 1,
|
||||
where: { keyword: data.field.txt_keyword }
|
||||
});
|
||||
return false;
|
||||
});
|
||||
//行点击事件监听,控制按钮显示
|
||||
var oneList = ["NF-edit", "NF-details", "NF-delete"];//选择1条显示
|
||||
commonTable.tableRowClick("radio", "currentTableFilter", "currentTableId", oneList);
|
||||
//toolbar监听事件
|
||||
table.on('toolbar(currentTableFilter)', function (obj) {
|
||||
var data = table.checkStatus('currentTableId').data;
|
||||
var id = data.length > 0 ? data[0].F_Id : null;
|
||||
if (obj.event === 'add') { // 监听添加操作
|
||||
common.modalOpen({
|
||||
title: "添加界面",
|
||||
url: "/SystemOrganize/SystemSet/Form",
|
||||
width: "780px",
|
||||
height: "650px",
|
||||
btn: []
|
||||
});
|
||||
}
|
||||
else if (obj.event === 'edit') {
|
||||
if (id == null) {
|
||||
common.modalMsg("未选中数据", "warning");
|
||||
return false;
|
||||
}
|
||||
common.modalOpen({
|
||||
title: "编辑界面",
|
||||
url: "/SystemOrganize/SystemSet/Form?keyValue=" + id,
|
||||
width: "780px",
|
||||
height: "650px",
|
||||
btn: []
|
||||
});
|
||||
}
|
||||
else if (obj.event === 'details') {
|
||||
if (id == null) {
|
||||
common.modalMsg("未选中数据", "warning");
|
||||
return false;
|
||||
}
|
||||
common.modalOpen({
|
||||
title: "查看界面",
|
||||
url: "/SystemOrganize/SystemSet/Details?keyValue=" + id,
|
||||
width: "780px",
|
||||
height: "650px",
|
||||
btn: []
|
||||
});
|
||||
}
|
||||
else if (obj.event === 'TABLE_SEARCH') {
|
||||
var _that = $("#searchField");
|
||||
if (_that.hasClass("layui-hide")) {
|
||||
_that.removeClass('layui-hide');
|
||||
} else {
|
||||
_that.addClass('layui-hide');
|
||||
}
|
||||
table.resize();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
//toolrow监听事件
|
||||
table.on('tool(currentTableFilter)', function (obj) {
|
||||
var id = obj.data.F_Id;
|
||||
if (obj.event === 'edit') {
|
||||
common.modalOpen({
|
||||
title: "编辑界面",
|
||||
url: "/SystemOrganize/SystemSet/Form?keyValue=" + id,
|
||||
width: "780px",
|
||||
height: "650px",
|
||||
btn: []
|
||||
});
|
||||
}
|
||||
else if (obj.event === 'details') {
|
||||
common.modalOpen({
|
||||
title: "查看界面",
|
||||
url: "/SystemOrganize/SystemSet/Details?keyValue=" + id,
|
||||
width: "780px",
|
||||
height: "650px",
|
||||
btn: []
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user