页面修改

main
mo 1 year ago
parent 57e2923c04
commit 28569551f6

@ -372,7 +372,20 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="业务实体" prop="company"> <el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" /> <el-select
v-model="form.company"
placeholder="请选择业务实体"
value-key="id"
@change="handleCompanyChange"
>
<el-option
v-for="item in organizationList"
:key="item.id"
:value="item"
:label="item.organizationName"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -522,36 +535,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="借阅状态" prop="borrowStatus"> <el-form-item label="纸档位置" prop="position">
<el-select <el-cascader
v-model="form.borrowStatus" v-model="siteArray"
placeholder="请选择借阅状态" :options="siteOptions"
> :props="propName"
<el-option placeholder="请选择纸档位置"
v-for="dict in this.getDictDatas(DICT_TYPE.BORROW_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归档时间" prop="recordTime">
<el-date-picker
clearable clearable
v-model="form.recordTime" @change="handleSiteChanged"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择归档时间"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="纸档位置" prop="position">
<el-input v-model="form.position" placeholder="请输入纸档位置" />
</el-form-item>
</el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="完整性" prop="cherks"> <el-form-item label="完整性" prop="cherks">
<el-select v-model="form.cherks" placeholder="请选择归档状态"> <el-select v-model="form.cherks" placeholder="请选择归档状态">
@ -564,20 +558,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="归档状态" prop="fileStatus">
<el-select v-model="form.fileStatus" placeholder="请选择归档状态">
<el-option
v-for="dict in this.getDictDatas(
DICT_TYPE.ARCHIVES_FILE_STATUS
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -603,6 +583,8 @@ import {
import FileUpload from "@/components/FileUpload"; import FileUpload from "@/components/FileUpload";
import ImagePreview from "@/components/ImagePreview"; import ImagePreview from "@/components/ImagePreview";
import WxVideoPlayer from "@/views/mp/components/wx-video-play/main"; import WxVideoPlayer from "@/views/mp/components/wx-video-play/main";
import { getSiteTree } from "@/api/setting/organization";
import { getOrganizationPage } from "@/api/setting/organization";
export default { export default {
name: "ElectronicContracts", name: "ElectronicContracts",
@ -613,6 +595,11 @@ export default {
}, },
data() { data() {
return { return {
propName: {
label: "pName",
value: "pId",
multiple: false,
},
getFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/", getFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/",
imgs: null, imgs: null,
// //
@ -671,10 +658,15 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
siteOptions: [], //
siteArray: [], //
organizationList: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getSiteList();
this.getOrganizationList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -688,6 +680,51 @@ export default {
console.log(this.list); console.log(this.list);
}); });
}, },
//
getSiteList() {
getSiteTree().then((response) => {
this.siteOptions = response.data;
this.siteOptions.map((w) => {
w.children.map((l) => {
let lstr = JSON.stringify(l.children)
.replace(/depotId/g, "lId")
.replace(/cabinetId/g, "pId")
.replace(/cabinetName/g, "pName");
l.children = JSON.parse(lstr);
});
let wstr = JSON.stringify(w.children)
.replace(/organizationId/g, "wId")
.replace(/depotId/g, "pId")
.replace(/depotName/g, "pName");
w.children = JSON.parse(wstr);
});
let ostr = JSON.stringify(this.siteOptions)
.replace(/organizationId/g, "pId")
.replace(/organizationName/g, "pName");
this.siteOptions = JSON.parse(ostr);
// console.log(this.siteOptions);
});
},
//
handleSiteChanged(obj) {
if (obj != null) {
this.form.organizationId = obj[0];
this.form.depotId = obj[1];
this.form.cabinetId = obj[2];
}
},
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
});
},
//
handleCompanyChange(val) {
this.form.companyId = val.id;
this.form.company = val.organizationName;
},
/** /**
* 文件预览 * 文件预览
* @param fileUrl * @param fileUrl

@ -184,17 +184,6 @@
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="制单人" align="center" prop="createBy" />
<el-table-column
label="创建日期"
align="center"
prop="createTime"
width="180"
>
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="业务实体" align="center" prop="company" /> <el-table-column label="业务实体" align="center" prop="company" />
<el-table-column label="所属部门" align="center" prop="deptName" /> <el-table-column label="所属部门" align="center" prop="deptName" />
<el-table-column label="员工姓名" align="center" prop="name" /> <el-table-column label="员工姓名" align="center" prop="name" />
@ -239,12 +228,32 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="制单人" align="center" prop="createBy" />
<el-table-column
label="创建日期"
align="center"
prop="createTime"
width="180"
>
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
fixed="right"
width="180px"
> >
<template v-slot="scope"> <template v-slot="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
>查看
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -290,7 +299,21 @@
</el-col> --> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="业务实体" prop="company"> <el-form-item label="业务实体" prop="company">
<el-input v-model="form.company" placeholder="请输入业务实体" /> <!-- <el-input v-model="form.company" placeholder="请输入业务实体" /> -->
<el-select
v-model="form.company"
placeholder="请选择业务实体"
value-key="id"
@change="handleCompanyChange"
>
<el-option
v-for="item in organizationList"
:key="item.id"
:value="item"
:label="item.organizationName"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -386,42 +409,43 @@
<el-input v-model="form.education" placeholder="请输入学历" /> <el-input v-model="form.education" placeholder="请输入学历" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> </el-row>
<el-form-item label="教育经历" prop="educationExperience"> <el-row>
<el-col :span="24">
<el-form-item label="工作经历" prop="workExperience">
<el-input <el-input
v-model="form.educationExperience" v-model="form.workExperience"
:autosize="{ minRows: 1, maxRows: 100 }" :autosize="{ minRows: 1, maxRows: 100 }"
type="textarea" type="textarea"
placeholder="请输入教育经历" placeholder="请输入工作经历"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="24">
<el-form-item label="工作经历" prop="workExperience"> <el-form-item label="教育经历" prop="educationExperience">
<el-input <el-input
v-model="form.workExperience" v-model="form.educationExperience"
:autosize="{ minRows: 1, maxRows: 100 }" :autosize="{ minRows: 1, maxRows: 100 }"
type="textarea" type="textarea"
placeholder="请输入工作经历" placeholder="请输入教育经历"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="职位" prop="jobTitle"> <el-form-item label="职位" prop="jobTitle">
<el-input v-model="form.jobTitle" placeholder="请输入职位" /> <el-input v-model="form.jobTitle" placeholder="请输入职位" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="职位级别" prop="jobLevel"> <el-form-item label="职位级别" prop="jobLevel">
<el-input v-model="form.jobLevel" placeholder="请输入职位级别" /> <el-input v-model="form.jobLevel" placeholder="请输入职位级别" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="职位描述">
<editor v-model="form.jobDescription" :min-height="192" />
</el-form-item>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="薪酬" prop="salary"> <el-form-item label="薪酬" prop="salary">
@ -436,7 +460,7 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> </el-row>
<el-form-item label="体检记录" prop="medicalRecords"> <el-form-item label="体检记录" prop="medicalRecords">
<el-input <el-input
v-model="form.medicalRecords" v-model="form.medicalRecords"
@ -445,8 +469,6 @@
placeholder="请输入体检记录" placeholder="请输入体检记录"
/> />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="疾病史" prop="diseaseHistory"> <el-form-item label="疾病史" prop="diseaseHistory">
@ -505,8 +527,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="8">
<el-form-item label="考核评价" prop="leaveRecords"> <el-form-item label="考核评价" prop="leaveRecords">
<el-input <el-input
v-model="form.leaveRecords" v-model="form.leaveRecords"
@ -515,8 +535,6 @@
placeholder="请输入考核评价" placeholder="请输入考核评价"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="奖惩记录" prop="overtimeRecords"> <el-form-item label="奖惩记录" prop="overtimeRecords">
<el-input <el-input
v-model="form.overtimeRecords" v-model="form.overtimeRecords"
@ -525,8 +543,6 @@
placeholder="请输入奖惩记录" placeholder="请输入奖惩记录"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="培训计划" prop="welfareBenefits"> <el-form-item label="培训计划" prop="welfareBenefits">
<el-input <el-input
v-model="form.welfareBenefits" v-model="form.welfareBenefits"
@ -535,10 +551,6 @@
placeholder="请输入培训计划" placeholder="请输入培训计划"
/> />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="培训成果" prop="performanceEvaluation"> <el-form-item label="培训成果" prop="performanceEvaluation">
<el-input <el-input
v-model="form.performanceEvaluation" v-model="form.performanceEvaluation"
@ -547,8 +559,6 @@
placeholder="请输入培训成果" placeholder="请输入培训成果"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="个人标签" prop="rewardsPunishments"> <el-form-item label="个人标签" prop="rewardsPunishments">
<el-input <el-input
v-model="form.rewardsPunishments" v-model="form.rewardsPunishments"
@ -557,8 +567,6 @@
placeholder="请输入个人标签" placeholder="请输入个人标签"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="兴趣爱好" prop="trainingRecords"> <el-form-item label="兴趣爱好" prop="trainingRecords">
<el-input <el-input
v-model="form.trainingRecords" v-model="form.trainingRecords"
@ -567,10 +575,6 @@
placeholder="请输入兴趣爱好" placeholder="请输入兴趣爱好"
/> />
</el-form-item> </el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="特长" prop="personalDescription"> <el-form-item label="特长" prop="personalDescription">
<el-input <el-input
v-model="form.personalDescription" v-model="form.personalDescription"
@ -579,7 +583,7 @@
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
</el-col> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="年度" prop="year"> <el-form-item label="年度" prop="year">
<el-date-picker <el-date-picker
@ -608,41 +612,20 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="借阅状态" prop="borrowStatus"> <el-form-item label="纸档位置" prop="position">
<el-select <el-cascader
v-model="form.borrowStatus" v-model="siteArray"
placeholder="请选择借阅状态" :options="siteOptions"
> :props="propName"
<el-option placeholder="请选择纸档位置"
v-for="dict in this.getDictDatas(DICT_TYPE.BORROW_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="归档时间" prop="recordTime">
<el-date-picker
clearable clearable
v-model="form.recordTime" @change="handleSiteChanged"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择归档时间"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="纸档位置" prop="position">
<el-input v-model="form.position" placeholder="请输入纸档位置" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="完整性" prop="cherks"> <el-form-item label="完整性" prop="cherks">
<el-select v-model="form.cherks" placeholder="请选择归档状态"> <el-select v-model="form.cherks" placeholder="请选择完整性">
<el-option <el-option
v-for="dict in this.getDictDatas(DICT_TYPE.CHERKS)" v-for="dict in this.getDictDatas(DICT_TYPE.CHERKS)"
:key="dict.value" :key="dict.value"
@ -652,24 +635,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="归档状态" prop="fileStatus">
<el-select v-model="form.fileStatus" placeholder="请选择归档状态">
<el-option
v-for="dict in this.getDictDatas(
DICT_TYPE.ARCHIVES_FILE_STATUS
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item label="职位描述">
<editor v-model="form.jobDescription" :min-height="192" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm" v-if="optType != 'view'"
> </el-button
>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -686,6 +660,8 @@ import {
exportElectronicEmployeeExcel, exportElectronicEmployeeExcel,
} from "@/api/ea/electronicEmployee/electronicEmployee"; } from "@/api/ea/electronicEmployee/electronicEmployee";
import Editor from "@/components/Editor"; import Editor from "@/components/Editor";
import { getOrganizationPage } from "@/api/setting/organization";
import { getSiteTree } from "@/api/setting/organization";
export default { export default {
name: "ElectronicEmployee", name: "ElectronicEmployee",
@ -694,8 +670,14 @@ export default {
}, },
data() { data() {
return { return {
propName: {
label: "pName",
value: "pId",
multiple: false,
},
// //
loading: true, loading: true,
optType: undefined,
// //
exportLoading: false, exportLoading: false,
// //
@ -722,9 +704,7 @@ export default {
contactNumber: null, contactNumber: null,
idCardNumber: null, idCardNumber: null,
year: null, year: null,
// year: [],
period: null, period: null,
// period: [],
borrowStatus: null, borrowStatus: null,
recordTime: [], recordTime: [],
position: null, position: null,
@ -739,10 +719,15 @@ export default {
form: {}, form: {},
// //
rules: {}, rules: {},
organizationList: [],
siteOptions: [], //
siteArray: [], //
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getOrganizationList();
this.getSiteList();
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
@ -755,6 +740,40 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//
getSiteList() {
getSiteTree().then((response) => {
this.siteOptions = response.data;
this.siteOptions.map((w) => {
w.children.map((l) => {
let lstr = JSON.stringify(l.children)
.replace(/depotId/g, "lId")
.replace(/cabinetId/g, "pId")
.replace(/cabinetName/g, "pName");
l.children = JSON.parse(lstr);
});
let wstr = JSON.stringify(w.children)
.replace(/organizationId/g, "wId")
.replace(/depotId/g, "pId")
.replace(/depotName/g, "pName");
w.children = JSON.parse(wstr);
});
let ostr = JSON.stringify(this.siteOptions)
.replace(/organizationId/g, "pId")
.replace(/organizationName/g, "pName");
this.siteOptions = JSON.parse(ostr);
// console.log(this.siteOptions);
});
},
//
handleSiteChanged(obj) {
if (obj != null) {
this.form.organizationId = obj[0];
this.form.depotId = obj[1];
this.form.cabinetId = obj[2];
}
},
/** 取消按钮 */ /** 取消按钮 */
cancel() { cancel() {
this.open = false; this.open = false;
@ -822,11 +841,25 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.optType = "add";
this.title = "添加员工档案"; this.title = "添加员工档案";
}, },
/** 查看按钮操作 */
handleView(row) {
this.reset();
this.optType = "view";
const id = row.id;
getElectronicEmployee(id).then((response) => {
this.form = response.data;
this.dateArray(this.form.birthdate);
this.open = true;
this.title = "查看员工档案";
});
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.optType = "edit";
const id = row.id; const id = row.id;
getElectronicEmployee(id).then((response) => { getElectronicEmployee(id).then((response) => {
this.form = response.data; this.form = response.data;
@ -835,6 +868,17 @@ export default {
this.title = "修改员工档案"; this.title = "修改员工档案";
}); });
}, },
//
getOrganizationList() {
getOrganizationPage().then((response) => {
this.organizationList = response.data.list;
});
},
//
handleCompanyChange(val) {
this.form.companyId = val.id;
this.form.company = val.organizationName;
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {

Loading…
Cancel
Save