初始化
This commit is contained in:
68
packages/meta/AppVillageCadres/AppVillageCadres.vue
Normal file
68
packages/meta/AppVillageCadres/AppVillageCadres.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<section class="AppVillageCadres">
|
||||
<functionary-create v-if="isEdit" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
<functionary-detail v-else-if="showDetail" :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
<ai-list v-else>
|
||||
<ai-title slot="title" title="干部档案" isShowArea isShowBottomBorder
|
||||
:instance="instance" v-model="areaId" :hideLevel="hideLevel">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<cadre-files :instance="instance" :dict="dict" :areaId="areaId"/>
|
||||
</template>
|
||||
</ai-list>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import CadreFiles from "./cadreFiles";
|
||||
import FunctionaryCreate from "./components/functionaryCreate";
|
||||
import FunctionaryDetail from "./components/functionaryDetail";
|
||||
|
||||
export default {
|
||||
name: "AppVillageCadres",
|
||||
label: "干部档案",
|
||||
components: {FunctionaryDetail, FunctionaryCreate, CadreFiles},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
top: this
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
areaId: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
isEdit() {
|
||||
return this.$route.hash == "#add"
|
||||
},
|
||||
showDetail() {
|
||||
return this.$route.query.id
|
||||
},
|
||||
hideLevel() {
|
||||
return this.user.info?.areaList?.length - 1
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
this.areaId = JSON.parse(JSON.stringify(this.user.info.areaId))
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.AppVillageCadres {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
::v-deep .functionaryContent > .el-tabs__content {
|
||||
background: #f3f6f9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
257
packages/meta/AppVillageCadres/cadreFiles.vue
Normal file
257
packages/meta/AppVillageCadres/cadreFiles.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<section class="cadreFiles">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select placeholder="档案状态" v-model="search.status" :selectList="dict.getDict('status')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="性别" v-model="search.gender" :selectList="dict.getDict('sex')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="民族" v-model="search.nation" :selectList="dict.getDict('nation')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<ai-select placeholder="离任状态" v-model="search.outStatus" :selectList="dict.getDict('outStatus')"
|
||||
@change="page.current=1,getTableData()"/>
|
||||
<el-select
|
||||
v-model="search.servingInfo"
|
||||
size="small"
|
||||
multiple
|
||||
placeholder="职务信息(多选)"
|
||||
clearable
|
||||
@change="page.current=1,getTableData()"
|
||||
collapse-tags>
|
||||
<el-option v-for="(op,i) in dict.getDict('appVillageSearchType')" :key="i"
|
||||
:label="op.dictName" :value="op.dictValue"/>
|
||||
</el-select>
|
||||
<ai-search label="出生年月">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthdayRangeBegin"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
unlink-panels
|
||||
class="border-radius-tl border-radius-br ve-middle"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthdayRangeEnd"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
unlink-panels
|
||||
class="border-radius-tl border-radius-br ve-middle"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
</ai-search>
|
||||
<ai-search label="入党时间">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.membershipTimeRangeBegin"
|
||||
@change="page.current=1,getTableData()"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
unlink-panels
|
||||
class="border-radius-tl border-radius-br ve-middle"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"/>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.membershipTimeRangeEnd"
|
||||
@change="page.current=1,getTableData()"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
unlink-panels
|
||||
class="border-radius-tl border-radius-br ve-middle"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"/>
|
||||
</ai-search>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.param"
|
||||
size="small"
|
||||
placeholder="姓名/身份证号/联系方式"
|
||||
prefix-icon="iconfont iconSearch"
|
||||
clearable
|
||||
@change="page.current=1,getTableData()"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="iconfont iconSearch"
|
||||
style="margin-left:5px;"
|
||||
@click="page.current=1,getTableData()"
|
||||
>查询
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-refresh-right"
|
||||
style="margin-left:5px;"
|
||||
@click="resetSearch"
|
||||
>重置
|
||||
</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="iconfont iconAdd"
|
||||
size="small"
|
||||
v-if="$permissions('app_appvillagecadresnew_edit')"
|
||||
@click="handleShowDetail">添加
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="iconfont iconDelete"
|
||||
size="small"
|
||||
v-if="$permissions('app_appvillagecadresnew_del')"
|
||||
@click="handleDel"
|
||||
class="del-btn-list"
|
||||
:disabled="!hasSelected"
|
||||
>删除
|
||||
</el-button>
|
||||
<ai-download url="/app/appvillagecadresnew/export" :instance="instance"
|
||||
:params="{areaId,ids:ids.toString()}" fileName="村干部档案"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :colConfigs="colConfigs" :dict="dict" :total="page.total"
|
||||
:current.sync="page.current" :size.sync="page.size"
|
||||
@selection-change="v=>ids=v.map(e=>e.id)"
|
||||
@getList="getTableData">
|
||||
<el-table-column slot="options" prop="operate" label="操作" align="center">
|
||||
<div slot-scope="{row}">
|
||||
<el-button type="text" v-if="$permissions('app_appvillagecadresnew_detail')"
|
||||
@click="handleShowDetail(row)">详情
|
||||
</el-button>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "cadreFiles",
|
||||
inject: ['top'],
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
areaId: {default: ""}
|
||||
},
|
||||
watch: {
|
||||
areaId(v) {
|
||||
v && this.getTableData()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
search: {
|
||||
name: "",
|
||||
gender: "",
|
||||
nation: "",
|
||||
birthdayRangeBegin: "",
|
||||
birthdayRangeEnd: "",
|
||||
membershipTimeRangeBegin: "",
|
||||
membershipTimeRangeEnd: "",
|
||||
servingInfo: [],
|
||||
param: "",
|
||||
areaId: ""
|
||||
},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
ids: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.page.current = 1;
|
||||
this.page.size = 10;
|
||||
this.search = {};
|
||||
this.getTableData()
|
||||
},
|
||||
///请求列表+查询参数
|
||||
getTableData() {
|
||||
this.instance.post(`/app/appvillagecadresnew/list`, {
|
||||
...this.search, ...this.page,
|
||||
areaId: this.areaId
|
||||
}).then(res => {
|
||||
this.tableData = res.data.records;
|
||||
this.page.total = res.data.total;
|
||||
})
|
||||
},
|
||||
//新增|查看村干部档案
|
||||
handleShowDetail(e) {
|
||||
let {id} = e
|
||||
if (id) {
|
||||
this.$router.push({query: {id}})
|
||||
} else {
|
||||
this.$router.push({hash: "#add"})
|
||||
}
|
||||
},
|
||||
//删除
|
||||
handleDel() {
|
||||
this.$confirm("是否要删除这些村干部档案?").then(() => {
|
||||
this.instance.post("app/appvillagecadresnew/delete", null, {
|
||||
params: {ids: this.ids.toString()}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.getTableData();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
})
|
||||
}).catch(() => 0);
|
||||
},
|
||||
///导出个人信息
|
||||
exportExcel() {
|
||||
let {areaId} = this.user.info
|
||||
this.instance.post(`/app/appvillagecadresnew/export`, {areaId, ids: this.ids.toString()}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.dict.load("cadrePositionType", "sex", "status", "appVillageSearchType", 'outStatus')
|
||||
this.resetSearch();
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
colConfigs() {
|
||||
return [
|
||||
{type: 'selection'},
|
||||
{prop: "name", label: "姓名", align: 'center'},
|
||||
{prop: "gender", label: "性别", align: 'center', dict: 'sex'},
|
||||
{
|
||||
prop: "idNumber", label: "身份证号",
|
||||
render: (h, {row}) => h('span', null, this.idCardNoUtil.hideId(row.idNumber))
|
||||
},
|
||||
{label: "年龄", align: 'center', render: (h, {row}) => h('span', null, this.$calcAge(row.idNumber))},
|
||||
{
|
||||
prop: "membershipTime", label: "入党时间", align: 'center',
|
||||
render: (h, {row}) => h('span', null, this.$moment(row.membershipTime).format('YYYY-MM-DD')?.replace("Invalid Date", "-"))
|
||||
},
|
||||
{prop: "phone", label: "联系方式", align: 'center'},
|
||||
{prop: "outStatus", label: "离任状态", align: 'center', dict: 'outStatus'},
|
||||
{prop: "status", label: "档案状态", align: 'center', dict: 'status'},
|
||||
{slot: 'options'}
|
||||
]
|
||||
},
|
||||
hasSelected() {
|
||||
return !!this.ids?.toString()
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cadreFiles {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
591
packages/meta/AppVillageCadres/components/functionaryCreate.vue
Normal file
591
packages/meta/AppVillageCadres/components/functionaryCreate.vue
Normal file
@@ -0,0 +1,591 @@
|
||||
<template>
|
||||
<ai-detail class="functionaryCreate">
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$router.push({})"/>
|
||||
<template #content>
|
||||
<el-form :model="form" ref="cadresForm" :rules="rules" label-width="160px" size="small">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-row type="flex" class="wrap">
|
||||
<el-form-item layout label-width="0">
|
||||
<el-form-item row label="姓名:" prop="name">
|
||||
<el-row type="flex" align="middle">
|
||||
<el-input placeholder="请输入姓名" v-model="form.name" clearable/>
|
||||
<ai-person-select :instance="instance" @selectPerson="getInfoFromResident"/>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item row label="身份证号:" prop="idNumber">
|
||||
<el-input placeholder="请输入身份证号" clearable v-model="form.idNumber" :maxlength="18"
|
||||
@change="handleIdNumberInfo"/>
|
||||
</el-form-item>
|
||||
<el-form-item row label="性别:">
|
||||
<ai-select v-model="form.gender" :selectList="dict.getDict('sex')" disabled/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="个人照片:">
|
||||
<ai-avatar :instance="instance" v-model="form.avatarUrl"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出生日期:">
|
||||
<el-date-picker placeholder="请选择..." disabled
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:value="form.birthday" type="date"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="年龄:">
|
||||
<el-input placeholder="请输入年龄" :value="$calcAge(form.idNumber)||null" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式:" prop="phone">
|
||||
<el-input v-model.number="form.phone" placeholder="请输入联系方式" :maxlength="11"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="民族:">
|
||||
<ai-select v-model="form.nation" :selectList="dict.getDict('nation')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="文化程度:">
|
||||
<ai-select v-model="form.educationLevel" :selectList="dict.getDict('education_village_rc')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="政治面貌:" prop="politicalStatus">
|
||||
<ai-select v-model="form.politicalStatus" :selectList="dict.getDict('politicsStatus')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="入党时间:">
|
||||
<el-date-picker placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd 00:00:00"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="form.membershipTime"
|
||||
clearable
|
||||
type="date"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="参加工作时间:">
|
||||
<el-date-picker placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd 00:00:00"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="form.jobTime"
|
||||
type="date"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况:" prop="healthCondition">
|
||||
<ai-select v-model="form.healthCondition" :selectList="dict.getDict('healthCondition')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职称:">
|
||||
<el-input v-model="form.jobTitle" placeholder="请输入职称" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item row label="籍贯:" prop="areaId">
|
||||
<ai-area-select
|
||||
@fullname="v=>form.areaName=v"
|
||||
clearable
|
||||
always-show
|
||||
:instance="instance"
|
||||
v-model="form.areaId" :areaLevel="3"/>
|
||||
</el-form-item>
|
||||
<el-form-item row label="现住址:" prop="currentAreaId">
|
||||
<ai-area-select
|
||||
@fullname="v=>form.currentAreaName=v"
|
||||
clearable
|
||||
always-show
|
||||
:instance="instance"
|
||||
v-model="form.currentAreaId"/>
|
||||
<el-input placeholder="请输入详细地址" clearable v-model="form.currentAddress"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="学历信息">
|
||||
<template #right>
|
||||
<el-button type="text" icon="iconfont iconAdd" @click="dialog=true">添加学历信息</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table :data="form.educations" stripe border header-cell-class-name="table-header" align="center">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="educationType"
|
||||
label="学历类型"
|
||||
width="119"
|
||||
clearable
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel("appVillageCadresEducationType", scope.row.educationType) || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="educationLevel" label="学历" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel("education_village_rc", scope.row.educationalLevel) || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="graduatedSchool" label="毕业院校" width="200">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.graduatedSchool || '-' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="learnProfession" label="专业" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.learnProfession || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="graduationTime" label="毕业时间" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.graduationTime) ? (scope.row.graduationTime).substring(0, 10) : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{row,$index}" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<el-button type="text" @click="handleEditEducation(row,$index)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelEducation($index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="职务信息">
|
||||
<template #content>
|
||||
<el-row type="flex" class="wrap">
|
||||
<el-form-item row label="任职地区" prop="workAreaId">
|
||||
<ai-area-select clearable @fullname="v=>form.workAreaName=v" always-show :instance="instance"
|
||||
v-model="form.workAreaId" :disabled-level="disabledLevel"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任职时间" prop="workTime">
|
||||
<el-date-picker placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd 00:00:00"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="form.workTime"
|
||||
type="date"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务类别" prop="positionType">
|
||||
<ai-select v-model="form.positionType" :selectList="dict.getDict('cadrePositionType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否镇街下派" prop="isSubordinate">
|
||||
<ai-select v-model="form.isSubordinate" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否大学生村官" prop="isCollegeOfficer">
|
||||
<ai-select v-model="form.isCollegeOfficer" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否村(居)委会委员" prop="isVillageMember">
|
||||
<ai-select v-model="form.isVillageMember" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.villageMemberPosition1=''"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="村(居)委会委员职务" prop="villageMemberPosition1"
|
||||
v-if="form.isVillageMember==1">
|
||||
<ai-select v-model="form.villageMemberPosition1"
|
||||
:selectList="dict.getDict('appVillageMemberPosition1')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否支委委员" prop="isBranchMember">
|
||||
<ai-select v-model="form.isBranchMember" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.branchMemberPosition1=''"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="支委委员职务" v-if="form.isBranchMember==1"
|
||||
prop="branchMemberPosition1"
|
||||
:rules="[{ required: true, message: '请选择支委委员职务', trigger: 'change' }]">
|
||||
<ai-select v-model="form.branchMemberPosition1" :selectList="dict.getDict('appBranchMemberPosition1')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否村(居)务监督委员会成员" prop="isVillageSupervision">
|
||||
<ai-select v-model="form.isVillageSupervision" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.villageSupervisionPosition1=''"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="村(居)务监督委员会职务" v-if="form.isVillageSupervision==1"
|
||||
:rules="[{ required: true, message: '请选择村(居)务监督委员会职务', trigger: 'change' }]"
|
||||
prop="villageSupervisionPosition1">
|
||||
<ai-select v-model="form.villageSupervisionPosition1"
|
||||
:selectList="dict.getDict('appVillageSupervisionPosition1')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否专职干部" prop="isFulltimeCadres">
|
||||
<ai-select v-model="form.isFulltimeCadres" :selectList="dict.getDict('yesOrNo')"
|
||||
@change="form.fulltimeCadresPosition1='',form.fulltimeCadresTime=''"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="专职干部职务" v-if="form.isFulltimeCadres==1"
|
||||
prop="fulltimeCadresPosition1"
|
||||
:rules="[{ required: true, message: '请选择专职干部职务', trigger: 'change' }]">
|
||||
<ai-select v-model="form.fulltimeCadresPosition1"
|
||||
:selectList="dict.getDict('appFulltimeCadresPosition1')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="担任专职干部时间" v-if="form.isFulltimeCadres==1" prop="fulltimeCadresTime"
|
||||
:rules="[{ required: true, message: '请选择担任专职干部时间', trigger: 'change' }]">
|
||||
<el-date-picker placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd 00:00:00"
|
||||
format="yyyy-MM-dd"
|
||||
v-model="form.fulltimeCadresTime"
|
||||
type="date"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否团支部书记" prop="isLeagueSecretary">
|
||||
<ai-select v-model="form.isLeagueSecretary" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否妇联主席" prop="isWomenChairman">
|
||||
<ai-select v-model="form.isWomenChairman" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否民兵连长" prop="isMilitiaCommander">
|
||||
<ai-select v-model="form.isMilitiaCommander" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否村(居)民小组长" prop="isVillageLeader">
|
||||
<ai-select v-model="form.isVillageLeader" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否网格员" prop="isGridman">
|
||||
<ai-select v-model="form.isGridman" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否本土人才" prop="isLocalTalent">
|
||||
<ai-select v-model="form.isLocalTalent" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否异地任职" prop="isWorkDifferent">
|
||||
<ai-select v-model="form.isWorkDifferent" :selectList="dict.getDict('yesOrNo')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业技术职务">
|
||||
<el-input v-model="form.expertisePosition" placeholder="请输入..." clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="熟悉专业有何专长">
|
||||
<el-input v-model="form.professionalExpertise" placeholder="请输入..." clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他职务" prop="workDifferent">
|
||||
<el-input v-model="form.workDifferent " placeholder="请输入..." clearable/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</template>
|
||||
</ai-card>
|
||||
<tabs-card :instance="instance" :dict="dict" :permissions="permissions" :form.sync="form" editable/>
|
||||
</el-form>
|
||||
<ai-dialog :visible.sync="dialog" title="学历信息" width="720px" @onConfirm="handleSubmitEducation"
|
||||
@closed="educationForm={}">
|
||||
<el-form :rules="rules" ref="educationForm" :model="educationForm" label-width="110px" size="small">
|
||||
<el-form-item label="学历类型" prop="educationType">
|
||||
<ai-select v-model="educationForm.educationType"
|
||||
:selectList="dict.getDict('appVillageCadresEducationType')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="毕业院校" prop="graduatedSchool">
|
||||
<el-input v-model="educationForm.graduatedSchool" placeholder="请输入" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="学历" prop="educationalLevel">
|
||||
<ai-select v-model="educationForm.educationalLevel" :selectList="dict.getDict('education_village_rc')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="专业" prop="learnProfession">
|
||||
<el-input v-model="educationForm.learnProfession" placeholder="请输入" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="毕业时间:" prop="graduationTime">
|
||||
<el-date-picker placeholder="选择毕业日期"
|
||||
v-model="educationForm.graduationTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="delete-btn" @click="$router.push({})">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
import TabsCard from "./tabsCard";
|
||||
|
||||
export default {
|
||||
name: "functionaryCreate",
|
||||
components: {TabsCard},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
inject: ['top'],
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
detailTitle() {
|
||||
return !this.isEdit ? '添加干部档案' : '编辑干部档案'
|
||||
},
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
},
|
||||
disabledLevel() {
|
||||
if (!!this.form.workAreaId) {
|
||||
let code = JSON.parse(JSON.stringify(this.form.workAreaId))
|
||||
if (/0{10}$/g.test(code)) {
|
||||
return 1
|
||||
} else if (/0{8}$/g.test(code)) {
|
||||
return 2
|
||||
} else if (/0{6}$/g.test(code)) {
|
||||
return 3
|
||||
} else if (/0{3}$/g.test(code)) {
|
||||
return 4
|
||||
} else return 5
|
||||
} else return -1
|
||||
},
|
||||
rules() {
|
||||
const IdNumberPass = (rule, value, callback) => {
|
||||
const IDREG = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||
if (value) {
|
||||
if (IDREG.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证号格式错误"));
|
||||
}
|
||||
} else {
|
||||
callback(new Error("请填写身份证号"));
|
||||
}
|
||||
};
|
||||
return {
|
||||
workAreaId: [
|
||||
{required: true, validator: (r, v, cb) => /0{3}$/g.test(v) ? cb('任职地区必须选到村级') : cb(), trigger: "blur"}
|
||||
],
|
||||
currentAreaId: [
|
||||
{validator: (r, v, cb) => v && /0{3}$/g.test(v) ? cb('任职地区必须选到村级') : cb(), trigger: "blur"}
|
||||
],
|
||||
positionType: [
|
||||
{required: true, message: "请选择职务类别", trigger: "change"}
|
||||
],
|
||||
workTime: [
|
||||
{required: true, message: "请选择任职时间", trigger: "change"}
|
||||
],
|
||||
name: [{required: true, message: "请填写姓名", trigger: "blur"}],
|
||||
idNumber: [
|
||||
{required: true, validator: IdNumberPass, trigger: "blur"},
|
||||
{min: 18, max: 18, message: "身份证号码为18位数", trigger: "blur"}
|
||||
],
|
||||
gender: [{required: true, message: "请选择性别", trigger: "blur"}],
|
||||
isSubordinate: [
|
||||
{required: true, message: "请选择是否镇街下派", trigger: "change"}
|
||||
],
|
||||
isVillageMember: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择是否村(居)委会委员",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
isBranchMember: [
|
||||
{required: true, message: "请选择是否支委委员", trigger: "change"}
|
||||
],
|
||||
isVillageSupervision: [
|
||||
{required: true, message: "请选择是否村(居)务监督委员会成员", trigger: "change"}
|
||||
],
|
||||
villageMemberPosition1: [
|
||||
{required: true, message: "请选择村(居)委会委员职务"}
|
||||
],
|
||||
isFulltimeCadres: [
|
||||
{required: true, message: "请选择是否专职干部", trigger: "change"}
|
||||
],
|
||||
|
||||
isCollegeOfficer: [
|
||||
{required: true, message: "请选择是否大学生村官", trigger: "change"}
|
||||
],
|
||||
isLeagueSecretary: [
|
||||
{required: true, message: "请选择是否团支部书记", trigger: "change"}
|
||||
],
|
||||
isMilitiaCommander: [
|
||||
{required: true, message: "请选择是否民兵连长", trigger: "change"}
|
||||
],
|
||||
isGridman: [{required: true, message: "请选择是否网格员", trigger: "change"}],
|
||||
isWorkDifferent: [
|
||||
{required: true, message: "请选择是否异地任职", trigger: "change"}
|
||||
],
|
||||
isWomenChairman: [
|
||||
{required: true, message: "请选择是否妇联主席", trigger: "change"}
|
||||
],
|
||||
isVillageLeader: [
|
||||
{required: true, message: "请选择是否村(居)民小组长", trigger: "change"}
|
||||
],
|
||||
isLocalTalent: [
|
||||
{required: true, message: "请选择是否本土人才", trigger: "change"}
|
||||
],
|
||||
educationType: [
|
||||
{required: true, message: "请选择学历类型", trigger: "blur"}
|
||||
],
|
||||
graduatedSchool: [
|
||||
{required: true, message: "请输入毕业院校", trigger: "blur"}
|
||||
],
|
||||
educationalLevel: [
|
||||
{required: true, message: "请选择学历", trigger: "blur"}
|
||||
],
|
||||
learnProfession: [
|
||||
{required: true, message: "请输入专业", trigger: "blur"}
|
||||
],
|
||||
graduationTime: [
|
||||
{required: true, message: "请选择毕业时间", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false,
|
||||
form: {
|
||||
families: [],
|
||||
serves: [],
|
||||
negatives: [],
|
||||
assessments: [],
|
||||
educations: [],
|
||||
status: 1,
|
||||
|
||||
isSubordinate: '0',
|
||||
isCollegeOfficer: '0',
|
||||
isVillageMember: '0',
|
||||
villageMemberPosition1: null,
|
||||
isBranchMember: '0',
|
||||
branchMemberPosition1: null,
|
||||
isVillageSupervision: '0',
|
||||
villageSupervisionPosition1: null,
|
||||
isFulltimeCadres: '0',
|
||||
fulltimeCadresPosition1: null,
|
||||
fulltimeCadresTime: null,
|
||||
isLeagueSecretary: '0',
|
||||
isWomenChairman: '0',
|
||||
isMilitiaCommander: '0',
|
||||
isVillageLeader: '0',
|
||||
isGridman: '0',
|
||||
isLocalTalent: '0',
|
||||
isWorkDifferent: '0',
|
||||
},
|
||||
educationForm: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
this.instance.post(`/app/appvillagecadresnew/queryDetailById`, null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
let {idNumber, enterPartyTime, enterWorkTime} = res.data
|
||||
let {birthday} = this.idCardNoUtil.getIdCardInfo(idNumber)
|
||||
this.form = {
|
||||
...res.data, birthday,
|
||||
enterPartyTimeShow: this.$dateFormat(enterPartyTime),
|
||||
enterWorkTimeShow: this.$dateFormat(enterWorkTime),
|
||||
age: this.$calcAge(idNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 确认按钮
|
||||
handleSubmitEducation() {
|
||||
this.$refs.educationForm.validate(v => {
|
||||
if (v) {
|
||||
if (this.educationForm?.index > -1) {
|
||||
this.form.educations.splice(this.educationForm.index, 1, this.educationForm)
|
||||
} else {
|
||||
this.form.educations.push(this.educationForm)
|
||||
}
|
||||
this.dialog = false
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑 学历记录记录
|
||||
handleEditEducation(row, index) {
|
||||
this.educationForm = JSON.parse(JSON.stringify({...row, index}))
|
||||
this.dialog = true
|
||||
},
|
||||
//删除学历记录记录
|
||||
handleDelEducation(i) {
|
||||
this.form.educations.splice(i, 1)
|
||||
},
|
||||
getInfoFromResident(val) {
|
||||
this.form.idNumber = val.idNumber;
|
||||
this.form.name = val.name;
|
||||
this.form.avatarUrl = val.photo;
|
||||
this.form.age = val.age
|
||||
this.form.gender = val.sex
|
||||
this.form.birthday = this.$dateFormat(this.idCardNoUtil.getIdCardInfo(val.idNumber)?.birthday, "YYYY-MM-DD 00:00:00")
|
||||
this.$forceUpdate()
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$refs.cadresForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post("/app/appvillagecadresnew/addOrUpdate", {
|
||||
...this.form,
|
||||
birthday: this.$dateFormat(this.form.birthday, 'YYYY-MM-DD 00:00:00')
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
if (this.isEdit) {
|
||||
this.$router.push({query: this.$route.query})
|
||||
} else {
|
||||
this.$router.push({})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleIdNumberInfo(v) {
|
||||
if (this.idCardNoUtil.checkIdCardNo(v)) {
|
||||
let {birthday, sex} = this.idCardNoUtil.getIdCardInfo(v)
|
||||
this.form.birthday = birthday
|
||||
this.form.gender = sex
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load(
|
||||
"education_village_rc",
|
||||
"cadrePositionType",
|
||||
"healthCondition",
|
||||
"politicsStatus",
|
||||
"householdRelation",
|
||||
"presentPost",
|
||||
"partyPosition",
|
||||
"sex",
|
||||
"faithType",
|
||||
"nation",
|
||||
"appVillageSubsidyForm",
|
||||
"yesOrNo",
|
||||
"appFulltimeCadresPosition1",
|
||||
"appVillageCadresAssessmentResult",
|
||||
"appVillageSupervisionPosition1",
|
||||
"appBranchMemberPosition1",
|
||||
"appVillageCadresEducationType",
|
||||
"appVillageMemberPosition1"
|
||||
)
|
||||
this.form.workAreaId = JSON.parse(JSON.stringify(this.top.areaId))
|
||||
this.isEdit && this.getDetail()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.functionaryCreate {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
::v-deep .el-button--text {
|
||||
.iconfont {
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
.el-input, .el-select, .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .ai-card__body {
|
||||
.el-form-item {
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
|
||||
&[row] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&[column] {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&[layout] {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.AiPersonSelect {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-table__empty-text {
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
}
|
||||
|
||||
|
||||
.el-icon-delete:hover {
|
||||
color: #f46;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
318
packages/meta/AppVillageCadres/components/functionaryDetail.vue
Normal file
318
packages/meta/AppVillageCadres/components/functionaryDetail.vue
Normal file
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<ai-detail class="functionaryDetail">
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$router.push({})">
|
||||
<template #rightBtn>
|
||||
<el-row type="flex" align="middle" class="operationBtns">
|
||||
<el-button icon="iconfont iconEdit" type="primary"
|
||||
@click="$router.replace({query:$route.query,hash:'#add'})">编辑
|
||||
</el-button>
|
||||
<el-button icon="iconfont iconPerson_Transfered" v-if="$permissions('app_appvillagecadresnew_edit')&&!hasOut"
|
||||
@click="handleOutgoing">
|
||||
离任
|
||||
</el-button>
|
||||
<el-button icon="iconfont iconPrint" @click="handlePrint()" v-if="form.status == 1">打印档案
|
||||
</el-button>
|
||||
<el-button icon="iconfont iconLogout" type="danger" plain @click="handleLogout" v-if="form.status == 1">
|
||||
注销档案
|
||||
</el-button>
|
||||
<el-button icon="iconfont iconDelete" type="danger" plain @click="handleDelFile"
|
||||
v-if="$permissions('app_appvillagecadresnew_del')">
|
||||
删除人员
|
||||
</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-card :title="form.name">
|
||||
<template #content>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="性别" :value="dict.getLabel('sex', form.gender)"/>
|
||||
<ai-info-item label="身份证号">
|
||||
<ai-id mode="show" v-model="form.idNumber" right-btn/>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="getDateFormat(form.birthday)"/>
|
||||
<ai-info-item label="年龄" :value="form.age"/>
|
||||
<ai-info-item label="联系方式" :value="form.phone"/>
|
||||
<ai-info-item label="民族" :value="dict.getLabel('nation', form.nation)"/>
|
||||
<ai-info-item label="文化程度" :value="dict.getLabel('education_village_rc', form.educationLevel)"/>
|
||||
<ai-info-item label="政治面貌" :value="dict.getLabel('politicsStatus', form.politicalStatus)"/>
|
||||
<ai-info-item label="入党时间" :value="getDateFormat(form.membershipTime)"/>
|
||||
<ai-info-item label="参加工作时间" :value="getDateFormat(form.jobTime)"/>
|
||||
<ai-info-item label="健康状况" :value="dict.getLabel('healthCondition', form.healthCondition)"/>
|
||||
<ai-info-item label="职称" :value="form.jobTitle"/>
|
||||
</ai-wrapper>
|
||||
<ai-avatar v-model="form.avatarUrl" :editable="false"/>
|
||||
</el-row>
|
||||
<ai-wrapper>
|
||||
<ai-info-item isLine label="籍贯" :value="form.areaName"/>
|
||||
<ai-info-item isLine label="现住址" :value="[form.currentAreaName,form.currentAddress].join('')"/>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="学历信息">
|
||||
<template #content>
|
||||
<el-table
|
||||
:data="form.educations"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
border
|
||||
header-cell-class-name="table-header"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="educationType"
|
||||
label="学历类型"
|
||||
width="119"
|
||||
clearable
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel("appVillageCadresEducationType", scope.row.educationType) || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="educationLevel" label="学历" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel("education_village_rc", scope.row.educationalLevel) || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="graduatedSchool" label="毕业院校" width="200">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.graduatedSchool || '-' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="learnProfession" label="专业" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.learnProfession || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="graduationTime" label="毕业时间" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.graduationTime) ? (scope.row.graduationTime).substring(0, 10) : '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<span
|
||||
class="iconfont iconEdit"
|
||||
@click="editServingxl(scope)"
|
||||
style="cursor: pointer;margin-right:8px"
|
||||
/>
|
||||
<span
|
||||
class="el-icon-delete"
|
||||
@click="delServingxl(scope)"
|
||||
style="cursor: pointer"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="职务信息">
|
||||
<template #content>
|
||||
<ai-wrapper label-width="220px">
|
||||
<ai-info-item label="任职地区" :value="form.workAreaName" isLine/>
|
||||
<ai-info-item label="任职时间" :value="getDateFormat(form.workTime)"/>
|
||||
<ai-info-item label="职务类别" :value="dict.getLabel('cadrePositionType', form.positionType)"/>
|
||||
<ai-info-item label="镇街下派 是否下派" :value="dict.getLabel('yesOrNo', form.isSubordinate)"/>
|
||||
<ai-info-item label="大学生村官 是否任职" :value="dict.getLabel('yesOrNo', form.isCollegeOfficer)"/>
|
||||
<ai-info-item label="村(居)委会委员 是否任职" :value="dict.getLabel('yesOrNo', form.isVillageMember)"/>
|
||||
<ai-info-item label="担任职务"
|
||||
:value="dict.getLabel('appVillageMemberPosition1', form.villageMemberPosition1)"/>
|
||||
<ai-info-item label="支委委员 是否任职" :value="dict.getLabel('yesOrNo', form.isBranchMember)"/>
|
||||
<ai-info-item label="担任职务" :value="dict.getLabel('appBranchMemberPosition1', form.branchMemberPosition1)"/>
|
||||
<ai-info-item label="村(居)务监督委员会成员 是否任职" :value="dict.getLabel('yesOrNo', form.isVillageSupervision)"/>
|
||||
<ai-info-item label="担任职务"
|
||||
:value="dict.getLabel('appVillageSupervisionPosition1', form.villageSupervisionPosition1)"/>
|
||||
<ai-info-item label="专职干部 是否任职" :value="dict.getLabel('yesOrNo', form.isFulltimeCadres)"/>
|
||||
<ai-info-item label="担任职务"
|
||||
:value="dict.getLabel('appFulltimeCadresPosition1', form.fulltimeCadresPosition1)"/>
|
||||
<ai-info-item label="担任时间" :value="form.fulltimeCadresTime" isLine/>
|
||||
<ai-info-item label="团支部书记 是否任职" :value="dict.getLabel('yesOrNo', form.isLeagueSecretary)"/>
|
||||
<ai-info-item label="妇联主席 是否任职" :value="dict.getLabel('yesOrNo', form.isWomenChairman)"/>
|
||||
<ai-info-item label="民兵连长 是否任职" :value="dict.getLabel('yesOrNo', form.isMilitiaCommander)"/>
|
||||
<ai-info-item label="村(居)民小组长 是否任职" :value="dict.getLabel('yesOrNo', form.isVillageLeader)"/>
|
||||
<ai-info-item label="网格员 是否任职" :value="dict.getLabel('yesOrNo', form.isGridman)"/>
|
||||
<ai-info-item label="本土人才 是否任职" :value="dict.getLabel('yesOrNo', form.isLocalTalent)"/>
|
||||
<ai-info-item label="异地任职 是否任职" :value="dict.getLabel('yesOrNo', form.isWorkDifferent)"/>
|
||||
<ai-info-item label="专业技术职务" :value="form.expertisePosition"/>
|
||||
<ai-info-item label="熟悉专业有何专长" :value="form.professionalExpertise"/>
|
||||
<ai-info-item label="其他职务" :value="form.workDifferent"/>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<tabs-card :instance="instance" :dict="dict" :permissions="permissions" :form.sync="form"/>
|
||||
<print-tpl v-if="print" :info="form" :dict="dict"/>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import printJS from "print-js";
|
||||
import PrintTpl from "./printTpl";
|
||||
import TabsCard from "./tabsCard";
|
||||
|
||||
export default {
|
||||
name: "functionaryDetail",
|
||||
components: {TabsCard, PrintTpl},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
educations: []
|
||||
},
|
||||
print: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
detailTitle() {
|
||||
return !this.isEdit ? '添加干部档案' : '干部档案资料'
|
||||
},
|
||||
isEdit() {
|
||||
return !!this.$route.query.id
|
||||
},
|
||||
hasOut() {
|
||||
return this.form.outStatus != 0
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
let {id} = this.$route.query
|
||||
this.instance.post(`/app/appvillagecadresnew/queryDetailById`, null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
let {idNumber, enterPartyTime, enterWorkTime} = res.data
|
||||
let {birthday} = this.idCardNoUtil.getIdCardInfo(idNumber)
|
||||
this.form = {
|
||||
...res.data, birthday,
|
||||
enterPartyTimeShow: this.getDateFormat(enterPartyTime),
|
||||
enterWorkTimeShow: this.getDateFormat(enterWorkTime),
|
||||
age: this.$calcAge(idNumber)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getDateFormat(v) {
|
||||
return this.$moment(v).format('YYYY-MM-DD')?.replace("Invalid Date", "-")
|
||||
},
|
||||
handleOutgoing() {
|
||||
let submitOutgoing = (outStatus) => {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post("/app/appvillagecadresnew/outgoing", null, {
|
||||
params: {id, outStatus}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("修改成功!")
|
||||
this.$router.push({})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$confirm("请选择一种离任方式", {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: '正常离任',
|
||||
cancelButtonText: '非正常离任'
|
||||
}).then(() => {
|
||||
submitOutgoing(1)
|
||||
}).catch(err => {
|
||||
if (err == 'cancel') {
|
||||
submitOutgoing(2)
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePrint() {
|
||||
this.print = true;
|
||||
setTimeout(() => {
|
||||
printJS({
|
||||
printable: "printAll",
|
||||
type: "html",
|
||||
targetStyles: "*"
|
||||
})
|
||||
}, 1000)
|
||||
},
|
||||
handleLogout() {
|
||||
this.$confirm(
|
||||
`<div class="title_del">注销后,<span style="color:#26f">${[
|
||||
this.form.name,
|
||||
this.form.phone
|
||||
].join("-")}</span>的历史数据将会保留,是否确定注销该人员档案?</div>`,
|
||||
{
|
||||
title: "档案注销"
|
||||
}
|
||||
).then(() => {
|
||||
let {id} = this.form
|
||||
this.instance.post(`/app/appvillagecadresnew/cancellation`, null, {
|
||||
params: {id, status: 0}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message({message: "注销档案成功", type: "success"});
|
||||
this.$router.push({})
|
||||
}
|
||||
});
|
||||
}).catch(() => 0);
|
||||
},
|
||||
handleDelFile() {
|
||||
this.$confirm(
|
||||
`<div class="title_del">删除后,<span style="color:#26f">${[
|
||||
this.form.name,
|
||||
this.form.phone
|
||||
].join("-")}
|
||||
</span>的历史相关信息可能无法追溯查看,是否确定删除该人员档案?</div>`,
|
||||
{
|
||||
type: "error",
|
||||
title: "档案删除"
|
||||
}
|
||||
).then(() => {
|
||||
let {id: ids} = this.form
|
||||
this.instance.post(`/app/appvillagecadresnew/delete`, null, {
|
||||
params: {ids}
|
||||
})
|
||||
.then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("干部档案删除成功");
|
||||
this.$router.push({})
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.dict.load(
|
||||
"education_village_rc",
|
||||
"cadrePositionType",
|
||||
"healthCondition",
|
||||
"politicsStatus",
|
||||
"householdRelation",
|
||||
"presentPost",
|
||||
"partyPosition",
|
||||
"sex",
|
||||
"faithType",
|
||||
"nation",
|
||||
"appVillageSubsidyForm",
|
||||
"yesOrNo",
|
||||
"appFulltimeCadresPosition1",
|
||||
"appVillageCadresAssessmentResult",
|
||||
"appVillageSupervisionPosition1",
|
||||
"appBranchMemberPosition1",
|
||||
"appVillageCadresEducationType",
|
||||
"appVillageMemberPosition1",
|
||||
)
|
||||
this.isEdit && this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.functionaryDetail {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
::v-deep .ai-info-item {
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
148
packages/meta/AppVillageCadres/components/printTpl.vue
Normal file
148
packages/meta/AppVillageCadres/components/printTpl.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<section class="printTpl">
|
||||
<div class="exectl" id="printAll"><p class="printHeader">{{ info.workAreaName }}干部基本情况表</p>
|
||||
<table cellpadding="7" cellspacing="0" border="1">
|
||||
<tr>
|
||||
<td height="29"><p>姓名</p></td>
|
||||
<td colspan="2" width="60"><p class="colors"> {{ info.name || '' }} </p></td>
|
||||
<td width="65"><p>性别</p></td>
|
||||
<td colspan="3" width="84"><p class="colors"> {{ dict.getLabel('sex', info.gender) || '' }} </p></td>
|
||||
<td width="79"><p> 出生年月 </p></td>
|
||||
<td width="91"><p class="colors"> <!-- 8888 -->{{ $dateFormat(info.birthday) }} </p>
|
||||
</td>
|
||||
<td rowspan="4" width="107"><img v-if="info.avatarUrl" :src="info.avatarUrl" width="150" height="230" alt=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24"><p>民族</p></td>
|
||||
<td colspan="2" width="60"><p class="colors">{{ dict.getLabel('nation', info.nation) || '' }}</p></td>
|
||||
<td width="65"><p>籍贯</p></td>
|
||||
<td colspan="3" width="84"><p class="colors">{{ info.areaName || '' }}</p></td>
|
||||
<td width="79"><p>联系电话</p></td>
|
||||
<td width="91"><p class="colors">{{ info.phone || '' }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24"><p>入党时间</p></td>
|
||||
<td colspan="2" width="60"><p class="colors">
|
||||
{{ $dateFormat(info.membershipTime) }}</p></td>
|
||||
<td width="65"><p>参加工作时间</p></td>
|
||||
<td colspan="3" width="84"><p class="colors">{{ $dateFormat(info.jobTime) }}</p></td>
|
||||
<td width="79"><p>职称</p></td>
|
||||
<td width="91"><p class="colors">{{ info.jobTitle || '' }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="24"><p>家庭住址</p></td>
|
||||
<td colspan="4" width="139"><p class="colors">{{ info.currentAreaName + info.currentAddress || '' }}</p></td>
|
||||
<td width="90"><p>身份证号</p></td>
|
||||
<td colspan="3"><p class="colors">{{ info.idNumber || '' }}</p></td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in educations" :key="index">
|
||||
<td v-if="index==0" :rowspan="index==0 ? educations.length:''"><p>学历学位</p></td>
|
||||
<td width="80"><p>{{ dict.getLabel("appVillageCadresEducationType", item.educationType) || '' }}</p></td>
|
||||
<td colspan="2" width="10"><p class="colors">
|
||||
{{ dict.getLabel("education_village_rc", item.educationalLevel) || '' }}</p></td>
|
||||
<td width="100"><p>毕业院校系及专业</p></td>
|
||||
<td colspan="5" width="280"><p class="colors" v-if="educations.length">
|
||||
{{ item.graduatedSchool + "," + item.learnProfession }}</p></td>
|
||||
</tr>
|
||||
<tr v-for="(xl,idx) in serves" :key="idx">
|
||||
<td v-if="idx==0" align="center" height="194"
|
||||
:rowspan="idx==0?serves.length:''"><p>简历</p></td>
|
||||
<td colspan="10" width="557" valign="top"><p class="colors" v-if="serves.length">
|
||||
{{ $dateFormat(xl.careerBeginTime) + "-" + $dateFormat(xl.careerEndTime) + " 在" + xl.workAreaName + "担任" }}
|
||||
{{ dict.getLabel('partyPosition', xl.position) }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="(cf,ix) in negatives" :key="ix">
|
||||
<td height="32" v-if="ix==0" :rowspan="ix==0?negatives.length:''"><p
|
||||
align="center">奖惩情况</p></td>
|
||||
<td colspan="10" width="557"><p class="colors" v-if="negatives.length">{{ $dateFormat(cf.punishTime) }}
|
||||
因{{ cf.punishContent }}给予警告处分</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="8" height="18"><p>家庭主要成员</p></td>
|
||||
<td width="49"><p>称谓</p></td>
|
||||
<td colspan="2" width="66"><p>姓名</p></td>
|
||||
<td colspan="2" width="28"><p>年龄</p></td>
|
||||
<td width="80"><p>政治面貌</p></td>
|
||||
<td colspan="4" width="316"><p>工作单位及职位</p></td>
|
||||
</tr>
|
||||
<tr v-for="(fm,index) in families" :key="index">
|
||||
<td><p class="colors">{{ dict.getLabel('householdRelation', fm.relateType) || '' }}</p></td>
|
||||
<td colspan="2" width="66"><p class="colors">{{ fm.name || '' }}</p></td>
|
||||
<td colspan="2" width="28"><p class="colors">{{ $calcAge(fm.idNumber) || '' }}</p></td>
|
||||
<td width="41"><p class="colors">群众</p></td>
|
||||
<td colspan="4" width="316"><p class="colors">{{ fm.workUnit || "" }}</p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "printTpl",
|
||||
props: {
|
||||
info: {
|
||||
default: () => {
|
||||
}
|
||||
},
|
||||
dict: Object
|
||||
},
|
||||
computed: {
|
||||
families() {
|
||||
return this.info.families?.length > 0 ? this.info.families : 1
|
||||
},
|
||||
negatives() {
|
||||
return this.info.negatives?.length > 0 ? this.info.negatives : 1
|
||||
},
|
||||
serves() {
|
||||
return this.info.serves?.length > 0 ? this.info.serves : 1
|
||||
},
|
||||
educations() {
|
||||
return this.info.educations?.length > 0 ? this.info.educations : 1
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>.printTpl {
|
||||
.exectl {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
margin: auto;
|
||||
height: auto;
|
||||
background: #fff;
|
||||
|
||||
.printHeader {
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
height: 60px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.colors {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
tr {
|
||||
line-height: 50px;
|
||||
|
||||
td {
|
||||
height: 50px;
|
||||
line-height: 30px !important;
|
||||
text-align: center !important;
|
||||
|
||||
&:first-of-type {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}</style>
|
||||
407
packages/meta/AppVillageCadres/components/tabsCard.vue
Normal file
407
packages/meta/AppVillageCadres/components/tabsCard.vue
Normal file
@@ -0,0 +1,407 @@
|
||||
<template>
|
||||
<section class="tabsCard">
|
||||
<ai-list isTabs class="others">
|
||||
<template #tabs>
|
||||
<el-tabs v-model="currentTab">
|
||||
<el-tab-pane label="家庭成员" name="families" lazy>
|
||||
<ai-card title="家庭成员">
|
||||
<template #right v-if="editable">
|
||||
<el-button type="text" icon="iconfont iconAdd" @click="dialog.families=true">添加家庭成员</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table :data="form.families"
|
||||
stripe
|
||||
border
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="家庭成员信息为空,点击标题右侧添加按钮进行添加">
|
||||
<el-table-column align="center" prop="name" label="家属姓名" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.name || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="身份证号" width="200">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.idNumber ? row.idNumber.replace(/(\d{10})\d{6}(\d{2})/g, '$1******$2') : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="age" label="年龄" width="80">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ $calcAge(scope.row.idNumber) || '-' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="relateType" label="与本人关系" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel('householdRelation', scope.row.relateType) || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="workUnit" label="工作单位及职位" width="184">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.workUnit || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{row,$index}" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<el-button type="text" @click="handleEdit('families',row,$index)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDel('families',$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="任职经历" name="serves" lazy>
|
||||
<ai-card title="任职经历">
|
||||
<template #right v-if="editable">
|
||||
<el-button type="text" icon="iconfont iconAdd" @click="dialog.serves=true">添加任职经历</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table :data="form.serves" stripe border
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="任职经历信息为空,点击标题右侧添加按钮进行添加">
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="careerBeginTime"
|
||||
label="任职时间"
|
||||
width="113">
|
||||
<template slot-scope="{row}">
|
||||
{{ [getDateFormat(row.careerBeginTime), getDateFormat(row.careerEndTime)].join('至') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="workAreaName" label="工作地点" width="144"/>
|
||||
<el-table-column align="center" prop="workUnit" label="工作单位" width="150"/>
|
||||
<el-table-column align="center" prop="position" label="职务" width="89">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ dict.getLabel('partyPosition', scope.row.position) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="workContent"
|
||||
label="主要工作内容"
|
||||
width="168"
|
||||
/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{row,$index}" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<el-button type="text" @click="handleEdit('serves',row,$index)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDel('serves',$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="负面记录" name="negatives" lazy>
|
||||
<ai-card title="负面记录">
|
||||
<template #right v-if="editable">
|
||||
<el-button type="text" icon="iconfont iconAdd" @click="dialog.negatives=true">添加负面记录</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table :data="form.negatives" stripe border
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="负面记录为空,点击标题右侧添加按钮进行添加">
|
||||
<el-table-column align="center" prop="punishTime" label="处罚日期" width="144">
|
||||
<template slot-scope="{row}">
|
||||
{{ getDateFormat(row.punishTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="punishContent"
|
||||
label="处罚事由"
|
||||
width="242"/>
|
||||
<el-table-column align="center" prop="createTime" label="登记日期" width="141">
|
||||
<template slot-scope="{row}">
|
||||
{{ getDateFormat(row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="createUser" label="登记人" width="137">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.createUser || '-' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{row,$index}" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<el-button type="text" @click="handleEdit('negatives',row,$index)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDel('negatives',$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="年度考核" name="assessments" lazy>
|
||||
<ai-card title="年度考核">
|
||||
<template #right v-if="editable">
|
||||
<el-button type="text" icon="iconfont iconAdd" @click="dialog.assessments=true">添加考核评价</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-table
|
||||
:data="form.assessments"
|
||||
stripe
|
||||
border
|
||||
header-cell-class-name="table-header"
|
||||
empty-text="考核信息为空,点击标题右侧添加按钮进行添加">
|
||||
<el-table-column align="center" prop="year" label="考核年度" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.year }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="assessmentResult"
|
||||
label="评价结果"
|
||||
width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
dict.getLabel('appVillageCadresAssessmentResult', scope.row.assessmentResult) || '-'
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="remark" label="备注" width="384"/>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{row,$index}" v-if="$permissions('app_appvillagecadresnew_edit')">
|
||||
<el-button type="text" @click="handleEdit('assessments',row,$index)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDel('assessments',$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog :visible.sync="dialog.families" title="家庭成员" width="720px" @onConfirm="handleSubmit('families')"
|
||||
@closed="familiesForm={}">
|
||||
<el-form :rules="rules" ref="familiesForm" :model="familiesForm" size="small" label-width="140px">
|
||||
<el-form-item label="家属姓名:" prop="name">
|
||||
<el-input v-model="familiesForm.name" placeholder="请输入家属姓名" maxlength="15"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号:">
|
||||
<el-input placeholder="请输入身份证号" clearable
|
||||
v-model="familiesForm.idNumber" maxlength="18"
|
||||
@change="familiesForm.age=$calcAge(familiesForm.idNumber)"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="与本人关系:">
|
||||
<ai-select v-model="familiesForm.relateType" :selectList="dict.getDict('householdRelation')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作单位及职位:">
|
||||
<el-input v-model="familiesForm.workUnit" placeholder="请输入工作单位及职位" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog :visible.sync="dialog.serves" title="任职经历" width="800px" @onConfirm="handleSubmit('serves')"
|
||||
@closed="servesForm={}">
|
||||
<el-form :rules="rules" ref="servesForm" :model="servesForm" size="small" label-width="120px">
|
||||
<el-form-item label="任职时间:" required>
|
||||
<el-form-item prop="careerBeginTime" class="mar-b0">
|
||||
<el-date-picker
|
||||
v-model="servesForm.careerBeginTime"
|
||||
type="date"
|
||||
placeholder="选择开始日期"
|
||||
class="input-172 mar-r16"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="careerEndTime" class="mar-b0">
|
||||
<el-date-picker
|
||||
v-model="servesForm.careerEndTime"
|
||||
type="date"
|
||||
placeholder="选择结束日期"
|
||||
class="input-172"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作地点:" prop="workAreaId" class="area">
|
||||
<ai-area-select placeholder="请选择工作地点"
|
||||
clearable
|
||||
@fullname="v=>servesForm.workAreaName=v"
|
||||
always-show
|
||||
:instance="instance"
|
||||
v-model="servesForm.workAreaId"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作单位:" prop="workUnit">
|
||||
<el-input v-model="servesForm.workUnit" placeholder="请输入工作单位" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务:" prop="position" class="user select-240">
|
||||
<ai-select v-model="servesForm.position" :selectList="dict.getDict('partyPosition')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主要工作内容:" prop="workContent" class="user mar-b0">
|
||||
<el-input v-model="servesForm.workContent" placeholder="请输入主要工作内容" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog :visible.sync="dialog.negatives" title="负面记录" width="720px" @onConfirm="handleSubmit('negatives')"
|
||||
@closed="negativesForm={}">
|
||||
<el-form :rules="rules" ref="negativesForm" :model="negativesForm" size="small" label-width="100px">
|
||||
<el-form-item label="处罚日期" prop="punishTime">
|
||||
<el-date-picker placeholder="选择处罚日期"
|
||||
v-model="negativesForm.punishTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处罚事由" prop="punishContent">
|
||||
<el-input v-model="negativesForm.punishContent" placeholder="请输入处罚事由" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog :visible.sync="dialog.assessments" title="年度考核" width="720px" @onConfirm="handleSubmit('assessments')"
|
||||
@closed="assessmentsForm={}">
|
||||
<el-form :rules="rules" ref="assessmentsForm" :model="assessmentsForm" size="small" label-width="100px">
|
||||
<el-form-item label="考核年度:" prop="year">
|
||||
<el-input v-model="assessmentsForm.year" placeholder="请输入" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价结果:" prop="assessmentResult">
|
||||
<ai-select v-model="assessmentsForm.assessmentResult"
|
||||
:selectList="dict.getDict('appVillageCadresAssessmentResult')"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input v-model="assessmentsForm.remark" placeholder="请输入备注" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "tabsCard",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
form: {
|
||||
default: () => {
|
||||
}
|
||||
},
|
||||
editable: Boolean
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
rules() {
|
||||
const IdNumberPass = (rule, value, callback) => {
|
||||
const IDREG = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||
if (value) {
|
||||
if (IDREG.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("身份证号格式错误"));
|
||||
}
|
||||
} else {
|
||||
callback(new Error("请填写身份证号"));
|
||||
}
|
||||
};
|
||||
///结束时间
|
||||
const endTimePass = (rule, value, callback) => {
|
||||
if (value) {
|
||||
if (this.$moment(value).unix() - this.$moment(this.servesForm.careerBeginTime).unix() > 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("结束时间要大于开始时间"));
|
||||
}
|
||||
} else {
|
||||
callback(new Error("请填写结束时间"));
|
||||
}
|
||||
};
|
||||
return {
|
||||
careerBeginTime: [
|
||||
{required: true, message: "请选择任职开始时间", trigger: "blur"}
|
||||
],
|
||||
careerEndTime: [
|
||||
{required: true, validator: endTimePass, trigger: "blur"}
|
||||
],
|
||||
workAreaId: [
|
||||
{required: true, message: "请选择工作地点", trigger: "blur"}
|
||||
],
|
||||
workUnit: [
|
||||
{required: true, message: "请输入工作单位", trigger: "blur"}
|
||||
],
|
||||
position: [{required: true, message: "请选择职务", trigger: "blur"}],
|
||||
workContent: [
|
||||
{required: true, message: "请输入主要工作内容", trigger: "blur"}
|
||||
],
|
||||
punishTime: [
|
||||
{required: true, message: "请选择处罚日期", trigger: "blur"}
|
||||
],
|
||||
punishContent: [
|
||||
{required: true, message: "请输入处罚事由", trigger: "blur"}
|
||||
],
|
||||
name: [{required: true, message: "请输入家属姓名", trigger: "blur"}],
|
||||
idNumber: [
|
||||
{required: true, validator: IdNumberPass, trigger: "blur"}
|
||||
],
|
||||
relateType: [
|
||||
{required: true, message: "请选择与本人关系", trigger: "change"}
|
||||
],
|
||||
remark: [{required: true, message: "请输入备注", trigger: "blur"}],
|
||||
assessmentResult: [
|
||||
{required: true, message: "请输入评价结果", trigger: "blur"}
|
||||
],
|
||||
year: [{required: true, message: "请输入考核年度", trigger: "blur"}]
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentTab: 'families',
|
||||
dialog: {families: false, serves: false, negatives: false, assessments: false},
|
||||
familiesForm: {},
|
||||
servesForm: {},
|
||||
negativesForm: {},
|
||||
assessmentsForm: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDateFormat(v) {
|
||||
return this.$moment(v).format('YYYY-MM-DD')?.replace("Invalid Date", "-")
|
||||
},
|
||||
handleDel(prop, index) {
|
||||
let origin = JSON.parse(JSON.stringify(this.form))
|
||||
origin?.[prop]?.splice(index, 1)
|
||||
this.$emit('update:form', origin)
|
||||
},
|
||||
handleEdit(prop, row, index) {
|
||||
this[`${prop}Form`] = JSON.parse(JSON.stringify({...row, index}))
|
||||
this.dialog[prop] = true
|
||||
},
|
||||
handleSubmit(prop) {
|
||||
this.$refs?.[`${prop}Form`]?.validate(v => {
|
||||
if (v) {
|
||||
let origin = JSON.parse(JSON.stringify(this.form)),
|
||||
form = this[`${prop}Form`]
|
||||
if (form?.index > -1) {
|
||||
origin?.[prop]?.splice(form.index, 1, form)
|
||||
} else {
|
||||
origin?.[prop]?.push(form)
|
||||
}
|
||||
form.createUser = this.user.info.name
|
||||
this.$emit('update:form', origin)
|
||||
this.dialog[prop] = false
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load('appVillageCadresAssessmentResult', 'partyPosition', 'householdRelation')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.tabsCard {
|
||||
::v-deep .others {
|
||||
padding: 0;
|
||||
|
||||
.el-tabs__content {
|
||||
padding: 10px 1px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user