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

feat: 代码修改

上级 4f87cfbb
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', {});
......
......@@ -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()),
......
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(),
......
......@@ -25,7 +25,7 @@ layui.config({
catalogTreeUtil.init({
boxId: 'catalogBox',
className: objectKey,
appId:
appId: getSysServiceMationAppIdByClassName(objectKey),
objectId: objectId,
addOrUser: false,
checkAuth: true,
......
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'],
......
......@@ -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(`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/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);
......
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(),
......
......@@ -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', {});
......
......@@ -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'],
......
......@@ -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) {
......
......@@ -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', {});
......
......@@ -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)) {
......
......@@ -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']);
......
......@@ -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)) {
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册