目录代码整合
This commit is contained in:
58
packages/meta/AppPartyMember/AppPartyMember.vue
Normal file
58
packages/meta/AppPartyMember/AppPartyMember.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="AppPartyMember">
|
||||
<component ref="component" :is="currentPage" :selected.sync="selected" v-bind="$props"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Add from './components/Add'
|
||||
import Detail from './components/Detail'
|
||||
import {mapState} from "vuex";
|
||||
import NeighbourSetting from "./components/neighbourSetting";
|
||||
|
||||
export default {
|
||||
name: 'AppPartyMember',
|
||||
label: '党员管理',
|
||||
components: {
|
||||
NeighbourSetting,
|
||||
Add,
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions:Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selected: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
currentPage() {
|
||||
if (this.$route.hash == "#add") {
|
||||
return Add
|
||||
} else if (this.$route.hash == "#ns") {
|
||||
return NeighbourSetting
|
||||
} else if (this.$route.query.id) {
|
||||
return Detail
|
||||
} else return List
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load("yesOrNo")
|
||||
let {organizationId: id, organizationName: name} = this.user.info
|
||||
this.selected = {id, name}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppPartyMember {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
1090
packages/meta/AppPartyMember/components/Add.vue
Normal file
1090
packages/meta/AppPartyMember/components/Add.vue
Normal file
File diff suppressed because it is too large
Load Diff
507
packages/meta/AppPartyMember/components/Detail.vue
Normal file
507
packages/meta/AppPartyMember/components/Detail.vue
Normal file
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<ai-detail class="party-detail">
|
||||
<template slot="title">
|
||||
<ai-title title="党员信息详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<div>
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-avatar class="party-avatar" v-model="info.avatarUrl" :editable="false"></ai-avatar>
|
||||
<ai-info-item label="姓名">{{ info.name }}</ai-info-item>
|
||||
<ai-info-item label="性别" :value="dict.getLabel('sex', info.sex)"></ai-info-item>
|
||||
<ai-info-item label="身份证号">
|
||||
<ai-id mode="show" :value="info.idNumber" rightBtn/>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="出生日期" :value="info.birthday"></ai-info-item>
|
||||
<ai-info-item label="年龄">{{ info.age }}</ai-info-item>
|
||||
<ai-info-item label="民族" :value="dict.getLabel('nation', info.nation)"></ai-info-item>
|
||||
<ai-info-item label="籍贯" isLine :value="info.birthplaceAreaName"></ai-info-item>
|
||||
<ai-info-item label="户籍地" isLine :value="info.householdAreaName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="审核状态">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="审核状态">
|
||||
<span :class="'audit-' + info.auditStatus">{{ dict.getLabel('auditStatus', info.auditStatus) }}</span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="联络信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="联系方式">{{ info.phone || '-' }}</ai-info-item>
|
||||
<ai-info-item isLine label="现住址">{{
|
||||
((info.currentAreaName || '') + (info.currentAddress || '')) || '-'
|
||||
}}
|
||||
</ai-info-item>
|
||||
<ai-info-item label="所属党组织">{{ info.partyOrgName || '-' }}</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="党籍信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="党籍状态" :value="dict.getLabel('partyStatus',info.partyStatus)"/>
|
||||
<ai-info-item label="转正日期"
|
||||
:value="info.turnPositiveTime ? info.turnPositiveTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="任职日期"
|
||||
:value="info.partyStartDate ? info.partyStartDate.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="党员类型" :value="dict.getLabel('partyType', info.partyType)"></ai-info-item>
|
||||
<ai-info-item label="入党时间">{{
|
||||
info.joinPartyTime ? info.joinPartyTime.split(' ')[0] : '-'
|
||||
}}
|
||||
</ai-info-item>
|
||||
<ai-info-item label="党内兼职" :value="info.partyWork"></ai-info-item>
|
||||
<ai-info-item label="党内职务" :value="dict.getLabel('partyPosition', info.partyPosition)"></ai-info-item>
|
||||
<ai-info-item label="入党介绍人" :value="info.joinPartyIntroducer"></ai-info-item>
|
||||
<ai-info-item label="优秀党员" :value="dict.getLabel('yesOrNo', info.isOutstandingParty)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="党员简介">
|
||||
<template #content>
|
||||
<div v-text="info.personalProfile"/>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="流动信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="流动情况" :value="dict.getLabel('flowStatus', info.flowStatus)"></ai-info-item>
|
||||
<ai-info-item label="流入组织" v-if="info.flowStatus == 1" :value="info.flowOrgId"></ai-info-item>
|
||||
<ai-info-item label="流入时间" v-if="info.flowStatus == 1"
|
||||
:value="info.flowTime ? info.flowTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="流出组织" v-if="info.flowStatus == 0" :value="info.outFlow"></ai-info-item>
|
||||
<ai-info-item label="流出时间" v-if="info.flowStatus == 0"
|
||||
:value="info.inTime ? info.inTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
<ai-info-item label="失联时间" v-if="info.flowStatus == 2"
|
||||
:value="info.lossTime ? info.lossTime.split(' ')[0] : '-'"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="文化程度">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="72px">
|
||||
<ai-info-item label="学历" :value="dict.getLabel('education', info.education)"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="五星党员" name="五星党员" lazy></el-tab-pane>
|
||||
<el-tab-pane label="工作信息" name="工作信息" lazy></el-tab-pane>
|
||||
<el-tab-pane label="违纪信息" name="违纪信息" lazy></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="add-btn">
|
||||
<span></span>
|
||||
<!-- <div @click="addForm(activeName)">
|
||||
<i class="iconfont iconAdd"></i>
|
||||
<span>添加{{ activeName }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<ai-table
|
||||
v-if="activeName === '五星党员'"
|
||||
:border="true"
|
||||
:tableData="info.starList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs1"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column label="评定等级" slot="level" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-rate v-model="row.level" disabled show-text :texts="textlist"></el-rate>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editStar(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartyfivestar/delete')">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table
|
||||
v-if="activeName === '工作信息'"
|
||||
:border="true"
|
||||
:tableData="info.workInfoList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs2"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column label="工作时间" slot="date" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.starTime && row.endTime">{{
|
||||
row.starTime.split(' ')[0]
|
||||
}} 至 {{ row.endTime.split(' ')[0] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editJob(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartyworkinfo/delete')">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table
|
||||
v-if="activeName === '违纪信息'"
|
||||
:border="true"
|
||||
:tableData="info.disciplinaryInfoList"
|
||||
:isShowPagination="false"
|
||||
:col-configs="colConfigs3"
|
||||
:stripe="false"
|
||||
@getList="() => {}">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="editDisciplinary(row)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id, '/app/apppartydisciplinaryinfo/delete')">删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowStarForm"
|
||||
width="690px"
|
||||
:title="starId ? '修改五星党员' : '添加五星党员'"
|
||||
@close="onClose"
|
||||
@onConfirm="onStarForm">
|
||||
<el-form ref="starForm" :model="starForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="评定时间" prop="starTime"
|
||||
:rules="[{ required: true, message: '请选择评定时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="starForm.starTime"
|
||||
type="month"
|
||||
placeholder="请选择评定时间"
|
||||
style="width: 230px;" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="评定等级" prop="level"
|
||||
:rules="[{ required: true, message: '请选择评定等级', trigger: 'change' }]">
|
||||
<el-rate v-model="starForm.level" show-text :texts="textlist" style="line-height: 2.5;"></el-rate>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowJobForm"
|
||||
width="690px"
|
||||
:title="jobId ? '修改工作信息' : '添加工作信息'"
|
||||
@close="onClose"
|
||||
@onConfirm="onJobForm">
|
||||
<el-form ref="jobForm" :model="jobForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="工作时间" prop="date" :rules="[{ required: true, message: '请选择工作时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="jobForm.date"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份" end-placeholder="结束月份" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="company" :rules="[{ required: true, message: '请输入工作单位', trigger: 'blur' }]">
|
||||
<el-input size="small" :maxLength="30" v-model="jobForm.company" placeholder="请输入工作单位"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务" prop="position" :rules="[{ required: true, message: '请输入职务', trigger: 'blur' }]">
|
||||
<el-input size="small" :maxLength="30" v-model="jobForm.position" placeholder="请输入职务"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
:visible.sync="isShowDisciplinaryForm"
|
||||
width="690px"
|
||||
:title="disciplinaryId ? '修改违纪信息' : '添加违纪信息'"
|
||||
@close="onClose"
|
||||
@onConfirm="onDisciplinarForm">
|
||||
<el-form ref="disciplinaryForm" :model="disciplinaryForm" label-width="110px" label-position="right">
|
||||
<el-form-item label="时间" prop="starTime"
|
||||
:rules="[{ required: true, message: '请选择违纪时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="disciplinaryForm.starTime"
|
||||
type="month"
|
||||
placeholder="请选择违纪时间"
|
||||
style="width: 230px;" format="yyyy-MM"
|
||||
:value-format="'yyyy-MM-dd'+ ' 00:00:00'">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="违纪原因" prop="disciplinaryInfo"
|
||||
:rules="[{ required: true, message: '请输入违纪原因', trigger: 'blur' }]">
|
||||
<el-input size="small" v-model="disciplinaryForm.disciplinaryInfo" placeholder="请输入违纪原因"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理结果" prop="result" :rules="[{ required: true, message: '请输入处理结果', trigger: 'blur' }]">
|
||||
<el-input size="small" v-model="disciplinaryForm.result" placeholder="请输入处理结果"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</div>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
isShowStarForm: false,
|
||||
isShowJobForm: false,
|
||||
jobForm: {
|
||||
date: [],
|
||||
company: '',
|
||||
position: ''
|
||||
},
|
||||
jobId: '',
|
||||
starForm: {
|
||||
starTime: '',
|
||||
level: 1
|
||||
},
|
||||
disciplinaryId: '',
|
||||
isShowDisciplinaryForm: false,
|
||||
disciplinaryForm: {
|
||||
starTime: '',
|
||||
disciplinaryInfo: '',
|
||||
result: ''
|
||||
},
|
||||
starId: '',
|
||||
activeName: '五星党员',
|
||||
textlist: ['一星党员', '二星党员', '三星党员', '四星党员', '五星党员'],
|
||||
colConfigs1: [
|
||||
{prop: 'starTime', label: '评定时间', align: 'center', formart: v => v ? v.split(' ')[0] : '-'},
|
||||
{slot: 'level'}
|
||||
],
|
||||
colConfigs2: [
|
||||
{slot: 'date'},
|
||||
{prop: 'company', label: '单位', align: 'center'},
|
||||
{prop: 'position', label: '职务', align: 'center'}
|
||||
],
|
||||
colConfigs3: [
|
||||
{prop: 'starTime', label: '时间', align: 'center', formart: v => v ? v.split(' ')[0] : '-'},
|
||||
{prop: 'disciplinaryInfo', label: '违纪原因', align: 'center'},
|
||||
{prop: 'result', label: '处理结果', align: 'center'}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo() {
|
||||
let {id} = this.$route.query
|
||||
id && this.instance.post(`/app/appparty/detail`, null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
if (this.info.birthday) {
|
||||
this.info.birthday = this.info.birthday.substring(0, 10)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
remove(id, apiUrl) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`${apiUrl}?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getInfo()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
editJob(query) {
|
||||
this.jobForm = {
|
||||
...query,
|
||||
date: [query.starTime, query.endTime]
|
||||
}
|
||||
this.jobId = query.id
|
||||
|
||||
this.isShowJobForm = true
|
||||
},
|
||||
editStar(query) {
|
||||
this.starForm = {
|
||||
...query
|
||||
}
|
||||
this.starId = query.id
|
||||
|
||||
this.isShowStarForm = true
|
||||
},
|
||||
|
||||
editDisciplinary(query) {
|
||||
this.disciplinaryForm = {
|
||||
...query
|
||||
}
|
||||
this.disciplinaryId = query.id
|
||||
|
||||
this.isShowDisciplinaryForm = true
|
||||
},
|
||||
|
||||
onDisciplinarForm() {
|
||||
this.$refs.disciplinaryForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartydisciplinaryinfo/addOrUpdate`, {
|
||||
...this.disciplinaryForm,
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowDisciplinaryForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.jobId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onJobForm() {
|
||||
this.$refs.jobForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartyworkinfo/addOrUpdate`, {
|
||||
...this.jobForm,
|
||||
starTime: this.jobForm.date[0],
|
||||
endTime: this.jobForm.date[1],
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowJobForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.jobId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onStarForm() {
|
||||
this.$refs.starForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/apppartyfivestar/addOrUpdate`, {
|
||||
...this.starForm,
|
||||
idNumber: this.info.idNumber,
|
||||
partyId: this.params.id
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShowStarForm = false
|
||||
this.getInfo()
|
||||
this.$message.success(this.starId ? '编辑成功' : '新增成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.starId = ''
|
||||
this.jobId = ''
|
||||
this.disciplinaryId = ''
|
||||
this.starForm.level = 0
|
||||
this.starForm.id = ''
|
||||
this.starForm.starTime = ''
|
||||
this.jobForm.date = []
|
||||
this.jobForm.company = ''
|
||||
this.jobForm.id = ''
|
||||
this.jobForm.position = ''
|
||||
this.disciplinaryForm.starTime = ''
|
||||
this.disciplinaryForm.id = ''
|
||||
this.disciplinaryForm.disciplinaryInfo = ''
|
||||
this.disciplinaryForm.result = ''
|
||||
},
|
||||
|
||||
addForm(type) {
|
||||
if (type === '五星党员') {
|
||||
this.isShowStarForm = true
|
||||
} else if (type === '工作信息') {
|
||||
this.isShowJobForm = true
|
||||
} else {
|
||||
this.isShowDisciplinaryForm = true
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.$router.push({})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.party-detail {
|
||||
::v-deep .AiID {
|
||||
line-height: 1.4;
|
||||
color: #222;
|
||||
|
||||
.el-button {
|
||||
height: auto;
|
||||
padding: 0 8px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.party-avatar {
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.audit-0 {
|
||||
color: #FF8822 !important;
|
||||
}
|
||||
|
||||
.audit-1 {
|
||||
color: #2EA222 !important;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0 20px;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #2266FF;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.6;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
i {
|
||||
line-height: 1;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
299
packages/meta/AppPartyMember/components/List.vue
Normal file
299
packages/meta/AppPartyMember/components/List.vue
Normal file
@@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<ai-list class="partyList">
|
||||
<template slot="title">
|
||||
<ai-title title="党员管理" isShowBottomBorder/>
|
||||
</template>
|
||||
<template #left>
|
||||
<ai-tree-menu title="组织目录" searchPlaceholder="请输入党组织名称" @search="onSearch">
|
||||
<ai-party-tree
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
:instance="instance"
|
||||
:root="user.info.organizationId"
|
||||
:current-node-key="selected.id"
|
||||
@select="onTreeChange"/>
|
||||
</ai-tree-menu>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<ai-select v-model="search.sex" placeholder="请选择性别" :selectList="dict.getDict('sex')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.nation" placeholder="请选择民族" :selectList="dict.getDict('nation')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.partyStatus" placeholder="请选择党籍状态" :selectList="dict.getDict('partyStatus')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.flowStatus" placeholder="请选择流动状态" :selectList="dict.getDict('flowStatus')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.education" placeholder="请选择文化程度" :selectList="dict.getDict('education')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.partyPosition" placeholder="请选择党内职务" :selectList="dict.getDict('partyPosition')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-select v-model="search.disciplinary" placeholder="请选择违纪情况" :selectList="dict.getDict('disciplinary')"
|
||||
@change="search.current = 1, getList()"></ai-select>
|
||||
<ai-search label="出生日期">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthStart"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 180px"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 00:00:00'"/>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.birthEnd"
|
||||
type="date"
|
||||
placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 180px"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 23:59:59'"/>
|
||||
</ai-search>
|
||||
<ai-search label="入党时间">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.joinPartyStart"
|
||||
type="date"
|
||||
style="width: 180px"
|
||||
placeholder="开始日期"
|
||||
format="yyyy-MM-dd"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 00:00:00'">
|
||||
</el-date-picker>
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="search.joinPartyEnd"
|
||||
type="date"
|
||||
style="width: 180px"
|
||||
placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
@change="search.current = 1, getList()"
|
||||
clearable
|
||||
:value-format="'yyyy-MM-dd'+' 23:59:59'">
|
||||
</el-date-picker>
|
||||
</ai-search>
|
||||
<ai-search label="年龄">
|
||||
<ai-range v-model="search.age" ref="resetagefoo" @change="search.current = 1, getList()"
|
||||
@closeVal="search.age = []"/>
|
||||
</ai-search>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.con"
|
||||
size="small"
|
||||
placeholder="请输入姓名或身份证"
|
||||
clearable
|
||||
@change="search.current=1,getList()"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button size="small" :disabled="!isShowAddBtn" type="primary" icon="iconfont iconAdd" @click="toAdd()">
|
||||
添加党员
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<ai-import :instance="instance" :dict="dict" type="appparty" name="党员管理" @success="getList()"></ai-import>
|
||||
<ai-download :instance="instance" :params="exportQuery" url="/app/appparty/export2" fileName="党员明细"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:dict="dict"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
v-loading="loading"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@handleSelectionChange="handleSelectionChange"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="220px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
<el-button type="text" @click="showNeighbourSetting(row.id)"
|
||||
v-if="permissions('app_apppartyfourresident_detail')">四邻设置
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div slot="paginationBtns" class="party-table__btns">
|
||||
<span style="margin-right: 8px;" @click="removeAll">批量删除</span>
|
||||
</div>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
permissions: Function,
|
||||
dict: Object,
|
||||
selected: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
con: '',
|
||||
age: [],
|
||||
sex: '',
|
||||
nation: '',
|
||||
partyStatus: '',
|
||||
flowStatus: '',
|
||||
education: '',
|
||||
partyPosition: '',
|
||||
birthStart: '',
|
||||
birthEnd: '',
|
||||
turnPositiveStart: '',
|
||||
turnPositiveEnd: '',
|
||||
joinPartyStart: '',
|
||||
joinPartyEnd: ''
|
||||
},
|
||||
orgName: '',
|
||||
loading: false,
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{type: 'selection', label: ''},
|
||||
{prop: 'name', label: '姓名', align: 'center'},
|
||||
{prop: 'sex', label: '性别', align: 'center', dict: 'sex'},
|
||||
{prop: 'age', label: '年龄', align: 'center'},
|
||||
// {
|
||||
// prop: 'auditStatus', label: '审核状态', align: 'center',
|
||||
// render: (h, {row}) => h('span', {class: `audit-${row.auditStatus}`}, this.dict.getLabel('auditStatus', row.auditStatus))
|
||||
// },
|
||||
{prop: 'partyStatus', label: '党籍状态', align: 'center', dict: 'partyStatus'},
|
||||
{prop: 'joinPartyTime', label: '入党日期', align: 'center'},
|
||||
{prop: 'partyPosition', label: '党内职务', align: 'center', dict: 'partyPosition'},
|
||||
{prop: 'flowStatus', label: '流动状态', align: 'center', dict: 'flowStatus'},
|
||||
],
|
||||
tableData: [],
|
||||
ids: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
orgTree() {
|
||||
return this.$refs.tree?.$refs?.partyTree
|
||||
},
|
||||
exportQuery() {
|
||||
let {id: partyOrgId} = this.selected
|
||||
return {
|
||||
ids: this.ids ? this.ids.split(',') : [],
|
||||
...this.search, partyOrgId
|
||||
}
|
||||
},
|
||||
isShowAddBtn() {
|
||||
return this.selected.isLeaf == 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dict.load('disciplinary', 'partyType', 'sex', 'nation', 'education', 'partyStatus', 'partyPosition', 'flowStatus', 'auditStatus')
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
showNeighbourSetting(id) {
|
||||
this.$router.push({query: {id}, hash: "#ns"})
|
||||
},
|
||||
onTreeChange(e) {
|
||||
this.$emit("update:selected", e)
|
||||
this.getList(e.id)
|
||||
},
|
||||
|
||||
onSearch(v) {
|
||||
this.orgTree.filter(v)
|
||||
},
|
||||
|
||||
getList(partyOrgId) {
|
||||
if (!this.user.info.organizationId) return
|
||||
|
||||
this.loading = true
|
||||
partyOrgId = partyOrgId || this.selected.id
|
||||
this.instance.post(`/app/appparty/list`, null, {
|
||||
params: {partyOrgId, ...this.search, age: this.search.age?.join(',')}
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
if (res?.data) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
removeAll() {
|
||||
if (!this.ids) {
|
||||
return this.$message.error('请选择党员')
|
||||
}
|
||||
this.remove(this.ids)
|
||||
},
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v => v.id).join(',')
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appparty/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$router.push({query: {id}})
|
||||
},
|
||||
toAdd(id) {
|
||||
this.$router.push({query: {id}, hash: "#add"})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.partyList {
|
||||
.party-table__btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .audit-0 {
|
||||
color: #FF8822 !important;
|
||||
}
|
||||
|
||||
::v-deep .audit-1 {
|
||||
color: #2EA222 !important;
|
||||
}
|
||||
|
||||
::v-deep .ai-list__content--right {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-left: 1px;
|
||||
box-shadow: none;
|
||||
|
||||
.ai-list__content--right-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
224
packages/meta/AppPartyMember/components/neighbourSetting.vue
Normal file
224
packages/meta/AppPartyMember/components/neighbourSetting.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<section class="neighbourSetting">
|
||||
<ai-list>
|
||||
<ai-title slot="title" title="四邻设置" isShowBottomBorder isShowBack @onBackClick="back"/>
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="dialog=true">添加</el-button>
|
||||
<el-button icon="iconfont iconDelete" :disabled="!search.ids" @click="handleDelete(search.ids)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索党员/四邻信息" v-model="search.name" clearable
|
||||
@change="page.current=1,getTableData()" suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict"
|
||||
@selection-change="v=>search.ids=v.map(e=>e.pfrId).toString()">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="handleDelete(row.pfrId)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
<ai-dialog title="添加户主" :visible.sync="dialog" @closed="clearDialog" @onConfirm="submit"
|
||||
width="1200px">
|
||||
<ai-area-get v-model="form.areaId" :instance="instance" :root="user.info.areaId"
|
||||
@change="list.current=1,getResident()"/>
|
||||
<el-row type="flex" class="mar-t16">
|
||||
<ai-table ref="Residents" :tableData="residents" :total="list.total" :current.sync="list.current"
|
||||
:size.sync="list.size" class="fill" border height="360px" @getList="getResident"
|
||||
:col-configs="[{slot: 'resident'}]" layout="slot,->, prev, pager, next, jumper" :pagerCount="5">
|
||||
<el-table-column slot="resident">
|
||||
<template #header>
|
||||
<b v-text="`户主信息列表`"/>
|
||||
<el-input class="fill" v-model="list.con" size="small" placeholder="搜索姓名/身份证号" clearable
|
||||
@change="list.current=1,getResident()"/>
|
||||
</template>
|
||||
<template slot-scope="{row}">
|
||||
<el-row type="flex" justify="space-between" @click.native="handleSelectResident(row)" class="toggle"
|
||||
:class="{selected:findResident(row.id)>-1}">
|
||||
<span v-text="row.name"/>
|
||||
<span v-text="idCardNoUtil.hideId(row.idNumber)"/>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-table :tableData="form.residentList" :col-configs="[{slot:'resident'}]" :isShowPagination="false" border
|
||||
height="360px">
|
||||
<el-table-column slot="resident">
|
||||
<template #header>
|
||||
<b v-text="`已选择`"/>
|
||||
<el-button type="text" @click="form.residentList=[]">清空</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-row type="flex" align="middle" justify="space-between">
|
||||
<div v-text="[row.residentName, idCardNoUtil.hideId(row.idNumber)].join(' ')"/>
|
||||
<el-button type="text" @click="form.residentList.splice($index,1)">删除</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</el-row>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "neighbourSetting",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
colConfigs() {
|
||||
return [
|
||||
{type: 'selection'},
|
||||
{label: "户主姓名", prop: "name"},
|
||||
{label: "身份证号", prop: "idNumber"},
|
||||
{label: "联系方式", prop: "phone"},
|
||||
{label: "添加时间", prop: "createTime"},
|
||||
{slot: "options"}
|
||||
]
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
search: {name: "", ids: ""},
|
||||
page: {current: 1, size: 10, total: 0},
|
||||
tableData: [],
|
||||
dialog: false,
|
||||
form: {areaId: "", residentList: []},
|
||||
residents: [],
|
||||
list: {current: 1, size: 10, total: 0},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.push({})
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post("/app/apppartyfourresident/listFourResident", null, {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除户主?").then(() => {
|
||||
this.instance.post("/app/apppartyfourresident/delete", null, {
|
||||
params: {ids}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!")
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
}).catch(() => 0)
|
||||
},
|
||||
submit() {
|
||||
this.instance.post("/app/apppartyfourresident/add", this.form).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.dialog = false
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
},
|
||||
getResident() {
|
||||
let {areaId} = this.form
|
||||
areaId = areaId || this.user.info.areaId
|
||||
this.instance.post("/app/appresident/list", null, {
|
||||
params: {householdName: 1, areaId, ...this.list, auditStatus: 1}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
// this.residents = res.data.records?.map(e => ({dictValue: e.id, dictName: e.name}))
|
||||
this.residents = res.data.records
|
||||
this.list.total = res.data.total
|
||||
this.$refs.Residents.doLayout()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectResident(row) {
|
||||
let {id: partyId} = this.$route.query
|
||||
let index = this.findResident(row.id)
|
||||
if (index > -1) {
|
||||
this.form.residentList.splice(index, 1)
|
||||
} else {
|
||||
let {id: residentId, name: residentName, idNumber} = row
|
||||
this.form.residentList.push({residentId, residentName, idNumber, partyId})
|
||||
}
|
||||
this.$forceUpdate()
|
||||
},
|
||||
findResident(id) {
|
||||
return this.form.residentList?.findIndex(e => e.residentId == id)
|
||||
},
|
||||
clearDialog() {
|
||||
this.form = {residentList: []}
|
||||
this.residents = []
|
||||
this.list = {current: 1, size: 10, total: 0}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.search.partyId = this.$route.query.id
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.neighbourSetting {
|
||||
height: 100%;
|
||||
|
||||
.mar-t16 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
::v-deep.ai-dialog__content {
|
||||
.ai-dialog__content--wrapper {
|
||||
padding-right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.el-row {
|
||||
width: 100%;
|
||||
|
||||
.ai-table + .ai-table {
|
||||
margin-left: 16px;
|
||||
width: 400px;
|
||||
|
||||
.ai-table__header > .cell {
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toggle {
|
||||
cursor: pointer;
|
||||
|
||||
&.selected {
|
||||
color: #26f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ai-table__header > .cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,68 +0,0 @@
|
||||
<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>
|
||||
@@ -1,258 +0,0 @@
|
||||
<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
|
||||
@clear="page.current = 1,search.param = '', getTableData()"
|
||||
v-throttle="() => {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>
|
||||
|
||||
|
||||
@@ -1,591 +0,0 @@
|
||||
<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>
|
||||
@@ -1,318 +0,0 @@
|
||||
<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>
|
||||
@@ -1,148 +0,0 @@
|
||||
<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>
|
||||
@@ -1,407 +0,0 @@
|
||||
<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