|
@@ -101,6 +101,32 @@
|
|
|
.table-striped>tbody>tr:nth-of-type(odd) {
|
|
|
background: none;
|
|
|
}
|
|
|
+
|
|
|
+ .is-import-box{
|
|
|
+ height: calc(100% - 20px);
|
|
|
+ background: white;
|
|
|
+ margin: 0 30px 20px 30px;
|
|
|
+ border-radius: 4px
|
|
|
+ }
|
|
|
+
|
|
|
+ .select-file-ipt{
|
|
|
+ display: inline-block;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ opacity: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .select-update-ipt{
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin: 0 10px 0 0!important;
|
|
|
+ background: #EBEFFA;
|
|
|
+ border: 1px solid #D5DFF9;
|
|
|
+ border-radius: 2px;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body class="">
|
|
@@ -1030,8 +1056,9 @@
|
|
|
function importPersonnel() {
|
|
|
layer.open({
|
|
|
type: 1,
|
|
|
- area: ['400px', '230px'],
|
|
|
+ area: ['466px', '548px'],
|
|
|
fix: false,
|
|
|
+ skin: 'add-mask-class-two-btn',
|
|
|
shade: 0.3,
|
|
|
title: '导入人员数据',
|
|
|
content: $('#importTpl').html(),
|
|
@@ -1097,6 +1124,16 @@
|
|
|
window.location.href = ctx + "common/download/resource?resource=/profile/download/" + encodeURI("人员岗位历史数据导入模板.xlsx") ;
|
|
|
}
|
|
|
|
|
|
+ function getFileName(file){ // 获取文件名
|
|
|
+ var pos=file.lastIndexOf("\\"); //查找最后一个\的位置
|
|
|
+ return file.substring(pos+1); //截取最后一个\位置到字符长度,也就是截取文件名
|
|
|
+ }
|
|
|
+
|
|
|
+ function changeFile() {
|
|
|
+ var fileName = getFileName($('#file').val());
|
|
|
+ $("#choice_show").html(fileName);
|
|
|
+ }
|
|
|
+
|
|
|
function importPostHistory() {
|
|
|
layer.open({
|
|
|
type: 1,
|
|
@@ -1151,16 +1188,25 @@
|
|
|
</body>
|
|
|
<!-- 导入区域 -->
|
|
|
<script id="importTpl" type="text/template">
|
|
|
- <form enctype="multipart/form-data" class="mt20 mb10">
|
|
|
- <div class="col-xs-offset-1">
|
|
|
- <input type="file" id="file" name="file"/>
|
|
|
- <div class="mt10 pt5">
|
|
|
- <input type="checkbox" id="updateSupport" name="updateSupport" title="如果人员数据已经存在,更新这条数据。"> 是否更新已经存在的人员数据
|
|
|
- <a onclick="importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
|
|
+ <form enctype="multipart/form-data" class="is-import-box flex flex-direction justify-between">
|
|
|
+ <div class="flex flex-direction align-center">
|
|
|
+ <span class="color-999">提示:仅允许导入“xls”或“xlsx”格式文件!</span>
|
|
|
+ <!-- <input type="file" id="file" name="file"/> -->
|
|
|
+ <div class="flex flex-direction align-center" style="margin-top: 40px;padding: 0;">
|
|
|
+ <img style="width:112px;height:112px;" th:src="@{/img/add_select_file_icon.png}">
|
|
|
+ <a class="btn-bg-blue padding-lr-36 border-none" style="margin: 18px 0;position: relative;">
|
|
|
+ 选择文件
|
|
|
+ <input type="file" id="file" onchange="changeFile()" name="file" class="select-file-ipt"/>
|
|
|
+ </a>
|
|
|
+ <span class="color-999" id="choice_show">未选择任何文件</span>
|
|
|
</div>
|
|
|
- <font color="red" class="pull-left mt10">
|
|
|
- 提示:仅允许导入“xls”或“xlsx”格式文件!
|
|
|
- </font>
|
|
|
+ </div>
|
|
|
+ <div class="flex justify-between align-center">
|
|
|
+ <div class="flex align-center" style="padding: 0">
|
|
|
+ <input type="checkbox" class="select-update-ipt" id="updateSupport" name="updateSupport" title="如果人员数据已经存在,更新这条数据。">
|
|
|
+ <span>是否更新已经存在的人员数据</span>
|
|
|
+ </div>
|
|
|
+ <a onclick="importTemplate()" class="btn btn-xs btn-border-blue color-blue padding-lr-12">下载模板</a>
|
|
|
</div>
|
|
|
</form>
|
|
|
</script>
|