From d78f88c04bcfce3d8bb75fbfef6e090055bc6c28 Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Fri, 27 Aug 2021 18:07:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../route/enterprise/get-enterprise.html | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/resources/static/route/enterprise/get-enterprise.html b/src/main/resources/static/route/enterprise/get-enterprise.html index 2017344..6ace207 100644 --- a/src/main/resources/static/route/enterprise/get-enterprise.html +++ b/src/main/resources/static/route/enterprise/get-enterprise.html @@ -320,6 +320,7 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var enterpriseId = top.restAjax.params(window.location.href).enterpriseId; + var baseUrl = "/inspection/" var viewerObj = {}; @@ -375,7 +376,7 @@ // 初始化企业分类下拉选择 function initClassifySelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/27694872-7295-4b41-aaa0-297fc6dbac3e', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/27694872-7295-4b41-aaa0-297fc6dbac3e', [baseUrl]), {}, null, function(code, data, args) { laytpl(document.getElementById('classifySelectTemplate').innerHTML).render(data, function(html) { document.getElementById('classifySelectTemplateBox').innerHTML = html; }); @@ -391,7 +392,7 @@ // 初始化场所性质下拉选择 function initNatureSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', [baseUrl]), {}, null, function(code, data, args) { laytpl(document.getElementById('natureSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('natureSelectTemplateBox').innerHTML = html; }); @@ -407,7 +408,7 @@ // 初始化类型下拉选择 function initTypeSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', [baseUrl]), {}, null, function(code, data, args) { laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('typeSelectTemplateBox').innerHTML = html; }); @@ -423,7 +424,7 @@ // 初始化管理行业下拉选择 function initIndustryTypeSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', [baseUrl]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('industryTypeSelectTemplate', 'industryTypeSelectTemplateBox', data, function() { var selectObj = {}; selectObj['industryType'] = selectValue; @@ -444,7 +445,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{industryType}', [industryType]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/{industryType}', [baseUrl,industryType]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('industrySelectTemplate', 'industrySelectTemplateBox', data, function() { var selectObj = {}; selectObj['industry'] = selectValue; @@ -457,7 +458,7 @@ // 初始化风险作业下拉选择 function initRiskOperationSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/77128e8e-3e09-45b5-a48e-7a50d1b7cc32', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/77128e8e-3e09-45b5-a48e-7a50d1b7cc32', [baseUrl]), {}, null, function(code, data, args) { laytpl(document.getElementById('riskOperationSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('riskOperationSelectTemplateBox').innerHTML = html; }); @@ -491,7 +492,7 @@ // 初始化1级区域下拉选择 function initArea1Select(selectValue) { - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', []), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', [baseUrl]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area1'] = selectValue; @@ -512,7 +513,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area1}', [area1]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/{area1}', [baseUrl,area1]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area2'] = selectValue; @@ -533,7 +534,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area2}', [area2]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{baseUrl}api/datadictionary/listdictionarybyparentid/{area2}', [baseUrl,area2]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area3'] = selectValue; @@ -554,7 +555,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area3}', [area3]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/{area3}', [baseUrl,area3]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area4'] = selectValue; @@ -575,7 +576,7 @@ }); return; } - top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area4}', [area4]), {}, null, function(code, data, args) { + top.restAjax.get(top.restAjax.path('{basePath}api/datadictionary/listdictionarybyparentid/{area4}', [baseUrl,area4]), {}, null, function(code, data, args) { initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data, function() { var selectObj = {}; selectObj['area5'] = selectValue; @@ -590,7 +591,7 @@ // 初始化内容 function initData() { var loadLayerIndex; - top.restAjax.get(top.restAjax.path('api/enterprise/getenterprisesinglebyid/{enterpriseId}', [enterpriseId]), {}, null, function(code, data) { + top.restAjax.get(top.restAjax.path('{basePath}api/enterprise/getenterprisesinglebyid/{enterpriseId}', [baseUrl,enterpriseId]), {}, null, function(code, data) { var dataFormData = {}; for(var i in data) { dataFormData[i] = data[i] +'';