|
@@ -137,7 +137,56 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="colSty">
|
|
<div class="colSty">
|
|
|
- <div class="grid-content bg-purple">入职日期</div>
|
|
|
|
|
|
|
+ <div class="grid-content bg-purple">专业</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{
|
|
|
|
|
+ nowData.hasOwnProperty('xianCongShiZhua') > 0
|
|
|
|
|
+ ? nowData.xianCongShiZhua
|
|
|
|
|
+ : '/'
|
|
|
|
|
+ }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else class="grid-content bg-purple-light">
|
|
|
|
|
+ <el-form-item prop="xianCongShiZhua">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="nowData.xianCongShiZhua"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="rowSty">
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div class="grid-content bg-purple">参加工作时间</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{
|
|
|
|
|
+ nowData.hasOwnProperty('canJiaGongZuo') > 0
|
|
|
|
|
+ ? nowData.canJiaGongZuo
|
|
|
|
|
+ : '/'
|
|
|
|
|
+ }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else class="grid-content bg-purple-light">
|
|
|
|
|
+ <el-form-item prop="canJiaGongZuo">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="nowData.canJiaGongZuo"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="参加工作时间"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div class="grid-content bg-purple">本单位入职日期</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="colSty">
|
|
<div class="colSty">
|
|
|
<div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
<div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
@@ -154,11 +203,58 @@
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="nowData.ruZhiShiJian"
|
|
v-model="nowData.ruZhiShiJian"
|
|
|
type="date"
|
|
type="date"
|
|
|
- placeholder="入职日期"
|
|
|
|
|
|
|
+ placeholder="本单位入职日期"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="rowSty">
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div class="grid-content bg-purple">本岗位任职时间</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
|
|
|
+ <div >
|
|
|
|
|
+ {{
|
|
|
|
|
+ nowData.hasOwnProperty('renZhiShiJian') > 0 ? nowData.renZhiShiJian : '/'
|
|
|
|
|
+ }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else class="grid-content bg-purple-light">
|
|
|
|
|
+ <el-form-item prop="renZhiShiJian">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="nowData.renZhiShiJian"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="本岗位任职时间"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div class="grid-content bg-purple">职务</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="colSty">
|
|
|
|
|
+ <div v-if="judgeTag()" class="grid-content bg-purple-light">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ {{
|
|
|
|
|
+ nowData.hasOwnProperty('xingZhengZhiWu') > 0
|
|
|
|
|
+ ? nowData.xingZhengZhiWu
|
|
|
|
|
+ : '/'
|
|
|
|
|
+ }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else class="grid-content bg-purple-light">
|
|
|
|
|
+ <el-form-item prop="xingZhengZhiWu">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="nowData.xingZhengZhiWu"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ placeholder="请输入"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="rowSty">
|
|
<div class="rowSty">
|
|
@@ -396,6 +492,8 @@ export default {
|
|
|
{ validator: option.checkLengthNull, trigger: 'blur' }
|
|
{ validator: option.checkLengthNull, trigger: 'blur' }
|
|
|
],
|
|
],
|
|
|
ruZhiShiJian: [{ validator: option.checkTimeNull, trigger: 'blur' }],
|
|
ruZhiShiJian: [{ validator: option.checkTimeNull, trigger: 'blur' }],
|
|
|
|
|
+ canJiaGongZuo: [{ validator: option.checkTimeNull, trigger: 'blur' }],
|
|
|
|
|
+ renZhiShiJian: [{ validator: option.checkTimeNull, trigger: 'blur' }],
|
|
|
zhiCheng: [{ validator: option.checkLengthNull, trigger: 'blur' }],
|
|
zhiCheng: [{ validator: option.checkLengthNull, trigger: 'blur' }],
|
|
|
qianZiTuWen: [
|
|
qianZiTuWen: [
|
|
|
{ validator: option.attachmentsNumOne, trigger: 'change' }
|
|
{ validator: option.attachmentsNumOne, trigger: 'change' }
|
|
@@ -410,10 +508,38 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
|
|
+ // 监听入职日期变化
|
|
|
|
|
+ // 'nowData.ruZhiShiJian': {
|
|
|
|
|
+ // handler(newVal) {
|
|
|
|
|
+ // if (newVal) {
|
|
|
|
|
+ // this.calculateWorkYears(newVal, 'benZhuanYeGong')
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.nowData.benZhuanYeGong = 0
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // immediate: true
|
|
|
|
|
+ // },
|
|
|
|
|
+ // 监听入职日期变化
|
|
|
|
|
+ // 'nowData.canJiaGongZuo': {
|
|
|
|
|
+ // handler(newVal) {
|
|
|
|
|
+ // if (newVal) {
|
|
|
|
|
+ // this.calculateWorkYears(newVal, 'gongZuoNianXia')
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.nowData.gongZuoNianXia = 0
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // immediate: true
|
|
|
|
|
+ // },
|
|
|
planeData: {
|
|
planeData: {
|
|
|
handler: function (val, oldVal) {
|
|
handler: function (val, oldVal) {
|
|
|
// eslint-disable-next-line no-undef
|
|
// eslint-disable-next-line no-undef
|
|
|
this.nowData = structuredClone(val)
|
|
this.nowData = structuredClone(val)
|
|
|
|
|
+ if(this.nowData.ruZhiShiJian){
|
|
|
|
|
+ this.calculateWorkYears(this.nowData.ruZhiShiJian, 'benZhuanYeGong')
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.nowData.canJiaGongZuo){
|
|
|
|
|
+ this.calculateWorkYears(this.nowData.canJiaGongZuo, 'gongZuoNianXia')
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
deep: true,
|
|
deep: true,
|
|
|
immediate: true
|
|
immediate: true
|
|
@@ -437,6 +563,23 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // calculateWorkYears(entryDate, type) {
|
|
|
|
|
+ // const startDate = new Date(entryDate)
|
|
|
|
|
+ // const now = new Date()
|
|
|
|
|
+ //
|
|
|
|
|
+ // let years = now.getFullYear() - startDate.getFullYear()
|
|
|
|
|
+ // const monthDiff = now.getMonth() - startDate.getMonth()
|
|
|
|
|
+ //
|
|
|
|
|
+ // if (monthDiff < 0 || (monthDiff === 0 && now.getDate() < startDate.getDate())) {
|
|
|
|
|
+ // years--
|
|
|
|
|
+ // }
|
|
|
|
|
+ // console.log('calculateWorkYears', years)
|
|
|
|
|
+ // if(type == 'benZhuanYeGong'){
|
|
|
|
|
+ // this.$set(this.nowData, 'benZhuanYeGong', years > 0 ? years : '0')
|
|
|
|
|
+ // }else{
|
|
|
|
|
+ // this.$set(this.nowData, 'gongZuoNianXia', years > 0 ? years : '0')
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
judgeTag() {
|
|
judgeTag() {
|
|
|
// return this.planeData.length>0&& this.btnShow === true && this.buttonType!==1 ? true : false
|
|
// return this.planeData.length>0&& this.btnShow === true && this.buttonType!==1 ? true : false
|
|
|
return !!(
|
|
return !!(
|