From f97eb9a06ce5b38533846969129c6cc4883b8a59 Mon Sep 17 00:00:00 2001
From: weizhiqiang <598748873@qq.com>
Date: Sat, 27 Jul 2024 12:34:29 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/template/js/attr/attrList.js | 9 ++++++---
.../main/resources/template/js/attr/writeAttr.js | 4 +++-
.../template/js/classServer/classServerDetails.js | 4 +++-
.../resources/template/js/document/documentList.js | 2 +-
.../resources/template/js/operate/operateList.js | 4 +++-
.../resources/template/js/operate/writeOperate.js | 5 ++++-
.../template/js/dsFormPage/dsFormPageDesign.js | 5 +++--
.../template/js/dsFormPage/dsFormPageListChoose.js | 4 +++-
.../template/js/dsFormPage/editPageContent.js | 2 +-
.../js/dsFormPage/editPageContentIsTable.js | 4 +++-
.../resources/template/js/dsFormPage/pageList.js | 4 ++--
.../template/js/dsFormPage/simpleTableDesign.js | 3 ++-
.../resources/template/js/dsFormPage/writePage.js | 2 +-
.../assets/lib/layui/customer/skyeye/dsFormUtil.js | 13 +++++++++++--
.../lib/layui/customer/tree/catalogTreeUtil.js | 1 +
.../resources/template/assets/lib/layui/layui.js | 6 +++++-
.../resources/template/json/sysServiceMation.json | 5 ++++-
17 files changed, 56 insertions(+), 21 deletions(-)
diff --git a/base-server/src/main/resources/template/js/attr/attrList.js b/base-server/src/main/resources/template/js/attr/attrList.js
index ffe42d433..707bcef39 100644
--- a/base-server/src/main/resources/template/js/attr/attrList.js
+++ b/base-server/src/main/resources/template/js/attr/attrList.js
@@ -1,5 +1,6 @@
var objectId = "";
+var appId = "";
layui.config({
base: basePath,
@@ -14,6 +15,7 @@ layui.config({
soulTable = layui.soulTable;
objectId = GetUrlParam("objectId");
+ appId = GetUrlParam("appId");
if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
@@ -92,7 +94,8 @@ layui.config({
parent.layer.close(index);
var params = {
className: objectId,
- attrKey: data.attrKey
+ attrKey: data.attrKey,
+ appId: appId
};
AjaxPostUtil.request({url: reqBasePath + "deleteAttrDefinitionCustom", params: params, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg('还原成功', {icon: 1, time: 2000});
@@ -104,7 +107,7 @@ layui.config({
// 编辑
function edit(data) {
parent._openNewWindows({
- url: "../../tpl/attr/writeAttr.html?className=" + objectId + '&attrKey=' + data.attrKey,
+ url: "../../tpl/attr/writeAttr.html?className=" + objectId + '&attrKey=' + data.attrKey + '&appId=' + appId,
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "writeAttr",
area: ['90vw', '90vh'],
@@ -125,7 +128,7 @@ layui.config({
}
function getTableParams() {
- return {className: objectId};
+ return {className: objectId, appId: appId};
}
exports('attrList', {});
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 9288fb892..c7c4f74fe 100644
--- a/base-server/src/main/resources/template/js/attr/writeAttr.js
+++ b/base-server/src/main/resources/template/js/attr/writeAttr.js
@@ -40,8 +40,9 @@ layui.config({
var className = GetUrlParam('className');
var attrKey = GetUrlParam('attrKey');
+ var appId = GetUrlParam('appId');
- AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionCustom", params: {className: className, attrKey: attrKey}, type: 'json', method: "GET", callback: function (json) {
+ AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionCustom", params: {className: className, attrKey: attrKey, appId: appId}, type: 'json', method: "GET", callback: function (json) {
$("#showForm").html(getDataUseHandlebars($("#beanTemplate").html(), json));
textool.init({eleId: 'remark', maxlength: 200});
@@ -83,6 +84,7 @@ layui.config({
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
+ appId: appId,
className: className,
attrKey: attrKey,
name: encodeURIComponent($("#name").val()),
diff --git a/base-server/src/main/resources/template/js/classServer/classServerDetails.js b/base-server/src/main/resources/template/js/classServer/classServerDetails.js
index e05bb7429..13fbac118 100644
--- a/base-server/src/main/resources/template/js/classServer/classServerDetails.js
+++ b/base-server/src/main/resources/template/js/classServer/classServerDetails.js
@@ -1,5 +1,6 @@
var objectId = "";
+var appId = "";
layui.config({
base: basePath,
@@ -13,6 +14,7 @@ layui.config({
form = layui.form;
objectId = GetUrlParam("objectId");
+ appId = GetUrlParam("appId");
if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
@@ -23,7 +25,7 @@ layui.config({
showGrid({
id: "showForm",
url: reqBasePath + "queryServiceBeanCustom",
- params: {className: objectId},
+ params: {className: objectId, appId: appId},
pagination: false,
method: 'GET',
template: $("#beanTemplate").html(),
diff --git a/base-server/src/main/resources/template/js/document/documentList.js b/base-server/src/main/resources/template/js/document/documentList.js
index 6047b9ca4..e7bb55702 100644
--- a/base-server/src/main/resources/template/js/document/documentList.js
+++ b/base-server/src/main/resources/template/js/document/documentList.js
@@ -25,7 +25,7 @@ layui.config({
catalogTreeUtil.init({
boxId: 'catalogBox',
className: objectKey,
- appId:
+ appId: getSysServiceMationAppIdByClassName(objectKey),
objectId: objectId,
addOrUser: false,
checkAuth: true,
diff --git a/base-server/src/main/resources/template/js/operate/operateList.js b/base-server/src/main/resources/template/js/operate/operateList.js
index 2a3354d05..5da33cf96 100644
--- a/base-server/src/main/resources/template/js/operate/operateList.js
+++ b/base-server/src/main/resources/template/js/operate/operateList.js
@@ -1,6 +1,7 @@
var rowId = "";
var objectId = "";
+var appId = "";
layui.config({
base: basePath,
@@ -15,6 +16,7 @@ layui.config({
soulTable = layui.soulTable;
objectId = GetUrlParam("objectId");
+ appId = GetUrlParam("appId");
if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
@@ -95,7 +97,7 @@ layui.config({
function openWritePage() {
parent._openNewWindows({
- url: "../../tpl/operate/writeOperate.html?className=" + objectId + "&id=" + rowId,
+ url: "../../tpl/operate/writeOperate.html?className=" + objectId + "&id=" + rowId + "&appId=" + appId,
title: systemLanguage["com.skyeye.recordPageTitle"][languageType],
pageId: "writeOperate",
area: ['90vw', '90vh'],
diff --git a/base-server/src/main/resources/template/js/operate/writeOperate.js b/base-server/src/main/resources/template/js/operate/writeOperate.js
index ed967e6fd..26b12b37c 100644
--- a/base-server/src/main/resources/template/js/operate/writeOperate.js
+++ b/base-server/src/main/resources/template/js/operate/writeOperate.js
@@ -11,6 +11,7 @@ layui.config({
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
var className = GetUrlParam("className");
+ var appId = GetUrlParam("appId");
var id = GetUrlParam("id");
var _html = {
@@ -52,7 +53,7 @@ layui.config({
};
var attrHtml = '';
- AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: className}, type: 'json', method: "POST", callback: function (json) {
+ AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: className, appId: appId}, type: 'json', method: "POST", callback: function (json) {
attrHtml = getDataUseHandlebars(`{{#each rows}}{{/each}}`, json);
}, async: false});
@@ -116,6 +117,7 @@ layui.config({
dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox',
title: '按钮显示条件',
+ appId: appId,
className: className
}, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList);
}, async: false});
@@ -123,6 +125,7 @@ layui.config({
dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox',
title: '按钮显示条件',
+ appId: appId,
className: className
});
skyeyeClassEnumUtil.showEnumDataListByClassName("operatePosition", 'select', "position", '', form);
diff --git a/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js b/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
index a4f534c02..9ece4c28b 100644
--- a/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
+++ b/common/src/main/resources/template/js/dsFormPage/dsFormPageDesign.js
@@ -1,6 +1,7 @@
var pageId = GetUrlParam("pageId");
var className = GetUrlParam("className");
+var appId = GetUrlParam("appId");
var layedit, form;
// 选中的表单布局组件信息
@@ -121,7 +122,7 @@ layui.config({
// 同步至其他布局
var selOption = getFileContent('tpl/template/select-option.tpl');
$("body").on("click", "#syncOtherOage", function (e) {
- AjaxPostUtil.request({url: reqBasePath + "queryDsFormPageList", params: {className: className}, type: 'json', method: 'POST', callback: function (json) {
+ AjaxPostUtil.request({url: reqBasePath + "queryDsFormPageList", params: {className: className, appId: appId}, type: 'json', method: 'POST', callback: function (json) {
let syncPage = []
$.each(json.rows, function (i, item) {
let type = item.type;
@@ -238,7 +239,7 @@ layui.config({
showGrid({
id: "attrBox",
url: reqBasePath + "queryAttrDefinitionList",
- params: {className: className},
+ params: {className: className, appId: appId},
pagination: false,
method: 'POST',
template: $("#leftAttrBoxItem").html(),
diff --git a/common/src/main/resources/template/js/dsFormPage/dsFormPageListChoose.js b/common/src/main/resources/template/js/dsFormPage/dsFormPageListChoose.js
index 134017445..61e1ce927 100644
--- a/common/src/main/resources/template/js/dsFormPage/dsFormPageListChoose.js
+++ b/common/src/main/resources/template/js/dsFormPage/dsFormPageListChoose.js
@@ -12,6 +12,7 @@ layui.config({
table = layui.table,
fsTree = layui.fsTree;
var objectId = 'temp';
+ let appId = '';
fsTree.render({
id: "treeDemo",
@@ -33,6 +34,7 @@ layui.config({
return false;
}
objectId = treeNode.id;
+ appId = chooseTreeNode.classMation.appId;
loadTable();
}
@@ -88,7 +90,7 @@ layui.config({
}
function getTableParams() {
- return {className: objectId};
+ return {className: objectId, appId: appId};
}
exports('dsFormPageListChoose', {});
diff --git a/common/src/main/resources/template/js/dsFormPage/editPageContent.js b/common/src/main/resources/template/js/dsFormPage/editPageContent.js
index 504971fec..8e1450dc6 100644
--- a/common/src/main/resources/template/js/dsFormPage/editPageContent.js
+++ b/common/src/main/resources/template/js/dsFormPage/editPageContent.js
@@ -349,7 +349,7 @@ layui.config({
$("body").on("click", "#attrTransformTableListConfig", function() {
parent.temData = $("#attrTransformTableListConfig").parent().attr('data');
parent._openNewWindows({
- url: "../../tpl/dsFormPage/editPageContentIsTable.html?attrKey=" + $("#attrKey").val() + '&className=' + parent.className + '&pageType=' + pageType,
+ url: "../../tpl/dsFormPage/editPageContentIsTable.html?attrKey=" + $("#attrKey").val() + '&className=' + parent.className + '&pageType=' + pageType + '&appId=' + parent.appId,
title: '表格属性配置',
pageId: "editPageContentIsTable",
area: ['90vw', '90vh'],
diff --git a/common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js b/common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js
index 01f12a858..2c504c7e7 100644
--- a/common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js
+++ b/common/src/main/resources/template/js/dsFormPage/editPageContentIsTable.js
@@ -24,9 +24,11 @@ layui.config({
var parentAttrKey = GetUrlParam("attrKey");
var parentClassName = GetUrlParam("className");
var pageType = GetUrlParam("pageType");
+ var appId = GetUrlParam("appId");
var params = {
className: parentClassName,
- attrKey: parentAttrKey
+ attrKey: parentAttrKey,
+ appId: appId
};
var childAttr = [];
AjaxPostUtil.request({url: reqBasePath + "queryChildAttrDefinitionList", params: params, type: 'json', method: "POST", callback: function (json) {
diff --git a/common/src/main/resources/template/js/dsFormPage/pageList.js b/common/src/main/resources/template/js/dsFormPage/pageList.js
index 2409c2650..cc99d4d39 100644
--- a/common/src/main/resources/template/js/dsFormPage/pageList.js
+++ b/common/src/main/resources/template/js/dsFormPage/pageList.js
@@ -81,7 +81,7 @@ layui.config({
if (data.type == 'simpleTable') {
url = '../../tpl/dsFormPage/simpleTableDesign.html';
}
- url += '?className=' + objectId + '&pageId=' + data.id + '&pageType=' + data.type;
+ url += '?className=' + objectId + '&pageId=' + data.id + '&pageType=' + data.type + '&appId=' + appId;
parent.parent._openNewWindows({
url: url,
title: "布局设计",
@@ -124,7 +124,7 @@ layui.config({
}
function getTableParams() {
- return {className: objectId};
+ return {className: objectId, appId: appId};
}
exports('pageList', {});
diff --git a/common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js b/common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js
index daef9308f..37d51db45 100644
--- a/common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js
+++ b/common/src/main/resources/template/js/dsFormPage/simpleTableDesign.js
@@ -16,6 +16,7 @@ layui.config({
var pageId = GetUrlParam("pageId");
var className = GetUrlParam("className");
+ var appId = GetUrlParam("appId");
if (isNull(className)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
@@ -23,7 +24,7 @@ layui.config({
// 获取属性
var attrList = [];
- AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: className}, type: 'json', method: "POST", callback: function (data) {
+ AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: className, appId: appId}, type: 'json', method: "POST", callback: function (data) {
attrList = [].concat(data.rows);
$.each(attrList, function (i, item) {
if (!isNull(item.attrDefinitionCustom)) {
diff --git a/common/src/main/resources/template/js/dsFormPage/writePage.js b/common/src/main/resources/template/js/dsFormPage/writePage.js
index 134615461..08a695524 100644
--- a/common/src/main/resources/template/js/dsFormPage/writePage.js
+++ b/common/src/main/resources/template/js/dsFormPage/writePage.js
@@ -120,7 +120,7 @@ layui.config({
form.render('select');
}, async: false});
} else if (type == 'create' || type == 'edit') {
- AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: {className: className}, type: 'json', method: 'GET', callback: function (json) {
+ AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: {className: className, appId: appId}, type: 'json', method: 'GET', callback: function (json) {
// 判断是否开启了工作流,如果开启了工作流,则将【是否开启工作流】这个选项填充
if (json.bean.serviceBean.flowable) {
$('#otherDom').html(pageHtml['flowabled']);
diff --git a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
index 25168dc95..e6c5f55c7 100644
--- a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
+++ b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js
@@ -356,7 +356,11 @@ var dsFormUtil = {
return false;
}
if (isNull(dsFormUtil.temPage) || $.isEmptyObject(dsFormUtil.temPage)) {
- AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: {className: serviceClassName}, type: 'json', method: 'GET', callback: function (json) {
+ var params = {
+ className: serviceClassName,
+ appId: pageMation.appId
+ };
+ AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: params, type: 'json', method: 'GET', callback: function (json) {
dsFormUtil.temPage = json.bean;
}, async: false});
}
@@ -1202,6 +1206,7 @@ var dsFormColumnUtil = {
config: {
id: 'skyeye', // 组件展示位置id
title: '', // 表格的作用标题
+ appId: '', // 应用id
className: 'xxx.skyeye', // 业务对象的服务类
attrList: [], // 业务对象的服务类对应的属性
attrSymbols: [], // 属性与值的对比符号
@@ -1234,7 +1239,11 @@ var dsFormColumnUtil = {
getDataList: function () {
// 获取属性列表
- AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: dsFormColumnUtil.config.className}, type: 'json', method: "POST", callback: function (data) {
+ var params = {
+ className: dsFormColumnUtil.config.className,
+ appId: dsFormColumnUtil.config.appId
+ };
+ AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: params, type: 'json', method: "POST", callback: function (data) {
var attrList = [].concat(data.rows);
$.each(attrList, function (i, item) {
if (!isNull(item.attrDefinitionCustom)) {
diff --git a/web/src/main/resources/template/assets/lib/layui/customer/tree/catalogTreeUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/tree/catalogTreeUtil.js
index f7efe7731..14604d1fd 100644
--- a/web/src/main/resources/template/assets/lib/layui/customer/tree/catalogTreeUtil.js
+++ b/web/src/main/resources/template/assets/lib/layui/customer/tree/catalogTreeUtil.js
@@ -288,6 +288,7 @@ var catalogTreeUtil = {
var params = {
objectId: catalogTreeUtil.config.objectId,
objectKey: catalogTreeUtil.config.className,
+ objectAppId: catalogTreeUtil.config.appId,
addOrUser: catalogTreeUtil.config.addOrUser
};
AjaxPostUtil.request({url: reqBasePath + "queryCatalogForTree", params: params, type: 'json', method: "POST", callback: function(json) {
diff --git a/web/src/main/resources/template/assets/lib/layui/layui.js b/web/src/main/resources/template/assets/lib/layui/layui.js
index b5bcd13b2..87b0a789b 100644
--- a/web/src/main/resources/template/assets/lib/layui/layui.js
+++ b/web/src/main/resources/template/assets/lib/layui/layui.js
@@ -148,9 +148,13 @@ var sysDictData = getAndWriteLocal('sysDictData');
var skyeyeClassEnum = getAndWriteLocal('skyeyeClassEnum');
function getSysServiceMationAppIdByClassName(className) {
+ let appId = "";
$.each(sysServiceMation, function(key, value) {
-
+ if (value.className == className) {
+ appId = value.appId;
+ }
});
+ return appId;
}
function getAndWriteLocal(key) {
diff --git a/web/src/main/resources/template/json/sysServiceMation.json b/web/src/main/resources/template/json/sysServiceMation.json
index d267c03cc..22b21048f 100644
--- a/web/src/main/resources/template/json/sysServiceMation.json
+++ b/web/src/main/resources/template/json/sysServiceMation.json
@@ -78,5 +78,8 @@
"userInfo": {"name": "用户信息", "key": "com.skyeye.personnel.service.impl.SysEveUserServiceImpl"},
"dictData": {"name": "数据字典", "key": "com.skyeye.eve.service.impl.SysDictDataServiceImpl"},
"contacts": {"name": "联系人", "key": "com.skyeye.contacts.service.impl.ContactsServiceImpl"},
- "enclosure": {"name": "附件", "key": "com.skyeye.enclosure.service.impl.SysEnclosureServiceImpl", "appId": "com.wzq.skyeye.oa"}
+ "enclosure": {"name": "附件", "key": "com.skyeye.enclosure.service.impl.SysEnclosureServiceImpl", "appId": "com.wzq.skyeye.oa"},
+ "supplierServiceImpl": {"name": "供应商", "key": "com.skyeye.supplier.service.impl.SupplierServiceImpl", "appId": "com.wzq.skyeye.erp"},
+ "proProjectServiceImpl": {"name": "项目", "key": "com.skyeye.project.service.impl.ProProjectServiceImpl", "appId": "com.wzq.skyeye.project"},
+ "autoProjectServiceImpl": {"name": "自动化项目", "key": "com.skyeye.project.service.impl.AutoProjectServiceImpl", "appId": "com.wzq.skyeye.auto"}
}
\ No newline at end of file
--
GitLab