Commit 449431ea by 无尘

fix: 修改 在线员工 bug

parent 1c0d270d
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.6982a5e8fe8088f33fc3f4a1d4bfc727.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.4d4262fca51349628ad9.js></script><script type=text/javascript src=./static/js/vendor.907e093428953c324a31.js></script><script type=text/javascript src=./static/js/app.0eeb6ab9f82690d3b615.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.b0f99911c12361b32cdf2a4a8cb9684f.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script type=text/javascript src=./static/js/manifest.7fc5f26f398956c3eb60.js></script><script type=text/javascript src=./static/js/vendor.907e093428953c324a31.js></script><script type=text/javascript src=./static/js/app.865e502e8f49952db0d4.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(f,r,t){for(var b,d,o,i=0,u=[];i<f.length;i++)d=f[i],a[d]&&u.push(a[d][0]),a[d]=0;for(b in r)Object.prototype.hasOwnProperty.call(r,b)&&(e[b]=r[b]);for(c&&c(f,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)o=n(n.s=t[i]);return o};var f={},a={44:0};function n(c){if(f[c])return f[c].exports;var a=f[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(e){var c=a[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,n){c=a[e]=[f,n]});c[2]=f;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"589895e663cf279b4342",1:"26fc7c6e9b4ccca95f46",2:"61d9790344919baf48c5",3:"098b660652f8f8ab930d",4:"3007ba79385a7a36b7d2",5:"83326270dfef0233c90a",6:"1d7830b4d55d08cb5ead",7:"fbeb3db819eec7392fd8",8:"1f9cc69f1d1455b4395a",9:"3466da9dc5776679b270",10:"7208d93b0fb81a57a978",11:"a637d7388af1e84b5565",12:"ff8b949463a1e4281bc8",13:"01693b96cf028e56cf1a",14:"6041281e059c0a18aff9",15:"9c4eb83d3a7630e2becd",16:"b0d2cc6fca689f99e4e2",17:"1c3793ca54eeb21da7c0",18:"e91fc37ab664cecdb432",19:"39879d07beb4c6b71c52",20:"dcb3658964b5e13967bb",21:"52f0406512b49c4c4921",22:"39f5e1d81ccacdc34ac8",23:"9f05cfc644dbcf58019a",24:"f87968cd1809bd537de5",25:"41900b7b606ec81d1b49",26:"30beb66a68cf4670017a",27:"94b3fc65a52004cfda55",28:"ce30294345c96cf957b1",29:"3d2f67e201fb157fb15d",30:"a9e98de26f049b159f2b",31:"5cf0182fc424e8606c89",32:"e0dcc7cfee4fd78f294f",33:"74ac82b84ddd0a61f0c5",34:"d29c59b220221af0352b",35:"3a1287481845f3ab0f96",36:"6ec2d4074c84f920def4",37:"a0f44cfd120df62011c9",38:"bffc9417838d0b109405",39:"7eee96327266740f3019",40:"6ff12ea562cf0ae0f1ea",43:"13848f214bb993c20004"}[e]+".js";var b=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(b);var c=a[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return t.onerror=t.onload=d,r.appendChild(t),f},n.m=e,n.c=f,n.d=function(e,c,f){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="./",n.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.4d4262fca51349628ad9.js.map
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(f,a,t){for(var b,d,o,i=0,u=[];i<f.length;i++)d=f[i],n[d]&&u.push(n[d][0]),n[d]=0;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(e[b]=a[b]);for(c&&c(f,a,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)o=r(r.s=t[i]);return o};var f={},n={44:0};function r(c){if(f[c])return f[c].exports;var n=f[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var c=n[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,r){c=n[e]=[f,r]});c[2]=f;var a=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,r.nc&&t.setAttribute("nonce",r.nc),t.src=r.p+"static/js/"+e+"."+{0:"589895e663cf279b4342",1:"26fc7c6e9b4ccca95f46",2:"61d9790344919baf48c5",3:"6633d57a1087e1b7f453",4:"d90892d76e7f52858af5",5:"dc8210180109f655b04d",6:"1d7830b4d55d08cb5ead",7:"fbeb3db819eec7392fd8",8:"1f9cc69f1d1455b4395a",9:"3466da9dc5776679b270",10:"7208d93b0fb81a57a978",11:"a637d7388af1e84b5565",12:"ff8b949463a1e4281bc8",13:"01693b96cf028e56cf1a",14:"c1429fb875a9cb64ef3c",15:"9c4eb83d3a7630e2becd",16:"7d7699e642120fa8b08b",17:"74e56664fde2697c5c7c",18:"e91fc37ab664cecdb432",19:"39879d07beb4c6b71c52",20:"dcb3658964b5e13967bb",21:"52f0406512b49c4c4921",22:"39f5e1d81ccacdc34ac8",23:"9f05cfc644dbcf58019a",24:"f87968cd1809bd537de5",25:"41900b7b606ec81d1b49",26:"30beb66a68cf4670017a",27:"94b3fc65a52004cfda55",28:"ce30294345c96cf957b1",29:"3d2f67e201fb157fb15d",30:"a9e98de26f049b159f2b",31:"5cf0182fc424e8606c89",32:"e0dcc7cfee4fd78f294f",33:"74ac82b84ddd0a61f0c5",34:"d29c59b220221af0352b",35:"3a1287481845f3ab0f96",36:"6ec2d4074c84f920def4",37:"a0f44cfd120df62011c9",38:"bffc9417838d0b109405",39:"7eee96327266740f3019",40:"6ff12ea562cf0ae0f1ea",43:"13848f214bb993c20004"}[e]+".js";var b=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(b);var c=n[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return t.onerror=t.onload=d,a.appendChild(t),f},r.m=e,r.c=f,r.d=function(e,c,f){r.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},r.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(c,"a",c),c},r.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},r.p="./",r.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.7fc5f26f398956c3eb60.js.map
\ No newline at end of file
...@@ -180,10 +180,12 @@ export default { ...@@ -180,10 +180,12 @@ export default {
let obj = formatTreeData(newArr); let obj = formatTreeData(newArr);
that.defaultOpen = obj.defaultOpen; that.defaultOpen = obj.defaultOpen;
that.menuData = obj.menuArr; that.menuData = obj.menuArr;
that.$nextTick(function(){ if (!!that.menuData.length) {
that.defaultId = !!that.menuData.length? that.menuData[0].id : ''; that.$nextTick(function(){
document.querySelector('.el-tree-node').classList.add("is-current"); that.defaultId = !!that.menuData.length? that.menuData[0].id : '';
}) document.querySelector('.el-tree-node').classList.add("is-current");
})
}
} }
} }
}; };
......
...@@ -97,7 +97,7 @@ export const constantRouterMap = [ ...@@ -97,7 +97,7 @@ export const constantRouterMap = [
}, },
{ {
path: '/employee', path: '/employee',
name: '在职员工', name: '编辑员工',
component: _import('contacts','employee') component: _import('contacts','employee')
}, },
{ {
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<div class="top-title"> <div class="top-title">
<span class="title-span">在职员工</span> <span class="title-span">在职员工</span>
<a href="#/recordIo?importCode=record"> <a href="#/recordIo?importCode=record">
<el-button type="primary">导入员工档案<i class="el-icon-upload el-icon--right"></i></el-button> <el-button type="primary">导入员工档案<i class="el-icon-upload el-icon--right"></i></el-button>
</a> </a>
</div> </div>
<div class="e-type-num-title"> <div class="e-type-num-title">
<div class="type-cell" v-for="(count, key) in countObj" :key="key" :class="key == 'onWorkCout' || key == 'noTypeWorkCount' ? 'with-bdr' : ''"> <div class="type-cell" v-for="(count, key) in countObj" :key="key" :class="key == 'onWorkCout' || key == 'noTypeWorkCount' ? 'with-bdr' : ''">
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
path: '/fileSet' path: '/fileSet'
}, },
{ {
name: '编辑员工信息', name: '在职员工',
path: '' path: ''
} }
], ],
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
.e-type-num-title { .e-type-num-title {
display: flex; display: flex;
padding: 12px 0; padding: 12px 0;
margin-top: 20px; /*margin-top: 20px;*/
color: #606266; color: #606266;
font-size: 14px; font-size: 14px;
......
<template> <template>
<div class="common-set-wrap"> <div class="common-set-wrap" :style="{'height': windowH}">
<nav-crumb :navpath="navpath"></nav-crumb> <nav-crumb :navpath="navpath"></nav-crumb>
<div class="right-content"> <div class="right-content">
<div class="right-box"> <div class="right-box" >
<div class="io-container"> <div class="io-container">
<template v-if="!dialogVisible"> <template v-if="!dialogVisible">
<ul class="tip-area"> <ul class="tip-area">
...@@ -22,13 +22,22 @@ ...@@ -22,13 +22,22 @@
<div class="step-div" style="margin-bottom :90px;"> <div class="step-div" style="margin-bottom :90px;">
<span class="ft-large"></span>下载模板 <span class="ft-large"></span>下载模板
<a href="http://www.gicdev.com/haoban-manage-web/record/export-record-template.json" class="d-u-btn"> <a href="http://www.gicdev.com/haoban-manage-web/record/export-record-template.json" class="d-u-btn">
<el-button type="primary">下载<i class="iconfont icon-icon_yunxiazai m-l-5"></i></el-button> <el-button type="primary">下载<i class="iconfont icon-icon_yunxiazai m-l-5"></i></el-button>
</a> </a>
</div> </div>
<div class="step-div"> <div class="step-div">
<span class="ft-large"></span>上传员工档案 <span class="ft-large"></span>上传员工档案
<div class="d-u-btn m-t-20"> <div class="d-u-btn" >
<el-upload class="upload-demo" ref="upload" :action="url" :on-success="uploadSuccess" :on-change="getChange" :multiple="false" :file-list="fileList" :auto-upload="false"> <el-upload
class="upload-demo"
ref="upload"
:action="url"
:multiple="false"
:file-list="fileList"
:auto-upload="false"
:before-upload="beforeAvatarUpload"
:on-success="uploadSuccess"
:on-change="getChange">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div> <div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div>
</el-upload> </el-upload>
...@@ -42,13 +51,21 @@ ...@@ -42,13 +51,21 @@
<div class="step-div" style="margin-bottom :90px;"> <div class="step-div" style="margin-bottom :90px;">
<span class="ft-large"></span>导出员工档案 <span class="ft-large"></span>导出员工档案
<a class="d-u-btn"> <a class="d-u-btn">
<el-button type="primary" @click="callExport">下载<i class="iconfont icon-icon_yunxiazai m-l-5"></i></el-button> <el-button type="primary" @click="callExport">下载<i class="iconfont icon-icon_yunxiazai m-l-5"></i></el-button>
</a> </a>
</div> </div>
<div class="step-div"> <div class="step-div">
<span class="ft-large"></span>上传更新后的员工档案 <span class="ft-large"></span>上传更新后的员工档案
<div class="d-u-btn m-t-20"> <div class="d-u-btn">
<el-upload class="upload-demo" ref="uploadEdit" :action="url" :on-success="uploadSuccess" :on-change="getChange" :multiple="false" :file-list="fileList" :auto-upload="false"> <el-upload
class="upload-demo"
ref="uploadEdit"
:action="url"
:multiple="false"
:file-list="fileList"
:auto-upload="false"
:on-success="uploadSuccess"
:on-change="getChange" >
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div> <div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div>
</el-upload> </el-upload>
...@@ -63,9 +80,9 @@ ...@@ -63,9 +80,9 @@
<div class="tip"> <div class="tip">
<!-- 导入总条数:0条,成功导入0条,<span class="red">错误导入0条</span> --> <!-- 导入总条数:0条,成功导入0条,<span class="red">错误导入0条</span> -->
</div> </div>
<a :href="'http://www.gicdev.com/haoban-manage-web/record//error-log-export?importCode='+$route.query.importCode"> <a :href="host + '/haoban-manage-web/record/error-log-export?importCode='+$route.query.importCode">
<el-button type="primary">导出错误记录</el-button> <el-button type="primary">导出错误记录</el-button>
</a> </a>
</div> </div>
<el-table v-loading="loading" :data="logList" class="m-t-20" height="400" style="width: 100%"> <el-table v-loading="loading" :data="logList" class="m-t-20" height="400" style="width: 100%">
<el-table-column type="index" width="50" label="序号"> <el-table-column type="index" width="50" label="序号">
...@@ -90,6 +107,7 @@ ...@@ -90,6 +107,7 @@
</div> </div>
</div> </div>
</div> </div>
<vue-gic-footer></vue-gic-footer>
</div> </div>
</template> </template>
<script> <script>
...@@ -128,6 +146,8 @@ export default { ...@@ -128,6 +146,8 @@ export default {
path: '' path: ''
} }
], ],
windowH: (window.screen.availHeight - 180) + 'px',
host: window.location.origin,
type: "import", type: "import",
fileList: [], fileList: [],
url: local + "/haoban-manage-web/record/record-template-file-upload", url: local + "/haoban-manage-web/record/record-template-file-upload",
...@@ -196,6 +216,19 @@ export default { ...@@ -196,6 +216,19 @@ export default {
this.logList = logList; this.logList = logList;
this.loading = false; this.loading = false;
}, },
/**
* 上传之前校验
*/
beforeAvatarUpload(file) {
console.log(file.type)
let isExcel = (fileType === 'application/vnd.ms-excel') || (fileType ==='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
if (!isExcel) {
this.$message.error('文件格式必须为 xls 或 xlsx 格式!');
}
return isExcel;
},
uploadSuccess() { uploadSuccess() {
this.fileList = []; this.fileList = [];
this.type = "note"; this.type = "note";
...@@ -205,7 +238,18 @@ export default { ...@@ -205,7 +238,18 @@ export default {
this.$refs[upload].submit(); this.$refs[upload].submit();
}, },
getChange(file, fileList) { getChange(file, fileList) {
this.fileList = fileList; console.log(file.raw.type)
let len = fileList.length - 1 < 0 ? 0 : fileList.length - 1 ;
// 判断上传文件类型
let fileType = file.raw.type;
let isExcel = (fileType === 'application/vnd.ms-excel') || (fileType ==='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
if (!isExcel) {
this.$message.error('文件格式必须为 xls 或 xlsx 格式!');
this.fileList.splice(len,1);
return false;
}
this.fileList = [fileList[len]];
}, },
callExport() { callExport() {
// 呼出导出员工设置弹窗 // 呼出导出员工设置弹窗
...@@ -219,16 +263,28 @@ export default { ...@@ -219,16 +263,28 @@ export default {
if (this.type == "note") { if (this.type == "note") {
this.getErrorNote(); this.getErrorNote();
} }
this.$nextTick(function(){
document.querySelector('.contact-wrap__body').style.overflow = 'hidden';
})
},
beforeDestroy() {
console.log(document.querySelector('.contact-wrap__body'))
document.querySelector('.contact-wrap__body').style.overflow = 'auto';
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.border-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.io-container { .io-container {
width: 100%; width: 100%;
background: #fff; background: #fff;
box-sizing: border-box; padding: 24px 32px;
padding: 28px 32px; @extend .border-box;
.tip-area { .tip-area {
width: 100%; width: 100%;
...@@ -239,6 +295,7 @@ export default { ...@@ -239,6 +295,7 @@ export default {
font-size: 13px; font-size: 13px;
font-weight: 400; font-weight: 400;
color: rgba(96, 98, 102, 1); color: rgba(96, 98, 102, 1);
@extend .border-box;
.tip { .tip {
line-height: 24px; line-height: 24px;
...@@ -304,9 +361,9 @@ export default { ...@@ -304,9 +361,9 @@ export default {
.step-div { .step-div {
.d-u-btn { .d-u-btn {
display: inline-block; display: inline-block;
vertical-align: top;
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
vertical-align: middle;
.iconfont { .iconfont {
margin-left: 5px; margin-left: 5px;
...@@ -330,7 +387,7 @@ export default { ...@@ -330,7 +387,7 @@ export default {
.up-btn-div { .up-btn-div {
text-align: center; text-align: center;
margin-top: 20px; margin-top: 40px;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment