简历编辑页PM可上传顾问协议、确认书,可进行设置
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3a81bad5db
commit
b64809a4d4
|
@ -9,37 +9,51 @@
|
|||
:file-list="fileList"
|
||||
:accept="accept"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="isDisabled">{{ $t('common:button:upload') }}</el-button>
|
||||
<el-button size="small" type="primary" :disabled="isDisabled">{{
|
||||
$t('common:button:upload')
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment } from '@/api/attachment'
|
||||
import {
|
||||
getAttachmentByType,
|
||||
uploadFile,
|
||||
saveAttachments,
|
||||
deleteAttachment,
|
||||
} from '@/api/attachment'
|
||||
export default {
|
||||
name: 'UploadFiles',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
doctorId: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
repeat: false,
|
||||
isDisabled: false
|
||||
isDisabled: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
doctorId() {
|
||||
if (this.doctorId) {
|
||||
this.initFileList()
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if(!this.doctorId) return
|
||||
if (!this.doctorId) return
|
||||
this.initFileList()
|
||||
},
|
||||
methods: {
|
||||
|
@ -49,24 +63,28 @@ export default {
|
|||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.07)'
|
||||
background: 'rgba(0, 0, 0, 0.07)',
|
||||
})
|
||||
getAttachmentByType(this.doctorId, this.type).then(res => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (res.Result.length > 0) {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
} else {
|
||||
this.fileList = []
|
||||
getAttachmentByType(this.doctorId, this.type)
|
||||
.then((res) => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (res.Result.length > 0) {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
} else {
|
||||
this.fileList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
})
|
||||
.catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
|
||||
formatterFileList(list) {
|
||||
var arr = []
|
||||
list.forEach(item => {
|
||||
list.forEach((item) => {
|
||||
const data = {
|
||||
DoctorId: item.DoctorId,
|
||||
Type: item.Type,
|
||||
|
@ -74,7 +92,7 @@ export default {
|
|||
FullPath: item.FullPath,
|
||||
FileName: item.FileName,
|
||||
CreateTime: item.CreateTime,
|
||||
Id: item.Id
|
||||
Id: item.Id,
|
||||
}
|
||||
arr.push(data)
|
||||
})
|
||||
|
@ -85,20 +103,22 @@ export default {
|
|||
// 检测文件后缀名
|
||||
if (this.checkFileSuffix(param.file.name)) {
|
||||
// 检测是否有重名文件
|
||||
const isRepeat = this.fileList.some(item => item.FileName === param.file.name)
|
||||
const isRepeat = this.fileList.some(
|
||||
(item) => item.FileName === param.file.name
|
||||
)
|
||||
if (isRepeat) {
|
||||
this.$confirm('Override the existing resume?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
cancelButtonText: 'Cancel',
|
||||
})
|
||||
.then(() => {
|
||||
// 重名覆盖
|
||||
this.repeat = true
|
||||
this.uploadFile(param.file)
|
||||
})
|
||||
.catch(action => {})
|
||||
.catch((action) => {})
|
||||
} else {
|
||||
this.uploadFile(param.file)
|
||||
}
|
||||
|
@ -110,7 +130,10 @@ export default {
|
|||
this.isDisabled = true
|
||||
var fileName = file.name
|
||||
file = await this.fileToBlob(file)
|
||||
let res = await this.OSSclient.put(`/SystemData/reviewer/Agreements/${this.doctorId}/${fileName}`, file)
|
||||
let res = await this.OSSclient.put(
|
||||
`/SystemData/reviewer/Agreements/${this.doctorId}/${fileName}`,
|
||||
file
|
||||
)
|
||||
if (this.repeat) {
|
||||
const index = this.fileList.findIndex((item, index) => {
|
||||
return item.FileName === fileName
|
||||
|
@ -124,52 +147,58 @@ export default {
|
|||
Type: this.type,
|
||||
Path: this.$getObjectName(res.url),
|
||||
FullPath: this.$getObjectName(res.url),
|
||||
FileName: fileName
|
||||
FileName: fileName,
|
||||
}
|
||||
this.fileList.push(fileData)
|
||||
}
|
||||
this.saveUploadFiles()
|
||||
},
|
||||
saveUploadFiles() {
|
||||
saveAttachments(this.fileList).then(res => {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.isDisabled = false
|
||||
this.$message.success('Uploaded successfully')
|
||||
this.$emit('getFileList', this.fileList)
|
||||
}).catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
saveAttachments(this.fileList)
|
||||
.then((res) => {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.isDisabled = false
|
||||
this.$message.success('Uploaded successfully')
|
||||
this.$emit('getFileList', this.fileList)
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
handleDeleteFile(file) {
|
||||
this.$confirm('Sure to remove?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
}).then(() => {
|
||||
deleteAttachment(file.Id, file.Path)
|
||||
.then(res => {
|
||||
})
|
||||
.then(() => {
|
||||
deleteAttachment(file.Id, file.Path).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
|
||||
this.fileList.splice(
|
||||
this.fileList.findIndex((item) => item.Id === file.Id),
|
||||
1
|
||||
)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
this.$message({
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
type: 'success',
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(action => {})
|
||||
})
|
||||
.catch((action) => {})
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var index = fileName.lastIndexOf('.')
|
||||
var suffix = fileName.substring(index + 1, fileName.length)
|
||||
return this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
|
||||
}
|
||||
}
|
||||
return (
|
||||
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.uploadFiles-container{
|
||||
.uploadFiles-container {
|
||||
margin: 0 5px;
|
||||
}
|
||||
.uploadFiles-container .el-upload--text {
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
<i
|
||||
class="el-icon-edit"
|
||||
:title="$t('common:button:edit')"
|
||||
v-if="item.IsIRUpload"
|
||||
v-if="item.IsIRUpload || isPM"
|
||||
@click="
|
||||
handleEditCol(item, 0, $t('trials:enrolledReviews:message:SOW'))
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="item.IsIRUpload"
|
||||
v-if="item.IsIRUpload || isPM"
|
||||
:title="$t('common:button:delete')"
|
||||
@click="handleRemoveFile3(item)"
|
||||
/>
|
||||
|
@ -45,30 +45,102 @@
|
|||
{{ $t('common:button:downloadTpl') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<template v-if="CounselorFiles">
|
||||
<template v-if="!isPM">
|
||||
<template v-if="CounselorFiles">
|
||||
<div class="file_title">
|
||||
{{ $t('curriculumVitae:agreement:Counselor') }}
|
||||
</div>
|
||||
<div class="file" v-for="item in CounselorFiles" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="preview(item)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="ackSowList && ackSowList.length > 0">
|
||||
<div class="file_title">
|
||||
{{ $t('curriculumVitae:agreement:confirmation') }}
|
||||
</div>
|
||||
<div class="file" v-for="item in ackSowList" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="handlePreview3(item)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="file_title">
|
||||
{{ $t('curriculumVitae:agreement:Counselor') }}
|
||||
</div>
|
||||
<div class="file" v-for="item in CounselorFiles" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="preview(item)"
|
||||
/>
|
||||
<template v-if="agreementList && agreementList.length > 0">
|
||||
<div class="file" v-for="item in agreementList" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="handlePreview3(item)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
:title="$t('common:button:delete')"
|
||||
@click="handleRemoveFile(item)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||
<div class="btnBox" style="margin-top: 10px">
|
||||
<div class="resume-content">
|
||||
<div class="upload-content">
|
||||
<upload-files
|
||||
ref="uploadAgreement"
|
||||
:doctor-id="reviewerId"
|
||||
type="Consultant Agreement"
|
||||
accept=".pdf"
|
||||
@getFileList="getFileList"
|
||||
/>
|
||||
</div>
|
||||
<!-- <p>{{ $t('system:tip:file:pdf') }}</p> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="ackSowList && ackSowList.length > 0">
|
||||
<div class="file_title">
|
||||
{{ $t('curriculumVitae:agreement:confirmation') }}
|
||||
</div>
|
||||
<div class="file" v-for="item in ackSowList" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="handlePreview3(item)"
|
||||
/>
|
||||
<template v-if="ackSowList && ackSowList.length > 0">
|
||||
<div class="file" v-for="item in ackSowList" :key="item.Id">
|
||||
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
|
||||
<i
|
||||
class="el-icon-view"
|
||||
:title="$t('common:button:preview')"
|
||||
@click.stop="handlePreview3(item)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-edit"
|
||||
:title="$t('common:button:edit')"
|
||||
@click="
|
||||
handleEditCol(item, 1, $t('trials:enrolledReviews:message:SOW'))
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
:title="$t('common:button:delete')"
|
||||
@click="handleRemoveFile3(item)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
|
||||
<div class="btnBox" style="margin-top: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click.stop="addCol(1, $t('trials:enrolledReviews:message:SOW'))"
|
||||
>
|
||||
{{ $t('curriculumVitae:agreement:btn:uploadconfirmation') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -164,10 +236,12 @@ import {
|
|||
getDoctorCriterionFile,
|
||||
} from '@/api/reviewers'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import UploadFiles from '@/components/UploadFiles'
|
||||
export default {
|
||||
name: 'agreement',
|
||||
components: {
|
||||
BaseModel,
|
||||
UploadFiles,
|
||||
},
|
||||
props: {
|
||||
DATA: {
|
||||
|
@ -184,6 +258,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isPM: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -247,6 +325,12 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
handleRemoveFile(row) {
|
||||
this.$refs.uploadAgreement.handleDeleteFile(row)
|
||||
},
|
||||
getFileList(fileList) {
|
||||
this.agreementList = fileList
|
||||
},
|
||||
preview(row) {
|
||||
this.$preview({
|
||||
path: row.FullPath,
|
||||
|
@ -308,7 +392,7 @@ export default {
|
|||
},
|
||||
handlePreview3(row) {
|
||||
return this.$preview({
|
||||
path: row.FilePath,
|
||||
path: row.FilePath || row.Path || row.FullPath,
|
||||
type: 'pdf',
|
||||
title: row.FileName,
|
||||
})
|
||||
|
@ -357,7 +441,9 @@ export default {
|
|||
'CriterionType',
|
||||
this.form.CriterionType
|
||||
)
|
||||
this.form.IsIRUpload = true
|
||||
if (!this.isPM) {
|
||||
this.form.IsIRUpload = true
|
||||
}
|
||||
addDoctorCriterionFile(this.form).then((res) => {
|
||||
this.$message.success('添加成功')
|
||||
this.initSowList()
|
||||
|
|
|
@ -107,7 +107,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
closeDialog() {
|
||||
console.log(111111111)
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
handleAddHoliday() {
|
||||
|
|
|
@ -0,0 +1,297 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="$t('system:Setting:title:Blinded Setting')"
|
||||
:visible.sync="visible"
|
||||
width="50%"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="closeDialog"
|
||||
top="8vh"
|
||||
append-to-body
|
||||
>
|
||||
<div class="base-modal-body">
|
||||
<el-form
|
||||
ref="settingFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
size="small"
|
||||
>
|
||||
<div class="form_title">
|
||||
{{ $t('system:Setting:title:Blinded information') }}
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('system:Setting:label:Blind Name')"
|
||||
prop="BlindName"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.BlindName"
|
||||
clearable
|
||||
:maxlength="400"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
:label="$t('system:Setting:label:Blind NameCN')"
|
||||
prop="BlindNameCN"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.BlindNameCN"
|
||||
clearable
|
||||
:maxlength="400"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item
|
||||
:label="$t('system:Setting:label:Blind Publications')"
|
||||
prop="BlindPublications"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.BlindPublications"
|
||||
type="textarea"
|
||||
rows="8"
|
||||
size="small"
|
||||
:maxlength="4000"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="form_title">
|
||||
{{ $t('system:Setting:title:Blinded Setting') }}
|
||||
</div>
|
||||
<el-form-item
|
||||
:label="$t('system:Setting:label:Information Confirmed?')"
|
||||
>
|
||||
<el-radio-group v-model="form.ReviewStatus" @change="handleChange">
|
||||
<el-radio :label="1">{{
|
||||
$t('system:Setting:label:Information Confirmed?:Yes')
|
||||
}}</el-radio>
|
||||
<el-radio :label="2">{{
|
||||
$t('system:Setting:label:Information Confirmed?:No')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('system:Setting:label:Contractor Status?')">
|
||||
<el-radio-group v-model="form.CooperateStatus" @change="handleChange">
|
||||
<el-radio :label="1">{{
|
||||
$t('system:Setting:label:Information Confirmed?:Yes')
|
||||
}}</el-radio>
|
||||
<el-radio :label="2">{{
|
||||
$t('system:Setting:label:Information Confirmed?:No')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('system:Setting:label:Accepting New Trials?')">
|
||||
<el-radio-group
|
||||
v-model="form.AcceptingNewTrial"
|
||||
:disabled="radioDisabled"
|
||||
>
|
||||
<el-radio :label="true">{{
|
||||
$t('system:Setting:label:Information Confirmed?:Yes')
|
||||
}}</el-radio>
|
||||
<el-radio :label="false">{{
|
||||
$t('system:Setting:label:Information Confirmed?:No')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="$t('system:Setting:label:Actively Reading?')">
|
||||
<el-radio-group
|
||||
v-model="form.ActivelyReading"
|
||||
:disabled="radioDisabled"
|
||||
>
|
||||
<el-radio :label="true">{{
|
||||
$t('system:Setting:label:Information Confirmed?:Yes')
|
||||
}}</el-radio>
|
||||
<el-radio :label="false">{{
|
||||
$t('system:Setting:label:Information Confirmed?:No')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('system:Setting:label:Comment:')"
|
||||
prop="AdminComment"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.AdminComment"
|
||||
type="textarea"
|
||||
rows="8"
|
||||
:maxlength="4000"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="small" type="primary" @click="closeDialog">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleSave"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getAuditState,
|
||||
updateAuditResume,
|
||||
getVacationList,
|
||||
addOrUpdateVacation,
|
||||
deleteVacation,
|
||||
getIsVacation,
|
||||
} from '@/api/reviewers'
|
||||
const defaultForm = () => {
|
||||
return {
|
||||
CooperateStatus: 2,
|
||||
ResumeStatus: 2,
|
||||
ReviewStatus: 2,
|
||||
AcceptingNewTrial: false,
|
||||
ActivelyReading: false,
|
||||
IsVirtual: false,
|
||||
BlindName: '',
|
||||
AdminComment: '',
|
||||
InHoliday: '',
|
||||
BlindNameCN: '',
|
||||
BlindPublications: '',
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'setting',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
reviewerId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: defaultForm(),
|
||||
loading: false,
|
||||
rules: {
|
||||
AdminComment: [
|
||||
{
|
||||
max: 4000,
|
||||
message: this.$t('form:rules:maxLength:4000'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
BlindName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{
|
||||
max: 400,
|
||||
message: this.$t('form:rules:maxLength:400'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
BlindNameCN: [
|
||||
{
|
||||
max: 400,
|
||||
message: this.$t('form:rules:maxLength:400'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
BlindPublications: [
|
||||
{
|
||||
max: 400,
|
||||
message: this.$t('form:rules:maxLength:400'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
radioDisabled: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
this.handleChange()
|
||||
},
|
||||
methods: {
|
||||
handleChange() {
|
||||
if (this.form.ReviewStatus === 2 || this.form.CooperateStatus === 2) {
|
||||
this.form.ActivelyReading = false
|
||||
this.form.AcceptingNewTrial = false
|
||||
this.radioDisabled = true
|
||||
} else {
|
||||
this.radioDisabled = false
|
||||
}
|
||||
},
|
||||
closeDialog() {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
async handleSave() {
|
||||
try {
|
||||
let validate = await this.$refs.settingFrom.validate()
|
||||
if (!validate) return false
|
||||
const param = {}
|
||||
Object.assign(param, this.form)
|
||||
param.ResumeStatus = param.ReviewStatus
|
||||
this.loading = true
|
||||
let res = await updateAuditResume(param)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.closeDialog()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async getData() {
|
||||
try {
|
||||
let res = await getAuditState(this.reviewerId)
|
||||
if (res.IsSuccess) {
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = res.Result[key]
|
||||
})
|
||||
if (res.Result.Id) {
|
||||
this.form.Id = res.Result.Id
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding: 10px 10px 10px 10px;
|
||||
.base-modal-body {
|
||||
min-height: 100px;
|
||||
max-height: 650px;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__footer {
|
||||
padding: 10px;
|
||||
}
|
||||
.form_title {
|
||||
margin: 10px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&::after {
|
||||
margin-left: 20px;
|
||||
display: block;
|
||||
content: '';
|
||||
border-top: 1px solid #eee;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -47,6 +47,9 @@
|
|||
<div class="title">
|
||||
<div>{{ $t('curriculumVitae:content:title') }}</div>
|
||||
<div class="btnBox">
|
||||
<el-button type="text" @click.stop="openSetting" v-if="isPM">
|
||||
{{ $t('curriculumVitae:button:seeting') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click.stop="openHoliday">
|
||||
{{ $t('curriculumVitae:button:holiday') }}
|
||||
</el-button>
|
||||
|
@ -165,6 +168,7 @@
|
|||
<agreement
|
||||
:DATA="reviewerData.AttachmentList"
|
||||
:isEN="isEN"
|
||||
:isPM="isPM"
|
||||
:reviewerId.sync="reviewerId"
|
||||
@getInfo="getDetail"
|
||||
/>
|
||||
|
@ -180,6 +184,11 @@
|
|||
:reviewerId.sync="reviewerId"
|
||||
:visible.sync="holidayVisible"
|
||||
/>
|
||||
<setting
|
||||
v-if="settingVisible"
|
||||
:reviewerId.sync="reviewerId"
|
||||
:visible.sync="settingVisible"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -197,6 +206,7 @@ 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 setting from './components/info/setting.vue'
|
||||
import preview from './preview.vue'
|
||||
import { getDetail } from '@/api/reviewers'
|
||||
import { mapMutations } from 'vuex'
|
||||
|
@ -217,6 +227,7 @@ export default {
|
|||
pay,
|
||||
holiday,
|
||||
preview,
|
||||
setting,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -224,8 +235,8 @@ export default {
|
|||
isScrollAuto: true,
|
||||
visible: false,
|
||||
loading: false,
|
||||
reviewerId: null,
|
||||
trialId: null,
|
||||
reviewerId: '',
|
||||
trialId: '',
|
||||
reviewerData: {
|
||||
BasicInfoView: {},
|
||||
EmploymentView: {},
|
||||
|
@ -245,12 +256,18 @@ export default {
|
|||
dom: null,
|
||||
|
||||
holidayVisible: false,
|
||||
|
||||
settingVisible: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isEN() {
|
||||
return this.$i18n.locale !== 'zh'
|
||||
},
|
||||
isPM() {
|
||||
// return true
|
||||
return this.hasPermi(['role:pm'])
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.$i18n.locale =
|
||||
|
@ -335,6 +352,10 @@ export default {
|
|||
openHoliday() {
|
||||
this.holidayVisible = true
|
||||
},
|
||||
// 设置
|
||||
openSetting() {
|
||||
this.settingVisible = true
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue