完善代码

————2021.03.08 wzq
master
wzqgit 4 years ago
parent 531f9d7527
commit 09fc19ea25

@ -150,11 +150,11 @@
<version>${mysql.version}</version>
</dependency>
<!--sqlserver-->
<!--<dependency>-->
<!--<groupId>com.microsoft.sqlserver</groupId>-->
<!--<artifactId>sqljdbc4</artifactId>-->
<!--<version>4.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<!-- 连接池 -->
<dependency>
@ -551,6 +551,19 @@
<!--<version>1.6.2</version>-->
<!--</dependency>-->
<!-- mybatis自动生成所需的依赖start -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version>
</dependency>
<!-- mybatis自动生成所需的依赖end -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
</dependencies>
@ -602,17 +615,25 @@
<!--&lt;!&ndash; <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> 这个选项用来传递编译器自身不包含但是却支持的参数选项 &ndash;&gt;-->
<!--</configuration>-->
<!--</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- mybatis-generator自动生成代码插件 -->
<!--<plugin>-->
<!--<groupId>org.mybatis.generator</groupId>-->
<!--<artifactId>mybatis-generator-maven-plugin</artifactId>-->
<!--<version>1.3.5</version>-->
<!--<configuration>-->
<!--<verbose>true</verbose>-->
<!--<overwrite>false</overwrite>-->
<!--</configuration>-->
<!--</plugin>-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<configuration>
<verbose>true</verbose>
<overwrite>false</overwrite>
</configuration>
</plugin>
</plugins>
<!--<resources>
<resource>

@ -247,7 +247,7 @@
</div>
<div class="form-group divCss" style="height: 18px;margin-top: -7px;">
<label>是否扫描:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isscaned" id="isscaned" title="是否扫描">
<select class="selectpicker bla bla bli" data-live-search="true" name="isScanning" id="isScanning" title="是否扫描">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>
@ -255,7 +255,7 @@
</div>
<div class="form-group divCss" style="height: 18px;margin-top: -7px;">
<label>科室是否提交纸质病历:</label>
<select class="selectpicker bla bla bli" data-live-search="true" name="isScanning" id="isScanning" title="科室是否提交纸质病历">
<select class="selectpicker bla bla bli" data-live-search="true" name="isscaned" id="isscaned" title="科室是否提交纸质病历">
<option value="">全部</option>
<option value="1">是</option>
<option value="0">否</option>

@ -0,0 +1,90 @@
html,body{
margin: 0;
}
.cx-time-main{
padding: 20px 0;
}
ul{
white-space:nowrap;
margin: 0;
padding: 0;
}
ul li{
outline: none;
list-style-type: none;
margin: 0px;
}
.cx-time-main{
width: 100%;
height: auto;
}
.cx-time-box{
position: relative;
width: 100%;
height: auto;
}
.cx-time-main ul li{
position: relative;
padding: 10px 0;
height: auto;
}
.cx-time-main ul li:nth-child(2n){
padding-left: 54%;
text-align: left;
}
.cx-time-main ul li:nth-child(2n+1){
padding-right: 54%;
text-align: right;
}
.cx-main-box::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 12px;
height: 12px;
margin: -8px 0 0 -8px;
border-radius: 50%;
z-index: 2;
border: 2px solid #80cbc4;
}
.cx-main-box::after {
content: '';
position: absolute;
top: calc(50% - 1px);
left: calc(50% + 6px);
width: calc(4% - 6px);
height: 2px;
background: #80cbc4;
}
.cx-time-main ul li:nth-child(2n+1) .cx-main-box::after{
left: auto;
right: calc(50% + 6px);
}
.active::before {
background: #26a69a;
border: 2px solid #26a69a;
}
.cx-time-main ul li::before,.cx-time-main ul li::after{
content: '';
position: absolute;
top: 0;
width: 2px;
height: calc(50% - 8px);
left: 50%;
background: #26a69a;
margin-left: -2px;
}
.cx-time-main ul li::after {
top: auto;
bottom: 0;
}
.cx-main-box{
display: inline-block;
min-width: 40%;
min-height: 40px;
background: #80cbc4;
border-radius: 4px;
padding: 10px 20px;
cursor: pointer;
}

@ -0,0 +1,126 @@
;(function ($, window, document) {
var defaults = {
data: [], // 展示数据
id: '', // 判定dom ID
props: [], // 数据反显key
index: 0, //默认当前选中
sort: '', // 正序just反序back, 其他表示不排序
sortKey: '', //排序的参数key //为空时表示不排序
activeColor: '#26a69a', // 默认颜色
then: function () {
}
};
var TimeAxis = function (options) {
this.options = Object.assign(defaults, options);
this.props = this.options.props;
this.id = this.options.id;
this.init();
};
TimeAxis.prototype = {
// 组件初始化
init: function () {
// 生成时间轴盒子html
this.setTimeBox();
},
// 生成时间轴盒子html
setTimeBox: function () {
var id = "#" + this.id;
var html = '<ul class="cx-time-box"></ul>';
$(id).empty().append(html);
// 生成时间轴html
this.setTimeAxisHtml();
var self = this;
},
// 时间排序
sortTime () {
var list = this.options.data || [];
var sort = this.options.sort;
var key = this.options.sortKey;
var num = 1;
if(sort == 'just' && key){
num = 1;
}else if (sort == 'back' && key){
num = -1;
}else {
return list;
}
list.sort(function (before, after) {
return before[key] > after[key] ? num: -num
})
return list
},
// 生成时间轴html
setTimeAxisHtml: function () {
var list = this.sortTime();
var html = '';
var self = this;
$.each(list, function (index, item) {
html += '<li>';
html += '<div class="cx-main-box cx-main-box'+index+'" data-index="'+index+'">';
$.each(self.props, function(i, key){
if(item[key]){
html += '<div>'+self.formatChange(key,item[key])+'</div>';
}
});
html += '</div>';
html += '</li>';
});
var cls = "#" + this.id + ' ul';
$(cls).empty().append(html);
// 节点绑定点击事件
$(cls + ' .cx-main-box').click(function (res) {
self.options.index = $(this).data('index');
// 点击事件回调
var data = list[self.options.index];
self.options.then(data);
// 选择节点颜色
self.activeColor();
})
// 选择节点颜色
this.activeColor();
},
// 节点颜色
activeColor () {
var clsAll = '#' + this.id + ' .cx-main-box';
$(clsAll).css({
'background': '#b2dfdb',
'color': '#000'
});
$(clsAll).removeClass('active');
var cls = clsAll + this.options.index;
$(cls).css({
'background': this.options.activeColor,
'color': '#fff'
});
$(cls).addClass('active');
},
//数据格式化事件
formatChange: function (key, val) {
// 判断是否包含format 方法
if(typeof(this.options.format) == "function"){
return this.options.format(key, val);
}
return val;
}
};
window.oTimeAxios = TimeAxis;
})(jQuery, window, document);
Loading…
Cancel
Save