基础功能完成
This commit is contained in:
parent
3e2efe1695
commit
39b40be8c4
@ -18,6 +18,13 @@
|
||||
<artifactId>interface-institution-management</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ink.wgink</groupId>
|
||||
<artifactId>module-dictionary</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
@ -317,7 +317,7 @@
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
t1.institution_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
@ -335,6 +335,7 @@
|
||||
#{institutionIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 机构管理列表 -->
|
||||
@ -367,7 +368,7 @@
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
t1.institution_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
@ -385,6 +386,7 @@
|
||||
#{institutionIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 机构管理列表 -->
|
||||
@ -417,7 +419,7 @@
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
t1.institution_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
@ -435,6 +437,7 @@
|
||||
#{institutionIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY t1.gmt_create DESC
|
||||
</select>
|
||||
|
||||
<!-- 机构管理统计 -->
|
||||
|
@ -9,6 +9,7 @@
|
||||
<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" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -86,6 +87,26 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'institutionImage', width: 180, title: '机构图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var value='<ul id="viewer">';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
value += '<li><img style="height: 80px;width: 80px;" src="route/file/download/false/'+ item +'" alt="图片1"></li>';
|
||||
}
|
||||
value += '</ul>';
|
||||
setTimeout(function() {
|
||||
new Viewer(document.getElementById("viewer"),{
|
||||
loop:true
|
||||
});
|
||||
}, 50);
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{field: 'institutionName', width: 180, title: '机构名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -104,24 +125,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionImage', width: 180, title: '机构图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var downloadFile = '';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
if(downloadFile.length > 0) {
|
||||
downloadFile += ' | ';
|
||||
}
|
||||
downloadFile += '<a href="route/file/download/false/'+ item +'" target="_blank">点击下载</a>'
|
||||
}
|
||||
return downloadFile;
|
||||
}
|
||||
},
|
||||
{field: 'institutionAddress', width: 180, title: '机构详情地址', align:'center',
|
||||
{field: 'institutionAddress', width: 350, title: '机构详情地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -157,69 +161,6 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionRegionProvince', width: 180, title: '行政区划-省', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionRegionCity', width: 180, title: '行政区化-市', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionRegionArea', width: 180, title: '行政区化-区', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionRegionVillage', width: 180, title: '行政区化-村', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'institutionRegionStreet', width: 180, title: '行政区化-街', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'creator', width: 180, title: '', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
|
@ -12,10 +12,16 @@
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.layui-form-label{
|
||||
width:120px;
|
||||
width:120px !important;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left:120px;
|
||||
margin-left:120px !important;
|
||||
}
|
||||
.layui-form-text .layui-input-block{
|
||||
margin: 0 !important;
|
||||
}
|
||||
.layui-form-text .layui-form-label{
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@ -72,14 +78,6 @@
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构详情地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="institutionX" name="institutionX" value="" placeholder="请输入机构经度">
|
||||
<input type="hidden" id="institutionY" name="institutionY" value="" placeholder="请输入机构纬度">
|
||||
<input type="text" id="institutionAddress" name="institutionAddress" class="layui-input" value="" placeholder="请输入机构详情地址" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构成立时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -101,31 +99,44 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区划</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionProvince" id="institutionRegionProvince" placeholder="请选择省" lay-verify="">
|
||||
<select name="institutionRegionProvince" id="institutionRegionProvince" lay-filter="institutionRegionProvince">
|
||||
<option value="">请选择省</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionCity" id="institutionRegionCity" placeholder="请选择市" lay-verify="">
|
||||
<select name="institutionRegionCity" id="institutionRegionCity" lay-filter="institutionRegionCity">
|
||||
<option value="">请选择市</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionArea" id="institutionRegionArea" placeholder="请选择区" lay-verify="">
|
||||
<select name="institutionRegionArea" id="institutionRegionArea" lay-filter="institutionRegionArea">
|
||||
<option value="">请选择区</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionVillage" id="institutionRegionVillage" placeholder="请选择镇" lay-verify="">
|
||||
<option value="">请选择镇/村</option>
|
||||
<select name="institutionRegionVillage" id="institutionRegionVillage" lay-filter="institutionRegionVillage">
|
||||
<option value="">请选择镇</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionStreet" id="institutionRegionStreet" placeholder="请选择街" lay-verify="">
|
||||
<select name="institutionRegionStreet" id="institutionRegionStreet" lay-filter="institutionRegionStreet">
|
||||
<option value="">请选择街</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="institutionX" name="institutionX" value="" placeholder="请输入机构经度">
|
||||
<input type="hidden" id="institutionY" name="institutionY" value="" placeholder="请输入机构纬度">
|
||||
<input type="text" id="institutionAddress" name="institutionAddress" class="layui-input" value="" placeholder="请输入机构地址" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
|
||||
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
@ -138,6 +149,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
@ -155,6 +167,7 @@
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
var dictId = 'cce46439-d5de-4687-8a9b-cb22817daad5';
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
@ -276,6 +289,8 @@
|
||||
function initData() {
|
||||
initInstitutionImageUploadFile();
|
||||
initInstitutionFoundingTimeDateTime();
|
||||
initMap('109.85017859252311', '40.66017700460503');
|
||||
initDataDict(dictId,'institutionRegionProvince');
|
||||
}
|
||||
initData();
|
||||
|
||||
@ -312,21 +327,87 @@
|
||||
closeBox();
|
||||
});
|
||||
|
||||
|
||||
$("#institutionAddress").on('click',function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['50%', '50%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/institution/baidumap', []),
|
||||
end: function() {
|
||||
|
||||
}
|
||||
//初始化百度地图
|
||||
function initMap(longitude, latitude) {
|
||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||
var point = new BMap.Point(longitude, latitude);
|
||||
map.centerAndZoom(point, 13);
|
||||
map.disableDoubleClickZoom();
|
||||
map.addControl(new BMap.NavigationControl());
|
||||
map.addControl(new BMap.ScaleControl());
|
||||
map.addControl(new BMap.OverviewMapControl());
|
||||
map.addControl(new BMap.MapTypeControl());
|
||||
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
|
||||
map.enableContinuousZoom();//开启缩放平滑
|
||||
// 点击获取地址
|
||||
var geocoder= new BMap.Geocoder();
|
||||
mapMarkPoint(map, point);
|
||||
map.addEventListener("click", function(e) {
|
||||
map.clearOverlays();
|
||||
$('#institutionX').val(e.point.lng);
|
||||
$('#institutionY').val(e.point.lat);
|
||||
point = new BMap.Point(e.point.lng, e.point.lat);
|
||||
mapMarkPoint(map, point);
|
||||
geocoder.getLocation(e.point, function(rs) {
|
||||
$('#institutionAddress').val(rs.address);
|
||||
});
|
||||
});
|
||||
}
|
||||
//地图标点
|
||||
function mapMarkPoint(map, point) {
|
||||
var marker = new BMap.Marker(point);
|
||||
map.addOverlay(marker);
|
||||
}
|
||||
|
||||
//c初始化数据字典
|
||||
function initDataDict(dictId,tabId){
|
||||
top.restAjax.get(top.restAjax.path("api/data/listbyparentid/{dataParentId}",[dictId]),{},null,function (code,data,args) {
|
||||
$("#"+tabId).empty();
|
||||
var html = '';
|
||||
if ('institutionRegionProvince' === tabId){
|
||||
html += '<option value="">请选择省</option>';
|
||||
}
|
||||
if ('institutionRegionCity' === tabId){
|
||||
html += '<option value="">请选择市</option>';
|
||||
}
|
||||
if ('institutionRegionArea' === tabId){
|
||||
html += '<option value="">请选择区</option>';
|
||||
}
|
||||
if ('institutionRegionVillage' === tabId){
|
||||
html += '<option value="">请选择镇/村</option>';
|
||||
}
|
||||
if ('institutionRegionStreet' === tabId){
|
||||
html += '<option value="">请选择街</option>';
|
||||
}
|
||||
|
||||
$.each(data, function (index, item) {
|
||||
html += '<option value="'+item.dataId+'">'+item.dataName+'</option>';
|
||||
});
|
||||
$("#"+tabId).append(html);
|
||||
form.render('select');
|
||||
});
|
||||
}
|
||||
|
||||
//省监听事件
|
||||
form.on('select(institutionRegionProvince)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionCity');
|
||||
});
|
||||
//市监听事件
|
||||
form.on('select(institutionRegionCity)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionArea');
|
||||
});
|
||||
//区监听事件
|
||||
form.on('select(institutionRegionArea)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionVillage');
|
||||
});
|
||||
//镇、村监听事件
|
||||
form.on('select(institutionRegionVillage)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionStreet');
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
|
@ -10,6 +10,20 @@
|
||||
<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" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.layui-form-label{
|
||||
width:120px !important;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left:120px !important;
|
||||
}
|
||||
.layui-form-text .layui-input-block{
|
||||
margin: 0 !important;
|
||||
}
|
||||
.layui-form-text .layui-form-label{
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -64,24 +78,6 @@
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">机构详情地址</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="institutionAddress" name="institutionAddress" class="layui-textarea" placeholder="请输入机构详情地址"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构经度</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionX" name="institutionX" class="layui-input" value="" placeholder="请输入机构经度" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构纬度</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionY" name="institutionY" class="layui-input" value="" placeholder="请输入机构纬度" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机构成立时间</label>
|
||||
<div class="layui-input-block">
|
||||
@ -101,33 +97,44 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区划-省</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionRegionProvince" name="institutionRegionProvince" class="layui-input" value="" placeholder="请输入行政区划-省" maxlength="255">
|
||||
<label class="layui-form-label">行政区划</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionProvince" id="institutionRegionProvince" lay-filter="institutionRegionProvince">
|
||||
<option value="">请选择省</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionCity" id="institutionRegionCity" lay-filter="institutionRegionCity">
|
||||
<option value="">请选择市</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionArea" id="institutionRegionArea" lay-filter="institutionRegionArea">
|
||||
<option value="">请选择区</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionVillage" id="institutionRegionVillage" lay-filter="institutionRegionVillage">
|
||||
<option value="">请选择镇</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="institutionRegionStreet" id="institutionRegionStreet" lay-filter="institutionRegionStreet">
|
||||
<option value="">请选择街</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区化-市</label>
|
||||
<label class="layui-form-label">机构地址</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionRegionCity" name="institutionRegionCity" class="layui-input" value="" placeholder="请输入行政区化-市" maxlength="255">
|
||||
<input type="hidden" id="institutionX" name="institutionX" value="" placeholder="请输入机构经度">
|
||||
<input type="hidden" id="institutionY" name="institutionY" value="" placeholder="请输入机构纬度">
|
||||
<input type="text" id="institutionAddress" name="institutionAddress" class="layui-input" value="" placeholder="请输入机构地址" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区化-区</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionRegionArea" name="institutionRegionArea" class="layui-input" value="" placeholder="请输入行政区化-区" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区化-村</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionRegionVillage" name="institutionRegionVillage" class="layui-input" value="" placeholder="请输入行政区化-村" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">行政区化-街</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="institutionRegionStreet" name="institutionRegionStreet" class="layui-input" value="" placeholder="请输入行政区化-街" maxlength="255">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12 layui-col-sm12" style="padding: 0 0px;">
|
||||
<div id="mapContainer" style="width: 100%;height: 350px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -142,6 +149,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
@ -157,6 +165,7 @@
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var institutionId = top.restAjax.params(window.location.href).institutionId;
|
||||
var dictId = 'cce46439-d5de-4687-8a9b-cb22817daad5';
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
@ -269,11 +278,11 @@
|
||||
}
|
||||
|
||||
// 初始化机构成立时间时间戳
|
||||
function initInstitutionFoundingTimeDateTime() {
|
||||
function initInstitutionFoundingTimeDateTime(v) {
|
||||
laydate.render({
|
||||
elem: '#institutionFoundingTime',
|
||||
type: 'datetime',
|
||||
value: new Date(),
|
||||
value: v,
|
||||
trigger: 'click'
|
||||
});
|
||||
}
|
||||
@ -290,7 +299,13 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initInstitutionImageUploadFile();
|
||||
initInstitutionFoundingTimeDateTime();
|
||||
initInstitutionFoundingTimeDateTime(data.institutionFoundingTime);
|
||||
initMap(data.institutionX,data.institutionY);
|
||||
initDataDict(dictId,'institutionRegionProvince',data.institutionRegionProvince);
|
||||
initDataDict(data.institutionRegionProvince,'institutionRegionCity',data.institutionRegionCity);
|
||||
initDataDict(data.institutionRegionCity,'institutionRegionArea',data.institutionRegionArea);
|
||||
initDataDict(data.institutionRegionArea,'institutionRegionVillage',data.institutionRegionVillage);
|
||||
initDataDict(data.institutionRegionVillage,'institutionRegionStreet',data.institutionRegionStreet);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -334,6 +349,99 @@
|
||||
closeBox();
|
||||
});
|
||||
|
||||
|
||||
//初始化百度地图
|
||||
function initMap(longitude, latitude) {
|
||||
map = new BMap.Map("mapContainer", {enableMapClick: false,});
|
||||
var point = new BMap.Point(longitude, latitude);
|
||||
map.centerAndZoom(point, 13);
|
||||
map.disableDoubleClickZoom();
|
||||
map.addControl(new BMap.NavigationControl());
|
||||
map.addControl(new BMap.ScaleControl());
|
||||
map.addControl(new BMap.OverviewMapControl());
|
||||
map.addControl(new BMap.MapTypeControl());
|
||||
map.enableScrollWheelZoom();//启用地图滚轮放大缩小
|
||||
map.enableContinuousZoom();//开启缩放平滑
|
||||
// 点击获取地址
|
||||
var geocoder= new BMap.Geocoder();
|
||||
mapMarkPoint(map, point);
|
||||
map.addEventListener("click", function(e) {
|
||||
map.clearOverlays();
|
||||
$('#institutionX').val(e.point.lng);
|
||||
$('#institutionY').val(e.point.lat);
|
||||
point = new BMap.Point(e.point.lng, e.point.lat);
|
||||
mapMarkPoint(map, point);
|
||||
geocoder.getLocation(e.point, function(rs) {
|
||||
$('#institutionAddress').val(rs.address);
|
||||
});
|
||||
});
|
||||
}
|
||||
//地图标点
|
||||
function mapMarkPoint(map, point) {
|
||||
var marker = new BMap.Marker(point);
|
||||
map.addOverlay(marker);
|
||||
}
|
||||
|
||||
|
||||
//c初始化数据字典
|
||||
function initDataDict(dictId,tabId,selectVelue){
|
||||
if(dictId == null || dictId == ''){
|
||||
return;
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path("api/data/listbyparentid/{dataParentId}",[dictId]),{},null,function (code,data,args) {
|
||||
$("#"+tabId).empty();
|
||||
var html = '';
|
||||
if ('institutionRegionProvince' === tabId){
|
||||
html += '<option value="">请选择省</option>';
|
||||
}
|
||||
if ('institutionRegionCity' === tabId){
|
||||
html += '<option value="">请选择市</option>';
|
||||
}
|
||||
if ('institutionRegionArea' === tabId){
|
||||
html += '<option value="">请选择区</option>';
|
||||
}
|
||||
if ('institutionRegionVillage' === tabId){
|
||||
html += '<option value="">请选择镇/村</option>';
|
||||
}
|
||||
if ('institutionRegionStreet' === tabId){
|
||||
html += '<option value="">请选择街</option>';
|
||||
}
|
||||
|
||||
$.each(data, function (index, item) {
|
||||
if(selectVelue == item.dataId){
|
||||
html += '<option selected value="'+item.dataId+'">'+item.dataName+'</option>';
|
||||
}else{
|
||||
html += '<option value="'+item.dataId+'">'+item.dataName+'</option>';
|
||||
}
|
||||
});
|
||||
$("#"+tabId).append(html);
|
||||
form.render('select');
|
||||
});
|
||||
}
|
||||
|
||||
//省监听事件
|
||||
form.on('select(institutionRegionProvince)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionCity');
|
||||
});
|
||||
//市监听事件
|
||||
form.on('select(institutionRegionCity)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionArea');
|
||||
});
|
||||
//区监听事件
|
||||
form.on('select(institutionRegionArea)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionVillage');
|
||||
});
|
||||
//镇、村监听事件
|
||||
form.on('select(institutionRegionVillage)', function(data){
|
||||
var v = data.value;
|
||||
initDataDict(v,'institutionRegionStreet');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
|
@ -9,6 +9,7 @@
|
||||
<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" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -86,6 +87,26 @@
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'organizationImage', width: 180, title: '组织图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var value='<ul id="viewer">';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
value += '<li><img style="height: 80px;width: 80px;" src="route/file/download/false/'+ item +'" alt="图片1"></li>';
|
||||
}
|
||||
value += '</ul>';
|
||||
setTimeout(function() {
|
||||
new Viewer(document.getElementById("viewer"),{
|
||||
loop:true
|
||||
});
|
||||
}, 50);
|
||||
return value;
|
||||
}
|
||||
},
|
||||
{field: 'organizationName', width: 180, title: '组织名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
@ -122,41 +143,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'organizationImage', width: 180, title: '组织图片', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
var downloadFile = '';
|
||||
var datas = rowData.split(',');
|
||||
for(var i = 0, item = datas[i]; item = datas[i++];) {
|
||||
if(downloadFile.length > 0) {
|
||||
downloadFile += ' | ';
|
||||
}
|
||||
downloadFile += '<a href="route/file/download/false/'+ item +'" target="_blank">点击下载</a>'
|
||||
}
|
||||
return downloadFile;
|
||||
}
|
||||
},
|
||||
{field: '创建人', width: 180, title: '', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: '创建时间', width: 180, title: '', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
|
@ -10,6 +10,20 @@
|
||||
<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" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.layui-form-label{
|
||||
width:120px !important;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left:120px !important;
|
||||
}
|
||||
.layui-form-text .layui-input-block{
|
||||
margin: 0 !important;
|
||||
}
|
||||
.layui-form-text .layui-form-label{
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
|
@ -10,6 +10,20 @@
|
||||
<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" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<style>
|
||||
.layui-form-label{
|
||||
width:120px !important;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left:120px !important;
|
||||
}
|
||||
.layui-form-text .layui-input-block{
|
||||
margin: 0 !important;
|
||||
}
|
||||
.layui-form-text .layui-form-label{
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
|
Loading…
Reference in New Issue
Block a user