新增企业定位
This commit is contained in:
parent
96d34bfa4f
commit
a6d0709260
629
src/main/resources/static/route/enterprise/get-enterprise.html
Normal file
629
src/main/resources/static/route/enterprise/get-enterprise.html
Normal file
@ -0,0 +1,629 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<base href="/inspection/">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/js/vendor/viewer/viewer.min.css">
|
||||||
|
<style>
|
||||||
|
.layui-select-disabled .layui-disabled {color: rgb(84, 84, 84) !important;}
|
||||||
|
.layui-radio-disbaled>i {color: rgb(84, 84, 84) !important;}
|
||||||
|
.layui-disabled, .layui-disabled:hover {color: rgb(84, 84, 84) !important;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">名称</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">类型</label>
|
||||||
|
<div class="layui-input-block layui-form" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
||||||
|
<script id="typeSelectTemplate" type="text/html">
|
||||||
|
<select id="type" name="type" disabled>
|
||||||
|
<option value="">暂无类型</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">所属分类</label>
|
||||||
|
<div class="layui-input-block layui-form" id="classifySelectTemplateBox" lay-filter="classifySelectTemplateBox"></div>
|
||||||
|
<script id="classifySelectTemplate" type="text/html" disabled>
|
||||||
|
<select id="classify" name="classify">
|
||||||
|
<option value="">暂无所属分类</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">1级区域</label>
|
||||||
|
<div class="layui-input-block layui-form" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div>
|
||||||
|
<script id="area1SelectTemplate" type="text/html">
|
||||||
|
<select id="area1" name="area1" lay-filter="area1" disabled>
|
||||||
|
<option value="">暂无1级区域</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">2级区域</label>
|
||||||
|
<div class="layui-input-block layui-form" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
|
||||||
|
<script id="area2SelectTemplate" type="text/html">
|
||||||
|
<select id="area2" name="area2" lay-filter="area2" disabled>
|
||||||
|
<option value="">暂无2级区域</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">3级区域</label>
|
||||||
|
<div class="layui-input-block layui-form" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
|
||||||
|
<script id="area3SelectTemplate" type="text/html">
|
||||||
|
<select id="area3" name="area3" lay-filter="area3" disabled>
|
||||||
|
<option value="">暂无3级区域</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">4级区域</label>
|
||||||
|
<div class="layui-input-block layui-form" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
|
||||||
|
<script id="area4SelectTemplate" type="text/html">
|
||||||
|
<select id="area4" name="area4" lay-filter="area4" disabled>
|
||||||
|
<option value="">暂无4级区域</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">5级区域</label>
|
||||||
|
<div class="layui-input-block layui-form" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
|
||||||
|
<script id="area5SelectTemplate" type="text/html">
|
||||||
|
<select id="area5" name="area5" lay-filter="area5" disabled>
|
||||||
|
<option value="">暂无5级区域</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item" pane>
|
||||||
|
<label class="layui-form-label">是否注销</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="radio" name="isLogOff" value="0" title="否" disabled>
|
||||||
|
<input type="radio" name="isLogOff" value="1" title="是" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">详细地址</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">行业类型</label>
|
||||||
|
<div class="layui-input-block layui-form" id="industryTypeSelectTemplateBox" lay-filter="industryTypeSelectTemplateBox"></div>
|
||||||
|
<script id="industryTypeSelectTemplate" type="text/html">
|
||||||
|
<select id="industryType" name="industryType" lay-filter="industryType" disabled>
|
||||||
|
<option value="">暂无行业类型</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">管理行业</label>
|
||||||
|
<div class="layui-input-block layui-form" id="industrySelectTemplateBox" lay-filter="industrySelectTemplateBox"></div>
|
||||||
|
<script id="industrySelectTemplate" type="text/html">
|
||||||
|
<select id="industry" name="industry" disabled>
|
||||||
|
<option value="">暂无管理行业</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">场所性质</label>
|
||||||
|
<div class="layui-input-block layui-form" id="natureSelectTemplateBox" lay-filter="natureSelectTemplateBox"></div>
|
||||||
|
<script id="natureSelectTemplate" type="text/html">
|
||||||
|
<select id="nature" name="nature" disabled>
|
||||||
|
<option value="">暂无场所性质</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">从业人数</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="number" id="engagedCount" name="engagedCount" class="layui-input" value="1" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">风险作业</label>
|
||||||
|
<div class="layui-input-block layui-form" id="riskOperationSelectTemplateBox" lay-filter="riskOperationSelectTemplateBox"></div>
|
||||||
|
<script id="riskOperationSelectTemplate" type="text/html">
|
||||||
|
<select id="riskOperation" name="riskOperation" disabled>
|
||||||
|
<option value="">暂无风险作业</option>
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||||
|
{{# } }}
|
||||||
|
</select>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">组织机构码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="bussinessRegNum" name="bussinessRegNum" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">法人</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="legalPerson" name="legalPerson" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">负责人</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="master" name="master" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">联系电话</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="-" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">营业范围</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea id="summary" name="summary" class="layui-textarea" disabled placeholder="-"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">厂区大门</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="hidden" id="factoryGate" name="factoryGate">
|
||||||
|
<div class="layui-btn-container" id="factoryGateFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||||
|
<script id="factoryGateFileDownload" type="text/html">
|
||||||
|
{{# var fileName = 'factoryGate'; }}
|
||||||
|
{{# if(d[fileName].length > 0) { }}
|
||||||
|
{{# var files = d[fileName];}}
|
||||||
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||||
|
<div class="upload-image-box">
|
||||||
|
<span class="upload-image-span">
|
||||||
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">作业场所</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="hidden" id="workplace" name="workplace">
|
||||||
|
<div class="layui-btn-container" id="workplaceFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||||
|
<script id="workplaceFileDownload" type="text/html">
|
||||||
|
{{# var fileName = 'workplace'; }}
|
||||||
|
{{# if(d[fileName].length > 0) { }}
|
||||||
|
{{# var files = d[fileName];}}
|
||||||
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||||
|
<div class="upload-image-box">
|
||||||
|
<span class="upload-image-span">
|
||||||
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{# } }}
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-layout-admin">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer" style="left: 0;">
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index' //主入口模块
|
||||||
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||||
|
var $ = layui.$;
|
||||||
|
var form = layui.form;
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var enterpriseId = top.restAjax.params(window.location.href).enterpriseId;
|
||||||
|
|
||||||
|
var viewerObj = {};
|
||||||
|
|
||||||
|
function closeBox() {
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
function refreshDownloadTemplet(fileName, file) {
|
||||||
|
var dataRander = {};
|
||||||
|
dataRander[fileName] = file;
|
||||||
|
|
||||||
|
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||||
|
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化文件列表
|
||||||
|
function initFileList(fileName, ids, callback) {
|
||||||
|
var dataForm = {};
|
||||||
|
dataForm[fileName] = ids;
|
||||||
|
form.val('dataForm', dataForm);
|
||||||
|
|
||||||
|
if(!ids) {
|
||||||
|
refreshDownloadTemplet(fileName, []);
|
||||||
|
if(callback) {
|
||||||
|
callback(fileName, []);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
top.restAjax.get(top.restAjax.path('api/file/listfilebyfileid', []), {
|
||||||
|
ids: ids
|
||||||
|
}, null, function(code, data) {
|
||||||
|
refreshDownloadTemplet(fileName, data);
|
||||||
|
if(callback) {
|
||||||
|
callback(fileName, data);
|
||||||
|
}
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化选择框、单选、复选模板
|
||||||
|
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
||||||
|
laytpl(document.getElementById(templateId).innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById(templateBoxId).innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', templateBoxId);
|
||||||
|
if(callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化企业分类下拉选择
|
||||||
|
function initClassifySelect(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/27694872-7295-4b41-aaa0-297fc6dbac3e', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('classifySelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('classifySelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'classifySelectTemplateBox');
|
||||||
|
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['classify'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化场所性质下拉选择
|
||||||
|
function initNatureSelect(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('natureSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('natureSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'natureSelectTemplateBox');
|
||||||
|
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['nature'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化类型下拉选择
|
||||||
|
function initTypeSelect(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('typeSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'typeSelectTemplateBox');
|
||||||
|
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['type'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化管理行业下拉选择
|
||||||
|
function initIndustryTypeSelect(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('industryTypeSelectTemplate', 'industryTypeSelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['industryType'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化管理行业下拉选择
|
||||||
|
function initIndustrySelect(industryType, selectValue) {
|
||||||
|
if(!industryType) {
|
||||||
|
initSelectRadioCheckboxTemplate('industrySelectTemplate', 'industrySelectTemplateBox', [], function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['industry'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{industryType}', [industryType]), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('industrySelectTemplate', 'industrySelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['industry'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化风险作业下拉选择
|
||||||
|
function initRiskOperationSelect(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/77128e8e-3e09-45b5-a48e-7a50d1b7cc32', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('riskOperationSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('riskOperationSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('select', 'riskOperationSelectTemplateBox');
|
||||||
|
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['riskOperation'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化厂区大门图片上传
|
||||||
|
function initFactoryGateUploadFile() {
|
||||||
|
var files = $('#factoryGate').val();
|
||||||
|
initFileList('factoryGate', files, function(fileName) {
|
||||||
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||||
|
viewerObj[fileName] = viewer;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化作业场所图片上传
|
||||||
|
function initWorkplaceUploadFile() {
|
||||||
|
var files = $('#workplace').val();
|
||||||
|
initFileList('workplace', files, function(fileName) {
|
||||||
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||||
|
viewerObj[fileName] = viewer;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化1级区域下拉选择
|
||||||
|
function initArea1Select(selectValue) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', []), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area1'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化2级区域下拉选择
|
||||||
|
function initArea2Select(area1, selectValue) {
|
||||||
|
if(!area1) {
|
||||||
|
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', [], function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area2'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area1}', [area1]), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area2'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化3级区域下拉选择
|
||||||
|
function initArea3Select(area2, selectValue) {
|
||||||
|
if(!area2) {
|
||||||
|
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', [], function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area3'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area2}', [area2]), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area3'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化4级区域下拉选择
|
||||||
|
function initArea4Select(area3, selectValue) {
|
||||||
|
if(!area3) {
|
||||||
|
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', [], function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area4'] = '';
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area3}', [area3]), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area4'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化5级区域下拉选择
|
||||||
|
function initArea5Select(area4, selectValue) {
|
||||||
|
if(!area4) {
|
||||||
|
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', [], function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area5'] = '';
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area4}', [area4]), {}, null, function(code, data, args) {
|
||||||
|
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data, function() {
|
||||||
|
var selectObj = {};
|
||||||
|
selectObj['area5'] = selectValue;
|
||||||
|
form.val('dataForm', selectObj);
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 初始化内容
|
||||||
|
function initData() {
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/enterprise/getenterprisesinglebyid/{enterpriseId}', [enterpriseId]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = {};
|
||||||
|
for(var i in data) {
|
||||||
|
dataFormData[i] = data[i] +'';
|
||||||
|
}
|
||||||
|
form.val('dataForm', dataFormData);
|
||||||
|
form.render(null, 'dataForm');
|
||||||
|
initClassifySelect(data['classify']);
|
||||||
|
initTypeSelect(data['type']);
|
||||||
|
initIndustryTypeSelect(data['industryType']);
|
||||||
|
initIndustrySelect(data['industryType'], data['industry']);
|
||||||
|
initRiskOperationSelect(data['riskOperation']);
|
||||||
|
initNatureSelect(data['nature']);
|
||||||
|
initFactoryGateUploadFile();
|
||||||
|
initWorkplaceUploadFile();
|
||||||
|
|
||||||
|
initArea1Select(data['area1']);
|
||||||
|
initArea2Select(data['area1'], data['area2'], function() {});
|
||||||
|
initArea3Select(data['area2'], data['area3'], function() {});
|
||||||
|
initArea4Select(data['area3'], data['area4'], function() {});
|
||||||
|
initArea5Select(data['area4'], data['area5']);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
|
||||||
|
$('.close').on('click', function() {
|
||||||
|
closeBox();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -42,8 +42,15 @@
|
|||||||
// 默认包头市安监局
|
// 默认包头市安监局
|
||||||
var point = new BMap.Point('109.850206', '40.66852');
|
var point = new BMap.Point('109.850206', '40.66852');
|
||||||
map.centerAndZoom(point, 15);
|
map.centerAndZoom(point, 15);
|
||||||
var marker = new BMap.Marker(point);
|
var vectorMarker = new BMap.Marker(point, {
|
||||||
map.addOverlay(marker);
|
// 指定Marker的icon属性为Symbol
|
||||||
|
icon: new BMap.Symbol(BMap_Symbol_SHAPE_POINT, {
|
||||||
|
scale: 1,
|
||||||
|
fillColor: "orange",
|
||||||
|
fillOpacity: 0.8
|
||||||
|
})
|
||||||
|
});
|
||||||
|
map.addOverlay(vectorMarker);
|
||||||
// 计算中心点
|
// 计算中心点
|
||||||
function getCenterPoint(path) {
|
function getCenterPoint(path) {
|
||||||
var x = 0.0;
|
var x = 0.0;
|
||||||
@ -62,7 +69,21 @@
|
|||||||
for(var i = 0, item; item = pointArray[i++];) {
|
for(var i = 0, item; item = pointArray[i++];) {
|
||||||
// 打点
|
// 打点
|
||||||
var markPoint = new BMap.Point(item.lng, item.lat);
|
var markPoint = new BMap.Point(item.lng, item.lat);
|
||||||
map.addOverlay(marker);
|
var markerPoint = new BMap.Marker(markPoint);
|
||||||
|
markerPoint.enterpriseId = item.enterpriseId;
|
||||||
|
markerPoint.addEventListener('click', function(e) {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
area: ['100%', '100%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/enterprise/get-enterprise.html?enterpriseId={enterpriseId}', [this.enterpriseId]),
|
||||||
|
end: function() {}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
map.addOverlay(markerPoint);
|
||||||
// 计算距离
|
// 计算距离
|
||||||
var distance = map.getDistance(centerPoint, markPoint);
|
var distance = map.getDistance(centerPoint, markPoint);
|
||||||
if(distance > maxDistance) {
|
if(distance > maxDistance) {
|
||||||
@ -87,12 +108,12 @@
|
|||||||
if(pointArray.length > 0) {
|
if(pointArray.length > 0) {
|
||||||
// 获取中心点
|
// 获取中心点
|
||||||
var centerPoint = getCenterPoint(pointArray);
|
var centerPoint = getCenterPoint(pointArray);
|
||||||
map.centerAndZoom(centerPoint, 15);
|
map.centerAndZoom(centerPoint, 16);
|
||||||
// 找出最大半径
|
// 找出最大半径
|
||||||
var maxDistance = getMaxDistance(centerPoint, pointArray);
|
var maxDistance = getMaxDistance(centerPoint, pointArray);
|
||||||
// 画圆
|
// 画圆
|
||||||
if(maxDistance > 0) {
|
if(maxDistance > 0) {
|
||||||
var circle = new BMap.Circle(point, maxDistance,{strokeColor:'blue', strokeWeight:2, strokeOpacity:0.5});
|
var circle = new BMap.Circle(centerPoint, maxDistance, {strokeColor: 'blue', strokeWeight: 2, strokeOpacity: 0.5});
|
||||||
map.addOverlay(circle);
|
map.addOverlay(circle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user