Commit 8f9bb669 by 无尘

fix: 修改员工档案导入

parent cbdc50d3
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.812d92898aa4553cd4dfe3879212a20c.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.abe2923675521d433b66.js></script><script type=text/javascript src=./static/js/vendor.ccdd3a2984b37616bc62.js></script><script type=text/javascript src=./static/js/app.62357d6414ff90374212.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.812d92898aa4553cd4dfe3879212a20c.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.02e8b6c38cd565b6bd30.js></script><script type=text/javascript src=./static/js/vendor.ccdd3a2984b37616bc62.js></script><script type=text/javascript src=./static/js/app.62357d6414ff90374212.js></script></body></html>
\ No newline at end of file \ No newline at end of file
webpackJsonp([20],{"738z":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("3Xzz"),s=i("elmV"),o=i("P9l9"),n=i("O3H5"),l={name:"employee-io",components:{navCrumb:a.a,uploadExcelComponent:s.a,exportSet:n.a},data:function(){var t=window.location.origin;return-1!=t.indexOf("localhost")&&(t="http://www.gicdev.com"),{navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"导入员工档案",path:""}],windowH:window.screen.availHeight-180+"px",host:window.location.origin,type:"import",fileList:[],url:t+"/haoban-manage-web/record/record-template-file-upload",logList:[],loading:!0,pageSize:20,currentPage:1,total:0,tempList:[],dialogVisible:!1}},methods:{handleSizeChange:function(t){this.pageSize=t,this.getErrorNote()},handleCurrentChange:function(t){this.currentPage=t,this.getErrorNote()},resetList:function(t){this.fileList=[],"note"==t&&this.getErrorNote()},getErrorNote:function(){var t=this,e={departmentId:t.$route.query.departmentId,importCode:t.$route.query.importCode,pageNum:t.currentPage,pageSize:t.pageSize};Object(o.a)("/haoban-manage-web/record/find-error-log",e).then(function(e){1==e.data.errorCode?(t.total=e.data.result.totalCount,t.logList=e.data.result.result,t.formatData(e.data.result.template,e.data.result.page.result)):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatData:function(t,e){var i=[];t.forEach(function(t){i.push({fieldCode:t.fieldCode,fieldName:t.fieldName})}),this.tempList=i,this.logList=e,this.loading=!1},beforeAvatarUpload:function(t){var e=t.type?t.type:t.raw.type,i="application/vnd.ms-excel"===e||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===e;return i||this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),i},uploadSuccess:function(t,e){console.log(t,e),this.fileList=[],this.type="note",1==t.errorCode?(this.$message({message:t.message,type:"success"}),this.getErrorNote()):this.$message.error(t.message)},submitUpload:function(t){this.$refs[t].submit()},getChange:function(t,e){var i=e.length-1<0?0:e.length-1,a=t.type?t.type:t.raw.type;if(!("application/vnd.ms-excel"===a||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===a))return this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),this.fileList.splice(i,1),!1;this.fileList=[e[i]]},callExport:function(){this.dialogVisible=!0},cancelCho:function(){this.dialogVisible=!1}},beforeMount:function(){"note"==this.type&&this.getErrorNote(),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="hidden"})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="auto"}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"common-set-wrap record-io-wrap",style:{height:t.windowH}},[i("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"io-container"},[t.dialogVisible?[i("export-set",{on:{cancelCho:t.cancelCho}})]:[t._m(0),t._v(" "),i("el-radio-group",{staticClass:"m-t-20",on:{change:t.resetList},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-radio-button",{attrs:{label:"import"}},[t._v("导入员工档案")]),t._v(" "),i("el-radio-button",{attrs:{label:"note"}},[t._v("错误记录")])],1),t._v(" "),"import"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("下载模板\n "),i("a",{staticClass:"d-u-btn",attrs:{href:t.host+"/haoban-manage-web/record/export-record-template.json"}},[i("el-button",{attrs:{type:"primary"}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"before-upload":t.beforeAvatarUpload,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("upload")}}},[t._v("上传")])],1)]):"export"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("导出员工档案\n "),i("a",{staticClass:"d-u-btn"},[i("el-button",{attrs:{type:"primary"},on:{click:t.callExport}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传更新后的员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"uploadEdit",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("uploadEdit")}}},[t._v("上传")])],1)]):i("div",{staticClass:"error-log import"},[i("div",{staticClass:"title-area"},[t._m(1),t._v(" "),i("a",{attrs:{href:t.host+"/haoban-manage-web/record/error-log-export?importCode="+t.$route.query.importCode}},[i("el-button",{attrs:{type:"primary"}},[t._v("导出错误记录")])],1)]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"m-t-20",staticStyle:{width:"100%"},attrs:{data:t.logList,height:"400"}},[i("el-table-column",{attrs:{type:"index",width:"50",label:"序号"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldValue",label:"字段值"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldName",label:"字段名"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"failReason",label:"错误原因"}}),t._v(" "),t._l(t.tempList,function(t){return[i("el-table-column",{key:t.fieldCode,attrs:{width:"200",label:t.fieldName,prop:t.fieldCode}})]})],2),t._v(" "),t.logList.length?i("el-pagination",{staticClass:"pagination",attrs:{background:"","page-sizes":[20,40,60,80],"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1)]],2)])]),t._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"tip-area"},[i("li",{staticClass:"tip"},[t._v("\n 姓名必须和好办企业通讯录中的员工姓名保持一致,手机号必须为员工注册好办的手机号\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 员工档案导入时,直接以手机号去做匹配,通讯录中不存在的将无法导入(模板中配置的部门、职位、code,这些字段信息请保持与企业通讯录中一致,这几个字段的信息将不会修改通讯录的信息,直接取该成员对应的通讯录的字段信息)\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("如果想要新增字段,可在后台档案设置中增加,再导入模板")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("字段类型为图片上传、多选的字段无法导入、导出")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("确保导入的表头字段和后台配置表头字段的名称一致(模板下载时间不可修改)")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入\n ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip"},[this._v("导入总条数:0条,成功导入0条,"),e("span",{staticClass:"red"},[this._v("错误导入0条")])])}]};var c=i("VU/8")(l,r,!1,function(t){i("Z3rs")},null,null);e.default=c.exports},J8vX:function(t,e){},O3H5:function(t,e,i){"use strict";var a=i("mvHQ"),s=i.n(a),o=i("P9l9"),n=i("DAYN"),l={name:"export-set",components:{draggable:i.n(n).a},data:function(){return{tempList:[],checkList:[],origin:[],checkAll:!1,isIndeterminate:!1,checkedList:[]}},methods:{deleteField:function(t){this.checkedList.splice(t,1);var e=this.checkedList.map(function(t){return t.fieldCode});this.origin.forEach(function(t,i){e.includes(t.fieldCode)?t.checked=!0:t.checked=!1}),this.checkHalf()},checkHalf:function(){if(0===this.checkedList.length)return this.isIndeterminate=!1,!1;this.checkedList.length===this.origin.length?this.isIndeterminate=!1:this.isIndeterminate=!0},checkThis:function(t){var e=this;t.checked?e.checkedList.push(t):e.checkedList.forEach(function(i,a){i.fieldCode===t.fieldCode&&e.checkedList.splice(a,1)}),e.checkHalf()},handleCheckAllChange:function(t){this.checkedList=[],this.origin.forEach(function(e,i){e.checked=t,t&&(e.order=i+1)}),t&&(this.checkedList=this.origin.slice(0)),this.checkHalf()},getTemplate:function(){var t=this;Object(o.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(e){1==e.data.errorCode?t.formatTemplateList(e.data.result):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(t){var e=[],i=[],a=t;t.forEach(function(t){t.title=t.fieldName,t.name=t.fieldName,t.checked=!1;var i=[];a.forEach(function(e){e.parentCode==t.fieldCode&&i.push(e)}),i.sort(function(t,e){return 1*t.sort-1*e.sort}),i.length>0&&(t.childrens=i),0==t.parentCode&&e.push(t)}),e.sort(function(t,e){return 1*t.sort-1*e.sort}),e.forEach(function(t){i=i.concat(t.childrens)}),this.origin=i,this.tempList=e},cancelCho:function(){this.origin.forEach(function(t){t.checked=!1}),this.$emit("cancelCho")},exportCho:function(){var t=[];this.checkedList.forEach(function(e){e.checked&&t.push({fieldCode:e.fieldCode,fieldName:e.fieldName})});s()(t);var e=window.location.origin;-1!=e.indexOf("localhost")&&(e="http://www.gicdev.com"),location.href=e+"/haoban-manage-web/record/define-export?exportTitleContent="+s()(t),this.$emit("cancelCho")}},beforeMount:function(){this.getTemplate()}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"export-set-container"},[t._m(0),t._v(" "),i("div",{staticClass:"cho-list"},[i("draggable",{model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},[t._l(t.checkedList,function(e,a){return[e.checked?i("div",{key:e.fieldCode+a,staticClass:"cho"},[t._v(t._s(e.fieldName)+" "),i("i",{staticClass:"el-icon-circle-close",on:{click:function(e){t.deleteField(a)}}})]):t._e()]})],2)],1),t._v(" "),i("div",{staticClass:"cho-area"},[i("div",{staticClass:"title"},[t._v("选择需要导出的字段")]),t._v(" "),i("div",{staticClass:"cho-area-group"},[i("div",{staticClass:"group-div"},[i("div",{staticClass:"group-title"}),t._v(" "),i("ul",{staticClass:"group-son-list"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")])],1)]),t._v(" "),t._l(t.tempList,function(e,a){return i("div",{key:e.fieldCode+a,staticClass:"group-div"},[i("div",{staticClass:"group-title"},[t._v(t._s(e.title))]),t._v(" "),i("ul",{staticClass:"group-son-list"},[t._l(t.origin,function(a){return[a.parentCode==e.fieldCode?i("li",{key:a.fieldCode},[i("el-checkbox",{key:a.fieldCode,attrs:{label:a.fieldName},on:{change:function(e){t.checkThis(a)}},model:{value:a.checked,callback:function(e){t.$set(a,"checked",e)},expression:"items.checked"}},[t._v(t._s(a.fieldName))])],1):t._e()]})],2)])})],2)]),t._v(" "),i("div",{staticClass:"handle-cho-btn"},[i("el-button",{staticClass:"export-btn",attrs:{type:"primary",disabled:t.checkedList.length<1},on:{click:t.exportCho}},[i("i",{staticClass:"iconfont icon-icon_yunxiazai p-r-6"}),t._v("导出")]),t._v(" "),i("el-button",{on:{click:t.cancelCho}},[t._v("取消")])],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title"},[this._v("已选择字段"),e("span",[this._v("导出的列表中将按顺序显示这些字段(可拖拽排序)")])])}]};var c=i("VU/8")(l,r,!1,function(t){i("J8vX")},null,null);e.a=c.exports},Z3rs:function(t,e){}});
\ No newline at end of file
webpackJsonp([20],{"738z":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i("3Xzz"),s=i("elmV"),o=i("P9l9"),n=i("O3H5"),l={name:"employee-io",components:{navCrumb:a.a,uploadExcelComponent:s.a,exportSet:n.a},data:function(){var t=window.location.origin;return-1!=t.indexOf("localhost")&&(t="http://www.gicdev.com"),{navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"导入员工档案",path:""}],windowH:window.screen.availHeight-180+"px",host:window.location.origin,type:"import",fileList:[],url:t+"/haoban-manage-web/record/record-template-file-upload",logList:[],loading:!0,pageSize:20,currentPage:1,total:0,tempList:[],dialogVisible:!1}},methods:{handleSizeChange:function(t){this.pageSize=t,this.getErrorNote()},handleCurrentChange:function(t){this.currentPage=t,this.getErrorNote()},resetList:function(t){this.fileList=[],"note"==t&&this.getErrorNote()},getErrorNote:function(){var t=this,e={departmentId:t.$route.query.departmentId,importCode:t.$route.query.importCode,pageNum:t.currentPage,pageSize:t.pageSize};Object(o.a)("/haoban-manage-web/record/find-error-log",e).then(function(e){1==e.data.errorCode?(t.total=e.data.result.totalCount,t.logList=e.data.result.result,t.formatData(e.data.result.template,e.data.result.page.result)):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatData:function(t,e){var i=[];t.forEach(function(t){i.push({fieldCode:t.fieldCode,fieldName:t.fieldName})}),this.tempList=i,this.logList=e,this.loading=!1},beforeAvatarUpload:function(t){var e=t.type?t.type:t.raw.type,i="application/vnd.ms-excel"===e||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===e;return i||this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),i},uploadSuccess:function(){this.fileList=[],this.type="note",this.getErrorNote()},submitUpload:function(t){this.$refs[t].submit()},getChange:function(t,e){var i=e.length-1<0?0:e.length-1,a=t.type?t.type:t.raw.type;if(!("application/vnd.ms-excel"===a||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===a))return this.$message.error("文件格式必须为 xls 或 xlsx 格式!"),this.fileList.splice(i,1),!1;this.fileList=[e[i]]},callExport:function(){this.dialogVisible=!0},cancelCho:function(){this.dialogVisible=!1}},beforeMount:function(){"note"==this.type&&this.getErrorNote(),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="hidden"})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="auto"}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"common-set-wrap record-io-wrap",style:{height:t.windowH}},[i("nav-crumb",{attrs:{navpath:t.navpath}}),t._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"io-container"},[t.dialogVisible?[i("export-set",{on:{cancelCho:t.cancelCho}})]:[t._m(0),t._v(" "),i("el-radio-group",{staticClass:"m-t-20",on:{change:t.resetList},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-radio-button",{attrs:{label:"import"}},[t._v("导入员工档案")]),t._v(" "),i("el-radio-button",{attrs:{label:"export"}},[t._v("导出/修改员工档案")]),t._v(" "),i("el-radio-button",{attrs:{label:"note"}},[t._v("错误记录")])],1),t._v(" "),"import"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("下载模板\n "),i("a",{staticClass:"d-u-btn",attrs:{href:t.host+"/haoban-manage-web/record/export-record-template.json"}},[i("el-button",{attrs:{type:"primary"}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"before-upload":t.beforeAvatarUpload,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("upload")}}},[t._v("上传")])],1)]):"export"==t.type?i("div",{staticClass:"handle-area import"},[i("div",{staticClass:"step-div",staticStyle:{"margin-bottom":"90px","line-height":"32px"}},[i("span",{staticClass:"ft-large"},[t._v("①")]),t._v("导出员工档案\n "),i("a",{staticClass:"d-u-btn"},[i("el-button",{attrs:{type:"primary"},on:{click:t.callExport}},[t._v("下载"),i("i",{staticClass:"iconfont icon-icon_yunxiazai m-l-5"})])],1)]),t._v(" "),i("div",{staticClass:"step-div"},[i("span",{staticClass:"ft-large"},[t._v("②")]),t._v("上传更新后的员工档案\n "),i("div",{staticClass:"d-u-btn"},[i("el-upload",{ref:"uploadEdit",staticClass:"upload-demo",attrs:{action:t.url,multiple:!1,"file-list":t.fileList,"auto-upload":!1,"on-success":t.uploadSuccess,"on-change":t.getChange}},[i("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),t._v(" "),i("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("文件格式必须为xls或xlsx格式")])],1)],1)]),t._v(" "),i("div",{staticClass:"up-btn-div"},[i("el-button",{attrs:{type:"primary",disabled:0==t.fileList.length},on:{click:function(e){t.submitUpload("uploadEdit")}}},[t._v("上传")])],1)]):i("div",{staticClass:"error-log import"},[i("div",{staticClass:"title-area"},[t._m(1),t._v(" "),i("a",{attrs:{href:t.host+"/haoban-manage-web/record/error-log-export?importCode="+t.$route.query.importCode}},[i("el-button",{attrs:{type:"primary"}},[t._v("导出错误记录")])],1)]),t._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"m-t-20",staticStyle:{width:"100%"},attrs:{data:t.logList,height:"400"}},[i("el-table-column",{attrs:{type:"index",width:"50",label:"序号"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldValue",label:"字段值"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"fieldName",label:"字段名"}}),t._v(" "),i("el-table-column",{attrs:{width:"200",prop:"failReason",label:"错误原因"}}),t._v(" "),t._l(t.tempList,function(t){return[i("el-table-column",{key:t.fieldCode,attrs:{width:"200",label:t.fieldName,prop:t.fieldCode}})]})],2),t._v(" "),t.logList.length?i("el-pagination",{staticClass:"pagination",attrs:{background:"","page-sizes":[20,40,60,80],"page-size":t.pageSize,"current-page":t.currentPage,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}):t._e()],1)]],2)])]),t._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"tip-area"},[i("li",{staticClass:"tip"},[t._v("\n 姓名必须和好办企业通讯录中的员工姓名保持一致,手机号必须为员工注册好办的手机号\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 员工档案导入时,直接以手机号去做匹配,通讯录中不存在的将无法导入(模板中配置的部门、职位、code,这些字段信息请保持与企业通讯录中一致,这几个字段的信息将不会修改通讯录的信息,直接取该成员对应的通讯录的字段信息)\n ")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("如果想要新增字段,可在后台档案设置中增加,再导入模板")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("字段类型为图片上传、多选的字段无法导入、导出")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("确保导入的表头字段和后台配置表头字段的名称一致(模板下载时间不可修改)")]),t._v(" "),i("li",{staticClass:"tip"},[t._v("\n 由于数据量可能较大,每次最多导入2000条员工档案,若超过只取前2000条,可以分多次导入\n ")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"tip"},[this._v("导入总条数:0条,成功导入0条,"),e("span",{staticClass:"red"},[this._v("错误导入0条")])])}]};var r=i("VU/8")(l,c,!1,function(t){i("z7Dl")},null,null);e.default=r.exports},J8vX:function(t,e){},O3H5:function(t,e,i){"use strict";var a=i("mvHQ"),s=i.n(a),o=i("P9l9"),n=i("DAYN"),l={name:"export-set",components:{draggable:i.n(n).a},data:function(){return{tempList:[],checkList:[],origin:[],checkAll:!1,isIndeterminate:!1,checkedList:[]}},methods:{deleteField:function(t){this.checkedList.splice(t,1);var e=this.checkedList.map(function(t){return t.fieldCode});this.origin.forEach(function(t,i){e.includes(t.fieldCode)?t.checked=!0:t.checked=!1}),this.checkHalf()},checkHalf:function(){if(0===this.checkedList.length)return this.isIndeterminate=!1,!1;this.checkedList.length===this.origin.length?this.isIndeterminate=!1:this.isIndeterminate=!0},checkThis:function(t){var e=this;t.checked?e.checkedList.push(t):e.checkedList.forEach(function(i,a){i.fieldCode===t.fieldCode&&e.checkedList.splice(a,1)}),e.checkHalf()},handleCheckAllChange:function(t){this.checkedList=[],this.origin.forEach(function(e,i){e.checked=t,t&&(e.order=i+1)}),t&&(this.checkedList=this.origin.slice(0)),this.checkHalf()},getTemplate:function(){var t=this;Object(o.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(e){1==e.data.errorCode?t.formatTemplateList(e.data.result):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(t){var e=[],i=[],a=t;t.forEach(function(t){t.title=t.fieldName,t.name=t.fieldName,t.checked=!1;var i=[];a.forEach(function(e){e.parentCode==t.fieldCode&&i.push(e)}),i.sort(function(t,e){return 1*t.sort-1*e.sort}),i.length>0&&(t.childrens=i),0==t.parentCode&&e.push(t)}),e.sort(function(t,e){return 1*t.sort-1*e.sort}),e.forEach(function(t){i=i.concat(t.childrens)}),this.origin=i,this.tempList=e},cancelCho:function(){this.origin.forEach(function(t){t.checked=!1}),this.$emit("cancelCho")},exportCho:function(){var t=[];this.checkedList.forEach(function(e){e.checked&&t.push({fieldCode:e.fieldCode,fieldName:e.fieldName})});s()(t);var e=window.location.origin;-1!=e.indexOf("localhost")&&(e="http://www.gicdev.com"),location.href=e+"/haoban-manage-web/record/define-export?exportTitleContent="+s()(t),this.$emit("cancelCho")}},beforeMount:function(){this.getTemplate()}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"export-set-container"},[t._m(0),t._v(" "),i("div",{staticClass:"cho-list"},[i("draggable",{model:{value:t.checkedList,callback:function(e){t.checkedList=e},expression:"checkedList"}},[t._l(t.checkedList,function(e,a){return[e.checked?i("div",{key:e.fieldCode+a,staticClass:"cho"},[t._v(t._s(e.fieldName)+" "),i("i",{staticClass:"el-icon-circle-close",on:{click:function(e){t.deleteField(a)}}})]):t._e()]})],2)],1),t._v(" "),i("div",{staticClass:"cho-area"},[i("div",{staticClass:"title"},[t._v("选择需要导出的字段")]),t._v(" "),i("div",{staticClass:"cho-area-group"},[i("div",{staticClass:"group-div"},[i("div",{staticClass:"group-title"}),t._v(" "),i("ul",{staticClass:"group-son-list"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")])],1)]),t._v(" "),t._l(t.tempList,function(e,a){return i("div",{key:e.fieldCode+a,staticClass:"group-div"},[i("div",{staticClass:"group-title"},[t._v(t._s(e.title))]),t._v(" "),i("ul",{staticClass:"group-son-list"},[t._l(t.origin,function(a){return[a.parentCode==e.fieldCode?i("li",{key:a.fieldCode},[i("el-checkbox",{key:a.fieldCode,attrs:{label:a.fieldName},on:{change:function(e){t.checkThis(a)}},model:{value:a.checked,callback:function(e){t.$set(a,"checked",e)},expression:"items.checked"}},[t._v(t._s(a.fieldName))])],1):t._e()]})],2)])})],2)]),t._v(" "),i("div",{staticClass:"handle-cho-btn"},[i("el-button",{staticClass:"export-btn",attrs:{type:"primary",disabled:t.checkedList.length<1},on:{click:t.exportCho}},[i("i",{staticClass:"iconfont icon-icon_yunxiazai p-r-6"}),t._v("导出")]),t._v(" "),i("el-button",{on:{click:t.cancelCho}},[t._v("取消")])],1)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"title"},[this._v("已选择字段"),e("span",[this._v("导出的列表中将按顺序显示这些字段(可拖拽排序)")])])}]};var r=i("VU/8")(l,c,!1,function(t){i("J8vX")},null,null);e.a=r.exports},z7Dl:function(t,e){}});
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},d={81:0};function f(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=d[e]=[a,f]});c[2]=a;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"af175d6abf03f8f2bb2c",1:"0ebe3ead93207dc78a78",2:"592033393573b820aeb9",3:"3282d88c1532d0ca9c9e",4:"01be0f85b0acd6f1d6df",5:"4d8ee14718aaa4455e12",6:"21d51030f91361ba32ce",7:"57af0bc90206c6098149",8:"9bd56928cea92db3c119",9:"860dbe8cf83334f9e3c0",10:"16767ca611d2bc93e32e",11:"2d0a192288361dd95250",12:"3d3797e96dc9e8cc5bd4",13:"c01b6415e93d21d1c19f",14:"d9f8f7e5598d599d6b6a",15:"360a92075d219ac84088",16:"bdc37aea4c14db4484c6",17:"18d7b200f29fbb0cc9c8",18:"592a30eba9c353c71b69",19:"965b8dce6882a5f7758c",20:"d0c555939fd1aba23ab3",21:"b0e7348ff74371924c3b",22:"ae3ca1d035af160b7832",23:"9efbbc6dd315a676ce09",24:"4637a4566383d6e864cf",25:"4f9db49437ea94436d03",26:"e0b684b65d0dbf5d032b",27:"acda88d3c2aa77c9f51c",28:"e1b3c97634b8203082e4",29:"a00a8b4033e1feddfe67",30:"07a39afe8e9361ef44b8",31:"8e77909f1af264b00346",32:"ec0bbd85e6d55909453d",33:"d649a5e4d061985d1c3a",34:"629893b7dd561b646232",35:"d6f0ed32cea79ea624b3",36:"61a1c2681f78e1fd7e80",37:"4353ffce2e97d528bc9b",38:"23b83bd7920693bc35c6",39:"45b7d5b9dbe354877342",40:"18605687ea6ee1539453",41:"78d64ae1581e8ea232cc",42:"56b8d3d551364d7fcf73",43:"dd9e90d8053228b68228",44:"deb9f07fde1e218414cf",45:"feeb9dd78b7b12f700d2",46:"d0bd18109c44c009e363",47:"cb78788c573a2fd0eac5",48:"b8b992cf4ecabb60167d",49:"396af20a99e901a3b8b5",50:"331006123edd2049b7d9",51:"244dc6f576a64b7c174b",52:"3ee35b29a67a32a31d1d",53:"8ea56d269da04331dd65",54:"4b3de5b9c967cbdcb803",55:"c423570fcbf037d349d9",56:"03f9fa2efa7f832146f1",57:"ec64d57876772f26c560",58:"f8f6469b19558b91d2af",59:"014ae5d12d19afa067f5",60:"633307c153fec68e7774",61:"a6c4d42ed111c8f08d58",62:"1b7880620e9dff5a28ed",63:"02272fe3caa4b8c63c2a",64:"ebc341a9017c4b2c1112",65:"afcb60484e7a9ec39f28",66:"0c2656f4decfecb59972",67:"57f329b5a1c3658845e9",68:"ba49712f562eff6edbc3",69:"6262c1a9179f86d6e8cc",70:"d5759f121e5783b4c558",71:"95b66215f468ac6aa391",72:"b9aea07ebd1f712eee71",73:"ca033eca1f91dddaa6b2",74:"317ccff353170ac7c01f",75:"44714b271d06e1e87012",76:"7eaab216a287b1ffca0e",77:"01b9dbf75e1040e81146",80:"c4a24f0beb29dbd2892a"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]); !function(e){var c=window.webpackJsonp;window.webpackJsonp=function(d,b,n){for(var r,t,o,i=0,u=[];i<d.length;i++)t=d[i],a[t]&&u.push(a[t][0]),a[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(d,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var d={},a={81:0};function f(c){if(d[c])return d[c].exports;var a=d[c]={i:c,l:!1,exports:{}};return e[c].call(a.exports,a,a.exports,f),a.l=!0,a.exports}f.e=function(e){var c=a[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var d=new Promise(function(d,f){c=a[e]=[d,f]});c[2]=d;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"af175d6abf03f8f2bb2c",1:"0ebe3ead93207dc78a78",2:"592033393573b820aeb9",3:"3282d88c1532d0ca9c9e",4:"01be0f85b0acd6f1d6df",5:"4d8ee14718aaa4455e12",6:"21d51030f91361ba32ce",7:"57af0bc90206c6098149",8:"9bd56928cea92db3c119",9:"860dbe8cf83334f9e3c0",10:"16767ca611d2bc93e32e",11:"2d0a192288361dd95250",12:"3d3797e96dc9e8cc5bd4",13:"c01b6415e93d21d1c19f",14:"d9f8f7e5598d599d6b6a",15:"360a92075d219ac84088",16:"bdc37aea4c14db4484c6",17:"18d7b200f29fbb0cc9c8",18:"592a30eba9c353c71b69",19:"965b8dce6882a5f7758c",20:"21122bbe5eed4cd0e49b",21:"b0e7348ff74371924c3b",22:"ae3ca1d035af160b7832",23:"9efbbc6dd315a676ce09",24:"4637a4566383d6e864cf",25:"4f9db49437ea94436d03",26:"e0b684b65d0dbf5d032b",27:"acda88d3c2aa77c9f51c",28:"e1b3c97634b8203082e4",29:"a00a8b4033e1feddfe67",30:"07a39afe8e9361ef44b8",31:"8e77909f1af264b00346",32:"ec0bbd85e6d55909453d",33:"d649a5e4d061985d1c3a",34:"629893b7dd561b646232",35:"d6f0ed32cea79ea624b3",36:"61a1c2681f78e1fd7e80",37:"4353ffce2e97d528bc9b",38:"23b83bd7920693bc35c6",39:"45b7d5b9dbe354877342",40:"18605687ea6ee1539453",41:"78d64ae1581e8ea232cc",42:"56b8d3d551364d7fcf73",43:"dd9e90d8053228b68228",44:"deb9f07fde1e218414cf",45:"feeb9dd78b7b12f700d2",46:"d0bd18109c44c009e363",47:"cb78788c573a2fd0eac5",48:"b8b992cf4ecabb60167d",49:"396af20a99e901a3b8b5",50:"331006123edd2049b7d9",51:"244dc6f576a64b7c174b",52:"3ee35b29a67a32a31d1d",53:"8ea56d269da04331dd65",54:"4b3de5b9c967cbdcb803",55:"c423570fcbf037d349d9",56:"03f9fa2efa7f832146f1",57:"ec64d57876772f26c560",58:"f8f6469b19558b91d2af",59:"014ae5d12d19afa067f5",60:"633307c153fec68e7774",61:"a6c4d42ed111c8f08d58",62:"1b7880620e9dff5a28ed",63:"02272fe3caa4b8c63c2a",64:"ebc341a9017c4b2c1112",65:"afcb60484e7a9ec39f28",66:"0c2656f4decfecb59972",67:"57f329b5a1c3658845e9",68:"ba49712f562eff6edbc3",69:"6262c1a9179f86d6e8cc",70:"d5759f121e5783b4c558",71:"95b66215f468ac6aa391",72:"b9aea07ebd1f712eee71",73:"ca033eca1f91dddaa6b2",74:"317ccff353170ac7c01f",75:"44714b271d06e1e87012",76:"7eaab216a287b1ffca0e",77:"01b9dbf75e1040e81146",80:"c4a24f0beb29dbd2892a"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=a[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),d},f.m=e,f.c=d,f.d=function(e,c,d){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:d})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</ul> </ul>
<el-radio-group v-model="type" class="m-t-20" @change="resetList"> <el-radio-group v-model="type" class="m-t-20" @change="resetList">
<el-radio-button label="import">导入员工档案</el-radio-button> <el-radio-button label="import">导入员工档案</el-radio-button>
<el-radio-button label="export">导出/修改员工档案</el-radio-button> <!-- <el-radio-button label="export">导出/修改员工档案</el-radio-button> -->
<el-radio-button label="note">错误记录</el-radio-button> <el-radio-button label="note">错误记录</el-radio-button>
</el-radio-group> </el-radio-group>
<div class="handle-area import" v-if="type == 'import'"> <div class="handle-area import" v-if="type == 'import'">
...@@ -215,10 +215,20 @@ export default { ...@@ -215,10 +215,20 @@ export default {
return isExcel; return isExcel;
}, },
uploadSuccess() { uploadSuccess(res, file) {
/* eslint-disable */
console.log(res, file);
this.fileList = []; this.fileList = [];
this.type = 'note'; this.type = 'note';
this.getErrorNote(); if (res.errorCode == 1) {
this.$message({
message: res.message,
type: 'success'
});
this.getErrorNote();
}else {
this.$message.error(res.message);
}
}, },
submitUpload(upload) { submitUpload(upload) {
this.$refs[upload].submit(); this.$refs[upload].submit();
......
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