From 9b1ae86bf97b44f1d72c7d219ad7f916010846f8 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 5 Mar 2023 23:30:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=97=A5=E6=9C=9F=E7=BB=84=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/template/js/attr/writeAttr.js | 12 ++-- .../template/js/contacts/contactsList.js | 4 +- .../js/dsFormComponent/dsFormComponentAdd.js | 6 +- .../js/dsFormComponent/dsFormComponentEdit.js | 9 ++- .../js/dsFormPage/dsFormPageDesign.js | 7 ++- .../template/js/dsFormPage/editPageContent.js | 47 ++++++++++++++ .../dsFormComponent/dsFormComponentAdd.html | 7 +++ .../dsFormComponent/dsFormComponentEdit.html | 7 +++ .../tpl/dsFormPage/dsFormPageDesign.html | 2 +- .../js/crmContract/crmContractList.js | 6 +- .../js/crmContract/mycrmcontractadd.js | 5 +- .../template/assets/lib/layui/custom.js | 3 + .../layui/customer/common/systemCommonUtil.js | 6 +- .../lib/layui/customer/skyeye/dsFormUtil.js | 61 ++++++++++++++++++- .../template/json/skyeyeClassEnum.json | 1 + 15 files changed, 159 insertions(+), 24 deletions(-) diff --git a/base-server/src/main/resources/template/js/attr/writeAttr.js b/base-server/src/main/resources/template/js/attr/writeAttr.js index 381c1491f..125f324d0 100644 --- a/base-server/src/main/resources/template/js/attr/writeAttr.js +++ b/base-server/src/main/resources/template/js/attr/writeAttr.js @@ -58,10 +58,10 @@ layui.config({ } }); var value; - if (dataType == 4) { + if (json.bean.dataType == 4) { value = json.bean.businessApi; } else { - value = dataType == 1 ? json.bean.defaultData : json.bean.objectId; + value = json.bean.dataType == 1 ? json.bean.defaultData : json.bean.objectId; } loadLinkData(json.bean.componentId, json.bean.dataType, value); }, @@ -180,17 +180,17 @@ layui.config({ initDictData(); $("#objectId").val(value); } else if (dataType == 4) { - // 自定义 + // 自定义接口 $("#dataTypeObjectBox").html(commonHtml['businessApi']); $("#serviceStr").html(getDataUseHandlebars(selOption, {rows: serviceMap})); loadParamsTable('apiParams'); if (!isNull(value)) { $("#serviceStr").val(value.serviceStr); $("#api").val(value.api); - skyeyeClassEnumUtil.showEnumDataListByClassName("httpMethodEnum", 'select', "method", businessApi.method, form); + skyeyeClassEnumUtil.showEnumDataListByClassName("httpMethodEnum", 'select', "method", value.method, form); initTableChooseUtil.deleteAllRow('apiParams'); - $.each(operateOpenPage.params, function(key, value) { + $.each(value.params, function(key, value) { var params = { "key": key, "value": value @@ -212,7 +212,7 @@ layui.config({ id: id, cols: [ {id: 'key', title: '入参Key', formType: 'input', width: '150', verify: 'required'}, - {id: 'value', title: '值', formType: 'input', width: '150', verify: 'required'} + {id: 'value', title: '值(目前仅支持objectId和objectKey的传值)', formType: 'input', width: '150', verify: 'required'} ], deleteRowCallback: function (trcusid) { }, diff --git a/base-server/src/main/resources/template/js/contacts/contactsList.js b/base-server/src/main/resources/template/js/contacts/contactsList.js index 185ca6e58..30e8b4975 100644 --- a/base-server/src/main/resources/template/js/contacts/contactsList.js +++ b/base-server/src/main/resources/template/js/contacts/contactsList.js @@ -77,7 +77,7 @@ layui.config({ // 新增 $("body").on("click", "#addBean", function() { - _openNewWindows({ + parent._openNewWindows({ url: systemCommonUtil.getUrl('FP2023030400002&objectId=' + objectId + '&objectKey=' + objectKey, null), title: systemLanguage["com.skyeye.addPageTitle"][languageType], pageId: "contactsAdd", @@ -90,7 +90,7 @@ layui.config({ // 编辑 function edit(data) { - _openNewWindows({ + parent._openNewWindows({ url: systemCommonUtil.getUrl('FP2023030400003&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id, null), title: systemLanguage["com.skyeye.editPageTitle"][languageType], pageId: "contactsEdit", diff --git a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js index 5e72d1b95..b6dcd415e 100644 --- a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js +++ b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js @@ -4,12 +4,13 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'eleTree'].concat(dsFormUtil.mastHaveImport), function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'eleTree', 'textool'].concat(dsFormUtil.mastHaveImport), function (exports) { winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); var $ = layui.$, element = layui.element, colorpicker = layui.colorpicker, + textool = layui.textool, form = layui.form; // 加载图标信息 @@ -26,6 +27,8 @@ layui.config({ // 组件获取的值的合入接口入参的方式 skyeyeClassEnumUtil.showEnumDataListByClassName("componentValueMergType", 'radio', "valueMergType", '', form); + textool.init({eleId: 'remark', maxlength: 200}); + // 根据类型获取部分功能的使用说明 systemCommonUtil.queryExplainMationByType(2, function(json) { $(".layui-colla-title").html(json.bean.title); @@ -85,6 +88,7 @@ layui.config({ applyRange: $("#applyRange input:radio:checked").val(), applyObject: isNull($("#applyObject").attr("chooseId")) ? JSON.stringify([]) : $("#applyObject").attr("chooseId"), valueMergType: dataShowType.getData('valueMergType'), + remark: $("#remark").val(), linkedData: '2' }; if ($("#linkedData").val() == 'true') { diff --git a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js index 5b0668aef..2ff366c9d 100644 --- a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js +++ b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js @@ -4,12 +4,13 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui'].concat(dsFormUtil.mastHaveImport), function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'textool'].concat(dsFormUtil.mastHaveImport), function (exports) { winui.renderColor(); var index = parent.layer.getFrameIndex(window.name); var $ = layui.$, element = layui.element, colorpicker = layui.colorpicker, + textool = layui.textool; form = layui.form; showGrid({ @@ -19,7 +20,7 @@ layui.config({ pagination: false, method: 'GET', template: $("#beanTemplate").html(), - ajaxSendLoadBefore: function(hdb) { + ajaxSendLoadBefore: function(hdb, json) { hdb.registerHelper("compare2", function (v1, options) { if (v1 == '1') { return 'checked'; @@ -38,6 +39,7 @@ layui.config({ return 'false'; } }); + json.bean.remark = stringManipulation.textAreaShow(json.bean.remark); }, ajaxSendAfter: function(json) { // 加载图标信息 @@ -54,6 +56,8 @@ layui.config({ // 组件获取的值的合入接口入参的方式 skyeyeClassEnumUtil.showEnumDataListByClassName("componentValueMergType", 'radio', "valueMergType", json.bean.valueMergType, form); + textool.init({eleId: 'remark', maxlength: 200}); + // 根据类型获取部分功能的使用说明 systemCommonUtil.queryExplainMationByType(2, function (json) { $(".layui-colla-title").html(json.bean.title); @@ -101,6 +105,7 @@ layui.config({ applyRange: $("#applyRange input:radio:checked").val(), applyObject: isNull($("#applyObject").attr("chooseId")) ? JSON.stringify([]) : $("#applyObject").attr("chooseId"), valueMergType: dataShowType.getData('valueMergType'), + remark: $("#remark").val(), id: parent.rowId }; if ($("#linkedData").val() == 'true') { diff --git a/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js b/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js index e8824ae6f..07c8707fd 100644 --- a/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js +++ b/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js @@ -11,6 +11,9 @@ var sortDataIn; // 业务对象的属性信息 var attrList = []; +// 这两个参数为开启团队权限的对象拥有,这里没有实际用处,用于加载组件时临时有用。 +var objectId = '', objectKey = ''; + layui.config({ base: basePath, version: skyeyeVersion @@ -226,13 +229,13 @@ layui.config({ } var tip_index; - $("body").on("mouseenter", ".attr-mation", function (e) { + $("body").on("mouseenter", ".attr-mation, .component", function (e) { var title = $(this).attr('title'); if (isNull(title)) { return false; } tip_index = layer.tips(title, this, {time: 0, tips: 3}); - }).on('mouseleave', ".attr-mation", function() { + }).on('mouseleave', ".attr-mation, .component", function() { layer.close(tip_index); }); diff --git a/common/src/main/resources/template/js/dsFormPage/editPageContent.js b/common/src/main/resources/template/js/dsFormPage/editPageContent.js index 94bbdad98..f6db8f17f 100644 --- a/common/src/main/resources/template/js/dsFormPage/editPageContent.js +++ b/common/src/main/resources/template/js/dsFormPage/editPageContent.js @@ -99,6 +99,41 @@ layui.config({ `, + 'dateTimeTypeBox': `