页面修改

main
mo 1 year ago
parent 57e2923c04
commit 28569551f6

@ -372,7 +372,20 @@
<el-row>
<el-col :span="8">
<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-col>
@ -522,36 +535,17 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="借阅状态" prop="borrowStatus">
<el-select
v-model="form.borrowStatus"
placeholder="请选择借阅状态"
>
<el-option
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
<el-form-item label="纸档位置" prop="position">
<el-cascader
v-model="siteArray"
:options="siteOptions"
:props="propName"
placeholder="请选择纸档位置"
clearable
v-model="form.recordTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择归档时间"
@change="handleSiteChanged"
/>
</el-form-item>
</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-form-item label="完整性" prop="cherks">
<el-select v-model="form.cherks" placeholder="请选择归档状态">
@ -564,20 +558,6 @@
</el-select>
</el-form-item>
</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-form>
@ -603,6 +583,8 @@ import {
import FileUpload from "@/components/FileUpload";
import ImagePreview from "@/components/ImagePreview";
import WxVideoPlayer from "@/views/mp/components/wx-video-play/main";
import { getSiteTree } from "@/api/setting/organization";
import { getOrganizationPage } from "@/api/setting/organization";
export default {
name: "ElectronicContracts",
@ -613,6 +595,11 @@ export default {
},
data() {
return {
propName: {
label: "pName",
value: "pId",
multiple: false,
},
getFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/",
imgs: null,
//
@ -671,10 +658,15 @@ export default {
form: {},
//
rules: {},
siteOptions: [], //
siteArray: [], //
organizationList: [],
};
},
created() {
this.getList();
this.getSiteList();
this.getOrganizationList();
},
methods: {
/** 查询列表 */
@ -688,6 +680,51 @@ export default {
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

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

Loading…
Cancel
Save