简历编辑页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"
|
:file-list="fileList"
|
||||||
:accept="accept"
|
: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>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment } from '@/api/attachment'
|
import {
|
||||||
|
getAttachmentByType,
|
||||||
|
uploadFile,
|
||||||
|
saveAttachments,
|
||||||
|
deleteAttachment,
|
||||||
|
} from '@/api/attachment'
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadFiles',
|
name: 'UploadFiles',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
doctorId: {
|
doctorId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
accept: {
|
accept: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
repeat: false,
|
repeat: false,
|
||||||
isDisabled: false
|
isDisabled: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
doctorId() {
|
||||||
|
if (this.doctorId) {
|
||||||
|
this.initFileList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(!this.doctorId) return
|
if (!this.doctorId) return
|
||||||
this.initFileList()
|
this.initFileList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -49,9 +63,10 @@ export default {
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading',
|
text: 'Loading',
|
||||||
spinner: 'el-icon-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 => {
|
getAttachmentByType(this.doctorId, this.type)
|
||||||
|
.then((res) => {
|
||||||
loading.close()
|
loading.close()
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
if (res.Result.length > 0) {
|
if (res.Result.length > 0) {
|
||||||
|
@ -61,12 +76,15 @@ export default {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(() => { loading.close() })
|
})
|
||||||
|
.catch(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
formatterFileList(list) {
|
formatterFileList(list) {
|
||||||
var arr = []
|
var arr = []
|
||||||
list.forEach(item => {
|
list.forEach((item) => {
|
||||||
const data = {
|
const data = {
|
||||||
DoctorId: item.DoctorId,
|
DoctorId: item.DoctorId,
|
||||||
Type: item.Type,
|
Type: item.Type,
|
||||||
|
@ -74,7 +92,7 @@ export default {
|
||||||
FullPath: item.FullPath,
|
FullPath: item.FullPath,
|
||||||
FileName: item.FileName,
|
FileName: item.FileName,
|
||||||
CreateTime: item.CreateTime,
|
CreateTime: item.CreateTime,
|
||||||
Id: item.Id
|
Id: item.Id,
|
||||||
}
|
}
|
||||||
arr.push(data)
|
arr.push(data)
|
||||||
})
|
})
|
||||||
|
@ -85,20 +103,22 @@ export default {
|
||||||
// 检测文件后缀名
|
// 检测文件后缀名
|
||||||
if (this.checkFileSuffix(param.file.name)) {
|
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) {
|
if (isRepeat) {
|
||||||
this.$confirm('Override the existing resume?', {
|
this.$confirm('Override the existing resume?', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
confirmButtonText: 'OK',
|
confirmButtonText: 'OK',
|
||||||
cancelButtonText: 'Cancel'
|
cancelButtonText: 'Cancel',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// 重名覆盖
|
// 重名覆盖
|
||||||
this.repeat = true
|
this.repeat = true
|
||||||
this.uploadFile(param.file)
|
this.uploadFile(param.file)
|
||||||
})
|
})
|
||||||
.catch(action => {})
|
.catch((action) => {})
|
||||||
} else {
|
} else {
|
||||||
this.uploadFile(param.file)
|
this.uploadFile(param.file)
|
||||||
}
|
}
|
||||||
|
@ -110,7 +130,10 @@ export default {
|
||||||
this.isDisabled = true
|
this.isDisabled = true
|
||||||
var fileName = file.name
|
var fileName = file.name
|
||||||
file = await this.fileToBlob(file)
|
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) {
|
if (this.repeat) {
|
||||||
const index = this.fileList.findIndex((item, index) => {
|
const index = this.fileList.findIndex((item, index) => {
|
||||||
return item.FileName === fileName
|
return item.FileName === fileName
|
||||||
|
@ -124,19 +147,21 @@ export default {
|
||||||
Type: this.type,
|
Type: this.type,
|
||||||
Path: this.$getObjectName(res.url),
|
Path: this.$getObjectName(res.url),
|
||||||
FullPath: this.$getObjectName(res.url),
|
FullPath: this.$getObjectName(res.url),
|
||||||
FileName: fileName
|
FileName: fileName,
|
||||||
}
|
}
|
||||||
this.fileList.push(fileData)
|
this.fileList.push(fileData)
|
||||||
}
|
}
|
||||||
this.saveUploadFiles()
|
this.saveUploadFiles()
|
||||||
},
|
},
|
||||||
saveUploadFiles() {
|
saveUploadFiles() {
|
||||||
saveAttachments(this.fileList).then(res => {
|
saveAttachments(this.fileList)
|
||||||
|
.then((res) => {
|
||||||
this.fileList = this.formatterFileList(res.Result)
|
this.fileList = this.formatterFileList(res.Result)
|
||||||
this.isDisabled = false
|
this.isDisabled = false
|
||||||
this.$message.success('Uploaded successfully')
|
this.$message.success('Uploaded successfully')
|
||||||
this.$emit('getFileList', this.fileList)
|
this.$emit('getFileList', this.fileList)
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {
|
||||||
this.isDisabled = false
|
this.isDisabled = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -144,32 +169,36 @@ export default {
|
||||||
this.$confirm('Sure to remove?', {
|
this.$confirm('Sure to remove?', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
})
|
||||||
}).then(() => {
|
.then(() => {
|
||||||
deleteAttachment(file.Id, file.Path)
|
deleteAttachment(file.Id, file.Path).then((res) => {
|
||||||
.then(res => {
|
|
||||||
if (res.IsSuccess) {
|
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.$emit('getFileList', this.fileList)
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('common:message:deletedSuccessfully'),
|
message: this.$t('common:message:deletedSuccessfully'),
|
||||||
type: 'success'
|
type: 'success',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(action => {})
|
.catch((action) => {})
|
||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var index = fileName.lastIndexOf('.')
|
var index = fileName.lastIndexOf('.')
|
||||||
var suffix = fileName.substring(index + 1, fileName.length)
|
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>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.uploadFiles-container{
|
.uploadFiles-container {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
.uploadFiles-container .el-upload--text {
|
.uploadFiles-container .el-upload--text {
|
||||||
|
|
|
@ -16,14 +16,14 @@
|
||||||
<i
|
<i
|
||||||
class="el-icon-edit"
|
class="el-icon-edit"
|
||||||
:title="$t('common:button:edit')"
|
:title="$t('common:button:edit')"
|
||||||
v-if="item.IsIRUpload"
|
v-if="item.IsIRUpload || isPM"
|
||||||
@click="
|
@click="
|
||||||
handleEditCol(item, 0, $t('trials:enrolledReviews:message:SOW'))
|
handleEditCol(item, 0, $t('trials:enrolledReviews:message:SOW'))
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<i
|
<i
|
||||||
class="el-icon-delete"
|
class="el-icon-delete"
|
||||||
v-if="item.IsIRUpload"
|
v-if="item.IsIRUpload || isPM"
|
||||||
:title="$t('common:button:delete')"
|
:title="$t('common:button:delete')"
|
||||||
@click="handleRemoveFile3(item)"
|
@click="handleRemoveFile3(item)"
|
||||||
/>
|
/>
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
{{ $t('common:button:downloadTpl') }}
|
{{ $t('common:button:downloadTpl') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<template v-if="!isPM">
|
||||||
<template v-if="CounselorFiles">
|
<template v-if="CounselorFiles">
|
||||||
<div class="file_title">
|
<div class="file_title">
|
||||||
{{ $t('curriculumVitae:agreement:Counselor') }}
|
{{ $t('curriculumVitae:agreement:Counselor') }}
|
||||||
|
@ -71,6 +72,77 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="file_title">
|
||||||
|
{{ $t('curriculumVitae:agreement:Counselor') }}
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
<div class="file_title">
|
||||||
|
{{ $t('curriculumVitae:agreement:confirmation') }}
|
||||||
|
</div>
|
||||||
|
<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>
|
</div>
|
||||||
<BaseModel :config="model_cfg">
|
<BaseModel :config="model_cfg">
|
||||||
<template slot="dialog-body">
|
<template slot="dialog-body">
|
||||||
|
@ -164,10 +236,12 @@ import {
|
||||||
getDoctorCriterionFile,
|
getDoctorCriterionFile,
|
||||||
} from '@/api/reviewers'
|
} from '@/api/reviewers'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
|
import UploadFiles from '@/components/UploadFiles'
|
||||||
export default {
|
export default {
|
||||||
name: 'agreement',
|
name: 'agreement',
|
||||||
components: {
|
components: {
|
||||||
BaseModel,
|
BaseModel,
|
||||||
|
UploadFiles,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
DATA: {
|
DATA: {
|
||||||
|
@ -184,6 +258,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isPM: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -247,6 +325,12 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleRemoveFile(row) {
|
||||||
|
this.$refs.uploadAgreement.handleDeleteFile(row)
|
||||||
|
},
|
||||||
|
getFileList(fileList) {
|
||||||
|
this.agreementList = fileList
|
||||||
|
},
|
||||||
preview(row) {
|
preview(row) {
|
||||||
this.$preview({
|
this.$preview({
|
||||||
path: row.FullPath,
|
path: row.FullPath,
|
||||||
|
@ -308,7 +392,7 @@ export default {
|
||||||
},
|
},
|
||||||
handlePreview3(row) {
|
handlePreview3(row) {
|
||||||
return this.$preview({
|
return this.$preview({
|
||||||
path: row.FilePath,
|
path: row.FilePath || row.Path || row.FullPath,
|
||||||
type: 'pdf',
|
type: 'pdf',
|
||||||
title: row.FileName,
|
title: row.FileName,
|
||||||
})
|
})
|
||||||
|
@ -357,7 +441,9 @@ export default {
|
||||||
'CriterionType',
|
'CriterionType',
|
||||||
this.form.CriterionType
|
this.form.CriterionType
|
||||||
)
|
)
|
||||||
|
if (!this.isPM) {
|
||||||
this.form.IsIRUpload = true
|
this.form.IsIRUpload = true
|
||||||
|
}
|
||||||
addDoctorCriterionFile(this.form).then((res) => {
|
addDoctorCriterionFile(this.form).then((res) => {
|
||||||
this.$message.success('添加成功')
|
this.$message.success('添加成功')
|
||||||
this.initSowList()
|
this.initSowList()
|
||||||
|
|
|
@ -107,7 +107,6 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
console.log(111111111)
|
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
},
|
},
|
||||||
handleAddHoliday() {
|
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 class="title">
|
||||||
<div>{{ $t('curriculumVitae:content:title') }}</div>
|
<div>{{ $t('curriculumVitae:content:title') }}</div>
|
||||||
<div class="btnBox">
|
<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">
|
<el-button type="text" @click.stop="openHoliday">
|
||||||
{{ $t('curriculumVitae:button:holiday') }}
|
{{ $t('curriculumVitae:button:holiday') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -165,6 +168,7 @@
|
||||||
<agreement
|
<agreement
|
||||||
:DATA="reviewerData.AttachmentList"
|
:DATA="reviewerData.AttachmentList"
|
||||||
:isEN="isEN"
|
:isEN="isEN"
|
||||||
|
:isPM="isPM"
|
||||||
:reviewerId.sync="reviewerId"
|
:reviewerId.sync="reviewerId"
|
||||||
@getInfo="getDetail"
|
@getInfo="getDetail"
|
||||||
/>
|
/>
|
||||||
|
@ -180,6 +184,11 @@
|
||||||
:reviewerId.sync="reviewerId"
|
:reviewerId.sync="reviewerId"
|
||||||
:visible.sync="holidayVisible"
|
:visible.sync="holidayVisible"
|
||||||
/>
|
/>
|
||||||
|
<setting
|
||||||
|
v-if="settingVisible"
|
||||||
|
:reviewerId.sync="reviewerId"
|
||||||
|
:visible.sync="settingVisible"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -197,6 +206,7 @@ import treatise from './components/info/treatise.vue'
|
||||||
import other from './components/info/other.vue'
|
import other from './components/info/other.vue'
|
||||||
import pay from './components/info/pay.vue'
|
import pay from './components/info/pay.vue'
|
||||||
import holiday from './components/info/holiday.vue'
|
import holiday from './components/info/holiday.vue'
|
||||||
|
import setting from './components/info/setting.vue'
|
||||||
import preview from './preview.vue'
|
import preview from './preview.vue'
|
||||||
import { getDetail } from '@/api/reviewers'
|
import { getDetail } from '@/api/reviewers'
|
||||||
import { mapMutations } from 'vuex'
|
import { mapMutations } from 'vuex'
|
||||||
|
@ -217,6 +227,7 @@ export default {
|
||||||
pay,
|
pay,
|
||||||
holiday,
|
holiday,
|
||||||
preview,
|
preview,
|
||||||
|
setting,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -224,8 +235,8 @@ export default {
|
||||||
isScrollAuto: true,
|
isScrollAuto: true,
|
||||||
visible: false,
|
visible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
reviewerId: null,
|
reviewerId: '',
|
||||||
trialId: null,
|
trialId: '',
|
||||||
reviewerData: {
|
reviewerData: {
|
||||||
BasicInfoView: {},
|
BasicInfoView: {},
|
||||||
EmploymentView: {},
|
EmploymentView: {},
|
||||||
|
@ -245,12 +256,18 @@ export default {
|
||||||
dom: null,
|
dom: null,
|
||||||
|
|
||||||
holidayVisible: false,
|
holidayVisible: false,
|
||||||
|
|
||||||
|
settingVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isEN() {
|
isEN() {
|
||||||
return this.$i18n.locale !== 'zh'
|
return this.$i18n.locale !== 'zh'
|
||||||
},
|
},
|
||||||
|
isPM() {
|
||||||
|
// return true
|
||||||
|
return this.hasPermi(['role:pm'])
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.$i18n.locale =
|
this.$i18n.locale =
|
||||||
|
@ -335,6 +352,10 @@ export default {
|
||||||
openHoliday() {
|
openHoliday() {
|
||||||
this.holidayVisible = true
|
this.holidayVisible = true
|
||||||
},
|
},
|
||||||
|
// 设置
|
||||||
|
openSetting() {
|
||||||
|
this.settingVisible = true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue