diff --git a/common/src/main/resources/template/js/codeRule/codeRuleAdd.js b/common/src/main/resources/template/js/codeRule/codeRuleAdd.js deleted file mode 100644 index 0b1dcfac2321996842c2f37f5668dea5e1ec123c..0000000000000000000000000000000000000000 --- a/common/src/main/resources/template/js/codeRule/codeRuleAdd.js +++ /dev/null @@ -1,45 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'textool', 'ruleCode'], 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}); - - winui.ruleCode.init({ - id: "ruleBox" - }, null); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem) && winui.ruleCode.checkDataById("ruleBox")) { - var params = { - name: $("#name").val(), - codeNum: $("#codeNum").val(), - dictSort: $("#dictSort").val(), - alarm: $("input[name='alarm']:checked").val(), - remark: $("#remark").val(), - }; - var rule = winui.ruleCode.getDataById("ruleBox"); - params = $.extend(true, params, rule); - AjaxPostUtil.request({url: reqBasePath + "writeCodeRuleMation", 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 diff --git a/common/src/main/resources/template/js/codeRule/codeRuleEdit.js b/common/src/main/resources/template/js/codeRule/codeRuleEdit.js deleted file mode 100644 index f7d1c4cd3ca9f35e2877700145e0fce568b917cb..0000000000000000000000000000000000000000 --- a/common/src/main/resources/template/js/codeRule/codeRuleEdit.js +++ /dev/null @@ -1,62 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'textool', 'ruleCode'], 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 + "queryCodeRuleMationById", - 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) { - - winui.ruleCode.init({ - id: "ruleBox" - }, json.bean); - - $("input:radio[name=alarm][value=" + json.bean.alarm + "]").attr("checked", true); - - textool.init({eleId: 'remark', maxlength: 200}); - - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - id: parent.rowId, - name: $("#name").val(), - codeNum: $("#codeNum").val(), - dictSort: $("#dictSort").val(), - alarm: $("input[name='alarm']:checked").val(), - remark: $("#remark").val(), - }; - var rule = winui.ruleCode.getDataById("ruleBox"); - params = $.extend(true, params, rule); - AjaxPostUtil.request({url: reqBasePath + "writeCodeRuleMation", 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 diff --git a/common/src/main/resources/template/js/codeRule/codeRuleList.js b/common/src/main/resources/template/js/codeRule/codeRuleList.js deleted file mode 100644 index cc453dddb100498b522aeefc0ba471a877326846..0000000000000000000000000000000000000000 --- a/common/src/main/resources/template/js/codeRule/codeRuleList.js +++ /dev/null @@ -1,115 +0,0 @@ - -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('1663473377361'); - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: reqBasePath + 'queryCodeRuleList', - 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: 'codeNum', title: '编码', width: 150 }, - { field: 'pattern', title: '命名模式', width: 300 }, - { field: 'alarm', title: '是否告警', align: 'center', width: 80, templet: function (d) { - if (d.alarm == 0) { - return "否"; - } else if (d.alarm == 1) { - return "是"; - } - }}, - { field: 'remark', title: '备注', width: 200 }, - { 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 + "deleteCodeRuleMationById", 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/codeRule/codeRuleEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "codeRuleEdit", - 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/codeRule/codeRuleAdd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "codeRuleAdd", - 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('codeRuleList', {}); -}); diff --git a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js index 80b74e2b55d9a45060c21303076852e91676da93..5e72d1b95937185e7a93fd1e5725be391a8b6472 100644 --- a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js +++ b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentAdd.js @@ -23,8 +23,8 @@ layui.config({ skyeyeClassEnumUtil.showEnumDataListByClassName("componentAttr", 'verificationSelect', "attrKeys", '', form); // 组件适用范围 skyeyeClassEnumUtil.showEnumDataListByClassName("componentApplyRange", 'radio', "applyRange", '', form); - // 适用表单布局 - skyeyeClassEnumUtil.showEnumDataListByClassName("dsFormPageType", 'verificationSelect', "applyFormType", '', form); + // 组件获取的值的合入接口入参的方式 + skyeyeClassEnumUtil.showEnumDataListByClassName("componentValueMergType", 'radio', "valueMergType", '', form); // 根据类型获取部分功能的使用说明 systemCommonUtil.queryExplainMationByType(2, function(json) { @@ -84,7 +84,7 @@ layui.config({ attrKeys: $('#attrKeys').attr('value'), applyRange: $("#applyRange input:radio:checked").val(), applyObject: isNull($("#applyObject").attr("chooseId")) ? JSON.stringify([]) : $("#applyObject").attr("chooseId"), - applyFormType: $('#applyFormType').attr('value'), + valueMergType: dataShowType.getData('valueMergType'), 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 20377aa17011459b9b64d4907737d60ca420f77c..5b0668aef55e9cb1b8c70b51bd05118e5ccbc501 100644 --- a/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js +++ b/common/src/main/resources/template/js/dsFormComponent/dsFormComponentEdit.js @@ -51,9 +51,8 @@ layui.config({ skyeyeClassEnumUtil.showEnumDataListByClassName("componentAttr", 'verificationSelect', "attrKeys", attrKeys, form); // 组件适用范围 skyeyeClassEnumUtil.showEnumDataListByClassName("componentApplyRange", 'radio', "applyRange", json.bean.applyRange, form); - // 适用表单布局 - var applyFormType = isNull(json.bean.applyFormType) ? '' : json.bean.applyFormType.toString(); - skyeyeClassEnumUtil.showEnumDataListByClassName("dsFormPageType", 'verificationSelect', "applyFormType", applyFormType, form); + // 组件获取的值的合入接口入参的方式 + skyeyeClassEnumUtil.showEnumDataListByClassName("componentValueMergType", 'radio', "valueMergType", json.bean.valueMergType, form); // 根据类型获取部分功能的使用说明 systemCommonUtil.queryExplainMationByType(2, function (json) { @@ -101,7 +100,7 @@ layui.config({ attrKeys: $('#attrKeys').attr('value'), applyRange: $("#applyRange input:radio:checked").val(), applyObject: isNull($("#applyObject").attr("chooseId")) ? JSON.stringify([]) : $("#applyObject").attr("chooseId"), - applyFormType: $('#applyFormType').attr('value'), + valueMergType: dataShowType.getData('valueMergType'), 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 9b13f9d3d3f3752cc72f032d06919aab7806da62..0c3611d7347415d941852a9feabc053881f28fae 100644 --- a/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js +++ b/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js @@ -28,7 +28,6 @@ layui.config({ var componentList = []; var className = GetUrlParam("className"); - var pageType = GetUrlParam("pageType"); if (isNull(className)) { winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000}); return false; @@ -90,7 +89,7 @@ layui.config({ showGrid({ id: "btnBox", url: reqBasePath + "queryAllDsFormComponentList", - params: {serviceClassName: className, dsFormPageType: pageType}, + params: {serviceClassName: className}, pagination: false, method: 'GET', template: $("#leftBoxItem").html(), @@ -242,7 +241,7 @@ layui.config({ sortDataIn(); var params = { pageId: pageId, - dsFormPageContentList: JSON.stringify(contentList) + dsFormPageContentList: encodeURIComponent(JSON.stringify(contentList)) } AjaxPostUtil.request({url: reqBasePath + "writeDsFormPageContent", params: params, type: 'json', method: 'POST', callback: function (json) { winui.window.msg("保存成功", {icon: 1, time: 2000}); diff --git a/common/src/main/resources/template/tpl/codeRule/codeRuleAdd.html b/common/src/main/resources/template/tpl/codeRule/codeRuleAdd.html deleted file mode 100644 index 2a1b77dca87e6832d9159779d716be2f7a5d11ed..0000000000000000000000000000000000000000 --- a/common/src/main/resources/template/tpl/codeRule/codeRuleAdd.html +++ /dev/null @@ -1,59 +0,0 @@ - - -
- -