图片套版生成模块

This commit is contained in:
cuibaocheng 2021-06-01 12:11:10 +08:00
parent b10e031520
commit 191d1720ea
4 changed files with 170 additions and 3 deletions

View File

@ -17,12 +17,9 @@ import cn.com.tenlion.pojo.vos.usercolumndata.UserColumnDataVO;
import cn.com.tenlion.service.usercolumndata.IUserColumnDataService; import cn.com.tenlion.service.usercolumndata.IUserColumnDataService;
import ink.wgink.util.ReflectUtil; import ink.wgink.util.ReflectUtil;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import jdk.nashorn.internal.runtime.ParserException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

View File

@ -3,6 +3,9 @@ package cn.com.tenlion.service.usercolumndata.impl;
import cn.com.tenlion.materialstore.pojo.dtos.materialdata.MaterialDataDTO; import cn.com.tenlion.materialstore.pojo.dtos.materialdata.MaterialDataDTO;
import cn.com.tenlion.materialstore.pojo.vos.materialdata.MaterialDataVO; import cn.com.tenlion.materialstore.pojo.vos.materialdata.MaterialDataVO;
import cn.com.tenlion.materialstore.service.materialdata.MaterialDataService; import cn.com.tenlion.materialstore.service.materialdata.MaterialDataService;
import cn.com.tenlion.pojo.dtos.usercolumn.UserColumnDTO;
import cn.com.tenlion.pojo.dtos.usercolumndata.UserColumnDataListDTO;
import cn.com.tenlion.service.usercolumn.IUserColumnService;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;

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);