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>
\ No newline at end of file
<!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
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,12 +180,14 @@ export default {
let obj = formatTreeData(newArr);
that.defaultOpen = obj.defaultOpen;
that.menuData = obj.menuArr;
if (!!that.menuData.length) {
that.$nextTick(function(){
that.defaultId = !!that.menuData.length? that.menuData[0].id : '';
document.querySelector('.el-tree-node').classList.add("is-current");
})
}
}
}
};
</script>
......
......@@ -5,36 +5,26 @@
<el-button @click="callSelector" :disabled="disabled" style="margin-right: 10px; height:32px;">行政架构选人</el-button>
<el-button @click="callStoreSelector" style="margin-right: 10px; height:32px;">门店架构选人</el-button>
<template v-if="!isUnEmployee">
<el-select v-model="clerkType" placeholder="选择类型" @change="reGetList" class="m-r-10">
<el-option
v-for="(type, index) in typeLsit"
:key="index"
:label="type"
:value="index">
<el-select
v-model="clerkType"
placeholder="选择类型"
@change="reGetList"
class="m-r-10 w-130">
<el-option v-for="(type, index) in typeLsit" :key="index" :label="type" :value="index">
</el-option>
</el-select>
<el-select v-model="clerkStatus" placeholder="选择状态" @change="reGetList">
<el-option
v-for="(type, index) in statusList"
:key="index"
:label="type"
:value="index">
<el-select
class="w-130"
v-model="clerkStatus"
placeholder="选择状态"
@change="reGetList">
<el-option v-for="(type, index) in statusList" :key="index" :label="type" :value="index">
</el-option>
</el-select>
</template>
<div class="block" v-else>
<span class="demonstration">离职日期</span>
<el-date-picker
v-model="fireDate"
type="daterange"
align="right"
value-format="yyyy-MM-dd"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="selectDate"
:picker-options="pickerOptions2">
<el-date-picker v-model="fireDate" type="daterange" align="right" value-format="yyyy-MM-dd" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="selectDate" :picker-options="pickerOptions2">
</el-date-picker>
</div>
<el-input v-model="searchParam" placeholder="请输入姓名或手机号" style="width: 218px;margin-left:10px;" @keyup.enter.native="searchFn" clearable @clear="searchFn"></el-input>
......@@ -47,32 +37,14 @@
</template>
<li class="sld tip">共筛选出{{total}}人</li>
</ul>
<el-table
class="list-table"
height="490px"
:data="employeeList"
@sort-change="sortList"
:default-sort="{prop: 'hireDate', order: 'descending'}"
>
<el-table class="list-table" height="490px" :data="employeeList" @sort-change="sortList" :default-sort="{prop: 'hireDate', order: 'descending'}">
<template v-for="prop in propList">
<list-item :item="prop" :key="prop" @callHandle="callHandle"></list-item>
</template>
</el-table>
<el-pagination
class="pagination"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[20, 40, 60, 80]"
:page-size="pageSize"
:current-page="pageNum"
layout="total, sizes, prev, pager, next"
:total="total">
<el-pagination class="pagination" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" :current-page="pageNum" layout="total, sizes, prev, pager, next" :total="total">
</el-pagination>
<el-dialog
:title="typeTitle"
:visible.sync="dialogVisible"
width="480px">
<el-dialog :title="typeTitle" :visible.sync="dialogVisible" width="480px">
<handle-dialog :employee="employeeObj" :handleType="handleType" :typeTitle="typeTitle" @handleSuccess="handleSuccess"></handle-dialog>
</el-dialog>
<vue-select-store ref="storeSelector" @handleSelectedList="handleStoreSelectedList"></vue-select-store>
......@@ -184,8 +156,7 @@ export default {
};
_this.disabled = false;
})
.catch(e => {
});
.catch(e => {});
},
callSelector() {
this.$refs.departmentSelector.treeSet.dialogVisible = true;
......@@ -199,7 +170,7 @@ export default {
this.$emit("showExportSetFn");
} else {
let local = window.location.origin;
if (local.indexOf('localhost')!= -1) {
if (local.indexOf('localhost') != -1) {
local = 'http://www.gicdev.com';
}
let ths = this;
......@@ -254,10 +225,10 @@ export default {
ths.getEmloyeeList();
}
},
unique(arr){
unique(arr) {
let unique = {};
arr.forEach(item => {
unique[JSON.stringify(item)] = item;// 键名不会重复
unique[JSON.stringify(item)] = item; // 键名不会重复
})
arr = Object.keys(unique).map((u) => { // Object.keys()返回对象的所有键值组成的数组,map方法是一个遍历方法,返回遍历结果组成的数组.将unique对象的键名还原成对象数组
return JSON.parse(u);
......@@ -362,17 +333,21 @@ export default {
}
}
}
</script>
<style lang="scss">
.e-r-l-container {
margin-top: 24px;
/*margin-top: 24px;*/
padding: 24px;
background: #fff;
.handle-area {
display: flex;
.flex1 {
flex: 1;
display: flex;
.demonstration {
color: #606266;
margin-right: 10px;
......@@ -380,37 +355,42 @@ export default {
}
}
}
.selector-selected-list {
padding: 20px 0 0;
display: flex;
flex-wrap: wrap;
.sld {
padding: 8px 10px;
box-sizing: border-box;
background:rgba(244,244,245,1);
border:1px solid rgba(233,233,235,1);
border-radius:4px;
font-size:12px;
font-weight:400;
color:rgba(144,147,153,1);
background: rgba(244, 244, 245, 1);
border: 1px solid rgba(233, 233, 235, 1);
border-radius: 4px;
font-size: 12px;
font-weight: 400;
color: rgba(144, 147, 153, 1);
margin-right: 10px;
.el-icon-close {
cursor: pointer;
}
&.tip {
border: none;
background: none;
}
}
}
.list-table {
margin-top: 22px;
}
.pagination {
text-align: right;
margin-top: 20px;
}
}
</style>
</style>
......@@ -97,7 +97,7 @@ export const constantRouterMap = [
},
{
path: '/employee',
name: '在职员工',
name: '编辑员工',
component: _import('contacts','employee')
},
{
......
......@@ -60,7 +60,7 @@ export default {
path: '/fileSet'
},
{
name: '编辑员工信息',
name: '在职员工',
path: ''
}
],
......@@ -134,7 +134,7 @@ export default {
.e-type-num-title {
display: flex;
padding: 12px 0;
margin-top: 20px;
/*margin-top: 20px;*/
color: #606266;
font-size: 14px;
......
<template>
<div class="common-set-wrap">
<div class="common-set-wrap" :style="{'height': windowH}">
<nav-crumb :navpath="navpath"></nav-crumb>
<div class="right-content">
<div class="right-box">
<div class="right-box" >
<div class="io-container">
<template v-if="!dialogVisible">
<ul class="tip-area">
......@@ -27,8 +27,17 @@
</div>
<div class="step-div">
<span class="ft-large"></span>上传员工档案
<div class="d-u-btn m-t-20">
<el-upload class="upload-demo" ref="upload" :action="url" :on-success="uploadSuccess" :on-change="getChange" :multiple="false" :file-list="fileList" :auto-upload="false">
<div class="d-u-btn" >
<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>
<div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div>
</el-upload>
......@@ -47,8 +56,16 @@
</div>
<div class="step-div">
<span class="ft-large"></span>上传更新后的员工档案
<div class="d-u-btn m-t-20">
<el-upload class="upload-demo" ref="uploadEdit" :action="url" :on-success="uploadSuccess" :on-change="getChange" :multiple="false" :file-list="fileList" :auto-upload="false">
<div class="d-u-btn">
<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>
<div slot="tip" class="el-upload__tip">文件格式必须为xls或xlsx格式</div>
</el-upload>
......@@ -63,7 +80,7 @@
<div class="tip">
<!-- 导入总条数:0条,成功导入0条,<span class="red">错误导入0条</span> -->
</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>
</a>
</div>
......@@ -90,6 +107,7 @@
</div>
</div>
</div>
<vue-gic-footer></vue-gic-footer>
</div>
</template>
<script>
......@@ -128,6 +146,8 @@ export default {
path: ''
}
],
windowH: (window.screen.availHeight - 180) + 'px',
host: window.location.origin,
type: "import",
fileList: [],
url: local + "/haoban-manage-web/record/record-template-file-upload",
......@@ -196,6 +216,19 @@ export default {
this.logList = logList;
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() {
this.fileList = [];
this.type = "note";
......@@ -205,7 +238,18 @@ export default {
this.$refs[upload].submit();
},
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() {
// 呼出导出员工设置弹窗
......@@ -219,16 +263,28 @@ export default {
if (this.type == "note") {
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>
<style lang="scss">
.border-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.io-container {
width: 100%;
background: #fff;
box-sizing: border-box;
padding: 28px 32px;
padding: 24px 32px;
@extend .border-box;
.tip-area {
width: 100%;
......@@ -239,6 +295,7 @@ export default {
font-size: 13px;
font-weight: 400;
color: rgba(96, 98, 102, 1);
@extend .border-box;
.tip {
line-height: 24px;
......@@ -304,9 +361,9 @@ export default {
.step-div {
.d-u-btn {
display: inline-block;
vertical-align: top;
margin-left: 10px;
margin-right: 10px;
vertical-align: middle;
.iconfont {
margin-left: 5px;
......@@ -330,7 +387,7 @@ export default {
.up-btn-div {
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