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

feat: 代码修改

上级 4f87cfbb
var objectId = ""; var objectId = "";
var appId = "";
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -14,6 +15,7 @@ layui.config({ ...@@ -14,6 +15,7 @@ layui.config({
soulTable = layui.soulTable; soulTable = layui.soulTable;
objectId = GetUrlParam("objectId"); objectId = GetUrlParam("objectId");
appId = GetUrlParam("appId");
if (isNull(objectId)) { if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000}); winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false; return false;
...@@ -92,7 +94,8 @@ layui.config({ ...@@ -92,7 +94,8 @@ layui.config({
parent.layer.close(index); parent.layer.close(index);
var params = { var params = {
className: objectId, className: objectId,
attrKey: data.attrKey attrKey: data.attrKey,
appId: appId
}; };
AjaxPostUtil.request({url: reqBasePath + "deleteAttrDefinitionCustom", params: params, type: 'json', method: 'DELETE', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "deleteAttrDefinitionCustom", params: params, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg('还原成功', {icon: 1, time: 2000}); winui.window.msg('还原成功', {icon: 1, time: 2000});
...@@ -104,7 +107,7 @@ layui.config({ ...@@ -104,7 +107,7 @@ layui.config({
// 编辑 // 编辑
function edit(data) { function edit(data) {
parent._openNewWindows({ 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], title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "writeAttr", pageId: "writeAttr",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
...@@ -125,7 +128,7 @@ layui.config({ ...@@ -125,7 +128,7 @@ layui.config({
} }
function getTableParams() { function getTableParams() {
return {className: objectId}; return {className: objectId, appId: appId};
} }
exports('attrList', {}); exports('attrList', {});
......
...@@ -40,8 +40,9 @@ layui.config({ ...@@ -40,8 +40,9 @@ layui.config({
var className = GetUrlParam('className'); var className = GetUrlParam('className');
var attrKey = GetUrlParam('attrKey'); 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)); $("#showForm").html(getDataUseHandlebars($("#beanTemplate").html(), json));
textool.init({eleId: 'remark', maxlength: 200}); textool.init({eleId: 'remark', maxlength: 200});
...@@ -83,6 +84,7 @@ layui.config({ ...@@ -83,6 +84,7 @@ layui.config({
form.on('submit(formEditBean)', function (data) { form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
appId: appId,
className: className, className: className,
attrKey: attrKey, attrKey: attrKey,
name: encodeURIComponent($("#name").val()), name: encodeURIComponent($("#name").val()),
......
var objectId = ""; var objectId = "";
var appId = "";
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -13,6 +14,7 @@ layui.config({ ...@@ -13,6 +14,7 @@ layui.config({
form = layui.form; form = layui.form;
objectId = GetUrlParam("objectId"); objectId = GetUrlParam("objectId");
appId = GetUrlParam("appId");
if (isNull(objectId)) { if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000}); winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false; return false;
...@@ -23,7 +25,7 @@ layui.config({ ...@@ -23,7 +25,7 @@ layui.config({
showGrid({ showGrid({
id: "showForm", id: "showForm",
url: reqBasePath + "queryServiceBeanCustom", url: reqBasePath + "queryServiceBeanCustom",
params: {className: objectId}, params: {className: objectId, appId: appId},
pagination: false, pagination: false,
method: 'GET', method: 'GET',
template: $("#beanTemplate").html(), template: $("#beanTemplate").html(),
......
...@@ -25,7 +25,7 @@ layui.config({ ...@@ -25,7 +25,7 @@ layui.config({
catalogTreeUtil.init({ catalogTreeUtil.init({
boxId: 'catalogBox', boxId: 'catalogBox',
className: objectKey, className: objectKey,
appId: appId: getSysServiceMationAppIdByClassName(objectKey),
objectId: objectId, objectId: objectId,
addOrUser: false, addOrUser: false,
checkAuth: true, checkAuth: true,
......
var rowId = ""; var rowId = "";
var objectId = ""; var objectId = "";
var appId = "";
layui.config({ layui.config({
base: basePath, base: basePath,
...@@ -15,6 +16,7 @@ layui.config({ ...@@ -15,6 +16,7 @@ layui.config({
soulTable = layui.soulTable; soulTable = layui.soulTable;
objectId = GetUrlParam("objectId"); objectId = GetUrlParam("objectId");
appId = GetUrlParam("appId");
if (isNull(objectId)) { if (isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000}); winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false; return false;
...@@ -95,7 +97,7 @@ layui.config({ ...@@ -95,7 +97,7 @@ layui.config({
function openWritePage() { function openWritePage() {
parent._openNewWindows({ 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], title: systemLanguage["com.skyeye.recordPageTitle"][languageType],
pageId: "writeOperate", pageId: "writeOperate",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
......
...@@ -11,6 +11,7 @@ layui.config({ ...@@ -11,6 +11,7 @@ layui.config({
form = layui.form; form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl'); var selOption = getFileContent('tpl/template/select-option.tpl');
var className = GetUrlParam("className"); var className = GetUrlParam("className");
var appId = GetUrlParam("appId");
var id = GetUrlParam("id"); var id = GetUrlParam("id");
var _html = { var _html = {
...@@ -52,7 +53,7 @@ layui.config({ ...@@ -52,7 +53,7 @@ layui.config({
}; };
var attrHtml = ''; 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(`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`, json); attrHtml = getDataUseHandlebars(`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`, json);
}, async: false}); }, async: false});
...@@ -116,6 +117,7 @@ layui.config({ ...@@ -116,6 +117,7 @@ layui.config({
dsFormColumnUtil.init({ dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox', id: 'attrSymbolsDesignBox',
title: '按钮显示条件', title: '按钮显示条件',
appId: appId,
className: className className: className
}, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList); }, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList);
}, async: false}); }, async: false});
...@@ -123,6 +125,7 @@ layui.config({ ...@@ -123,6 +125,7 @@ layui.config({
dsFormColumnUtil.init({ dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox', id: 'attrSymbolsDesignBox',
title: '按钮显示条件', title: '按钮显示条件',
appId: appId,
className: className className: className
}); });
skyeyeClassEnumUtil.showEnumDataListByClassName("operatePosition", 'select', "position", '', form); skyeyeClassEnumUtil.showEnumDataListByClassName("operatePosition", 'select', "position", '', form);
......
var pageId = GetUrlParam("pageId"); var pageId = GetUrlParam("pageId");
var className = GetUrlParam("className"); var className = GetUrlParam("className");
var appId = GetUrlParam("appId");
var layedit, form; var layedit, form;
// 选中的表单布局组件信息 // 选中的表单布局组件信息
...@@ -121,7 +122,7 @@ layui.config({ ...@@ -121,7 +122,7 @@ layui.config({
// 同步至其他布局 // 同步至其他布局
var selOption = getFileContent('tpl/template/select-option.tpl'); var selOption = getFileContent('tpl/template/select-option.tpl');
$("body").on("click", "#syncOtherOage", function (e) { $("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 = [] let syncPage = []
$.each(json.rows, function (i, item) { $.each(json.rows, function (i, item) {
let type = item.type; let type = item.type;
...@@ -238,7 +239,7 @@ layui.config({ ...@@ -238,7 +239,7 @@ layui.config({
showGrid({ showGrid({
id: "attrBox", id: "attrBox",
url: reqBasePath + "queryAttrDefinitionList", url: reqBasePath + "queryAttrDefinitionList",
params: {className: className}, params: {className: className, appId: appId},
pagination: false, pagination: false,
method: 'POST', method: 'POST',
template: $("#leftAttrBoxItem").html(), template: $("#leftAttrBoxItem").html(),
......
...@@ -12,6 +12,7 @@ layui.config({ ...@@ -12,6 +12,7 @@ layui.config({
table = layui.table, table = layui.table,
fsTree = layui.fsTree; fsTree = layui.fsTree;
var objectId = 'temp'; var objectId = 'temp';
let appId = '';
fsTree.render({ fsTree.render({
id: "treeDemo", id: "treeDemo",
...@@ -33,6 +34,7 @@ layui.config({ ...@@ -33,6 +34,7 @@ layui.config({
return false; return false;
} }
objectId = treeNode.id; objectId = treeNode.id;
appId = chooseTreeNode.classMation.appId;
loadTable(); loadTable();
} }
...@@ -88,7 +90,7 @@ layui.config({ ...@@ -88,7 +90,7 @@ layui.config({
} }
function getTableParams() { function getTableParams() {
return {className: objectId}; return {className: objectId, appId: appId};
} }
exports('dsFormPageListChoose', {}); exports('dsFormPageListChoose', {});
......
...@@ -349,7 +349,7 @@ layui.config({ ...@@ -349,7 +349,7 @@ layui.config({
$("body").on("click", "#attrTransformTableListConfig", function() { $("body").on("click", "#attrTransformTableListConfig", function() {
parent.temData = $("#attrTransformTableListConfig").parent().attr('data'); parent.temData = $("#attrTransformTableListConfig").parent().attr('data');
parent._openNewWindows({ 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: '表格属性配置', title: '表格属性配置',
pageId: "editPageContentIsTable", pageId: "editPageContentIsTable",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
......
...@@ -24,9 +24,11 @@ layui.config({ ...@@ -24,9 +24,11 @@ layui.config({
var parentAttrKey = GetUrlParam("attrKey"); var parentAttrKey = GetUrlParam("attrKey");
var parentClassName = GetUrlParam("className"); var parentClassName = GetUrlParam("className");
var pageType = GetUrlParam("pageType"); var pageType = GetUrlParam("pageType");
var appId = GetUrlParam("appId");
var params = { var params = {
className: parentClassName, className: parentClassName,
attrKey: parentAttrKey attrKey: parentAttrKey,
appId: appId
}; };
var childAttr = []; var childAttr = [];
AjaxPostUtil.request({url: reqBasePath + "queryChildAttrDefinitionList", params: params, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "queryChildAttrDefinitionList", params: params, type: 'json', method: "POST", callback: function (json) {
......
...@@ -81,7 +81,7 @@ layui.config({ ...@@ -81,7 +81,7 @@ layui.config({
if (data.type == 'simpleTable') { if (data.type == 'simpleTable') {
url = '../../tpl/dsFormPage/simpleTableDesign.html'; 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({ parent.parent._openNewWindows({
url: url, url: url,
title: "布局设计", title: "布局设计",
...@@ -124,7 +124,7 @@ layui.config({ ...@@ -124,7 +124,7 @@ layui.config({
} }
function getTableParams() { function getTableParams() {
return {className: objectId}; return {className: objectId, appId: appId};
} }
exports('pageList', {}); exports('pageList', {});
......
...@@ -16,6 +16,7 @@ layui.config({ ...@@ -16,6 +16,7 @@ layui.config({
var pageId = GetUrlParam("pageId"); var pageId = GetUrlParam("pageId");
var className = GetUrlParam("className"); var className = GetUrlParam("className");
var appId = GetUrlParam("appId");
if (isNull(className)) { if (isNull(className)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000}); winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false; return false;
...@@ -23,7 +24,7 @@ layui.config({ ...@@ -23,7 +24,7 @@ layui.config({
// 获取属性 // 获取属性
var attrList = []; 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); attrList = [].concat(data.rows);
$.each(attrList, function (i, item) { $.each(attrList, function (i, item) {
if (!isNull(item.attrDefinitionCustom)) { if (!isNull(item.attrDefinitionCustom)) {
......
...@@ -120,7 +120,7 @@ layui.config({ ...@@ -120,7 +120,7 @@ layui.config({
form.render('select'); form.render('select');
}, async: false}); }, async: false});
} else if (type == 'create' || type == 'edit') { } 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) { if (json.bean.serviceBean.flowable) {
$('#otherDom').html(pageHtml['flowabled']); $('#otherDom').html(pageHtml['flowabled']);
......
...@@ -356,7 +356,11 @@ var dsFormUtil = { ...@@ -356,7 +356,11 @@ var dsFormUtil = {
return false; return false;
} }
if (isNull(dsFormUtil.temPage) || $.isEmptyObject(dsFormUtil.temPage)) { 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; dsFormUtil.temPage = json.bean;
}, async: false}); }, async: false});
} }
...@@ -1202,6 +1206,7 @@ var dsFormColumnUtil = { ...@@ -1202,6 +1206,7 @@ var dsFormColumnUtil = {
config: { config: {
id: 'skyeye', // 组件展示位置id id: 'skyeye', // 组件展示位置id
title: '', // 表格的作用标题 title: '', // 表格的作用标题
appId: '', // 应用id
className: 'xxx.skyeye', // 业务对象的服务类 className: 'xxx.skyeye', // 业务对象的服务类
attrList: [], // 业务对象的服务类对应的属性 attrList: [], // 业务对象的服务类对应的属性
attrSymbols: [], // 属性与值的对比符号 attrSymbols: [], // 属性与值的对比符号
...@@ -1234,7 +1239,11 @@ var dsFormColumnUtil = { ...@@ -1234,7 +1239,11 @@ var dsFormColumnUtil = {
getDataList: function () { 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); var attrList = [].concat(data.rows);
$.each(attrList, function (i, item) { $.each(attrList, function (i, item) {
if (!isNull(item.attrDefinitionCustom)) { if (!isNull(item.attrDefinitionCustom)) {
......
...@@ -288,6 +288,7 @@ var catalogTreeUtil = { ...@@ -288,6 +288,7 @@ var catalogTreeUtil = {
var params = { var params = {
objectId: catalogTreeUtil.config.objectId, objectId: catalogTreeUtil.config.objectId,
objectKey: catalogTreeUtil.config.className, objectKey: catalogTreeUtil.config.className,
objectAppId: catalogTreeUtil.config.appId,
addOrUser: catalogTreeUtil.config.addOrUser addOrUser: catalogTreeUtil.config.addOrUser
}; };
AjaxPostUtil.request({url: reqBasePath + "queryCatalogForTree", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: reqBasePath + "queryCatalogForTree", params: params, type: 'json', method: "POST", callback: function(json) {
......
...@@ -148,9 +148,13 @@ var sysDictData = getAndWriteLocal('sysDictData'); ...@@ -148,9 +148,13 @@ var sysDictData = getAndWriteLocal('sysDictData');
var skyeyeClassEnum = getAndWriteLocal('skyeyeClassEnum'); var skyeyeClassEnum = getAndWriteLocal('skyeyeClassEnum');
function getSysServiceMationAppIdByClassName(className) { function getSysServiceMationAppIdByClassName(className) {
let appId = "";
$.each(sysServiceMation, function(key, value) { $.each(sysServiceMation, function(key, value) {
if (value.className == className) {
appId = value.appId;
}
}); });
return appId;
} }
function getAndWriteLocal(key) { function getAndWriteLocal(key) {
......
...@@ -78,5 +78,8 @@ ...@@ -78,5 +78,8 @@
"userInfo": {"name": "用户信息", "key": "com.skyeye.personnel.service.impl.SysEveUserServiceImpl"}, "userInfo": {"name": "用户信息", "key": "com.skyeye.personnel.service.impl.SysEveUserServiceImpl"},
"dictData": {"name": "数据字典", "key": "com.skyeye.eve.service.impl.SysDictDataServiceImpl"}, "dictData": {"name": "数据字典", "key": "com.skyeye.eve.service.impl.SysDictDataServiceImpl"},
"contacts": {"name": "联系人", "key": "com.skyeye.contacts.service.impl.ContactsServiceImpl"}, "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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册