Commit 154b446b by xiaohai

build for test

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