简历增加假期新增、预览

uat_us
wangxiaoshuang 2024-10-29 13:50:44 +08:00
parent 7343036ebf
commit 0624446d2c
4 changed files with 256 additions and 6 deletions

View File

@ -243,7 +243,15 @@
:label="$t('curriculumVitae:clinicalTrials:form:indication')"
prop="EvaluationContent"
>
<el-input v-model="form.EvaluationContent" clearable></el-input>
<!-- <el-input v-model="form.EvaluationContent" clearable></el-input> -->
<el-select v-model="form.EvaluationContent">
<el-option
v-for="item of $d.Indication"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
</template>

View File

@ -0,0 +1,204 @@
<template>
<el-dialog
:title="$t('system:Setting:title:Vacation')"
:visible.sync="visible"
width="50%"
:close-on-click-modal="false"
:before-close="closeDialog"
append-to-body
>
<div v-if="!isPreview">
<el-date-picker
v-model="daterange"
style="width: 360px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="daterange"
range-separator="to"
:start-placeholder="$t('system:Setting:label:Beginning Date')"
:end-placeholder="$t('system:Setting:label:End Date')"
size="small"
/>
<el-button
style="margin-left: 10px"
type="primary"
size="small"
@click="handleAddHoliday"
>
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table v-loading="loading" :data="gridData" size="small">
<el-table-column type="index" />
<el-table-column
property="StartDate"
:label="$t('system:Setting:table:Beginning Date')"
min-width="120"
:formatter="beginTimeFormatter"
/>
<el-table-column
property="EndDate"
:label="$t('system:Setting:table:End Date')"
min-width="120"
:formatter="endTimeFormatter"
/>
<el-table-column
:label="$t('common:action:action')"
fixed="right"
min-width="200"
v-if="!isPreview"
>
<template slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.row)">
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" style="padding: 10px 0; text-align: right">
<el-pagination
background
layout="total,sizes,prev, pager, next"
:total="totalItems"
:page-sizes="[5, 10, 20, 50]"
:page-size="pageSize"
:current-page.sync="pageIndex"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</el-dialog>
</template>
<script>
import {
getAuditState,
updateAuditResume,
getVacationList,
addOrUpdateVacation,
deleteVacation,
} from '@/api/reviewers'
import { fmtDate } from '@/utils/formatter'
export default {
name: 'holiday',
props: {
visible: {
type: Boolean,
default: false,
},
reviewerId: {
type: String,
default: '',
},
isPreview: {
type: Boolean,
default: false,
},
},
data() {
return {
daterange: [],
loading: false,
gridData: [],
pageIndex: 1,
pageSize: 5,
totalItems: 0,
}
},
mounted() {
this.initHolidayList()
},
methods: {
closeDialog() {
console.log(111111111)
this.$emit('update:visible', false)
},
handleAddHoliday() {
if (this.daterange) {
const param = {
DoctorId: this.reviewerId,
StartDate: this.daterange[0],
EndDate: this.daterange[1],
}
this.loading = true
addOrUpdateVacation(param)
.then((res) => {
if (res.IsSuccess) {
param.Id = res.Result
this.gridData.push(param)
this.totalItems = this.totalItems + 1
this.daterange = ''
} else {
this.$alert(res.ErrorMessage)
}
this.loading = false
})
.catch(() => {
this.daterange = ''
this.loading = false
})
}
},
handleDelete(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
this.loading = true
deleteVacation(row.Id)
.then((res) => {
if (res.IsSuccess) {
var index = this.gridData.findIndex(
(item) => item.Id === row.Id
)
if (index !== -1) {
this.gridData.splice(index, 1)
this.totalItems = this.totalItems - 1
}
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
}
this.loading = false
})
.catch(() => {
this.loading = false
})
})
.catch((action) => {})
},
initHolidayList() {
this.loading = true
getVacationList(this.reviewerId, this.pageIndex, this.pageSize)
.then((res) => {
if (res.IsSuccess) {
this.gridData = res.Result.CurrentPageData
this.totalItems = res.Result.TotalCount
}
this.loading = false
})
.catch(() => {
this.loading = false
})
},
beginTimeFormatter(row) {
if (row.StartDate) {
return fmtDate(row.StartDate)
}
},
endTimeFormatter(row) {
if (row.EndDate) {
return fmtDate(row.EndDate)
}
},
handleCurrentChange(val) {
this.pageIndex = val
this.initHolidayList()
},
handleSizeChange(val) {
this.pageSize = val
this.initHolidayList()
},
},
}
</script>

View File

@ -47,15 +47,18 @@
<div class="title">
<div>{{ $t('curriculumVitae:content:title') }}</div>
<div class="btnBox">
<el-button type="text">{{
<el-button type="text" @click.stop="openHoliday">
{{ $t('curriculumVitae:button:holiday') }}
</el-button>
<!-- <el-button type="text">{{
$t('common:button:downloadTpl')
}}</el-button>
<el-button type="text">{{
$t('curriculumVitae:button:importResume')
}}</el-button>
<el-button type="text" @click.stop="openPreview">{{
$t('common:button:preview')
}}</el-button>
}}</el-button> -->
<el-button type="text" @click.stop="openPreview">
{{ $t('common:button:preview') }}
</el-button>
</div>
</div>
<div class="box" id="info">
@ -170,6 +173,11 @@
<preview :isEN="isEN" :reviewerId.sync="reviewerId" v-if="visible" />
</div>
</el-dialog>
<holiday
v-if="holidayVisible"
:reviewerId.sync="reviewerId"
:visible.sync="holidayVisible"
/>
</div>
</template>
<script>
@ -186,6 +194,7 @@ import clinicalTrials from './components/info/clinicalTrials.vue'
import treatise from './components/info/treatise.vue'
import other from './components/info/other.vue'
import pay from './components/info/pay.vue'
import holiday from './components/info/holiday.vue'
import preview from './preview.vue'
import { getDetail } from '@/api/reviewers'
import { mapMutations } from 'vuex'
@ -204,6 +213,7 @@ export default {
treatise,
other,
pay,
holiday,
preview,
},
data() {
@ -230,6 +240,8 @@ export default {
TrialExperienceView: {},
},
dom: null,
holidayVisible: false,
}
},
computed: {
@ -312,6 +324,10 @@ export default {
openPreview() {
this.visible = true
},
//
openHoliday() {
this.holidayVisible = true
},
},
}
</script>

View File

@ -35,6 +35,15 @@
}}</span>
<span v-else>{{ reviewerData.BasicInfoView.HospitalNameCN }}</span>
</span>
<span>
<span>
{{ $t('system:Setting:title:Vacation') }}
{{ reviewerData.AuditView.InHoliday ? 'Yes' : 'No' }}
</span>
<el-button type="text" @click="handleView">
{{ $t('system:Setting:Planned Vacation') }}
</el-button>
</span>
</div>
<div class="userTitle">
<span class="el-icon-first-aid-kit">
@ -667,14 +676,22 @@
</div>
</div>
</div>
<holiday
v-if="holidayVisible"
isPreview
:reviewerId.sync="reviewerId"
:visible.sync="holidayVisible"
/>
</div>
</template>
<script>
import { getDetail } from '@/api/reviewers'
import { getAttachmentByType } from '@/api/attachment'
import { getDoctorCriterionFile } from '@/api/reviewers'
import holiday from './components/info/holiday.vue'
export default {
name: 'curriculumVitaePreview',
components: { holiday },
props: {
isAll: {
type: Boolean,
@ -713,6 +730,8 @@ export default {
sowList: [],
ackSowList: [],
loading: false,
holidayVisible: false,
}
},
computed: {
@ -877,6 +896,9 @@ export default {
title: row.FileName,
})
},
handleView() {
this.holidayVisible = true
},
},
}
</script>