This commit is contained in:
wans 2021-06-03 16:08:30 +08:00
parent 26450e9984
commit c078696b41
8 changed files with 1036 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package cn.com.tenlion.materialstore.controller.api.materialdata;
import cn.com.tenlion.materialstore.pojo.dtos.materialdata.MaterialDataDTO;
import cn.com.tenlion.materialstore.service.materialdata.MaterialDataService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.result.ErrorResult;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @ClassName: MaterialDataController
* @Description: 图片素材
* @Author: CodeFactory
* @Date: 2021-05-28 11:04:34
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "素材详情接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/materialdata")
public class MaterialDataController extends DefaultBaseController {
@Autowired
private MaterialDataService materialDataService;
@ApiOperation(value = "素材详情列表", notes = "素材详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list/{materialId}")
public MaterialDataDTO list(@PathVariable("materialId") String materialId) {
return materialDataService.getByMaterialId(materialId);
}
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.materialstore.controller.route.materialdata;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
/**
* @ClassName: MaterialDataRouteController
* @Description: 素材详情
* @Author: CodeFactory
* @Date: 2021-05-28 10:41:09
* @Version: 3.0
**/
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "素材详情路由")
@RestController
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/materialdata")
public class MaterialDataRouteController extends DefaultBaseController {
@GetMapping("list")
public ModelAndView list() {
ModelAndView model = new ModelAndView("materialdata/list");
return model;
}
}

View File

@ -0,0 +1,228 @@
.VivaTimeline dl {
position: relative;
top: 0;
padding: 20px 0;
margin: 0
}
.VivaTimeline dl:before {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
z-index: 100;
width: 2px;
margin-left: -1px;
content: '';
background-color: #ccd1d9
}
.VivaTimeline dl dt {
position: relative;
top: 30px;
z-index: 200;
width: 120px;
padding: 3px 5px;
margin: 0 auto 30px;
font-weight: 400;
color: #fff;
text-align: center;
background-color: #aab2bd;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px
}
.VivaTimeline dl dd {
position: relative;
z-index: 200
}
.VivaTimeline dl dd .circ {
position: absolute;
cursor: pointer;
top: 40px;
left: 50%;
z-index: 200;
width: 22px;
height: 22px;
margin-left: -11px;
background-color: #4fc1e9;
border: 4px solid #f5f7fa;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%
}
.VivaTimeline dl dd .time {
position: absolute;
cursor: pointer;
top: 31px;
left: 50%;
display: inline-block;
width: 100px;
padding: 10px 20px;
color: #4fc1e9
}
.VivaTimeline dl dd .events {
position: relative;
width: 47%;
padding: 10px 0 0;
margin-top: 31px;
background-color: #CCC;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px
}
.VivaTimeline dl dd .events:before {
position: absolute;
top: 12px;
width: 0;
height: 0;
content: '';
border-style: solid;
border-width: 6px
}
.VivaTimeline dl dd .events .events-object {
margin: 0 auto;
}
.VivaTimeline dl dd .events .events-header {
min-height: 30px;
line-height: 20px;
text-align: center;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
.VivaTimeline dl dd .events .events-body {
overflow: hidden;
zoom: 1;
background-color: #EEE;
padding: 10px;
}
.VivaTimeline dl dd .events .events-body .row{
display:none;
}
.VivaTimeline dl dd .events .events-body .events-desc {
text-indent: 2em;
padding: 0 15px;
}
.VivaTimeline dl dd .events .events-footer {
text-align:center;
}
.VivaTimeline dl dd .events .events-footer ol {
list-style: none;
margin: 0 auto;
padding: 0;
}
.VivaTimeline dl dd .events .events-footer ol li {
background: #32b487;
border-radius: 5px;
margin: 10px;
display: inline-block;
width: 10px;
height: 10px;
cursor: pointer;
}
.VivaTimeline dl dd .events .events-footer ol .active{
transform: scale(2);
}
.VivaTimeline dl dd.pos-right .time {
margin-left: -100px;
text-align: right
}
.VivaTimeline dl dd.pos-right .events {
float: right
}
.VivaTimeline dl dd.pos-right .events:before {
left: -12px;
border-color: transparent #CCC transparent transparent
}
.VivaTimeline dl dd.pos-left .time {
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-left .events {
float: left
}
.VivaTimeline dl dd.pos-left .events:before {
right: -12px;
border-color: transparent transparent transparent #CCC
}
.VivaTimeline .carousel-indicators{
bottom: 0;
}
@media screen and (max-width: 767px) {
.VivaTimeline dl:before {
left: 90px
}
.VivaTimeline dl dt {
margin: 0 30px 30px
}
.VivaTimeline dl dd .circ {
left: 90px
}
.VivaTimeline dl dd .time {
left: 20px
}
.VivaTimeline dl dd.pos-left .time {
padding: 10px 0;
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-left .events {
float: right;
width: 73%;
margin-right: 4%;
}
.VivaTimeline dl dd.pos-left .events:before {
left: -12px;
border-color: transparent #CCC transparent transparent
}
.VivaTimeline dl dd.pos-right .time {
padding: 10px 0;
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-right .events {
float: right;
width: 73%;
margin-right: 4%;
}
/*
.VivaTimeline dl dd .events .events-body {
display: none;
}
.VivaTimeline dl dd .events .events-footer {
display: none;
}
*/
}
@media screen and (max-width: 500px) {
.VivaTimeline dl dd.pos-left .events {
float: right;
width: 63%;
margin-right: 4%;
}
.VivaTimeline dl dd.pos-right .events {
float: right;
width: 63%;
margin-right: 4%;
}
}

View File

@ -0,0 +1,226 @@
.VivaTimeline dl {
position: relative;
top: 0;
padding: 20px 0;
margin: 0
}
.VivaTimeline dl:before {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
z-index: 100;
width: 2px;
margin-left: -1px;
content: '';
background-color: #ccd1d9
}
.VivaTimeline dl dt {
position: relative;
top: 30px;
z-index: 200;
width: 120px;
padding: 3px 5px;
margin: 0 auto 30px;
font-weight: 400;
color: #fff;
text-align: center;
background-color: #aab2bd;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px
}
.VivaTimeline dl dd {
position: relative;
z-index: 200
}
.VivaTimeline dl dd .circ {
position: absolute;
top: 40px;
left: 50%;
z-index: 200;
width: 22px;
height: 22px;
margin-left: -11px;
background-color: #4fc1e9;
border: 4px solid #f5f7fa;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%
}
.VivaTimeline dl dd .time {
position: absolute;
top: 31px;
left: 50%;
display: inline-block;
width: 100px;
padding: 10px 20px;
color: #4fc1e9
}
.VivaTimeline dl dd .events {
position: relative;
width: 47%;
padding: 10px 0 0;
margin-top: 31px;
background-color: #CCC;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px
}
.VivaTimeline dl dd .events:before {
position: absolute;
top: 12px;
width: 0;
height: 0;
content: '';
border-style: solid;
border-width: 6px
}
.VivaTimeline dl dd .events .events-object {
margin: 0 auto;
}
.VivaTimeline dl dd .events .events-header {
min-height: 30px;
line-height: 20px;
text-align: center;
font-size: 16px;
font-weight: bold;
cursor: pointer;
}
.VivaTimeline dl dd .events .events-body {
overflow: hidden;
zoom: 1;
background-color: #EEE;
padding: 10px;
}
.VivaTimeline dl dd .events .events-body .row{
display:none;
}
.VivaTimeline dl dd .events .events-body .events-desc {
text-indent: 2em;
padding: 0 15px;
}
.VivaTimeline dl dd .events .events-footer {
text-align:center;
}
.VivaTimeline dl dd .events .events-footer ol {
list-style: none;
margin: 0 auto;
padding: 0;
}
.VivaTimeline dl dd .events .events-footer ol li {
background: #32b487;
border-radius: 5px;
margin: 10px;
display: inline-block;
width: 10px;
height: 10px;
cursor: pointer;
}
.VivaTimeline dl dd .events .events-footer ol .active{
transform: scale(2);
}
.VivaTimeline dl dd.pos-right .time {
margin-left: -100px;
text-align: right
}
.VivaTimeline dl dd.pos-right .events {
float: right
}
.VivaTimeline dl dd.pos-right .events:before {
left: -12px;
border-color: transparent #CCC transparent transparent
}
.VivaTimeline dl dd.pos-left .time {
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-left .events {
float: left
}
.VivaTimeline dl dd.pos-left .events:before {
right: -12px;
border-color: transparent transparent transparent #CCC
}
.VivaTimeline .carousel-indicators{
bottom: 0;
}
@media screen and (max-width: 767px) {
.VivaTimeline dl:before {
left: 90px
}
.VivaTimeline dl dt {
margin: 0 30px 30px
}
.VivaTimeline dl dd .circ {
left: 90px
}
.VivaTimeline dl dd .time {
left: 20px
}
.VivaTimeline dl dd.pos-left .time {
padding: 10px 0;
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-left .events {
float: right;
width: 73%;
margin-right: 4%;
}
.VivaTimeline dl dd.pos-left .events:before {
left: -12px;
border-color: transparent #CCC transparent transparent
}
.VivaTimeline dl dd.pos-right .time {
padding: 10px 0;
margin-left: 0;
text-align: left
}
.VivaTimeline dl dd.pos-right .events {
float: right;
width: 73%;
margin-right: 4%;
}
/*
.VivaTimeline dl dd .events .events-body {
display: none;
}
.VivaTimeline dl dd .events .events-footer {
display: none;
}
*/
}
@media screen and (max-width: 500px) {
.VivaTimeline dl dd.pos-left .events {
float: right;
width: 63%;
margin-right: 4%;
}
.VivaTimeline dl dd.pos-right .events {
float: right;
width: 63%;
margin-right: 4%;
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,163 @@
; (function ($, window, document, undefined) {
//'use strict';
var pluginName = 'vivaTimeline';//Plugin名稱
//Timeline建構式
var Timeline = function (element, opt) {
//私有變數
this.target = element;
this.carouselInterval;
this.checkImgLoad;
this.imgLoad = false;
//初始化
this._init(opt);
this._event();
}
//ImportKML2D預設參數
Timeline.options = {
carousel: true,
carouselTime: 10000
}
//Timeline私有方法
Timeline.prototype = {
//初始化
_init: function (_opt) {
//合併自訂參數與預設參數
var self = this;
self.options = $.extend(true, {}, Timeline.options, _opt);
self.target
.find('.events-body')
.each(function(){
var rowcount = $(this).find('.row').length;
if(rowcount > 1) {
var html = "<ol>";
for(var i = 0; i < rowcount; i++){
html += "<li data-target='" + i + "'></li>";
}
html += "</ol>";
$(this)
.siblings('.events-footer')
.html(html)
.find('li')
.first()
.addClass('active');
}
});
self.target
.find('.events-body')
.each(function(){
$(this)
.find('.row')
.first()
.show()
.siblings()
.hide();
});
self.target
.find('img').on('load', function(){
self.target
.find('.events-body')
.each(function(){
var maxHeight = 0;
$(this)
.find('.row')
.each(function(){
if($(this).height() > maxHeight){
maxHeight = $(this).height();
}
});
$(this).find('.row').height(maxHeight);
});
});
},
//綁定事件
_event: function () {
var self = this;
self.target
.find('.events-header')
.click(function(){
$(this)
.siblings('.events-body').slideToggle()
.end()
.siblings('.events-footer').toggle();
});
self.target
.find('.events-footer li')
.click(function(){
self._carousel($(this));
});
if(self.options.carousel){
self.carouselInterval = setInterval(function(){
self._carousel();
}, self.options.carouselTime);
self.target
.find('.events')
.hover(function(){
clearInterval(self.carouselInterval);
self.carouselInterval = null;
}, function(){
if(self.carouselInterval == undefined){
self.carouselInterval = setInterval(function(){
self._carousel();
}, self.options.carouselTime);
}
});
}
},
//自動輪播
_carousel: function(_container) {
var self = this;
if(_container == undefined){
self.target
.find('.events-footer .active')
.each(function(){
var nextTarget;
if($(this).is(':last-child')){
nextTarget = $(this).siblings().first();
}
else{
nextTarget = $(this).next();
}
self._carousel(nextTarget);
});
}
else{
var target = _container.data().target;
_container
.addClass('active')
.siblings()
.removeClass('active');
_container
.closest('.events-footer')
.siblings('.events-body')
.find('.row')
.eq(target).show()
.siblings().hide();
}
}
}
//公開方法
$.fn[pluginName] = function (options, args) {
var timeline;
this.each(function () {
timeline = new Timeline($(this), options);
});
return this;
}
})(jQuery, window, document);

View File

@ -0,0 +1,321 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<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" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
<link rel="stylesheet" type="text/css" href="assets/css/jquery.eeyellow.Timeline.css" />
<style>
.anchorBL{display:none} /** 去除百度地图Logo */
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="VivaTimeline">
<dl id="textScriptDiv"></dl>
<script id="textScript" type="text/html">
<dt>文字素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-right clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="text" data-dataid="{{item.materialTextId}}"></div>
<div class="time closeData" data-path="text" data-dataid="{{item.materialTextId}}">封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.materialTextTitle}}</div>
<div class="events-body">
<div class="row">
<div class="col-md-12 pull-center" >
{{item.materialTextContent}}
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl id="photoScriptDiv"></dl>
<script id="photoScript" type="text/html">
<dt>图片素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-left clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="photo" data-dataid="{{item.materialPhotoId}}"></div>
<div class="time closeData" data-path="photo" data-dataid="{{item.materialPhotoId}}">封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.gmtCreate}}</div>
<div class="events-body">
<div class="row">
<div class="col-md-12 pull-center" >
<img class="events-object img-responsive img-rounded" style="max-height:250px;" src="route/file/download/false/{{item.materialPhotoFileId}}" />
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl id="audioScriptDiv"></dl>
<script id="audioScript" type="text/html">
<dt>音频素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-right clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="audio" data-dataid="{{item.materialAudioId}}" ></div>
<div class="time closeData" data-path="audio" data-dataid="{{item.materialAudioId}}" >封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.gmtCreate}}</div>
<div class="events-body">
<div class="row">
<div class="col-md-12 pull-center" >
<audio class="events-object img-responsive img-rounded" controls="controls" src="route/file/download/false/{{item.materialAudioFileId}}" ></audio>
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl id="videoScriptDiv"></dl>
<script id="videoScript" type="text/html">
<dt>视频素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-left clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="video" data-dataid="{{item.materialVideoId}}" ></div>
<div class="time closeData" data-path="video" data-dataid="{{item.materialVideoId}}" >封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.gmtCreate}}</div>
<div class="events-body">
<div class="row">
<div class="col-md-12 pull-center" >
<video class="events-object img-responsive img-rounded" style="max-height:250px;" controls="controls" src="route/file/download/false/{{item.materialVideoFileId}}" ></video>
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl id="mapScriptDiv"></dl>
<script id="mapScript" type="text/html">
<dt>位置素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-right clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="map" data-dataid="{{item.materialMapId}}" ></div>
<div class="time closeData" data-path="map" data-dataid="{{item.materialMapId}}" >封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.materialMapAddress}}</div>
<div class="events-body">
<div class="row">
<div style="height:250px;" class="col-md-12 pull-center" id="{{item.materialMapId}}" >
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl id="linkScriptDiv"></dl>
<script id="linkScript" type="text/html">
<dt>链接素材</dt>
{{# for(var i = 0, item = d[i]; item = d[i++];) { }}
<dd class="pos-left clearfix">
{{# if(item.materialStatus == 1) { }}
<div class="circ closeData" data-path="link" data-dataid="{{item.materialLinkId}}"></div>
<div class="time closeData" data-path="link" data-dataid="{{item.materialLinkId}}">封禁素材</div>
{{# }else { }}
<div class="circ" style="background-color: red;"></div>
<div class="time" style="color: red;" >已封禁</div>
{{# } }}
<div class="events">
<div class="events-header">{{item.materialLinkPath}}</div>
<div class="events-body">
<div class="row">
<div class="col-md-12 pull-center" >
<a href="http://www.baidu.com" target="_blank" style="margin-left:40%;cursor: pointer;">点击跳转此链接</a>
</div>
</div>
</div>
</div>
</dd>
{{# } }}
</script>
<dl>
</dl>
<dl>
</dl>
<dl>
</dl>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=oWU9RD4ihDHAafexgI6XOrTK8lDatRju"></script>
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="http://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
<script type="text/javascript" src="assets/js/jquery.eeyellow.Timeline.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common', 'laytpl'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var laytpl = layui.laytpl;
var materialId = top.restAjax.params(window.location.href).materialId;
$(document).on("click",'.closeData', function (data) {
checkData($(this).data("path"), $(this).data("dataid"));
})
function checkData(name, id) {
top.dialog.msg("确认封禁该素材?", {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.put(top.restAjax.path('api/material' + name + '/check/{id}', [id]), {}, null, function (code, data) {
initTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg("操作中...", {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
//初始化百度地图
function initMap(id, longitude, latitude) {
var map = new BMap.Map(id, {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);
}
//地图标点
function mapMarkPoint(map, point) {
var marker = new BMap.Marker(point);
map.addOverlay(marker);
}
// 初始化表格
function initTable() {
top.restAjax.get(top.restAjax.path('api/materialdata/list/{id}', [materialId]), {}, null, function(code, data) {
if(data.text.length > 0) {
laytpl(document.getElementById('textScript').innerHTML).render(data.text, function(html) {
document.getElementById('textScriptDiv').innerHTML = html;
});
}
if(data.photo.length > 0) {
laytpl(document.getElementById('photoScript').innerHTML).render(data.photo, function(html) {
document.getElementById('photoScriptDiv').innerHTML = html;
});
}
if(data.audio.length > 0) {
laytpl(document.getElementById('audioScript').innerHTML).render(data.audio, function(html) {
document.getElementById('audioScriptDiv').innerHTML = html;
});
}
if(data.video.length > 0) {
laytpl(document.getElementById('videoScript').innerHTML).render(data.video, function(html) {
document.getElementById('videoScriptDiv').innerHTML = html;
});
}
if(data.map.length > 0) {
laytpl(document.getElementById('mapScript').innerHTML).render(data.map, function(html) {
document.getElementById('mapScriptDiv').innerHTML = html;
});
for(var i = 0; i < data.map.length; i++) {
var tempMap = data.map[i];
initMap(tempMap.materialMapId, tempMap.materialMapLong, tempMap.materialMapLat);
}
}
if(data.link.length > 0) {
laytpl(document.getElementById('linkScript').innerHTML).render(data.link, function(html) {
document.getElementById('linkScriptDiv').innerHTML = html;
});
}
setTimeout(function() {
$('.VivaTimeline').vivaTimeline({
carousel: true,
carouselTime: 3000
});
}, 100);
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
initTable();
});
</script>
</body>
</html>

View File

@ -0,0 +1,31 @@
package cn.com.tenlion.materialstore.pojo;
public enum MaterialTypeEnum {
TEXT("TEXT", "文本"),
PHOTO("PHOTO", "图片"),
AUDIO("AUDIO", "音频"),
VIDEO("VIDEO", "视频"),
MAP("MAP", "经纬度"),
LINK("LINK", "链接");
private String type;
private String typeName;
MaterialTypeEnum(String type, String typeName) {
this.type = type;
this.typeName = typeName;
}
public String getType() {
return type;
}
public String getTypeName() {
return typeName;
}
// public static ArrayList<Map<String, String>> getType() {
// return type;
// }
}