提交 d30a93ef 编写于 作者: doc_wei's avatar doc_wei

团队模板列表完成

上级 f916590f
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'textool'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool;
textool.init({eleId: 'remark', maxlength: 200});
skyeyeClassEnumUtil.showEnumDataListByClassName("teamObjectType", 'select', "objectType", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form);
loadAuthList();
form.on('select(objectType)', function(data) {
loadAuthList();
});
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
dictName: $("#dictName").val(),
dictCode: $("#dictCode").val(),
enabled: $("#enabled input:radio:checked").val(),
remark: $("#remark").val(),
};
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
function loadAuthList() {
var objectType = $('#objectType').val();
if (isNull(objectType)) {
$('#authList').html('');
} else {
jsGetJsonFile("../../json/teamObjectLink.json", function(data) {
var authStrList = data[objectType];
var str = ``;
$.each(authStrList, function(i, item) {
var bean = {
key: item,
name: skyeyeClassEnum[item].name
};
var authBtnJson = skyeyeClassEnumUtil.getEnumDataListByClassName(item);
authBtnJson["bean"] = bean;
str += getDataUseHandlebars($('#authTableTemplate').html(), {json: authBtnJson});
});
$('#authList').html(str);
});
}
form.render();
}
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'textool'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
textool = layui.textool;
showGrid({
id: "showForm",
url: reqBasePath + "queryDictTypeMationById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#showTemplate").html(),
ajaxSendLoadBefore: function(hdb, json){
json.bean.remark = stringManipulation.textAreaShow(json.bean.remark);
},
ajaxSendAfter: function (json) {
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", json.bean.enabled, form);
form.on('radio(dictType)', function (data) {
var val = data.value;
if (val == 1) {
$("#chooseLevel").parent().parent().remove();
} else if (val == 2) {
$("#dictTypeBox").after(
`<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">可选层级<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="chooseLevel" name="chooseLevel" win-verify="required|number" placeholder="请输入可选层级" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">例如:多级字典为三级,这里设置为2,那么只有二级和二级的所有子层级可以选择</div>
</div>
</div>`);
}
});
if (json.bean.dictType == 2) {
$("#dictTypeBox").after(
`<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">可选层级<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="chooseLevel" name="chooseLevel" win-verify="required|number" placeholder="请输入可选层级" class="layui-input" value="${json.bean.chooseLevel}"/>
<div class="layui-form-mid layui-word-aux">例如:多级字典为三级,这里设置为2,那么只有二级和二级的所有子层级可以选择</div>
</div>
</div>`);
}
$("input:radio[name=dictType][value=" + json.bean.dictType + "]").attr("checked", true);
textool.init({eleId: 'remark', maxlength: 200});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var dictType = $("input[name='dictType']:checked").val();
var params = {
id: parent.rowId,
dictName: $("#dictName").val(),
dictCode: $("#dictCode").val(),
enabled: $("#enabled input:radio:checked").val(),
dictType: dictType,
chooseLevel: dictType == 1 ? 1 : $('#chooseLevel').val(),
remark: $("#remark").val(),
};
AjaxPostUtil.request({url: reqBasePath + "writeDictTypeMation", params: params, type: 'json', method: "POST", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
authBtn('1656731571539');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: reqBasePath + 'queryTeamTemplate',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '名称', width: 200 },
{ field: 'objectType', title: '适用类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("teamObjectType", 'id', d.objectType, 'name');
}},
{ field: 'enabled', title: '状态', align: 'center', width: 100, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("commonEnable", 'id', d.enabled, 'name');
}},
{ field: 'isUsed', title: '使用状态', align: 'center', width: 100, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("isUsed", 'id', d.isUsed, 'name');
}},
{ field: 'remark', title: '备注', width: 300 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 180, toolbar: '#tableBar' }
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称,编码", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'del') { // 删除
del(data, obj);
} else if (layEvent === 'edit') { // 编辑
edit(data);
}
});
// 删除
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "deleteTeamTemplateById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/teamTemplate/teamTemplateEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "teamTemplateEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/teamTemplate/teamTemplateAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "teamTemplateAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('teamTemplateList', {});
});
<!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 style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">团队名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入团队名称" class="layui-input"/>
<div class="layui-form-mid layui-word-aux">团队名称不能重复。</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">适用对象<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="objectType" lay-search="" id="objectType" win-verify="required">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">状态<i class="red">*</i></label>
<div class="layui-input-block winui-radio" id="enabled">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入备注" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">成员信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">权限信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12" id="authList">
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<script type="text/x-handlebars-template" id="authTableTemplate">
{{#json}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">{{bean.name}}<i class="red">*</i></label>
<div class="layui-input-block">
<table class="layui-table">
<thead>
<tr>
<th>成员</th>
{{#each rows}}
<th>{{name}}</th>
{{/each}}
</tr>
</thead>
<tbody id="{{bean.key}}" class="insurance-table">
{{#each roleList}}
<tr>
<td>{{name}}</td>
{{#each ../rows}}
<th>{{name}}</th>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
{{/json}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/teamTemplate/'}).use('teamTemplateAdd');
</script>
</body>
</html>
\ No newline at end of file
<!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 style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm" autocomplete="off">
</form>
</div>
<script type="text/x-handlebars-template" id="showTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="dictName" name="dictName" win-verify="required" placeholder="请输入名称" class="layui-input" value="{{dictName}}"/>
<div class="layui-form-mid layui-word-aux">名称不能重复</div>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">编码<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="dictCode" name="dictCode" win-verify="required" placeholder="请输入编码" class="layui-input" value="{{dictCode}}"/>
<div class="layui-form-mid layui-word-aux">编码不能重复</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">状态<i class="red">*</i></label>
<div class="layui-input-block winui-radio" id="enabled">
</div>
</div>
<div class="layui-form-item layui-col-xs6" id="dictTypeBox">
<label class="layui-form-label">字典类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="dictType" value="1" title="一级字典" lay-filter="dictType" />
<input type="radio" name="dictType" value="2" title="多级字典" lay-filter="dictType" />
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入备注" class="layui-textarea" style="height: 100px;" maxlength="200">{{remark}}</textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/sysDictType/'}).use('sysDictTypeEdit');
</script>
</body>
</html>
\ No newline at end of file
<!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>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1656731571539"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1656731571539')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1656731583257')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</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/teamTemplate/'}).use('teamTemplateList');
</script>
</body>
</html>
\ No newline at end of file
{
"commonEnable": {
"name": "启用/禁用",
"className": "skyeye-pro#com.skyeye.common.enumeration.EnableEnum"
},
"commonIsDefault": {
"name": "是否默认",
"className": "skyeye-pro#com.skyeye.common.enumeration.IsDefaultEnum"
},
"verificationParams": {
"name": "字段校验枚举",
"className": "skyeye-pro#com.skyeye.common.enumeration.VerificationParamsEnum"
},
"commonEnable": {"name": "启用/禁用", "className": "skyeye-pro#com.skyeye.common.enumeration.EnableEnum"},
"commonIsDefault": {"name": "是否默认", "className": "skyeye-pro#com.skyeye.common.enumeration.IsDefaultEnum"},
"verificationParams": {"name": "字段校验枚举", "className": "skyeye-pro#com.skyeye.common.enumeration.VerificationParamsEnum"},
"isUsed": {"name": "是否使用的枚举", "className": "skyeye-pro#com.skyeye.common.enumeration.IsUsedEnum"},
"bossInterviewArrangementState": {
"name": "面试安排状态枚举类",
"className": "skyeye-flowable#com.skyeye.service.enumclass.BossInterviewArrangementState"
},
"bossInterviewArrangementState": {"name": "面试安排状态枚举类", "className": "skyeye-flowable#com.skyeye.service.enumclass.BossInterviewArrangementState"},
"bossInterviewArrangementState1": {
"name": "面试安排状态枚举类-获取我录入的人员需求关联的面试者信息列表",
"className": "skyeye-flowable#com.skyeye.service.enumclass.BossInterviewArrangementState",
......@@ -30,23 +18,12 @@
"filterValue": "3,4,5"
},
"materialFromType": {
"name": "商品来源类型枚举类",
"className": "skyeye-flowable#com.skyeye.material.enumclass.MaterialFromType"
},
"materialType": {
"name": "商品类型枚举类",
"className": "skyeye-flowable#com.skyeye.material.enumclass.MaterialType"
},
"materialFromType": {"name": "商品来源类型枚举类", "className": "skyeye-flowable#com.skyeye.material.enumclass.MaterialFromType"},
"materialType": {"name": "商品类型枚举类", "className": "skyeye-flowable#com.skyeye.material.enumclass.MaterialType"},
"skyeyeView": {
"name": "视图枚举",
"className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"
},
"skyeyeView": {"name": "视图枚举", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"teamObjectType": {
"name": "团队适用对象枚举",
"className": "skyeye-pro#com.skyeye.team.classenum.TeamObjectTypeEnum"
}
"teamObjectType": {"name": "团队适用对象枚举", "className": "skyeye-pro#com.skyeye.team.classenum.TeamObjectTypeEnum"},
"contactsAuthEnum": {"name": "联系人", "className": "skyeye-pro#com.skyeye.contacts.classenum.ContactsAuthEnum"}
}
\ No newline at end of file
{
"1": ["contactsAuthEnum"],
"2": ["contactsAuthEnum"],
"3": []
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册