Commit 154b446b by xiaohai

build for test

parent 48af005b
......@@ -17,10 +17,10 @@ import vueOfficeArea from '@gic-test/vue-office-area'
// 新增公共 footer插件
import vueGicFooter from '@gic-test/vue-gic-footer'
import vueGicImgPreview from '@gic-test/vue-gic-img-preview'
import vueGicUploadImage from '@gic-test/vue-gic-upload-image'
import vueOfficeUploadImage from '@gic-test/vue-office-upload-image'
Vue.use(vueGicImgPreview)
Vue.use(vueGicUploadImage)
Vue.use(vueOfficeUploadImage)
Vue.use(vueGicFooter)
Vue.use(vueOfficeArea)
Vue.use(vueOfficeAside)
......
......@@ -105,6 +105,11 @@ export const constantRouterMap = [
component: _import('contacts','recordInfo')
},
{
path: '/recordIo',
name: '导入导出员工档案',
component: _import('contacts','recordIo')
},
{
path: '/shareContact',
name: '共享通讯录',
component: _import('contacts','shareContact')
......
......@@ -34,12 +34,14 @@ export let date = {
switch (format) {
case "YY-MM":
case "yyyy-MM":
result = year + "-" + month;
break;
case "MM-DD":
result = month + "-" + day;
break;
case "YY-MM-DD":
case "YY-MM-DD":
case "yyyy-MM-dd":
result = year + "-" + month + "-" + day;
break;
case "YY-MM-DD HH:MM:SS":
......
......@@ -3,7 +3,7 @@
<div class="top-area">
<div class="top-title">
<span class="title-span">在职员工</span>
<a href="">
<a href="#/recordIo?importCode=record">
<el-button type="primary">导入员工档案<i class="el-icon-upload el-icon--right"></i></el-button>
</a>
</div>
......
......@@ -10,13 +10,13 @@
</div>
</div>
<template v-for="field in fieldList">
<editable-cell v-if="field.childrens" :key="field.fieldCode" :info="info" :items="items" :title="field.title" :fieldList="field.childrens"></editable-cell>
<editable-cell v-if="field.childrens" :key="field.fieldCode" :info="info" :staticInfo="staticInfo" :items="items" :title="field.title" :fieldList="field.childrens"></editable-cell>
</template>
</div>
</template>
<script>
import { getRequest, postRequest, postJsonRequest } from '@/api/api';
import { deepCopy } from '@/utils/index';
import { deepClone } from '@/utils/index';
import editableCell from "components/employeeRecord/editableCell";
export default {
name: "recordInfo",
......@@ -26,13 +26,14 @@ export default {
data() {
return {
info: {},
staticInfo: {},
statusList: ["正式", "试用", "离职"],
items: [],
fieldList: [],
}
},
methods: {
getEmployeeDetail() {
getEmployeeDetail() { // 获取员工详情
let ths = this;
let params = {
recordId: ths.$route.query.recordId
......@@ -41,7 +42,7 @@ export default {
.then(res => {
console.log(res, "info");
if (res.data.errorCode == 1) {
ths.info = res.data.result;
ths.getTemplate(res.data.result);
} else {
ths.$message.error({
message: res.data.message
......@@ -54,13 +55,13 @@ export default {
});
});
},
getTemplate() {
getTemplate(clerkInfo) { // 获取档案模板
let ths = this;
getRequest("/haoban-manage-web/record/employee-find-template", {})
.then(res => {
console.log(res, "模板");
if (res.data.errorCode == 1) {
ths.formatTemplateList(res.data.result);
ths.formatTemplateList(res.data.result, clerkInfo);
} else {
ths.$message.error({
message: res.data.message
......@@ -73,15 +74,24 @@ export default {
});
});
},
formatTemplateList(list) {
formatTemplateList(list, clerkInfo) { // 格式化档案详情和模板
let ths = this;
let fieldList = this.fieldList;
let copyData = list;
let obj = JSON.parse(clerkInfo.defineString);
let cInfo = deepClone(clerkInfo);
for (let key in obj) {
cInfo[key] = obj[key];
}
list.forEach(tem => {
if (tem.parentCode != 0) {
tem.fieldOperations = JSON.parse(tem.fieldOperations);
}
console.log(tem.fieldType, tem.fieldOperations, tem);
if (tem.fieldType == 6) {
cInfo[tem.fieldCode] *= 1; // 强制转为数字类型
clerkInfo[tem.fieldCode] *= 1;
}
// console.log(tem.fieldType, tem.fieldName, tem.fieldOperations, tem);
tem.title = tem.fieldName;
let arr = [];
copyData.forEach(li => {
......@@ -100,11 +110,17 @@ export default {
fieldList.sort(function(a,b){
return a.sort*1-b.sort*1;
});
console.log(fieldList, "new fieldList");
console.log(fieldList, clerkInfo, "new fieldList");
this.info = cInfo;
this.staticInfo = clerkInfo;
// ths.getEmployeeDetail();
},
getHistoryList() { // 获取员工历史纪录
}
},
beforeMount() {
this.getTemplate();
// this.getTemplate();
this.getEmployeeDetail();
}
}
......
......@@ -332,6 +332,9 @@ input:focus {
.t-rt {
text-align: right;
}
.t-ct {
text-align: center;
}
.c-909399 {
color: #909399;
}
......@@ -363,6 +366,9 @@ input:focus {
.m-b-10 {
margin-bottom: 10px;
}
.m-b-60 {
margin-bottom: 60px;
}
.font-0 .el-form-item__content, .dialog-footer {
font-size: 0;
}
......
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