diff --git a/src/main/java/cn/com/tenlion/systemtask/service/despicableconfigure/impl/DespicableConfigureServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/despicableconfigure/impl/DespicableConfigureServiceImpl.java index 48d2e86..2c3d956 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/despicableconfigure/impl/DespicableConfigureServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/despicableconfigure/impl/DespicableConfigureServiceImpl.java @@ -9,7 +9,7 @@ import cn.com.tenlion.systemtask.service.despicableconfigure.IDespicableConfigur import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.UpdateException; import ink.wgink.module.dictionary.pojo.dtos.DataDTO; -import ink.wgink.module.dictionary.service.IDataService; +import ink.wgink.mongo.module.dictionary.service.IMongoDataService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; @@ -35,7 +35,7 @@ public class DespicableConfigureServiceImpl extends DefaultBaseService implement @Autowired private IDespicableConfigureDao despicableConfigureDao; @Autowired - private IDataService dataService; + private IMongoDataService dataService; @Override public void save(DespicableConfigureVO despicableConfigureVO) { diff --git a/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java index 9349ca7..1f728a3 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/distribute/impl/DistributeServiceImpl.java @@ -37,10 +37,8 @@ import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import ink.wgink.module.dictionary.pojo.dtos.AreaDTO; -import ink.wgink.module.dictionary.pojo.dtos.DataDTO; -import ink.wgink.module.dictionary.service.IAreaService; -import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager; +import ink.wgink.mongo.module.dictionary.service.IMongoAreaService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; @@ -78,7 +76,7 @@ public class DistributeServiceImpl extends DefaultBaseService implements IDistri @Autowired private ITemplateService templateService; @Autowired - private IAreaService areaService; + private IMongoAreaService areaService; @Autowired private IRateService rateService; @Autowired diff --git a/src/main/resources/templates/business/list-importantevent.html b/src/main/resources/templates/business/list-importantevent.html index 5394c53..3910eb4 100644 --- a/src/main/resources/templates/business/list-importantevent.html +++ b/src/main/resources/templates/business/list-importantevent.html @@ -264,7 +264,7 @@ // 初始化事件分级ID选择 function initEventLevelIdSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['77b5f275-342b-403b-a737-759357fcae55']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['77b5f275-342b-403b-a737-759357fcae55']), {}, null, function(code, data, args) { laytpl(document.getElementById('eventLevelIdSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('eventLevelIdSelectTemplateBox').innerHTML = html; }); @@ -276,7 +276,7 @@ // 初始化事件类型ID选择 function initEventTypeIdSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['0cd4e948-db42-4745-9073-4e8232aa4b02']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['0cd4e948-db42-4745-9073-4e8232aa4b02']), {}, null, function(code, data, args) { laytpl(document.getElementById('eventTypeIdSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('eventTypeIdSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/business/list-user.html b/src/main/resources/templates/business/list-user.html index 13a7822..6eef275 100644 --- a/src/main/resources/templates/business/list-user.html +++ b/src/main/resources/templates/business/list-user.html @@ -161,7 +161,7 @@ ], page: false, parseData: function(data) { - if(typeof(selectedId) != 'undefined' && selectedId.length > 0) { + if(null != selectedId && typeof(selectedId) != 'undefined' && selectedId.length > 0) { var selectedIdArray = selectedId.split("_"); for(var i = 0, item; item = data[i++];) { for(var j = 0, jItem; jItem = selectedIdArray[j++];) { diff --git a/src/main/resources/templates/despicableconfigure/save.html b/src/main/resources/templates/despicableconfigure/save.html index 08eeb45..c5efbe1 100644 --- a/src/main/resources/templates/despicableconfigure/save.html +++ b/src/main/resources/templates/despicableconfigure/save.html @@ -155,7 +155,7 @@ // 初始化下派执行时间下拉选择 function initImplementTimeSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['3f2b991a-e4b3-430a-89b7-e19f0385b53e']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['3f2b991a-e4b3-430a-89b7-e19f0385b53e']), {}, null, function(code, data, args) { laytpl(document.getElementById('implementTimeSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('implementTimeSelectTemplateBox').innerHTML = html; }); @@ -167,7 +167,7 @@ // 初始化紧急程度下拉选择 function initUrgentlevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentlevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentlevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/despicableconfigure/update.html b/src/main/resources/templates/despicableconfigure/update.html index daa73d5..a0774fc 100644 --- a/src/main/resources/templates/despicableconfigure/update.html +++ b/src/main/resources/templates/despicableconfigure/update.html @@ -160,7 +160,7 @@ } function initImplementTimeSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['3f2b991a-e4b3-430a-89b7-e19f0385b53e']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['3f2b991a-e4b3-430a-89b7-e19f0385b53e']), {}, null, function(code, data, args) { laytpl(document.getElementById('implementTimeSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('implementTimeSelectTemplateBox').innerHTML = html; }); @@ -175,7 +175,7 @@ } function initUrgentlevelSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentlevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentlevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/charts.html b/src/main/resources/templates/distribute/charts.html index 0eddeba..5285a3b 100644 --- a/src/main/resources/templates/distribute/charts.html +++ b/src/main/resources/templates/distribute/charts.html @@ -93,7 +93,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/list-already-business.html b/src/main/resources/templates/distribute/list-already-business.html index bd3a815..4db9eda 100644 --- a/src/main/resources/templates/distribute/list-already-business.html +++ b/src/main/resources/templates/distribute/list-already-business.html @@ -199,7 +199,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/list-already.html b/src/main/resources/templates/distribute/list-already.html index 37c5e38..139ecb7 100644 --- a/src/main/resources/templates/distribute/list-already.html +++ b/src/main/resources/templates/distribute/list-already.html @@ -199,7 +199,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/list-business.html b/src/main/resources/templates/distribute/list-business.html index 83a2a26..a3e1f82 100644 --- a/src/main/resources/templates/distribute/list-business.html +++ b/src/main/resources/templates/distribute/list-business.html @@ -182,7 +182,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/list.html b/src/main/resources/templates/distribute/list.html index 39b3281..9e0b2a3 100644 --- a/src/main/resources/templates/distribute/list.html +++ b/src/main/resources/templates/distribute/list.html @@ -100,7 +100,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/distribute/save-business.html b/src/main/resources/templates/distribute/save-business.html index b24bd59..faa4ef1 100644 --- a/src/main/resources/templates/distribute/save-business.html +++ b/src/main/resources/templates/distribute/save-business.html @@ -243,7 +243,7 @@ -
+
@@ -461,7 +461,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); @@ -1282,7 +1282,7 @@ // 初始化任务一级地区下拉选择 function initTaskArea1NameSelect() { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/0', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/0', []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea1NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea1NameSelectTemplateBox').innerHTML = html; }); @@ -1306,7 +1306,7 @@ }); form.render('select', 'taskArea2NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea2NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea2NameSelectTemplateBox').innerHTML = html; }); @@ -1332,7 +1332,7 @@ }); form.render('select', 'taskArea3NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea3NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea3NameSelectTemplateBox').innerHTML = html; }); @@ -1358,7 +1358,7 @@ }); form.render('select', 'taskArea4NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea4NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea4NameSelectTemplateBox').innerHTML = html; }); @@ -1384,7 +1384,7 @@ }); form.render('select', 'taskArea5NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea5NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea5NameSelectTemplateBox').innerHTML = html; }); @@ -1418,7 +1418,7 @@ $('#area3Div').hide(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea2NameSelect(data.value); + initTaskArea2NameSelect(valueArr[0]); } $("#taskArea2Name").empty(); form.render("select"); @@ -1444,7 +1444,7 @@ $('#area3Div').show(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea3NameSelect(data.value); + initTaskArea3NameSelect(valueArr[0]); } $("#taskArea3Name").empty(); form.render("select"); @@ -1468,7 +1468,7 @@ } $('#area4Div').show(); $('#area5Div').hide(); - initTaskArea4NameSelect(data.value); + initTaskArea4NameSelect(valueArr[0]); } $("#taskArea4Name").empty(); form.render("select"); @@ -1490,7 +1490,7 @@ initMap(valueArr[2], valueArr[3]) } $('#area5Div').show(); - initTaskArea5NameSelect(data.value); + initTaskArea5NameSelect(valueArr[0]); } $("#taskArea5Name").empty(); form.render("select"); diff --git a/src/main/resources/templates/distribute/save.html b/src/main/resources/templates/distribute/save.html index bb02822..cb77741 100644 --- a/src/main/resources/templates/distribute/save.html +++ b/src/main/resources/templates/distribute/save.html @@ -191,7 +191,7 @@
-
+
@@ -299,7 +299,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); @@ -555,7 +555,6 @@ $('#reportCount').val(reportCount); $('#reportCount').attr('readonly', 'readonly'); taskRate = data.rateType; - alert(taskRate); }, function(code, data) { top.dialog.msg(data.msg); }, function() { @@ -599,7 +598,7 @@ // 初始化任务一级地区下拉选择 function initTaskArea1NameSelect() { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/0', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/0', []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea1NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea1NameSelectTemplateBox').innerHTML = html; }); @@ -623,7 +622,7 @@ }); form.render('select', 'taskArea2NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea2NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea2NameSelectTemplateBox').innerHTML = html; }); @@ -649,7 +648,7 @@ }); form.render('select', 'taskArea3NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea3NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea3NameSelectTemplateBox').innerHTML = html; }); @@ -675,7 +674,7 @@ }); form.render('select', 'taskArea4NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea4NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea4NameSelectTemplateBox').innerHTML = html; }); @@ -701,7 +700,7 @@ }); form.render('select', 'taskArea5NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + value, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + value, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea5NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea5NameSelectTemplateBox').innerHTML = html; }); @@ -735,7 +734,7 @@ $('#area3Div').hide(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea2NameSelect(data.value); + initTaskArea2NameSelect(valueArr[0]); } $("#taskArea2Name").empty(); form.render("select"); @@ -761,7 +760,7 @@ $('#area3Div').show(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea3NameSelect(data.value); + initTaskArea3NameSelect(valueArr[0]); } $("#taskArea3Name").empty(); form.render("select"); @@ -785,7 +784,7 @@ } $('#area4Div').show(); $('#area5Div').hide(); - initTaskArea4NameSelect(data.value); + initTaskArea4NameSelect(valueArr[0]); } $("#taskArea4Name").empty(); form.render("select"); @@ -807,7 +806,7 @@ initMap(valueArr[2], valueArr[3]) } $('#area5Div').show(); - initTaskArea5NameSelect(data.value); + initTaskArea5NameSelect(valueArr[0]); } $("#taskArea5Name").empty(); form.render("select"); diff --git a/src/main/resources/templates/distribute/update-business.html b/src/main/resources/templates/distribute/update-business.html index a982c8f..1b5b01c 100644 --- a/src/main/resources/templates/distribute/update-business.html +++ b/src/main/resources/templates/distribute/update-business.html @@ -243,7 +243,7 @@
-
+
@@ -468,7 +468,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); @@ -1364,7 +1364,7 @@ }); form.render('select', 'taskArea1NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/0', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/0', []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea1NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea1NameSelectTemplateBox').innerHTML = html; }); @@ -1394,7 +1394,7 @@ }); form.render('select', 'taskArea2NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea2NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea2NameSelectTemplateBox').innerHTML = html; }); @@ -1424,7 +1424,7 @@ }); form.render('select', 'taskArea3NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea3NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea3NameSelectTemplateBox').innerHTML = html; }); @@ -1454,7 +1454,7 @@ }); form.render('select', 'taskArea4NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea4NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea4NameSelectTemplateBox').innerHTML = html; }); @@ -1484,7 +1484,7 @@ }); form.render('select', 'taskArea5NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea5NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea5NameSelectTemplateBox').innerHTML = html; }); @@ -1522,7 +1522,7 @@ $('#area3Div').hide(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea2NameSelect(data.value, '', '非空'); + initTaskArea2NameSelect(valueArr[0], '', '非空'); } $("#taskArea2Name").empty(); form.render("select"); @@ -1548,7 +1548,7 @@ $('#area3Div').show(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea3NameSelect(data.value, '', '非空'); + initTaskArea3NameSelect(valueArr[0], '', '非空'); } $("#taskArea3Name").empty(); form.render("select"); @@ -1572,7 +1572,7 @@ } $('#area4Div').show(); $('#area5Div').hide(); - initTaskArea4NameSelect(data.value, '', '非空'); + initTaskArea4NameSelect(valueArr[0], '', '非空'); } $("#taskArea4Name").empty(); form.render("select"); @@ -1594,7 +1594,7 @@ initMap(valueArr[2], valueArr[3]) } $('#area5Div').show(); - initTaskArea5NameSelect(data.value, '', '非空'); + initTaskArea5NameSelect(valueArr[0], '', '非空'); } $("#taskArea5Name").empty(); form.render("select"); @@ -1747,10 +1747,10 @@ var area4Data = data['taskArea4Id'] + ',' + data['taskArea4Code'] + ',' + data['area4Lng'] + ',' + data['area4Lat'] + ',' + data['taskArea4Name']; var area5Data = data['taskArea5Id'] + ',' + data['taskArea5Code'] + ',' + data['area5Lng'] + ',' + data['area5Lat'] + ',' + data['taskArea5Name']; initTaskArea1NameSelect(area1Data, area1Data, area1Data); - initTaskArea2NameSelect(area1Data, area2Data, area2Data); - initTaskArea3NameSelect(area2Data, area3Data, area3Data); - initTaskArea4NameSelect(area3Data, area4Data, area4Data); - initTaskArea5NameSelect(area4Data, area5Data, area5Data); + initTaskArea2NameSelect(data['taskArea1Id'], area2Data, area2Data); + initTaskArea3NameSelect(data['taskArea2Id'], area3Data, area3Data); + initTaskArea4NameSelect(data['taskArea3Id'], area4Data, area4Data); + /*initTaskArea5NameSelect(area4Data, area5Data, area5Data);*/ showHide('area1', data['taskArea1Id']); showHide('area2', data['taskArea2Id']); showHide('area3', data['taskArea3Id']); diff --git a/src/main/resources/templates/distribute/update.html b/src/main/resources/templates/distribute/update.html index 170a30c..a50499a 100644 --- a/src/main/resources/templates/distribute/update.html +++ b/src/main/resources/templates/distribute/update.html @@ -191,7 +191,7 @@
-
+
@@ -302,7 +302,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; }); @@ -600,7 +600,7 @@ }); form.render('select', 'taskArea1NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/0', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/0', []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea1NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea1NameSelectTemplateBox').innerHTML = html; }); @@ -617,6 +617,9 @@ // 初始化任务二级地区下拉选择 function initTaskArea2NameSelect(selectValue, value, dataValue) { + console.log(selectValue) + console.log(value) + console.log(dataValue) if(!dataValue) { var data = [ { @@ -630,7 +633,7 @@ }); form.render('select', 'taskArea2NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea2NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea2NameSelectTemplateBox').innerHTML = html; }); @@ -660,7 +663,7 @@ }); form.render('select', 'taskArea3NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea3NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea3NameSelectTemplateBox').innerHTML = html; }); @@ -690,7 +693,7 @@ }); form.render('select', 'taskArea4NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea4NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea4NameSelectTemplateBox').innerHTML = html; }); @@ -720,7 +723,7 @@ }); form.render('select', 'taskArea5NameSelectTemplateBox'); }else { - top.restAjax.get(top.restAjax.path('api/area/listbyparentid/' + selectValue, []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/area/list-all/parent-id/' + selectValue, []), {}, null, function(code, data, args) { laytpl(document.getElementById('taskArea5NameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('taskArea5NameSelectTemplateBox').innerHTML = html; }); @@ -758,7 +761,7 @@ $('#area3Div').hide(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea2NameSelect(data.value, '', '非空'); + initTaskArea2NameSelect(valueArr[0], '', '非空'); } $("#taskArea2Name").empty(); form.render("select"); @@ -784,7 +787,7 @@ $('#area3Div').show(); $('#area4Div').hide(); $('#area5Div').hide(); - initTaskArea3NameSelect(data.value, '', '非空'); + initTaskArea3NameSelect(valueArr[0], '', '非空'); } $("#taskArea3Name").empty(); form.render("select"); @@ -808,7 +811,7 @@ } $('#area4Div').show(); $('#area5Div').hide(); - initTaskArea4NameSelect(data.value, '', '非空'); + initTaskArea4NameSelect(valueArr[0], '', '非空'); } $("#taskArea4Name").empty(); form.render("select"); @@ -830,7 +833,7 @@ initMap(valueArr[2], valueArr[3]) } $('#area5Div').show(); - initTaskArea5NameSelect(data.value, '', '非空'); + initTaskArea5NameSelect(valueArr[0], '', '非空'); } $("#taskArea5Name").empty(); form.render("select"); @@ -959,10 +962,10 @@ var area4Data = data['taskArea4Id'] + ',' + data['taskArea4Code'] + ',' + data['area4Lng'] + ',' + data['area4Lat'] + ',' + data['taskArea4Name']; var area5Data = data['taskArea5Id'] + ',' + data['taskArea5Code'] + ',' + data['area5Lng'] + ',' + data['area5Lat'] + ',' + data['taskArea5Name']; initTaskArea1NameSelect(area1Data, area1Data, area1Data); - initTaskArea2NameSelect(area1Data, area2Data, area2Data); - initTaskArea3NameSelect(area2Data, area3Data, area3Data); - initTaskArea4NameSelect(area3Data, area4Data, area4Data); - initTaskArea5NameSelect(area4Data, area5Data, area5Data); + initTaskArea2NameSelect(data['taskArea1Id'], area2Data, area2Data); + initTaskArea3NameSelect(data['taskArea2Id'], area3Data, area3Data); + initTaskArea4NameSelect(data['taskArea3Id'], area4Data, area4Data); + /*initTaskArea5NameSelect(area4Data, area5Data, area5Data);*/ showHide('area1', data['taskArea1Id']); showHide('area2', data['taskArea2Id']); showHide('area3', data['taskArea3Id']); diff --git a/src/main/resources/templates/receiveruser/list.html b/src/main/resources/templates/receiveruser/list.html index d7fa3a2..cc858fe 100644 --- a/src/main/resources/templates/receiveruser/list.html +++ b/src/main/resources/templates/receiveruser/list.html @@ -258,7 +258,7 @@ // 初始化任务紧急程度下拉选择 function initUrgentLevelSelect() { - top.restAjax.get(top.restAjax.path('api/data/listbyparentid/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('api/mongo/data/list-all/parent-id/{dataParentId}', ['203f7283-74a6-4f05-9d5f-c6675b3a69fc']), {}, null, function(code, data, args) { laytpl(document.getElementById('urgentLevelSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('urgentLevelSelectTemplateBox').innerHTML = html; });