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

feat: 解决组织树加载保存报错的问题

上级 7e1ac4d8
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button> <button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1714142882792"><i class="fa fa-plus" aria-hidden="true"></i>公文起草</button> <button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1714142882792"><i class="fa fa-plus" aria-hidden="true"></i>公文收文</button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div style="margin:auto 10px;">
......
...@@ -11,8 +11,11 @@ var organizationUtil = { ...@@ -11,8 +11,11 @@ var organizationUtil = {
// 岗位定级树 // 岗位定级树
jobScoreTree: null, jobScoreTree: null,
dtree: null,
// 初始化新增页面的组织机构 // 初始化新增页面的组织机构
initAddOrganization: function (dtree) { initAddOrganization: function (dtree) {
organizationUtil.dtree = dtree;
// 初始化公司 // 初始化公司
organizationUtil.companyTree = dtree.render({ organizationUtil.companyTree = dtree.render({
elem: "#demoTree1", elem: "#demoTree1",
...@@ -74,6 +77,7 @@ var organizationUtil = { ...@@ -74,6 +77,7 @@ var organizationUtil = {
// 初始化编辑页面的组织机构 // 初始化编辑页面的组织机构
initEditOrganization: function (dtree, mation) { initEditOrganization: function (dtree, mation) {
organizationUtil.dtree = dtree;
// 初始化公司 // 初始化公司
organizationUtil.companyTree = dtree.render({ organizationUtil.companyTree = dtree.render({
elem: "#demoTree1", elem: "#demoTree1",
...@@ -157,28 +161,36 @@ var organizationUtil = { ...@@ -157,28 +161,36 @@ var organizationUtil = {
* 获取企业信息 * 获取企业信息
*/ */
getCompanyMation: function (dtree) { getCompanyMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.companyTree)); return organizationUtil.judgeNullRetuenObject(organizationUtil.getTreeObject(dtree).getNowParam(organizationUtil.companyTree));
}, },
/** /**
* 获取部门信息 * 获取部门信息
*/ */
getDepartmentMation: function (dtree) { getDepartmentMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.departmentTree)); return organizationUtil.judgeNullRetuenObject(organizationUtil.getTreeObject(dtree).getNowParam(organizationUtil.departmentTree));
}, },
/** /**
* 获取岗位信息 * 获取岗位信息
*/ */
getJobMation: function (dtree) { getJobMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.jobTree)); return organizationUtil.judgeNullRetuenObject(organizationUtil.getTreeObject(dtree).getNowParam(organizationUtil.jobTree));
}, },
/** /**
* 获取岗位定级信息 * 获取岗位定级信息
*/ */
getJobScoreMation: function (dtree) { getJobScoreMation: function (dtree) {
return organizationUtil.judgeNullRetuenObject(dtree.getNowParam(organizationUtil.jobScoreTree)); return organizationUtil.judgeNullRetuenObject(organizationUtil.getTreeObject(dtree).getNowParam(organizationUtil.jobScoreTree));
},
getTreeObject: function (dtree) {
if (isNull(dtree)) {
return organizationUtil.dtree
} else {
return dtree
}
}, },
judgeNullRetuenObject: function (object) { judgeNullRetuenObject: function (object) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册