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

新增团队模板组件

上级 5d1d2b45
...@@ -81,6 +81,14 @@ layui.config({ ...@@ -81,6 +81,14 @@ layui.config({
<div class="layui-input-block"> <div class="layui-input-block">
<select lay-filter="dataShowType" lay-search="" id="dataShowType" name="dataShowType" win-verify="required"> <select lay-filter="dataShowType" lay-search="" id="dataShowType" name="dataShowType" win-verify="required">
</select>
</div>
</div>`,
'teamObjectTypeBox': `<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">团队适用对象<i class="red">*</i></label>
<div class="layui-input-block">
<select lay-filter="teamObjectType" lay-search="" id="teamObjectType" name="teamObjectType" win-verify="required">
</select> </select>
</div> </div>
</div>`, </div>`,
...@@ -142,6 +150,9 @@ layui.config({ ...@@ -142,6 +150,9 @@ layui.config({
// 数据展示类型 // 数据展示类型
dataShowType.showData({rows: dataShowType.showDataType}, 'select', "dataShowType", data.dataShowType, form, null, null, null); dataShowType.showData({rows: dataShowType.showDataType}, 'select', "dataShowType", data.dataShowType, form, null, null, null);
// 团队适用对象
skyeyeClassEnumUtil.showEnumDataListByClassName("teamObjectType", 'select', "teamObjectType", data.teamObjectType, form);
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
...@@ -170,6 +181,7 @@ layui.config({ ...@@ -170,6 +181,7 @@ layui.config({
newParams.defaultValue = $("#defaultValue").val(); newParams.defaultValue = $("#defaultValue").val();
newParams.width = $("#width").val(); newParams.width = $("#width").val();
newParams.attrKey = $("#attrKey").val(); newParams.attrKey = $("#attrKey").val();
newParams.teamObjectType = $("#teamObjectType").val();
if (!isNull($("#attrKey").val())) { if (!isNull($("#attrKey").val())) {
newParams.attrDefinition = getInPoingArr(parent.attrList, 'attrKey', $("#attrKey").val()); newParams.attrDefinition = getInPoingArr(parent.attrList, 'attrKey', $("#attrKey").val());
......
...@@ -129,13 +129,15 @@ var teamObjectPermissionUtil = { ...@@ -129,13 +129,15 @@ var teamObjectPermissionUtil = {
* @param defaultValue * @param defaultValue
*/ */
buildTeamTemplate: function (id, objectType, defaultValue) { buildTeamTemplate: function (id, objectType, defaultValue) {
AjaxPostUtil.request({url: reqBasePath + "queryEnableTeamTemplateList", params: {objectType: objectType}, type: 'json', method: "GET", callback: function(json) { if (!isNull(objectType)) {
var selOption = getFileContent('tpl/template/select-option.tpl'); AjaxPostUtil.request({url: reqBasePath + "queryEnableTeamTemplateList", params: {objectType: objectType}, type: 'json', method: "GET", callback: function(json) {
$(`#${id}`).html(getDataUseHandlebars(selOption, json)); var selOption = getFileContent('tpl/template/select-option.tpl');
if (!isNull(defaultValue)) { $(`#${id}`).html(getDataUseHandlebars(selOption, json));
$(`#${id}`).val(defaultValue); if (!isNull(defaultValue)) {
} $(`#${id}`).val(defaultValue);
}, async: false}); }
}, async: false});
}
}, },
checkTeamBusinessAuthPermission: function (objectId, enumKey) { checkTeamBusinessAuthPermission: function (objectId, enumKey) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册