增加素材库模块

This commit is contained in:
cuibaocheng 2021-05-31 17:34:23 +08:00
parent 49a98f5eb9
commit e06665e6e9
25 changed files with 280 additions and 281 deletions

View File

@ -28,4 +28,7 @@ public enum MaterialTypeEnum {
return typeName;
}
// public static ArrayList<Map<String, String>> getType() {
// return type;
// }
}

View File

@ -258,7 +258,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 音频素材列表 -->

View File

@ -272,7 +272,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 链接素材列表 -->

View File

@ -284,7 +284,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 经纬度素材列表 -->

View File

@ -262,7 +262,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 图片素材列表 -->

View File

@ -274,7 +274,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 文字素材列表 -->

View File

@ -258,7 +258,7 @@
<if test="materialId != '' and materialId != null">
AND t1.material_id = #{materialId}
</if>
ORDER BY t1.material_order
ORDER BY t1.gmt_create DESC, t1.material_order
</select>
<!-- 视频素材列表 -->

View File

@ -44,15 +44,15 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>

View File

@ -58,12 +58,12 @@
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">

View File

@ -58,12 +58,12 @@
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">

View File

@ -44,15 +44,15 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>
@ -96,7 +96,7 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'materialLinkId', width: 180, title: '链接素材表', align:'center',
{field: 'creatorName', width: 180, title: '发布人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -105,7 +105,7 @@
return rowData;
}
},
{field: 'materialLinkPath', width: 180, title: '跳转路径', align:'center',
{field: 'materialLinkPath', width: 320, title: '跳转路径', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -114,7 +114,7 @@
return rowData;
}
},
{field: 'materialLinkMode', width: 180, title: '跳转方式', align:'center',
{field: 'materialOrder', width: 80, title: '排序', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -123,74 +123,25 @@
return rowData;
}
},
{field: 'materialId', width: 180, title: '素材包ID', align:'center',
templet: function(row) {
{
field: 'gmtCreate', width: 180, title: '创建时间', align: 'center',
templet: function (row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
if (typeof (rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'materialOrder', width: 180, title: '排序', align:'center',
{
field: 'materialStatus', width: 150, title: '素材状态', fixed: 'right', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'materialRemark', 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;
}
},
{field: 'modifier', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
var materialRemark = row['materialRemark'];
if(rowData == 1) {
return '<button type="button" class="layui-btn layui-btn-radius layui-btn-radius layui-btn-xs">正常</button>';
}else {
return '<button type="button" /*onclick="layer.msg(\'' +materialRemark + '\')" */ class="layui-btn layui-btn-danger layui-btn-radius layui-btn-xs">封禁</button>';
}
return rowData;
}

View File

@ -22,36 +22,36 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item layui-form-text">
<div class="layui-form-item">
<label class="layui-form-label">跳转路径</label>
<div class="layui-input-block">
<textarea id="materialLinkPath" name="materialLinkPath" 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="materialLinkMode" name="materialLinkMode" class="layui-input" value="" placeholder="请输入跳转方式" maxlength="1">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">素材包ID</label>
<div class="layui-input-block">
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
<input type="text" id="materialLinkPath" name="materialLinkPath" class="layui-input" placeholder="请输入跳转路径"></input>
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">跳转方式</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialLinkMode" name="materialLinkMode" class="layui-input" value="" placeholder="请输入跳转方式" maxlength="1">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">素材包ID</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">排序</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">

View File

@ -22,36 +22,36 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item layui-form-text">
<div class="layui-form-item">
<label class="layui-form-label">跳转路径</label>
<div class="layui-input-block">
<textarea id="materialLinkPath" name="materialLinkPath" 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="materialLinkMode" name="materialLinkMode" class="layui-input" value="" placeholder="请输入跳转方式" maxlength="1">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">素材包ID</label>
<div class="layui-input-block">
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
<input type="text" id="materialLinkPath" name="materialLinkPath" class="layui-input" placeholder="请输入跳转路径"></input>
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">跳转方式</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialLinkMode" name="materialLinkMode" class="layui-input" value="" placeholder="请输入跳转方式" maxlength="1">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">素材包ID</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">排序</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">

View File

@ -44,15 +44,15 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>
@ -96,7 +96,7 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'materialMapId', width: 180, title: '经纬度素材表', align:'center',
{field: 'creatorName', width: 180, title: '发布人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -105,7 +105,7 @@
return rowData;
}
},
{field: 'materialMapLong', width: 180, title: '经度', align:'center',
{field: 'materialMapLong', width: 100, title: '经度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -114,7 +114,7 @@
return rowData;
}
},
{field: 'materialMapLat', width: 180, title: '纬度', align:'center',
{field: 'materialMapLat', width: 100, title: '纬度', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -123,7 +123,7 @@
return rowData;
}
},
{field: 'materialMapAddress', width: 180, title: '地址', align:'center',
{field: 'materialMapAddress', width: 320, title: '地址', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -132,7 +132,7 @@
return rowData;
}
},
{field: 'materialId', width: 180, title: '素材包ID', align:'center',
{field: 'materialOrder', width: 80, title: '排序', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -141,65 +141,25 @@
return rowData;
}
},
{field: 'materialOrder', width: 180, title: '排序', align:'center',
templet: function(row) {
{
field: 'gmtCreate', width: 180, title: '创建时间', align: 'center',
templet: function (row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
if (typeof (rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'materialRemark', width: 180, title: '备注', align:'center',
{
field: 'materialStatus', width: 150, title: '素材状态', fixed: 'right', 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;
}
},
{field: 'modifier', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
var materialRemark = row['materialRemark'];
if(rowData == 1) {
return '<button type="button" class="layui-btn layui-btn-radius layui-btn-radius layui-btn-xs">正常</button>';
}else {
return '<button type="button" /*onclick="layer.msg(\'' +materialRemark + '\')" */ class="layui-btn layui-btn-danger layui-btn-radius layui-btn-xs">封禁</button>';
}
return rowData;
}

View File

@ -22,42 +22,49 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">
</div>
</div>
<input type="hidden" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">
<input type="hidden" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">经度</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">纬度</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<label class="layui-form-label">地址</label>
<div class="layui-input-block">
<input type="text" id="materialMapAddress" name="materialMapAddress" class="layui-input" value="" placeholder="请输入地址" maxlength="200">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">素材包ID</label>
<div class="layui-input-block">
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>
<div class="layui-form-item">
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">素材包ID</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</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">
<!--<div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
</div>
</div>
</div>-->
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
@ -70,6 +77,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>
@ -92,6 +100,39 @@
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
//初始化百度地图
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();
$('#materialMapLong').val(e.point.lng);
$('#materialMapLat').val(e.point.lat);
point = new BMap.Point(e.point.lng, e.point.lat);
mapMarkPoint(map, point);
geocoder.getLocation(e.point, function(rs) {
$('#materialMapAddress').val(rs.address);
});
});
}
//地图标点
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
@ -145,6 +186,7 @@
// 初始化内容
function initData() {
initMap('109.85017859252311', '40.66017700460503');
}
initData();

View File

@ -22,42 +22,49 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<label class="layui-form-label">经度</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">纬度</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">
</div>
</div>
<input type="hidden" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">
<input type="hidden" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">经度</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" step="0.01" id="materialMapLong" name="materialMapLong" class="layui-input" value="" placeholder="请输入经度" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">纬度</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="number" step="0.01" id="materialMapLat" name="materialMapLat" class="layui-input" value="" placeholder="请输入纬度" lay-verify="required">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<label class="layui-form-label">地址</label>
<div class="layui-input-block">
<input type="text" id="materialMapAddress" name="materialMapAddress" class="layui-input" value="" placeholder="请输入地址" maxlength="200">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">素材包ID</label>
<div class="layui-input-block">
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">素材包ID</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</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">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<!--<div class="layui-form-item">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<input type="text" id="materialRemark" name="materialRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
</div>
</div>
</div>-->
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
@ -70,6 +77,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>
@ -94,6 +102,39 @@
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
//初始化百度地图
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();
$('#materialMapLong').val(e.point.lng);
$('#materialMapLat').val(e.point.lat);
point = new BMap.Point(e.point.lng, e.point.lat);
mapMarkPoint(map, point);
geocoder.getLocation(e.point, function(rs) {
$('#materialMapAddress').val(rs.address);
});
});
}
//地图标点
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
@ -155,6 +196,7 @@
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initMap(data.materialMapLong, data.materialMapLat);
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {

View File

@ -42,19 +42,20 @@
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">-->
<!-- <i class="fa fa-lg fa-edit"></i> 编辑-->
<!-- </button>-->
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>
</div>

View File

@ -64,12 +64,12 @@
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->

View File

@ -64,12 +64,12 @@
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->

View File

@ -44,15 +44,15 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>

View File

@ -40,12 +40,12 @@
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->

View File

@ -40,12 +40,12 @@
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->

View File

@ -44,15 +44,15 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="checkEvent">
<i class="fa fa-lg fa-close"></i> 封禁该素材
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
<!-- <i class="fa fa-lg fa-plus"></i> 新增-->
<!-- </button>-->
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<!-- <button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">-->
<!-- <i class="fa fa-lg fa-trash"></i> 删除-->
<!-- </button>-->
</div>
</script>
</div>

View File

@ -63,12 +63,12 @@
<input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">
</div>
</div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->

View File

@ -56,12 +56,12 @@
<!-- <input type="text" id="materialId" name="materialId" class="layui-input" value="" placeholder="请输入素材包ID" maxlength="36">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-block">
<input type="number" id="materialOrder" name="materialOrder" class="layui-input" value="" placeholder="请输入排序" lay-verify="required">
</div>
</div>
</div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">备注</label>-->
<!-- <div class="layui-input-block">-->