提交 f1948a12 编写于 作者: Skyeye云's avatar Skyeye云

组件管理新增使用明细列表

上级 539c282c
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var componentId = GetUrlParam("componentId");
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'queryAttrByComponentId',
where: getTableParams(),
even: true,
page: false,
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'applicationName', title: '所属服务', width: 200, templet: function (d) {
return isNull(d.serviceBean) ? '' : d.serviceBean.applicationName;
}},
{ field: 'appId', title: 'APPID', width: 220, templet: function (d) {
return isNull(d.serviceBean) ? '' : d.serviceBean.appId;
}},
{ field: 'groupName', title: '所属分组', width: 160, templet: function (d) {
return isNull(d.serviceBean) ? '' : d.serviceBean.groupName;
}},
{ field: 'name', title: '所属功能', width: 160, templet: function (d) {
return isNull(d.serviceBean) ? '' : d.serviceBean.name;
}},
{ field: 'attrKey', title: '属性', width: 150 },
{ field: 'name', title: '属性名称', width: 100 }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "暂不支持搜索", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {componentId: componentId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('classServerList', {});
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/classServer/'}).use('classServerList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -42,7 +42,7 @@ layui.config({
return systemCommonUtil.initIconShow(d);
}},
{ field: 'attrUseNum', title: '组件使用数量', width: 120, templet: function (d) {
return isNull(d.attrUseNum) ? '' : d.attrUseNum + '<img src="' + systemCommonUtil.getFilePath('images/util/assest/common/img/analysis.png') + '" class="photo-img" lay-event="attrUseNum">';
return isNull(d.attrUseNum) ? '0' : d.attrUseNum + '<img src="' + systemCommonUtil.getFilePath('images/util/assest/common/img/analysis.png') + '" class="photo-img" lay-event="attrUseNum">';
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
......@@ -67,6 +67,8 @@ layui.config({
edit(data);
} else if (layEvent === 'iconPic') { // 图片
systemCommonUtil.showPicImg(fileBasePath + data.iconPic);
} else if (layEvent === 'attrUseNum') { // 组件使用情况
attrUseNum(data);
}
});
......@@ -95,6 +97,17 @@ layui.config({
}});
}
// 组件使用情况
function attrUseNum(data) {
_openNewWindows({
url: "../../tpl/classServer/classServerList.html?componentId=" + data.id,
title: '组件使用明细',
pageId: "classServerList",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
......
......@@ -91,7 +91,7 @@ layui.config({
// 加载列表项
$.each(json.bean.modelField, function(i, item) {
addRow();
$("#fieldId" + (rowNum - 1)).val(item.nameCn + '(' + item.fieldKey + ')');
$("#fieldId" + (rowNum - 1)).val(item.name + '(' + item.fieldKey + ')');
$("#fieldId" + (rowNum - 1)).attr("rowKey", item.fieldKey);
$("#fieldType" + (rowNum - 1)).val(item.fieldType);
$("#defaultMoney" + (rowNum - 1)).val(item.defaultMoney);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册