Compare commits

..

No commits in common. "0cd44bf4c6a9834895cdb9e73e4df802f48dcc20" and "a2939e52b200ce29103cf0ae0b1f9e66c5382a0a" have entirely different histories.

235 changed files with 8001 additions and 34933 deletions

View File

@ -5,6 +5,3 @@ npm install
# 启动服务 # 启动服务
npm run dev npm run dev
# v1.9.0修改
1. 角色修改全局userId实际意义修改为userRoleId用户角色id新增identityUserId新的用户id

1951
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,6 @@
"i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7" "i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7"
}, },
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.370.0",
"@cornerstonejs/calculate-suv": "^1.1.0", "@cornerstonejs/calculate-suv": "^1.1.0",
"@cornerstonejs/core": "^1.27.4", "@cornerstonejs/core": "^1.27.4",
"@cornerstonejs/dicom-image-loader": "^1.27.4", "@cornerstonejs/dicom-image-loader": "^1.27.4",
@ -25,13 +24,11 @@
"@ffmpeg/ffmpeg": "^0.10.1", "@ffmpeg/ffmpeg": "^0.10.1",
"@microsoft/signalr": "^6.0.8", "@microsoft/signalr": "^6.0.8",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue/composition-api": "^1.7.2",
"ali-oss": "^6.17.1", "ali-oss": "^6.17.1",
"axios": "0.18.1", "axios": "0.18.1",
"babel-eslint": "7.2.3", "babel-eslint": "7.2.3",
"copy-webpack-plugin": "^4.5.2", "copy-webpack-plugin": "^4.5.2",
"@aws-sdk/client-s3": "^3.370.0",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"cornerstone-core": "^2.6.1", "cornerstone-core": "^2.6.1",
"cornerstone-math": "^0.1.10", "cornerstone-math": "^0.1.10",
@ -69,7 +66,6 @@
"vue-clipboard2": "^0.3.1", "vue-clipboard2": "^0.3.1",
"vue-contextmenujs": "^1.3.13", "vue-contextmenujs": "^1.3.13",
"vue-count-to": "^1.0.13", "vue-count-to": "^1.0.13",
"vue-demi": "^0.14.6",
"vue-i18n": "^8.7.0", "vue-i18n": "^8.7.0",
"vue-pdf": "^4.3.0", "vue-pdf": "^4.3.0",
"vue-puzzle-vcode": "^1.1.10", "vue-puzzle-vcode": "^1.1.10",

View File

@ -23,8 +23,8 @@
<img src="./error_assets/zzlogo2.png" alt=""> <img src="./error_assets/zzlogo2.png" alt="">
<img v-show="false" src="./error_assets/zzlogo3.png" alt=""> <img v-show="false" src="./error_assets/zzlogo3.png" alt="">
</div> </div>
<div class="login-image login-image-usa"> <div class="login-image">
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;"> <img src="./error_assets/login-bg.png">
</div> </div>
</div> </div>
<div class="login-r"> <div class="login-r">
@ -148,7 +148,7 @@
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
width: 1100px; width: 1200px;
height: 600px; height: 600px;
box-sizing: border-box; box-sizing: border-box;
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
@ -179,12 +179,7 @@
.login-container .login-body .login-l .login-image img{ .login-container .login-body .login-l .login-image img{
height: 100%; height: 100%;
} }
.login-container .login-body .login-l .login-image-usa {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.login-container .login-body .login-r{ .login-container .login-body .login-r{
position: relative; position: relative;
float: left; float: left;

View File

@ -23,8 +23,8 @@
<img src="./error_assets/zzlogo3.png" alt=""> <img src="./error_assets/zzlogo3.png" alt="">
<img v-show="false" src="./error_assets/zzlogo3.png" alt=""> <img v-show="false" src="./error_assets/zzlogo3.png" alt="">
</div> </div>
<div class="login-image login-image-usa"> <div class="login-image">
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;"> <img src="./error_assets/login-bg.png">
</div> </div>
</div> </div>
<div class="login-r"> <div class="login-r">
@ -104,7 +104,7 @@
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
width: 1100px; width: 1200px;
height: 600px; height: 600px;
box-sizing: border-box; box-sizing: border-box;
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
@ -135,12 +135,7 @@
.login-container .login-body .login-l .login-image img{ .login-container .login-body .login-l .login-image img{
height: 100%; height: 100%;
} }
.login-container .login-body .login-l .login-image-usa {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.login-container .login-body .login-r{ .login-container .login-body .login-r{
position: relative; position: relative;
float: left; float: left;

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 98 KiB

View File

@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="pragram" content="no-cache"> <meta http-equiv="pragram" content="no-cache">
<meta name="autocomplete" content="off">
<meta http-equiv="Expires" content="0"> <meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-store,no-cache,must-revalidate"> <meta http-equiv="Cache-control" content="no-store,no-cache,must-revalidate">
@ -30,6 +29,7 @@
</script> </script>
<% } else { %> <% } else { %>
<script> <script>
console.log(2)
window.zzSessionStorage = { window.zzSessionStorage = {
setItem: (item, value) => { setItem: (item, value) => {
return sessionStorage.setItem(item, value) return sessionStorage.setItem(item, value)

View File

@ -23,38 +23,12 @@
> >
i18n i18n
</div> </div>
<el-drawer <el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
:title="$t('il8n:title')" <div style="width: 320px">
:visible.sync="drawer" <el-form label-width="100px" @submit.native.prevent size="small">
direction="rtl" <el-form-item label="关键字">
size="80%"
>
<div style="width: 620px">
<el-form
label-width="100px"
@submit.native.prevent
size="small"
:inline="true"
class="demo-form-inline"
>
<el-form-item :label="$t('il8n:search:keyword')">
<el-input v-model="key" @input="keyChange" /> <el-input v-model="key" @input="keyChange" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('il8n:search:state')" v-if="il8nExternal">
<el-select
v-model="State"
clearable
filterable
@change="handleStateChange"
>
<el-option
v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form> </el-form>
</div> </div>
<el-table <el-table
@ -63,12 +37,7 @@
height="100" height="100"
style="width: 100%" style="width: 100%"
> >
<el-table-column <el-table-column prop="Code" label="标签" width="300">
prop="Code"
:label="$t('il8n:table:label')"
width="300"
show-overflow-tooltip
>
</el-table-column> </el-table-column>
<!-- <el-table-column--> <!-- <el-table-column-->
<!-- prop="Description"--> <!-- prop="Description"-->
@ -79,53 +48,32 @@
<!-- {{scope.row.Description}}--> <!-- {{scope.row.Description}}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column prop="Value" :label="$t('il8n:table:en')"> <el-table-column prop="Value" label="英文">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.Value" v-model="scope.row.Value"
@input=" @input="
(e) => { (e) => {
$set(scope.row, 'Value', e) $set(scope.row, 'Value', e);
} }
" "
size="mini" size="mini"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ValueCN" :label="$t('il8n:table:cn')"> <el-table-column prop="ValueCN" label="中文">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input <el-input
v-model="scope.row.ValueCN" v-model="scope.row.ValueCN"
@input=" @input="
(e) => { (e) => {
$set(scope.row, 'ValueCN', e) $set(scope.row, 'ValueCN', e);
} }
" "
size="mini" size="mini"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="ValueCN"
:label="$t('il8n:table:state')"
v-if="il8nExternal"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.State"
clearable
filterable
size="mini"
>
<el-option
v-for="item of $d.InternationalizationKeyState"
:key="'InternationalizationKeyState' + item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table> </el-table>
<div style="text-align: right; padding-top: 10px; padding-right: 10px"> <div style="text-align: right; padding-top: 10px; padding-right: 10px">
<el-button size="mini" @click="drawer = false">取消 </el-button> <el-button size="mini" @click="drawer = false">取消 </el-button>
@ -142,13 +90,13 @@
import { import {
batchAddOrUpdateFrontInternationalization, batchAddOrUpdateFrontInternationalization,
getFrontInternationalizationList, getFrontInternationalizationList,
} from '@/api/dictionary/dictionary' } from "@/api/dictionary/dictionary";
import { getTrialExtralConfig } from '@/api/trials' import { getTrialExtralConfig } from "@/api/trials";
import feedBack from '@/views/trials/trials-layout/components/feedBack' import feedBack from "@/views/trials/trials-layout/components/feedBack";
import Vue from 'vue' import Vue from "vue";
import i18n from './lang' import i18n from "./lang";
export default { export default {
name: 'App', name: "App",
components: { feedBack }, components: { feedBack },
data() { data() {
return { return {
@ -157,51 +105,38 @@ export default {
show: false, show: false,
key: null, key: null,
arr: [], arr: [],
il8nExternal: false, };
State: null,
}
}, },
mounted() { mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist' this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
Vue.prototype.$openI18n = this.openI18n },
watch: {
"$route.query": {
async handler() {
if (
this.$route.query.trialId &&
this.$route.query.trialId !==
this.$store.state.trials.config.trialId &&
this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
) {
let res = await getTrialExtralConfig({
TrialId: this.$route.query.trialId,
});
if (res.IsSuccess) {
this.$store.dispatch("trials/setConfig", {
trialId: this.$route.query.trialId,
...res.Result,
});
}
}
},
immediate: true,
deep: true,
},
}, },
// watch: {
// '$route.query': {
// async handler() {
// if (!this.$route.query.trialId) {
// this.$store.dispatch('trials/setConfig', {})
// }
// if (
// this.$route.query.trialId &&
// this.$route.query.trialId !==
// this.$store.state.trials.config.trialId &&
// this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
// ) {
// let res = await getTrialExtralConfig({
// TrialId: this.$route.query.trialId,
// })
// console.log(222222222222)
// res.Result.aa = { : '', : 'aaa' }
// if (res.IsSuccess) {
// this.$store.dispatch('trials/setConfig', {
// trialId: this.$route.query.trialId,
// ...res.Result,
// })
// }
// }
// },
// immediate: true,
// deep: true,
// },
// },
methods: { methods: {
handleStateChange() {
this.tableData.forEach((item) => {
item.State = this.State
})
},
changeValue(target, attr, e) { changeValue(target, attr, e) {
this.$set(target, attr, e) this.$set(target, attr, e);
}, },
keyChange(v) { keyChange(v) {
if (this.key) { if (this.key) {
@ -213,93 +148,65 @@ export default {
~v.Value.indexOf(this.key) || ~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key) ~v.ValueCN.indexOf(this.key)
) )
) );
} else { } else {
this.tableData = Object.assign([], this.arr) this.tableData = Object.assign([], this.arr);
} }
}, },
handleSave() { handleSave() {
this.$confirm('确定修改当前页面国际化内容?').then(() => { this.$confirm("确定修改当前页面国际化内容?").then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then( batchAddOrUpdateFrontInternationalization(this.tableData).then(
async (res) => { async (res) => {
var zhMessages = {}, var zhMessages = {},
enMessages = {} enMessages = {};
var Internationalization = await getFrontInternationalizationList() var Internationalization = await getFrontInternationalizationList();
Vue.prototype.$tl = Internationalization.Result Vue.prototype.$tl = Internationalization.Result;
this.tableData.forEach((v) => { this.tableData.forEach((v) => {
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN // zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value // enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN zhMessages[v.Code] = v.ValueCN;
enMessages[v.Code] = v.Value enMessages[v.Code] = v.Value;
}) });
i18n.mergeLocaleMessage('zh', zhMessages) i18n.mergeLocaleMessage("zh", zhMessages);
i18n.mergeLocaleMessage('en', enMessages) i18n.mergeLocaleMessage("en", enMessages);
this.drawer = false this.drawer = false;
this.$message.success('国际化修改成功') this.$message.success("国际化修改成功");
if (this.il8nExternal) {
this.$EventBus.$emit('il8nUpdate')
} }
} );
) });
})
}, },
openI18n(ARRAY) { openI18n() {
this.tableData = [] this.tableData = [];
this.il8nExternal = false this.key = null;
this.key = null this.drawer = true;
this.drawer = true let arr = [];
let arr = [] let tableData = this.$tl.map((v) => {
let tableData = [] let a = { ...v };
if (ARRAY && Array.isArray(ARRAY)) {
this.il8nExternal = true
let data = ARRAY.map((v) => {
let a = { ...v }
return a
})
tableData = data.map((item) => {
return {
Code: item.Code,
Description: item.Description,
FrontType: item.FrontType,
Module: item.Module,
Value: item.Value,
ValueCN: item.ValueCN,
State: item.State,
}
})
this.tableData = Object.assign([], tableData)
this.arr = Object.assign([], tableData)
return false
} else {
tableData = this.$tl.map((v) => {
let a = { ...v }
// if (!a.Description) { // if (!a.Description) {
// a.Description = this.$route.path // a.Description = this.$route.path
// } // }
return a return a;
}) });
}
tableData = tableData.filter((v) => { tableData = tableData.filter((v) => {
// return ~this.$path.indexOf(v.Description + '_' + v.Code) // return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code) return ~this.$path.indexOf(v.Code);
}) });
this.$path.forEach((v) => { this.$path.forEach((v) => {
let o = tableData.find((a) => { let o = tableData.find((a) => {
return a.Code === v return a.Code === v;
}) });
if (o) { if (o) {
arr.push(o) arr.push(o);
} else { } else {
arr.push({ arr.push({
Code: v, Code: v,
Description: null, Description: null,
Value: null, Value: null,
ValueCN: null, ValueCN: null,
}) });
} }
}) });
this.arr = arr this.arr = arr;
if (this.key) { if (this.key) {
this.tableData = Object.assign( this.tableData = Object.assign(
[], [],
@ -309,15 +216,15 @@ export default {
~v.Value.indexOf(this.key) || ~v.Value.indexOf(this.key) ||
~v.ValueCN.indexOf(this.key) ~v.ValueCN.indexOf(this.key)
) )
) );
} else { } else {
this.tableData = Object.assign([], this.arr) this.tableData = Object.assign([], this.arr);
} }
// console.log(JSON.stringify(this.$path)) // console.log(JSON.stringify(this.$path))
// console.log(JSON.stringify(this.tableData)) // console.log(JSON.stringify(this.tableData))
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
@ -342,7 +249,7 @@ input::-webkit-inner-spin-button {
-webkit-appearance: none !important; -webkit-appearance: none !important;
} }
input[type='number'] { input[type="number"] {
-moz-appearance: textfield !important; -moz-appearance: textfield !important;
} }
@ -368,7 +275,7 @@ textarea {
color: $light_gray; color: $light_gray;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
font-family: 'Times New Roman'; font-family: "Times New Roman";
text-shadow: 1px 0.5px 1.5px #666; text-shadow: 1px 0.5px 1.5px #666;
} }
.title-logo { .title-logo {

View File

@ -44,19 +44,11 @@ export function updateUser(param) {
data: param data: param
}) })
} }
export function updateUserBasicInfo(param) {
return request({
url: `/user/updateUserBasicInfo`,
method: 'put',
data: param
})
}
export function getUser(params) { export function getUser(userId) {
return request({ return request({
url: `/user/getUser`, url: `/user/getUser/${userId}`,
method: 'get', method: 'get'
params
}) })
} }
@ -301,44 +293,3 @@ export function batchUpdateInternationalInfo(data) {
data data
}) })
} }
// 邮件事件消息列表
export function getEventStoreRecordList(data) {
return request({
url: `/EventStoreRecord/getEventStoreRecordList`,
method: 'post',
data
})
}
// 重新发布事件消息
export function rePublishEvent(params) {
return request({
url: `/EventStoreRecord/rePublishEvent`,
method: 'get',
params
})
}
// userId获取doctorId
export function useUserIDGetDoctorID(data) {
return request({
url: `/TrialSiteSurvey/useUserIDGetDoctorID`,
method: 'post',
data
})
}
// 管理端修改用户角色
export function updateUserRoleInfo(data) {
return request({
url: `/User/updateUserRoleInfo`,
method: 'put',
data
})
}
// 管理端新增用户发送邮件
export function addNewUserSendEmail(data) {
return request({
url: `/User/addNewUserSendEmail`,
method: 'post',
data
})
}

View File

@ -1046,27 +1046,3 @@ export function getExploreRecommentInfo(params) {
params params
}) })
} }
export function getSystemCalculateQuestions(params) {
return request({
url: `/ReadingQuestion/getSystemCalculateQuestions`,
method: 'post',
data: params
})
}
export function getSystemCalculateTableQuestions(params) {
return request({
url: `/ReadingQuestion/getSystemCalculateTableQuestions`,
method: 'post',
data: params
})
}
// 添加pd/入组默认邮件
export function batchAddEnrollOrPdEmailConfig(params) {
return request({
url: `/TrialEmailNoticeConfig/batchAddEnrollOrPdEmailConfig`,
method: 'post',
params
})
}

View File

@ -187,73 +187,3 @@ export function qCVisitList_Export(data) {
data data
}) })
} }
// 导出下载记录
export function getTrialDownloadList_Export(data) {
return requestDownload({
url: `/ExcelExport/getTrialDownloadList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出接收记录
export function getSCPImageUploadList_Export(data) {
return requestDownload({
url: `/ExcelExport/getSCPImageUploadList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出接收检查影像记录
export function getPatientList_Export(data) {
return requestDownload({
url: `/ExcelExport/getPatientList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
export function getCommonEvaluationList_Export(data) {
return requestDownload({
url: `/ExcelExport/getCommonEvaluationList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
export function getCommonJudgeRatioList_Export(data) {
return requestDownload({
url: `/ExcelExport/getCommonJudgeRatioList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出国际化列表
export function GetInternationalizationList_Export(data) {
return requestDownload({
url: `/ExcelExport/GetInternationalizationList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出一致性分析
export function GetAnalysisTaskList_Export(data) {
return requestDownload({
url: `/ExcelExport/GetAnalysisTaskList_Export`,
responseType: 'blob',
method: 'post',
data
})
}
// 导出邮件配置
export function GetEmailNoticeConfigList_Export(data) {
return requestDownload({
url: `/ExcelExport/GetEmailNoticeConfigList_Export`,
responseType: 'blob',
method: 'post',
data
})
}

View File

@ -251,37 +251,3 @@ export function uploadOCTLipidAngleTemplate(param) {
data: param data: param
}) })
} }
export function saveTableQuestionMark(param, type) {
return request({
url: `/saveTableQuestionMark/${type}`,
method: 'post',
data: param
})
}
export function deleteTableQuestionMark(param, type) {
return request({
url: `/deleteTableQuestionMark/${type}`,
method: 'post',
data: param
})
}
export function submitTaskRowInfo(param, type) {
return request({
url: `/SubmitTaskRowInfo/${type}`,
method: 'post',
data: param
})
}
export function deleteSingleTableQuestionMark(param, type) {
return request({
url: `/DeleteSingleTableQuestionMark/${type}`,
method: 'post',
data: param
})
}

View File

@ -12,8 +12,7 @@ export function verifySendCode(param) {
return request({ return request({
url: '/TrialSiteSurvey/verifySendCode', url: '/TrialSiteSurvey/verifySendCode',
method: 'post', method: 'post',
data: param, data: param
clearToken: true
}) })
} }

View File

@ -138,11 +138,10 @@ export function addOrUpdateResearchPublication(param) {
}) })
} }
export function getTrialExperience(data) { export function getTrialExperience(doctorId) {
return request({ return request({
url: `/trialExperience/getTrialExperience`, url: `/trialExperience/getTrialExperience/${doctorId}`,
method: 'post', method: 'get'
data
}) })
} }
@ -237,14 +236,10 @@ export function downloadByAttachmentId(doctorId, attachmentIds) {
}) })
} }
export function getDetail(doctorId, TrialId) { export function getDetail(doctorId) {
return request({ return request({
url: `/doctor/getDetail`, url: `/doctor/getDetail/${doctorId}`,
method: 'post', method: 'get'
data: {
DoctorId: doctorId,
TrialId
}
}) })
} }
@ -295,75 +290,3 @@ export function verifyEmialGetDoctorInfo(param) {
data: param data: param
}) })
} }
// 新增或编辑基本信息
export function addOrUpdateDoctorBasicInfoAndEmployment(param) {
return request({
url: `/Doctor/addOrUpdateDoctorBasicInfoAndEmployment`,
method: 'post',
data: param
})
}
// 新增或编辑概述
export function addOrUpdateGneralSituation(param) {
return request({
url: `/Doctor/addOrUpdateGneralSituation`,
method: 'post',
data: param
})
}
// 新增或编辑支付方式
export function updatePaymentMode(param) {
return request({
url: `/Doctor/updatePaymentMode`,
method: 'post',
data: param
})
}
// 新增或编辑Publication
export function addOrUpdateResearchPublicationInfo(param) {
return request({
url: `/ResearchPublication/addOrUpdateResearchPublicationInfo`,
method: 'post',
data: param
})
}
// 发送简历采集邮件
export function doctorSendEmail(param) {
return request({
url: `/Doctor/sendEmail`,
method: 'post',
data: param
})
}
// 获取医生是否休假
export function getIsVacation(param) {
return request({
url: `/Vacation/getIsVacation`,
method: 'post',
data: param
})
}
// 获取概述
export function getSummarizeInfo(param) {
return request({
url: `/Doctor/getSummarizeInfo`,
method: 'post',
data: param
})
}
// 删除概述
export function deleteSummarizeInfo(param) {
return request({
url: `/Doctor/deleteSummarizeInfo`,
method: 'post',
data: param
})
}
// pm通过邮箱新建或查询简历
export function useEmialGetDoctorInfo(param) {
return request({
url: `/TrialSiteSurvey/useEmialGetDoctorInfo`,
method: 'post',
data: param
})
}

View File

@ -286,11 +286,10 @@ export function trialSiteUserSummaryListExport(param) {
}) })
} }
export function getVisitStageList(data) { export function getVisitStageList(trialId) {
return request({ return request({
url: `/visitPlan/getVisitStageList`, url: `/visitPlan/getVisitStageList/${trialId}`,
method: 'post', method: 'get'
data
}) })
} }
@ -3907,55 +3906,3 @@ export function setTaskValid(data) {
data data
}) })
} }
// 一致性分析临床数据设置任务为有效
export function getVisitClinicalDataName(data) {
return request({
url: `/ReadingClinicalData/getVisitClinicalDataName`,
method: 'post',
data
})
}
// 修改外部人员权限配置
export function configTrialSPMInfo(data) {
return request({
url: `/TrialConfig/configTrialSPMInfo`,
method: 'post',
data
})
}
// 项目添加角色修改权限
export function updateTrialUserRole(data) {
return request({
url: `/TrialMaintenance/updateTrialUserRole`,
method: 'put',
data
})
}
// 获取报表配置
export function getTrialQuestionExportResult(data) {
return request({
url: `/ReadingQuestion/getTrialQuestionExportResult`,
method: 'post',
data
})
}
// 修改报表配置
export function setTrialQuestionExportResult(data) {
return request({
url: `/ReadingQuestion/SetTrialQuestionExportResult`,
method: 'post',
data
})
}
// 项目加入人员发送邮件
export function trialUserSendJoinEmail(data) {
return request({
url: `/TrialMaintenance/trialUserSendJoinEmail`,
method: 'post',
data
})
}

View File

@ -179,11 +179,11 @@ export function verifyMFACode(params) {
} }
// 发送MFA邮件 // 发送MFA邮件
export function sendMFAEmail(data) { export function sendMFAEmail(params) {
return request({ return request({
url: `/User/sendMFAEmail`, url: `/User/sendMFAEmail`,
method: 'post', method: 'post',
data params
}) })
} }
// 获取公钥 // 获取公钥
@ -193,19 +193,3 @@ export function getPublicKey() {
method: 'get', method: 'get',
}) })
} }
// 登陆获取角色
export function getUserLoginRoleList(data) {
return request({
url: `/User/getUserLoginRoleList`,
method: 'post',
data,
})
}
// 登陆角色id获取token
export function loginSelectUserRole(params) {
return request({
url: `/User/loginSelectUserRole`,
method: 'get',
params,
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -120,7 +120,6 @@
v-if="item.type === 'Daterange'" v-if="item.type === 'Daterange'"
v-model="searchData[item.prop]" v-model="searchData[item.prop]"
type="datetimerange" type="datetimerange"
:default-time="['00:00:00', '23:59:59']"
:range-separator="$t('baseForm:daterange:rangeSeparator')" :range-separator="$t('baseForm:daterange:rangeSeparator')"
:start-placeholder="$t('baseForm:daterange:startPlaceholder')" :start-placeholder="$t('baseForm:daterange:startPlaceholder')"
:end-placeholder="$t('baseForm:daterange:startendPlaceholder')" :end-placeholder="$t('baseForm:daterange:startendPlaceholder')"

View File

@ -8,11 +8,10 @@
:visible.sync="config.visible" :visible.sync="config.visible"
:close-on-click-modal="false" :close-on-click-modal="false"
:show-close="config.showClose" :show-close="config.showClose"
:top="config.top"
:width="config.width" :width="config.width"
:fullscreen="config.fullscreen" :fullscreen="config.fullscreen"
> >
<div class="base-modal-body" :style="config.bodyStyle"> <div class="base-modal-body">
<slot name="dialog-body" /> <slot name="dialog-body" />
</div> </div>
<div slot="footer" class="base-modal-footer"> <div slot="footer" class="base-modal-footer">
@ -23,26 +22,24 @@
</template> </template>
<script> <script>
export default { export default {
name: 'BaseDialog', name: "BaseDialog",
props: { props: {
config: { config: {
type: Object, type: Object,
default: () => { default: () => {
return { return {
visible: false, visible: false,
title: '', title: "",
closeOnClickModal: false, closeOnClickModal: false,
showClose: true, showClose: true,
appendToBody: false, appendToBody: false,
width: '100px', width: "100px",
fullscreen: false, fullscreen: false,
top: '15vh', };
bodyStyle: '',
}
}, },
}, },
}, },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.base-model-wrapper { .base-model-wrapper {

View File

@ -2,7 +2,7 @@
<el-row> <el-row>
<el-col class="m-b-10" :span="24"> <el-col class="m-b-10" :span="24">
<el-table <el-table
v-adaptive="{ bottomOffset }" v-adaptive="{bottomOffset}"
:data="list" :data="list"
:height="tableHeight" :height="tableHeight"
v-bind="$attrs" v-bind="$attrs"
@ -15,45 +15,15 @@
> >
<template v-for="(column, index) in columns"> <template v-for="(column, index) in columns">
<slot name="front-slot" /> <slot name="front-slot" />
<el-table-column v-if="column.type === 'tip'" :key="index" width="35">
<template slot-scope="scope">
<span v-if="column.slot">
<!-- 具名slot -->
<slot v-if="column.slot" :name="column.slot" :scope="scope" />
</span>
</template>
</el-table-column>
<!-- 序号 --> <!-- 序号 -->
<el-table-column <el-table-column v-if="column.type === 'selection'" :key="index" type="selection" width="55" />
v-else-if="column.type === 'selection'"
:key="index"
type="selection"
width="55"
/>
<!-- 复选框 --> <!-- 复选框 -->
<el-table-column <el-table-column v-else-if="column.type === 'index'" :key="index" type="index" width="50" />
v-else-if="column.type === 'index'"
:key="index"
type="index"
width="50"
/>
<!-- 具体内容 --> <!-- 具体内容 -->
<el-table-column <el-table-column v-else :key="index" align="left" :label="column.label" :width="column.width" :min-width="column.minWidth" :show-overflow-tooltip="column.showOverflowTooltip || false" :sortable="column.sortable || false" :prop="column.prop">
v-else
:key="index"
align="left"
:label="column.label"
:width="column.width"
:min-width="column.minWidth"
:show-overflow-tooltip="column.showOverflowTooltip || false"
:sortable="column.sortable || false"
:prop="column.prop"
:fixed="column.fixed"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 仅仅显示文字 --> <!-- 仅仅显示文字 -->
<span v-if="!column.hidden"> <span v-if="!column.hidden"> <!-- hiddentrue slot-->
<!-- 如果hidden为true的时候 那么当前格可以不显示可以选择显示自定义的slot-->
<!-- 操作按钮 --> <!-- 操作按钮 -->
<span v-if="column.type === 'operate'"> <span v-if="column.type === 'operate'">
<!-- <a v-for="(operate, i) in column.operates" :key="i" href="javascript:void(0)" class="operate-button" @click="handleClick(operate, scope.row)"> <!-- <a v-for="(operate, i) in column.operates" :key="i" href="javascript:void(0)" class="operate-button" @click="handleClick(operate, scope.row)">
@ -61,17 +31,7 @@
&nbsp;&nbsp; &nbsp;&nbsp;
</a> --> </a> -->
<span v-for="(operate, i) in column.operates" :key="i"> <span v-for="(operate, i) in column.operates" :key="i">
<el-button <el-button :size="operate.size || 'mini'" :type="operate.type || 'primary'" style="margin-right:5px;" @click="handleClick(operate, scope.row)">{{ operate.name }}</el-button>
:size="operate.size || 'mini'"
:type="operate.type || 'primary'"
v-if="
(operate.show && scope.row[operate.show]) ||
!operate.show
"
style="margin-right: 5px"
@click="handleClick(operate, scope.row)"
>{{ operate.name }}</el-button
>
</span> </span>
</span> </span>
<span v-else> <span v-else>
@ -92,12 +52,7 @@
</el-col> </el-col>
<!-- 分页部分 --> <!-- 分页部分 -->
<el-col v-if="!hiddenPage" :span="24" class="page"> <el-col v-if="!hiddenPage" :span="24" class="page">
<pagination <pagination :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="pagination" />
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="pagination"
/>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
@ -141,44 +96,45 @@ export default {
// //
list: { list: {
type: Array, type: Array,
default: () => [], default: () => []
}, },
// columns // columns
columns: { columns: {
type: Array, type: Array,
required: true, required: true,
default: () => [], default: () => []
}, },
// is hidden page for table // is hidden page for table
hiddenPage: { hiddenPage: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
bottomOffset: { bottomOffset: {
type: Number, type: Number,
default: 45, default: 45
}, },
searchData: { searchData: {
type: Object, type: Object,
default: () => {}, default: () => {}
}, },
total: { total: {
type: Number, type: Number,
default: 0, default: 0
}, },
highlightCurrentRow: { highlightCurrentRow: {
type: Boolean, type: Boolean,
default: false, default: false
}, }
}, },
data() { data() {
return {} return {
}
}, },
computed: { computed: {
tableHeight() { tableHeight() {
return 100 return 100
}, }
}, },
methods: { methods: {
// //
@ -201,12 +157,12 @@ export default {
}, },
pagination() { pagination() {
this.$emit('getList') this.$emit('getList')
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page { .page{
padding-top: 3px; padding-top: 3px;
text-align: right; text-align: right;
} }

View File

@ -262,15 +262,9 @@ export default {
apiTool apiTool
) )
if (!toolAlreadyAddedToElement) { if (!toolAlreadyAddedToElement) {
if (toolName === 'RectangleRoi') {
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true, showStatsText: true}})
} else if (toolName === 'EllipticalRoi') {
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true}})
} else {
cornerstoneTools.addToolForElement(element, apiTool) cornerstoneTools.addToolForElement(element, apiTool)
} }
} }
}
// Setup button listener // Setup button listener
// Prevent right click context menu for our menu buttons // Prevent right click context menu for our menu buttons
toolBtn.addEventListener( toolBtn.addEventListener(

View File

@ -181,10 +181,9 @@ export default {
elementObject.value = str elementObject.value = str
} }
} else { } else {
elementObject.value = dataSet.string(propertyName) if (element.length !== 2 && element.length !== 4) {
// if (element.length !== 2 && element.length !== 4) { // elementObject.value = 'binary data'
// // elementObject.value = 'binary data' }
// }
} }
} else if (vr === 'US') { } else if (vr === 'US') {
let text = dataSet.uint16(propertyName) let text = dataSet.uint16(propertyName)

View File

@ -21,7 +21,7 @@
label-width="100px" label-width="100px"
> >
<!-- 邮箱 --> <!-- 邮箱 -->
<p class="tip_mfa"> <p class="tip">
<i class="el-icon-warning" style="color: #409eff"></i> <i class="el-icon-warning" style="color: #409eff"></i>
<span>{{ tip }}</span> <span>{{ tip }}</span>
</p> </p>
@ -83,7 +83,7 @@ export default {
second: 60, second: 60,
form: { form: {
Code: null, Code: null,
IdentityUserId: null, UserId: null,
EMail: null, EMail: null,
username: null, username: null,
}, },
@ -115,7 +115,7 @@ export default {
methods: { methods: {
open(data) { open(data) {
let { UserId, status, username, EMail } = data; let { UserId, status, username, EMail } = data;
this.form.IdentityUserId = UserId; this.form.UserId = UserId;
this.status = status ? status : "login"; this.status = status ? status : "login";
this.form.username = username; this.form.username = username;
this.form.EMail = EMail; this.form.EMail = EMail;
@ -134,10 +134,10 @@ export default {
let res = await verifyMFACode(this.form); let res = await verifyMFACode(this.form);
this.loading = false; this.loading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
// if (this.status === "login") { if (this.status === "login") {
// this.$message.success(this.$t("mfa:message:verifySuccess")); this.$message.success(this.$t("mfa:message:verifySuccess"));
// } }
this.$emit("success", this.form.IdentityUserId); this.$emit("success", this.form.UserId);
this.cancel(); this.cancel();
} }
} catch (err) { } catch (err) {
@ -154,7 +154,7 @@ export default {
this.timer = null; this.timer = null;
} }
let data = { let data = {
IdentityUserId: this.form.IdentityUserId, UserId: this.form.UserId,
}; };
if (this.status === "lock") { if (this.status === "lock") {
data.MfaType = 1; data.MfaType = 1;
@ -189,7 +189,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tip_mfa { .tip {
width: 86%; width: 86%;
margin: auto; margin: auto;
margin-bottom: 20px; margin-bottom: 20px;

View File

@ -124,7 +124,7 @@ export default {
inputChange(v) { inputChange(v) {
this.resultFilter = this.options.filter((o) => { this.resultFilter = this.options.filter((o) => {
var reg = new RegExp(v, 'ig') var reg = new RegExp(v, 'ig')
return reg.test(o.ResearchProgramNo) || reg.test(o.Indication) || reg.test(o.ExperimentName) return reg.test(o.ResearchProgramNo) || reg.test(o.Indication)
}) })
}, },
getTrialList() { getTrialList() {

View File

@ -3,7 +3,7 @@
<div class="trialsTab"> <div class="trialsTab">
<el-tabs v-model="trialsTab" @tab-click="clickTab"> <el-tabs v-model="trialsTab" @tab-click="clickTab">
<el-tab-pane v-for="item of trialsRouter.children.find(v => {return v.name == 'TrialsPanel'}).children" :key="`tab${item.path}`" :disabled="TotalNeedSignTrialDocCount !== 0 && item.path !== '/trials/trials-panel/attachments'" :label="$t(item.LanguageMark)" :name="item.path"> <el-tab-pane v-for="item of trialsRouter.children.find(v => {return v.name == 'TrialsPanel'}).children" :key="`tab${item.path}`" :disabled="TotalNeedSignTrialDocCount !== 0 && item.path !== '/trials/trials-panel/attachments'" :label="$t(item.LanguageMark)" :name="item.path">
<el-tabs v-if="!item.tabHiddn" v-model="trialsTabChild" @tab-click="clickTab" style="background-color: #f5f7fa;"> <el-tabs v-if="!item.tabHiddn" v-model="trialsTabChild" @tab-click="clickTab">
<template v-for="item1 of item.children"> <template v-for="item1 of item.children">
<el-tab-pane <el-tab-pane
v-if="TrialConfig && isShow(item1.path)" v-if="TrialConfig && isShow(item1.path)"
@ -22,14 +22,11 @@
<i class="iconfont" style="font-size: 30px;color:#ccc">&#xe680;</i> <i class="iconfont" style="font-size: 30px;color:#ccc">&#xe680;</i>
</div> </div>
<!-- 返回项目列表 --> <!-- 返回项目列表 -->
<el-button type="primary" size="small" @click="goBack"> <div class="my_icon_box" :title="$t('trials:trials:title:backTrialList')" @click="goBack">
<i class="iconfont">&#xe670;</i> <i class="iconfont">&#xe670;</i>
<!-- 返回 -->
<span>{{ $t('trials:trials:title:back') }}</span> <span>{{ $t('trials:trials:title:back') }}</span>
</el-button> </div>
<!-- <div class="my_icon_box" :title="$t('trials:trials:title:backTrialList')" @click="goBack">
<i class="iconfont">&#xe670;</i>
<span>{{ $t('trials:trials:title:back') }}</span>
</div> -->
</div> </div>
</div> </div>
</template> </template>
@ -224,9 +221,6 @@ export default {
.el-tabs__header{ .el-tabs__header{
margin-bottom: 3px; margin-bottom: 3px;
} }
.el-tabs__item.is-active{
font-weight: bold;
}
position: relative; position: relative;
.el-input--medium .el-input__inner{ .el-input--medium .el-input__inner{
height: 44px;line-height: 44px;width: 280px; height: 44px;line-height: 44px;width: 280px;

View File

@ -99,7 +99,7 @@ export default {
this.btnDisabled = false this.btnDisabled = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList[0].id = res.Result[0].Id this.fileList[0].id = res.Result[0].Id
this.$message.success(this.$t('trials:uploadDicomList:table:Uploaded')) this.$message.success('Uploaded successfully')
this.$emit('getFileList', res.Result[0].Id, res.Result[0].Path) this.$emit('getFileList', res.Result[0].Id, res.Result[0].Path)
} }
}) })
@ -113,13 +113,13 @@ export default {
if (isValidFile) { if (isValidFile) {
this.fileList = [] this.fileList = []
} else { } else {
this.$alert(this.$t('upload:rule:MUSTPDF')) this.$alert('must be in pdf format')
return false return false
} }
}, },
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
if (file && file.status === 'success') { if (file && file.status === 'success') {
return this.$confirm(this.$t('system:reviewer:confirm:delete')) return this.$confirm(`Sure to remove ${file.name}?`)
} }
}, },
handleRemoveFile(file, fileList) { handleRemoveFile(file, fileList) {
@ -146,7 +146,7 @@ export default {
} }
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning(this.$t('upload:rule:maxFile1')) this.$message.warning(`Upload is currently limited to 1 file`)
}, },
fileValid(fileName, typeArr) { fileValid(fileName, typeArr) {
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase() var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()

View File

@ -9,51 +9,37 @@
:file-list="fileList" :file-list="fileList"
:accept="accept" :accept="accept"
> >
<el-button size="small" type="primary" :disabled="isDisabled">{{ <el-button size="small" type="primary" :disabled="isDisabled">{{ $t('common:button:upload') }}</el-button>
$t('common:button:upload')
}}</el-button>
</el-upload> </el-upload>
</div> </div>
</template> </template>
<script> <script>
import { import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment } from '@/api/attachment'
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: {
@ -63,10 +49,9 @@ 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) getAttachmentByType(this.doctorId, this.type).then(res => {
.then((res) => {
loading.close() loading.close()
if (res.IsSuccess) { if (res.IsSuccess) {
if (res.Result.length > 0) { if (res.Result.length > 0) {
@ -76,15 +61,12 @@ 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,
@ -92,7 +74,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)
}) })
@ -103,42 +85,32 @@ export default {
// //
if (this.checkFileSuffix(param.file.name)) { if (this.checkFileSuffix(param.file.name)) {
// //
const isRepeat = this.fileList.some( const isRepeat = this.fileList.some(item => item.FileName === param.file.name)
(item) => item.FileName === param.file.name
)
if (isRepeat) { if (isRepeat) {
this.$confirm( this.$confirm('Override the existing resume?', {
this.$t('curriculumVitae:resume:message:existingResume'),
{
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
} confirmButtonText: 'OK',
) 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)
} }
} else { } else {
let str = this.accept.join(', ') this.$alert(`Must be in ${this.accept} format`)
let message = this.$t(
'trials:readingUnit:qsList:message:imageFormat'
).replace('xxx', str)
this.$alert(message)
} }
}, },
async uploadFile(file) { async uploadFile(file) {
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( let res = await this.OSSclient.put(`/SystemData/reviewer/Agreements/${this.doctorId}/${fileName}`, file)
`/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
@ -152,60 +124,52 @@ 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) saveAttachments(this.fileList).then(res => {
.then((res) => {
this.fileList = this.formatterFileList(res.Result) this.fileList = this.formatterFileList(res.Result)
this.isDisabled = false this.isDisabled = false
this.$message.success( this.$message.success('Uploaded successfully')
this.$t('trials:uploadDicomList:table:Uploaded')
)
this.$emit('getFileList', this.fileList) this.$emit('getFileList', this.fileList)
}) }).catch(() => {
.catch(() => {
this.isDisabled = false this.isDisabled = false
}) })
}, },
handleDeleteFile(file) { handleDeleteFile(file) {
this.$confirm(this.$t('system:reviewer:confirm:delete'), { this.$confirm('Sure to remove?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
})
.then(() => { }).then(() => {
deleteAttachment(file.Id, file.Path).then((res) => { deleteAttachment(file.Id, file.Path)
.then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList.splice( this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
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 ( return this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
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 {

View File

@ -180,10 +180,10 @@
<template v-if="question.Unit" slot="append">{{ question.Unit }}</template> <template v-if="question.Unit" slot="append">{{ question.Unit }}</template>
</el-input> </el-input>
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] <= questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px"> <span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] <= questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }} {{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}-{{ questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }}
</span> </span>
<span v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]" style="margin-left: 10px"> <span v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]" style="margin-left: 10px">
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm.CreateTime ? questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }} {{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}-{{ questionForm.CreateTime ? questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }}
</span> </span>
<!-- 生日不能大于截止日期 --> <!-- 生日不能大于截止日期 -->
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px;font-size: 12px;color:#f66"> <span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px;font-size: 12px;color:#f66">

View File

@ -27,7 +27,7 @@
size="small" size="small"
type="primary" type="primary"
@click="close" @click="close"
v-show="$route.path !== '/trials/trials-panel/visit/crc-upload'&&$route.path!=='/trials/trials-panel/visit/crc-question'" v-show="$route.path !== '/trials/trials-panel/visit/crc-upload'"
> >
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>

View File

@ -1,125 +0,0 @@
<template>
<el-dialog
v-if="visible"
:visible.sync="visible"
v-dialogDrag
width="540px"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
:title="$t('toggleRole:tip:title')"
center
top="30vh"
:show-close="false"
:before-close="cancel"
>
<template v-if="hasRole">
<el-radio-group v-model="form.userRoleId" class="roles">
<el-radio
v-for="item in roles"
:key="item.Id"
:label="item.Id"
:disabled="item.IsUserRoleDisabled"
style="margin-bottom: 10px"
>
{{ item.UserTypeShortName }}
</el-radio>
</el-radio-group>
</template>
<div v-else style="text-align: center">
{{ $t('toggleRole:tip:noRole') }}
</div>
<div slot="footer">
<!-- 取消 -->
<el-button size="small" @click="cancel()">
{{ $t('common:button:cancel') }}
</el-button>
<!-- 保存 -->
<el-button
type="primary"
size="small"
@click="save"
:disabled="saveDisabled"
:loading="loading"
v-if="hasRole"
>
{{ $t('common:button:confirm') }}
</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'toggleRole',
props: {
visible: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
},
data() {
return {
form: {
userRoleId: null,
},
}
},
created() {
this.form.userRoleId = zzSessionStorage.getItem('userId')
},
computed: {
roles() {
return this.$store.state.user.roles
},
hasRole() {
return this.roles && this.roles.length > 0
},
saveDisabled() {
return this.form.userRoleId === zzSessionStorage.getItem('userId')
},
},
methods: {
cancel() {
this.$emit('update:visible', false)
this.$emit('cancel')
},
async save() {
try {
if (!this.form.userRoleId)
return this.$message.warning(this.$t('toggleRole:ruleMessage:select'))
this.$emit('save', this.form.userRoleId)
} catch (err) {
console.log(err)
}
},
},
}
</script>
<style lang="scss" scoped>
.roles {
max-width: 365px;
width: fit-content;
display: flex;
align-content: center;
// justify-content: center;
flex-wrap: wrap;
margin: auto;
}
/deep/ .el-radio__original {
display: none !important; /* 隐藏原生 radio 输入,但仍然允许交互 */
}
/deep/.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
.el-radio {
width: 60px;
}
</style>

View File

@ -1,5 +1,6 @@
import { SubjectCheckConfig } from './module/Subject' import { SubjectCheckConfig } from './module/Subject'
console.log(SubjectCheckConfig.moduleType)
export const checkConfig = { export const checkConfig = {
ModuleType: { ModuleType: {
...SubjectCheckConfig.ModuleType ...SubjectCheckConfig.ModuleType

View File

@ -10,7 +10,7 @@ const dialogDrag = Vue.directive('dialogDrag', {
dragDom.style.cssText += ';top:0px;' dragDom.style.cssText += ';top:0px;'
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null); // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
const sty = (function () { const sty = (function() {
if (window.document.currentStyle) { if (window.document.currentStyle) {
return (dom, attr) => dom.currentStyle[attr] return (dom, attr) => dom.currentStyle[attr]
} else { } else {
@ -47,10 +47,8 @@ const dialogDrag = Vue.directive('dialogDrag', {
styL = +styL.replace(/\px/g, '') styL = +styL.replace(/\px/g, '')
styT = +styT.replace(/\px/g, '') styT = +styT.replace(/\px/g, '')
} }
const oldMousemove = document.onmousemove
document.onmousemove = function (e) { document.onmousemove = function(e) {
oldMousemove(e)
// 通过事件委托,计算移动的距离 // 通过事件委托,计算移动的距离
let left = e.clientX - disX let left = e.clientX - disX
const top = e.clientY - disY const top = e.clientY - disY
@ -72,8 +70,8 @@ const dialogDrag = Vue.directive('dialogDrag', {
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;` dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
} }
document.onmouseup = function (e) { document.onmouseup = function(e) {
document.onmousemove = oldMousemove document.onmousemove = null
document.onmouseup = null document.onmouseup = null
} }
} }

View File

@ -14,13 +14,13 @@
<div class="right-menu"> <div class="right-menu">
<div class="navbar-flex-wrapper"> <div class="navbar-flex-wrapper">
<template v-if="device !== 'mobile'"> <template v-if="device!=='mobile'">
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
</template> </template>
<!-- <div class="avatar-container"> <!-- <div class="avatar-container">
<img src="@/assets/avatar.png" class="user-avatar"> <img src="@/assets/avatar.png" class="user-avatar">
</div> --> </div> -->
<div style="margin-left: 20px"> <div style="margin-left:20px;">
<el-dropdown class="dropdown-container" trigger="click"> <el-dropdown class="dropdown-container" trigger="click">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
{{ `${name} (${userTypeShortName})` }} {{ `${name} (${userTypeShortName})` }}
@ -30,20 +30,10 @@
</span> </span>
<el-dropdown-menu slot="dropdown" class="user-dropdown"> <el-dropdown-menu slot="dropdown" class="user-dropdown">
<el-dropdown-item v-if="!isReviewer"> <el-dropdown-item v-if="!isReviewer">
<span style="display: block" @click="editInfo">{{ <span style="display:block;" @click="editInfo">{{$t('system:navbar:button:Profile')}}</span>
$t('system:navbar:button:Profile')
}}</span>
</el-dropdown-item>
<!-- 切换角色 -->
<el-dropdown-item divided v-if="hasRole">
<span style="display: block" @click="openToggleRole">{{
$t('system:navbar:button:toggleRole')
}}</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided> <el-dropdown-item divided>
<span style="display: block" @click="logout">{{ <span style="display:block;" @click="logout">{{$t('system:navbar:button:Log Out')}}</span>
$t('system:navbar:button:Log Out')
}}</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@ -51,119 +41,38 @@
<TopLang></TopLang> <TopLang></TopLang>
</div> </div>
</div> </div>
<toggleRole
v-if="toggleRoleVisible"
:visible.sync="toggleRoleVisible"
:loading="toggleRoleLoading"
@save="loginByRole"
/>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters, mapMutations } from 'vuex' import {mapGetters, mapMutations} from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import TopLang from './topLang' import TopLang from './topLang'
import toggleRole from '@/components/toggleRole'
import { resetRouter } from '@/router'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
Hamburger, Hamburger,
Screenfull, Screenfull,
TopLang, TopLang
toggleRole,
}, },
data() { data() {
return { return {
isReviewer: false, isReviewer: false,
toggleRoleVisible: false, userTypeShortName: zzSessionStorage.getItem('userTypeShortName')
toggleRoleLoading: false,
} }
}, },
computed: { computed: {
...mapGetters(['sidebar', 'name', 'device', 'userTypeShortName']), ...mapGetters(['sidebar', 'name', 'device'])
roles() {
return this.$store.state.user.roles
},
hasRole() {
return this.roles && this.roles.length > 1
},
}, },
created() { created() {
// this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer')) this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
}, },
methods: { methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }), ...mapMutations({ setLanguage: 'lang/setLanguage' }),
openToggleRole() {
this.$store.dispatch('user/getUserInfo').then((res) => {
this.toggleRoleVisible = true
})
},
loginByRole(userRoleId) {
if (this.$store.state.user.userId === userRoleId) {
this.toggleRoleVisible = false
this.toggleRoleLoading = false
return false
}
this.toggleRoleLoading = true
this.$store
.dispatch('user/loginByRole', { userRoleId })
.then((res) => {
if (res) {
this.$store
.dispatch('permission/generateRoutes')
.then(async (res) => {
if (res && res.length > 0) {
resetRouter()
await this.$store.dispatch('global/getNoticeList')
this.$router.addRoutes(res)
this.toggleRoleLoading = false
if (this.loginType === 'DevOps') {
this.$router.replace({ path: res[0].path })
return
}
if (this.hasPermi(['role:radmin'])) {
this.$router.replace({ path: res[0].path })
return
}
if (
this.hasPermi([
'role:air',
'role:rpm',
'role:rcrc',
'role:rir',
])
) {
history.replaceState(null, null, '/trials/trials-list')
history.go(0)
} else {
history.replaceState(null, null, '/trials/trials-workbench')
history.go(0)
}
this.toggleRoleVisible = false
this.toggleRoleLoading = false
this.$EventBus.$emit('reload')
} else {
//
this.toggleRoleLoading = false
this.$message.warning(this.$t('login:message:login2'))
}
})
.catch((err) => {
console.log(err)
this.toggleRoleLoading = false
})
} else {
this.toggleRoleLoading = false
}
})
.catch(() => {
this.toggleRoleLoading = false
})
},
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
@ -175,23 +84,23 @@ export default {
} else { } else {
this.$router.push(`/login`) this.$router.push(`/login`)
} }
// //this.$i18n.locale = 'zh' this.$i18n.locale = 'zh'
// //this.setLanguage('zh') this.setLanguage('zh')
this.$updateDictionary() this.$updateDictionary()
}, },
editInfo() { editInfo() {
this.$router.push({ name: 'BaiscInfo' }) this.$router.push({ name: 'BaiscInfo' })
}, },
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.navbar-flex-wrapper { .navbar-flex-wrapper{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
} }
.navbar { .navbar {
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;

View File

@ -15,7 +15,7 @@ import '@/styles/index.scss' // global css
import App from './App' import App from './App'
import store from './store' import store from './store'
import router from './router' import router from './router'
import WHITELIST from "./utils/whiteList"
import '@/icons' // icon import '@/icons' // icon
import '@/permission' // permission control import '@/permission' // permission control
import md5 from 'js-md5' import md5 from 'js-md5'
@ -293,23 +293,15 @@ async function VueInit() {
}() }()
_vm.$forceUpdate() _vm.$forceUpdate()
} }
Vue.prototype.$EventBus = new Vue()
Vue.prototype.$path = [] Vue.prototype.$path = []
var t = function (key) { var t = function (key) {
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
if (!~Vue.prototype.$path.indexOf(key)) { if (!~Vue.prototype.$path.indexOf(key)) {
// Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
Vue.prototype.$path.push(key) Vue.prototype.$path.push(key)
} }
let text = i18n.t(key) // return i18n.t(Vue.prototype.toPath + '_' + key)
if (Array.isArray(store.state.trials.config.TrialObjectNameList) && store.state.trials.config.TrialObjectNameList.length > 0) { return i18n.t(key)
let arr = JSON.parse(JSON.stringify(store.state.trials.config.TrialObjectNameList))
arr.sort((a, b) => b.Name.length - a.Name.length)
arr.forEach(item => {
let test = new RegExp(item.Name, 'ig')
text = text.replace(test, item.TrialName)
})
}
// return i18n.t(key)
return text;
} }
Vue.prototype.$t = t Vue.prototype.$t = t
_vm = new Vue({ _vm = new Vue({
@ -332,7 +324,7 @@ async function VueInit() {
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) { if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
setInterval(() => { setInterval(() => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (WHITELIST.includes(_vm.$route.path)) { if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
return return
} }
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) { if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
@ -396,20 +388,16 @@ async function VueInit() {
// window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME; // window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => { waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) { if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0; count = 0;
localStorage.setItem('count', '0') localStorage.setItem('count', '0')
return return
} }
_vm.$store.dispatch('user/logout').then(res => { _vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login` // window.location.href = `/login`
try { if (_vm.$msgbox) {
if (_vm.$msgbox && _vm.$msgbox.close) {
_vm.$msgbox.close(); _vm.$msgbox.close();
} }
} catch (err) {
console.log(err)
}
_vm.$FB.close(); _vm.$FB.close();
_vm.$FBT.close(); _vm.$FBT.close();
_vm.$MFA.close(); _vm.$MFA.close();
@ -429,7 +417,7 @@ async function VueInit() {
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME, } : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => { eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh' var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) { if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
count = 0; count = 0;
localStorage.setItem('count', '0') localStorage.setItem('count', '0')
if (_vm.$route.path === '/login') { if (_vm.$route.path === '/login') {
@ -451,11 +439,11 @@ async function VueInit() {
beforeClose: (action, instance, done) => { beforeClose: (action, instance, done) => {
if (action === 'confirm') { if (action === 'confirm') {
if (!_vm.unlock.my_username) { if (!_vm.unlock.my_username) {
_vm.$message.warning(_vm.$t("env:lock:msgBox:iupUser")) _vm.$alert(_vm.$t("env:lock:msgBox:iupUser"))
return return
} }
if (!_vm.unlock.my_password) { if (!_vm.unlock.my_password) {
_vm.$message.warning(_vm.$t("env:lock:msgBox:inpPassword")) _vm.$alert(_vm.$t("env:lock:msgBox:inpPassword"))
return return
} }
var my_username = zzSessionStorage.getItem('my_username') var my_username = zzSessionStorage.getItem('my_username')
@ -601,4 +589,3 @@ VueInit()
// }); // });
export default _vm

View File

@ -1,14 +1,12 @@
import router from './router' import router from './router'
import { resetRouter } from '@/router'
import store from './store' import store from './store'
// import { Message } from 'element-ui' // import { Message } from 'element-ui'
import NProgress from 'nprogress' import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import { getToken, removeToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import Vue from 'vue' import Vue from 'vue'
import { OSSclient } from './utils/oss' import { OSSclient } from './utils/oss'
import WHITELIST from "./utils/whiteList" import WHITELIST from "./utils/whiteList"
import { getTrialExtralConfig } from '@/api/trials'
// import getPageTitle from '@/utils/get-page-title' // import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
@ -18,43 +16,8 @@ store.state.trials.whiteList = whiteList;
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
NProgress.start() NProgress.start()
// 设置页面标题 // 设置页面标题
// document.title = getPageTitle(to.meta.title) store.state.trials.whiteList.indexOf(to.path) === -1 // document.title = getPageTitle(to.meta.title)
if (!to.query.trialId) {
store.dispatch('trials/setConfig', {})
}
if (
to.query.trialId &&
to.query.trialId !==
store.state.trials.config.trialId
) {
let res = await getTrialExtralConfig({
TrialId: to.query.trialId,
})
if (res.IsSuccess) {
store.dispatch('trials/setConfig', {
trialId: to.query.trialId,
...res.Result,
})
}
}
if (!to.query.trialId) {
store.dispatch('trials/setConfig', {})
}
if (
to.query.trialId &&
to.query.trialId !==
store.state.trials.config.trialId
) {
let res = await getTrialExtralConfig({
TrialId: to.query.trialId,
})
if (res.IsSuccess) {
store.dispatch('trials/setConfig', {
trialId: to.query.trialId,
...res.Result,
})
}
}
// 确定用户是否已登录 // 确定用户是否已登录
const hasToken = getToken() const hasToken = getToken()
Vue.prototype.toPath = to.path Vue.prototype.toPath = to.path
@ -62,24 +25,14 @@ router.beforeEach(async (to, from, next) => {
if (hasToken) { if (hasToken) {
if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') { if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
if (to.path === '/ReviewersResearch') { if (to.path === '/ReviewersResearch') {
await this.$store.dispatch('user/logout')
await OSSclient() await OSSclient()
await store.dispatch('user/logout')
} }
if (to.path === '/ReviewersResearchForm') { if (to.path === '/ReviewersResearchForm') {
await OSSclient() await OSSclient()
} }
next() next()
NProgress.done() NProgress.done()
} else if (from.path === '/researchForm') {
removeToken()
let lang = to.query.lang || zzSessionStorage.getItem('lang')
next(`/researchLogin?trialId=${to.query.trialId}&lang=${lang}`)
NProgress.done()
} else if (from.path === '/researchDetail_m') {
removeToken()
let lang = to.query.lang || zzSessionStorage.getItem('lang')
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`)
NProgress.done()
} else { } else {
await OSSclient() await OSSclient()
const hasGetUserInfo = store.getters.userId const hasGetUserInfo = store.getters.userId
@ -89,13 +42,10 @@ router.beforeEach(async (to, from, next) => {
try { try {
// 获取用户信息 // 获取用户信息
await store.dispatch('user/getInfo') await store.dispatch('user/getInfo')
await store.dispatch('user/getUserInfo')
const accessRoutes = await store.dispatch('permission/generateRoutes') const accessRoutes = await store.dispatch('permission/generateRoutes')
resetRouter()
router.addRoutes(accessRoutes) router.addRoutes(accessRoutes)
next({ ...to, replace: true }) next({ ...to, replace: true })
} catch (error) { } catch (error) {
console.log(error)
// 删除token并进入登录页面以重新登录 // 删除token并进入登录页面以重新登录
await store.dispatch('user/resetToken') await store.dispatch('user/resetToken')
next(`/login?redirect=${to.path}`) next(`/login?redirect=${to.path}`)
@ -107,10 +57,10 @@ router.beforeEach(async (to, from, next) => {
/* has no token*/ /* has no token*/
if (whiteList.indexOf(to.path) !== -1) { if (whiteList.indexOf(to.path) !== -1) {
if (to.path === '/researchLogin') { if (to.path === '/researchLogin') {
let lang = to.query.lang || zzSessionStorage.getItem('lang') console.log(to)
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
if (flag) { if (flag) {
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`) next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${to.query.lang}`)
} else { } else {
next() next()
} }
@ -123,12 +73,10 @@ router.beforeEach(async (to, from, next) => {
} }
} else { } else {
if (to.path === '/researchForm') { if (to.path === '/researchForm') {
let lang = to.query.lang || zzSessionStorage.getItem('lang') next(`/researchLogin?`)
next(`/researchLogin?trialId=${to.query.trialId}&lang=${lang}`)
NProgress.done() NProgress.done()
} else if (to.path === '/researchDetail_m') { } else if (to.path === '/researchDetail_m') {
let lang = to.query.lang || zzSessionStorage.getItem('lang') next(`/researchLogin_m?`)
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`)
NProgress.done() NProgress.done()
} else if (to.path === '/ReviewersResearchForm') { } else if (to.path === '/ReviewersResearchForm') {
next(`/ReviewersResearch?`) next(`/ReviewersResearch?`)

View File

@ -223,11 +223,6 @@ export const constantRoutes = [
component: () => import('@/views/reviewers/ReviewersResearch'), component: () => import('@/views/reviewers/ReviewersResearch'),
hidden: true hidden: true
}, },
{
path: '/curriculumVitae',
component: () => import('@/views/reviewers/curriculumVitae/index'),
hidden: true
},
{ {
path: '/ReviewersResearchForm', path: '/ReviewersResearchForm',
component: () => import('@/views/reviewers/ReviewersResearchForm'), component: () => import('@/views/reviewers/ReviewersResearchForm'),

View File

@ -3,12 +3,10 @@ const getters = {
device: state => state.app.device, device: state => state.app.device,
token: state => state.user.token, token: state => state.user.token,
name: state => state.user.name, name: state => state.user.name,
userTypeShortName: state => state.user.userTypeShortName,
permissions: state => state.user.permissions, permissions: state => state.user.permissions,
tree: state => state.user.tree, tree: state => state.user.tree,
userName: state => state.user.userName, userName: state => state.user.userName,
userId: state => state.user.userId, userId: state => state.user.userId,
identityUserId: state => state.user.identityUserId,
routes: state => state.permission.routes, routes: state => state.permission.routes,
asyncRoutes: state => state.permission.addRoutes, asyncRoutes: state => state.permission.addRoutes,
visitedViews: state => state.tagsView.visitedViews, visitedViews: state => state.tagsView.visitedViews,
@ -47,7 +45,6 @@ const getters = {
language: state => state.lang.language, language: state => state.lang.language,
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount, TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount, TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,
IsFirstSysDocNeedSign: state => state.user.IsFirstSysDocNeedSign,
TrialStatusStr: state => state.user.TrialStatusStr TrialStatusStr: state => state.user.TrialStatusStr
} }
export default getters export default getters

View File

@ -70,12 +70,6 @@ function getQuestions(questions) {
answerObj.angle = angle answerObj.angle = angle
answerObj.saveTypeEnum = isNaN(parseFloat(angle)) ? 1 : 2 answerObj.saveTypeEnum = isNaN(parseFloat(angle)) ? 1 : 2
} }
} else if (criterionType === 21) {
// MRI-PDFF
let isMeasurable = getQuestionAnswer(item.TableQuestions.Questions, 1105, answerObj)
answerObj.isMeasurable = isMeasurable
answerObj.mean = getQuestionAnswer(item.TableQuestions.Questions, 1104, answerObj)
answerObj.saveTypeEnum = parseInt(isMeasurable) === 1 && isNaN(parseFloat(answerObj.mean)) ? 1 : 2
} else { } else {
answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj) answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj)
answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj) answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj)
@ -513,7 +507,6 @@ const actions = {
}) })
}, },
getMeasuredData({ state }, visitTaskId) { getMeasuredData({ state }, visitTaskId) {
console.log('getMeasuredData')
return new Promise(resolve => { return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId) var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
if (state.visitTaskList[index].measureDataInit) { if (state.visitTaskList[index].measureDataInit) {
@ -530,13 +523,6 @@ const actions = {
el.OtherMeasureData = JSON.parse(el.OtherMeasureData) el.OtherMeasureData = JSON.parse(el.OtherMeasureData)
el.OtherMeasureData.data.remark = el.OrderMarkName el.OtherMeasureData.data.remark = el.OrderMarkName
} }
// if (el.TableQuestionMarkList.length > 0) {
// let list = el.TableQuestionMarkList.map(i=>{
// i.MeasureData = i.MeasureData ? JSON.parse(i.MeasureData) : ''
// return i
// })
// el.TableQuestionMarkList = list
// }
arr.push(el) arr.push(el)
}) })
state.visitTaskList[index].MeasureData = arr state.visitTaskList[index].MeasureData = arr
@ -620,13 +606,6 @@ const actions = {
el.MeasureData = JSON.parse(el.MeasureData) el.MeasureData = JSON.parse(el.MeasureData)
el.MeasureData.data.remark = el.OrderMarkName el.MeasureData.data.remark = el.OrderMarkName
} }
// if (el.TableQuestionMarkList.length > 0) {
// let list = el.TableQuestionMarkList.map(i=>{
// i.MeasureData = i.MeasureData ? JSON.parse(i.MeasureData) : ''
// return i
// })
// el.TableQuestionMarkList = list
// }
arr.push(el) arr.push(el)
}) })
state.visitTaskList[index].MeasureData = arr state.visitTaskList[index].MeasureData = arr
@ -646,23 +625,9 @@ const actions = {
}, },
addMeasuredData({ state }, obj) { addMeasuredData({ state }, obj) {
return new Promise(resolve => { return new Promise(resolve => {
const criterionType = parseInt(localStorage.getItem('CriterionType'))
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData var measureData = state.visitTaskList[index].MeasureData
// var idx = measureData.findIndex(item => item.MeasureData.uuid === obj.data.MeasureData.data.uuid) // var idx = measureData.findIndex(item => item.MeasureData.uuid === obj.data.MeasureData.data.uuid)
if (criterionType === 21) {
let i = measureData.findIndex(i=>i.TableQuestionId === obj.data.TableQuestionId)
if (i > -1) {
for (const k in state.visitTaskList[index].MeasureData[i]) {
if (k !== 'Id' && obj.data[k]) {
state.visitTaskList[index].MeasureData[i][k] = obj.data[k]
}
}
} else {
state.visitTaskList[index].MeasureData.push(obj.data)
}
} else {
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex) var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex)
if (idx > -1) { if (idx > -1) {
for (const k in state.visitTaskList[index].MeasureData[idx]) { for (const k in state.visitTaskList[index].MeasureData[idx]) {
@ -670,14 +635,15 @@ const actions = {
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k] state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
} }
} }
// state.visitTaskList[index].MeasureData[idx].MeasureData = obj.data.MeasureData
console.log('更新标记成功', idx) console.log('更新标记成功', idx)
} else { } else {
state.visitTaskList[index].MeasureData.push(obj.data) state.visitTaskList[index].MeasureData.push(obj.data)
console.log('新增标记成功') console.log('新增标记成功')
} }
}
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '') // sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
console.log(state.visitTaskList)
resolve() resolve()
}) })
}, },
@ -772,20 +738,9 @@ const actions = {
return new Promise(resolve => { return new Promise(resolve => {
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
var measureData = state.visitTaskList[index].MeasureData var measureData = state.visitTaskList[index].MeasureData
const criterionType = parseInt(localStorage.getItem('CriterionType'))
if (criterionType === 21) { // var uuid = obj.measureData.data.uuid
const i = measureData.findIndex(item => item.QuestionId === obj.questionId && item.OrderMarkName === obj.orderMarkName) // var idx = measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
if (i > -1) {
if (measureData[i].FristAddTaskId) {
measureData[i].MeasureData = ''
console.log('清除标记成功', i)
} else {
measureData.splice(i, 1)
console.log('移除标记成功', i)
}
}
state.visitTaskList[index].MeasureData = measureData
} else {
var idx = measureData.findIndex(item => item.QuestionId === obj.questionId && item.RowIndex === obj.rowIndex) var idx = measureData.findIndex(item => item.QuestionId === obj.questionId && item.RowIndex === obj.rowIndex)
if (idx > -1) { if (idx > -1) {
if (measureData[idx].FristAddTaskId) { if (measureData[idx].FristAddTaskId) {
@ -809,8 +764,6 @@ const actions = {
} }
state.visitTaskList[index].MeasureData = measureData state.visitTaskList[index].MeasureData = measureData
} }
}
// if (idx > -1) { // if (idx > -1) {
// measureData.splice(idx, 1) // measureData.splice(idx, 1)
@ -1081,7 +1034,7 @@ const actions = {
} }
}, },
setImageloadedInfo({ state }, obj) { setImageloadedInfo({ state }, obj) {
// console.log('setImageloadedInfo', obj) console.log('setImageloadedInfo', obj)
// if(obj.instance === '20dd8fc9-51b0-ec63-942b-cb3006c72650') // if(obj.instance === '20dd8fc9-51b0-ec63-942b-cb3006c72650')
// var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId) // var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
// // const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount // // const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount

View File

@ -1,6 +1,5 @@
import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth' import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth'
import { login, loginOut, getUserMenuTree, getUserPermissions, getUserLoginRoleList, loginSelectUserRole } from '@/api/user' import { login, loginOut, getUserMenuTree, getUserPermissions } from '@/api/user'
import { getUser } from '@/api/admin'
import { resetRouter } from '@/router' import { resetRouter } from '@/router'
import md5 from 'js-md5' import md5 from 'js-md5'
@ -8,29 +7,22 @@ const getDefaultState = () => {
return { return {
token: getToken(), token: getToken(),
name: '', name: '',
userTypeShortName: "",
userName: '', userName: '',
userId: '', userId: '',
identityUserId: '',
avatar: '', avatar: '',
permissions: [], permissions: [],
tree: [], tree: [],
/* eslint-disable */ /* eslint-disable */
TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0, TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
IsFirstSysDocNeedSign: false,
TrialStatusStr: null, TrialStatusStr: null,
isTestUser: false, isTestUser: false
roles: []
} }
} }
const state = getDefaultState() const state = getDefaultState()
const mutations = { const mutations = {
SET_ROLES: (state, roles) => {
state.roles = roles
},
RESET_STATE: (state) => { RESET_STATE: (state) => {
Object.assign(state, getDefaultState()) Object.assign(state, getDefaultState())
}, },
@ -42,9 +34,6 @@ const mutations = {
SET_NAME: (state, name) => { SET_NAME: (state, name) => {
state.name = name state.name = name
}, },
SET_USERTYPESHORTNAME: (state, userTypeShortName) => {
state.userTypeShortName = userTypeShortName
},
SET_USERNAME: (state, name) => { SET_USERNAME: (state, name) => {
state.userName = name state.userName = name
}, },
@ -60,16 +49,9 @@ const mutations = {
SET_USERID: (state, id) => { SET_USERID: (state, id) => {
state.userId = id state.userId = id
}, },
SET_IDENTITYUSERID: (state, id) => {
state.identityUserId = id
},
SET_ISTESTUSER: (state, isTestUser) => { SET_ISTESTUSER: (state, isTestUser) => {
state.isTestUser = eval(isTestUser) state.isTestUser = eval(isTestUser)
}, },
SET_IS_FIRST_SYSTEM_DOC_SIGN: (state, IsFirstSysDocNeedSign) => {
zzSessionStorage.setItem('IsFirstSysDocNeedSign', IsFirstSysDocNeedSign)
state.IsFirstSysDocNeedSign = IsFirstSysDocNeedSign
},
SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => { SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => {
/* eslint-disable */ /* eslint-disable */
if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) { if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) {
@ -96,9 +78,6 @@ const mutations = {
} }
const actions = { const actions = {
setRoles({ commit }, roles) {
commit('SET_ROLES', roles)
},
changeUserName({ commit }, userName) { changeUserName({ commit }, userName) {
commit('SET_USERNAME', userName) commit('SET_USERNAME', userName)
}, },
@ -112,7 +91,7 @@ const actions = {
if (UserId) { if (UserId) {
data.UserId = UserId; data.UserId = UserId;
} }
getUserLoginRoleList(data).then(async response => { login(data).then(async response => {
if (response.IsSuccess) { if (response.IsSuccess) {
zzSessionStorage.removeItem('lastWorkbench') zzSessionStorage.removeItem('lastWorkbench')
zzSessionStorage.setItem('my_username', username.trim()) zzSessionStorage.setItem('my_username', username.trim())
@ -120,7 +99,6 @@ const actions = {
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail) zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo)) localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo))
const data = response.Result const data = response.Result
commit('SET_ROLES', data.BasicInfo.AccountList)
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) { if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
try { try {
zzSessionStorage.setItem('userId', data.BasicInfo.Id) zzSessionStorage.setItem('userId', data.BasicInfo.Id)
@ -136,61 +114,18 @@ const actions = {
zzSessionStorage.setItem('IsReviewer', data.BasicInfo.IsReviewer) zzSessionStorage.setItem('IsReviewer', data.BasicInfo.IsReviewer)
zzSessionStorage.setItem('userName', data.BasicInfo.UserName) zzSessionStorage.setItem('userName', data.BasicInfo.UserName)
commit('SET_TOKEN', data.JWTStr) commit('SET_TOKEN', data.JWTStr)
// commit('SET_NAME', data.BasicInfo.UserName) commit('SET_NAME', data.BasicInfo.RealName)
zzSessionStorage.setItem('realName', data.BasicInfo.RealName)
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser) zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser) commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
commit('SET_USERNAME', data.BasicInfo.UserName) commit('SET_USERNAME', data.BasicInfo.UserName)
commit('SET_USERID', data.BasicInfo.Id)
setToken(data.JWTStr) setToken(data.JWTStr)
// setName(data.BasicInfo.RealName) setName(data.BasicInfo.RealName)
// const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/')))) const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
// const user = JSON.parse(userString)
// zzSessionStorage.setItem('userId', user.identityUserId)
// commit('SET_IDENTITYUSERID', user.identityUserId)
// zzSessionStorage.setItem('identityUserId', user.identityUserId)
// zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
// var permissions = await getUserPermissions()
// var menuTree = await getUserMenuTree()
// commit('SET_TREE', menuTree.Result)
// commit('SET_PERMISSIONS', permissions.Result)
// zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
// zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
} catch (e) {
console.log(e)
}
resolve(response.Result)
}
} else {
reject(response.ErrorMessage)
}
}).catch(() => {
reject()
})
})
},
loginByRole({ commit }, userInfo) {
const { userRoleId } = userInfo
let params = {
userRoleId
}
return new Promise((resolve, reject) => {
loginSelectUserRole(params).then(async response => {
if (response.IsSuccess) {
const data = response.Result
try {
commit('SET_TOKEN', data)
setToken(data)
commit('SET_USERID', userRoleId)
zzSessionStorage.setItem('userId', userRoleId)
const userString = decodeURIComponent(escape(window.atob(data.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
const user = JSON.parse(userString) const user = JSON.parse(userString)
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName) zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
commit('SET_USERTYPESHORTNAME', user.userTypeShortName) zzSessionStorage.setItem('userId', user.id)
commit('SET_NAME', user.fullName)
setName(user.fullName)
commit('SET_IDENTITYUSERID', user.identityUserId)
zzSessionStorage.setItem('identityUserId', user.identityUserId)
zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt) zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
var permissions = await getUserPermissions() var permissions = await getUserPermissions()
var menuTree = await getUserMenuTree() var menuTree = await getUserMenuTree()
@ -198,12 +133,11 @@ const actions = {
commit('SET_PERMISSIONS', permissions.Result) commit('SET_PERMISSIONS', permissions.Result)
zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result)) zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result)) zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
zzSessionStorage.removeItem('lastWorkbench')
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
resolve(response.Result) resolve(response.Result)
}
} else { } else {
reject(response.ErrorMessage) reject(response.ErrorMessage)
} }
@ -221,9 +155,6 @@ const actions = {
setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) { setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) {
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount) commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount)
}, },
setIsFirstSysDocNeedSign({ commit }, IsFirstSysDocNeedSign) {
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', IsFirstSysDocNeedSign)
},
setTotalNeedSignTrialDocCount({ commit }, TotalNeedSignTrialDocCount) { setTotalNeedSignTrialDocCount({ commit }, TotalNeedSignTrialDocCount) {
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', TotalNeedSignTrialDocCount) commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', TotalNeedSignTrialDocCount)
}, },
@ -239,69 +170,32 @@ const actions = {
commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions'))) commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions')))
commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser')) commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser'))
const user = JSON.parse(userString) const user = JSON.parse(userString)
commit('SET_NAME', zzSessionStorage.getItem('Name')) commit('SET_NAME', zzSessionStorage.getItem('realName'))
commit('SET_USERTYPESHORTNAME', user.userTypeShortName) commit('SET_USERID', user.id)
commit('SET_IDENTITYUSERID', user.identityUserId)
commit('SET_USERID', user.userRoleId)
commit('SET_USERNAME', zzSessionStorage.getItem('userName')) commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))) commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))) commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', zzSessionStorage.getItem('IsFirstSysDocNeedSign')) console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
// console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')) console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
// console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
zzSessionStorage.setItem('userName', user.name) zzSessionStorage.setItem('userName', user.name)
zzSessionStorage.setItem('userId', user.userRoleId) zzSessionStorage.setItem('userId', user.id)
zzSessionStorage.setItem('identityUserId', user.identityUserId)
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName) zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt) zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
return user return user
}, },
updateInfo({ commit, state }) { updateInfo({ commit, state }) {
commit('SET_NAME', zzSessionStorage.getItem('Name')) commit('SET_NAME', zzSessionStorage.getItem('realName'))
},
// 获取用户信息
getUserInfo({ commit, state }) {
return new Promise((resolve, reject) => {
getUser().then(res => {
if (res.Result) {
commit('SET_ROLES', res.Result.AccountList)
}
resolve(res.Result)
}).catch(err => {
reject(err)
})
})
}, },
// user logout // user logout
async logout({ commit, state }) { async logout({ commit, state }) {
try { try {
removeToken() // must remove token first removeToken() // must remove token first
await loginOut({ await loginOut({
UserRoleId: zzSessionStorage.getItem('userId'), Userd: zzSessionStorage.getItem('userId')
IdentityUserId: zzSessionStorage.getItem('identityUserId'),
}) })
resetRouter() resetRouter()
removeName() removeName()
let lang = zzSessionStorage.getItem('lang')
zzSessionStorage.clear() zzSessionStorage.clear()
zzSessionStorage.setItem('lang', lang)
commit('RESET_STATE')
} catch (e) {
console.log(e)
}
},
async resetData({ commit, state }) {
try {
removeToken() // must remove token first
// await loginOut({
// UserRoleId: zzSessionStorage.getItem('userId'),
// IdentityUserId: zzSessionStorage.getItem('identityUserId'),
// })
resetRouter()
removeName()
let lang = zzSessionStorage.getItem('lang')
zzSessionStorage.clear()
zzSessionStorage.setItem('lang', lang)
commit('RESET_STATE') commit('RESET_STATE')
} catch (e) { } catch (e) {
console.log(e) console.log(e)

View File

@ -47,6 +47,3 @@
.el-range-separator { .el-range-separator {
box-sizing: content-box; box-sizing: content-box;
} }
.el-select-dropdown__wrap{
max-height: 350px;
}

View File

@ -149,7 +149,6 @@ body .el-table th.gutter {
} }
.el-dialog__body { .el-dialog__body {
margin-top: 15px;
height: calc(100% - 70px); height: calc(100% - 70px);
padding: 0 20px; padding: 0 20px;
@ -348,7 +347,6 @@ body .el-table th.gutter {
background: #000; background: #000;
z-index: 3999; z-index: 3999;
} }
.el-message-box__wrapper{
.el-message-box__wrapper {
z-index: 9999 !important; z-index: 9999 !important;
} }

View File

@ -40,9 +40,8 @@ Vue.directive('dialogDrag', {
styL = +styL.replace(/\px/g, '') styL = +styL.replace(/\px/g, '')
styT = +styT.replace(/\px/g, '') styT = +styT.replace(/\px/g, '')
} }
const oldMousemove = document.onmousemove
document.onmousemove = function(e) { document.onmousemove = function(e) {
oldMousemove(e)
// 通过事件委托,计算移动的距离 // 通过事件委托,计算移动的距离
let left = e.clientX - disX let left = e.clientX - disX
let top = e.clientY - disY let top = e.clientY - disY
@ -64,7 +63,7 @@ Vue.directive('dialogDrag', {
} }
document.onmouseup = function(e) { document.onmouseup = function(e) {
document.onmousemove = oldMousemove document.onmousemove = null
document.onmouseup = null document.onmouseup = null
} }
return false return false

View File

@ -1,103 +0,0 @@
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
function parseImageId(imageId) {
// build a url by parsing out the url scheme and frame index from the imageId
const firstColonIndex = imageId.indexOf(':');
let url = imageId.substring(firstColonIndex + 1);
const frameIndex = url.indexOf('frame=');
let frame;
if (frameIndex !== -1) {
const frameStr = url.substr(frameIndex + 6);
frame = parseInt(frameStr, 10);
url = url.substr(0, frameIndex - 1);
}
return {
scheme: imageId.substr(0, firstColonIndex),
url,
frame,
};
}
function getNumberValues(dataSet, tag, minimumLength) {
const values = [];
const valueAsString = dataSet.string(tag);
if (!valueAsString) {
return;
}
const split = valueAsString.split('\\');
if (minimumLength && split.length < minimumLength) {
return;
}
for (let i = 0; i < split.length; i++) {
values.push(parseFloat(split[i]));
}
return values;
}
function metaDataProvider(type, imageId) {
const parsedImageId = parseImageId(imageId);
const dataSet = cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.get(parsedImageId.url);
if (!dataSet) {
return;
}
if (type === 'imagePlaneModule') {
const imageOrientationPatient = getNumberValues(dataSet, 'x00200037', 6);
const imagePositionPatient = getNumberValues(dataSet, 'x00200032', 3);
const pixelSpacing = getNumberValues(dataSet, 'x00280030', 2);
const imagePixelSpacing = getNumberValues(dataSet, 'x00181164', 2);
const estimatedRadiographicMagnificationFactor = getNumberValues(dataSet, 'x00181114', 2);
let columnPixelSpacing = null;
let rowPixelSpacing = null;
if (pixelSpacing) {
rowPixelSpacing = pixelSpacing[0];
columnPixelSpacing = pixelSpacing[1];
} else if (imagePixelSpacing && estimatedRadiographicMagnificationFactor) {
rowPixelSpacing = imagePixelSpacing[0] / estimatedRadiographicMagnificationFactor[0];
columnPixelSpacing = imagePixelSpacing[1] / estimatedRadiographicMagnificationFactor[1];
} else if (imagePixelSpacing && !estimatedRadiographicMagnificationFactor) {
rowPixelSpacing = imagePixelSpacing[0];
columnPixelSpacing = imagePixelSpacing[1];
}
let rowCosines = null;
let columnCosines = null;
if (imageOrientationPatient) {
rowCosines = [
parseFloat(imageOrientationPatient[0]),
parseFloat(imageOrientationPatient[1]),
parseFloat(imageOrientationPatient[2]),
];
columnCosines = [
parseFloat(imageOrientationPatient[3]),
parseFloat(imageOrientationPatient[4]),
parseFloat(imageOrientationPatient[5]),
];
}
return {
frameOfReferenceUID: dataSet.string('x00200052'),
rows: dataSet.uint16('x00280010'),
columns: dataSet.uint16('x00280011'),
imageOrientationPatient,
rowCosines,
columnCosines,
imagePositionPatient,
sliceThickness: dataSet.floatString('x00180050'),
sliceLocation: dataSet.floatString('x00201041'),
pixelSpacing,
rowPixelSpacing,
columnPixelSpacing,
};
}
}
export default metaDataProvider;

View File

@ -15,6 +15,7 @@ service.interceptors.request.use(
config.headers['Content-Type'] = 'application/json;charset=UTF-8' config.headers['Content-Type'] = 'application/json;charset=UTF-8'
var language = zzSessionStorage.getItem('lang') var language = zzSessionStorage.getItem('lang')
config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9' config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
console.log(config.headers)
if (store.getters.token) { if (store.getters.token) {
config.headers.Authorization = `Bearer ${store.getters.token}` config.headers.Authorization = `Bearer ${store.getters.token}`
} }
@ -89,9 +90,9 @@ service.interceptors.response.use(
}) })
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
router.push(`/login`) router.push(`/login`)
//this.$i18n.locale = 'zh' this.$i18n.locale = 'zh'
//this.setLanguage('zh') this.setLanguage('zh')
// this.$updateDictionary() this.$updateDictionary()
}) })
} }
} else { } else {

View File

@ -5,7 +5,6 @@ import router from '@/router'
import WHITELIST from "./whiteList" import WHITELIST from "./whiteList"
import moment from 'moment-timezone'; import moment from 'moment-timezone';
import { encryptConfig } from "@/utils/encrypt" import { encryptConfig } from "@/utils/encrypt"
const ROUTER = require('@/router');
axios.defaults.withCredentials = false axios.defaults.withCredentials = false
const service = axios.create({ const service = axios.create({
baseURL: '/api', baseURL: '/api',
@ -91,20 +90,10 @@ service.interceptors.response.use(
const status = error.response.status const status = error.response.status
if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) { if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) {
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
let _vm = ROUTER.default.app
try {
if (_vm.$msgbox && _vm.$msgbox.close) {
_vm.$msgbox.close();
}
} catch (err) {
console.log(err)
}
router.push(`/login`) router.push(`/login`)
// if (!this.$i18n.locale) { this.$i18n.locale = 'zh'
// //this.$i18n.locale = 'zh' this.setLanguage('zh')
// //this.setLanguage('zh') this.$updateDictionary()
// }
// this.$updateDictionary()
}) })
} }
switch (status) { switch (status) {
@ -134,9 +123,9 @@ service.interceptors.response.use(
} }
store.dispatch('user/logout').then(() => { store.dispatch('user/logout').then(() => {
router.push(`/login`) router.push(`/login`)
// //this.$i18n.locale = 'zh' this.$i18n.locale = 'zh'
// //this.setLanguage('zh') this.setLanguage('zh')
// this.$updateDictionary() this.$updateDictionary()
}) })
} else { } else {
setTimer({ setTimer({
@ -150,7 +139,6 @@ service.interceptors.response.use(
setTimer([message, store.state.lang.language === 'en' ? 'Warning' : '警告', { setTimer([message, store.state.lang.language === 'en' ? 'Warning' : '警告', {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
confirmButtonText: store.state.lang.language === 'en' ? 'ok' : "确定",
callback: action => { } callback: action => { }
}], 'confirm') }], 'confirm')
} }
@ -161,7 +149,6 @@ service.interceptors.response.use(
[store.state.lang.language === 'en' ? 'Please check your networkand try again later' : '请检查网络,稍后重试!', store.state.lang.language === 'en' ? 'Warning' : '警告', { [store.state.lang.language === 'en' ? 'Please check your networkand try again later' : '请检查网络,稍后重试!', store.state.lang.language === 'en' ? 'Warning' : '警告', {
type: 'warning', type: 'warning',
showCancelButton: false, showCancelButton: false,
confirmButtonText: store.state.lang.language === 'en' ? 'ok' : "确定",
callback: action => { } callback: action => { }
}], "confirm" }], "confirm"
) )
@ -180,8 +167,6 @@ const setTimer = (obj, type) => {
Message(obj) Message(obj)
} }
if (type === 'confirm') { if (type === 'confirm') {
obj[2].closeOnClickModal = false
obj[2].closeOnPressEscape = false
MessageBox.confirm(...obj) MessageBox.confirm(...obj)
} }
clearTimeout(timer); clearTimeout(timer);

View File

@ -1,2 +1,2 @@
const WHITELIST = ['/', "/curriculumVitae", 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms'] const WHITELIST = ['/', 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
export default WHITELIST export default WHITELIST

View File

@ -5,7 +5,7 @@
:model="user" :model="user"
:rules="userFormRules" :rules="userFormRules"
label-width="150px" label-width="150px"
style="width: 800px" style="width:800px;"
> >
<el-card class="Basic" shadow="never" size="small"> <el-card class="Basic" shadow="never" size="small">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
@ -25,7 +25,7 @@
<el-form-item label="Given Name: " prop="FirstName"> <el-form-item label="Given Name: " prop="FirstName">
<el-input v-model="user.FirstName" /> <el-input v-model="user.FirstName" />
</el-form-item> </el-form-item>
<el-form-item label="Gender: " prop="Sex" style="margin-right: 40px"> <el-form-item label="Gender: " prop="Sex" style="margin-right:40px;">
<el-radio-group v-model="user.Sex"> <el-radio-group v-model="user.Sex">
<el-radio :label="1">Male</el-radio> <el-radio :label="1">Male</el-radio>
<el-radio :label="0">Female</el-radio> <el-radio :label="0">Female</el-radio>
@ -37,24 +37,13 @@
<el-form-item label="Phone: " prop="Phone"> <el-form-item label="Phone: " prop="Phone">
<el-input v-model="user.Phone" /> <el-input v-model="user.Phone" />
</el-form-item> </el-form-item>
<el-form-item v-if="type == 1" label="Disable:"> <el-form-item v-if="type==1" label="Disable:">
<el-switch <el-switch v-model="user.Status" :active-value="0" :inactive-value="1" />
v-model="user.Status"
:active-value="0"
:inactive-value="1"
/>
</el-form-item> </el-form-item>
<el-form-item label="User Type: " prop="UserTypeId"> <el-form-item label="User Type: " prop="UserTypeId">
<el-select <el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;" :disabled="user.CanEditUserType === false">
ref="userType"
v-model="user.UserTypeId"
size="small"
placeholder="Please select"
style="width: 100%"
:disabled="user.CanEditUserType === false"
>
<el-option <el-option
v-for="(userType, key) of userTypeOptions" v-for="(userType,key) of userTypeOptions"
:key="key" :key="key"
:label="userType.UserType" :label="userType.UserType"
:value="userType.Id" :value="userType.Id"
@ -63,28 +52,17 @@
</el-form-item> </el-form-item>
</el-card> </el-card>
<el-card <el-card class="Affiliation" shadow="never" style="margin-top:10px;" size="small">
class="Affiliation"
shadow="never"
style="margin-top: 10px"
size="small"
>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>Affiliation</span> <span>Affiliation</span>
</div> </div>
<el-form-item prop="IsZhiZhun"> <el-form-item prop="IsZhiZhun">
<el-radio-group <el-radio-group v-model="user.IsZhiZhun" @change="OrgnizationTypeChanged">
v-model="user.IsZhiZhun"
@change="OrgnizationTypeChanged"
>
<el-radio :label="true">Internal</el-radio> <el-radio :label="true">Internal</el-radio>
<el-radio :label="false">External</el-radio> <el-radio :label="false">External</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: ">
v-show="user.IsZhiZhun === false"
label="Organization Name: "
>
<el-input v-model="user.OrganizationName" /> <el-input v-model="user.OrganizationName" />
</el-form-item> </el-form-item>
@ -100,24 +78,19 @@
type="primary" type="primary"
size="small" size="small"
:disabled="isDisabled" :disabled="isDisabled"
style="margin: 10px 15px" style="margin:10px 15px"
@click="handleSave" @click="handleSave"
>Save</el-button >Save</el-button>
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
<script> <script>
import { import { getUser, addUser, updateUser, getUserTypeListByUserType } from '@/api/admin.js'
getUser,
addUser,
updateUser,
getUserTypeListByUserType,
} from '@/api/admin.js'
export default { export default {
name: 'UserInfo', name: 'UserInfo',
props: { props: {
userId: { type: String, default: '' }, userId: { type: String, default: '' }
}, },
data() { data() {
return { return {
@ -132,69 +105,60 @@ export default {
IsZhiZhun: '', IsZhiZhun: '',
OrganizationName: '', OrganizationName: '',
DepartmentName: '', DepartmentName: '',
PositionName: '', PositionName: ''
}, },
userFormRules: { userFormRules: {
UserName: [ UserName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
UserTypeId: [ UserTypeId: [
{ { required: true, message: 'Please Select', trigger: ['blur', 'change'] }
required: true,
message: 'Please Select',
trigger: ['blur', 'change'],
},
], ],
IsZhiZhun: [ IsZhiZhun: [
{ { required: true, message: 'Please Select', trigger: ['blur', 'change'] }
required: true,
message: 'Please Select',
trigger: ['blur', 'change'],
},
], ],
OrganizationName: [ OrganizationName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' }
], ],
LastName: [ LastName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
FirstName: [ FirstName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
Phone: [ Phone: [
{ { max: 20, min: 7, message: 'The length is 7 to 20', trigger: ['blur'] }
max: 20,
min: 7,
message: 'The length is 7 to 20',
trigger: ['blur'],
},
], ],
EMail: [ EMail: [
{ {
required: true, required: true,
message: 'Please input the email address', message: 'Please input the email address',
trigger: 'blur', trigger: 'blur'
}, },
{ {
type: 'email', type: 'email',
message: 'Please input the correct email address', message: 'Please input the correct email address',
trigger: ['blur'], trigger: ['blur']
}, },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
],
Sex: [
{ required: true, message: 'Please specify', trigger: 'blur' }
], ],
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
Status: [ Status: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' }
], ],
DepartmentName: [{ max: 50, message: 'The maximum length is 50' }], DepartmentName: [
PositionName: [{ max: 50, message: 'The maximum length is 50' }], { max: 50, message: 'The maximum length is 50' }],
PositionName: [{ max: 50, message: 'The maximum length is 50' }
]
}, },
userTypeOptions: [], userTypeOptions: [],
isDisabled: false, isDisabled: false,
type: 0, // 10 type: 0 // 10
} }
}, },
created() { created() {
@ -208,58 +172,46 @@ export default {
}, },
methods: { methods: {
handleSave() { handleSave() {
this.$refs.userForm.validate((valid) => { this.$refs.userForm.validate(valid => {
if (valid) { if (valid) {
this.isDisabled = true this.isDisabled = true
const selectedUserType = this.userTypeOptions.filter( const selectedUserType = this.userTypeOptions.filter(item => item.Id === this.user.UserTypeId)
(item) => item.Id === this.user.UserTypeId
)
if (selectedUserType.length > 0) { if (selectedUserType.length > 0) {
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
} }
if (this.user.Id) { if (this.user.Id) {
updateUser(this.user) updateUser(this.user).then(res => {
.then((res) => {
this.isDisabled = false this.isDisabled = false
this.$message.success('Updated successfully') this.$message.success('Updated successfully')
}) }).catch(() => { this.isDisabled = false })
.catch(() => {
this.isDisabled = false
})
} else { } else {
addUser(this.user) addUser(this.user).then(res => {
.then((res) => {
this.isDisabled = false this.isDisabled = false
this.user.Id = res.Result.Id this.user.Id = res.Result.Id
this.user.UserCode = res.Result.UserCode this.user.UserCode = res.Result.UserCode
this.$emit('getUserId', res.Result.Id) this.$emit('getUserId', res.Result.Id)
this.$message.success('Added successfully') this.$message.success('Added successfully')
this.$router.push({ path: '/system/user/list' }) this.$router.push({ path: '/system/user/list' })
}) }).catch(() => { this.isDisabled = false })
.catch(() => {
this.isDisabled = false
})
} }
} }
}) })
}, },
getUserTypeList() { getUserTypeList() {
getUserTypeListByUserType(0).then((res) => { getUserTypeListByUserType(0).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.userTypeOptions = res.Result this.userTypeOptions = res.Result
} }
}) })
}, },
getUserInfo() { getUserInfo() {
getUser({ getUser(this.userId).then(res => {
IdentityUserId: this.userId,
}).then((res) => {
this.user = res.Result this.user = res.Result
}) })
}, },
OrgnizationTypeChanged(val) { OrgnizationTypeChanged(val) {
this.user.OrganizationName = '' this.user.OrganizationName = ''
}, }
}, }
} }
</script> </script>

View File

@ -131,8 +131,8 @@ export default {
.then(() => { .then(() => {
this.$store.dispatch('user/logout').then(res => { this.$store.dispatch('user/logout').then(res => {
this.$router.push(`/login`) this.$router.push(`/login`)
//this.$i18n.locale = 'zh' this.$i18n.locale = 'zh'
//this.setLanguage('zh') this.setLanguage('zh')
this.$updateDictionary() this.$updateDictionary()
}) })
}) })

View File

@ -43,7 +43,7 @@
<div <div
v-show="item.instanceCount" v-show="item.instanceCount"
style="padding: 1px;" style="padding: 1px;"
>{{ item.modality }} : {{ item.instanceCount }} image >{{ item.modality }} : {{ item.instanceCount }} Series
</div> </div>
</div> </div>
</div> </div>
@ -67,8 +67,6 @@ import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
// import dicomStore from '@/utils/dicom-store' // import dicomStore from '@/utils/dicom-store'
import dicomViewer from '@/components/Dicom/DicomViewer' import dicomViewer from '@/components/Dicom/DicomViewer'
import dicomPreview from '@/components/Dicom/DicomPreview' import dicomPreview from '@/components/Dicom/DicomPreview'
import metaDataProvider from '@/utils/metaDataProvider'
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
var config = { var config = {
maxWebWorkers: 4, maxWebWorkers: 4,
startWebWorkersOnDemand: true, startWebWorkersOnDemand: true,

View File

@ -143,8 +143,6 @@ import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/tr
import requestPoolManager from '@/utils/request-pool' import requestPoolManager from '@/utils/request-pool'
import store from '@/store' import store from '@/store'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
import metaDataProvider from '@/utils/metaDataProvider'
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
var config = { var config = {
maxWebWorkers: 4, maxWebWorkers: 4,
startWebWorkersOnDemand: true, startWebWorkersOnDemand: true,

View File

@ -265,8 +265,6 @@ import { getTaskUploadedDicomStudyList } from '@/api/reading'
import requestPoolManager from '@/utils/request-pool' import requestPoolManager from '@/utils/request-pool'
import store from '@/store' import store from '@/store'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
import metaDataProvider from '@/utils/metaDataProvider'
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
// import * as cornerstoneTools from 'cornerstone-tools' // import * as cornerstoneTools from 'cornerstone-tools'
var config = { var config = {
maxWebWorkers: 4, maxWebWorkers: 4,

View File

@ -98,7 +98,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="上传时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />

View File

@ -108,7 +108,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="上传时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />

View File

@ -26,7 +26,7 @@
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button type="primary" icon="el-icon-search" @click="handleSearch"> <el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t('common:button:search') }} {{ $t("common:button:search") }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button
@ -34,7 +34,7 @@
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
@click="handleReset" @click="handleReset"
> >
{{ $t('common:button:reset') }} {{ $t("common:button:reset") }}
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-button <el-button
@ -44,7 +44,7 @@
size="small" size="small"
@click="handleAdd" @click="handleAdd"
> >
{{ $t('common:button:new') }} {{ $t("common:button:new") }}
</el-button> </el-button>
</el-form> </el-form>
</template> </template>
@ -74,7 +74,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
$fd( $fd(
'Common_File_BusinessScenario', "Common_File_BusinessScenario",
scope.row.BusinessScenarioEnum scope.row.BusinessScenarioEnum
) )
}} }}
@ -106,10 +106,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd('YesOrNo', scope.row.IsDeleted) $fd("YesOrNo", scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsDeleted) $fd("YesOrNo", scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -122,17 +122,14 @@
<el-table-column :label="$t('common:action:action')"> <el-table-column :label="$t('common:action:action')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="PreviewFile(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button type="text" @click="handleDownload(scope.row)"> <el-button type="text" @click="handleDownload(scope.row)">
{{ $t('common:button:download') }} {{ $t("common:button:download") }}
</el-button> </el-button>
<el-button type="text" @click="handleEdit(scope.row)"> <el-button type="text" @click="handleEdit(scope.row)">
{{ $t('common:button:edit') }} {{ $t("common:button:edit") }}
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)"> <el-button type="text" @click="handleDelete(scope.row)">
{{ $t('common:button:delete') }} {{ $t("common:button:delete") }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -169,22 +166,22 @@ import {
getCommonDocumentList, getCommonDocumentList,
DownloadCommonDoc, DownloadCommonDoc,
deleteCommonDocument, deleteCommonDocument,
} from '@/api/dictionary' } from "@/api/dictionary";
import BaseContainer from '@/components/BaseContainer' import BaseContainer from "@/components/BaseContainer";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import TemplateForm from './TemplateForm' import TemplateForm from "./TemplateForm";
const FileTypeEnum = 2 const FileTypeEnum = 2;
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
FileTypeEnum: FileTypeEnum, FileTypeEnum: FileTypeEnum,
BusinessScenarioEnum: null, BusinessScenarioEnum: null,
Name: '', Name: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
} };
} };
export default { export default {
name: 'ExportTemplate', name: "ExportTemplate",
components: { BaseContainer, Pagination, TemplateForm }, components: { BaseContainer, Pagination, TemplateForm },
data() { data() {
return { return {
@ -192,97 +189,86 @@ export default {
list: [], list: [],
total: 0, total: 0,
currentRow: {}, currentRow: {},
editDialog: { title: '', visible: false }, editDialog: { title: "", visible: false },
loading: false, loading: false,
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
PreviewFile(row) {
let basePath = window.location.origin
if (window.location.protocol !== 'https:') {
basePath = 'https://irc.test.extimaging.com'
}
let data = {
name: row.NameCN,
path: basePath + row.Path,
}
this.$emit('PreviewFile', data)
},
handleDelete(row) { handleDelete(row) {
this.$confirm( this.$confirm(
this.$t('dictionary:attachment:export:confirm:delete') this.$t("dictionary:attachment:export:confirm:delete")
).then(() => { ).then(() => {
deleteCommonDocument(row.Id).then(() => { deleteCommonDocument(row.Id).then(() => {
this.$message.success(this.$t('common:message:deletedSuccessfully')) this.$message.success(this.$t("common:message:deletedSuccessfully"));
this.getList() this.getList();
}) });
}) });
}, },
getList() { getList() {
this.loading = true this.loading = true;
getCommonDocumentList(this.searchData) getCommonDocumentList(this.searchData)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount this.total = res.Result.TotalCount;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
// //
handleAdd() { handleAdd() {
this.editDialog.title = 'Add' this.editDialog.title = "Add";
this.currentRow = { FileTypeEnum: FileTypeEnum } this.currentRow = { FileTypeEnum: FileTypeEnum };
this.editDialog.visible = true this.editDialog.visible = true;
}, },
// //
handleDownload(row) { handleDownload(row) {
this.loading = true this.loading = true;
DownloadCommonDoc(row.Code) DownloadCommonDoc(row.Code)
.then((data) => { .then((data) => {
this.loading = false this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
// //
handleEdit(row) { handleEdit(row) {
this.editDialog.title = 'Edit' this.editDialog.title = "Edit";
this.currentRow = { ...row } this.currentRow = { ...row };
this.editDialog.visible = true this.editDialog.visible = true;
}, },
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
closeDialog() { closeDialog() {
this.editDialog.visible = false this.editDialog.visible = false;
}, },
// //
handleSortChange(column) { handleSortChange(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .search { ::v-deep .search{
display: block; display: block;
} }
</style> </style>

View File

@ -12,7 +12,7 @@
<el-form-item label="文件类型: " prop="FileTypeId"> <el-form-item label="文件类型: " prop="FileTypeId">
<el-select <el-select
v-model="form.FileTypeId" v-model="form.FileTypeId"
style="width: 100%" style="width:100%;"
size="small" size="small"
filterable filterable
> >
@ -41,26 +41,21 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
:disabled="form.Type === ''" :disabled="form.Type === ''"
> >
<el-button <el-button size="small" type="primary" :disabled="form.FileTypeId === ''" :loading="btnLoading">Select</el-button>
size="small" <span
type="primary" slot="tip"
:disabled="form.FileTypeId === ''" style="margin-left:10px;"
:loading="btnLoading" class="el-upload__tip"
>Select</el-button
> >
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
(must be in pdf format) (must be in pdf format)
</span> </span>
</el-upload> </el-upload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="需要签署的用户类型: " prop="NeedConfirmedUserTypeIdList">
label="需要签署的用户类型: "
prop="NeedConfirmedUserTypeIdList"
>
<el-select <el-select
v-model="form.NeedConfirmedUserTypeIdList" v-model="form.NeedConfirmedUserTypeIdList"
style="width: 100%" style="width:100%;"
multiple multiple
> >
<el-option <el-option
@ -71,18 +66,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否仅内部签署: " prop="DocUserSignType"> <el-form-item label="查看最短时间(分钟): " prop="SignViewMinimumMinutes">
<el-switch
v-model="form.DocUserSignType"
:active-value="1"
:inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item
label="查看最短时间(分钟): "
prop="SignViewMinimumMinutes"
>
<el-input-number <el-input-number
v-model="form.SignViewMinimumMinutes" v-model="form.SignViewMinimumMinutes"
controls-position="right" controls-position="right"
@ -97,16 +81,9 @@
</el-radio-group> </el-radio-group>
</el-form-item> --> </el-form-item> -->
</div> </div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item style="text-align: right"> <el-form-item style="text-align:right;">
<el-button <el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
size="small"
type="primary"
:disabled="form.FileTypeId === '' || form.Name === ''"
:loading="saveBtnLoading"
@click="handleSave"
>Save</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -119,10 +96,8 @@ export default {
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() { return {} }
return {} }
},
},
}, },
data() { data() {
@ -133,26 +108,19 @@ export default {
Name: '', Name: '',
Path: '', Path: '',
IsDeleted: false, IsDeleted: false,
SignViewMinimumMinutes: null, SignViewMinimumMinutes: null
DocUserSignType: 0,
}, },
rules: { rules: {
FileTypeId: [ FileTypeId: [{ required: true, message: 'Please select', trigger: ['blur'] }],
{ required: true, message: 'Please select', trigger: ['blur'] }, SignViewMinimumMinutes: [{ required: true, message: 'Please specify', trigger: ['change'] }],
], NeedConfirmedUserTypeIdList: [{ required: true, message: 'Please select', trigger: ['blur'] }]
SignViewMinimumMinutes: [
{ required: true, message: 'Please specify', trigger: ['change'] },
],
NeedConfirmedUserTypeIdList: [
{ required: true, message: 'Please select', trigger: ['blur'] },
],
}, },
fileList: [], fileList: [],
userTypeOptions: [], userTypeOptions: [],
btnLoading: false, btnLoading: false,
saveBtnLoading: false, saveBtnLoading: false,
loading: false, loading: false,
dictionaryList: {}, dictionaryList: {}
} }
}, },
mounted() { mounted() {
@ -169,8 +137,8 @@ export default {
{ {
name: this.data.Name, name: this.data.Name,
url: this.data.Path, url: this.data.Path,
path: this.data.Path, path: this.data.Path
}, }
] ]
} }
this.form.Id = this.data.Id this.form.Id = this.data.Id
@ -179,31 +147,25 @@ export default {
this.form.Path = this.data.Path this.form.Path = this.data.Path
this.form.IsDeleted = this.data.IsDeleted this.form.IsDeleted = this.data.IsDeleted
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
this.form.DocUserSignType = this.data.DocUserSignType
} }
this.loading = false this.loading = false
}, },
// //
getDicData() { getDicData() {
getBasicDataSelects(['Sys_Document']) getBasicDataSelects(['Sys_Document']).then(res => {
.then((res) => {
this.dictionaryList = { ...res.Result } this.dictionaryList = { ...res.Result }
}).catch(() => {
}) })
.catch(() => {})
}, },
// //
getUserType() { getUserType() {
getTrialUserTypeList() getTrialUserTypeList().then(res => {
.then((res) => {
this.userTypeOptions = res.Result this.userTypeOptions = res.Result
if (this.form.Id) { if (this.form.Id) {
this.form.NeedConfirmedUserTypeIdList = this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeIds
this.data.NeedConfirmedUserTypeIds
} }
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
}, },
beforeUpload(file) { beforeUpload(file) {
// //
@ -219,35 +181,26 @@ export default {
async handleUploadFile(param) { async handleUploadFile(param) {
this.loading = true this.loading = true
var file = await this.fileToBlob(param.file) var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put( const res = await this.OSSclient.put(`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`, this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
file
)
this.fileList.push({
name: param.file.name,
path: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
})
this.form.Path = this.$getObjectName(res.url) this.form.Path = this.$getObjectName(res.url)
this.form.Name = param.file.name this.form.Name = param.file.name
this.loading = false this.loading = false
}, },
handleSave() { handleSave() {
this.$refs.sysAttachmentFrom.validate((valid) => { this.$refs.sysAttachmentFrom.validate(valid => {
if (!valid) return if (!valid) return
if (!this.form.Name) { if (!this.form.Name) {
this.$alert('Please select file.') this.$alert('Please select file.')
return return
} }
this.saveBtnLoading = true this.saveBtnLoading = true
addOrUpdateSystemDocument(this.form) addOrUpdateSystemDocument(this.form).then(res => {
.then((res) => {
this.saveBtnLoading = false this.saveBtnLoading = false
this.$emit('closeDialog') this.$emit('closeDialog')
this.$emit('getList') this.$emit('getList')
this.$message.success('Uploaded successfully') this.$message.success('Uploaded successfully')
}) }).catch(() => {
.catch(() => {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
}) })
@ -267,21 +220,19 @@ export default {
}, },
checkFileSuffix(fileName) { checkFileSuffix(fileName) {
var typeArr = ['pdf'] var typeArr = ['pdf']
var extendName = fileName var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
.substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase()
if (typeArr.indexOf(extendName) !== -1) { if (typeArr.indexOf(extendName) !== -1) {
return true return true
} else { } else {
return false return false
} }
}, }
}, }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.upload-temporary-file { .upload-temporary-file{
.upload-container .el-upload--text { .upload-container .el-upload--text {
border: none; border: none;
width: 80px; width: 80px;
@ -294,8 +245,8 @@ export default {
color: #428bca; color: #428bca;
font-size: 13px; font-size: 13px;
} }
.account_item_clear { .account_item_clear{
.el-tag__close { .el-tag__close{
display: none !important; display: none !important;
} }
} }

View File

@ -2,18 +2,27 @@
<BaseContainer> <BaseContainer>
<template slot="search-container"> <template slot="search-container">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<el-form-item :label="$t('dictionary:signature:search:FileTypeId')">
<el-select v-model="searchData.FileTypeId" style="width: 150px"> <el-form-item label="文件类型:">
<el-select
v-model="searchData.FileTypeId"
style="width:150px;"
>
<el-option <el-option
v-for="item of dict.type.Sys_Document" v-for="item of dict.type.Sys_Document"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('dictionary:signature:search:Name')"> <el-form-item label="文件名称">
<el-input v-model="searchData.Name" style="width: 130px" clearable /> <el-input
v-model="searchData.Name"
style="width:130px;"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -22,11 +31,7 @@
{{ $t('common:button:search') }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
type="primary"
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t('common:button:reset') }} {{ $t('common:button:reset') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -34,7 +39,7 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
style="margin-left: auto" style="margin-left:auto;"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
> >
@ -43,7 +48,7 @@
</template> </template>
<template slot="main-container"> <template slot="main-container">
<el-table <el-table
v-adaptive="{ bottomOffset: 60 }" v-adaptive="{bottomOffset:60}"
v-loading="loading" v-loading="loading"
:data="list" :data="list"
stripe stripe
@ -53,97 +58,81 @@
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column
prop="FileType" prop="FileType"
:label="$t('dictionary:signature:table:FileType')" label="文件类型"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="Name" prop="Name"
:label="$t('dictionary:signature:table:Name')" label="文件名称"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="SignViewMinimumMinutes" prop="SignViewMinimumMinutes"
:label="$t('dictionary:signature:table:SignViewMinimumMinutes')" label="查看最短时间(分钟)"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column <el-table-column
prop="NeedConfirmedUserTypes" prop="NeedConfirmedUserTypes"
:label="$t('dictionary:signature:table:NeedConfirmedUserTypes')" label="需要签署的用户类型"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{ scope.row.NeedConfirmedUserTypes?scope.row.NeedConfirmedUserTypes.join(', '):'' }}
scope.row.NeedConfirmedUserTypes
? scope.row.NeedConfirmedUserTypes.join(', ')
: ''
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="IsDeleted" prop="IsDeleted"
:label="$t('dictionary:signature:table:IsDeleted')" label="是否废除"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ {{ scope.row.IsDeleted?'Yes':'No' }}
$fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag>
<el-tag v-else type="primary">{{
$fd('TrainingStatus', scope.row.IsDeleted)
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="DocUserSignType" prop="UpdateTime"
:label="$t('dictionary:signature:table:DocUserSignType')" label="更新时间"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
</template>
</el-table-column>
<el-table-column
prop="CreateTime"
:label="$t('dictionary:signature:table:CreateTime')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column :label="$t('common:action:action')"> <el-table-column label="Action">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handlePreview(scope.row)"> <el-button
{{ $t('common:button:preview') }} type="text"
@click="handlePreview(scope.row)"
>
预览
</el-button> </el-button>
<el-button type="text" @click="handleEdit(scope.row)"> <el-button
{{ $t('common:button:edit') }} type="text"
@click="handleEdit(scope.row)"
>
编辑
</el-button> </el-button>
<el-button <el-button
:disabled="scope.row.IsDeleted" :disabled="scope.row.IsDeleted"
type="text" type="text"
@click="handleRepeal(scope.row)" @click="handleRepeal(scope.row)"
> >
{{ $t('common:button:revoke') }} 废除
</el-button> </el-button>
<el-button type="text" @click="handleDelete(scope.row)"> <el-button
{{ $t('common:button:delete') }} type="text"
@click="handleDelete(scope.row)"
>
删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
class="page"
:total="total"
:page.sync="searchData.PageIndex"
:limit.sync="searchData.PageSize"
@pagination="getList"
/>
<!-- 新增/编辑 --> <!-- 新增/编辑 -->
<el-dialog <el-dialog
@ -154,11 +143,7 @@
width="600px" width="600px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<TemplateForm <TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
:data="currentRow"
@closeDialog="closeDialog"
@getList="getList"
/>
</el-dialog> </el-dialog>
<!-- 预览文件 --> <!-- 预览文件 -->
@ -170,16 +155,10 @@
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<div <div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
class="base-modal-body" <PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
/>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
</BaseContainer> </BaseContainer>
@ -196,7 +175,7 @@ const searchDataDefault = () => {
FileTypeId: '', FileTypeId: '',
Name: '', Name: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20
} }
} }
export default { export default {
@ -214,7 +193,7 @@ export default {
editVisible: false, editVisible: false,
previewVisible: false, previewVisible: false,
title: '', title: '',
loading: false, loading: false
} }
}, },
mounted() { mounted() {
@ -224,11 +203,10 @@ export default {
// //
getList() { getList() {
this.loading = true this.loading = true
getSystemDocumentList(this.searchData) getSystemDocumentList(this.searchData).then(res => {
.then((res) => {
this.loading = false this.loading = false
const { CurrentPageData, TotalCount } = res.Result const { CurrentPageData, TotalCount } = res.Result
CurrentPageData.forEach((item) => { CurrentPageData.forEach(item => {
item.NeedConfirmedUserTypes = [] item.NeedConfirmedUserTypes = []
item.NeedConfirmedUserTypeIds = [] item.NeedConfirmedUserTypeIds = []
item.NeedConfirmedUserTypeList.forEach((i) => { item.NeedConfirmedUserTypeList.forEach((i) => {
@ -238,8 +216,7 @@ export default {
}) })
this.list = CurrentPageData this.list = CurrentPageData
this.total = TotalCount this.total = TotalCount
}) }).catch(() => {
.catch(() => {
this.loading = false this.loading = false
}) })
}, },
@ -253,9 +230,7 @@ export default {
handlePreview(row) { handlePreview(row) {
const { Name, FullFilePath } = row const { Name, FullFilePath } = row
this.currentPath = FullFilePath this.currentPath = FullFilePath
this.currentType = row.Name this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ''
this.previewVisible = true this.previewVisible = true
}, },
// //
@ -266,49 +241,39 @@ export default {
}, },
// //
handleRepeal(row) { handleRepeal(row) {
this.$confirm(this.$t('dictionary:signature:confirm:delFile'), { this.$confirm('是否确认废除此文件?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.loading = true this.loading = true
userAbandonDoc(row.Id, true) userAbandonDoc(row.Id, true)
.then((res) => { .then(res => {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList()
this.$message.success( this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$t('common:message:savedSuccessfully')
)
} }
}) }).catch(() => { this.loading = false })
.catch(() => { }).catch(() => {})
this.loading = false
})
})
.catch(() => {})
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), { this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true
}).then(() => { })
.then(() => {
this.loading = true this.loading = true
deleteSystemDocument(row.Id) deleteSystemDocument(row.Id)
.then((res) => { .then(res => {
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.list.splice( this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
this.list.findIndex((item) => item.Id === row.Id), this.$message.success('删除成功!')
1
)
this.$message.success(
this.$t('common:message:deletedSuccessfully')
)
} }
}) }).catch(() => {
.catch(() => {
this.loading = false this.loading = false
}) })
}) })
@ -340,7 +305,7 @@ export default {
this.searchData.SortField = column.prop this.searchData.SortField = column.prop
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1
this.getList() this.getList()
}, }
}, }
} }
</script> </script>

View File

@ -111,16 +111,13 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="UpdateTime" prop="UpdateTime"
label="上传时间" label="更新时间"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" sortable="custom"
/> />
<el-table-column label="Action"> <el-table-column label="Action">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="PreviewFile(scope.row)">
{{ $t('common:button:preview') }}
</el-button>
<el-button type="text" @click="handleDownload(scope.row)"> <el-button type="text" @click="handleDownload(scope.row)">
下载 下载
</el-button> </el-button>
@ -204,17 +201,6 @@ export default {
}) })
}) })
}, },
PreviewFile(row) {
let basePath = window.location.origin
if (window.location.protocol !== 'https:') {
basePath = 'https://irc.test.extimaging.com'
}
let data = {
name: row.NameCN,
path: basePath + row.Path,
}
this.$emit('PreviewFile', data)
},
getList() { getList() {
this.loading = true this.loading = true
getCommonDocumentList(this.searchData) getCommonDocumentList(this.searchData)

View File

@ -1,54 +1,14 @@
<template> <template>
<div class="attachment-wrapper"> <div class="attachment-wrapper">
<el-tabs v-model="activeTab" @tab-click="clickTab"> <el-tabs v-model="activeTab" @tab-click="clickTab">
<el-tab-pane <el-tab-pane v-for="item in $d.Common_File_Type" :key="item.value" :label="item.label" :name="String(item.value)">
v-for="item in $d.Common_File_Type" <UploadTemplate v-if="activeTab === '1'" />
:key="item.value" <ExportTemplate v-if="activeTab === '2'" />
:label="item.label" <EmailTemplate v-if="activeTab === '3'" />
:name="String(item.value)" <CommonTemplate v-if="activeTab === '4'" />
> <SignatureTemplate v-if="activeTab === '5'" />
<UploadTemplate
v-if="activeTab === '1' && item.value == activeTab"
@PreviewFile="PreviewFile"
/>
<ExportTemplate
v-if="activeTab === '2' && item.value == activeTab"
@PreviewFile="PreviewFile"
/>
<EmailTemplate v-if="activeTab === '3' && item.value == activeTab" />
<CommonTemplate v-if="activeTab === '4' && item.value == activeTab" />
<SignatureTemplate
v-if="activeTab === '5' && item.value == activeTab"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- 预览 -->
<el-dialog
v-if="Preview.visible"
:visible.sync="Preview.visible"
:close-on-click-modal="false"
:fullscreen="true"
:title="Preview.title"
width="600px"
custom-class="base-dialog-wrapper"
>
<vue-office-docx
v-if="docxTypes.includes(Preview.type)"
:src="Preview.path"
style="height: calc(100vh - 70px)"
@rendered="renderedHandler"
@error="errorHandler"
/>
<vue-office-excel
v-else-if="excelTypes.includes(Preview.type)"
:src="Preview.path"
:options="options"
style="height: calc(100vh - 70px)"
@rendered="renderedHandler"
@error="errorHandler"
/>
<PreviewFile v-else :file-path="Preview.path" :file-type="Preview.type" />
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -57,11 +17,6 @@ import ExportTemplate from './components/ExportTemplate'
import EmailTemplate from './components/EmailTemplate' import EmailTemplate from './components/EmailTemplate'
import CommonTemplate from './components/CommonTemplate' import CommonTemplate from './components/CommonTemplate'
import SignatureTemplate from './components/SignatureTemplate' import SignatureTemplate from './components/SignatureTemplate'
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
import VueOfficeExcel from '@vue-office/excel'
import '@vue-office/excel/lib/index.css'
import PreviewFile from '@/components/PreviewFile/index'
export default { export default {
name: 'Attachment', name: 'Attachment',
components: { components: {
@ -69,35 +24,11 @@ export default {
ExportTemplate, ExportTemplate,
EmailTemplate, EmailTemplate,
CommonTemplate, CommonTemplate,
SignatureTemplate, SignatureTemplate
VueOfficeDocx,
VueOfficeExcel,
PreviewFile,
}, },
data() { data() {
return { return {
activeTab: null, activeTab: null
Preview: {
visible: false,
title: '',
type: null,
path: null,
},
excelTypes: ['xlsx', 'xls'],
docxTypes: ['docx', 'doc'],
options: {
xls: false, //xlsxfalsexlstrue
minColLength: 0, // excelxlsx0.
minRowLength: 0, // excelxlsx0.
widthOffset: 10, // Npx
heightOffset: 10, // Npx
beforeTransformData: (workbookData) => {
return workbookData
}, //exceljsexcelexcelvalue
transformData: (workbookData) => {
return workbookData
}, //exceltransformDatatext
},
} }
}, },
mounted() { mounted() {
@ -109,46 +40,25 @@ export default {
}, },
methods: { methods: {
clickTab(tab, event) { clickTab(tab, event) {
this.$router.push({ this.$router.push({ path: `/dictionary/attachment?tabActive=${tab.name}` })
path: `/dictionary/attachment?tabActive=${tab.name}`, }
})
},
PreviewFile(data) {
if (!data.path) return false
let type = data.path
.substring(data.path.lastIndexOf('.') + 1)
.toLocaleLowerCase()
this.Preview.path = data.path
this.Preview.type = type
this.Preview.title = data.name
if (this.excelTypes.includes(type)) {
this.options.xls = type === 'xls'
} }
this.Preview.visible = true
},
renderedHandler() {
console.log('渲染完成')
},
errorHandler() {
console.log('渲染失败')
},
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.attachment-wrapper { .attachment-wrapper{
.el-tabs { .el-tabs{
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.el-tabs__header { .el-tabs__header {
height: 40px; height: 40px;
margin-bottom: 5px; margin-bottom:5px;
} }
.el-tabs__content { .el-tabs__content{
flex: 1; flex: 1;
.el-tab-pane { .el-tab-pane{
height: 100%; height: 100%;
} }
} }

View File

@ -9,19 +9,8 @@
> >
<div class="base-dialog-body"> <div class="base-dialog-body">
<el-form-item label="Site: "> <el-form-item label="Site: ">
<el-select <el-select v-model="form.SiteId" style="width: 100%" clearable filterable @change="siteChange">
v-model="form.SiteId" <el-option v-for="item of siteList" :value="item.Id" :key="item.Id" :label="item.SiteName">
style="width: 100%"
clearable
filterable
@change="siteChange"
>
<el-option
v-for="item of siteList"
:value="item.Id"
:key="item.Id"
:label="item.SiteName"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -31,16 +20,10 @@
<el-form-item label="Hospital EN: " prop="HospitalName"> <el-form-item label="Hospital EN: " prop="HospitalName">
<el-input v-model="form.HospitalName" /> <el-input v-model="form.HospitalName" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="Affiliated University CN: " prop="UniversityAffiliatedCN">
label="Affiliated University CN: "
prop="UniversityAffiliatedCN"
>
<el-input v-model="form.UniversityAffiliatedCN" /> <el-input v-model="form.UniversityAffiliatedCN" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="Affiliated University EN: " prop="UniversityAffiliated">
label="Affiliated University EN: "
prop="UniversityAffiliated"
>
<el-input v-model="form.UniversityAffiliated" /> <el-input v-model="form.UniversityAffiliated" />
</el-form-item> </el-form-item>
<el-form-item label="Country CN: " prop="CountryCN"> <el-form-item label="Country CN: " prop="CountryCN">
@ -62,22 +45,10 @@
<el-input v-model="form.City" /> <el-input v-model="form.City" />
</el-form-item> </el-form-item>
</div> </div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item> <el-form-item>
<el-button <el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
:disabled="btnLoading" <el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
size="small"
type="primary"
@click="handleCancel"
>Cancel</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>Save</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -92,14 +63,14 @@ export default {
type: Object, type: Object,
default() { default() {
return {} return {}
}, }
}, },
model: { model: {
type: Object, type: Object,
default() { default() {
return {} return {}
}, }
}, }
}, },
data() { data() {
return { return {
@ -116,36 +87,23 @@ export default {
Province: '', Province: '',
ProvinceCN: '', ProvinceCN: '',
City: '', City: '',
CityCN: '', CityCN: ''
}, },
siteList: [], siteList: [],
rules: { rules: {
HospitalNameCN: [ HospitalNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
{ required: true, message: 'Please specify', trigger: 'blur' }, UniversityAffiliated: [{ max: 100, message: 'The maximum length is 100' }],
{ max: 50, message: 'The maximum length is 50' }, UniversityAffiliatedCN: [{ max: 100, message: 'The maximum length is 100' }],
], Country: [{ required: true, message: 'Please specify', trigger: 'blur' },
UniversityAffiliated: [ { max: 50, message: 'The maximum length is 50' }],
{ max: 100, message: 'The maximum length is 100' }, CountryCN: [{ max: 50, message: 'The maximum length is 50' }],
], Province: [{ required: true, message: 'Please specify', trigger: 'blur' },
UniversityAffiliatedCN: [ { max: 50, message: 'The maximum length is 50' }],
{ max: 100, message: 'The maximum length is 100' }, ProvinceCN: [{ max: 50, message: 'The maximum length is 50' }],
], City: [{ required: true, message: 'Please specify', trigger: 'blur' },
Country: [{ max: 50, message: 'The maximum length is 50' }], { max: 50, message: 'The maximum length is 50' }],
CountryCN: [ CityCN: [{ max: 50, message: 'The maximum length is 50' }]
{ required: true, message: 'Please specify', trigger: 'blur' }, }
{ max: 50, message: 'The maximum length is 50' },
],
Province: [{ max: 50, message: 'The maximum length is 50' }],
ProvinceCN: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
City: [{ max: 50, message: 'The maximum length is 50' }],
CityCN: [
{ required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' },
],
},
} }
}, },
mounted() { mounted() {
@ -156,7 +114,7 @@ export default {
}, },
methods: { methods: {
siteChange(v) { siteChange(v) {
this.siteList.forEach((o) => { this.siteList.forEach(o => {
if (o.Id === v) { if (o.Id === v) {
this.form.CityCN = o.City this.form.CityCN = o.City
this.form.HospitalNameCN = o.SiteNameCN this.form.HospitalNameCN = o.SiteNameCN
@ -167,21 +125,18 @@ export default {
}) })
}, },
getAllSiteList() { getAllSiteList() {
getAllSiteList() getAllSiteList().then(res => {
.then((res) => {
this.siteList = res.Result this.siteList = res.Result
console.log(this.siteList) console.log(this.siteList)
}) }).catch(() => {
.catch(() => {
reject() reject()
}) })
}, },
handleSave() { handleSave() {
this.$refs.hospitalForm.validate((valid) => { this.$refs.hospitalForm.validate(valid => {
if (!valid) return if (!valid) return
this.btnLoading = true this.btnLoading = true
addOrUpdateHospital(this.form) addOrUpdateHospital(this.form).then(res => {
.then((res) => {
this.btnLoading = false this.btnLoading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
@ -189,15 +144,15 @@ export default {
this.$emit('getList') this.$emit('getList')
this.$emit('close') this.$emit('close')
} }
}) }).catch(() => {
.catch(() => {
this.btnLoading = false this.btnLoading = false
}) })
}) })
}, },
handleCancel() { handleCancel() {
this.$emit('close') this.$emit('close')
}, }
}, }
} }
</script> </script>

View File

@ -14,17 +14,11 @@
</el-form-item> </el-form-item>
<!-- 中心名称 --> <!-- 中心名称 -->
<el-form-item <el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
:label="$t('trials:customSite:form:siteName')"
prop="SiteName"
>
<el-input v-model="form.SiteName" /> <el-input v-model="form.SiteName" />
</el-form-item> </el-form-item>
<!-- 中心名称CN --> <!-- 中心名称CN -->
<el-form-item <el-form-item :label="$t('trials:customSite:form:siteName') + 'CN'" prop="SiteNameCN">
:label="$t('trials:customSite:form:siteName') + 'CN'"
prop="SiteNameCN"
>
<el-input v-model="form.SiteNameCN" /> <el-input v-model="form.SiteNameCN" />
</el-form-item> </el-form-item>
@ -52,7 +46,7 @@
v-model="form.HospitalId" v-model="form.HospitalId"
clearable clearable
placeholder="Please select" placeholder="Please select"
style="width: 100%" style="width:100%;"
> >
<el-option <el-option
v-for="item in hospitalList" v-for="item in hospitalList"
@ -79,22 +73,10 @@
<el-input v-model="form.ContactPhone" /> <el-input v-model="form.ContactPhone" />
</el-form-item> </el-form-item>
</div> </div>
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item> <el-form-item>
<el-button <el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
:disabled="btnLoading" <el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
size="small"
type="primary"
@click="handleCancel"
>Cancel</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>Save</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -109,8 +91,8 @@ export default {
type: Object, type: Object,
default() { default() {
return {} return {}
}, }
}, }
}, },
data() { data() {
return { return {
@ -129,42 +111,50 @@ export default {
ContactName: '', ContactName: '',
ContactPhone: '', ContactPhone: '',
UniqueCode: '', UniqueCode: '',
Address: '', Address: ''
}, },
rules: { rules: {
SiteName: [ SiteName: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
// { max: 50, message: 'The maximum length is 50' } { max: 50, message: 'The maximum length is 50' }
], ],
SiteNameCN: [ SiteNameCN: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
// { max: 50, message: 'The maximum length is 50' } { max: 50, message: 'The maximum length is 50' }
], ],
SiteCode: [ SiteCode: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
Country: [ Country: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
City: [ City: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ max: 50, message: 'The maximum length is 50' }, { max: 50, message: 'The maximum length is 50' }
], ],
// HospitalId: [ // HospitalId: [
// { required: true, message: 'Please specify', trigger: 'blur' } // { required: true, message: 'Please specify', trigger: 'blur' }
// ], // ],
Address: [ Address: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' }
], ],
DirectorName: [{ max: 50, message: 'The maximum length is 50' }], DirectorName: [
DirectorPhone: [{ max: 50, message: 'The maximum length is 50' }], { max: 50, message: 'The maximum length is 50' }
ContactName: [{ max: 50, message: 'The maximum length is 50' }], ],
ContactPhone: [{ max: 50, message: 'The maximum length is 50' }], DirectorPhone: [
{ max: 50, message: 'The maximum length is 50' }
],
ContactName: [
{ max: 50, message: 'The maximum length is 50' }
],
ContactPhone: [
{ max: 50, message: 'The maximum length is 50' }
]
}, },
loading: false, loading: false,
show: false, show: false
} }
}, },
mounted() { mounted() {
@ -173,11 +163,10 @@ export default {
}, },
methods: { methods: {
handleSave() { handleSave() {
this.$refs.siteForm.validate((valid) => { this.$refs.siteForm.validate(valid => {
if (!valid) return if (!valid) return
this.btnLoading = true this.btnLoading = true
addOrUpdateSite(this.form) addOrUpdateSite(this.form).then(res => {
.then((res) => {
this.btnLoading = false this.btnLoading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
@ -185,8 +174,7 @@ export default {
this.$emit('getList') this.$emit('getList')
this.$emit('close') this.$emit('close')
} }
}) }).catch(() => {
.catch(() => {
this.btnLoading = false this.btnLoading = false
}) })
}) })
@ -201,7 +189,8 @@ export default {
if (Object.keys(this.data).length && this.data.Id) { if (Object.keys(this.data).length && this.data.Id) {
this.form = { ...this.data } this.form = { ...this.data }
} }
}, }
}, }
} }
</script> </script>

View File

@ -24,16 +24,6 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标准分组" prop="CriterionGroup">
<el-select v-model="form.CriterionGroup">
<el-option
v-for="item of $d.CriterionGroup"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.Id !== ''" label="是否配置完成"> <el-form-item v-if="form.Id !== ''" label="是否配置完成">
<el-switch v-model="form.IsCompleteConfig" /> <el-switch v-model="form.IsCompleteConfig" />
@ -50,7 +40,7 @@
<el-form-item v-if="form.Id !== ''" label="是否启用"> <el-form-item v-if="form.Id !== ''" label="是否启用">
<el-switch v-model="form.IsEnable" /> <el-switch v-model="form.IsEnable" />
</el-form-item> </el-form-item>
<el-form-item v-if="form.Id !== ''" label="eICRF仅展示阅片Tab"> <el-form-item v-if="form.Id !== ''" label="eCRF是否显示在影像阅片页面">
<el-switch v-model="form.IseCRFShowInDicomReading" /> <el-switch v-model="form.IseCRFShowInDicomReading" />
</el-form-item> </el-form-item>
</div> </div>
@ -82,7 +72,6 @@ export default {
Id: '', Id: '',
CriterionName: '', CriterionName: '',
CriterionType: null, CriterionType: null,
CriterionGroup: null,
IsEnable: true, IsEnable: true,
IsCompleteConfig: false, IsCompleteConfig: false,
ShowOrder: null, ShowOrder: null,
@ -91,8 +80,7 @@ export default {
}, },
rules: { rules: {
CriterionName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }], CriterionName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
CriterionType: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }], CriterionType: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }]
CriterionGroup: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }]
}, },
loading: false, loading: false,

View File

@ -13,14 +13,14 @@
{{ question.GroupName }} {{ question.GroupName }}
</div> </div>
<div <div
v-else-if="question.Type==='table' || question.Type==='basicTable'" v-else-if="question.Type==='table'"
style="font-weight: bold;font-size: 14px;margin: 5px 0px;" style="font-weight: bold;font-size: 14px;margin: 5px 0px;"
> >
{{ question.QuestionName }} {{ question.QuestionName }}
</div> </div>
<template v-else> <template v-else>
<el-form-item <el-form-item
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion===0" v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(questionForm[question.ParentId])) || question.ShowQuestion===0"
:label="`${question.QuestionName}`" :label="`${question.QuestionName}`"
:prop="question.Id" :prop="question.Id"
:rules="[ :rules="[
@ -139,29 +139,14 @@
/> />
<!-- 数值 --> <!-- 数值 -->
<!-- :precision="2" :step="0.1" :max="10" --> <!-- :precision="2" :step="0.1" :max="10" -->
<!-- <el-input-number <el-input-number
v-if="question.Type==='number'" v-if="question.Type==='number'"
v-model="questionForm[question.Id]" v-model="questionForm[question.Id]"
/> -->
<el-input
v-if="question.Type==='number'"
v-model="questionForm[question.Id]"
type="number"
:disabled="question.DataSource === 1"
>
<template v-if="question.Unit" slot="append">{{$fd('ValueUnit', question.Unit)}}</template>
</el-input>
<!-- 自动分类 -->
<el-input
v-if="question.Type==='calss'"
v-model="questionForm[question.Id]"
disabled
/> />
<!-- 上传图像 --> <!-- 上传图像 -->
<el-upload <el-upload
v-if="question.Type==='upload'" v-if="question.Type==='upload'"
action :action="accept"
:accept="question.FileType"
:limit="question.ImageCount" :limit="question.ImageCount"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"

View File

@ -107,7 +107,7 @@
<el-table-column <el-table-column
prop="IsShowInDicom" prop="IsShowInDicom"
label="是否在阅片页面显示" label="是否在阅片页面显示"
width="150" width="140"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -115,13 +115,13 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 注释 --> <!-- 注释 -->
<!-- <el-table-column <el-table-column
prop="Remark" prop="Remark"
:label="$t('trials:readingUnit:qsList:title:Remark')" :label="$t('trials:readingUnit:qsList:title:Remark')"
width="140" width="140"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> --> </el-table-column>
<el-table-column <el-table-column
prop="GlobalReadingShowType" prop="GlobalReadingShowType"
label="是否在全局阅片显示" label="是否在全局阅片显示"
@ -132,39 +132,6 @@
{{ $fd('GlobalReadingShowType', scope.row.GlobalReadingShowType) }} {{ $fd('GlobalReadingShowType', scope.row.GlobalReadingShowType) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 导出标识 -->
<!-- <el-table-column
prop="ExportIdentification"
:label="$t('trials:readingUnit:qsList:title:ExportIdentification')"
width="160"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('ExportIdentification', scope.row.ExportIdentification) }}
</template>
</el-table-column> -->
<!-- 问题标识 -->
<el-table-column
prop="QuestionType"
label="问题标识"
width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('QuestionType', scope.row.QuestionType) }}
</template>
</el-table-column>
<!-- 导出目标表格 -->
<el-table-column
prop="ExportResult"
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
width="160"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ getStringResult(scope.row.ExportResult, 'ExportResult') }}
</template>
</el-table-column>
<!-- 限制编辑 --> <!-- 限制编辑 -->
<el-table-column <el-table-column
prop="LimitEdit" prop="LimitEdit"
@ -234,7 +201,7 @@
:visible.sync="addOrEdit.visible" :visible.sync="addOrEdit.visible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="`${addOrEdit.title}`" :title="`${addOrEdit.title}`"
width="650px" width="600px"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
@ -242,8 +209,6 @@
ref="addOrEdit" ref="addOrEdit"
:data="rowData" :data="rowData"
:type="type" :type="type"
:criterionType="data.CriterionType"
:criterionId="data.Id"
@close="addOrEdit.visible = false" @close="addOrEdit.visible = false"
@getList="getList" @getList="getList"
/> />
@ -276,7 +241,6 @@
> >
<TableQsList <TableQsList
:criterion-id="criterionId" :criterion-id="criterionId"
:criterionType="data.CriterionType"
:reading-question-id="rowData.Id" :reading-question-id="rowData.Id"
:is-complete-config="data.IsCompleteConfig" :is-complete-config="data.IsCompleteConfig"
:lesion-type="rowData.LesionType" :lesion-type="rowData.LesionType"
@ -352,7 +316,7 @@ export default {
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}, },
handleAdd() { handleAdd() {
this.rowData = { ReadingQuestionCriterionSystemId: this.criterionId, Id: ''} this.rowData = { ReadingQuestionCriterionSystemId: this.criterionId, Id: '' }
this.type = 'add' this.type = 'add'
this.addOrEdit.title = '添加' this.addOrEdit.title = '添加'
this.addOrEdit.visible = true this.addOrEdit.visible = true
@ -391,11 +355,6 @@ export default {
this.config.title = `${this.$fd('LesionType', row.LesionType)}${this.$t('trials:readingUnit:qsList:title:tableQs')}` this.config.title = `${this.$fd('LesionType', row.LesionType)}${this.$t('trials:readingUnit:qsList:title:tableQs')}`
this.config.visible = true this.config.visible = true
}, },
getStringResult(arr, dictionaryCode) {
let newArr = arr.map(i => this.$fd(dictionaryCode, i))
let delimiter = this.$i18n.locale === 'zh' ? '' : ', '
return newArr.join(delimiter)
},
// //
handleSearch() { handleSearch() {
this.getList() this.getList()

View File

@ -8,54 +8,6 @@
> >
<el-input v-model="searchData.CriterionName" clearable style="width:120px;" /> <el-input v-model="searchData.CriterionName" clearable style="width:120px;" />
</el-form-item> </el-form-item>
<el-form-item
label="标准类型"
>
<el-select v-model="searchData.CriterionType" clearable style="width:120px;">
<el-option
v-for="item of $d.CriterionType"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item
label="标准分组"
>
<el-select v-model="searchData.CriterionGroup" clearable style="width:120px;">
<el-option
v-for="item of $d.CriterionGroup"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item
label="是否配置完成"
>
<el-select v-model="searchData.IsCompleteConfig" clearable style="width:120px;">
<el-option
v-for="item of $d.YesOrNo"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item
label="是否启用"
>
<el-select v-model="searchData.IsEnable" clearable style="width:120px;">
<el-option
v-for="item of $d.YesOrNo"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleReset"></el-button> <el-button type="primary" @click="handleReset"></el-button>
<el-button type="primary" @click="handleSearch"></el-button> <el-button type="primary" @click="handleSearch"></el-button>
@ -73,8 +25,6 @@
stripe stripe
size="small" size="small"
height="100" height="100"
@sort-change="handleSortByColumn"
ref="criterionsTbl"
> >
<el-table-column type="index" width="60" /> <el-table-column type="index" width="60" />
@ -82,33 +32,20 @@
prop="CriterionName" prop="CriterionName"
label="标准名称" label="标准名称"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
<el-table-column <el-table-column
prop="CriterionType" prop="CriterionType"
label="标准类型" label="标准类型"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('CriterionType',scope.row.CriterionType) }} {{ $fd('CriterionType',scope.row.CriterionType) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="CriterionGroup"
label="标准分组"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd('CriterionGroup',scope.row.CriterionGroup) }}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="IsCompleteConfig" prop="IsCompleteConfig"
label="是否配置完成" label="是否配置完成"
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -125,32 +62,22 @@
label="描述" label="描述"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column
prop="ShowOrder"
label="显示序号"
show-overflow-tooltip
/>
<el-table-column <el-table-column
prop="IsEnable" prop="IsEnable"
label="是否启用" label="是否启用"
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsEnable) }} {{ $fd('YesOrNo', scope.row.IsEnable) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="ShowOrder"
label="显示序号"
show-overflow-tooltip
sortable="custom"
/>
<el-table-column
prop="IseCRFShowInDicomReading"
label="eICRF仅展示阅片Tab"
show-overflow-tooltip
sortable="custom"
width="210"
>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IseCRFShowInDicomReading) }}
</template>
</el-table-column>
<el-table-column label="Action" min-width="200px"> <el-table-column label="Action" min-width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -245,14 +172,8 @@ import AddCriterion from './AddCriterion'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
CriterionName: '', CriterionName: '',
CriterionType: null,
CriterionGroup: null,
IsCompleteConfig: null,
IsEnable: null,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20
Asc: true,
SortField: ''
} }
} }
export default { export default {
@ -350,18 +271,6 @@ export default {
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault()
this.$refs['criterionsTbl'].clearSort()
this.getList()
},
//
handleSortByColumn(column) {
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false
}
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList() this.getList()
} }
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-loading="loading" style="min-height:400px;padding:20px"> <div v-loading="loading" style="min-height:400px;">
<el-form <el-form
v-if="isRender" v-if="isRender"
ref="questions" ref="questions"

View File

@ -6,10 +6,9 @@
size="small" size="small"
:disabled="type === 'look'" :disabled="type === 'look'"
:rules="rules" :rules="rules"
label-width="130px" label-width="120px"
> >
<div class="base-dialog-body" style="height: 550px; display:flex;flex-direction: column;"> <div class="base-dialog-body">
<div style="height: 150px;">
<el-form-item label="类型" prop="Type"> <el-form-item label="类型" prop="Type">
<el-select <el-select
v-model="form.Type" v-model="form.Type"
@ -17,10 +16,10 @@
> >
<el-option <el-option
v-for="item of $d.Criterion_Question_Type" v-for="item of $d.Criterion_Question_Type"
v-show="item.value !== 'class' && item.value !== 'group' && item.value !== 'table' && item.value !== 'basicTable'"
:key="item.value" :key="item.value"
:value="item.value" :value="item.value"
:label="item.label" :label="item.label"
:disabled="item.label === 'group' || item.label === 'table' || item.label === 'summary' || item.label === 'upload'"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -28,10 +27,6 @@
v-if="form.Type !== 'group'" v-if="form.Type !== 'group'"
label="问题名称" label="问题名称"
prop="QuestionName" prop="QuestionName"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: form.Type === 'summary' ? 300 : 100, message: `${this.$t('common:ruleMessage:maxLength')} ${form.Type === 'summary' ? 300 : 100}` }
]"
> >
<el-input <el-input
v-model="form.QuestionName" v-model="form.QuestionName"
@ -41,17 +36,165 @@
v-if="form.Type !== 'group'" v-if="form.Type !== 'group'"
label="问题名称EN" label="问题名称EN"
prop="QuestionEnName" prop="QuestionEnName"
:rules="[
{ max: form.Type === 'summary' ? 300 : 100, message: `${this.$t('common:ruleMessage:maxLength')} ${form.Type === 'summary' ? 300 : 100}` }
]"
> >
<el-input <el-input
v-model="form.QuestionEnName" v-model="form.QuestionEnName"
/> />
</el-form-item> </el-form-item>
</div> <!-- 选项类型 -->
<div style="flex: 1;overflow-y:auto;"> <el-form-item
<el-divider content-position="left">公有属性</el-divider> v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'input'"
label="选项类型"
prop="TableQuestionType"
:rules="[
{ required: form.Type !== 'input', message: '请选择'}
]"
>
<el-radio-group
v-model="form.TableQuestionType"
@change="((val)=>{tableQuestionTypeChange(val, form)})"
>
<el-radio
v-for="item of $d.TableQuestionType"
:key="item.id"
:label="item.value"
:disabled="form.Type === 'radio' && (item.value===1 || item.value===2)"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 0"
label="选项"
prop="TypeValue"
>
<el-input
v-model="form.TypeValue"
placeholder="选项请用‘|’分割多个选项"
/>
</el-form-item>
<!-- 关联表 -->
<!-- <el-form-item
v-if="form.TableQuestionType === 1"
label="关联表"
prop="DataTableName"
>
<el-select
v-model="form.DataTableName"
clearable
@change="((val)=>{dataTableNameChange(val, form)})"
>
<el-option
v-for="item of tblOptions"
:key="`RelevanceId${item.QuestionId}`"
:label="item.QuestionName"
:value="item.QuestionId"
/>
</el-select>
</el-form-item> -->
<el-form-item label="问题分类">
<!-- <el-radio-group v-model="form.QuestionClassify">
<el-radio v-for="item of $d.QuestionClassify" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group> -->
<el-select v-model="form.QuestionClassify" clearable>
<el-option
v-for="item of $d.QuestionClassify"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- 数值类型 -->
<el-form-item
v-if="form.Type === 'number' || form.Type === 'calculation'"
label="数值类型"
prop="ValueType"
:rules="[
{ required: true, message: '请选择'}
]"
>
<el-radio-group
v-model="form.ValueType"
>
<el-radio
v-for="item of $d.ValueType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 数值单位 -->
<el-form-item
v-if="form.Type === 'number' || form.Type === 'calculation'"
label="单位"
>
<el-radio-group
v-model="form.Unit"
>
<el-radio
v-for="item of $d.ValueUnit"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 关联字段 -->
<el-form-item
v-if="form.TableQuestionType === 2"
label="关联问题"
prop="DependParentId"
>
<el-select
v-model="form.DependParentId"
>
<el-option
v-for="item of parentOptions"
:key="`DependParentId${item.QuestionId}`"
:label="item.QuestionName"
:value="item.QuestionId"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 1 || !!form.DependParentId"
label="关联字段"
prop="DataTableColumn"
>
<el-select v-model="form.DataTableColumn">
<el-option
v-for="item of CriterionDictionaryList.OrganColumn"
:key="item.Id"
:label="item.ValueCN"
:value="item.Code"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 3 || form.TableQuestionType === 2"
label="关联字典"
prop="DictionaryCode"
:rules="[{ required: form.TableQuestionType === 3, message: '请选择', trigger: 'blur' }]"
>
<el-select v-model="form.DictionaryCode">
<el-option
v-for="item of dicList"
:key="item.Id"
:label="item.Code"
:value="item.Code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.Type !== 'group'" label="是否显示" prop="ShowQuestion"> <el-form-item v-if="form.Type !== 'group'" label="是否显示" prop="ShowQuestion">
<el-radio-group <el-radio-group
v-model="form.ShowQuestion" v-model="form.ShowQuestion"
@ -93,11 +236,11 @@
v-for="item of parentTriggerValOptions" v-for="item of parentTriggerValOptions"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="String(item.value)" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="form.Type !== 'group' && form.Type !== 'table' && form.Type !== 'basicTable' && form.Type !== 'summary'" label="是否必填" prop="IsRequired"> <el-form-item v-if="form.Type !== 'group' && form.Type !== 'table'" label="是否必填" prop="IsRequired">
<el-radio-group <el-radio-group
v-model="form.IsRequired" v-model="form.IsRequired"
:disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2" :disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2"
@ -142,219 +285,35 @@
v-for="item of reParentTriggerValOptions" v-for="item of reParentTriggerValOptions"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="String(item.value)"
/>
</el-select>
</el-form-item>
<!-- 导出标识 -->
<!-- <el-form-item
:label="$t('trials:readingUnit:qsList:title:ExportIdentification')" prop="ExportIdentification"
v-if="form.Type === 'radio' || form.Type === 'select' || form.Type === 'input' || form.Type === 'textarea' || form.Type === 'number' || form.Type === 'class' || form.Type === 'calculation'"
>
<el-radio-group
v-model="form.ExportIdentification"
@change="
(val) => {
form.ExportResult = []
}
"
>
<el-radio
v-for="item of $d.ExportIdentification"
:key="`ExportIdentification${item.value}`"
:label="item.value"
>{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item> -->
<!-- 导出结果 -->
<el-form-item
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
v-if="form.Type === 'radio' || form.Type === 'select' || form.Type === 'input' || form.Type === 'textarea' || form.Type === 'number' || form.Type === 'class' || form.Type === 'calculation'"
>
<el-select v-model="form.ExportResult" multiple>
<el-option
v-for="item in CriterionDictionaryList.ExportResult"
:key="`ExportResult${item.value}`"
:value="parseInt(item.Code)"
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="限制编辑"
v-if="form.Type !== 'summary'"
prop="LimitEdit"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group v-model="form.LimitEdit">
<el-radio v-for="item of $d.LimitEdit" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.Type !== 'group' && form.Type !== 'summary'"
label="问题标识"
prop="QuestionMark"
>
<el-select
v-model="form.QuestionMark"
clearable
>
<el-option
v-for="item of CriterionDictionaryList.QuestionMark"
:key="item.Id"
:value="parseInt(item.Code)"
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
/>
</el-select>
</el-form-item>
<el-form-item
label="注释"
prop="Remark"
>
<el-input v-model="form.Remark" />
</el-form-item>
<el-form-item
label="序号"
prop="ShowOrder"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-input-number
v-model="form.ShowOrder"
controls-position="right"
:min="0"
/>
</el-form-item>
<el-form-item label="重复出现最大次数" v-if="form.Type !== 'summary' && form.Type !== 'screenshot' && form.Type !== 'upload'">
<el-input-number
v-model="form.MaxRowCount"
controls-position="right"
:min="0"
:max="10"
/>
</el-form-item>
<el-form-item label="问题分类" v-if="criterionType === 2">
<el-select v-model="form.QuestionClassify" clearable>
<el-option
v-for="item of $d.QuestionClassify"
:key="item.id"
:label="item.label"
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-divider content-position="left">私有属性</el-divider>
<!-- 选项类型 -->
<el-form-item <el-form-item
v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'input'" v-if="form.Type !== 'group'"
label="选项类型" label="问题标识"
prop="TableQuestionType" prop="QuestionMark"
:rules="[
{ required: form.Type !== 'input', message: '请选择'}
]"
>
<el-radio-group
v-model="form.TableQuestionType"
@change="((val)=>{tableQuestionTypeChange(val, form)})"
>
<el-radio
v-for="item of $d.TableQuestionType"
:key="item.id"
:label="item.value"
:disabled="(form.Type === 'radio' && (item.value===1 || item.value===2)) || (form.Type === 'input' && (item.value===0 || item.value===3))"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 0 || form.Type === 'class'"
label="选项"
prop="TypeValue"
>
<el-input
v-model="form.TypeValue"
placeholder="选项请用‘|’分割多个选项"
@change="typeValueChange"
/>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 2"
label="关联问题"
prop="DependParentId"
> >
<el-select <el-select
v-model="form.DependParentId" v-model="form.QuestionMark"
> >
<el-option <el-option
v-for="item of parentOptions" v-for="item of CriterionDictionaryList.QuestionMark"
:key="`DependParentId${item.QuestionId}`"
:label="item.QuestionName"
:value="item.QuestionId"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="form.TableQuestionType === 1 || !!form.DependParentId"
label="关联字段"
prop="DataTableColumn"
>
<el-select v-model="form.DataTableColumn">
<el-option
v-for="item of CriterionDictionaryList.OrganColumn"
:key="item.Id" :key="item.Id"
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value" :value="parseInt(item.Code)"
:value="item.Code" :label="item.ValueCN"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item
v-if="form.TableQuestionType === 3 || form.TableQuestionType === 2" <el-form-item v-if="form.Type === 'upload'" label="最大上传个数">
label="关联字典" <el-input-number
prop="DictionaryCode" v-model="form.ImageCount"
:rules="[{ required: form.TableQuestionType === 3, message: '请选择', trigger: 'blur' }]" controls-position="right"
> :min="1"
<el-select v-model="form.DictionaryCode"> :max="10"
<el-option
v-for="item of dicList"
:key="item.Id"
:label="item.Code"
:value="item.Code"
/> />
</el-select>
</el-form-item>
<el-form-item v-if="form.TableQuestionType === 3" label="默认值">
<el-select v-model="form.DefaultValue" clearable>
<!-- <el-option
v-for="item of form.DictionaryCode ? $d[form.DictionaryCode] : []"
:key="item.id"
:label="item.label"
:value="item.value.toString()"
/> -->
<el-option
v-for="item of highlightAnswers"
:key="item.Id"
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
:value="item.Code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.TableQuestionType === 0" label="默认值">
<el-select v-model="form.DefaultValue" clearable>
<el-option
v-for="item of form.TypeValue ? form.TypeValue.split('|') : []"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" label="高亮标记值" prop="HighlightAnswerList"> <el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" label="高亮标记值" prop="HighlightAnswerList">
<el-select v-model="form.HighlightAnswerList" clearable multiple> <el-select v-model="form.HighlightAnswerList" clearable multiple>
@ -367,182 +326,40 @@
/> />
</template> </template>
<template v-else-if="form.DictionaryCode"> <template v-else-if="form.DictionaryCode">
<!-- <el-option <el-option
v-for="item of $d[form.DictionaryCode]" v-for="item of $d[form.DictionaryCode]"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="item.value.toString()" :value="item.value.toString()"
/> -->
<el-option
v-for="item of highlightAnswers"
:key="item.Id"
:label="$i18n.locale === 'zh' ? item.ValueCN : item.Value"
:value="item.Code"
/> />
</template> </template>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="序号" prop="ShowOrder">
v-if="form.Type === 'input' || form.Type === 'textarea'"
label="最大长度"
prop="MaxAnswerLength"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }
]"
>
<el-input-number v-model="form.MaxAnswerLength" :min="0"></el-input-number>
</el-form-item>
<!-- 是否复制前值 -->
<!-- <el-form-item
label="是否复制前值"
v-if="form.Type !== 'summary'"
prop="IsCopy"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-switch
v-model="form.IsCopy"
/>
</el-form-item> -->
<!-- 数值类型 -->
<el-form-item
v-if="form.Type === 'number' || form.Type === 'calculation'"
label="数值类型"
prop="ValueType"
:rules="[
{ required: true, message: '请选择'}
]"
>
<el-radio-group
v-model="form.ValueType"
>
<el-radio
v-for="item of $d.ValueType"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<!-- 数值单位 -->
<el-form-item
v-if="form.Type === 'number' || form.Type === 'calculation'"
label="单位"
prop="Unit"
:rules="[
{ required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' }
]"
>
<el-radio-group
v-model="form.Unit"
>
<el-radio
v-for="item of $d.ValueUnit"
:key="item.id"
:label="item.value"
>
{{ item.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="form.Type === 'upload'"
label="最大上传个数"
prop="ImageCount"
>
<el-input-number <el-input-number
v-model="form.ImageCount" v-model="form.ShowOrder"
controls-position="right"
:min="0"
/>
</el-form-item>
<el-form-item label="重复出现最大次数">
<el-input-number
v-model="form.MaxRowCount"
controls-position="right" controls-position="right"
:min="0" :min="0"
:max="10" :max="10"
/> />
</el-form-item> </el-form-item>
<!-- 文件类型 --> <el-form-item label="限制编辑">
<el-form-item <el-radio-group v-model="form.LimitEdit">
v-if="form.Type === 'upload'" <el-radio v-for="item of $d.LimitEdit" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
label="文件类型" </el-radio-group>
prop="FileType"
:rules="[{ type: 'array', required: true, message: this.$t('common:ruleMessage:specify'), trigger: [ 'change'] }]"
>
<el-checkbox-group
v-model="form.FileType"
@change="(v) => {
if (v && v.includes('-1')) {
form.FileType = ['-1']
}
}"
>
<el-checkbox
v-for="item of $d.fileType"
:key="`fileType${item.value}`"
:value="item.value + ''"
:label="item.value"
:disabled="form.FileType && form.FileType.includes('-1') && item.value !== '-1'"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
</el-form-item> </el-form-item>
<!-- 分类 --> <!-- <el-form-item label="全局阅片是否显示">
<el-form-item <el-radio-group v-model="form.GlobalReadingShowType">
v-if="form.Type === 'class'" <el-radio v-for="item of $d.GlobalReadingShowType" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
label="分类数据来源" </el-radio-group>
prop="ClassifyTableQuestionId" </el-form-item> -->
>
<el-select v-model="form.ClassifyTableQuestionId" clearable>
<el-option v-for="item of Questions" :key="item.Id" :label="item.QuestionName"
:value="item.Id"/>
</el-select>
</el-form-item>
<el-form-item
v-if="form.Type === 'class'"
label="分类算法"
prop="ClassifyAlgorithms"
>
<div>
<el-table
ref="CalculateTable"
:data="ClassifyAlgorithmsList"
style="margin: 10px;width: 100%"
size="small"
>
<!-- 运算类型 -->
<el-table-column
:label="$t('trials:readingUnit:label:label')"
show-overflow-tooltip
min-width="70"
>
<template slot-scope="scope">
{{ scope.row.label }}
</template>
</el-table-column>
<!-- 运算类型 -->
<el-table-column
:label="$t('trials:readingUnit:label:gt')"
show-overflow-tooltip
min-width="128"
>
<template slot-scope="scope">
<el-input-number v-model="scope.row.gt"></el-input-number>
</template>
</el-table-column>
<!-- 运算类型 -->
<el-table-column
:label="$t('trials:readingUnit:label:lt')"
show-overflow-tooltip
min-width="128"
>
<template slot-scope="scope">
<el-input-number v-model="scope.row.lt"></el-input-number>
</template>
</el-table-column>
</el-table>
</div>
</el-form-item>
</div>
</div> </div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-form-item> <el-form-item>
@ -564,7 +381,7 @@
</template> </template>
<script> <script>
import { addOrUpdateReadingTableQuestionSystem, getReadingTableOtherQuestionSystem } from '@/api/trials' import { addOrUpdateReadingTableQuestionSystem, getReadingTableOtherQuestionSystem } from '@/api/trials'
import { getBasicConfigSelect, getCriterionDictionaryList, getCriterionDictionary, getSystemCalculateTableQuestions } from '@/api/dictionary' import { getBasicConfigSelect, getCriterionDictionaryList, getCriterionDictionary } from '@/api/dictionary'
export default { export default {
name: 'AddOrUpdateTableQs', name: 'AddOrUpdateTableQs',
@ -581,10 +398,6 @@ export default {
type: String, type: String,
required: true required: true
}, },
criterionType: {
type: Number,
required: true
},
type: { type: {
type: String, type: String,
required: true required: true
@ -605,7 +418,6 @@ export default {
} }
} }
return { return {
ClassifyAlgorithmsList: [],
form: { form: {
Id: '', Id: '',
ReadingQuestionId: '', ReadingQuestionId: '',
@ -618,8 +430,8 @@ export default {
ParentId: '', ParentId: '',
ParentTriggerValue: '', ParentTriggerValue: '',
ShowOrder: 0, ShowOrder: 0,
ShowQuestion: 0, ShowQuestion: null,
IsRequired: 2, IsRequired: true,
Remark: '', Remark: '',
RelevanceId: '', RelevanceId: '',
RelevanceValue: '', RelevanceValue: '',
@ -635,24 +447,16 @@ export default {
LimitEdit: 0, LimitEdit: 0,
// GlobalReadingShowType: null, // GlobalReadingShowType: null,
QuestionClassify: null, QuestionClassify: null,
HighlightAnswerList: [], HighlightAnswerList: []
MaxAnswerLength: null,
IsCopy: false,
FileType: [],
ImageCount: 0,
ClassifyTableQuestionId: null,
ClassifyAlgorithms: null,
// ExportIdentification: 0,
ExportResult: [],
DefaultValue:null
// IsEnable: true // IsEnable: true
}, },
rules: { rules: {
Type: [ Type: [
{ required: true, message: '请选择', trigger: 'blur' } { required: true, message: '请选择', trigger: 'blur' }
], ],
// QuestionName: [{ required: true, message: '', trigger: 'blur' }, QuestionName: [{ required: true, message: '请注明', trigger: 'blur' },
// { max: 300, message: ' 300' }], { max: 300, message: '最大长度为 300' }],
TypeValue: [{ required: true, message: '请注明', trigger: 'blur' }, TypeValue: [{ required: true, message: '请注明', trigger: 'blur' },
{ validator: validateTypeVal, trigger: 'blur' }, { validator: validateTypeVal, trigger: 'blur' },
@ -668,13 +472,7 @@ export default {
DataTableName: [{ required: true, message: '请选择', trigger: 'blur' }], DataTableName: [{ required: true, message: '请选择', trigger: 'blur' }],
DataTableColumn: [{ required: true, message: '请选择', trigger: 'blur' }], DataTableColumn: [{ required: true, message: '请选择', trigger: 'blur' }],
// DictionaryCode: [{ required: true, message: '', trigger: 'blur' }], // DictionaryCode: [{ required: true, message: '', trigger: 'blur' }],
DependParentId: [{ required: true, message: '请选择', trigger: 'blur' }], DependParentId: [{ required: true, message: '请选择', trigger: 'blur' }]
// ExportIdentification: [
// { required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' },
// ],
// ExportResult: [
// { required: true, message: this.$t('common:ruleMessage:select'), trigger: 'blur' },
// ]
}, },
loading: false, loading: false,
parentOptions: [], parentOptions: [],
@ -683,65 +481,18 @@ export default {
tblOptions: [], tblOptions: [],
colOptions: [], colOptions: [],
dicList: [], dicList: [],
CriterionDictionaryList: [], CriterionDictionaryList: []
Questions: [],
highlightAnswers: []
} }
}, },
watch: {
'form.DictionaryCode': {
deep: true,
immediate: true,
async handler(v, oldv) {
try {
if (!v) {
this.highlightAnswers = []
return
}
let res = await getCriterionDictionary({
ReadingCriterionId: this.criterionId,
DictionaryCode: this.form.DictionaryCode,
})
this.highlightAnswers = res.Result[this.form.DictionaryCode]
} catch (e) {
console.log(e)
}
},
},
},
mounted() { mounted() {
this.initForm() this.initForm()
this.getCriterionDictionary() this.getCriterionDictionary()
this.getCalculateQuestions('number')
}, },
methods: { methods: {
typeValueChange(v) {
this.form.DefaultValue = null
var list = v.split('|')
this.form.ClassifyAlgorithms = null
var arr = Object.assign([], this.ClassifyAlgorithmsList)
this.ClassifyAlgorithmsList = list.map((res, i) => {
return {
label: res,
lt: arr[i] ? arr[i].lt : 0,
gt: arr[i] ? arr[i].gt : 0
}
})
},
getCalculateQuestions(type) {
getSystemCalculateTableQuestions({
questionId: this.readingQuestionId,
type: type
}).then(res => {
if (type === 'number') {
this.Questions = res.Result
}
})
},
getCriterionDictionary() { getCriterionDictionary() {
getCriterionDictionary({ getCriterionDictionary({
ReadingCriterionId: this.criterionId, ReadingCriterionId: this.criterionId,
DictionaryCodeList: ['QuestionMark', 'OrganColumn', 'ExportResult'] DictionaryCodeList: ['QuestionMark', 'OrganColumn']
}).then(res => { }).then(res => {
this.CriterionDictionaryList = res.Result this.CriterionDictionaryList = res.Result
}) })
@ -752,15 +503,9 @@ export default {
if (Object.keys(this.data).length > 0) { if (Object.keys(this.data).length > 0) {
for (const k in this.form) { for (const k in this.form) {
if (this.data.hasOwnProperty(k)) { if (this.data.hasOwnProperty(k)) {
if (k === 'ClassifyAlgorithms' && this.data[k] !== undefined && this.data[k] !== '') {
this.ClassifyAlgorithmsList = JSON.parse(this.data[k])
} else if(k === 'FileType'){
this.form[k] = this.data[k].split(',')
} else {
this.form[k] = this.data[k] this.form[k] = this.data[k]
} }
} }
}
if (this.form.ParentId) { if (this.form.ParentId) {
var index = this.parentOptions.findIndex(item => { var index = this.parentOptions.findIndex(item => {
@ -768,13 +513,7 @@ export default {
}) })
if (index !== -1) { if (index !== -1) {
if (this.parentOptions[index].QuestionGenre === 3) { if (this.parentOptions[index].QuestionGenre === 3) {
// this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode] this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
let dicCode = this.parentOptions[index].DictionaryCode
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
this.parentTriggerValOptions = res.Result[dicCode].map(i=>{
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
})
} else { } else {
const options = [] const options = []
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => { this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
@ -790,12 +529,8 @@ export default {
}) })
if (i !== -1) { if (i !== -1) {
if (this.parentOptions[i].QuestionGenre === 3) { if (this.parentOptions[i].QuestionGenre === 3) {
// this.reParentTriggerValOptions = this.$d[this.parentOptions[i].DictionaryCode] console.log(this.$d[this.parentOptions[i].DictionaryCode])
let dicCode = this.parentOptions[i].DictionaryCode this.reParentTriggerValOptions = this.$d[this.parentOptions[i].DictionaryCode]
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
this.reParentTriggerValOptions = res.Result[dicCode].map(i=>{
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
})
} else { } else {
const options = [] const options = []
this.parentOptions[i].TypeValue.split('|').forEach((item, index) => { this.parentOptions[i].TypeValue.split('|').forEach((item, index) => {
@ -811,15 +546,9 @@ export default {
this.$refs.tableQsForm.validate(valid => { this.$refs.tableQsForm.validate(valid => {
if (!valid) return if (!valid) return
this.loading = true this.loading = true
this.form.ClassifyAlgorithms = JSON.stringify(this.ClassifyAlgorithmsList)
this.form.SystemCriterionId = this.criterionId this.form.SystemCriterionId = this.criterionId
this.form.ReadingQuestionId = this.readingQuestionId this.form.ReadingQuestionId = this.readingQuestionId
var params = Object.assign({}, this.form) addOrUpdateReadingTableQuestionSystem(this.form).then(res => {
if (this.form.Type !== 'upload') {
this.form.ImageCount = 0
}
params.FileType = this.form.FileType.join(',')
addOrUpdateReadingTableQuestionSystem(params).then(res => {
this.$emit('getList') this.$emit('getList')
this.loading = false this.loading = false
this.$emit('close') this.$emit('close')
@ -873,20 +602,14 @@ export default {
form.RelevanceValue = '' form.RelevanceValue = ''
} }
}, },
async parentQuestionChange(val, form) { parentQuestionChange(val, form) {
if (val) { if (val) {
var index = this.parentOptions.findIndex(item => { var index = this.parentOptions.findIndex(item => {
return item.QuestionId === val return item.QuestionId === val
}) })
if (index !== -1) { if (index !== -1) {
if (this.parentOptions[index].QuestionGenre === 3) { if (this.parentOptions[index].QuestionGenre === 3) {
// this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode] this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
let dicCode = this.parentOptions[index].DictionaryCode
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
this.parentTriggerValOptions = res.Result[dicCode].map(i=>{
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
})
} else { } else {
const options = [] const options = []
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => { this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
@ -898,20 +621,16 @@ export default {
} }
form.ParentTriggerValue = '' form.ParentTriggerValue = ''
}, },
async relevanceQuestionChange(val, form) { relevanceQuestionChange(val, form) {
if (val) { if (val) {
var index = this.parentOptions.findIndex(item => { var index = this.parentOptions.findIndex(item => {
return item.QuestionId === val return item.QuestionId === val
}) })
console.log(this.$d[this.parentOptions[index].DictionaryCode], this.parentOptions[index].QuestionGenre)
if (index !== -1) { if (index !== -1) {
if (this.parentOptions[index].QuestionGenre === 3) { if (this.parentOptions[index].QuestionGenre === 3) {
// this.reParentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode] console.log(this.$d[this.parentOptions[index].DictionaryCode])
let dicCode = this.parentOptions[index].DictionaryCode this.reParentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
let res = await getCriterionDictionary({ReadingCriterionId: this.criterionId, DictionaryCode: dicCode})
this.reParentTriggerValOptions = res.Result[dicCode].map(i=>{
return {id: i.Id, label: this.$i18n.locale === 'zh' ? i.ValueCN : i.Value, value: i.Code}
})
} else { } else {
const options = [] const options = []
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => { this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
@ -942,35 +661,14 @@ export default {
form.DataTableColumn = '' form.DataTableColumn = ''
}, },
qsTypeChange(val, form) { qsTypeChange(val, form) {
if (val === 'number' || val === 'calculation') {
form.Unit = 0
} else {
form.Unit = null
}
if (val === 'input' || val === 'textarea') {
form.MaxAnswerLength = 500
} else {
form.MaxAnswerLength = null
}
form.TypeValue = '' form.TypeValue = ''
form.ValueType = '' form.ValueType = ''
form.IsRequired = 2 form.Unit = ''
form.TableQuestionType = null form.TableQuestionType = null
form.DependParentId = '' form.DependParentId = ''
form.DataTableColumn = '' form.DataTableColumn = ''
form.DataTableName = '' form.DataTableName = ''
form.DictionaryCode = '' form.DictionaryCode = ''
form.MaxRowCount = null
form.QuestionClassify = null
form.HighlightAnswerList = []
form.IsCopy = false
form.FileType = []
form.ImageCount = null
form.ClassifyTableQuestionId = null
form.ClassifyAlgorithms = null
// form.ExportIdentification = 0
form.ExportResult = []
form.DefaultValue = null
}, },
close() { close() {
this.$emit('close') this.$emit('close')

View File

@ -27,12 +27,12 @@
/> />
<el-table-column <el-table-column
prop="QuestionName" prop="QuestionName"
label="问题名称" label="名称"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="QuestionEnName" prop="QuestionEnName"
label="问题名称(EN)" label="名称(EN)"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
@ -44,7 +44,7 @@
{{ $fd('Criterion_Question_Type',scope.row.Type) }} {{ $fd('Criterion_Question_Type',scope.row.Type) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column <el-table-column
prop="TableQuestionType" prop="TableQuestionType"
label="选项类型" label="选项类型"
show-overflow-tooltip show-overflow-tooltip
@ -60,7 +60,20 @@
show-overflow-tooltip show-overflow-tooltip
min-width="110" min-width="110"
/> />
--> <el-table-column
prop="DependShowOrder"
label="关联问题"
show-overflow-tooltip
/>
<el-table-column
prop="DataTableColumn"
label="关联字段"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('OrganColumn',scope.row.DataTableColumn) }}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="ShowQuestion" prop="ShowQuestion"
label="是否显示" label="是否显示"
@ -81,7 +94,7 @@
{{ $fd('QuestionRequired',scope.row.IsRequired) }} {{ $fd('QuestionRequired',scope.row.IsRequired) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column <el-table-column
prop="IsJudgeQuestion" prop="IsJudgeQuestion"
label="是否裁判问题" label="是否裁判问题"
show-overflow-tooltip show-overflow-tooltip
@ -89,8 +102,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('YesOrNo',scope.row.IsJudgeQuestion) }} {{ $fd('YesOrNo',scope.row.IsJudgeQuestion) }}
</template> </template>
</el-table-column> --> </el-table-column>
<!-- <el-table-column <el-table-column
prop="ParentQuestionShowOrder" prop="ParentQuestionShowOrder"
label="显示依赖父问题" label="显示依赖父问题"
min-width="90" min-width="90"
@ -111,64 +124,8 @@
prop="RelevanceValue" prop="RelevanceValue"
label="必填触发值" label="必填触发值"
show-overflow-tooltip show-overflow-tooltip
/> -->
<!-- 导出标识 -->
<!-- <el-table-column
prop="ExportIdentification"
:label="$t('trials:readingUnit:qsList:title:ExportIdentification')"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('ExportIdentification', scope.row.ExportIdentification) }}
</template>
</el-table-column> -->
<!-- 问题标识 -->
<el-table-column
prop="QuestionMark"
label="问题标识"
width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('QuestionMark', scope.row.QuestionMark) }}
</template>
</el-table-column>
<!-- 导出目标表格 -->
<el-table-column
prop="ExportResult"
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ getStringResult(scope.row.ExportResult, 'ExportResult') }}
</template>
</el-table-column>
<!-- 限制编辑 -->
<el-table-column
prop="LimitEdit"
:label="$t('trials:readingUnit:qsList:title:limitEdit')"
width="160"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('LimitEdit', scope.row.LimitEdit) }}
</template>
</el-table-column>
<!-- <el-table-column
prop="DependShowOrder"
label="关联问题"
show-overflow-tooltip
/> />
<el-table-column <el-table-column
prop="DataTableColumn"
label="关联字段"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('OrganColumn',scope.row.DataTableColumn) }}
</template>
</el-table-column> -->
<!-- <el-table-column
prop="ImageCount" prop="ImageCount"
label="最大上传个数" label="最大上传个数"
show-overflow-tooltip show-overflow-tooltip
@ -177,7 +134,6 @@
{{ scope.row.Type === 'upload'?scope.row.ImageCount:'' }} {{ scope.row.Type === 'upload'?scope.row.ImageCount:'' }}
</template> </template>
</el-table-column> </el-table-column>
-->
<el-table-column <el-table-column
prop="MaxRowCount" prop="MaxRowCount"
label="最大行数" label="最大行数"
@ -228,7 +184,7 @@
:visible.sync="addOrEdit.visible" :visible.sync="addOrEdit.visible"
:close-on-click-modal="false" :close-on-click-modal="false"
:title="addOrEdit.title" :title="addOrEdit.title"
width="650px" width="600px"
append-to-body append-to-body
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
@ -238,7 +194,6 @@
:type="type" :type="type"
:reading-question-id="readingQuestionId" :reading-question-id="readingQuestionId"
:criterion-id="criterionId" :criterion-id="criterionId"
:criterionType="criterionType"
@close="addOrEdit.visible = false" @close="addOrEdit.visible = false"
@getList="getList" @getList="getList"
/> />
@ -270,11 +225,7 @@ export default {
criterionId: { criterionId: {
type: String, type: String,
required: true required: true
}, }
criterionType: {
type: Number,
required: true
},
}, },
data() { data() {
@ -334,11 +285,6 @@ export default {
}).catch(() => { this.loading = false }) }).catch(() => { this.loading = false })
}) })
}, },
getStringResult(arr, dictionaryCode) {
let newArr = arr.map(i => this.$fd(dictionaryCode, i))
let delimiter = this.$i18n.locale === 'zh' ? '' : ', '
return newArr.join(delimiter)
},
// //
handleSearch() { handleSearch() {
this.getList() this.getList()

View File

@ -23,17 +23,6 @@
<el-input style="width: 300px" v-model="form.EmailTopic" /> <el-input style="width: 300px" v-model="form.EmailTopic" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="邮件延时发送s数" prop="EmailDelaySeconds">
<el-input
v-model.number="form.EmailDelaySeconds"
style="width: 300px"
type="number"
clearable
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="业务层级" prop="BusinessLevelEnum"> <el-form-item label="业务层级" prop="BusinessLevelEnum">
<el-select v-model="form.BusinessLevelEnum" clearable class="mr"> <el-select v-model="form.BusinessLevelEnum" clearable class="mr">
@ -70,7 +59,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="systemLevel !== 1">
<el-form-item label="收件人" prop="ToUserTypeList"> <el-form-item label="收件人" prop="ToUserTypeList">
<el-select <el-select
v-model="form.ToUserTypeList" v-model="form.ToUserTypeList"
@ -87,7 +76,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="抄送人" prop="CopyUserTypeList"> <el-form-item label="抄送人" prop="CopyUserTypeList">
<el-select <el-select
v-model="form.CopyUserTypeList" v-model="form.CopyUserTypeList"
@ -104,13 +93,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="加急状态" prop="EmailUrgentEnum"> <el-form-item label="加急状态" prop="EmailUrgentEnum">
<el-select <el-select
v-model="form.EmailUrgentEnum" v-model="form.EmailUrgentEnum"
@change=" @change="
(v) => { (v) => {
v === 1 ? (form.EmailCron = null) : null v === 1 ? (form.EmailCron = null) : null;
} }
" "
clearable clearable
@ -125,7 +114,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item <el-form-item
label="发送周期和时间" label="发送周期和时间"
v-if="form.EmailUrgentEnum !== 1" v-if="form.EmailUrgentEnum !== 1"
@ -135,7 +124,7 @@
<el-button type="primary" @click="showDialog"> cron</el-button> <el-button type="primary" @click="showDialog"> cron</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="是否需要回执" prop="IsReturnRequired"> <el-form-item label="是否需要回执" prop="IsReturnRequired">
<el-radio-group v-model="form.IsReturnRequired"> <el-radio-group v-model="form.IsReturnRequired">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -143,7 +132,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="是否自动发送" prop="IsAutoSend"> <el-form-item label="是否自动发送" prop="IsAutoSend">
<el-radio-group v-model="form.IsAutoSend"> <el-radio-group v-model="form.IsAutoSend">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -151,13 +140,13 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="systemLevel"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria"> <el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
<el-radio-group <el-radio-group
v-model="form.IsDistinguishCriteria" v-model="form.IsDistinguishCriteria"
@change=" @change="
() => { () => {
form.CriterionTypeEnum = null form.CriterionTypeEnum = null;
} }
" "
> >
@ -166,7 +155,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item <el-form-item
:label="$t('trials:auditRecord:table:criterion')" :label="$t('trials:auditRecord:table:criterion')"
v-if="form.IsDistinguishCriteria" v-if="form.IsDistinguishCriteria"
@ -182,7 +171,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="是否启用" prop="IsEnable"> <el-form-item label="是否启用" prop="IsEnable">
<el-radio-group v-model="form.IsEnable"> <el-radio-group v-model="form.IsEnable">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
@ -190,7 +179,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="附件CN" prop="IsEnable"> <el-form-item label="附件CN" prop="IsEnable">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
@ -207,12 +196,12 @@
size="small" size="small"
type="primary" type="primary"
:disabled="fileListCN.length > 0" :disabled="fileListCN.length > 0"
>{{ $t('common:button:upload') }}</el-button >{{ $t("common:button:upload") }}</el-button
> >
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="!systemLevel">
<el-form-item label="附件EN" prop="IsEnable"> <el-form-item label="附件EN" prop="IsEnable">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
@ -229,49 +218,25 @@
size="small" size="small"
type="primary" type="primary"
:disabled="fileListEN.length > 0" :disabled="fileListEN.length > 0"
>{{ $t('common:button:upload') }}</el-button >{{ $t("common:button:upload") }}</el-button
> >
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item <el-form-item label="邮件内容模版CN" prop="EmailHtmlContentCN">
label="邮件内容模版CN"
prop="EmailHtmlContentCN"
style="position: relative"
>
<el-input <el-input
v-model="form.EmailHtmlContentCN" v-model="form.EmailHtmlContentCN"
type="textarea" type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }" :autosize="{ minRows: 8, maxRows: 8 }"
/> />
<el-button
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text"
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px"
>
{{ $t('common:button:preview') }}
</el-button>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="邮件内容模版EN" prop="EmailHtmlContent">
label="邮件内容模版EN"
prop="EmailHtmlContent"
style="position: relative"
>
<el-input <el-input
v-model="form.EmailHtmlContent" v-model="form.EmailHtmlContent"
type="textarea" type="textarea"
:autosize="{ minRows: 8, maxRows: 8 }" :autosize="{ minRows: 8, maxRows: 8 }"
/> />
<el-button
:disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text"
@click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px"
>
{{ $t('common:button:preview') }}
</el-button>
</el-form-item> </el-form-item>
<div <div
class="base-dialog-footer" class="base-dialog-footer"
@ -294,234 +259,219 @@
</el-form> </el-form>
</template> </template>
<script> <script>
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary' import { Upload, addOrUpdateEmailNoticeConfigList } from "@/api/dictionary";
import vcrontab from 'vcrontab'
export default { export default {
props: { props: {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
}, },
}, },
systemLevel: { systemLevel: {
type: Number, type: Number,
default() { default() {
return 0 return 0;
},
},
isDistinguishCriteria: {
type: Boolean,
default() {
return false
}, },
}, },
}, },
components: { vcrontab },
data() { data() {
return { return {
expression: '', expression: "",
showCron: false, showCron: false,
form: { form: {
Id: '', Id: "",
Code: '', Code: "",
EmailTopicCN: '', EmailTopicCN: "",
EmailTopic: '', EmailTopic: "",
BusinessLevelEnum: '', BusinessLevelEnum: "",
BusinessModuleEnum: '', BusinessModuleEnum: "",
ToUserTypeList: '', ToUserTypeList: "",
CopyUserTypeList: '', CopyUserTypeList: "",
EmailUrgentEnum: '', EmailUrgentEnum: "",
EmailCron: '', EmailCron: "",
BusinessScenarioEnum: null, BusinessScenarioEnum: null,
EmailHtmlContentCN: '', EmailHtmlContentCN: "",
EmailHtmlContent: '', EmailHtmlContent: "",
AttachPath: '', AttachPath: "",
AttachName: '', AttachName: "",
AttachNameCN: '', AttachNameCN: "",
AttachCNPath: '', AttachCNPath: "",
IsDistinguishCriteria: true, IsDistinguishCriteria: true,
IsReturnRequired: true, IsReturnRequired: true,
IsUrgent: true, IsUrgent: true,
IsEnable: true, IsEnable: true,
IsAutoSend: true, IsAutoSend: true,
CriterionTypeEnum: null, CriterionTypeEnum: null,
EmailDelaySeconds: null,
}, },
rules: { rules: {
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }], Code: [{ required: true, message: "Please select", trigger: ["blur"] }],
BusinessScenarioEnum: [ BusinessScenarioEnum: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
EmailTopicCN: [ EmailTopicCN: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
EmailTopic: [ EmailTopic: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
BusinessLevelEnum: [ BusinessLevelEnum: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
],
ToUserTypeList: [
{ required: true, message: "Please select", trigger: ["blur"] },
],
EmailCron: [
{ required: true, message: "Please select", trigger: ["blur"] },
], ],
// ToUserTypeList: [
// { required: true, message: 'Please select', trigger: ['blur'] },
// ],
// EmailCron: [
// { required: true, message: 'Please select', trigger: ['blur'] },
// ],
EmailUrgentEnum: [ EmailUrgentEnum: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
EmailHtmlContentCN: [ EmailHtmlContentCN: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
EmailHtmlContent: [ EmailHtmlContent: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
CriterionTypeEnum: [ CriterionTypeEnum: [
{ required: true, message: 'Please select', trigger: ['blur'] }, { required: true, message: "Please select", trigger: ["blur"] },
], ],
}, },
scenarioOption: [], scenarioOption: [],
fileListCN: [], fileListCN: [],
fileListEN: [], fileListEN: [],
loading: false, loading: false,
} };
}, },
mounted() { mounted() {
this.initForm() this.initForm();
if (this.systemLevel) { if (this.systemLevel) {
if (this.systemLevel === 1) { if (this.systemLevel === 1) {
this.form.ToUserTypeList = [] this.form.ToUserTypeList = [];
} }
this.form.CopyUserTypeList = [] this.form.CopyUserTypeList = [];
this.form.EmailUrgentEnum = 3 this.form.EmailUrgentEnum = "3";
this.form.IsReturnRequired = false this.form.IsReturnRequired = false;
this.form.IsDistinguishCriteria = false this.form.IsDistinguishCriteria = false;
} else {
this.form.IsDistinguishCriteria = this.isDistinguishCriteria
} }
}, },
methods: { methods: {
showDialog() { showDialog() {
this.expression = this.form.EmailCron // cron UI this.expression = this.form.EmailCron; // cron UI
this.showCron = true this.showCron = true;
}, },
crontabFill(value) { crontabFill(value) {
this.form.EmailCron = value this.form.EmailCron = value;
}, },
handleRemoveFileCN() { handleRemoveFileCN() {
this.form.AttachNameCN = null this.form.AttachNameCN = null;
this.form.AttachCNPath = null this.form.AttachCNPath = null;
this.fileListCN = [] this.fileListCN = [];
}, },
beforeUploadCN() { beforeUploadCN() {
if (this.fileListCN.length > 0) { if (this.fileListCN.length > 0) {
this.$alert('最多只能传一个附件') this.$alert("最多只能传一个附件");
return return;
} }
}, },
handlePreviewCN(row, r2) { handlePreviewCN(row, r2) {
if (row.fullPath) { if (row.fullPath) {
window.open(row.fullPath, '_blank') window.open(row.fullPath, "_blank");
} }
}, },
handleUploadFileCN(param) { handleUploadFileCN(param) {
this.btnLoading = true this.btnLoading = true;
const formData = new FormData() const formData = new FormData();
formData.append('file', param.file) formData.append("file", param.file);
this.form.AttachNameCN = param.file.name this.form.AttachNameCN = param.file.name;
Upload(formData, 3).then((res) => { Upload(formData, 3).then((res) => {
this.form.AttachCNPath = res.Result.FilePath this.form.AttachCNPath = res.Result.FilePath;
this.btnLoading = false this.btnLoading = false;
this.fileListCN.push({ this.fileListCN.push({
name: param.file.name, name: param.file.name,
path: res.Result.FilePath, path: res.Result.FilePath,
fullPath: res.Result.FullFilePath, fullPath: res.Result.FullFilePath,
url: res.Result.FilePath, url: res.Result.FilePath,
}) });
}) });
}, },
handleUploadFileEN(param) { handleUploadFileEN(param) {
this.btnLoading = true this.btnLoading = true;
const formData = new FormData() const formData = new FormData();
formData.append('file', param.file) formData.append("file", param.file);
this.form.AttachName = param.file.name this.form.AttachName = param.file.name;
Upload(formData, 3).then((res) => { Upload(formData, 3).then((res) => {
this.form.AttachPath = res.Result.FilePath this.form.AttachPath = res.Result.FilePath;
this.btnLoading = false this.btnLoading = false;
this.fileListEN.push({ this.fileListEN.push({
name: param.file.name, name: param.file.name,
path: res.Result.FilePath, path: res.Result.FilePath,
fullPath: res.Result.FullFilePath, fullPath: res.Result.FullFilePath,
url: res.Result.FilePath, url: res.Result.FilePath,
}) });
}) });
}, },
handleRemoveFileEN() { handleRemoveFileEN() {
this.form.AttachName = null this.form.AttachName = null;
this.form.AttachPath = null this.form.AttachPath = null;
this.fileListEN = [] this.fileListEN = [];
}, },
beforeUploadEN() { beforeUploadEN() {
if (this.fileListEN.length > 0) { if (this.fileListEN.length > 0) {
this.$alert('最多只能传一个附件') this.$alert("最多只能传一个附件");
return return;
} }
}, },
handlePreviewEN(row, r2) { handlePreviewEN(row, r2) {
if (row.fullPath) { if (row.fullPath) {
window.open(row.fullPath, '_blank') window.open(row.fullPath, "_blank");
} }
}, },
async initForm() { async initForm() {
this.loading = true this.loading = true;
// await this.getScenarios() // await this.getScenarios()
for (const k in this.form) { for (const k in this.form) {
if (this.data.hasOwnProperty(k)) { if (this.data.hasOwnProperty(k)) {
this.form[k] = this.data[k] this.form[k] = this.data[k];
} }
if (k === 'AttachPath' && this.form[k]) { if (k === "AttachPath" && this.form[k]) {
this.fileListEN.push({ this.fileListEN.push({
name: this.data.AttachName, name: this.data.AttachName,
path: this.data.AttachPath, path: this.data.AttachPath,
fullPath: this.data.AttachPath, fullPath: this.data.AttachPath,
url: this.data.AttachPath, url: this.data.AttachPath,
}) });
} }
if (k === 'AttachCNPath' && this.form[k]) { if (k === "AttachCNPath" && this.form[k]) {
this.fileListCN.push({ this.fileListCN.push({
name: this.data.AttachNameCN, name: this.data.AttachNameCN,
path: this.data.AttachCNPath, path: this.data.AttachCNPath,
fullPath: this.data.AttachCNPath, fullPath: this.data.AttachCNPath,
url: this.data.AttachCNPath, url: this.data.AttachCNPath,
}) });
} }
} }
this.loading = false this.loading = false;
}, },
// //
handleSave() { handleSave() {
this.$refs.emailForm.validate((valid) => { this.$refs.emailForm.validate((valid) => {
if (!valid) return if (!valid) return;
this.loading = true this.loading = true;
this.form.systemLevel = this.systemLevel this.form.systemLevel = this.systemLevel;
addOrUpdateEmailNoticeConfigList(this.form) addOrUpdateEmailNoticeConfigList(this.form)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.$emit('closeDialog') this.$emit("closeDialog");
this.$emit('getList') this.$emit("getList");
this.$message.success('Saved successfully') this.$message.success("Saved successfully");
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}) });
},
//
PreviewHTML(html, htmlEn) {
this.$emit('PreviewHTML', html, htmlEn)
}, },
}, },
} };
</script> </script>

View File

@ -1,8 +1,13 @@
<template> <template>
<box-content> <box-content>
<div class="search"> <div class="search">
<el-form :inline="true" size="mini" class="base-search-form"> <el-form
<el-form-item label="是否需要回执:" v-if="!systemLevel"> v-if="!systemLevel"
:inline="true"
size="mini"
class="base-search-form"
>
<el-form-item label="是否需要回执:">
<el-select <el-select
v-model="searchData.IsReturnRequired" v-model="searchData.IsReturnRequired"
clearable clearable
@ -16,7 +21,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否加急:" v-if="!systemLevel"> <el-form-item label="是否加急:">
<el-select <el-select
v-model="searchData.IsUrgent" v-model="searchData.IsUrgent"
clearable clearable
@ -30,7 +35,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否启用:" v-if="!systemLevel"> <el-form-item label="是否启用:">
<el-select <el-select
v-model="searchData.IsEnable" v-model="searchData.IsEnable"
clearable clearable
@ -46,7 +51,7 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('trials:auditRecord:table:criterion')" :label="$t('trials:auditRecord:table:criterion')"
v-if="isDistinguishCriteria && !systemLevel" v-if="isDistinguishCriteria"
> >
<el-select <el-select
v-model="searchData.CriterionTypeEnum" v-model="searchData.CriterionTypeEnum"
@ -61,76 +66,12 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('trials:emailManageCfg:form:BusinessModule')">
<el-select
v-model="searchData.BusinessModuleEnum"
clearable
style="width: 100px"
>
<el-option
v-for="item of $d.BusinessModule"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:form:BusinessScenario')"
>
<el-select
v-model="searchData.BusinessScenarioEnum"
clearable
style="width: 100px"
>
<el-option
v-for="item of $d.Email_BusinessScenario"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('trials:emailManageCfg:form:ToUserType')">
<el-select
v-model="searchData.ToUserType"
clearable
style="width: 100px"
>
<el-option
v-for="item of UserTypeList"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('trials:emailManageCfg:form:EmailUrgent')"
v-if="systemLevel === 1"
>
<el-select
v-model="searchData.EmailUrgentEnum"
clearable
style="width: 100px"
>
<el-option
v-for="item of $d.EmailUrgent"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSearch"></el-button> <el-button type="primary" @click="handleSearch"></el-button>
<el-button type="primary" @click="handleReset"></el-button> <el-button type="primary" @click="handleReset"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span style="margin-left: auto"> <span style="margin-left: auto">
<el-button type="primary" size="mini" @click="handleExport">
{{ $t('common:button:export') }}
</el-button>
<!-- <el-button <!-- <el-button
type="primary" type="primary"
size="mini" size="mini"
@ -170,7 +111,7 @@
min-width="120" min-width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }} {{ $fd("CriterionType", scope.row.CriterionTypeEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -195,7 +136,7 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }} {{ $fd("BusinessLevel", scope.row.BusinessLevelEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -206,7 +147,7 @@
min-width="100" min-width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }} {{ $fd("BusinessModule", scope.row.BusinessModuleEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -217,62 +158,64 @@
min-width="130" min-width="130"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }} {{ $fd("Email_BusinessScenario", scope.row.BusinessScenarioEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 收件人v-if="systemLevel !== 1" --> <!-- 收件人 -->
<el-table-column <el-table-column
prop="ToUserTypeList" prop="ToUserTypeList"
:label="$t('trials:emailManageCfg:title:toUserTypeList')" :label="$t('trials:emailManageCfg:title:toUserTypeList')"
show-overflow-tooltip show-overflow-tooltip
min-width="100" min-width="100"
v-if="systemLevel !== 1"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.ToUserTypeList.length > 0 scope.row.ToUserTypeList.length > 0
? scope.row.ToUserTypeList.map((v) => $fd('UserType', v)).join( ? scope.row.ToUserTypeList.map((v) => $fd("UserType", v)).join(
'、' "、"
) )
: '' : ""
}} }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 抄送人v-if="!systemLevel" --> <!-- 抄送人 -->
<el-table-column <el-table-column
prop="CopyUserTypeList" prop="CopyUserTypeList"
:label="$t('trials:emailManageCfg:title:copyUserTypeList')" :label="$t('trials:emailManageCfg:title:copyUserTypeList')"
show-overflow-tooltip show-overflow-tooltip
min-width="100" min-width="100"
v-if="!systemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
scope.row.CopyUserTypeList.length > 0 scope.row.CopyUserTypeList.length > 0
? scope.row.CopyUserTypeList.map((v) => $fd('UserType', v)).join( ? scope.row.CopyUserTypeList.map((v) => $fd("UserType", v)).join(
'、' "、"
) )
: '' : ""
}} }}
</template> </template>
</el-table-column> </el-table-column>
<!---v-if="!systemLevel"-->
<el-table-column <el-table-column
prop="EmailUrgentEnum" prop="EmailUrgentEnum"
label="加急状态" label="加急状态"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
min-width="100" min-width="100"
v-if="!systemLevel"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('EmailUrgent', scope.row.EmailUrgentEnum) }} {{ $fd("EmailUrgent", scope.row.EmailUrgentEnum) }}
</template> </template>
</el-table-column> </el-table-column>
<!---v-if="!systemLevel"-->
<el-table-column <el-table-column
prop="EmailCron" prop="EmailCron"
label="发送周期和时间" label="发送周期和时间"
sortable="custom" sortable="custom"
show-overflow-tooltip show-overflow-tooltip
min-width="160" min-width="160"
v-if="!systemLevel"
/> />
<!-- 附件 --> <!-- 附件 -->
<el-table-column <el-table-column
@ -303,10 +246,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsReturnRequired" type="danger"> <el-tag v-if="scope.row.IsReturnRequired" type="danger">
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }} {{ $fd("YesOrNo", scope.row.IsReturnRequired) }}
</el-tag> </el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsReturnRequired) $fd("YesOrNo", scope.row.IsReturnRequired)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -321,10 +264,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsAutoSend" type="danger"> <el-tag v-if="scope.row.IsAutoSend" type="danger">
{{ $fd('YesOrNo', scope.row.IsAutoSend) }} {{ $fd("YesOrNo", scope.row.IsAutoSend) }}
</el-tag> </el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsAutoSend) $fd("YesOrNo", scope.row.IsAutoSend)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -338,10 +281,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsEnable" type="danger"> <el-tag v-if="scope.row.IsEnable" type="danger">
{{ $fd('YesOrNo', scope.row.IsEnable) }} {{ $fd("YesOrNo", scope.row.IsEnable) }}
</el-tag> </el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd('YesOrNo', scope.row.IsEnable) $fd("YesOrNo", scope.row.IsEnable)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -370,13 +313,6 @@
<el-button type="text" @click="handleDelete(scope.row)" <el-button type="text" @click="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> >
<el-button
type="text"
@click="
preview(scope.row.EmailHtmlContentCN, scope.row.EmailHtmlContent)
"
>{{ $t('common:button:preview') }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -402,10 +338,8 @@
<EmailForm <EmailForm
:data="rowData" :data="rowData"
:system-level="systemLevel" :system-level="systemLevel"
:isDistinguishCriteria="isDistinguishCriteria"
@closeDialog="closeDialog" @closeDialog="closeDialog"
@getList="getList" @getList="getList"
@PreviewHTML="preview"
/> />
</el-dialog> </el-dialog>
@ -425,191 +359,131 @@
@getList="getList" @getList="getList"
/> />
</el-dialog> </el-dialog>
<!-- 预览模板 -->
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:close-on-click-modal="false"
title="预览"
fullscreen
custom-class="base-dialog-wrapper"
>
<div
style="
display: flex;
align-items: flex-start;
justify-content: space-around;
flex-wrap: wrap;
"
>
<div>
<h3>邮件内容模版CN</h3>
<div v-html="previewHTML"></div>
</div>
<div>
<h3>邮件内容模版EN</h3>
<div v-html="previewHTMLEN"></div>
</div>
</div>
</el-dialog>
</box-content> </box-content>
</template> </template>
<script> <script>
import { import {
getEmailNoticeConfigList, getEmailNoticeConfigList,
deleteEmailNoticeConfig, deleteEmailNoticeConfig,
} from '@/api/dictionary' } from "@/api/dictionary";
import { GetEmailNoticeConfigList_Export } from '@/api/export' import BoxContent from "@/components/BoxContent";
import BoxContent from '@/components/BoxContent' import Pagination from "@/components/Pagination";
import Pagination from '@/components/Pagination' import EmailForm from "./EmailForm";
import EmailForm from './EmailForm' import AttachmentList from "./AttachmentList";
import AttachmentList from './AttachmentList'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
IsReturnRequired: '', IsReturnRequired: "",
IsUrgent: '', IsUrgent: "",
IsEnable: '', IsEnable: "",
CriterionTypeEnum: null, CriterionTypeEnum: null,
BusinessModuleEnum: null,
BusinessScenarioEnum: null,
EmailUrgentEnum: null,
ToUserType: null,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
SortField: 'Code', };
Asc: true, };
}
}
export default { export default {
name: 'EmailList', name: "EmailList",
components: { BoxContent, Pagination, EmailForm, AttachmentList }, components: { BoxContent, Pagination, EmailForm, AttachmentList },
props: { props: {
isDistinguishCriteria: { isDistinguishCriteria: {
type: Boolean, type: Boolean,
default() { default() {
return false return false;
}, },
}, },
systemLevel: { systemLevel: {
type: Number, type: Number,
default() { default() {
return 0 return 0;
}, },
}, },
}, },
data() { data() {
return { return {
activeTab: '0', activeTab: "0",
searchData: searchDataDefault(), searchData: searchDataDefault(),
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
rowData: {}, rowData: {},
title: '', title: "",
editVisible: false, editVisible: false,
attachmentVisible: false, attachmentVisible: false,
previewVisible: false, };
previewHTML: null,
previewHTMLEN: null,
}
},
computed: {
UserTypeList() {
if (this.systemLevel === 1) {
return this.$d.UserType
} else {
return this.$d.UserType.filter(
(item) => ![7, 31, 32, 21, 26, 27].includes(item.value)
)
}
},
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true;
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
this.searchData.systemLevel = this.systemLevel this.searchData.systemLevel = this.systemLevel;
getEmailNoticeConfigList(this.searchData) getEmailNoticeConfigList(this.searchData)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount this.total = res.Result.TotalCount;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {};
this.title = '新增' this.title = "新增";
this.editVisible = true this.editVisible = true;
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row };
this.title = '编辑' this.title = "编辑";
this.editVisible = true this.editVisible = true;
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), { this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}).then(() => { }).then(() => {
deleteEmailNoticeConfig(row.Id).then((res) => { deleteEmailNoticeConfig(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList();
this.$message.success('删除成功!') this.$message.success("删除成功!");
} }
}) });
}) });
}, },
handleDetail(row) { handleDetail(row) {
this.rowData = { ...row } this.rowData = { ...row };
this.attachmentVisible = true this.attachmentVisible = true;
}, },
// //
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
closeDialog() { closeDialog() {
this.editVisible = false this.editVisible = false;
},
preview(html, htmlEN) {
this.previewHTML = html
this.previewHTMLEN = htmlEN
this.previewVisible = true
},
//
handleExport() {
// this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
// this.searchData.systemLevel = this.systemLevel
// return GetEmailNoticeConfigList_Export(this.searchData)
return GetEmailNoticeConfigList_Export(this.searchData)
}, },
}, },
} };
</script> </script>

View File

@ -29,13 +29,13 @@
></EmailList> ></EmailList>
</el-tab-pane> </el-tab-pane>
<!-- 系统相关-分角色 --> <!-- 系统相关-分角色 -->
<!-- <el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3"> <el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
<EmailList <EmailList
v-if="activeTab === '3'" v-if="activeTab === '3'"
:is-distinguish-criteria="false" :is-distinguish-criteria="false"
:system-level="2" :system-level="2"
></EmailList> ></EmailList>
</el-tab-pane> --> </el-tab-pane>
</el-tabs> </el-tabs>
</box-content> </box-content>
</template> </template>
@ -43,107 +43,107 @@
import { import {
getEmailNoticeConfigList, getEmailNoticeConfigList,
deleteEmailNoticeConfig, deleteEmailNoticeConfig,
} from '@/api/dictionary' } from "@/api/dictionary";
import BoxContent from '@/components/BoxContent' import BoxContent from "@/components/BoxContent";
import Pagination from '@/components/Pagination' import Pagination from "@/components/Pagination";
import EmailList from './components/EmailList' import EmailList from "./components/EmailList";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
IsReturnRequired: '', IsReturnRequired: "",
IsUrgent: '', IsUrgent: "",
IsEnable: '', IsEnable: "",
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
} };
} };
export default { export default {
name: 'EmailListIndex', name: "EmailListIndex",
components: { BoxContent, Pagination, EmailList }, components: { BoxContent, Pagination, EmailList },
data() { data() {
return { return {
activeTab: '0', activeTab: "0",
searchData: searchDataDefault(), searchData: searchDataDefault(),
loading: false, loading: false,
list: [], list: [],
total: 0, total: 0,
rowData: {}, rowData: {},
title: '', title: "",
editVisible: false, editVisible: false,
attachmentVisible: false, attachmentVisible: false,
} };
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
// //
getList() { getList() {
this.loading = true this.loading = true;
getEmailNoticeConfigList(this.searchData) getEmailNoticeConfigList(this.searchData)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.list = res.Result.CurrentPageData this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount this.total = res.Result.TotalCount;
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
// //
handleAdd() { handleAdd() {
this.rowData = {} this.rowData = {};
this.title = '新增' this.title = "新增";
this.editVisible = true this.editVisible = true;
}, },
// //
handleEdit(row) { handleEdit(row) {
this.rowData = { ...row } this.rowData = { ...row };
this.title = '编辑' this.title = "编辑";
this.editVisible = true this.editVisible = true;
}, },
// //
handleDelete(row) { handleDelete(row) {
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), { this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}).then(() => { }).then(() => {
deleteEmailNoticeConfig(row.Id).then((res) => { deleteEmailNoticeConfig(row.Id).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList() this.getList();
this.$message.success('删除成功!') this.$message.success("删除成功!");
} }
}) });
}) });
}, },
handleDetail(row) { handleDetail(row) {
this.rowData = { ...row } this.rowData = { ...row };
this.attachmentVisible = true this.attachmentVisible = true;
}, },
// //
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault() this.searchData = searchDataDefault();
this.getList() this.getList();
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === 'ascending') { if (column.order === "ascending") {
this.searchData.Asc = true this.searchData.Asc = true;
} else { } else {
this.searchData.Asc = false this.searchData.Asc = false;
} }
this.searchData.SortField = column.prop this.searchData.SortField = column.prop;
this.searchData.PageIndex = 1 this.searchData.PageIndex = 1;
this.getList() this.getList();
}, },
// //
closeDialog() { closeDialog() {
this.editVisible = false this.editVisible = false;
}, },
}, },
} };
</script> </script>

View File

@ -29,16 +29,15 @@
<el-input v-model="password.Email" disabled /> <el-input v-model="password.Email" disabled />
</el-form-item> </el-form-item>
<!-- 用户名 --> <!-- 用户名 -->
<!-- <el-form-item :label="$t('recompose:form:role')" prop="UserType"> <el-form-item :label="$t('recompose:form:role')" prop="UserType">
<el-input v-model="password.UserType" disabled /> <el-input v-model="password.UserType" disabled />
</el-form-item> --> </el-form-item>
<!-- 用户名 --> <!-- 用户名 -->
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName"> <el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
<el-input v-model="password.NewUserName" /> <el-input v-model="password.NewUserName" />
</el-form-item> </el-form-item>
<!-- 新密码 --> <!-- 新密码 -->
<el-form-item <el-form-item
class="my_new_pwd"
:label="$t('recompose:form:newPassword')" :label="$t('recompose:form:newPassword')"
prop="NewPassWord" prop="NewPassWord"
> >
@ -85,11 +84,6 @@ export default {
password: { password: {
NewUserName: null, NewUserName: null,
UserId: null, UserId: null,
ConfirmPassWord: null,
NewPassWord: null,
Email: null,
UserType: null,
access_token: null,
}, },
passwordFormRules: { passwordFormRules: {
NewUserName: [ NewUserName: [
@ -101,6 +95,7 @@ export default {
: 'zh' : 'zh'
/* eslint-disable */ /* eslint-disable */
var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //8 var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //8
console.log(!reg1.test(value))
if (!reg1.test(value)) { if (!reg1.test(value)) {
callback( callback(
lang === 'zh' lang === 'zh'
@ -181,9 +176,9 @@ export default {
this.$i18n.locale = this.$route.query.lang this.$i18n.locale = this.$route.query.lang
this.setLanguage(this.$route.query.lang) this.setLanguage(this.$route.query.lang)
this.$updateDictionary() this.$updateDictionary()
// if (!this.password.NewUserName) { if (!this.password.NewUserName) {
// this.$alert(this.$t('recompose:message:warning')) this.$alert(this.$t('recompose:message:warning'))
// } }
}, },
methods: { methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }), ...mapMutations({ setLanguage: 'lang/setLanguage' }),
@ -195,10 +190,8 @@ export default {
} else { } else {
this.$router.push(`/login`) this.$router.push(`/login`)
} }
if (!this.$i18n.locale) { this.$i18n.locale = 'zh'
//this.$i18n.locale = 'zh' this.setLanguage('zh')
//this.setLanguage('zh')
}
this.$updateDictionary() this.$updateDictionary()
}, },
save() { save() {
@ -236,10 +229,7 @@ export default {
}) })
}, },
cancel() { cancel() {
// this.$refs['passwordForm'].resetFields() this.$refs['passwordForm'].resetFields()
this.password.NewPassWord = null
this.password.NewUserName = null
this.password.ConfirmPassWord = null
}, },
}, },
} }
@ -273,7 +263,7 @@ input {
background-color: transparent; background-color: transparent;
caret-color: #fff; caret-color: #fff;
} }
::v-deep .is-error.my_new_pwd { .el-form-item {
margin-bottom: 45px; margin-bottom: 30px;
} }
</style> </style>

View File

@ -2,8 +2,7 @@
<div class="wscn-http404-container"> <div class="wscn-http404-container">
<div class="wscn-http404" style="display: flex;align-items: center"> <div class="wscn-http404" style="display: flex;align-items: center">
<div class="pic-404"> <div class="pic-404">
<!-- <img class="pic-404__parent" src="@/assets/login-bg.png" alt="404"> --> <img class="pic-404__parent" src="@/assets/login-bg.png" alt="404">
<svg-icon icon-class="login-bg" style="width: 100%; height: 100%" />
<img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404"> <img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404"> <img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404"> <img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
@ -57,10 +56,8 @@ export default {
.pic-404 { .pic-404 {
position: relative; position: relative;
float: left; float: left;
width: 500px; width: 400px;
height: 300px;
overflow: hidden; overflow: hidden;
margin-right: 10px;
&__parent { &__parent {
width: 100%; width: 100%;
} }

View File

@ -76,8 +76,7 @@
> >
<!-- 用户名 --> <!-- 用户名 -->
<el-form-item :label="$t('passwordReset:form:userName')" prop="UserId"> <el-form-item :label="$t('passwordReset:form:userName')" prop="UserId">
<el-input v-model="form.UserName" disabled /> <el-select
<!-- <el-select
v-model="form.UserId" v-model="form.UserId"
clearable clearable
filterable filterable
@ -95,15 +94,15 @@
item.UserType item.UserType
}}</span> }}</span>
</el-option> </el-option>
</el-select> --> </el-select>
</el-form-item> </el-form-item>
<!-- 用户类型 --> <!-- 用户类型 -->
<!-- <el-form-item <el-form-item
v-if="form.UserId" v-if="form.UserId"
:label="$t('passwordReset:form:userType')" :label="$t('passwordReset:form:userType')"
> >
<el-input v-model="form.UserType" disabled /> <el-input v-model="form.UserType" disabled />
</el-form-item> --> </el-form-item>
<!-- 新密码 --> <!-- 新密码 -->
<el-form-item <el-form-item
class="my_new_pwd" class="my_new_pwd"
@ -339,13 +338,11 @@ export default {
) )
.then((res) => { .then((res) => {
this.formLoading = false this.formLoading = false
this.form.UserId = res.Result.Id this.users = res.Result
this.form.UserName = res.Result.UserName if (this.users.length === 1) {
// this.users = res.Result this.form.UserId = this.users[0].UserId
// if (this.users.length === 1) { this.form.UserType = this.users[0].UserType
// this.form.UserId = this.users[0].UserId }
// this.form.UserType = this.users[0].UserType
// }
// //
this.$message.success( this.$message.success(
this.$t('passwordReset:message:verifiedSuccessfully') this.$t('passwordReset:message:verifiedSuccessfully')
@ -423,7 +420,7 @@ export default {
/* margin-bottom: 40px;*/ /* margin-bottom: 40px;*/
/*}*/ /*}*/
.is-error.my_new_pwd { .is-error.my_new_pwd {
margin-bottom: 45px; margin-bottom: 40px;
} }
.flexBox { .flexBox {
display: flex; display: flex;

View File

@ -84,8 +84,6 @@
:type="passwordType" :type="passwordType"
:placeholder="$t('login:form:password')" :placeholder="$t('login:form:password')"
name="password" name="password"
auto-complete="new-password"
autocomplete="new-password"
tabindex="2" tabindex="2"
@keyup.enter.native="handleLogin" @keyup.enter.native="handleLogin"
/> />
@ -94,21 +92,6 @@
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/> />
</span> </span>
<!-- <el-input
:key="passwordType"
ref="password"
v-model="pwdCover"
size="small"
type="text"
:placeholder="$t('login:form:password')"
name="password"
@input="setPassword"
tabindex="2"
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="hidePassword">
<svg-icon :icon-class="!isShowPassword ? 'eye' : 'eye-open'" />
</span> -->
</el-form-item> </el-form-item>
<!-- Login --> <!-- Login -->
<el-button <el-button
@ -165,14 +148,6 @@
<span style="color: #428bca">关于</span> <span style="color: #428bca">关于</span>
</a> </a>
</div> </div>
<div v-if="NODE_ENV === 'usa'" class="login-footer">
<span>
© {{ new Date().getFullYear() }} Elevate lmaging Inc. info@{{ host }}
</span>
<a @click="openAbout">
<span style="color: #428bca">About</span>
</a>
</div>
<Vcode <Vcode
:show="isShow" :show="isShow"
:fail-text="$t('login:button:failText')" :fail-text="$t('login:button:failText')"
@ -197,56 +172,33 @@
text-align: center; text-align: center;
" "
> >
<h1 <h1 style="text-align: center; margin-bottom: 20px">关于</h1>
style="text-align: center; margin-bottom: 30px" <p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
v-if="NODE_ENV === 'usa'" {{ $t('login:title:system_title') }}
>
About
</h1>
<h1 style="text-align: center; margin-bottom: 30px" v-else></h1>
<p style="margin-bottom: 0px" v-if="NODE_ENV === 'usa'">
<!-- {{ $t('login:title:system_title_about') }} -->
<svg-icon
icon-class="login-logo"
style="width: 250px; height: 71px"
/>
</p> </p>
<p style="margin-bottom: 0px" v-else>{{ $t('login:title:system') }}</p> <p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p>
<p style="margin-bottom: 20px; margin-top: 0"> <p style="margin-bottom: 20px">
V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }} V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }}
</p> </p>
<p style="margin-bottom: 20px" v-if="language === 'zh'"> <p style="margin-bottom: 20px" v-if="language === 'zh'">
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司 Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
版权所有 版权所有
</p> </p>
<p style="margin-bottom: 20px" v-else-if="NODE_ENV === 'usa'">
© {{ new Date().getFullYear() }} Elevate Imaging Inc.
</p>
<p style="margin-bottom: 20px" v-else> <p style="margin-bottom: 20px" v-else>
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
Inc. Inc.
</p> </p>
<div style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'"> <div style="margin-bottom: 20px">
<img style="width: 180px" src="@/assets/zzlogo-usa.png" alt="" />
</div>
<div style="margin-bottom: 20px" v-else>
<img style="width: 180px" src="@/assets/zzlogo2.png" alt="" /> <img style="width: 180px" src="@/assets/zzlogo2.png" alt="" />
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" size="mini" @click="aboutVisible = false"> <el-button type="primary" size="mini" @click="aboutVisible = false"
{{ $t('common:button:close') }} >关闭</el-button
</el-button> >
</div> </div>
</el-dialog> </el-dialog>
<browserTip ref="browserTip" /> <browserTip ref="browserTip" />
<toggleRole
v-if="toggleRoleVisible"
:visible.sync="toggleRoleVisible"
:loading="toggleRoleLoading"
@save="loginByRole"
@cancel="cancel"
/>
</div> </div>
</template> </template>
@ -257,10 +209,9 @@ import TopLang from './topLang'
import Vcode from 'vue-puzzle-vcode' import Vcode from 'vue-puzzle-vcode'
import browserTip from '@/views/dictionary/template/browser/tip.vue' import browserTip from '@/views/dictionary/template/browser/tip.vue'
import Img1 from '@/assets/pic-2.png' import Img1 from '@/assets/pic-2.png'
import toggleRole from '@/components/toggleRole'
export default { export default {
name: 'Login', name: 'Login',
components: { TopLang, Vcode, browserTip, toggleRole }, components: { TopLang, Vcode, browserTip },
data() { data() {
return { return {
NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV
@ -296,23 +247,15 @@ export default {
}, },
loading: false, loading: false,
passwordType: 'password', passwordType: 'password',
pwdCover: null,
isShowPassword: false,
loginType: null, loginType: null,
location: null, location: null,
isShow: false, isShow: false,
showCode: false, showCode: false,
Img1, Img1,
toggleRoleVisible: false,
toggleRoleLoading: false,
} }
}, },
computed: { computed: {
...mapGetters(['asyncRoutes', 'routes', 'language']), ...mapGetters(['asyncRoutes', 'routes', 'language']),
host() {
// return window.location.host
return 'elevateimaging.ai '
},
}, },
watch: { watch: {
'$i18n.locale': { '$i18n.locale': {
@ -326,8 +269,6 @@ export default {
}, },
}, },
mounted() { mounted() {
let lang = zzSessionStorage.getItem('lang') || 'zh'
zzSessionStorage.clear()
this.loginType = this.$route.query.loginType this.loginType = this.$route.query.loginType
this.location = this.$route.query.location this.location = this.$route.query.location
zzSessionStorage.setItem('loginType', this.loginType) zzSessionStorage.setItem('loginType', this.loginType)
@ -342,9 +283,9 @@ export default {
this.setLanguage('en') this.setLanguage('en')
this.$updateDictionary() this.$updateDictionary()
} else { } else {
this.$i18n.locale = lang // this.$i18n.locale = 'zh'
this.setLanguage(lang) // this.setLanguage('zh')
this.$updateDictionary() // this.$updateDictionary()
} }
} }
this.$refs.browserTip.open() this.$refs.browserTip.open()
@ -386,9 +327,6 @@ export default {
this.$store this.$store
.dispatch('user/login', this.loginForm) .dispatch('user/login', this.loginForm)
.then((res) => { .then((res) => {
if (res.BasicInfo.LoginState === 2) {
this.$message.warning(this.$t('login:message:login4'))
}
if (res.BasicInfo.IsFirstAdd) { if (res.BasicInfo.IsFirstAdd) {
// , // ,
this.$message.success(this.$t('login:message:login1')) this.$message.success(this.$t('login:message:login1'))
@ -398,7 +336,7 @@ export default {
}) })
}, 500) }, 500)
return return
} else if (res.BasicInfo.NeedChangePassWord) { } else if (res.BasicInfo.LoginState === 1) {
// //
this.$alert( this.$alert(
this.$t('login:message:login3'), this.$t('login:message:login3'),
@ -415,47 +353,25 @@ export default {
return return
} else if (res.IsMFA) { } else if (res.IsMFA) {
this.$MFA({ this.$MFA({
UserId: res.BasicInfo.IdentityUserId, UserId: res.BasicInfo.Id,
EMail: res.BasicInfo.EMail, EMail: res.BasicInfo.EMail,
username: this.loginForm.username, username: this.loginForm.username,
callBack: this.changeRoleLogin, callBack: this.loginIn,
cancelBack: () => { cancelBack: () => {
this.loading = false this.loading = false
}, },
}) })
return return
} else if (res.BasicInfo.LoginState === 2) {
// IP'
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
this.$message.warning(this.$t('login:message:login4'))
} }
// else if (res.BasicInfo.LoginState === 2) { this.$store.dispatch('permission/generateRoutes').then((res) => {
// // IP'
// // this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
// this.$message.warning(this.$t('login:message:login4'))
// }
zzSessionStorage.removeItem('userId')
zzSessionStorage.removeItem('identityUserId')
this.changeRoleLogin()
})
.catch(() => {
this.showCode = true
this.loading = false
})
},
loginByRole(userRoleId) {
this.toggleRoleLoading = true
this.$store
.dispatch('user/loginByRole', { userRoleId })
.then((res) => {
this.toggleRoleLoading = false
if (res) {
this.$store
.dispatch('permission/generateRoutes')
.then((res) => {
this.loading = false this.loading = false
if (res && res.length > 0) { if (res && res.length > 0) {
this.$store.dispatch('global/getNoticeList') this.$store.dispatch('global/getNoticeList')
this.$router.addRoutes(res) this.$router.addRoutes(res)
// if (this.LoginState === 2) {
// this.$message.warning(this.$t('login:message:login4'))
// }
if (this.loginType === 'DevOps') { if (this.loginType === 'DevOps') {
this.$router.replace({ path: res[0].path }) this.$router.replace({ path: res[0].path })
return return
@ -465,52 +381,23 @@ export default {
return return
} }
if ( if (
this.hasPermi([ this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])
'role:air',
'role:rpm',
'role:rcrc',
'role:rir',
])
) { ) {
this.$router.replace({ path: '/trials/trials-list' }) this.$router.replace({ path: '/trials/trials-list' })
} else { } else {
this.$router.replace({ path: '/trials' }) this.$router.replace({ path: '/trials' })
} }
} else { } else {
this.toggleRoleLoading = false
// //
this.$message.warning(this.$t('login:message:login2')) this.$message.warning(this.$t('login:message:login2'))
} }
}) })
.catch((err) => {
this.toggleRoleLoading = false
})
} else {
this.toggleRoleLoading = false
}
}) })
.catch(() => { .catch(() => {
this.showCode = true this.showCode = true
this.loading = false this.loading = false
this.toggleRoleLoading = false
}) })
}, },
changeRoleLogin() {
if (
Array.isArray(this.$store.state.user.roles) &&
this.$store.state.user.roles.length === 1
) {
this.loginByRole(this.$store.state.user.roles[0].Id)
return
}
return (this.toggleRoleVisible = true)
},
cancel() {
this.showCode = true
this.loading = false
this.toggleRoleLoading = false
// this.toggleRoleVisible = false
},
onSuccess() { onSuccess() {
this.isShow = false this.isShow = false
this.loginIn() this.loginIn()
@ -518,67 +405,6 @@ export default {
handleResetPwd() { handleResetPwd() {
this.$router.push({ name: 'Resetpassword' }) this.$router.push({ name: 'Resetpassword' })
}, },
//
setPassword(val) {
if (this.isShowPassword) {
this.loginForm.password = val
} else {
let reg =
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$/g //
let nDot = /[^●]/g //
let index = -1 //
let lastChar = void 0 //
let realArr = this.loginForm.password.split('') //
let coverArr = val.split('') //
let coverLen = val.length //
let realLen = this.loginForm.password.length //
//
coverArr.forEach((el, idx) => {
if (nDot.test(el)) {
index = idx
lastChar = el
}
})
//
// if (lastChar && !reg.test(lastChar)) {
// coverArr.splice(index, 1)
// this.pwdCover = coverArr.join('')
// console.log(111111111111111, lastChar)
// // return
// }
if (coverLen - realLen <= 2) {
if (realLen < coverLen) {
//
realArr.splice(index, 0, lastChar)
} else if (coverLen <= realLen && index !== -1) {
//
realArr.splice(index, realLen - (coverLen - 1), lastChar)
} else {
// val password val
let pos = document.getElementById('pwd').selectionEnd //
realArr.splice(pos, realLen - coverLen)
}
}
// pwdCover
this.pwdCover = val.replace(/\S/g, '●')
let v = val.replace(/●/g, '')
this.loginForm.password =
coverLen - realLen >= 2 ? realArr.join('') + v : realArr.join('')
}
},
//
hidePassword() {
if (!this.isShowPassword) {
// console.log("");
this.isShowPassword = true
this.pwdCover = this.loginForm.password
} else {
// console.log("");
this.isShowPassword = false
this.pwdCover = this.pwdCover.replace(/\S/g, '●')
}
},
}, },
} }
</script> </script>

View File

@ -42,7 +42,6 @@
</el-form-item> </el-form-item>
<!-- 新密码 --> <!-- 新密码 -->
<el-form-item <el-form-item
class="my_new_pwd"
:label="$t('recompose:form:newPassword')" :label="$t('recompose:form:newPassword')"
prop="NewPassWord" prop="NewPassWord"
> >
@ -139,16 +138,14 @@ export default {
...mapMutations({ setLanguage: 'lang/setLanguage' }), ...mapMutations({ setLanguage: 'lang/setLanguage' }),
async logout() { async logout() {
var loginType = zzSessionStorage.getItem('loginType') var loginType = zzSessionStorage.getItem('loginType')
await this.$store.dispatch('user/resetData') await this.$store.dispatch('user/logout')
if (loginType) { if (loginType) {
this.$router.push(`/login?loginType=${loginType}`) this.$router.push(`/login?loginType=${loginType}`)
} else { } else {
this.$router.push(`/login`) this.$router.push(`/login`)
} }
if (!this.$i18n.locale) { this.$i18n.locale = 'zh'
//this.$i18n.locale = 'zh' this.setLanguage('zh')
//this.setLanguage('zh')
}
this.$updateDictionary() this.$updateDictionary()
}, },
save() { save() {
@ -222,7 +219,4 @@ input {
background-color: transparent; background-color: transparent;
caret-color: #fff; caret-color: #fff;
} }
::v-deep .is-error.my_new_pwd {
margin-bottom: 45px;
}
</style> </style>

View File

@ -117,7 +117,7 @@
:title="$t('trials:researchForm:dialogTitle:reject')" :title="$t('trials:researchForm:dialogTitle:reject')"
width="600px" width="600px"
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
append-to-body :append-to-body="userTypeEnumInt !== 0"
> >
<el-form ref="rejectForm" :model="rejectForm" label-width="100px"> <el-form ref="rejectForm" :model="rejectForm" label-width="100px">
<div class="base-dialog-body"> <div class="base-dialog-body">

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="question-login-wrapper"> <div class="question-login-wrapper">
<div class="box-wrapper"> <div class="box-wrapper">
<h2 style="text-align: center"> <h2 style="text-align:center;">
<!-- 中心调研表 --> <!-- 中心调研表 -->
<!-- 独立阅片人信息填写 --> <!-- 独立阅片人信息填写 -->
{{ $t('trials:researchForm:form:title') }} {{$t("trials:researchForm:form:title")}}
</h2> </h2>
<el-card shadow="hover" style="padding-top: 40px"> <el-card shadow="hover" style="padding-top: 40px">
<el-form <el-form
@ -12,45 +12,30 @@
v-loading="loading" v-loading="loading"
:model="form" :model="form"
label-width="150px" label-width="150px"
style="width: 80%; margin: 0 auto" style="width:80%;margin:0 auto;"
:rules="rules" :rules="rules"
class="demo-ruleForm" class="demo-ruleForm"
size="small" size="small"
> >
<!-- 联系邮箱 --> <!-- 联系邮箱 -->
<el-form-item <el-form-item :label="$t('trials:researchForm:form:contactorEmail')" prop="EmailOrPhone">
:label="$t('trials:researchForm:form:contactorEmail')" <el-input v-model="form.EmailOrPhone" autocomplete="new-password" @change="handleEmailChange" />
prop="EmailOrPhone"
>
<el-input
v-model="form.EmailOrPhone"
autocomplete="new-password"
@change="handleEmailChange"
/>
</el-form-item> </el-form-item>
<!-- 验证码 --> <!-- 验证码 -->
<el-form-item <el-form-item :label="$t('trials:researchForm:form:verifyCode')" required>
:label="$t('trials:researchForm:form:verifyCode')"
required
>
<el-col :span="20"> <el-col :span="20">
<el-form-item prop="VerificationCode"> <el-form-item prop="VerificationCode">
<el-input <el-input v-model="form.VerificationCode" autocomplete="new-password" />
v-model="form.VerificationCode"
autocomplete="new-password"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-button <el-button
size="small" size="small"
type="primary" type="primary"
style="width: 100%" style="width:100%;"
:disabled="sendDisabled" :disabled="sendDisabled"
@click="handleSendCode" @click="handleSendCode"
>{{ this.$t('trials:researchForm:button:send') >{{ sendTitle }}</el-button>
}}{{ count || count === 0 ? `(${count}s)` : '' }}</el-button
>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -59,14 +44,10 @@
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<!-- 提交 --> <!-- 提交 -->
<el-button <el-button size="small" type="primary" :loading="btnLoading" @click="onSubmit">
size="small"
type="primary"
:loading="btnLoading"
@click="onSubmit"
>
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -74,11 +55,7 @@
</div> </div>
</template> </template>
<script> <script>
import { import { sendVerifyCode, verifySendCode, getTrialSurveyInitInfo } from '@/api/research'
sendVerifyCode,
verifySendCode,
getTrialSurveyInitInfo,
} from '@/api/research'
import { verifyEmialGetDoctorInfo, sendEmialVerifyCode } from '@/api/reviewers' import { verifyEmialGetDoctorInfo, sendEmialVerifyCode } from '@/api/reviewers'
import { login, getUserMenuTree, getUserPermissions } from '@/api/user' import { login, getUserMenuTree, getUserPermissions } from '@/api/user'
import store from '@/store' import store from '@/store'
@ -88,9 +65,7 @@ export default {
var checkPhone = (rule, value, callback) => { var checkPhone = (rule, value, callback) => {
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
if (!value) { if (!value) {
return callback( return callback(new Error(this.$t('trials:researchForm:formRule:specify')))
new Error(this.$t('trials:researchForm:formRule:specify'))
)
} }
setTimeout(() => { setTimeout(() => {
if (!Number.isInteger(+value)) { if (!Number.isInteger(+value)) {
@ -108,8 +83,7 @@ export default {
if (value === '') { if (value === '') {
callback(new Error(this.$t('trials:researchForm:formRule:specify'))) callback(new Error(this.$t('trials:researchForm:formRule:specify')))
} else { } else {
var reg = var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) { if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false this.sendDisabled = false
callback() callback()
@ -123,12 +97,8 @@ export default {
if (value === '') { if (value === '') {
callback(new Error(this.$t('trials:researchForm:formRule:specify'))) callback(new Error(this.$t('trials:researchForm:formRule:specify')))
} else { } else {
var reg = var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/ if (this.form.ReplaceUserEmailOrPhone && reg.test(this.form.ReplaceUserEmailOrPhone)) {
if (
this.form.ReplaceUserEmailOrPhone &&
reg.test(this.form.ReplaceUserEmailOrPhone)
) {
callback() callback()
} else { } else {
callback(new Error(this.$t('trials:researchForm:formRule:email'))) callback(new Error(this.$t('trials:researchForm:formRule:email')))
@ -150,51 +120,26 @@ export default {
TrialSiteCode: '', TrialSiteCode: '',
IsUpdate: false, IsUpdate: false,
ReplaceUserEmailOrPhone: '', ReplaceUserEmailOrPhone: '',
VerificationCode: '', VerificationCode: ''
}, },
rules: { rules: {
SiteId: [ SiteId: [
{ { required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
required: true,
message: this.$t('trials:researchForm:formRule:specify'),
trigger: ['blur'],
},
], ],
UserName: [ UserName: [
{ { required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] },
required: true, { min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: 'blur' }
message: this.$t('trials:researchForm:formRule:specify'), ],
trigger: ['blur'], Phone: [
}, { required: true, validator: checkPhone, trigger: ['blur'] }
{
min: 0,
max: 50,
message: this.$t('trials:researchForm:formRule:maxLength'),
trigger: 'blur',
},
], ],
Phone: [{ required: true, validator: checkPhone, trigger: ['blur'] }],
EmailOrPhone: [ EmailOrPhone: [
{ { required: true, validator: validateEmail, trigger: ['blur', 'change'] }
required: true,
validator: validateEmail,
trigger: ['blur', 'change'],
},
], ],
ReplaceUserEmailOrPhone: [ ReplaceUserEmailOrPhone: [
{ { required: true, validator: validateReplaceEmail, trigger: ['blur'] }
required: true,
validator: validateReplaceEmail,
trigger: ['blur'],
},
],
VerificationCode: [
{
required: true,
message: this.$t('trials:researchForm:formRule:specify'),
trigger: ['blur'],
},
], ],
VerificationCode: [{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }]
}, },
siteOptions: [], siteOptions: [],
loading: false, loading: false,
@ -203,19 +148,20 @@ export default {
sendTitle: this.$t('trials:researchForm:button:send'), sendTitle: this.$t('trials:researchForm:button:send'),
count: '', count: '',
timer: null, timer: null,
isHaveSiteSurveyRecord: false, isHaveSiteSurveyRecord: false
} }
}, },
created() { created(){
this.$i18n.locale = this.$route.query.lang this.$i18n.locale = this.$route.query.lang
this.setLanguage(this.$route.query.lang) this.setLanguage(this.$route.query.lang)
}, },
mounted() {}, mounted() {
},
methods: { methods: {
...mapMutations({ setLanguage: 'lang/setLanguage' }), ...mapMutations({ setLanguage: 'lang/setLanguage' }),
// //
onSubmit() { onSubmit() {
this.$refs['resetForm'].validate((valid) => { this.$refs['resetForm'].validate(valid => {
if (valid) { if (valid) {
// //
this.btnLoading = true this.btnLoading = true
@ -227,11 +173,7 @@ export default {
emailOrPhone: this.form.EmailOrPhone, emailOrPhone: this.form.EmailOrPhone,
verificationCode: this.form.VerificationCode, verificationCode: this.form.VerificationCode,
} }
if (this.$route.query.trialId) { verifyEmialGetDoctorInfo(param).then(async res => {
param.TrialId = this.$route.query.trialId
}
verifyEmialGetDoctorInfo(param)
.then(async (res) => {
this.btnLoading = false this.btnLoading = false
zzSessionStorage.clear() zzSessionStorage.clear()
store.dispatch('user/setToken', res.Result.Token) store.dispatch('user/setToken', res.Result.Token)
@ -241,27 +183,8 @@ export default {
store.dispatch('user/setTree', menuTree.Result) store.dispatch('user/setTree', menuTree.Result)
store.dispatch('user/setPermissions', permissions.Result) store.dispatch('user/setPermissions', permissions.Result)
// this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` }) // this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
if (this.$route.query.trialId) { this.$router.push({path: `/ReviewersResearchForm?Id=${res.Result.DoctorId ? res.Result.DoctorId : ''}&tabActive=BasicInfo&ReviewStatus=${res.Result.ReviewStatus}&lang=${this.$route.query.lang}`})
this.$router.push({ }).catch(() => {
path: `/curriculumVitae?Id=${
res.Result.DoctorId ? res.Result.DoctorId : ''
}&tabActive=BasicInfo&ReviewStatus=${
res.Result.ReviewStatus
}&trialId=${this.$route.query.trialId}&lang=${
this.$route.query.lang
}`,
})
} else {
this.$router.push({
path: `/curriculumVitae?Id=${
res.Result.DoctorId ? res.Result.DoctorId : ''
}&tabActive=BasicInfo&ReviewStatus=${
res.Result.ReviewStatus
}&lang=${this.$route.query.lang}`,
})
}
})
.catch(() => {
this.btnLoading = false this.btnLoading = false
this.sendDisabled = false this.sendDisabled = false
}) })
@ -274,24 +197,21 @@ export default {
handleSendCode() { handleSendCode() {
this.sendDisabled = true this.sendDisabled = true
const param = { const param = {
Email: this.form.EmailOrPhone, Email: this.form.EmailOrPhone
} }
sendEmialVerifyCode(param) sendEmialVerifyCode(param).then(res => {
.then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getCode() this.getCode()
} else { } else {
this.$alert(res.ErrorMessage) this.$alert(res.ErrorMessage)
} }
}) }).catch(() => {
.catch(() => {
this.sendDisabled = false this.sendDisabled = false
}) })
}, },
// change // change
handleEmailChange() { handleEmailChange() {
var reg = var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) { if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
this.sendDisabled = false this.sendDisabled = false
} else { } else {
@ -306,24 +226,21 @@ export default {
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.count > 0 && this.count <= TIME_COUNT) { if (this.count > 0 && this.count <= TIME_COUNT) {
this.count-- this.count--
this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${ this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${this.count}s)`
this.count
}s)`
this.sendDisabled = true this.sendDisabled = true
} else { } else {
this.sendDisabled = false this.sendDisabled = false
this.sendTitle = this.$t('trials:researchForm:button:send') this.sendTitle = this.$t('trials:researchForm:button:send')
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
this.count = null
} }
}, 1000) }, 1000)
} }
}, },
onCancel() { onCancel() {
this.$refs['resetForm'].resetFields() this.$refs['resetForm'].resetFields()
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -1,92 +1,45 @@
<template> <template>
<div v-loading="loading" class="resumes-container"> <div v-loading="loading" class="resumes-container">
<div class="resume-content" v-if="!$route.query.ReviewStatus"> <div class="resume-content" v-if="!$route.query.ReviewStatus">
<p>{{ $t('system:Agreements:title:Consultant Agreement') }}</p> <p>{{$t('system:Agreements:title:Consultant Agreement')}}</p>
<div class="upload-content"> <div class="upload-content">
<upload-files <upload-files ref="uploadAgreement" :disabled="$route.query.ReviewStatus === '1'" :doctor-id="doctorId" type="Consultant Agreement" accept=".pdf" @getFileList="getFileList" />
ref="uploadAgreement"
:disabled="$route.query.ReviewStatus === '1'"
:doctor-id="doctorId"
type="Consultant Agreement"
accept=".pdf"
@getFileList="getFileList"
/>
</div> </div>
<p>{{ $t('system:tip:file:pdf') }}</p> <p>{{ $t('system:tip:file:pdf') }}</p>
</div> </div>
<div v-if="!$route.query.ReviewStatus"> <div v-if="!$route.query.ReviewStatus">
<el-table :data="agreementList" size="small"> <el-table :data="agreementList" size="small">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column prop="FileName" :label="$t('system:Agreements:table:Consultant Agreement')" width="300" />
prop="FileName" <el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
:label="$t('system:Agreements:table:Consultant Agreement')"
width="300"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:table:Upload Time')"
width="150"
/>
<el-table-column :label="$t('common:action:action')" width="400"> <el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" @click="handlePreview(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
type="text" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{$t('common:button:delete')}}</el-button>
size="small"
@click="handlePreview(scope.row)"
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="margin-top: 20px"> <div style="margin-top:20px">
<span style="margin-right: 20px"> <span style="margin-right: 20px">
{{ $t('trials:enrolledReviews:message:SOW') }} {{$t('trials:enrolledReviews:message:SOW')}}
</span> </span>
<el-button <el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(0, $t('trials:enrolledReviews:message:SOW'))">
size="small" {{ $t('common:button:upload') }}</el-button>
type="primary" <el-button size="small" type="primary" @click="handleDownload('Reviewer_SOW_Template')">
:disabled="$route.query.ReviewStatus === '1'"
@click="addCol(0, $t('trials:enrolledReviews:message:SOW'))"
>
{{ $t('common:button:upload') }}</el-button
>
<el-button
size="small"
type="primary"
@click="handleDownload('Reviewer_SOW_Template')"
>
<i class="el-icon-view el-icon-download"></i> <i class="el-icon-view el-icon-download"></i>
{{ $t('common:button:template') }} {{ $t('common:button:template') }}
</el-button> </el-button>
</div> </div>
<el-table :data="sowList" size="small"> <el-table :data="sowList" size="small">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
:label="$t('system:Agreements:table:Criterion Type')"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.CriterionName }} {{ scope.row.CriterionName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="FileName" :label="$t('system:Agreements:table:Statement of Work')" width="400" />
prop="FileName" <el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
:label="$t('system:Agreements:table:Statement of Work')"
width="400"
/>
<el-table-column
prop="IsEnable"
:label="$t('system:Agreements:table:Is Enable')"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.IsEnable" v-model="scope.row.IsEnable"
@ -96,81 +49,32 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Remark" :label="$t('system:Agreements:Remark')" width="200" />
prop="Remark" <el-table-column prop="CreateTime" :label="$t('system:Agreements:Upload Time')" width="150" />
:label="$t('system:Agreements:Remark')"
width="200"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:Upload Time')"
width="150"
/>
<el-table-column :label="$t('common:action:action')" width="400"> <el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
type="text" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 0, $t('trials:enrolledReviews:message:SOW'))">
size="small" {{ $t('common:button:edit') }}</el-button>
:disabled="$route.query.ReviewStatus === '1'" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{ $t('common:button:delete') }}</el-button>
@click="handlePreview3(scope.row)"
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="
handleEditCol(
scope.row,
0,
$t('trials:enrolledReviews:message:SOW')
)
"
>
{{ $t('common:button:edit') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile3(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="margin-top: 20px" v-if="!$route.query.ReviewStatus"> <div style="margin-top:20px" v-if="!$route.query.ReviewStatus">
<span style="margin-right: 20px"> <span style="margin-right: 20px">
{{ $t('trials:enrolledReviews:message:EQC') }} {{$t('trials:enrolledReviews:message:EQC')}}
</span> </span>
<el-button <el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:upload')}}</el-button>
size="small"
type="primary"
:disabled="$route.query.ReviewStatus === '1'"
@click="addCol(1, $t('trials:enrolledReviews:message:EQC'))"
>{{ $t('common:button:upload') }}</el-button
>
</div> </div>
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus"> <el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
:label="$t('system:Agreements:table:Criterion Type')"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.CriterionName }} {{ scope.row.CriterionName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="FileName" :label="$t('system:Agreements:table:Acknowledgement of SOW')" width="400" />
prop="FileName" <el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
:label="$t('system:Agreements:table:Acknowledgement of SOW')"
width="400"
/>
<el-table-column
prop="IsEnable"
:label="$t('system:Agreements:table:Is Enable')"
width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.IsEnable" v-model="scope.row.IsEnable"
@ -180,45 +84,13 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Remark" :label="$t('system:Agreements:table:Remark')" width="200" />
prop="Remark" <el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
:label="$t('system:Agreements:table:Remark')" <el-table-column label="Action" width="400">
width="200"
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Agreements:table:Upload Time')"
width="150"
/>
<el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('common:button:view')}}</el-button>
type="text" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:edit')}}</el-button>
size="small" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{$t('common:button:delete')}}</el-button>
:disabled="$route.query.ReviewStatus === '1'"
@click="handlePreview3(scope.row)"
>{{ $t('common:button:view') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="
handleEditCol(
scope.row,
1,
$t('trials:enrolledReviews:message:EQC')
)
"
>{{ $t('common:button:edit') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile3(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -231,10 +103,7 @@
label-width="120px" label-width="120px"
size="small" size="small"
> >
<el-form-item <el-form-item :label="$t('system:Agreements:label:Criterion Type')" prop="CriterionType">
:label="$t('system:Agreements:label:Criterion Type')"
prop="CriterionType"
>
<el-select v-model="form.CriterionType"> <el-select v-model="form.CriterionType">
<el-option <el-option
v-for="item of $d.CriterionType" v-for="item of $d.CriterionType"
@ -244,10 +113,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:Agreements:label:File')" prop="FilePath">
:label="$t('system:Agreements:label:File')"
prop="FilePath"
>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action action
@ -257,25 +123,14 @@
:on-remove="handleRemoveFile2" :on-remove="handleRemoveFile2"
:show-file-list="true" :show-file-list="true"
:limit="1" :limit="1"
accept=".pdf"
:file-list="fileList" :file-list="fileList"
> >
<el-button <el-button size="small" type="primary" :disabled="fileList.length > 0">{{$t('common:button:upload')}}</el-button>
size="small"
type="primary"
:disabled="fileList.length > 0"
>{{ $t('common:button:upload') }}</el-button
>
<span>{{ $t('system:tip:file:pdf') }}</span>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Agreements:label:Remark')"> <el-form-item :label="$t('system:Agreements:label:Remark')">
<el-input <el-input v-model="form.Remark" type="textarea"
v-model="form.Remark" :autosize="{ minRows: 2, maxRows: 4}"></el-input>
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
:maxlength="4000"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Agreements:label:Is Enable')"> <el-form-item :label="$t('system:Agreements:label:Is Enable')">
<el-switch <el-switch
@ -287,20 +142,8 @@
</el-form> </el-form>
</template> </template>
<template slot="dialog-footer"> <template slot="dialog-footer">
<el-button <el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">{{ $t('common:button:cancel') }}</el-button>
:disabled="btnLoading" <el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
size="small"
type="primary"
@click="handleCancle"
>{{ $t('common:button:cancel') }}</el-button
>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</template> </template>
</BaseModel> </BaseModel>
</div> </div>
@ -308,43 +151,25 @@
<script> <script>
import { uploadFile } from '@/api/attachment' import { uploadFile } from '@/api/attachment'
import UploadFiles from '@/components/UploadFiles' import UploadFiles from '@/components/UploadFiles'
import { import { getDoctorSowList, getDoctorAckSowList, addDoctorCriterionFile, deleteDoctorCriterionFile, getDoctorCriterionFile } from '@/api/reviewers'
getDoctorSowList,
getDoctorAckSowList,
addDoctorCriterionFile,
deleteDoctorCriterionFile,
getDoctorCriterionFile,
} from '@/api/reviewers'
import BaseModel from '@/components/BaseModel' import BaseModel from '@/components/BaseModel'
import { DownloadCommonDoc } from '@/api/dictionary' import { DownloadCommonDoc } from '@/api/dictionary'
export default { export default {
name: 'Agreements', name: 'Agreements',
components: { components: {
UploadFiles, UploadFiles, BaseModel
BaseModel,
},
props: {
reviewerId: {
type: String,
},
}, },
data() { data() {
return { return {
doctorId: this.$route.query.Id || this.reviewerId, doctorId: this.$route.query.Id,
agreementList: [], agreementList: [],
sowList: [], sowList: [],
ackSowList: [], ackSowList: [],
loading: false, loading: false,
isOpen: false, isOpen: false,
btnLoading: false, btnLoading: false,
model_cfg: { model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
visible: false,
showClose: true,
width: '600px',
title: '',
appendToBody: true,
},
form: { form: {
Remark: null, Remark: null,
FileType: null, FileType: null,
@ -352,56 +177,24 @@ export default {
FilePath: null, FilePath: null,
DoctorId: null, DoctorId: null,
CriterionType: null, CriterionType: null,
IsEnable: false, IsEnable: false
}, },
rules: { rules: {
Remark: [ CriterionType: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
{ FilePath: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
}, },
], fileList: []
CriterionType: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
FilePath: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
},
fileList: [],
accept: '.pdf',
} }
}, },
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
this.initSowList()
}
},
},
mounted() { mounted() {
this.initSowList() this.initSowList()
}, },
methods: { methods: {
handleDownload(code) { handleDownload(code) {
this.loading = true this.loading = true
DownloadCommonDoc(code) DownloadCommonDoc(code).then(data => {
.then((data) => {
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
}, },
handleEditCol(row, fileType, title) { handleEditCol(row, fileType, title) {
this.model_cfg.visible = true this.model_cfg.visible = true
@ -413,7 +206,7 @@ export default {
handleRemoveFile3(row) { handleRemoveFile3(row) {
this.$confirm('确定删除?').then(() => { this.$confirm('确定删除?').then(() => {
deleteDoctorCriterionFile({ deleteDoctorCriterionFile({
Id: row.Id, Id: row.Id
}).then(() => { }).then(() => {
this.initSowList() this.initSowList()
this.$message.success('删除成功') this.$message.success('删除成功')
@ -425,79 +218,41 @@ export default {
this.form.FilePath = null this.form.FilePath = null
this.fileList = [] this.fileList = []
}, },
beforeUpload(row) { beforeUpload() {
if (this.fileList.length > 0) { if (this.fileList.length > 0) {
this.$alert('最多只能传一个附件') this.$alert('最多只能传一个附件')
return return
} }
if (!this.checkFileSuffix(row.name)) {
this.$message.warning(`Must be in .pdf format`)
return false
}
}, },
handlePreview3(row) { handlePreview3(row) {
return this.$preview({
path: row.FilePath,
type: 'pdf',
title: row.FileName,
})
if (row.FilePath) { if (row.FilePath) {
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank') window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
} }
}, },
handlePreview2(row, r2) { handlePreview2(row, r2) {
return this.$preview({
path: row.fullPath,
type: 'pdf',
title: row.FileName,
})
if (row.fullPath) { if (row.fullPath) {
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank') window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
} }
}, },
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
return (
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
)
},
async handleUploadFile(param) { async handleUploadFile(param) {
try {
this.btnLoading = true this.btnLoading = true
var fileName = param.file.name var fileName = param.file.name
let file = await this.fileToBlob(param.file) let file = await this.fileToBlob(param.file)
let res = await this.OSSclient.put( let res = await this.OSSclient.put(`/SystemData/reviewer/${this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'}/${this.doctorId}/${fileName}`, file)
`/SystemData/reviewer/${
this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
}/${this.doctorId}/${fileName}`,
file
)
this.form.FileName = param.file.name this.form.FileName = param.file.name
this.form.FilePath = this.$getObjectName(res.url) this.form.FilePath = this.$getObjectName(res.url)
this.fileList[0] = { this.fileList[0] = { name: this.$getObjectName(res.url), path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url), url: res.url }
name: this.$getObjectName(res.url),
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: res.url,
}
this.btnLoading = false this.btnLoading = false
} catch (err) {
console.log(err)
}
}, },
handleCancle() { handleCancle() {
this.model_cfg.visible = false this.model_cfg.visible = false
}, },
handleSave() { handleSave() {
this.$refs['DictionaryTypeConfigForm'].validate((valid) => { this.$refs['DictionaryTypeConfigForm'].validate(valid => {
if (!valid) return if (!valid) return
this.form.DoctorId = this.doctorId this.form.DoctorId = this.doctorId
this.form.CriterionName = this.$fd( this.form.CriterionName = this.$fd('CriterionType', this.form.CriterionType)
'CriterionType', addDoctorCriterionFile(this.form).then(res => {
this.form.CriterionType
)
addDoctorCriterionFile(this.form).then((res) => {
this.$message.success('添加成功') this.$message.success('添加成功')
this.initSowList() this.initSowList()
this.handleCancle() this.handleCancle()
@ -512,8 +267,7 @@ export default {
FileName: null, FileName: null,
FilePath: null, FilePath: null,
DoctorId: null, DoctorId: null,
CriterionType: null, CriterionType: null
IsEnable: false,
} }
this.handleRemoveFile2() this.handleRemoveFile2()
this.form.FileType = fileType this.form.FileType = fileType
@ -523,24 +277,18 @@ export default {
if (!this.doctorId) return if (!this.doctorId) return
getDoctorCriterionFile({ getDoctorCriterionFile({
fileType: 0, fileType: 0,
DoctorId: this.doctorId, DoctorId: this.doctorId
}).then((res) => { }).then(res => {
this.sowList = res.Result this.sowList = res.Result
}) })
getDoctorCriterionFile({ getDoctorCriterionFile({
fileType: 1, fileType: 1,
DoctorId: this.doctorId, DoctorId: this.doctorId
}).then((res) => { }).then(res => {
this.ackSowList = res.Result this.ackSowList = res.Result
}) })
}, },
handlePreview(row) { handlePreview(row) {
console.log(row)
return this.$preview({
path: row.FullPath,
type: 'pdf',
title: row.FileName,
})
if (row.FullPath) { if (row.FullPath) {
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank') window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
} }
@ -550,12 +298,12 @@ export default {
}, },
getFileList(fileList) { getFileList(fileList) {
this.agreementList = fileList this.agreementList = fileList
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.resumes-container { .resumes-container{
p { p {
float: left; float: left;
font-size: 13px; font-size: 13px;
@ -566,4 +314,5 @@ export default {
float: left; float: left;
} }
} }
</style> </style>

View File

@ -15,65 +15,31 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item v-if="basicInfo.ReviewerCode" :label="$t('system:reviewer:label:Id')">
v-if="basicInfo.ReviewerCode" <el-input v-model="basicInfo.ReviewerCode" disabled size="small" />
:label="$t('system:reviewer:label:Id')"
>
<el-input
v-model="basicInfo.ReviewerCode"
disabled
size="small"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:LastName')" prop="LastName">
:label="$t('system:reviewer:label:LastName')" <el-input v-model="basicInfo.LastName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
prop="LastName"
>
<el-input
v-model="basicInfo.LastName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:FirstName')" prop="FirstName">
:label="$t('system:reviewer:label:FirstName')" <el-input v-model="basicInfo.FirstName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
prop="FirstName"
>
<el-input
v-model="basicInfo.FirstName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:NameCN')" prop="ChineseName">
:label="$t('system:reviewer:label:NameCN')" <el-input v-model="basicInfo.ChineseName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
prop="ChineseName"
>
<el-input
v-model="basicInfo.ChineseName"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Gender')" prop="Sex">
:label="$t('system:reviewer:label:Gender')"
prop="Sex"
>
<el-select <el-select
v-model="basicInfo.Sex" v-model="basicInfo.Sex"
prop="Sex" prop="Sex"
@ -93,23 +59,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Phone')" prop="Phone">
:label="$t('system:reviewer:label:Phone')" <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="basicInfo.Phone" size="small" />
prop="Phone"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.Phone"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Title')" prop="TitleIds">
:label="$t('system:reviewer:label:Title')"
prop="TitleIds"
>
<el-select <el-select
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.TitleIds[0]" v-model="basicInfo.TitleIds[0]"
@ -134,23 +89,15 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Email')" prop="EMail">
:label="$t('system:reviewer:label:Email')" <el-input v-model="basicInfo.EMail" :disabled="$route.query.ReviewStatus === '1'" size="small" />
prop="EMail"
>
<el-input
v-model="basicInfo.EMail"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12">--> <!-- <el-col :span="12">-->
<!-- <el-form-item label="WeChat: " prop="WeChat">--> <!-- <el-form-item label="WeChat: " prop="WeChat">-->
<!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />--> <!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </el-col>--> <!-- </el-col>-->
<el-col :span="12"> <el-col :span="12">
<!-- <el-form-item label="Payment Type: " prop="Nation"> <!-- <el-form-item label="Payment Type: " prop="Nation">
<el-radio-group v-model="basicInfo.Nation"> <el-radio-group v-model="basicInfo.Nation">
@ -159,10 +106,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> --> </el-form-item> -->
<el-form-item <el-form-item :label="$t('system:reviewer:label:Country')" prop="Nation">
:label="$t('system:reviewer:label:Country')"
prop="Nation"
>
<el-select <el-select
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="basicInfo.Nation" v-model="basicInfo.Nation"
@ -170,18 +114,13 @@
clearable clearable
class="mr" class="mr"
> >
<el-option <el-option v-for="item of $d.AttendedReviewerType" :value="item.value" :label="item.label" :key="item.id"/>
v-for="item of $d.AttendedReviewerType"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>--> <!-- <el-row>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row> <el-row>
<el-form-item style="margin-left: 120px"> <el-form-item style="margin-left: 120px">
<el-button <el-button
@ -190,9 +129,7 @@
:loading="isDisabled" :loading="isDisabled"
size="small" size="small"
@click="handleSave" @click="handleSave"
> > {{ $t('common:button:save') }}</el-button>
{{ $t('common:button:save') }}</el-button
>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
@ -205,15 +142,6 @@ import { getBasicInfo, addOrUpdateDoctorBasicInfo } from '@/api/reviewers'
import { changeURLStatic } from '@/utils/history.js' import { changeURLStatic } from '@/utils/history.js'
import { getBasicDataSelects } from '@/api/dictionary/dictionary' import { getBasicDataSelects } from '@/api/dictionary/dictionary'
export default { export default {
props: {
reviewerId: {
type: String,
},
isSystem: {
type: Boolean,
default: true,
},
},
data() { data() {
return { return {
basicInfo: { basicInfo: {
@ -228,86 +156,58 @@ export default {
EMail: '', EMail: '',
WeChat: '', WeChat: '',
Introduction: '', Introduction: '',
Nation: 0, Nation: 0
}, },
rules: { rules: {
FirstName: [ FirstName: [
{ {
required: true, required: true,
message: 'Please enter FirstName', message: 'Please enter FirstName',
trigger: 'blur', trigger: 'blur'
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
}, },
{ max: 50, message: 'The maximum length is 50' }
], ],
LastName: [ LastName: [
{ required: true, message: 'Please enter LastName', trigger: 'blur' }, { required: true, message: 'Please enter LastName', trigger: 'blur' },
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
ChineseName: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
], ],
ChineseName: [{ max: 50, message: 'The maximum length is 50' }],
Sex: [ Sex: [
{ required: true, message: 'Please select gender', trigger: 'blur' }, { required: true, message: 'Please select gender', trigger: 'blur' }
], ],
TitleIds: [ TitleIds: [
{ required: true, message: 'Please select Title', trigger: 'blur' }, { required: true, message: 'Please select Title', trigger: 'blur' }
], ],
Phone: [ Phone: [
{ {
required: true, required: true,
message: 'Please enter phone number', message: 'Please enter phone number',
trigger: 'blur', trigger: 'blur'
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
}, },
{ max: 20, min: 7, message: 'The length is 7 to 20' }
], ],
EMail: [ EMail: [
{ {
required: true, required: true,
message: 'Please input the email address', message: 'Please input the email address',
trigger: 'blur', trigger: 'blur'
}, },
{ {
type: 'email', type: 'email',
message: 'Please input the correct email address', message: 'Please input the correct email address',
trigger: 'blur,change', trigger: 'blur,change'
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
WeChat: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
}, },
{ max: 50, message: 'The maximum length is 50' }
], ],
WeChat: [{ max: 50, message: 'The maximum length is 50' }]
}, },
isDisabled: false, isDisabled: false,
loading: false, loading: false,
genderOptions: [ genderOptions: [
{ label: 'Male', value: 0 }, { label: 'Male', value: 0 },
{ label: 'Female', value: 1 }, { label: 'Female', value: 1 }
], ],
dictionaryList: {}, dictionaryList: {}
} }
}, },
mounted() { mounted() {
@ -327,12 +227,7 @@ export default {
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
if (!this.id) { if (!this.id) {
this.basicInfo.Id = res.Result.Id this.basicInfo.Id = res.Result.Id
if (this.isSystem) {
changeURLStatic('Id', res.Result.Id) changeURLStatic('Id', res.Result.Id)
}
if (!this.reviewerId) {
this.$emit('update:reviewerId', res.Result.Id)
}
this.basicInfo.ReviewerCode = res.Result.ReviewerCode this.basicInfo.ReviewerCode = res.Result.ReviewerCode
} }
}) })
@ -346,29 +241,27 @@ export default {
async initForm() { async initForm() {
await this.getDicData() await this.getDicData()
const id = this.$route.query.Id || this.reviewerId const id = this.$route.query.Id
if (id) { if (id) {
this.loading = true this.loading = true
getBasicInfo(id) getBasicInfo(id).then((res) => {
.then((res) => {
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
const { TitleList, ...param } = res.Result const { TitleList, ...param } = res.Result
this.basicInfo = param this.basicInfo = param
this.loading = false this.loading = false
}) }).catch(() => {
.catch(() => {
this.loading = false this.loading = false
}) })
} }
}, },
getDicData() { getDicData() {
getBasicDataSelects(['Title']) getBasicDataSelects(['Title']).then(res => {
.then((res) => {
this.dictionaryList = { ...res.Result } this.dictionaryList = { ...res.Result }
}).catch(() => {
}) })
.catch(() => {}) }
}, }
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,90 +2,73 @@
<div class="credentials-container"> <div class="credentials-container">
<div class="clearfix"> <div class="clearfix">
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">{{$t('system:Credentials:title:Diploma of the highest medical degree')}}
{{
$t('system:Credentials:title:Diploma of the highest medical degree')
}}
</p> </p>
<upload-file <upload-file :doctor-id="doctorId" type="Diploma of the highest medical degree" />
:doctor-id="doctorId" <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">-->
type="Diploma of the highest medical degree" <!-- <i class="el-icon-view el-icon-download"></i>-->
/> <!-- Template-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">--> <!-- </el-button>-->
<!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- Template-->
<!-- </el-button>-->
</el-card> </el-card>
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">{{$t('system:Credentials:title:Medical Qualification Certificate')}}
{{ $t('system:Credentials:title:Medical Qualification Certificate') }} <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file <upload-file :doctor-id="doctorId" type="Medical Qualification Certificate" />
:doctor-id="doctorId"
type="Medical Qualification Certificate"
/>
</el-card> </el-card>
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">{{$t('system:Credentials:title:Practice License')}}
{{ $t('system:Credentials:title:Practice License') }} <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file :doctor-id="doctorId" type="Practice License" /> <upload-file :doctor-id="doctorId" type="Practice License" />
</el-card> </el-card>
</div> </div>
<h6 style="line-height: 30px; font-size: 13px"> <h6 style="line-height:30px;font-size:13px;">{{$t('system:Credentials:title:Modality Certificate')}}</h6>
{{ $t('system:Credentials:title:Modality Certificate') }}
</h6>
<div class="clearfix"> <div class="clearfix">
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">CT
CT <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(CT)" /> <upload-file :doctor-id="doctorId" type="Modality Certificate(CT)" />
</el-card> </el-card>
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">MRI
MRI <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(MRI)" /> <upload-file :doctor-id="doctorId" type="Modality Certificate(MRI)" />
</el-card> </el-card>
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">NM
NM <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(NM)" /> <upload-file :doctor-id="doctorId" type="Modality Certificate(NM)" />
</el-card> </el-card>
<el-card class="e-card"> <el-card class="e-card">
<p class="title"> <p class="title">US
US <!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">-->
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">--> <!-- <i class="el-icon-view el-icon-download"></i>-->
<!-- <i class="el-icon-view el-icon-download"></i>--> <!-- Template-->
<!-- Template--> <!-- </el-button>-->
<!-- </el-button>-->
</p> </p>
<upload-file :doctor-id="doctorId" type="Modality Certificate(US)" /> <upload-file :doctor-id="doctorId" type="Modality Certificate(US)" />
</el-card> </el-card>
@ -97,41 +80,25 @@ import UploadFile from '@/components/UploadFile'
import { DownloadCommonDoc } from '@/api/dictionary' import { DownloadCommonDoc } from '@/api/dictionary'
export default { export default {
components: { components: {
UploadFile, UploadFile
},
props: {
reviewerId: {
type: String,
},
}, },
data() { data() {
return { return {
doctorId: this.$route.query.Id || this.reviewerId, doctorId: this.$route.query.Id
} }
}, },
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
}
},
},
methods: { methods: {
handleDownload(code) { handleDownload(code) {
this.loading = true this.loading = true
DownloadCommonDoc(code) DownloadCommonDoc(code).then(data => {
.then((data) => {
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => { }
this.loading = false }
})
},
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.credentials-container { .credentials-container{
.e-card { .e-card {
width: 32.5%; width: 32.5%;
height: 180px; height: 180px;
@ -139,14 +106,15 @@ export default {
position: relative; position: relative;
float: left; float: left;
margin: 0px 10px 5px 0px; margin: 0px 10px 5px 0px;
.title { .title{
font-size: 13px; font-size: 13px;
margin-bottom: 15px; margin-bottom: 15px;
font-weight: bold; font-weight: bold;
} }
} }
h6 { h6{
margin: 0; margin:0;
} }
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="form-container"> <div class="form-container">
<el-card class="box-card"> <el-card class="box-card">
<div style="width: 80%"> <div style="width:80%;">
<el-form <el-form
ref="employmentForm" ref="employmentForm"
v-loading="loading" v-loading="loading"
@ -10,65 +10,42 @@
class="demo-ruleForm" class="demo-ruleForm"
label-width="150px" label-width="150px"
> >
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Hospital')" prop="HospitalId">
:label="$t('system:reviewer:label:Hospital')" <el-select
prop="HospitalName" v-model="employmentForm.HospitalId"
placeholder="select"
:disabled="$route.query.ReviewStatus === '1'"
style="width:100%;"
size="small"
@change="handleHospitalChange"
> >
<el-autocomplete <el-option
clearable v-for="(item,index) in hospitalList"
class="inline-input" :key="index"
style="width: 100%" :label="item.HospitalName"
v-model="employmentForm.HospitalName" :value="item.Id"
:fetch-suggestions="querySearch" >
@select="handleSelect" <span>
placeholder="Please specify in English" {{ item.HospitalName }}
@change="handleChange" </span>
></el-autocomplete> </el-option>
</el-form-item> </el-select>
</el-col>
<el-col :span="14">
<el-form-item prop="HospitalNameCN">
<el-autocomplete
clearable
class="inline-input"
style="width: 100%"
v-model="employmentForm.HospitalNameCN"
:fetch-suggestions="querySearchCN"
@select="handleSelect"
placeholder="请用中文注明"
@change="handleChange"
></el-autocomplete>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item <el-form-item :label="$t('system:reviewer:label:AffiliatedUniversity')">
:label="$t('system:reviewer:label:AffiliatedUniversity')"
prop="UniversityAffiliated"
>
<el-input <el-input
v-model="employmentForm.UniversityAffiliated" :disabled="$route.query.ReviewStatus === '1'"
v-model="UniversityAffiliated"
type="textarea" type="textarea"
autosize autosize
placeholder="Please specify in English"
size="small" size="small"
:maxlength="4000"
/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item prop="UniversityAffiliated">
<el-input
v-model="employmentForm.UniversityAffiliatedCN"
type="textarea"
autosize
placeholder="请用中文注明"
size="small"
:maxlength="4000"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -76,59 +53,33 @@
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:City')"> <el-form-item :label="$t('system:reviewer:label:City')">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="City" size="small" />
v-model="employmentForm.City"
size="small"
placeholder="Please specify in English"
/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item>
<el-input
v-model="employmentForm.CityCN"
size="small"
placeholder="请用中文注明"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:State/Province')"> <el-form-item :label="$t('system:reviewer:label:State/Province')">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Province" size="small" />
disabled
v-model="Province"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item :label="$t('system:reviewer:label:Country')"> <el-form-item :label="$t('system:reviewer:label:Country')">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Country" size="small" />
disabled
v-model="Country"
size="small"
:maxlength="400"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> --> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Department')" prop="DepartmentId">
:label="$t('system:reviewer:label:Department')"
prop="DepartmentId"
>
<el-select <el-select
v-model="employmentForm.DepartmentId" v-model="employmentForm.DepartmentId"
placeholder="select" placeholder="select"
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
style="width: 100%" style="width:100%;"
size="small" size="small"
> >
<!-- <el-option <!-- <el-option
@ -143,40 +94,27 @@
:label="item.Value" :label="item.Value"
:value="item.Id" :value="item.Id"
/> />
<el-option <el-option label="Other" :value="otherId" />
:label="$t('curriculumVitae:selectLabel:Other')"
:value="otherId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item <el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOther">
v-if="employmentForm.DepartmentId === otherId"
class="other-item"
prop="DepartmentOther"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.DepartmentOther" v-model="employmentForm.DepartmentOther"
placeholder="Please specify (required)" placeholder="Please specify (required)"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item <el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOtherCN">
v-if="employmentForm.DepartmentId === otherId"
class="other-item"
prop="DepartmentOtherCN"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.DepartmentOtherCN" v-model="employmentForm.DepartmentOtherCN"
placeholder="请用中文注明" placeholder="请用中文注明"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -184,16 +122,13 @@
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Rank')" prop="RankId">
:label="$t('system:reviewer:label:Rank')"
prop="RankId"
>
<el-select <el-select
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankId" v-model="employmentForm.RankId"
placeholder="select" placeholder="select"
@change="RankChange" @change="RankChange"
style="width: 100%" style="width:100%;"
size="small" size="small"
> >
<!-- <el-option <!-- <el-option
@ -208,93 +143,124 @@
:label="item.label" :label="item.label"
:value="item.id" :value="item.id"
/> />
<!-- <el-option label="Other" :value="otherId" />--> <!-- <el-option label="Other" :value="otherId" />-->
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item <el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOther">
v-if="
$fd('Rank', employmentForm.RankId, 'id') ===
$t('curriculumVitae:selectLabel:Other')
"
class="other-item"
prop="RankOther"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankOther" v-model="employmentForm.RankOther"
placeholder="Please specify" placeholder="Please specify"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item <el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOtherCN">
v-if="
$fd('Rank', employmentForm.RankId, 'id') ===
$t('curriculumVitae:selectLabel:Other')
"
class="other-item"
prop="RankOtherCN"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.RankOtherCN" v-model="employmentForm.RankOtherCN"
placeholder="请用中文注明" placeholder="请用中文注明"
size="small" size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item
:label="$t('system:reviewer:label:WorkPartTime')"
prop="WorkPartTime"
>
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.WorkPartTime"
type="textarea"
:rows="2"
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJob')
"
size="small"
:maxlength="4000"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item prop="WorkPartTimeEn">
<el-input
:disabled="$route.query.ReviewStatus === '1'"
v-model="employmentForm.WorkPartTimeEn"
type="textarea"
:rows="2"
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJobEN')
"
size="small"
:maxlength="4000"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Physician: " prop="PhysicianId" >-->
<!-- <el-select-->
<!-- v-model="employmentForm.PhysicianId"-->
<!-- placeholder="select"-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- @change="PhysicianChange"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item of $d.PhysicianOriginal"-->
<!-- :key="item.id"-->
<!-- :label="item.raw.Value"-->
<!-- :value="item.id"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="Physician">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.Physician"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="PhysicianCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PhysicianCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="14">-->
<!-- <el-form-item label="Position: " prop="PositionId">-->
<!-- <el-select-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionId"-->
<!-- placeholder="select"-->
<!-- style="width:100%;"-->
<!-- size="small"-->
<!-- >-->
<!-- &lt;!&ndash; <el-option-->
<!-- v-for="(key,value) of dictionaryList.Position"-->
<!-- :key="key"-->
<!-- :label="key"-->
<!-- :value="value"-->
<!-- /> &ndash;&gt;-->
<!-- <el-option-->
<!-- v-for="item of dictionaryList.Position"-->
<!-- :key="item.Id"-->
<!-- :label="item.Value"-->
<!-- :value="item.Id"-->
<!-- />-->
<!-- <el-option label="Other" :value="otherId" />-->
<!-- <el-option label="None" value="f30a074b-2b47-4a92-97ec-e15086d37883" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOther">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOther"-->
<!-- placeholder="Please specify"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="5">-->
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOtherCN">-->
<!-- <el-input-->
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
<!-- v-model="employmentForm.PositionOtherCN"-->
<!-- placeholder="请用中文注明"-->
<!-- size="small"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-form-item> <el-form-item>
<el-button <el-button type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'" size="small" @click="handleSave">{{ $t('common:button:save') }}</el-button>
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
size="small"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -308,14 +274,9 @@ import store from '@/store'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'Employment', name: 'Employment',
props: {
reviewerId: {
type: String,
},
},
data() { data() {
const RankIndication = (rule, value, callback) => { const RankIndication = (rule, value, callback) => {
if (value === this.$t('curriculumVitae:selectLabel:Other')) { if (value === '其它' || value === 'Other') {
if (!this.trialForm.IndicationOther) { if (!this.trialForm.IndicationOther) {
return callback(new Error('请输入适应症')) return callback(new Error('请输入适应症'))
} }
@ -323,7 +284,7 @@ export default {
callback() callback()
} }
const PhysicianIndication = (rule, value, callback) => { const PhysicianIndication = (rule, value, callback) => {
if (value === this.$t('curriculumVitae:selectLabel:Other')) { if (value === '其它' || value === 'Other') {
if (!this.trialForm.IndicationOther) { if (!this.trialForm.IndicationOther) {
return callback(new Error('请输入适应症')) return callback(new Error('请输入适应症'))
} }
@ -332,7 +293,7 @@ export default {
} }
return { return {
employmentForm: { employmentForm: {
Id: this.$route.query.Id || this.reviewerId, Id: this.$route.query.Id,
DepartmentId: '', DepartmentId: '',
DepartmentOther: '', DepartmentOther: '',
DepartmentOtherCN: '', DepartmentOtherCN: '',
@ -346,236 +307,49 @@ export default {
PhysicianId: '', PhysicianId: '',
Physician: '', Physician: '',
PhysicianCN: '', PhysicianCN: '',
PhysicianOriginal: null, PhysicianOriginal: null
HospitalName: '',
HospitalNameCN: '',
WorkPartTime: null,
WorkPartTimeEn: null,
UniversityAffiliated: null,
UniversityAffiliatedCN: null,
City: null,
CityCN: null,
}, },
UniversityAffiliated: '', UniversityAffiliated: '',
City: '', City: '',
Province: '', Province: '',
Country: '', Country: '',
employmentRules: { employmentRules: {
HospitalName: [ DepartmentId: [{ required: true, message: 'Please select department', trigger: 'blur' }],
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
HospitalNameCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
DepartmentId: [
{
required: true,
message: 'Please select department',
trigger: 'blur',
},
],
DepartmentOther: [ DepartmentOther: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
DepartmentOtherCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
RankId: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
],
RankOther: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
RankOtherCN: [
{ required: true, message: 'Please select rank', trigger: 'blur' },
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
PhysicianId: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
],
Physician: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
PhysicianCN: [
{
required: true,
message: 'Please select Physician',
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
PositionId: [
{
required: true,
message: 'Please select position',
trigger: 'blur',
},
],
PositionOther: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
PositionOtherCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
HospitalId: [
{
required: true,
message: 'Please select hospital',
trigger: 'blur',
},
], ],
DepartmentOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
RankId: [{ required: true, message: 'Please select rank', trigger: 'blur' }],
RankOther: [{ required: true, message: 'Please select rank', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
RankOtherCN: [{ required: true, message: 'Please select rank', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
PhysicianId: [{ required: true, message: 'Please select Physician', trigger: 'blur' }],
Physician: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
PhysicianCN: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
PositionId: [{ required: true, message: 'Please select position', trigger: 'blur' }],
PositionOther: [{ max: 50, message: 'The maximum length is 50' }],
PositionOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
HospitalId: [{ required: true, message: 'Please select hospital', trigger: 'blur' }]
}, },
isDisabled: false, isDisabled: false,
selectId: '00000000-0000-0000-0000-000000000000', selectId: '00000000-0000-0000-0000-000000000000',
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5', otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
loading: false, loading: false,
dictionaryList: {}, dictionaryList: {}
hospitalSelectList: [],
hospitalSelectListCN: [],
} }
}, },
computed: { computed: {
...mapGetters(['hospitalList']), ...mapGetters(['hospitalList'])
isEN() {
return this.$i18n.locale !== 'zh'
},
}, },
mounted() { mounted() {
this.initEmployment() this.initEmployment()
}, },
watch: {
hospitalList: {
handler() {
if (!Array.isArray(this.hospitalList) || this.hospitalList.length <= 0)
return false
this.hospitalSelectList = []
this.hospitalList.forEach((item) => {
this.hospitalSelectList.push({
value: item.HospitalName,
...item,
})
this.hospitalSelectListCN.push({
value: item.HospitalNameCN,
...item,
})
})
},
deep: true,
},
},
methods: { methods: {
handleSelect(value) {
const item = value
if (item) {
this.employmentForm.HospitalName = item.HospitalName
this.employmentForm.HospitalNameCN = item.HospitalNameCN
this.employmentForm.UniversityAffiliated = item.UniversityAffiliated
this.employmentForm.City = item.City
this.employmentForm.UniversityAffiliatedCN = item.UniversityAffiliatedCN
this.employmentForm.CityCN = item.CityCN
} else {
this.employmentForm.UniversityAffiliated = null
this.employmentForm.City = null
this.employmentForm.UniversityAffiliatedCN = null
this.employmentForm.CityCN = null
}
},
handleChange(v) {
if (v) return
this.employmentForm.UniversityAffiliated = null
this.employmentForm.City = null
this.employmentForm.UniversityAffiliatedCN = null
this.employmentForm.CityCN = null
},
querySearch(queryString, cb) {
var hospitalList = this.hospitalSelectList
var results = queryString
? hospitalList.filter(this.createFilter(queryString))
: hospitalList
// callback
cb(results)
},
querySearchCN(queryString, cb) {
var hospitalList = this.hospitalSelectListCN
var results = queryString
? hospitalList.filter(this.createFilter(queryString, false))
: hospitalList
// callback
cb(results)
},
createFilter(queryString, isEN = true) {
return (hospitalList) => {
if (isEN) {
return (
hospitalList.HospitalName.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
} else {
return (
hospitalList.HospitalNameCN.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
}
}
},
RankChange(val) { RankChange(val) {
var o = this.$d.Rank.find((v) => { var o = this.$d.Rank.find(v => {
return v.id === val return v.id === val
}) })
if (o.label === this.$t('curriculumVitae:selectLabel:Other')) { if (o.label === '其它' || o.label === 'Other') {
this.employmentForm.RankOther = '' this.employmentForm.RankOther = ''
this.employmentForm.RankOtherCN = '' this.employmentForm.RankOtherCN = ''
} else { } else {
@ -584,10 +358,10 @@ export default {
} }
}, },
PhysicianChange(val) { PhysicianChange(val) {
var o = this.$d.PhysicianOriginal.find((v) => { var o = this.$d.PhysicianOriginal.find(v => {
return v.id === val return v.id === val
}) })
if (o.label === this.$t('curriculumVitae:selectLabel:Other')) { if (o.label === '其它' || o.label === 'Other') {
this.employmentForm.Physician = '' this.employmentForm.Physician = ''
this.employmentForm.PhysicianCN = '' this.employmentForm.PhysicianCN = ''
} else { } else {
@ -596,7 +370,7 @@ export default {
} }
}, },
handleSave() { handleSave() {
this.$refs.employmentForm.validate((valid) => { this.$refs.employmentForm.validate(valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
this.isDisabled = true this.isDisabled = true
@ -604,59 +378,29 @@ export default {
// var o = this.$d.PhysicianOriginal.find(v => { // var o = this.$d.PhysicianOriginal.find(v => {
// return v.id === this.employmentForm.PhysicianId // return v.id === this.employmentForm.PhysicianId
// }) // })
param.Id = this.$route.query.Id || this.reviewerId param.Id = this.$route.query.Id
param.DepartmentId = this.employmentForm.DepartmentId param.DepartmentId = this.employmentForm.DepartmentId
param.WorkPartTime = this.employmentForm.WorkPartTime param.DepartmentOther = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOther : ''
param.WorkPartTimeEn = this.employmentForm.WorkPartTimeEn param.DepartmentOtherCN = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOtherCN : ''
param.DepartmentOther =
this.employmentForm.DepartmentId === this.otherId
? this.employmentForm.DepartmentOther
: ''
param.DepartmentOtherCN =
this.employmentForm.DepartmentId === this.otherId
? this.employmentForm.DepartmentOtherCN
: ''
param.RankId = this.employmentForm.RankId param.RankId = this.employmentForm.RankId
param.RankOther = param.RankOther = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOther : ''
this.employmentForm.RankId === this.otherId param.RankOtherCN = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOtherCN : ''
? this.employmentForm.RankOther
: ''
param.RankOtherCN =
this.employmentForm.RankId === this.otherId
? this.employmentForm.RankOtherCN
: ''
// param.PhysicianId = this.employmentForm.PhysicianId // param.PhysicianId = this.employmentForm.PhysicianId
// param.Physician = o.label !== '' && o.label !== 'Other' ? o.raw.Value : this.employmentForm.Physician // param.Physician = o.label !== '' && o.label !== 'Other' ? o.raw.Value : this.employmentForm.Physician
// param.PhysicianCN = o.label !== '' && o.label !== 'Other' ? o.raw.ValueCN : this.employmentForm.PhysicianCN // param.PhysicianCN = o.label !== '' && o.label !== 'Other' ? o.raw.ValueCN : this.employmentForm.PhysicianCN
param.PositionId = this.employmentForm.PositionId param.PositionId = this.employmentForm.PositionId
param.PositionOther = param.PositionOther = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOther : ''
this.employmentForm.PositionId === this.otherId param.PositionOtherCN = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOtherCN : ''
? this.employmentForm.PositionOther
: ''
param.PositionOtherCN =
this.employmentForm.PositionId === this.otherId
? this.employmentForm.PositionOtherCN
: ''
param.HospitalId = this.employmentForm.HospitalId param.HospitalId = this.employmentForm.HospitalId
param.HospitalName = this.employmentForm.HospitalName updateEmploymentInfo(param).then(res => {
param.HospitalNameCN = this.employmentForm.HospitalNameCN
param.UniversityAffiliated = this.employmentForm.UniversityAffiliated
param.UniversityAffiliatedCN =
this.employmentForm.UniversityAffiliatedCN
param.City = this.employmentForm.City
param.CityCN = this.employmentForm.CityCN
updateEmploymentInfo(param)
.then((res) => {
this.isDisabled = false this.isDisabled = false
this.loading = false this.loading = false
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
if (!this.id) { if (!this.id) {
this.employmentForm.Id = res.Result this.employmentForm.Id = res.Result
} }
}) }).catch(() => {
.catch(() => {
this.isDisabled = false this.isDisabled = false
this.loading = false this.loading = false
}) })
@ -664,77 +408,37 @@ export default {
}) })
}, },
initForm() { initForm() {
const id = this.$route.query.Id || this.reviewerId const id = this.$route.query.Id
if (id) { if (id) {
this.loading = true this.loading = true
getEmploymentInfo(id) getEmploymentInfo(id).then(res => {
.then((res) => { const { PhysicianId, Physician, PhysicianCN, DepartmentId, DepartmentOther, DepartmentOtherCN, RankId, RankOther, RankOtherCN, PositionId, PositionOther, PositionOtherCN, HospitalId } = res.Result
const {
PhysicianId,
Physician,
PhysicianCN,
DepartmentId,
DepartmentOther,
DepartmentOtherCN,
RankId,
RankOther,
RankOtherCN,
PositionId,
PositionOther,
PositionOtherCN,
HospitalId,
HospitalName,
HospitalNameCN,
WorkPartTime,
WorkPartTimeEn,
UniversityAffiliated,
UniversityAffiliatedCN,
City,
CityCN,
} = res.Result
this.employmentForm.HospitalName = HospitalName
this.employmentForm.HospitalNameCN = HospitalNameCN
this.employmentForm.UniversityAffiliated = UniversityAffiliated
this.employmentForm.UniversityAffiliatedCN = UniversityAffiliatedCN
this.employmentForm.City = City
this.employmentForm.CityCN = CityCN
this.employmentForm.WorkPartTime = WorkPartTime
this.employmentForm.WorkPartTimeEn = WorkPartTimeEn
this.employmentForm.Id = id this.employmentForm.Id = id
this.employmentForm.DepartmentId = this.employmentForm.DepartmentId = DepartmentId === this.selectId ? '' : DepartmentId
DepartmentId === this.selectId ? '' : DepartmentId
this.employmentForm.DepartmentOther = DepartmentOther this.employmentForm.DepartmentOther = DepartmentOther
this.employmentForm.DepartmentOtherCN = DepartmentOtherCN this.employmentForm.DepartmentOtherCN = DepartmentOtherCN
this.employmentForm.RankId = RankId === this.selectId ? '' : RankId this.employmentForm.RankId = RankId === this.selectId ? '' : RankId
this.employmentForm.RankOther = RankOther this.employmentForm.RankOther = RankOther
this.employmentForm.RankOtherCN = RankOtherCN this.employmentForm.RankOtherCN = RankOtherCN
this.employmentForm.PositionId = this.employmentForm.PositionId = PositionId === this.selectId ? '' : PositionId
PositionId === this.selectId ? '' : PositionId
this.employmentForm.PositionOther = PositionOther this.employmentForm.PositionOther = PositionOther
this.employmentForm.PhysicianId = PhysicianId this.employmentForm.PhysicianId = PhysicianId
this.employmentForm.Physician = Physician this.employmentForm.Physician = Physician
this.employmentForm.PhysicianCN = PhysicianCN this.employmentForm.PhysicianCN = PhysicianCN
this.employmentForm.PositionOtherCN = PositionOtherCN this.employmentForm.PositionOtherCN = PositionOtherCN
this.employmentForm.HospitalId = this.employmentForm.HospitalId = HospitalId === this.selectId ? '' : HospitalId
HospitalId === this.selectId ? '' : HospitalId
this.handleHospitalChange(this.employmentForm.HospitalId) this.handleHospitalChange(this.employmentForm.HospitalId)
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
} }
}, },
handleHospitalChange(value) { handleHospitalChange(value) {
const item = this.hospitalList.filter((item) => item.Id === value) const item = this.hospitalList.filter(item => item.Id === value)
if (item.length) { if (item.length) {
this.UniversityAffiliated = this.isEN this.UniversityAffiliated = item[0].UniversityAffiliated
? item[0].UniversityAffiliated this.City = item[0].City
: item[0].UniversityAffiliatedCN this.Province = item[0].Province
this.City = this.isEN ? item[0].City : item[0].CityCN this.Country = item[0].Country
this.Province = this.isEN ? item[0].Province : item[0].ProvinceCN
this.Country = this.isEN ? item[0].Country : item[0].CountryCN
} }
}, },
async initEmployment() { async initEmployment() {
@ -743,15 +447,15 @@ export default {
this.initForm() this.initForm()
}, },
getDicData() { getDicData() {
getBasicDataSelects(['Department', 'Rank', 'Position']).then((res) => { getBasicDataSelects(['Department', 'Rank', 'Position']).then(res => {
this.dictionaryList = { ...res.Result } this.dictionaryList = { ...res.Result }
}) })
}, }
}, }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.other-item .el-form-item__content { .other-item .el-form-item__content{
margin-left: 80px !important; margin-left: 80px !important;
} }
</style> </style>

View File

@ -1,47 +1,11 @@
<template> <template>
<div class="gcp-container"> <div class="gcp-container">
<el-radio-group v-model="GCP" style="margin-bottom: 20px"> <el-radio-group v-model="GCP" style="margin-bottom:20px">
<el-radio :label="1">{{ <el-radio :label="1">{{ $t('system:GcpCertificate:radio:Yes') }}</el-radio>
$t('system:GcpCertificate:radio:Yes')
}}</el-radio>
<el-radio :label="0">{{ $t('system:GcpCertificate:radio:No') }}</el-radio> <el-radio :label="0">{{ $t('system:GcpCertificate:radio:No') }}</el-radio>
</el-radio-group> </el-radio-group>
<el-form
ref="certificateFrom"
v-loading="saveBtnLoading"
:model="certificateForm"
:rules="certificateRules"
label-width="80px"
size="small"
>
<el-form-item
:label="$t('curriculumVitae:clinicalTrials:form:CertificateTime')"
prop="GCPTime"
v-if="GCP"
>
<el-date-picker
v-model="certificateForm.GCPTime"
type="date"
placeholder=""
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:clinicalTrials:form:certificateHospital')"
prop="GCPAgencies"
v-if="GCP"
>
<el-input
v-model="certificateForm.GCPAgencies"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-form>
<div v-if="GCP" class="upload-container"> <div v-if="GCP" class="upload-container">
<!-- <upload-file :doctor-id="doctorId" type="GCP" />--> <!-- <upload-file :doctor-id="doctorId" type="GCP" />-->
<el-upload <el-upload
class="upload-demo" class="upload-demo"
action action
@ -55,23 +19,12 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
accept=".pdf" accept=".pdf"
> >
<el-button size="small" type="primary" :loading="btnDisabled">{{ <el-button size="small" type="primary" :loading="btnDisabled">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
$t('system:GcpCertificate:upload:Upload') <span slot="tip" style="margin-left:10px;" class="el-upload__tip">{{ $t('system:tip:file:pdf') }}</span>
}}</el-button>
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">{{
$t('system:tip:file:pdf')
}}</span>
</el-upload> </el-upload>
</div> </div>
<div> <div>
<el-button <el-button :loading="saveBtnLoading" :disabled="(fileList.length === 0 && GCP === 1)" type="primary" size="small" style="margin-top:20px" @click="handleSaveGCP">
:loading="saveBtnLoading"
:disabled="fileList.length === 0 && GCP === 1"
type="primary"
size="small"
style="margin-top: 20px"
@click="handleSaveGCP"
>
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -79,43 +32,26 @@
</template> </template>
<script> <script>
import UploadFile from '@/components/UploadFile' import UploadFile from '@/components/UploadFile'
import { import { uploadFile, deleteAttachment, getAttachmentByType, saveAttachments } from '@/api/attachment'
uploadFile,
deleteAttachment,
getAttachmentByType,
saveAttachments,
} from '@/api/attachment'
import { updateGcpExperience } from '@/api/reviewers' import { updateGcpExperience } from '@/api/reviewers'
const defaultCertificateForm = () => {
return {
GCPTime: '',
GCPAgencies: '',
}
}
export default { export default {
name: 'GcpCertificate', name: 'GcpCertificate',
components: { components: {
UploadFile, UploadFile
}, },
props: { props: {
doctorId: { doctorId: {
type: String, type: String,
required: true, required: true
}, },
gcp: { gcp: {
type: Number, type: Number,
default: 0, default: 0
}, },
gcpId: { gcpId: {
type: String, type: String,
default: '', default: ''
}, }
DATA: {
type: Object,
default: () => {
return {}
},
},
}, },
data() { data() {
return { return {
@ -123,17 +59,7 @@ export default {
btnDisabled: false, btnDisabled: false,
saveBtnLoading: false, saveBtnLoading: false,
GCP: 0, GCP: 0,
GCPID: '', GCPID: ''
certificateForm: defaultCertificateForm(),
certificateRules: {
GCPAgencies: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
},
} }
}, },
watch: { watch: {
@ -142,16 +68,7 @@ export default {
}, },
gcpId(val) { gcpId(val) {
this.GCPID = val this.GCPID = val
}, }
DATA: {
handler() {
Object.keys(this.certificateForm).forEach((key) => {
this.certificateForm[key] = this.DATA[key]
})
},
immediate: true,
deep: true,
},
}, },
mounted() { mounted() {
this.initFileList() this.initFileList()
@ -159,35 +76,30 @@ export default {
methods: { methods: {
handleSaveGCP() { handleSaveGCP() {
if (this.GCP && this.GCPID === '') { if (this.GCP && this.GCPID === '') {
this.$message.info( this.$message.info(this.$t('reviewers:GCPCertificate:message:uploadValid'))
this.$t('reviewers:GCPCertificate:message:uploadValid')
)
return return
} }
const param = { const param = {
Id: this.doctorId, Id: this.doctorId,
GCP: this.GCP, GCP: this.GCP,
GCPId: this.GCP ? this.GCPID : '', GCPId: this.GCP ? this.GCPID : ''
GCPTime: this.GCP ? this.certificateForm.GCPTime : '',
GCPAgencies: this.GCP ? this.certificateForm.GCPAgencies : '',
} }
this.saveBtnLoading = true this.saveBtnLoading = true
updateGcpExperience(param) updateGcpExperience(param).then(res => {
.then((res) => {
if (this.GCP === 0) { if (this.GCP === 0) {
this.fileList = [] this.fileList = []
} }
this.saveBtnLoading = false this.saveBtnLoading = false
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
}) }).catch(() => {
.catch(() => {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
}, },
initFileList() { initFileList() {
if (!this.doctorId) return if(!this.doctorId) return
getAttachmentByType(this.doctorId, 'GCP').then((res) => { getAttachmentByType(this.doctorId, 'GCP')
.then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
if (res.Result.length > 0) { if (res.Result.length > 0) {
this.fileList = this.formatterFileList(res.Result) this.fileList = this.formatterFileList(res.Result)
@ -199,13 +111,13 @@ export default {
}, },
formatterFileList(list) { formatterFileList(list) {
var arr = [] var arr = []
list.forEach((item) => { list.forEach(item => {
var data = { var data = {
name: item.FileName, name: item.FileName,
path: item.Path, path: item.Path,
fullPath: item.FullPath, fullPath: item.FullPath,
id: item.Id, id: item.Id,
type: item.Type, type: item.Type
} }
arr.push(data) arr.push(data)
}) })
@ -215,17 +127,8 @@ export default {
var fileName = param.file.name var fileName = param.file.name
this.btnDisabled = true this.btnDisabled = true
const file = await this.fileToBlob(param.file) const file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put( const res = await this.OSSclient.put(`/SystemData/reviewer/GCP/${this.doctorId}/${fileName}`, file)
`/SystemData/reviewer/GCP/${this.doctorId}/${fileName}`, this.fileList.push({ name: fileName, path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url),url: this.$getObjectName(res.url), type: 'GCP' })
file
)
this.fileList.push({
name: fileName,
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: this.$getObjectName(res.url),
type: 'GCP',
})
this.saveFile() this.saveFile()
}, },
// uploadFile(param) { // uploadFile(param) {
@ -244,17 +147,8 @@ export default {
// }, // },
saveFile() { saveFile() {
const { name, path, fullPath, type } = this.fileList[0] const { name, path, fullPath, type } = this.fileList[0]
const param = [ const param = [{ DoctorId: this.doctorId, Type: type, Path: path, FullPath: fullPath, FileName: name }]
{ saveAttachments(param).then(res => {
DoctorId: this.doctorId,
Type: type,
Path: path,
FullPath: fullPath,
FileName: name,
},
]
saveAttachments(param)
.then((res) => {
this.btnDisabled = false this.btnDisabled = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList[0].id = res.Result[0].Id this.fileList[0].id = res.Result[0].Id
@ -283,13 +177,13 @@ export default {
handleRemoveFile(file, fileList) { handleRemoveFile(file, fileList) {
if (file && file.status === 'success') { if (file && file.status === 'success') {
if (file.id) { if (file.id) {
deleteAttachment(file.id, file.path).then((res) => { deleteAttachment(file.id, file.path).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.fileList = [] this.fileList = []
this.GCPID = '' this.GCPID = ''
this.$message({ this.$message({
message: this.$t('common:message:deletedSuccessfully'), message: this.$t('common:message:deletedSuccessfully'),
type: 'success', type: 'success'
}) })
} }
}) })
@ -308,20 +202,18 @@ export default {
this.$message.warning(`Upload is currently limited to 1 file`) this.$message.warning(`Upload is currently limited to 1 file`)
}, },
fileValid(fileName, typeArr) { fileValid(fileName, typeArr) {
var extendName = fileName var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
.substring(fileName.lastIndexOf('.') + 1)
.toLocaleLowerCase()
if (typeArr.indexOf(extendName) > -1) { if (typeArr.indexOf(extendName) > -1) {
return true return true
} else { } else {
return false return false
} }
}, }
}, }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.gcp-container { .gcp-container{
.upload-container .el-upload--text { .upload-container .el-upload--text {
border: none; border: none;
width: 80px; width: 80px;

View File

@ -1,236 +0,0 @@
<template>
<div class="form-container basic-form">
<el-card class="box-card">
<div style="width: 1000px">
<!-- v-loading="loading" -->
<el-form
ref="payForm"
v-loading="loading"
:inline="true"
:rules="rules"
:model="form"
class="demo-ruleForm"
label-width="120px"
size="small"
>
<div>{{ $t('system:reviewer:title:pay') }}</div>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('system:reviewer:label:BankNum')"
prop="BankNum"
>
<el-input
v-model="form.BankNum"
clearable
size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('system:reviewer:label:BankName')"
prop="BankName"
>
<el-input
v-model="form.BankName"
clearable
size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('system:reviewer:label:OpeningBank')"
prop="OpeningBank"
>
<el-input
v-model="form.OpeningBank"
clearable
size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('system:reviewer:label:IdCard')"
prop="IdCard"
>
<el-input
v-model="form.IdCard"
clearable
size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('system:reviewer:label:BankPhoneNum')"
prop="BankPhoneNum"
>
<el-input
v-model="form.BankPhoneNum"
clearable
size="small"
:maxlength="400"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item style="margin-left: 120px">
<el-button
:disabled="$route.query.ReviewStatus === '1'"
type="primary"
:loading="loading"
size="small"
@click="handleSave"
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item>
</el-row>
</el-form>
</div>
</el-card>
</div>
</template>
<script>
import { getDetail, updatePaymentMode } from '@/api/reviewers'
export default {
props: {
reviewerId: {
type: String,
},
},
data() {
return {
loading: false,
form: {
BankNum: '',
BankName: '',
OpeningBank: '',
IdCard: '',
BankPhoneNum: '',
},
rules: {
BankNum: [
{
validator: (rule, value, callback) => {
let reg = new RegExp(/^[A-Za-z0-9]+$/, 'ig')
if (value && !reg.test(value)) {
callback(new Error(this.$t('common:ruleMessage:pattern')))
} else {
callback()
}
},
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
BankName: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
OpeningBank: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
IdCard: [
{
validator: (rule, value, callback) => {
let reg = new RegExp(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/, 'ig')
if (value && !reg.test(value)) {
callback(new Error(this.$t('common:ruleMessage:pattern')))
} else {
callback()
}
},
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
BankPhoneNum: [
{
validator: (rule, value, callback) => {
let reg = new RegExp(/^\d{11}$/, 'i')
if (value && !reg.test(value)) {
callback(new Error(this.$t('common:ruleMessage:pattern')))
} else {
callback()
}
},
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
},
}
},
mounted() {
this.getDetail()
},
methods: {
async handleSave() {
try {
let validate = await this.$refs.payForm.validate()
if (!validate) return false
this.form.Id = this.$route.query.Id || this.reviewerId
this.loading = true
let res = await updatePaymentMode(this.form)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
async getDetail() {
try {
let id = this.$route.query.Id || this.reviewerId
if (!id) return false
this.loading = true
let res = await getDetail(id)
this.loading = false
if (res.IsSuccess) {
Object.keys(this.form).forEach((key) => {
this.form[key] = res.Result.PaymentModeInfo[key]
})
}
} catch (err) {
this.loading = false
console.log(err)
}
},
},
}
</script>

View File

@ -1,127 +1,55 @@
<template> <template>
<div class="form-container" style="width: 80%"> <div class="form-container" style="width:80%;">
<el-form <el-form ref="researchForm" v-loading="loading" label-width="140px" :model="researchForm" size="small">
ref="researchForm"
v-loading="loading"
label-width="140px"
:model="researchForm"
:rules="rule"
size="small"
>
<div class="title">{{ $t('system:reviewer:title:Research') }}</div>
<el-form-item :label="$t('system:reviewer:label:Field of Research')"> <el-form-item :label="$t('system:reviewer:label:Field of Research')">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Research" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.Research"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.ResearchCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.ResearchCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:reviewer:label:Grants')"> <el-form-item :label="$t('system:reviewer:label:Grants')">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Grants" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.Grants"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.GrantsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.GrantsCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<div class="title">{{ $t('system:reviewer:title:Publications') }}</div>
<el-form-item :label="$t('system:reviewer:label:Publications')"> <el-form-item :label="$t('system:reviewer:label:Publications')">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="24"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.Publications" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
:disabled="$route.query.ReviewStatus === '1'" </el-col>
v-model="researchForm.Publications" <el-col :span="11">
type="textarea" <!-- <el-input v-model="researchForm.PublicationsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" /> -->
rows="5"
placeholder="Please specify in English"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<div class="title">{{ $t('system:reviewer:title:AH') }}</div>
<el-form-item :label="$t('system:reviewer:label:Awards & Honors')"> <el-form-item :label="$t('system:reviewer:label:Awards & Honors')">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.AwardsHonors" type="textarea" rows="5" placeholder="Please specify in English" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.AwardsHonors"
type="textarea"
rows="5"
placeholder="Please specify in English"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-input <el-input :disabled="$route.query.ReviewStatus === '1'" v-model="researchForm.AwardsHonorsCN" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
:disabled="$route.query.ReviewStatus === '1'"
v-model="researchForm.AwardsHonorsCN"
type="textarea"
rows="5"
placeholder="请用中文注明"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button :disabled="$route.query.ReviewStatus === '1'" type="primary" :loading="isDisabled" @click="handleSave">
:disabled="$route.query.ReviewStatus === '1'" {{ $t('common:button:save') }}</el-button>
type="primary"
:loading="isDisabled"
@click="handleSave"
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</template> </template>
<script> <script>
import { import { getResearchPublication, addOrUpdateResearchPublication } from '@/api/reviewers'
getResearchPublication,
addOrUpdateResearchPublication,
} from '@/api/reviewers'
export default { export default {
name: 'ResearchPublication', name: 'ResearchPublication',
props: { props: {
@ -129,11 +57,8 @@ export default {
type: String, type: String,
default() { default() {
return '' return ''
}, }
}, }
reviewerId: {
type: String,
},
}, },
data() { data() {
return { return {
@ -144,61 +69,10 @@ export default {
GrantsCN: '', GrantsCN: '',
Publications: '', Publications: '',
AwardsHonors: '', AwardsHonors: '',
AwardsHonorsCN: '', AwardsHonorsCN: ''
},
rule: {
Research: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
ResearchCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Grants: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
GrantsCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Publications: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
AwardsHonors: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
AwardsHonorsCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
}, },
loading: false, loading: false,
isDisabled: false, isDisabled: false
} }
}, },
mounted() { mounted() {
@ -206,9 +80,9 @@ export default {
}, },
methods: { methods: {
initForm() { initForm() {
const id = this.$route.query.Id || this.reviewerId const id = this.$route.query.Id
if (id) { if (id) {
getResearchPublication(id).then((res) => { getResearchPublication(id).then(res => {
if (res.Result) { if (res.Result) {
this.researchForm.Research = res.Result.Research this.researchForm.Research = res.Result.Research
this.researchForm.ResearchCN = res.Result.ResearchCN this.researchForm.ResearchCN = res.Result.ResearchCN
@ -225,31 +99,19 @@ export default {
handleSave() { handleSave() {
this.loading = true this.loading = true
this.isDisabled = true this.isDisabled = true
this.researchForm.DoctorId = this.$route.query.Id || this.reviewerId this.researchForm.DoctorId = this.$route.query.Id
addOrUpdateResearchPublication(this.researchForm) addOrUpdateResearchPublication(this.researchForm).then(res => {
.then((res) => {
this.loading = false this.loading = false
this.isDisabled = false this.isDisabled = false
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
if (!this.researchForm.Id) { if (!this.researchForm.Id) {
this.researchForm.Id = res.Result this.researchForm.Id = res.Result
} }
}) }).catch(() => {
.catch(() => {
this.loading = false this.loading = false
this.isDisabled = false this.isDisabled = false
}) })
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped>
.title {
width: 100%;
background-color: #eee;
line-height: 30px;
padding-left: 10px;
border-radius: 3px;
margin-bottom: 20px;
}
</style>

View File

@ -7,19 +7,14 @@
<div class="uploadFile-container"> <div class="uploadFile-container">
<el-upload <el-upload
class="upload-demo" class="upload-demo"
:data="{ language: 2 }" :data="{language:2}"
action action
:show-file-list="false" :show-file-list="false"
:http-request="handleUploadFile" :http-request="handleUploadFile"
:file-list="resumeList" :file-list="resumeList"
accept=".doc,.docx" accept=".doc,.docx"
> >
<el-button <el-button size="small" type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
size="small"
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
>{{ $t('system:GcpCertificate:upload:Upload') }}</el-button
>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -29,25 +24,15 @@
<div class="resumeTbl"> <div class="resumeTbl">
<el-table :data="resumeListEN" size="small"> <el-table :data="resumeListEN" size="small">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column prop="FileName" :label="$t('system:Resumes:table:Resume')" width="180" show-overflow-tooltip />
prop="FileName" <el-table-column prop="CreateTime" :label="$t('system:Resumes:table:Upload Time')" width="150" show-overflow-tooltip />
:label="$t('system:Resumes:table:Resume')"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Resumes:table:Upload Time')"
width="150"
show-overflow-tooltip
/>
<el-table-column <el-table-column
prop="IsOfficial" prop="IsOfficial"
:label="$t('system:Resumes:table:Official')" :label="$t('system:Resumes:table:Official')"
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.IsOfficial === true ? 'Yes' : 'No' }} {{ scope.row.IsOfficial === true?'Yes':'No' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -57,44 +42,31 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.Language === 1 ? '中文' : 'English' }} {{ scope.row.Language===1?'中文':'English' }}
<!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> --> <!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')" width="400"> <el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{ $t('common:button:download') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click="handlePreview(scope.row)" :disabled="scope.row.IsOfficial || $route.query.ReviewStatus === '1'"
>{{ $t('common:button:download') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="
scope.row.IsOfficial || $route.query.ReviewStatus === '1'
"
@click="handleSetOfiical(scope.row)" @click="handleSetOfiical(scope.row)"
>{{ $t('system:Resumes:button:Set as Official') }}</el-button >{{ $t('system:Resumes:button:Set as Official') }}</el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="resume-content" style="margin-top: 10px"> <div class="resume-content" style="margin-top:10px;">
<p>{{ $t('system:Resumes:title:ResumeCN') }}</p> <p>{{ $t('system:Resumes:title:ResumeCN') }}</p>
<div class="upload-content"> <div class="upload-content">
<div class="uploadFile-container"> <div class="uploadFile-container">
<el-upload <el-upload
:data="{ language: 1 }" :data="{language:1}"
class="upload-demo" class="upload-demo"
action action
:show-file-list="false" :show-file-list="false"
@ -102,12 +74,7 @@
:file-list="resumeList" :file-list="resumeList"
accept=".doc, .docx" accept=".doc, .docx"
> >
<el-button <el-button size="small" type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
size="small"
type="primary"
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
>{{ $t('system:GcpCertificate:upload:Upload') }}</el-button
>
</el-upload> </el-upload>
</div> </div>
</div> </div>
@ -116,25 +83,15 @@
<div class="resumeTbl"> <div class="resumeTbl">
<el-table :data="resumeListCN" size="small"> <el-table :data="resumeListCN" size="small">
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column prop="FileName" :label="$t('system:Resumes:table:Resume')" width="180" show-overflow-tooltip />
prop="FileName" <el-table-column prop="CreateTime" :label="$t('system:Resumes:table:Upload Time')" width="150" show-overflow-tooltip />
:label="$t('system:Resumes:table:Resume')"
width="180"
show-overflow-tooltip
/>
<el-table-column
prop="CreateTime"
:label="$t('system:Resumes:table:Upload Time')"
width="150"
show-overflow-tooltip
/>
<el-table-column <el-table-column
prop="IsOfficial" prop="IsOfficial"
:label="$t('system:Resumes:table:Official')" :label="$t('system:Resumes:table:Official')"
width="100" width="100"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.IsOfficial === true ? 'Yes' : 'No' }} {{ scope.row.IsOfficial === true?'Yes':'No' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -144,34 +101,20 @@
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.Language === 1 ? '中文' : 'English' }} {{ scope.row.Language===1?'中文':'English' }}
<!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> --> <!-- <el-button size="small" type="text" @click="handleLanguageClick(scope.row)">{{ scope.row.Language===1?'CH':scope.row.Language===2?'EN':'Setting' }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('common:action:action')" width="400"> <el-table-column :label="$t('common:action:action')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{ $t('common:button:download') }}</el-button>
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{ $t('common:button:delete') }}</el-button>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click="handlePreview(scope.row)" :disabled="scope.row.IsOfficial || $route.query.ReviewStatus === '1'"
>{{ $t('common:button:download') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleRemoveFile(scope.row)"
>{{ $t('common:button:delete') }}</el-button
>
<el-button
type="text"
size="small"
:disabled="
scope.row.IsOfficial || $route.query.ReviewStatus === '1'
"
@click="handleSetOfiical(scope.row)" @click="handleSetOfiical(scope.row)"
>{{ $t('system:Resumes:button:Set as Official') }}</el-button >{{ $t('system:Resumes:button:Set as Official') }}</el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -183,49 +126,31 @@
size="small" size="small"
> >
<span>Language: </span> <span>Language: </span>
<el-radio-group <el-radio-group :disabled="$route.query.ReviewStatus === '1'" v-model="language">
:disabled="$route.query.ReviewStatus === '1'"
v-model="language"
>
<el-radio :label="2">English</el-radio> <el-radio :label="2">English</el-radio>
<el-radio :label="1">中文</el-radio> <el-radio :label="1">中文</el-radio>
</el-radio-group> </el-radio-group>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button <el-button size="small" :disabled="$route.query.ReviewStatus === '1'" @click="dialogVisible = false">Cancel</el-button>
size="small" <el-button type="primary" :disabled="$route.query.ReviewStatus === '1'" size="small" @click="setResumeLanguage">Ok</el-button>
:disabled="$route.query.ReviewStatus === '1'"
@click="dialogVisible = false"
>Cancel</el-button
>
<el-button
type="primary"
:disabled="$route.query.ReviewStatus === '1'"
size="small"
@click="setResumeLanguage"
>Ok</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment, setOfficial, setLanguageForResume } from '@/api/attachment'
getAttachmentByType,
uploadFile,
saveAttachments,
deleteAttachment,
setOfficial,
setLanguageForResume,
} from '@/api/attachment'
export default { export default {
props: { props: {
reviewerId: { id: {
type: String, type: String,
}, default() {
return ''
}
}
}, },
data() { data() {
return { return {
doctorId: this.$route.query.Id || this.reviewerId, doctorId: this.$route.query.Id,
resumeList: [], resumeList: [],
resumeListEN: [], resumeListEN: [],
resumeListCN: [], resumeListCN: [],
@ -234,26 +159,17 @@ export default {
currentRow: {}, currentRow: {},
repeat: false, repeat: false,
isDisabled: false, isDisabled: false,
loading: false, loading: false
} }
}, },
watch: { created() {
reviewerId() { if(!this.doctorId) return
if (this.reviewerId) {
this.doctorId = this.reviewerId
this.getResumeList()
}
},
},
mounted() {
if (!this.doctorId) return
this.getResumeList() this.getResumeList()
}, },
methods: { methods: {
getResumeList() { getResumeList() {
this.loading = true this.loading = true
getAttachmentByType(this.doctorId, 'Resume') getAttachmentByType(this.doctorId, 'Resume').then(res => {
.then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
if (res.Result.length > 0) { if (res.Result.length > 0) {
this.resumeList = res.Result this.resumeList = res.Result
@ -261,10 +177,7 @@ export default {
} }
} }
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
}, },
handleUploadFile(param) { handleUploadFile(param) {
this.repeat = false this.repeat = false
@ -273,22 +186,20 @@ export default {
// //
if (this.checkFileSuffix(param.file.name) > -1) { if (this.checkFileSuffix(param.file.name) > -1) {
// //
const isRepeat = this.resumeList.some( const isRepeat = this.resumeList.some(item => item.FileName === param.file.name)
(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, param.data.language) this.uploadFile(param.file, param.data.language)
}) })
.catch((action) => {}) .catch(action => {})
} else { } else {
this.uploadFile(param.file, param.data.language) this.uploadFile(param.file, param.data.language)
} }
@ -301,10 +212,7 @@ export default {
var fileName = file.name var fileName = file.name
var files = this.resumeList var files = this.resumeList
file = await this.fileToBlob(file) file = await this.fileToBlob(file)
let res = await this.OSSclient.put( let res = await this.OSSclient.put(`/SystemData/reviewer/Resume/${this.doctorId}/${fileName}`, file)
`/SystemData/reviewer/Resume/${this.doctorId}/${fileName}`,
file
)
if (this.repeat) { if (this.repeat) {
const index = files.findIndex((item, index) => { const index = files.findIndex((item, index) => {
return item.FileName === fileName return item.FileName === fileName
@ -320,28 +228,26 @@ export default {
Path: this.$getObjectName(res.url), Path: this.$getObjectName(res.url),
FullPath: this.$getObjectName(res.url), FullPath: this.$getObjectName(res.url),
FileName: fileName, FileName: fileName,
Language: language, Language: language
} }
files.push(fileData) files.push(fileData)
} }
this.saveUploadFiles(files) this.saveUploadFiles(files)
}, },
saveUploadFiles(files) { saveUploadFiles(files) {
saveAttachments(files) saveAttachments(files).then(res => {
.then((res) => {
this.resumeList = res.Result this.resumeList = res.Result
this.filterByLanguage() this.filterByLanguage()
this.isDisabled = false this.isDisabled = false
this.$message.success('Uploaded successfully') this.$message.success('Uploaded successfully')
}) }).catch(() => {
.catch(() => {
this.isDisabled = false this.isDisabled = false
}) })
}, },
filterByLanguage() { filterByLanguage() {
this.resumeListEN = [] this.resumeListEN = []
this.resumeListCN = [] this.resumeListCN = []
this.resumeList.map((resume) => { this.resumeList.map(resume => {
if (resume.Language === 2) { if (resume.Language === 2) {
this.resumeListEN.push(resume) this.resumeListEN.push(resume)
} else if (resume.Language === 1) { } else if (resume.Language === 1) {
@ -352,9 +258,7 @@ export default {
checkFileSuffix(fileName) { checkFileSuffix(fileName) {
const accept = '.doc, .docx' const accept = '.doc, .docx'
var index = fileName.lastIndexOf('.') var index = fileName.lastIndexOf('.')
var suffix = fileName var suffix = fileName.substring(index + 1, fileName.length).toLocaleLowerCase()
.substring(index + 1, fileName.length)
.toLocaleLowerCase()
return accept.search(suffix) return accept.search(suffix)
}, },
handlePreview(row) { handlePreview(row) {
@ -366,31 +270,29 @@ export default {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), { this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
})
.then(() => { }).then(() => {
deleteAttachment(row.Id, row.Path).then((res) => { deleteAttachment(row.Id, row.Path)
.then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.resumeList.splice( this.resumeList.splice(this.resumeList.findIndex(item => item.Id === row.Id), 1)
this.resumeList.findIndex((item) => item.Id === row.Id),
1
)
this.filterByLanguage() this.filterByLanguage()
this.$message({ this.$message({
message: this.$t('common:message:deletedSuccessfully'), message: this.$t('common:message:deletedSuccessfully'),
type: 'success', type: 'success'
}) })
} }
}) })
}) })
.catch((action) => {}) .catch(action => {})
}, },
handleSetOfiical(row) { handleSetOfiical(row) {
setOfficial(this.doctorId, row.Id, row.Language).then((res) => { setOfficial(this.doctorId, row.Id, row.Language).then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.getResumeList() this.getResumeList()
this.$message({ this.$message({
message: 'Saved successfully!', message: 'Saved successfully!',
type: 'success', type: 'success'
}) })
} }
}) })
@ -401,27 +303,23 @@ export default {
this.currentRow = row this.currentRow = row
}, },
setResumeLanguage() { setResumeLanguage() {
setLanguageForResume( setLanguageForResume(this.doctorId, this.currentRow.Id, this.language).then(res => {
this.doctorId,
this.currentRow.Id,
this.language
).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.dialogVisible = false this.dialogVisible = false
this.getResumeList() this.getResumeList()
this.$message({ this.$message({
message: 'Saved successfully!', message: 'Saved successfully!',
type: 'success', type: 'success'
}) })
} }
}) })
}, }
}, }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.resumes-container { .resumes-container{
.resume-content { .resume-content{
p { p {
float: left; float: left;
font-size: 13px; font-size: 13px;
@ -443,9 +341,11 @@ export default {
.upload-content { .upload-content {
float: left; float: left;
} }
} }
.el-dialog__body { .el-dialog__body{
padding: 10px 20px; padding: 10px 20px;
} }
} }
</style> </style>

View File

@ -1,153 +1,79 @@
<template> <template>
<div v-loading="loading" class="check-container form-container"> <div v-loading="loading" class="check-container form-container">
<el-form <el-form ref="checkForm" :model="checkForm" label-width="200px" size="small" :rules="rules">
ref="checkForm"
:model="checkForm"
label-width="200px"
size="small"
:rules="rules"
>
<div class="title-wrapper"> <div class="title-wrapper">
<p>{{ $t('system:Setting:title:Blinded information') }}</p> <p>{{$t('system:Setting:title:Blinded information') }}</p>
</div> </div>
<div class="check-content"> <div class="check-content">
<el-form-item <el-form-item :label="$t('system:Setting:label:Blind Name')" prop="BlindName">
:label="$t('system:Setting:label:Blind Name')"
prop="BlindName"
>
<el-input <el-input
v-model="checkForm.BlindName" v-model="checkForm.BlindName"
style="width: 300px" style="width:300px"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:Setting:label:Blind NameCN')" prop="BlindNameCN">
:label="$t('system:Setting:label:Blind NameCN')"
prop="BlindNameCN"
>
<el-input <el-input
v-model="checkForm.BlindNameCN" v-model="checkForm.BlindNameCN"
style="width: 300px" style="width:300px"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:Setting:label:Blind Publications')" prop="BlindPublications">
:label="$t('system:Setting:label:Blind Publications')" <el-input v-model="checkForm.BlindPublications" type="textarea" rows="8" style="width:60%;" size="small" />
prop="BlindPublications"
>
<el-input
v-model="checkForm.BlindPublications"
type="textarea"
rows="8"
style="width: 60%"
size="small"
:maxlength="4000"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="title-wrapper"> <div class="title-wrapper">
<p>{{ $t('system:Setting:title:Blinded Setting') }}</p> <p>{{$t('system:Setting:title:Blinded Setting') }}</p>
</div> </div>
<div class="check-content"> <div class="check-content">
<el-form-item <el-form-item :label="$t('system:Setting:label:Information Confirmed?')">
:label="$t('system:Setting:label:Information Confirmed?')" <el-radio-group v-model="checkForm.ReviewStatus" @change="handleChange">
> <el-radio :label="1">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
<el-radio-group <el-radio :label="2">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
v-model="checkForm.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-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Setting:label:Contractor Status?')"> <el-form-item :label="$t('system:Setting:label:Contractor Status?')">
<el-radio-group <el-radio-group v-model="checkForm.CooperateStatus" @change="handleChange">
v-model="checkForm.CooperateStatus" <el-radio :label="1">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
@change="handleChange" <el-radio :label="2">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
>
<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-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Setting:label:Accepting New Trials?')"> <el-form-item :label="$t('system:Setting:label:Accepting New Trials?')">
<el-radio-group <el-radio-group v-model="checkForm.AcceptingNewTrial" :disabled="radioDisabled">
v-model="checkForm.AcceptingNewTrial" <el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
:disabled="radioDisabled" <el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
>
<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-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Setting:label:Actively Reading?')"> <el-form-item :label="$t('system:Setting:label:Actively Reading?')">
<el-radio-group <el-radio-group v-model="checkForm.ActivelyReading" :disabled="radioDisabled">
v-model="checkForm.ActivelyReading" <el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
:disabled="radioDisabled" <el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
>
<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-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Setting:label:Is Virtual?')"> <el-form-item :label="$t('system:Setting:label:Is Virtual?')">
<el-radio-group <el-radio-group v-model="checkForm.IsVirtual" :disabled="radioDisabled">
v-model="checkForm.IsVirtual" <el-radio :label="true">{{$t('system:Setting:label:Information Confirmed?:Yes')}}</el-radio>
:disabled="radioDisabled" <el-radio :label="false">{{$t('system:Setting:label:Information Confirmed?:No')}}</el-radio>
>
<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-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('system:Setting:label:On Vacation:')"> <el-form-item :label="$t('system:Setting:label:On Vacation:')">
<span style="font-size: 12px; margin-right: 20px">{{ <span style="font-size:12px;margin-right:20px;">{{ checkForm.InHoliday }}</span>
InHoliday <el-button type="text" @click="handleView">{{ $t('system:Setting:Planned Vacation') }}</el-button>
}}</span>
<el-button type="text" @click="handleView">{{
$t('system:Setting:Planned Vacation')
}}</el-button>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:Setting:label:Comment:')" prop="AdminComment">
:label="$t('system:Setting:label:Comment:')"
prop="AdminComment"
>
<el-input <el-input
v-model="checkForm.AdminComment" v-model="checkForm.AdminComment"
type="textarea" type="textarea"
style="width: 60%" style="width:60%;"
rows="8" rows="8"
:maxlength="4000"
/> />
</el-form-item> </el-form-item>
<el-form-item style="margin-top: 20px"> <el-form-item style="margin-top:20px">
<el-button <el-button type="primary" :disabled="isDisabled" @click="handleSave">{{ $t('common:button:save') }}</el-button>
type="primary"
:disabled="isDisabled"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
@ -157,7 +83,6 @@
width="50%" width="50%"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closeDialog" @close="closeDialog"
append-to-body
> >
<div> <div>
<el-date-picker <el-date-picker
@ -171,13 +96,7 @@
:end-placeholder="$t('system:Setting:label:End Date')" :end-placeholder="$t('system:Setting:label:End Date')"
size="small" size="small"
/> />
<el-button <el-button style="margin-left:10px;" type="primary" size="small" @click="handleAddHoliday">{{ $t('common:button:add') }}</el-button>
style="margin-left: 10px"
type="primary"
size="small"
@click="handleAddHoliday"
>{{ $t('common:button:add') }}</el-button
>
</div> </div>
<el-table v-loading="loading2" :data="gridData" size="small"> <el-table v-loading="loading2" :data="gridData" size="small">
<el-table-column type="index" /> <el-table-column type="index" />
@ -193,19 +112,13 @@
min-width="120" min-width="120"
:formatter="endTimeFormatter" :formatter="endTimeFormatter"
/> />
<el-table-column <el-table-column :label="$t('common:action:action')" fixed="right" min-width="200">
:label="$t('common:action:action')"
fixed="right"
min-width="200"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handleDelete(scope.row)">{{ <el-button type="text" @click="handleDelete(scope.row)">{{ $t('common:button:delete') }}</el-button>
$t('common:button:delete')
}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination" style="padding: 10px 0; text-align: right"> <div class="pagination" style="padding: 10px 0;text-align: right">
<el-pagination <el-pagination
background background
layout="total,sizes,prev, pager, next" layout="total,sizes,prev, pager, next"
@ -221,21 +134,17 @@
</div> </div>
</template> </template>
<script> <script>
import { import { getAuditState, updateAuditResume, getVacationList, addOrUpdateVacation, deleteVacation } from '@/api/reviewers'
getAuditState,
updateAuditResume,
getVacationList,
addOrUpdateVacation,
deleteVacation,
getIsVacation,
} from '@/api/reviewers'
import { fmtDate } from '@/utils/formatter' import { fmtDate } from '@/utils/formatter'
export default { export default {
name: 'Setting', name: 'Setting',
props: { props: {
reviewerId: { id: {
type: String, type: String,
}, default() {
return ''
}
}
}, },
data() { data() {
return { return {
@ -255,37 +164,10 @@ export default {
BlindPublications: '', BlindPublications: '',
}, },
rules: { rules: {
AdminComment: [ AdminComment: [{ max: 500, message: 'The maximum length is 500' }],
{ BlindName: [{ required: true, message: 'Please specify', trigger: 'blur' }],
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
}, },
], doctorId: this.$route.query.Id,
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: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
},
doctorId: this.$route.query.Id || this.reviewerId,
isDisabled: false, isDisabled: false,
radioDisabled: false, radioDisabled: false,
dialogVisible: false, dialogVisible: false,
@ -294,42 +176,16 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 5, pageSize: 5,
totalItems: 0, totalItems: 0,
loading2: false, loading2: false
InHoliday: '',
} }
}, },
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
this.initForm()
this.getIsVacation()
}
},
},
mounted() { mounted() {
this.initForm() this.initForm()
this.getIsVacation()
}, },
methods: { methods: {
//
async getIsVacation() {
if (!this.doctorId) return false
try {
let data = {
DoctorId: this.doctorId,
}
let res = await getIsVacation(data)
if (res.IsSuccess) {
this.InHoliday = res.Result.IsVacation ? 'Yes' : 'No'
}
} catch (err) {
console.log(err)
}
},
initForm() { initForm() {
if (!this.doctorId) return if (!this.doctorId) return
getAuditState(this.doctorId).then((res) => { getAuditState(this.doctorId).then(res => {
if (res.Result) { if (res.Result) {
this.checkForm = res.Result this.checkForm = res.Result
this.checkForm.InHoliday = res.Result.InHoliday ? 'Yes' : 'No' this.checkForm.InHoliday = res.Result.InHoliday ? 'Yes' : 'No'
@ -337,7 +193,7 @@ export default {
}) })
}, },
handleSave() { handleSave() {
this.$refs.checkForm.validate((valid) => { this.$refs.checkForm.validate(valid => {
if (valid) { if (valid) {
this.isDisabled = true this.isDisabled = true
const param = {} const param = {}
@ -345,15 +201,11 @@ export default {
param.InHoliday = this.checkForm.InHoliday === 'Yes' param.InHoliday = this.checkForm.InHoliday === 'Yes'
param.ResumeStatus = param.ReviewStatus param.ResumeStatus = param.ReviewStatus
updateAuditResume(param) updateAuditResume(param)
.then((res) => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
if (res.Result) { if (res.Result) { this.checkForm.Id = res.Result }
this.checkForm.Id = res.Result
}
this.isDisabled = false this.isDisabled = false
this.$message.success( this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$t('common:message:savedSuccessfully')
)
} }
}) })
.catch(() => { .catch(() => {
@ -369,7 +221,7 @@ export default {
initHolidayList() { initHolidayList() {
this.loading2 = true this.loading2 = true
getVacationList(this.doctorId, this.pageIndex, this.pageSize) getVacationList(this.doctorId, this.pageIndex, this.pageSize)
.then((res) => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
this.gridData = res.Result.CurrentPageData this.gridData = res.Result.CurrentPageData
this.totalItems = res.Result.TotalCount this.totalItems = res.Result.TotalCount
@ -385,11 +237,11 @@ export default {
const param = { const param = {
DoctorId: this.doctorId, DoctorId: this.doctorId,
StartDate: this.daterange[0], StartDate: this.daterange[0],
EndDate: this.daterange[1], EndDate: this.daterange[1]
} }
this.loading2 = true this.loading2 = true
addOrUpdateVacation(param) addOrUpdateVacation(param)
.then((res) => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
param.Id = res.Result param.Id = res.Result
this.gridData.push(param) this.gridData.push(param)
@ -414,18 +266,14 @@ export default {
.then(() => { .then(() => {
this.loading2 = true this.loading2 = true
deleteVacation(row.Id) deleteVacation(row.Id)
.then((res) => { .then(res => {
if (res.IsSuccess) { if (res.IsSuccess) {
var index = this.gridData.findIndex( var index = this.gridData.findIndex((item) => item.Id === row.Id)
(item) => item.Id === row.Id
)
if (index !== -1) { if (index !== -1) {
this.gridData.splice(index, 1) this.gridData.splice(index, 1)
this.totalItems = this.totalItems - 1 this.totalItems = this.totalItems - 1
} }
this.$message.success( this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$t('common:message:deletedSuccessfully')
)
} }
this.loading2 = false this.loading2 = false
}) })
@ -433,16 +281,13 @@ export default {
this.loading2 = false this.loading2 = false
}) })
}) })
.catch((action) => {}) .catch(action => {})
}, },
closeDialog() { closeDialog() {
this.getIsVacation() this.initForm()
}, },
handleChange() { handleChange() {
if ( if (this.checkForm.ReviewStatus === 2 || this.checkForm.cooperateStatus === 2) {
this.checkForm.ReviewStatus === 2 ||
this.checkForm.cooperateStatus === 2
) {
this.checkForm.ActivelyReading = false this.checkForm.ActivelyReading = false
this.checkForm.AcceptingNewTrial = false this.checkForm.AcceptingNewTrial = false
this.radioDisabled = true this.radioDisabled = true
@ -474,7 +319,8 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
this.initHolidayList() this.initHolidayList()
}, }
},
}
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="form-container"> <div class="form-container">
<el-card class="box-card"> <el-card class="box-card">
<div style="width: 80%"> <div style="width:80%;">
<el-form <el-form
ref="specialtyForm" ref="specialtyForm"
v-loading="loading" v-loading="loading"
@ -12,15 +12,12 @@
> >
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Specialty')" prop="SpecialityId">
:label="$t('system:reviewer:label:Specialty')"
prop="SpecialityId"
>
<el-select <el-select
v-model="specialtyForm.SpecialityId" v-model="specialtyForm.SpecialityId"
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
placeholder="Please select" placeholder="Please select"
style="width: 100%" style="width:100%;"
size="small" size="small"
> >
<!-- <el-option <!-- <el-option
@ -35,56 +32,40 @@
:label="item.Value" :label="item.Value"
:value="item.Id" :value="item.Id"
/> />
<el-option <el-option label="Other" :value="otherId" />
:label="$t('curriculumVitae:selectLabel:Other')"
:value="otherId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item v-if="specialtyForm.SpecialityId==otherId" class="other-item" prop="SpecialityOther">
v-if="specialtyForm.SpecialityId == otherId"
class="other-item"
prop="SpecialityOther"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.SpecialityOther" v-model="specialtyForm.SpecialityOther"
placeholder="Please specify (required)" placeholder="Please specify (required)"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item v-if="specialtyForm.SpecialityId==otherId" prop="SpecialityOtherCN" class="other-item">
v-if="specialtyForm.SpecialityId == otherId"
prop="SpecialityOtherCN"
class="other-item"
>
<el-input <el-input
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.SpecialityOtherCN" v-model="specialtyForm.SpecialityOtherCN"
placeholder="请用中文注明" placeholder="请用中文注明"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Subspeciality')" prop="SubspecialityIds">
:label="$t('system:reviewer:label:Subspeciality')"
prop="SubspecialityIds"
>
<el-select <el-select
v-model="specialtyForm.SubspecialityIds" v-model="specialtyForm.SubspecialityIds"
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
placeholder="select" placeholder="select"
multiple multiple
style="width: 100%" style="width:100%;"
size="small" size="small"
> >
<!-- <el-option <!-- <el-option
@ -99,19 +80,13 @@
:label="item.Value" :label="item.Value"
:value="item.Id" :value="item.Id"
/> />
<el-option <el-option label="Other" :value="otherId" />
:label="$t('curriculumVitae:selectLabel:Other')"
:value="otherId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
v-if=" v-if="specialtyForm.SubspecialityIds && specialtyForm.SubspecialityIds.indexOf(otherId)>-1"
specialtyForm.SubspecialityIds &&
specialtyForm.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item" class="other-item"
prop="SubspecialityOther" prop="SubspecialityOther"
> >
@ -120,16 +95,12 @@
v-model="specialtyForm.SubspecialityOther" v-model="specialtyForm.SubspecialityOther"
placeholder="Please specify (required)" placeholder="Please specify (required)"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
v-if=" v-if="specialtyForm.SubspecialityIds && specialtyForm.SubspecialityIds.indexOf(otherId)>-1"
specialtyForm.SubspecialityIds &&
specialtyForm.SubspecialityIds.indexOf(otherId) > -1
"
class="other-item" class="other-item"
prop="SubspecialityOtherCN" prop="SubspecialityOtherCN"
> >
@ -138,7 +109,6 @@
v-model="specialtyForm.SubspecialityOtherCN" v-model="specialtyForm.SubspecialityOtherCN"
placeholder="请用中文注明" placeholder="请用中文注明"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -146,15 +116,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item :label="$t('system:reviewer:label:Modality')" prop="ReadingTypeIds">
:label="$t('system:reviewer:label:Modality')"
prop="ReadingTypeIds"
>
<el-select <el-select
:disabled="$route.query.ReviewStatus === '1'" :disabled="$route.query.ReviewStatus === '1'"
v-model="specialtyForm.ReadingTypeIds" v-model="specialtyForm.ReadingTypeIds"
placeholder="Please select" placeholder="Please select"
style="width: 100%" style="width:100%;"
multiple multiple
size="small" size="small"
> >
@ -170,19 +137,13 @@
:label="item.Value" :label="item.Value"
:value="item.Id" :value="item.Id"
/> />
<el-option <el-option label="Other" :value="otherId" />
:label="$t('curriculumVitae:selectLabel:Other')"
:value="otherId"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
v-if=" v-if="specialtyForm.ReadingTypeIds && specialtyForm.ReadingTypeIds.indexOf(otherId)>-1"
specialtyForm.ReadingTypeIds &&
specialtyForm.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOther" prop="ReadingTypeOther"
class="other-item" class="other-item"
> >
@ -191,16 +152,12 @@
v-model="specialtyForm.ReadingTypeOther" v-model="specialtyForm.ReadingTypeOther"
placeholder="Please specify (required)" placeholder="Please specify (required)"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item
v-if=" v-if="specialtyForm.ReadingTypeIds && specialtyForm.ReadingTypeIds.indexOf(otherId)>-1"
specialtyForm.ReadingTypeIds &&
specialtyForm.ReadingTypeIds.indexOf(otherId) > -1
"
prop="ReadingTypeOtherCN" prop="ReadingTypeOtherCN"
class="other-item" class="other-item"
> >
@ -209,20 +166,13 @@
v-model="specialtyForm.ReadingTypeOtherCN" v-model="specialtyForm.ReadingTypeOtherCN"
placeholder="请用中文注明" placeholder="请用中文注明"
size="small" size="small"
:maxlength="400"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'" size="small" @click="handleSave">
type="primary" {{ $t('common:button:save') }}</el-button>
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
size="small"
@click="handleSave"
>
{{ $t('common:button:save') }}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -234,11 +184,6 @@ import { getSpecialtyInfo, updateSpecialtyInfo } from '@/api/reviewers'
import { getBasicDataSelects } from '@/api/dictionary/dictionary' import { getBasicDataSelects } from '@/api/dictionary/dictionary'
export default { export default {
name: 'Specialty', name: 'Specialty',
props: {
reviewerId: {
type: String,
},
},
data() { data() {
return { return {
specialtyForm: { specialtyForm: {
@ -250,81 +195,37 @@ export default {
SubspecialityOtherCN: '', SubspecialityOtherCN: '',
SpecialityId: '', SpecialityId: '',
SpecialityOther: '', SpecialityOther: '',
SpecialityOtherCN: '', SpecialityOtherCN: ''
}, },
specialtyRules: { specialtyRules: {
SpecialityId: [ SpecialityId: [{ required: true, message: 'Please select speciality', trigger: 'blur' }],
{
required: true,
message: 'Please select speciality',
trigger: 'blur',
},
],
SpecialityOther: [ SpecialityOther: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
SpecialityOtherCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
ReadingTypeIds: [
{
required: true,
message: 'Please select clinical reading type',
trigger: 'blur',
},
], ],
SpecialityOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
ReadingTypeIds: [{ required: true, message: 'Please select clinical reading type', trigger: 'blur' }],
ReadingTypeOther: [ ReadingTypeOther: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
], ],
ReadingTypeOtherCN: [ ReadingTypeOtherCN: [
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
SubspecialityIds: [
{
required: true,
message: 'Please select subspecialty',
trigger: 'blur',
},
], ],
SubspecialityIds: [{ required: true, message: 'Please select subspecialty', trigger: 'blur' }],
SubspecialityOther: [ SubspecialityOther: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ { max: 50, message: 'The maximum length is 50' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
], ],
SubspecialityOtherCN: [ SubspecialityOtherCN: [
{ { max: 50, message: 'The maximum length is 50' }
max: 400, ]
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
}, },
selectId: '00000000-0000-0000-0000-000000000000', selectId: '00000000-0000-0000-0000-000000000000',
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5', otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
isDisabled: false, isDisabled: false,
loading: false, loading: false,
dictionaryList: {}, dictionaryList: {}
} }
}, },
mounted() { mounted() {
@ -332,40 +233,21 @@ export default {
}, },
methods: { methods: {
handleSave() { handleSave() {
this.$refs.specialtyForm.validate((valid) => { this.$refs.specialtyForm.validate(valid => {
if (valid) { if (valid) {
this.isDisabled = true this.isDisabled = true
const params = {} const params = {}
params.ReadingTypeIds = this.specialtyForm.ReadingTypeIds params.ReadingTypeIds = this.specialtyForm.ReadingTypeIds
params.ReadingTypeOther = params.ReadingTypeOther = params.ReadingTypeIds.indexOf(this.otherId) > -1 ? this.specialtyForm.ReadingTypeOther : ''
params.ReadingTypeIds.indexOf(this.otherId) > -1 params.ReadingTypeOtherCN = params.ReadingTypeIds.indexOf(this.otherId) > -1 ? this.specialtyForm.ReadingTypeOtherCN : ''
? this.specialtyForm.ReadingTypeOther
: ''
params.ReadingTypeOtherCN =
params.ReadingTypeIds.indexOf(this.otherId) > -1
? this.specialtyForm.ReadingTypeOtherCN
: ''
params.SubspecialityIds = this.specialtyForm.SubspecialityIds params.SubspecialityIds = this.specialtyForm.SubspecialityIds
params.SubspecialityOther = params.SubspecialityOther = params.SubspecialityIds.indexOf(this.otherId) > -1 ? this.specialtyForm.SubspecialityOther : ''
params.SubspecialityIds.indexOf(this.otherId) > -1 params.SubspecialityOtherCN = params.SubspecialityIds.indexOf(this.otherId) > -1 ? this.specialtyForm.SubspecialityOtherCN : ''
? this.specialtyForm.SubspecialityOther
: ''
params.SubspecialityOtherCN =
params.SubspecialityIds.indexOf(this.otherId) > -1
? this.specialtyForm.SubspecialityOtherCN
: ''
params.SpecialityId = this.specialtyForm.SpecialityId params.SpecialityId = this.specialtyForm.SpecialityId
params.SpecialityOther = params.SpecialityOther = params.SpecialityId === this.otherId ? this.specialtyForm.SpecialityOther : ''
params.SpecialityId === this.otherId params.SpecialityOtherCN = params.SpecialityId === this.otherId ? this.specialtyForm.SpecialityOtherCN : ''
? this.specialtyForm.SpecialityOther params.Id = this.$route.query.Id
: '' updateSpecialtyInfo(params).then(res => {
params.SpecialityOtherCN =
params.SpecialityId === this.otherId
? this.specialtyForm.SpecialityOtherCN
: ''
params.Id = this.$route.query.Id || this.reviewerId
updateSpecialtyInfo(params)
.then((res) => {
this.isDisabled = false this.isDisabled = false
this.$message.success('Saved successfully') this.$message.success('Saved successfully')
this.specialtyForm.Id = res.Result this.specialtyForm.Id = res.Result
@ -378,33 +260,20 @@ export default {
}, },
initForm() { initForm() {
this.loading = true this.loading = true
const id = this.$route.query.Id || this.reviewerId const id = this.$route.query.Id
if (id) { if (id) {
getSpecialtyInfo(id) getSpecialtyInfo(id).then(res => {
.then((res) => { this.specialtyForm.ReadingTypeIds = res.Result.ReadingTypeIds.length > 0 ? res.Result.ReadingTypeIds : []
this.specialtyForm.ReadingTypeIds =
res.Result.ReadingTypeIds.length > 0
? res.Result.ReadingTypeIds
: []
this.specialtyForm.ReadingTypeOther = res.Result.ReadingTypeOther this.specialtyForm.ReadingTypeOther = res.Result.ReadingTypeOther
this.specialtyForm.ReadingTypeOtherCN = this.specialtyForm.ReadingTypeOtherCN = res.Result.ReadingTypeOtherCN
res.Result.ReadingTypeOtherCN
this.specialtyForm.SubspecialityIds = res.Result.SubspecialityIds this.specialtyForm.SubspecialityIds = res.Result.SubspecialityIds
this.specialtyForm.SubspecialityOther = this.specialtyForm.SubspecialityOther = res.Result.SubspecialityOther
res.Result.SubspecialityOther this.specialtyForm.SubspecialityOtherCN = res.Result.SubspecialityOtherCN
this.specialtyForm.SubspecialityOtherCN = this.specialtyForm.SpecialityId = res.Result.SpecialityId === this.selectId ? '' : res.Result.SpecialityId
res.Result.SubspecialityOtherCN
this.specialtyForm.SpecialityId =
res.Result.SpecialityId === this.selectId
? ''
: res.Result.SpecialityId
this.specialtyForm.SpecialityOther = res.Result.SpecialityOther this.specialtyForm.SpecialityOther = res.Result.SpecialityOther
this.specialtyForm.SpecialityOtherCN = res.Result.SpecialityOtherCN this.specialtyForm.SpecialityOtherCN = res.Result.SpecialityOtherCN
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
} }
}, },
async initSpecialty() { async initSpecialty() {
@ -412,17 +281,15 @@ export default {
this.initForm() this.initForm()
}, },
getDicData() { getDicData() {
getBasicDataSelects(['Department', 'Subspeciality', 'ReadingType']).then( getBasicDataSelects(['Department', 'Subspeciality', 'ReadingType']).then(res => {
(res) => {
this.dictionaryList = { ...res.Result } this.dictionaryList = { ...res.Result }
})
}
} }
)
},
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.other-item .el-form-item__content { .other-item .el-form-item__content{
margin-left: 80px !important; margin-left: 80px !important;
} }
</style> </style>

View File

@ -1,357 +0,0 @@
<template>
<div class="form-container">
<el-card class="box-card">
<div style="width: 80%">
<div class="top">
<span>{{ $t('system:reviewer:tab:Summarize') }}</span>
<el-button
size="small"
type="primary"
v-if="$route.query.ReviewStatus !== '1'"
@click="handleAdd()"
>
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table
ref="educationTbl"
:data="list"
border
class="table"
:loading="loading"
size="small"
>
<el-table-column type="index" width="30" />
<el-table-column
prop="Indication"
:label="$t('system:reviewer:label:Indication')"
min-width="55"
show-overflow-tooltip
/>
<el-table-column
prop="Summarize"
:label="$t('system:reviewer:label:SummarizeZH')"
min-width="55"
show-overflow-tooltip
/>
<el-table-column
prop="SummarizeEn"
:label="$t('system:reviewer:label:SummarizeEN')"
min-width="70"
show-overflow-tooltip
/>
<el-table-column
prop="IsMain"
:label="$t('system:reviewer:label:IsMain')"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ $fd('YesOrNo', scope.row.IsMain) }}
</template>
</el-table-column>
<el-table-column
:label="$t('system:EducationTraining:table:Operation')"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleAdd(scope.row)"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleDelete(scope.row)"
>
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
<base-model :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="summarizeFrom"
v-loading="loading"
:rules="rules"
:model="form"
class="demo-ruleForm"
label-width="100px"
>
<el-form-item
:label="$t('system:reviewer:label:Indication')"
prop="Indication"
>
<el-input
v-model="form.Indication"
:placeholder="
$t('curriculumVitae:summarize:form:placeholder:Indication')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item prop="IndicationEn">
<el-input
v-model="form.IndicationEn"
:placeholder="
$t('curriculumVitae:summarize:form:placeholder:IndicationEn')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item
:label="$t('system:reviewer:label:Summarize')"
prop="Summarize"
>
<el-input
v-model="form.Summarize"
type="textarea"
:rows="10"
:placeholder="
$t('curriculumVitae:summarize:form:placeholder:summarize')
"
size="small"
:maxlength="4000"
/>
</el-form-item>
<el-form-item prop="SummarizeEn">
<el-input
v-model="form.SummarizeEn"
type="textarea"
:rows="10"
:placeholder="
$t('curriculumVitae:summarize:form:placeholder:summarizeEN')
"
size="small"
:maxlength="4000"
/>
</el-form-item>
<el-form-item
prop="IsMain"
:label="$t('system:reviewer:label:IsMain')"
>
<el-switch
v-model="form.IsMain"
:disabled="list.length <= 0 || ISMAIN"
>
</el-switch>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import {
addOrUpdateGneralSituation,
getSummarizeInfo,
deleteSummarizeInfo,
} from '@/api/reviewers'
import BaseModel from '@/components/BaseModel'
const defaultForm = () => {
return {
Id: null,
DoctorId: null,
Summarize: null,
SummarizeEn: null,
IsMain: false,
Indication: null,
IndicationEn: null,
}
}
export default {
props: {
reviewerId: {
type: String,
},
},
components: { BaseModel },
data() {
return {
list: [],
loading: false,
ISMAIN: false,
model_cfg: {
visible: false,
showClose: true,
width: '800px',
title: this.$t('system:reviewer:form:SummarizeTitle'),
appendToBody: false,
top: '8vh',
},
form: defaultForm(),
rules: {
Indication: [
{
required: true,
message: 'Please enter Indication',
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
IndicationEn: [
{
required: true,
message: 'Please enter Indication',
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Summarize: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
SummarizeEn: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
},
}
},
mounted() {
this.getDetail()
},
methods: {
async handleSave() {
try {
let validate = await this.$refs.summarizeFrom.validate()
if (!validate) return false
this.form.DoctorId = this.$route.query.Id || this.reviewerId
this.loading = true
if (this.$route.query.trialId) {
this.form.TrialId = this.$route.query.trialId
}
if (this.list.length <= 0) {
this.form.IsMain = true
}
let res = await addOrUpdateGneralSituation(this.form)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.model_cfg.visible = false
this.getDetail()
}
} catch (err) {
this.loading = false
console.log(err)
}
},
//
async getDetail() {
try {
let id = this.$route.query.Id || this.reviewerId
if (!id) return false
this.loading = true
let res = await getSummarizeInfo({
DoctorId: id,
})
this.loading = false
if (res.IsSuccess) {
this.list = res.Result.SummarizeList
}
} catch (err) {
this.loading = false
console.log(err)
}
},
handleCancle() {
this.model_cfg.visible = false
},
handleAdd(row) {
this.form = defaultForm()
this.ISMAIN = false
if (row) {
Object.keys(this.form).forEach((key) => {
this.form[key] = row[key]
})
this.form.Id = row.Id
if (this.form.IsMain) {
this.ISMAIN = true
}
}
if (this.list.length <= 0) {
this.form.IsMain = true
}
this.model_cfg.visible = true
},
async handleDelete(row) {
try {
if (row.IsMain) {
return this.$message.warning(
this.$t('system:reviewer:message:deletedSuccessfully')
)
}
let confirm = await this.$confirm(
this.$t('system:reviewer:confirm:delete')
)
if (!confirm) return false
let data = {
Id: row.Id,
}
this.loading = true
let res = await deleteSummarizeInfo(data)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.getDetail()
}
} catch (err) {
console.log(err)
this.loading = false
}
},
},
}
</script>
<style lang="scss" scoped>
.basic-form {
.el-input--small {
width: 220px !important;
}
.el-select--small {
width: 220px !important;
}
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin-bottom: 10px;
}
</style>

View File

@ -1,16 +1,10 @@
<template> <template>
<div class="form-container"> <div class="form-container">
<div class="title-wrapper"> <div class="title-wrapper">
<p>{{ $t('system:TrialExperience:title:Clinical Trial Experience') }}</p> <p>{{$t('system:TrialExperience:title:Clinical Trial Experience')}}</p>
<el-button <el-button :disabled="$route.query.ReviewStatus === '1'" class="add" size="small" @click="handleAddClinicalTrial">{{$t('common:button:add')}}</el-button>
:disabled="$route.query.ReviewStatus === '1'"
class="add"
size="small"
@click="handleAddClinicalTrial"
>{{ $t('common:button:add') }}</el-button
>
</div> </div>
<div style="padding: 0 40px"> <div style="padding:0 40px;">
<el-table <el-table
ref="clinicalTrialTbl" ref="clinicalTrialTbl"
v-loading="loading" v-loading="loading"
@ -19,152 +13,57 @@
size="small" size="small"
> >
<el-table-column type="index" width="40" /> <el-table-column type="index" width="40" />
<el-table-column <el-table-column prop="Phase" :label="$t('system:TrialExperience:title:Phase')" min-width="50" />
prop="Phase" <el-table-column prop="EvaluationCriteriaList" :label="$t('system:TrialExperience:title:Review Criteria')" min-width="100">
:label="$t('system:TrialExperience:title:Phase')"
min-width="50"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{ scope.row.EvaluationCriteriaList.length>0? scope.row.EvaluationCriteriaList.join(', '):'' }}
scope.row.OtherStages ? scope.row.OtherStages : scope.row.Phase
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="EvaluationCriteriaList" :label="$t('system:TrialExperience:title:Starting And Ending Date')" min-width="100">
prop="EvaluationCriteriaList"
:label="$t('system:TrialExperience:title:Review Criteria')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ <span v-if="scope.row.StartTime">{{ scope.row.StartTime.split('-')[0] }}-{{scope.row.EndTime ? scope.row.EndTime.split('-')[0] : ''}}</span>
scope.row.EvaluationCriteriaList.length > 0
? scope.row.EvaluationCriteriaList.join(', ')
: ''
}}
<span v-if="scope.row.OtherCriterion">
{{
scope.row.EvaluationCriteriaList.length > 0
? `, ${scope.row.OtherCriterion}`
: scope.row.OtherCriterion
}}
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="VisitReadingCount" :label="$t('system:TrialExperience:title:Visit Reading Count')" min-width="70" />
prop="EvaluationCriteriaList" <el-table-column prop="EvaluationContent" :label="$t('system:TrialExperience:Indication')" min-width="70" />
:label="$t('system:TrialExperience:title:Starting And Ending Date')" <el-table-column :label="$t('system:TrialExperience:Operation')" min-width="200">
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.StartTime" <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEdit(scope.row)">
>{{ scope.row.StartTime.split('-')[0] }} ~ {{ $t('common:button:edit') }}</el-button>
{{ <el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleDel(scope.row)">{{ $t('common:button:delete') }}</el-button>
scope.row.EndTime ? scope.row.EndTime.split('-')[0] : '至今'
}}</span
>
</template>
</el-table-column>
<el-table-column
prop="VisitReadingCount"
:label="$t('system:TrialExperience:title:Visit Reading Count')"
min-width="70"
/>
<el-table-column
prop="EvaluationContent"
:label="$t('system:TrialExperience:Indication')"
min-width="70"
>
<template slot-scope="scope">
<span v-if="scope.row.EvaluationContent">
{{ scope.row.EvaluationContent }}
</span>
<span v-else>
{{ $fd('Indication', scope.row.IndicationEnum) }}
</span>
</template>
</el-table-column>
<el-table-column
:label="$t('system:TrialExperience:Operation')"
min-width="200"
>
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleEdit(scope.row)"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="text"
size="small"
:disabled="$route.query.ReviewStatus === '1'"
@click="handleDel(scope.row)"
>
{{ $t('common:button:delete') }}
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="title-wrapper" style="margin-top: 10px"> <div class="title-wrapper" style="margin-top:10px;">
<p>{{ $t('system:TrialExperience:title:GCP Certificate') }}</p> <p>{{$t('system:TrialExperience:title:GCP Certificate')}}</p>
</div> </div>
<div style="margin-left: 40px; width: 40%"> <div style="margin-left:40px;width:40%">
<gcp-certificate <gcp-certificate :doctor-id="doctorId" :gcp="GCP" :gcp-id="GCPID" />
:doctor-id="doctorId"
:gcp="GCP"
:gcp-id="GCPID"
:DATA="GCPData"
/>
</div> </div>
<div class="title-wrapper" style="margin-top: 10px"> <div class="title-wrapper" style="margin-top:10px;">
<p>{{ $t('system:TrialExperience:title:Other Relevant Experience') }}</p> <p>{{$t('system:TrialExperience:title:Other Relevant Experience')}}</p>
</div> </div>
<div style="padding: 0 40px"> <div style="padding:0 40px;">
<el-row type="flex" justify="space-between"> <el-row type="flex" justify="space-between">
<el-col :span="11"> <el-col :span="11">
<el-input <el-input
v-model="OtherClinicalExperience" v-model="OtherClinicalExperience"
type="textarea" type="textarea"
rows="8" rows="5"
placeholder="Please specify in English" placeholder="Please specify in English"
size="small" size="small"
:maxlength="4000"
/> />
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-input <el-input v-model="OtherClinicalExperienceCN" :disabled="$route.query.ReviewStatus === '1'" type="textarea" rows="5" placeholder="请用中文注明" size="small" />
v-model="OtherClinicalExperienceCN"
:disabled="$route.query.ReviewStatus === '1'"
type="textarea"
rows="8"
placeholder="请用中文注明"
size="small"
:maxlength="4000"
/>
</el-col> </el-col>
</el-row> </el-row>
<el-button <el-button type="primary" size="small" style="margin-top:20px" :disabled="isBtnDisabled || $route.query.ReviewStatus === '1'" @click="handleSaveOtherClinical">
type="primary" {{ $t('common:button:save') }}</el-button>
size="small"
style="margin-top: 20px"
:disabled="isBtnDisabled || $route.query.ReviewStatus === '1'"
@click="handleSaveOtherClinical"
>
{{ $t('common:button:save') }}</el-button
>
</div> </div>
<el-dialog <el-dialog v-if="clinicalTrialDialogVisible" :title="clinicalTrialDialogTitle" :visible.sync="clinicalTrialDialogVisible" width="480px" :close-on-click-modal="false">
v-if="clinicalTrialDialogVisible"
:title="clinicalTrialDialogTitle"
:visible.sync="clinicalTrialDialogVisible"
width="480px"
:close-on-click-modal="false"
append-to-body
>
<el-form <el-form
ref="clinicalTrialForm" ref="clinicalTrialForm"
label-width="150px" label-width="150px"
@ -173,15 +72,14 @@
:model="clinicalTrialForm" :model="clinicalTrialForm"
size="small" size="small"
> >
<el-form-item <el-form-item :label="$t('system:TrialExperience:label:Phase')" prop="PhaseId">
:label="$t('system:TrialExperience:label:Phase')" <el-select v-model="clinicalTrialForm.PhaseId">
prop="PhaseId" <!-- <el-option
> v-for="(key,value) of dictionaryList.Phase"
<el-select :key="value"
v-model="clinicalTrialForm.PhaseId" :label="key"
clearable :value="value"
placeholder="" /> -->
>
<el-option <el-option
v-for="item of dictionaryList.Trial_Phase" v-for="item of dictionaryList.Trial_Phase"
:key="item.Id" :key="item.Id"
@ -190,47 +88,21 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="OtherStages" v-if="Trial_Phase_isOther"> <el-form-item :label="$t('system:TrialExperience:label:Review Criteria')" prop="EvaluationCriteriaIdList">
<el-input
v-model="clinicalTrialForm.OtherStages"
clearable
:placeholder="
$t('curriculumVitae:clinicalTrials:placeholder:byStagesOther')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('system:TrialExperience:label:Review Criteria')"
prop="EvaluationCriteriaIdList"
>
<el-select <el-select
v-model="clinicalTrialForm.EvaluationCriteriaIdList" v-model="clinicalTrialForm.EvaluationCriteriaIdList"
multiple multiple
> >
<!-- <el-option v-for="(key,value) of dictionaryList.CriterionType" :key="value" :label="key" :value="value" /> --> <!-- <el-option v-for="(key,value) of dictionaryList.ReadingStandard" :key="value" :label="key" :value="value" /> -->
<el-option <el-option
v-for="item in CriterionType" v-for="item of dictionaryList.ReadingStandard"
:key="item.Id" :key="item.Id"
:label="item.Value" :label="item.Value"
:value="item.Id" :value="item.Id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="OtherCriterion" v-if="ReadingStandard_isOther"> <el-form-item :label="$t('system:TrialExperience:label:Start Time')" prop="StartTime">
<el-input
v-model="clinicalTrialForm.OtherCriterion"
clearable
:placeholder="
$t('curriculumVitae:clinicalTrials:placeholder:criterionOther')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('system:TrialExperience:label:Start Time')"
prop="StartTime"
>
<el-date-picker <el-date-picker
v-model="clinicalTrialForm.StartTime" v-model="clinicalTrialForm.StartTime"
type="year" type="year"
@ -238,10 +110,7 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:TrialExperience:label:End Time')" prop="EndTime">
:label="$t('system:TrialExperience:label:End Time')"
prop="EndTime"
>
<el-date-picker <el-date-picker
v-model="clinicalTrialForm.EndTime" v-model="clinicalTrialForm.EndTime"
type="year" type="year"
@ -249,79 +118,22 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('system:TrialExperience:Visit Reading Count')" prop="VisitReadingCount">
:label="$t('system:TrialExperience:Visit Reading Count')" <el-input style="width: 100%" oninput="value=value.replace(/[^\d]/g,'')" v-model="clinicalTrialForm.VisitReadingCount" controls-position="right" :min="0" />
prop="VisitReadingCount"
>
<el-input
style="width: 100%"
oninput="value=value.replace(/[^\d]/g,'')"
v-model="clinicalTrialForm.VisitReadingCount"
controls-position="right"
:min="0"
/>
</el-form-item> </el-form-item>
<!-- 适应症类型 IndicationType --> <el-form-item :label="$t('system:TrialExperience:Indication')" prop="EvaluationContent">
<el-form-item <el-input v-model="clinicalTrialForm.EvaluationContent" />
:label="$t('system:TrialExperience:indicationType')"
prop="IndicationTypeId"
>
<el-select
v-model="clinicalTrialForm.IndicationTypeId"
@change="handleIndicationTypeChange"
>
<el-option
v-for="item of $d.IndicationType"
:key="item.id"
:label="item.label"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('system:TrialExperience:Indication')"
prop="IndicationEnum"
>
<el-select
v-model="clinicalTrialForm.IndicationEnum"
:disabled="!clinicalTrialForm.IndicationTypeId"
>
<el-option
v-for="item of IndicationOptions"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="EvaluationContent" v-if="IndicationEnum_isOther">
<el-input
v-model="clinicalTrialForm.EvaluationContent"
clearable
:maxlength="400"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button <el-button type="primary" size="small" :loading="isDisabled" @click="handleSave">{{ $t('common:button:save') }}</el-button>
type="primary"
size="small"
:loading="isDisabled"
@click="handleSave"
>{{ $t('common:button:save') }}</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import UploadFile from '@/components/UploadFile' // import UploadFile from '@/components/UploadFile'
import { import { getTrialExperience, addOrUpdateTrialExperience, deleteTrialExperience, updateOtherExperience } from '@/api/reviewers'
getTrialExperience,
addOrUpdateTrialExperience,
deleteTrialExperience,
updateOtherExperience,
} from '@/api/reviewers'
import { getBasicDataSelects } from '@/api/dictionary/dictionary' import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import GcpCertificate from './GcpCertificate.vue' import GcpCertificate from './GcpCertificate.vue'
import moment from 'moment' import moment from 'moment'
@ -333,20 +145,11 @@ const getClinicalTrialDefault = () => {
VisitReadingCount: 0, VisitReadingCount: 0,
StartTime: null, StartTime: null,
EndTime: null, EndTime: null,
OtherStages: '',
OtherCriterion: '',
IndicationEnum: null,
IndicationTypeId: null,
} }
} }
export default { export default {
name: 'TrialExperience', name: 'TrialExperience',
components: { GcpCertificate }, components: { GcpCertificate },
props: {
reviewerId: {
type: String,
},
},
data() { data() {
return { return {
loading: false, loading: false,
@ -356,97 +159,20 @@ export default {
clinicalTrialForm: getClinicalTrialDefault(), clinicalTrialForm: getClinicalTrialDefault(),
clinicalTrialRules: { clinicalTrialRules: {
PhaseId: [ PhaseId: [
{ { required: true, message: 'Please select', trigger: ['blur', 'change'] }
required: true,
message: 'Please select',
trigger: ['blur', 'change'],
},
], ],
EvaluationCriteriaIdList: [ EvaluationCriteriaIdList: [
{ { required: true, message: 'Please select', trigger: ['blur', 'change'] }
required: true,
message: 'Please select',
trigger: ['blur', 'change'],
},
], ],
VisitReadingCount: [ VisitReadingCount: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
], ],
EvaluationContent: [ EvaluationContent: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{ { max: 300, message: 'The maximum length is 300' }
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
IndicationEnum: [
{ required: true, message: 'Please select', trigger: 'blur' },
], ],
StartTime: [ StartTime: [
{ required: true, message: 'Please specify', trigger: 'blur' }, { required: true, message: 'Please specify', trigger: 'blur' },
{
validator: (rule, value, callback) => {
if (
value &&
this.clinicalTrialForm.EndTime &&
moment(value).isAfter(moment(this.clinicalTrialForm.EndTime))
) {
callback(
new Error(
this.$t('system:TrialExperience:rule:startBeforeEnd')
)
)
} else {
callback()
}
},
trigger: 'blur',
},
],
EndTime: [
{
validator: (rule, value, callback) => {
if (
value &&
this.clinicalTrialForm.StartTime &&
moment(value).isBefore(moment(this.clinicalTrialForm.StartTime))
) {
callback(
new Error(
this.$t('system:TrialExperience:rule:endBeforeStart')
)
)
} else {
callback()
}
},
trigger: 'blur',
},
],
OtherStages: [
{
required: true,
message: 'Please input',
trigger: ['blur', 'change'],
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
OtherCriterion: [
{
required: true,
message: 'Please input',
trigger: ['blur', 'change'],
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
], ],
}, },
GCP: 0, GCP: 0,
@ -454,132 +180,33 @@ export default {
OtherClinicalExperience: '', OtherClinicalExperience: '',
OtherClinicalExperienceCN: '', OtherClinicalExperienceCN: '',
isDisabled: false, isDisabled: false,
doctorId: this.$route.query.Id || this.reviewerId, doctorId: this.$route.query.Id,
isBtnDisabled: false, isBtnDisabled: false,
selectId: '00000000-0000-0000-0000-000000000000', selectId: '00000000-0000-0000-0000-000000000000',
dictionaryList: {}, dictionaryList: {}
// otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
otherId: '00000000-0000-0000-0000-000000000000',
GCPData: {},
} }
}, },
computed: {
IndicationOptions() {
console.log(
this.$d.IndicationType,
this.clinicalTrialForm.IndicationTypeId
)
if (!this.clinicalTrialForm.IndicationTypeId) return []
let indicationGroupingArr = this.$d.IndicationType.filter(
(item) => item.id === this.clinicalTrialForm.IndicationTypeId
)
let indicationGrouping = null
if (
Array.isArray(indicationGroupingArr) &&
indicationGroupingArr.length > 0
) {
indicationGrouping = indicationGroupingArr[0].raw.ChildGroup
}
let arr =
this.$d.Indication.filter(
(item) => indicationGrouping === item.raw.ChildGroup
) || []
return arr
},
IndicationEnum_isOther() {
if (!this.clinicalTrialForm.IndicationEnum) return false
let value = this.$d.Indication.find(
(item) => item.value === this.clinicalTrialForm.IndicationEnum
).label
return value === this.$t('curriculumVitae:selectLabel:Other')
},
Trial_Phase_isOther() {
if (!this.clinicalTrialForm.PhaseId) return false
let value = this.dictionaryList.Trial_Phase.find(
(item) => item.Id === this.clinicalTrialForm.PhaseId
).Value
return value === this.$t('curriculumVitae:selectLabel:Other')
},
ReadingStandard_isOther() {
if (
!this.clinicalTrialForm.EvaluationCriteriaIdList ||
this.clinicalTrialForm.EvaluationCriteriaIdList.length <= 0
)
return false
return this.clinicalTrialForm.EvaluationCriteriaIdList.includes(
this.otherId
)
},
CriterionType() {
if (!this.dictionaryList.CriterionType) return []
return [
...this.dictionaryList.CriterionType,
{
Id: this.otherId,
Value: this.$t('curriculumVitae:selectLabel:Other'),
},
]
},
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.doctorId = this.reviewerId
this.initForm()
}
},
Trial_Phase_isOther() {
if (!this.Trial_Phase_isOther) {
this.clinicalTrialForm.OtherStages = null
}
},
ReadingStandard_isOther() {
if (!this.ReadingStandard_isOther) {
this.clinicalTrialForm.OtherCriterion = null
}
},
IndicationEnum_isOther() {
if (!this.IndicationEnum_isOther) {
this.clinicalTrialForm.EvaluationContent = null
}
},
},
created() { created() {
this.initForm() this.initForm()
}, },
methods: { methods: {
async initForm() { async initForm() {
await this.getDicData() await this.getDicData()
const id = this.$route.query.Id || this.reviewerId const id = this.$route.query.Id
if (id) { if (id) {
this.loading = true this.loading = true
let data = { getTrialExperience(id).then(res => {
DoctorId: id,
}
if (this.$route.query.trialId) {
data.TrialId = this.$route.query.trialId
}
getTrialExperience(data)
.then((res) => {
this.clinicalTrialList = res.Result.ClinicalTrialExperienceList this.clinicalTrialList = res.Result.ClinicalTrialExperienceList
this.GCP = res.Result.GCP this.GCP = res.Result.GCP
this.GCPID = res.Result.GCPId this.GCPID = res.Result.GCPId
this.GCPData = {
GCPAgencies: res.Result.GCPAgencies,
GCPTime: res.Result.GCPTime,
}
this.OtherClinicalExperience = res.Result.OtherClinicalExperience this.OtherClinicalExperience = res.Result.OtherClinicalExperience
this.OtherClinicalExperienceCN = this.OtherClinicalExperienceCN = res.Result.OtherClinicalExperienceCN
res.Result.OtherClinicalExperienceCN
this.loading = false this.loading = false
}) }).catch(() => { this.loading = false })
.catch(() => {
this.loading = false
})
} }
}, },
getDicData() { getDicData() {
getBasicDataSelects(['Trial_Phase', 'CriterionType']).then((res) => { getBasicDataSelects(['Trial_Phase', 'ReadingStandard']).then(res => {
this.dictionaryList = { ...res.Result } this.dictionaryList = { ...res.Result }
}) })
}, },
@ -590,19 +217,7 @@ export default {
this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault()) this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault())
}, },
handleEdit(row) { handleEdit(row) {
const { const { Id, PhaseId, EvaluationCriteriaIdList, EvaluationContent, StartTime, EndTime, VisitReadingCount } = row
Id,
PhaseId,
EvaluationCriteriaIdList,
EvaluationContent,
StartTime,
EndTime,
VisitReadingCount,
OtherStages,
OtherCriterion,
IndicationEnum,
IndicationTypeId,
} = row
this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault()) this.clinicalTrialForm = Object.assign({}, getClinicalTrialDefault())
this.clinicalTrialDialogTitle = 'Edit' this.clinicalTrialDialogTitle = 'Edit'
this.clinicalTrialDialogVisible = true this.clinicalTrialDialogVisible = true
@ -613,48 +228,33 @@ export default {
this.clinicalTrialForm.VisitReadingCount = VisitReadingCount this.clinicalTrialForm.VisitReadingCount = VisitReadingCount
this.clinicalTrialForm.EvaluationCriteriaIdList = EvaluationCriteriaIdList this.clinicalTrialForm.EvaluationCriteriaIdList = EvaluationCriteriaIdList
this.clinicalTrialForm.EvaluationContent = EvaluationContent this.clinicalTrialForm.EvaluationContent = EvaluationContent
this.clinicalTrialForm.OtherStages = OtherStages
this.clinicalTrialForm.OtherCriterion = OtherCriterion
this.clinicalTrialForm.IndicationEnum = IndicationEnum
this.clinicalTrialForm.IndicationTypeId = IndicationTypeId
}, },
handleSave() { handleSave() {
this.$refs.clinicalTrialForm.validate((valid) => { this.$refs.clinicalTrialForm.validate(valid => {
if (valid) { if (valid) {
this.isDisabled = true this.isDisabled = true
this.clinicalTrialForm.DoctorId = this.clinicalTrialForm.DoctorId = this.$route.query.Id
this.$route.query.Id || this.reviewerId
var dateTime var dateTime
if (this.clinicalTrialForm.StartTime) { if (this.clinicalTrialForm.StartTime) {
dateTime = new Date(this.clinicalTrialForm.StartTime) dateTime = new Date(this.clinicalTrialForm.StartTime)
this.clinicalTrialForm.StartTime = this.clinicalTrialForm.StartTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format('YYYY') + "-01"
moment(new Date(dateTime.setDate(dateTime.getDate() + 1))).format(
'YYYY'
) + '-01'
} }
if (this.clinicalTrialForm.EndTime) { if (this.clinicalTrialForm.EndTime) {
dateTime = new Date(this.clinicalTrialForm.EndTime) dateTime = new Date(this.clinicalTrialForm.EndTime)
this.clinicalTrialForm.EndTime = this.clinicalTrialForm.EndTime = moment(new Date(dateTime.setDate(dateTime.getDate()+1))).format("YYYY") + "-01"
moment(new Date(dateTime.setDate(dateTime.getDate() + 1))).format(
'YYYY'
) + '-01'
} }
if (this.$route.query.trialId) { addOrUpdateTrialExperience(this.clinicalTrialForm).then(res => {
this.clinicalTrialForm.TrialId = this.$route.query.trialId
}
addOrUpdateTrialExperience(this.clinicalTrialForm)
.then((res) => {
this.isDisabled = false this.isDisabled = false
this.initForm() this.initForm()
if (this.clinicalTrialForm.Id) { if (this.clinicalTrialForm.Id) {
this.$message({ this.$message({
message: 'Updated successfully', message: 'Updated successfully',
type: 'success', type: 'success'
}) })
} else { } else {
this.$message({ this.$message({
message: 'Addedd successfully', message: 'Addedd successfully',
type: 'success', type: 'success'
}) })
} }
this.clinicalTrialDialogVisible = false this.clinicalTrialDialogVisible = false
@ -669,28 +269,20 @@ export default {
this.$confirm('Confirm to delete?', { this.$confirm('Confirm to delete?', {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
deleteTrialExperience(row.Id).then((res) => { deleteTrialExperience(row.Id)
this.clinicalTrialList.splice( .then(res => {
this.clinicalTrialList.findIndex((item) => item.Id === row.Id), this.clinicalTrialList.splice(this.clinicalTrialList.findIndex(item => item.Id === row.Id), 1)
1
)
this.$message.success('Deleted successfully !') this.$message.success('Deleted successfully !')
}) })
}) })
.catch((action) => {}) .catch(action => {})
}, },
handleSaveOtherClinical() { handleSaveOtherClinical() {
const param = { const param = { DoctorId: this.doctorId, OtherClinicalExperience: this.OtherClinicalExperience, OtherClinicalExperienceCN: this.OtherClinicalExperienceCN }
DoctorId: this.doctorId, updateOtherExperience(param).then(res => {
OtherClinicalExperience: this.OtherClinicalExperience,
OtherClinicalExperienceCN: this.OtherClinicalExperienceCN,
}
if (this.$route.query.trialId) {
param.TrialId = this.$route.query.trialId
}
updateOtherExperience(param).then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
if (this.id) { if (this.id) {
this.$message.success('Updated successfully') this.$message.success('Updated successfully')
@ -699,11 +291,7 @@ export default {
} }
} }
}) })
}, }
handleIndicationTypeChange(val) { }
this.clinicalTrialForm.EvaluationContent = null
this.clinicalTrialForm.IndicationEnum = null
},
},
} }
</script> </script>

View File

@ -1,488 +0,0 @@
<template>
<div class="agreement">
<div class="title">{{ $t('curriculumVitae:agreement:title') }}</div>
<div class="fileBox">
<div class="file_title">
{{ $t('curriculumVitae:agreement:fileTitle') }}
</div>
<template v-if="sowList && sowList.length > 0">
<div class="file" v-for="item in sowList" :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')"
v-if="item.IsIRUpload || isPM"
@click="
handleEditCol(item, 0, $t('trials:enrolledReviews:message:SOW'))
"
/>
<i
class="el-icon-delete"
v-if="item.IsIRUpload || isPM"
: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(0, $t('trials:enrolledReviews:message:SOW'))"
>
{{ $t('curriculumVitae:agreement:btn:upload') }}
</el-button>
<el-button
type="text"
@click.stop="handleDownload('Reviewer_SOW_Template')"
>
{{ $t('common:button:downloadTpl') }}
</el-button>
</div>
<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>
<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>
<BaseModel :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="DictionaryTypeConfigForm"
:model="form"
:rules="rules"
label-width="120px"
size="small"
>
<el-form-item
:label="$t('system:Agreements:label:Criterion Type')"
prop="CriterionType"
>
<el-select v-model="form.CriterionType">
<el-option
v-for="item of $d.CriterionType"
:key="item.id"
:value="item.value"
:label="item.label"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('system:Agreements:label:File')"
prop="FilePath"
>
<el-upload
class="upload-demo"
action
:before-upload="beforeUpload"
:http-request="handleUploadFile"
:on-preview="handlePreview2"
:on-remove="handleRemoveFile2"
:show-file-list="true"
:limit="1"
:accept="accept"
:file-list="fileList"
>
<el-button
size="small"
type="primary"
:disabled="fileList.length > 0"
>{{ $t('common:button:upload') }}</el-button
>
<span>{{ $t('system:tip:file:pdf') }}</span>
</el-upload>
</el-form-item>
<el-form-item :label="$t('system:Agreements:label:Remark')">
<el-input
v-model="form.Remark"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
></el-input>
</el-form-item>
<el-form-item :label="$t('system:Agreements:label:Is Enable')">
<el-switch
v-model="form.IsEnable"
:active-value="true"
:inactive-value="false"
/>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button
:disabled="btnLoading"
size="small"
type="primary"
@click="handleCancle"
>
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
:loading="btnLoading"
@click="handleSave"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</BaseModel>
</div>
</template>
<script>
import { DownloadCommonDoc } from '@/api/dictionary'
import {
addDoctorCriterionFile,
deleteDoctorCriterionFile,
getDoctorCriterionFile,
} from '@/api/reviewers'
import BaseModel from '@/components/BaseModel'
import UploadFiles from '@/components/UploadFiles'
export default {
name: 'agreement',
components: {
BaseModel,
UploadFiles,
},
props: {
DATA: {
type: Array,
default: () => {
return []
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
isPM: {
type: Boolean,
default: false,
},
},
data() {
return {
faccept: ['.pdf'],
loading: false,
agreementList: [],
sowList: [],
ackSowList: [],
loading: false,
isOpen: false,
btnLoading: false,
model_cfg: {
visible: false,
showClose: true,
width: '600px',
title: '',
appendToBody: true,
},
form: {
Remark: null,
FileType: null,
FileName: null,
FilePath: null,
DoctorId: null,
CriterionType: null,
IsEnable: false,
},
rules: {
CriterionType: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
FilePath: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur'],
},
],
},
fileList: [],
accept: '.pdf',
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.initSowList()
}
},
},
computed: {
CounselorFiles() {
if (!this.DATA || this.DATA.length <= 0) return false
return this.DATA.filter(
(item) => item.Type && item.Type.indexOf('Consultant Agreement') >= 0
)
},
},
methods: {
handleRemoveFile(row) {
this.$refs.uploadAgreement.handleDeleteFile(row)
},
getFileList(fileList) {
this.agreementList = fileList
},
preview(row) {
this.$preview({
path: row.FullPath,
type: 'pdf',
title: row.FileName,
})
},
handleDownload(code) {
this.loading = true
DownloadCommonDoc(code)
.then((data) => {
this.loading = false
})
.catch(() => {
this.loading = false
})
},
handleEditCol(row, fileType, title) {
this.model_cfg.visible = true
this.form = Object.assign({}, row)
this.fileList[0] = { name: row.FileName, path: row.FilePath }
this.form.FileType = fileType
this.model_cfg.title = title
},
handleRemoveFile3(row) {
this.$confirm(
this.$t('dictionary:attachment:export:confirm:delete')
).then(() => {
deleteDoctorCriterionFile({
Id: row.Id,
}).then(() => {
this.initSowList()
this.$message.success(this.$t('common:message:deletedSuccessfully'))
})
})
},
handleRemoveFile2() {
this.form.FileName = null
this.form.FilePath = null
this.fileList = []
},
beforeUpload(row) {
if (this.fileList.length > 0) {
// this.$alert('')
this.$alert(this.$t('upload:rule:maxFile1'))
return
}
if (!this.checkFileSuffix(row.name)) {
this.$message.warning(this.$t('upload:rule:MUSTPDF'))
return false
}
},
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
return (
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
)
},
handlePreview3(row) {
return this.$preview({
path: row.FilePath || row.Path || row.FullPath,
type: 'pdf',
title: row.FileName,
})
if (row.FilePath) {
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
}
},
handlePreview2(row, r2) {
return this.$preview({
path: row.FullPath,
type: 'pdf',
title: row.FileName,
})
if (row.fullPath) {
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
}
},
async handleUploadFile(param) {
this.btnLoading = true
var fileName = param.file.name
let file = await this.fileToBlob(param.file)
let res = await this.OSSclient.put(
`/SystemData/reviewer/${
this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
}/${this.reviewerId}/${fileName}`,
file
)
this.form.FileName = param.file.name
this.form.FilePath = this.$getObjectName(res.url)
this.fileList[0] = {
name: this.$getObjectName(res.url),
path: this.$getObjectName(res.url),
fullPath: this.$getObjectName(res.url),
url: res.url,
}
this.btnLoading = false
},
handleCancle() {
this.model_cfg.visible = false
},
handleSave() {
this.$refs['DictionaryTypeConfigForm'].validate((valid) => {
if (!valid) return
this.form.DoctorId = this.reviewerId
this.form.CriterionName = this.$fd(
'CriterionType',
this.form.CriterionType
)
if (!this.isPM) {
this.form.IsIRUpload = true
}
addDoctorCriterionFile(this.form).then((res) => {
this.$message.success(this.$t('common:message:addedSuccessfully'))
this.initSowList()
this.handleCancle()
})
})
},
addCol(fileType, title) {
this.model_cfg.visible = true
this.form = {
Remark: null,
FileType: null,
FileName: null,
FilePath: null,
DoctorId: null,
CriterionType: null,
IsEnable: false,
}
this.handleRemoveFile2()
this.form.FileType = fileType
this.model_cfg.title = title
},
initSowList() {
if (!this.reviewerId) return
getDoctorCriterionFile({
fileType: 0,
DoctorId: this.reviewerId,
}).then((res) => {
this.sowList = res.Result
})
getDoctorCriterionFile({
fileType: 1,
DoctorId: this.reviewerId,
}).then((res) => {
this.ackSowList = res.Result
})
},
},
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,323 +0,0 @@
<template>
<div class="certificate">
<div class="title">{{ $t('curriculumVitae:certificate:title') }}</div>
<div class="fileBox">
<!--最高医学学位毕业证书-->
<div class="file_title">
{{ $t('curriculumVitae:certificate:fileTitle:diploma') }}
</div>
<div class="file" v-if="diplomaFile">
<div class="name" :title="diplomaFile.FileName">
{{ diplomaFile.FileName }}
</div>
<i
class="el-icon-view"
:title="$t('common:button:preview')"
@click.stop="preview(diplomaFile)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(diplomaFile)"
/>
</div>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<!--医师资格证-->
<div class="file_title">
{{ $t('curriculumVitae:certificate:fileTitle:certificate') }}
</div>
<div class="file" v-if="certificateFile">
<div class="name" :title="certificateFile.FileName">
{{ certificateFile.FileName }}
</div>
<i
class="el-icon-view"
:title="$t('common:button:preview')"
@click.stop="preview(certificateFile)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(certificateFile)"
/>
</div>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<!--医师执业证-->
<div class="file_title">
{{ $t('curriculumVitae:certificate:fileTitle:license') }}
</div>
<div class="file" v-if="licenseFile">
<div class="name" :title="licenseFile.FileName">
{{ licenseFile.FileName }}
</div>
<i
class="el-icon-view"
:title="$t('common:button:preview')"
@click.stop="preview(licenseFile)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(licenseFile)"
/>
</div>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<!--大型医用设备上岗证-->
<div class="file_title">
{{ $t('curriculumVitae:certificate:fileTitle:workPermit') }}
</div>
<template v-if="workPermitFiles && workPermitFiles.length > 0">
<div class="file_title">
{{ $t('curriculumVitae:certificate:fileTitle:CT') }}
</div>
<div v-for="item in workPermitFiles" :key="item.Id">
<div class="file">
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
<i
class="el-icon-view"
:title="$t('common:button:preview')"
@click.stop="preview(item)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(item)"
/>
</div>
</div>
</template>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<div class="btnBox" style="margin-top: 10px">
<el-button
type="primary"
size="small"
:disabled="loading"
:loading="loading"
@click.stop="openBox"
>
{{ $t('curriculumVitae:certificate:btn:upload') }}
</el-button>
</div>
</div>
<base-model :config="model_cfg">
<template slot="dialog-body">
<div class="box">
<div class="clearfix">
<p style="line-height: 30px; font-size: 13px">
{{ $t('system:Credentials:title:Default Certificate') }}
</p>
<el-card class="e-card">
<p class="title">
{{
$t(
'system:Credentials:title:Diploma of the highest medical degree'
)
}}
</p>
<upload-file
:doctor-id="reviewerId"
type="Diploma of the highest medical degree"
@getFileList="$emit('getInfo')"
/>
</el-card>
<el-card class="e-card">
<p class="title">
{{
$t(
'system:Credentials:title:Medical Qualification Certificate'
)
}}
</p>
<upload-file
:doctor-id="reviewerId"
type="Medical Qualification Certificate"
@getFileList="$emit('getInfo')"
/>
</el-card>
<el-card class="e-card">
<p class="title">
{{ $t('system:Credentials:title:Practice License') }}
</p>
<upload-file
:doctor-id="reviewerId"
type="Practice License"
@getFileList="$emit('getInfo')"
/>
</el-card>
</div>
<div class="clearfix">
<p style="line-height: 30px; font-size: 13px">
{{ $t('system:Credentials:title:Modality Certificate') }}
</p>
<el-card class="e-card">
<p class="title">CT</p>
<upload-file
:doctor-id="reviewerId"
type="Modality Certificate(CT)"
@getFileList="$emit('getInfo')"
/>
</el-card>
<el-card class="e-card">
<p class="title">MRI</p>
<upload-file
:doctor-id="reviewerId"
type="Modality Certificate(MRI)"
@getFileList="$emit('getInfo')"
/>
</el-card>
<el-card class="e-card">
<p class="title">NM</p>
<upload-file
:doctor-id="reviewerId"
type="Modality Certificate(NM)"
@getFileList="$emit('getInfo')"
/>
</el-card>
<el-card class="e-card">
<p class="title">US</p>
<upload-file
:doctor-id="reviewerId"
type="Modality Certificate(US)"
@getFileList="$emit('getInfo')"
/>
</el-card>
</div>
</div>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:confirm') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import PreviewFile from '@/components/PreviewFile/index'
import BaseModel from '@/components/BaseModel'
import UploadFile from '@/components/UploadFile'
import { deleteAttachment } from '@/api/attachment'
export default {
name: 'certificate',
components: {
PreviewFile,
BaseModel,
UploadFile,
},
props: {
DATA: {
type: Array,
default: () => {
return []
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
faccept: ['.pdf'],
loading: false,
model_cfg: {
visible: false,
showClose: true,
width: '800px',
title: this.$t('curriculumVitae:certificate:form:title'),
appendToBody: true,
},
}
},
computed: {
//
diplomaFile() {
if (!this.DATA || this.DATA.length <= 0) return false
return this.DATA.find(
(item) => item.Type === 'Diploma of the highest medical degree'
)
},
//
certificateFile() {
if (!this.DATA || this.DATA.length <= 0) return false
return this.DATA.find(
(item) => item.Type === 'Medical Qualification Certificate'
)
},
//
licenseFile() {
if (!this.DATA || this.DATA.length <= 0) return false
return this.DATA.find((item) => item.Type === 'Practice License')
},
//
workPermitFiles() {
if (!this.DATA || this.DATA.length <= 0) return false
return this.DATA.filter(
(item) => item.Type && item.Type.indexOf('Modality Certificate') >= 0
)
},
},
methods: {
openBox() {
this.model_cfg.visible = true
},
handleCancle() {
this.model_cfg.visible = false
},
handleRemoveFile(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
deleteAttachment(row.Id, row.Path).then((res) => {
if (res.IsSuccess) {
this.$emit('getInfo')
this.$message({
message: this.$t('common:message:deletedSuccessfully'),
type: 'success',
})
}
})
})
.catch((action) => {})
},
preview(row) {
this.$preview({
path: row.FullPath,
type: 'pdf',
title: row.FileName,
})
},
beginScanFiles(e) {
let files = e.target.files
},
},
}
</script>
<style lang="scss" scoped>
// ::v-deep .el-dialog__body {
// padding-top: 0;
// }
.box {
display: flex;
justify-content: space-between;
.clearfix {
width: 48%;
.e-card {
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
}
}
</style>

View File

@ -1,339 +0,0 @@
<template>
<div class="curriculum">
<div class="title">{{ $t('curriculumVitae:curriculum:title') }}</div>
<div class="fileBox">
<div class="file_title">
{{ $t('curriculumVitae:curriculum:fileTitle:CN') }}
</div>
<template v-if="resumeListCN.length > 0">
<div class="file" v-for="item in resumeListCN" :key="item.Id">
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
<i
class="el-icon-download"
:title="$t('common:button:download')"
@click.stop="handlePreview(item)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(item)"
/>
<i
:class="{ 'el-icon-circle-check': true, disable: item.IsOfficial }"
:title="$t('common:button:default')"
@click.stop="handleSetOfiical(item)"
/>
</div>
</template>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<div class="file_title">
{{ $t('curriculumVitae:curriculum:fileTitle:EN') }}
</div>
<template v-if="resumeListEN.length > 0">
<div class="file" v-for="item in resumeListEN" :key="item.FileName">
<div class="name" :title="item.FileName">{{ item.FileName }}</div>
<i
class="el-icon-download"
:title="$t('common:button:download')"
@click.stop="handlePreview(item)"
/>
<i
class="el-icon-delete"
:title="$t('common:button:delete')"
@click.stop="handleRemoveFile(item)"
/>
</div>
</template>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<div class="btnBox" style="margin-top: 20px">
<div class="uploadFile-container" style="margin-right: 10px">
<el-upload
class="upload-demo"
:data="{ language: 1 }"
action
:show-file-list="false"
:http-request="handleUploadFile"
:file-list="resumeList"
accept=".doc,.docx"
>
<el-button size="small" type="primary">
{{ $t('curriculumVitae:curriculum:btn:uploadCN') }}
</el-button>
</el-upload>
</div>
<!-- <el-button
type="text"
@click.stop="handleDownload('Reviewer_resume_Template')"
>
{{ $t('common:button:downloadTpl') }}
</el-button> -->
</div>
<div class="btnBox">
<div class="uploadFile-container" style="margin-right: 10px">
<el-upload
class="upload-demo"
:data="{ language: 2 }"
action
:show-file-list="false"
:http-request="handleUploadFile"
:file-list="resumeList"
accept=".doc,.docx"
>
<el-button size="small" type="primary">
{{ $t('curriculumVitae:curriculum:btn:uploadEN') }}
</el-button>
</el-upload>
</div>
<!-- <el-button
type="text"
@click.stop="handleDownload('Reviewer_resume_Template')"
>
{{ $t('common:button:downloadTpl') }}
</el-button> -->
</div>
</div>
</div>
</template>
<script>
import {
getAttachmentByType,
saveAttachments,
deleteAttachment,
setOfficial,
setLanguageForResume,
} from '@/api/attachment'
import { DownloadCommonDoc } from '@/api/dictionary'
export default {
name: 'curriculum',
props: {
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
loading: false,
resumeList: [],
resumeListEN: [],
resumeListCN: [],
language: 0,
dialogVisible: false,
currentRow: {},
repeat: false,
isDisabled: false,
}
},
watch: {
reviewerId() {
if (this.reviewerId) {
this.getResumeList()
}
},
},
methods: {
handleDownload(code) {
this.loading = true
DownloadCommonDoc(code)
.then((data) => {
this.loading = false
})
.catch(() => {
this.loading = false
})
},
getResumeList() {
this.loading = true
getAttachmentByType(this.reviewerId, 'Resume')
.then((res) => {
if (res.IsSuccess) {
if (res.Result.length > 0) {
this.resumeList = res.Result
this.filterByLanguage()
}
}
this.loading = false
})
.catch(() => {
this.loading = false
})
},
handleUploadFile(param) {
this.repeat = false
// const fileName = param.file.name.substring(0, param.file.name.lastIndexOf('.'))
// const extension = param.file.name.substring(param.file.name.lastIndexOf('.'))
//
if (this.checkFileSuffix(param.file.name) > -1) {
//
const isRepeat = this.resumeList.some(
(item) => item.FileName === param.file.name
)
if (isRepeat) {
this.$confirm(
this.$t('curriculumVitae:resume:message:existingResume'),
{
type: 'warning',
distinguishCancelAndClose: true,
}
)
.then(() => {
//
this.repeat = true
this.uploadFile(param.file, param.data.language)
})
.catch((action) => {})
} else {
this.uploadFile(param.file, param.data.language)
}
} else {
this.$alert(this.$t('upload:rule:MUSTPDF'))
}
},
async uploadFile(file, language) {
this.isDisabled = true
var fileName = file.name
var files = this.resumeList
file = await this.fileToBlob(file)
let res = await this.OSSclient.put(
`/SystemData/reviewer/Resume/${this.reviewerId}/${fileName}`,
file
)
if (this.repeat) {
const index = files.findIndex((item, index) => {
return item.FileName === fileName
})
files[index].Path = this.$getObjectName(res.url)
files[index].FullPath = this.$getObjectName(res.url)
files[index].ReUpload = true
files[index].Language = language
} else {
const fileData = {
DoctorId: this.reviewerId,
Type: 'Resume',
Path: this.$getObjectName(res.url),
FullPath: this.$getObjectName(res.url),
FileName: fileName,
Language: language,
}
files.push(fileData)
}
this.saveUploadFiles(files)
},
saveUploadFiles(files) {
saveAttachments(files)
.then((res) => {
this.resumeList = res.Result
this.filterByLanguage()
this.isDisabled = false
this.$message.success(
this.$t('trials:uploadDicomList:table:Uploaded')
)
})
.catch(() => {
this.isDisabled = false
})
},
filterByLanguage() {
this.resumeListEN = []
this.resumeListCN = []
this.resumeList.map((resume) => {
if (resume.Language === 2) {
this.resumeListEN.push(resume)
} else if (resume.Language === 1) {
this.resumeListCN.push(resume)
}
})
},
checkFileSuffix(fileName) {
const accept = '.doc, .docx'
var index = fileName.lastIndexOf('.')
var suffix = fileName
.substring(index + 1, fileName.length)
.toLocaleLowerCase()
return accept.search(suffix)
},
handlePreview(row) {
if (row.FullPath) {
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
}
},
handleRemoveFile(row) {
this.$confirm(this.$t('trials:uploadedDicoms:message:deleteMes'), {
type: 'warning',
distinguishCancelAndClose: true,
})
.then(() => {
deleteAttachment(row.Id, row.Path).then((res) => {
if (res.IsSuccess) {
this.resumeList.splice(
this.resumeList.findIndex((item) => item.Id === row.Id),
1
)
this.filterByLanguage()
this.$message({
message: this.$t('common:message:deletedSuccessfully'),
type: 'success',
})
}
})
})
.catch((action) => {})
},
handleSetOfiical(row) {
if (row.IsOfficial) return false
setOfficial(this.reviewerId, row.Id, row.Language).then((res) => {
if (res.IsSuccess) {
this.getResumeList()
this.$message({
message: this.$t('common:message:savedSuccessfully'),
type: 'success',
})
}
})
},
handleLanguageClick(row) {
this.dialogVisible = true
this.language = row.Language
this.currentRow = row
},
setResumeLanguage() {
setLanguageForResume(
this.reviewerId,
this.currentRow.Id,
this.language
).then((res) => {
if (res.IsSuccess) {
this.dialogVisible = false
this.getResumeList()
this.$message({
message: this.$t('common:message:savedSuccessfully'),
type: 'success',
})
}
})
},
},
}
</script>
<style lang="scss" scoped>
.file {
width: 100%;
display: flex;
margin-bottom: 10px;
.name {
width: 70%;
white-space: nowrap; /* 文本不会换行,会在同一行内继续,直到遇到<br>标签为止 */
text-overflow: ellipsis; /* 当文本溢出包含它的容器时,显示省略号(...)来表示被截断的文本 */
overflow: hidden; /* 隐藏溢出容器的文本 */
}
i {
cursor: pointer;
margin: 3px;
color: #409eff;
}
}
</style>

View File

@ -1,585 +0,0 @@
<template>
<div class="continuingTraining">
<div class="title">
<span>{{ $t('curriculumVitae:continuingTraining:title') }}</span>
<el-button
type="text"
class="editBtn"
@click.stop="openEdit"
:disabled="!reviewerId"
>
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table
:data="DATA"
v-loading="loading"
style="width: 100%"
:header-cell-style="{ background: '#eee', color: '#606266' }"
>
<el-table-column
prop="date"
:label="$t('curriculumVitae:continuingTraining:table:time')"
>
<template slot-scope="scope">
<span>{{ scope.row.BeginDateStr }} ~ {{ scope.row.EndDateStr }}</span>
</template>
</el-table-column>
<el-table-column
prop="Training"
:label="$t('curriculumVitae:continuingTraining:table:type')"
>
<template slot-scope="scope">
<span>{{ $fd('Training', Number(scope.row.Training)) }}</span>
</template>
</el-table-column>
<el-table-column
prop="Major"
:label="$t('curriculumVitae:continuingTraining:table:direction')"
>
<template slot-scope="scope">
<span>{{ isEN ? scope.row.Major : scope.row.MajorCN }}</span>
</template>
</el-table-column>
<el-table-column
prop="school"
:label="$t('curriculumVitae:continuingTraining:table:school')"
>
<template slot-scope="scope">
<span>{{ isEN ? scope.row.School : scope.row.SchoolCN }}</span>
</template>
</el-table-column>
<el-table-column
prop="City"
:label="$t('curriculumVitae:continuingTraining:table:city')"
>
<template slot-scope="scope">
<span>{{ isEN ? scope.row.City : scope.row.CityCN }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('common:action:action')">
<template slot-scope="scope">
<el-button
type="text"
class="editBtn"
@click.stop="openEdit(scope.row)"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="text"
class="editBtn"
@click.stop="handleDel(scope.row)"
>
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<base-model :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="continuingTrainingFrom"
v-loading="loading"
:model="form"
:rules="rules"
label-width="80px"
size="small"
>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:time')"
prop="BeginDate"
>
<el-date-picker
clearable
v-model="daterange"
type="monthrange"
value-format="yyyy-MM-dd"
format="yyyy-MM"
:range-separator="$t('curriculumVitae:daterange:rangeSeparator')"
:start-placeholder="$t('curriculumVitae:daterange:startTime')"
:end-placeholder="$t('curriculumVitae:daterange:endTime')"
@change="changeTimeList"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:type')"
prop="Training"
>
<el-select v-model="form.Training" clearable placeholder="">
<el-option
v-for="item in $d.Training"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:direction')"
prop="Major"
v-if="isEN"
>
<el-input
v-model="form.Major"
type="textarea"
:rows="2"
:maxlength="4000"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:directionEN')
"
></el-input>
</el-form-item>
<el-form-item
prop="MajorCN"
:label="$t('curriculumVitae:continuingTraining:form:direction')"
v-else
>
<el-input
type="textarea"
:rows="2"
v-model="form.MajorCN"
:maxlength="4000"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:direction')
"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:hospital')"
prop="Hospital"
v-if="isEN"
>
<el-autocomplete
clearable
class="inline-input"
style="width: 100%"
v-model="form.Hospital"
:fetch-suggestions="querySearch"
placeholder=""
></el-autocomplete>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:hospital')"
prop="Hospital"
v-else
>
<el-autocomplete
clearable
class="inline-input"
style="width: 100%"
v-model="form.HospitalCN"
:fetch-suggestions="querySearch"
placeholder=""
></el-autocomplete>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:school')"
prop="School"
v-if="isEN"
>
<el-input
v-model="form.School"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:schoolEN')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
prop="SchoolCN"
:label="$t('curriculumVitae:continuingTraining:form:school')"
v-else
>
<el-input
v-model="form.SchoolCN"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:school')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:city')"
prop="City"
v-if="isEN"
>
<el-input
v-model="form.City"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:City')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
prop="CityCN"
:label="$t('curriculumVitae:continuingTraining:form:city')"
v-else
>
<el-input
v-model="form.CityCN"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:CityCN')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:continuingTraining:form:Country')"
prop="Country"
v-if="isEN"
>
<el-input
v-model="form.Country"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:Country')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
prop="CountryCN"
:label="$t('curriculumVitae:continuingTraining:form:Country')"
v-else
>
<el-input
v-model="form.CountryCN"
clearable
:placeholder="
$t('curriculumVitae:continuingTraining:placeholder:CountryCN')
"
:maxlength="400"
></el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
:loading="loading"
@click="handleSave"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import {
addOrUpdatePostgraduateInfo,
deletePostgraduateInfo,
} from '@/api/reviewers'
import store from '@/store'
import { mapGetters } from 'vuex'
const defaultForm = () => {
return {
BeginDate: '',
EndDate: '',
Training: '',
Major: '',
MajorCN: '',
HospitalId: null,
HospitalCN: null,
Hospital: null,
School: '',
SchoolCN: '',
City: '',
CityCN: '',
Country: '',
CountryCN: '',
}
}
export default {
name: 'continuingTraining',
components: { BaseModel },
props: {
DATA: {
type: Array,
required: true,
default: () => {
return []
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
model_cfg: {
visible: false,
showClose: true,
width: '600px',
title: this.$t('curriculumVitae:continuingTraining:form:title'),
appendToBody: true,
},
form: defaultForm(),
rules: {
BeginDate: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
EndDate: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
Training: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
Major: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
MajorCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
City: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
CityCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Country: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
CountryCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
},
loading: false,
daterange: [],
hospitalSelectList: [],
}
},
computed: {
...mapGetters(['hospitalList']),
},
mounted() {
store.dispatch('global/getHospital')
},
watch: {
hospitalList: {
handler() {
if (!Array.isArray(this.hospitalList) || this.hospitalList.length <= 0)
return false
this.hospitalSelectList = []
this.hospitalList.forEach((item) => {
if (this.isEN) {
this.hospitalSelectList.push({
value: item.HospitalName,
...item,
})
} else {
this.hospitalSelectList.push({
value: item.HospitalNameCN,
...item,
})
}
})
},
deep: true,
},
},
methods: {
querySearch(queryString, cb) {
var hospitalList = this.hospitalSelectList
var results = queryString
? hospitalList.filter(this.createFilter(queryString))
: hospitalList
// callback
cb(results)
},
createFilter(queryString) {
return (hospitalList) => {
if (this.isEN) {
return (
hospitalList.HospitalName.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
} else {
return (
hospitalList.HospitalNameCN.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
}
}
},
openEdit(row) {
this.form = defaultForm()
this.daterange = []
if (row) {
Object.keys(this.form).forEach((key) => {
if (row[key]) {
this.form[key] = row[key]
}
})
if (this.form.BeginDate && this.form.EndDate) {
this.daterange = [this.form.BeginDate, this.form.EndDate]
}
if (this.form.Degree) {
this.form.Degree = Number(this.form.Degree)
}
this.form.Id = row.Id
}
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.daterange = []
this.model_cfg.visible = false
},
async handleSave() {
try {
let validate = await this.$refs.continuingTrainingFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.DoctorId = this.reviewerId
}
let data = Object.assign({}, this.form)
if (!this.hospitalList.find((item) => item.Id === data.HospitalId)) {
data.Hospital = data.HospitalId
data.HospitalId = null
}
this.loading = true
let res = await addOrUpdatePostgraduateInfo(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async handleDel(row) {
try {
let confirm = await this.$confirm(
this.$t('trials:trials-list:table:isDeleted')
)
if (!confirm) return false
this.loading = true
let res = await deletePostgraduateInfo(row.Id)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$emit('getInfo')
}
} catch (err) {
this.loading = false
console.log(err)
}
},
changeTimeList() {
if (this.daterange && this.daterange.length === 2) {
this.form.BeginDate = this.daterange[0]
this.form.EndDate = this.daterange[1]
} else {
this.form.BeginDate = null
this.form.EndDate = null
}
},
},
}
</script>
<style lang="scss" scoped>
.continuingTraining {
min-height: 100px;
.title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
font-weight: bold;
}
}
.el-select,
.el-date-editor {
width: 100%;
}
</style>

View File

@ -1,516 +0,0 @@
<template>
<div class="EducationalExperience">
<div class="title">
<span>{{ $t('curriculumVitae:EducationalExperience:title') }}</span>
<el-button
type="text"
class="editBtn"
@click.stop="openEdit"
:disabled="!reviewerId"
>
{{ $t('common:button:add') }}
</el-button>
</div>
<el-table
:data="DATA"
v-loading="loading"
style="width: 100%"
:header-cell-style="{ background: '#eee', color: '#606266' }"
>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:time')"
>
<template slot-scope="scope">
<span>{{ scope.row.BeginDateStr }} ~ {{ scope.row.EndDateStr }}</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:specialy')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.Major : scope.row.MajorCN }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:degree')"
>
<template slot-scope="scope">
<span>
{{ $fd('Degree', Number(scope.row.Degree)) }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:school')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.Organization : scope.row.OrganizationCN }}
</span>
</template>
</el-table-column>
<el-table-column
prop="date"
:label="$t('curriculumVitae:EducationalExperience:table:city')"
>
<template slot-scope="scope">
<span>
{{ isEN ? scope.row.City : scope.row.CityCN }}
</span>
</template>
</el-table-column>
<el-table-column prop="date" :label="$t('common:action:action')">
<template slot-scope="scope">
<el-button
type="text"
class="editBtn"
@click.stop="openEdit(scope.row)"
>
{{ $t('common:button:edit') }}
</el-button>
<el-button
type="text"
class="editBtn"
@click.stop="handleDel(scope.row)"
>
{{ $t('common:button:delete') }}
</el-button>
</template>
</el-table-column>
</el-table>
<base-model :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="EducationalExperienceFrom"
v-loading="loading"
:model="form"
:rules="rules"
label-width="80px"
size="small"
>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:time')"
prop="BeginDate"
>
<el-date-picker
clearable
v-model="daterange"
type="monthrange"
value-format="yyyy-MM-dd"
format="yyyy-MM"
:range-separator="$t('curriculumVitae:daterange:rangeSeparator')"
:start-placeholder="$t('curriculumVitae:daterange:startTime')"
:end-placeholder="$t('curriculumVitae:daterange:endTime')"
@change="changeTimeList"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:specialy')"
prop="Major"
v-if="isEN"
>
<el-input
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:specialyEN'
)
"
v-model="form.Major"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:specialy')"
prop="MajorCN"
v-else
>
<el-input
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:specialy')
"
v-model="form.MajorCN"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:degree')"
prop="Degree"
>
<el-select v-model="form.Degree" placeholder="">
<el-option
v-for="item in $d.Degree"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:school')"
prop="Organization"
v-if="isEN"
>
<el-input
v-model="form.Organization"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:schoolEN')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:school')"
prop="OrganizationCN"
v-else
>
<el-input
v-model="form.OrganizationCN"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:school')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:city')"
prop="City"
v-if="isEN"
>
<el-input
v-model="form.City"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:City')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:city')"
prop="CityCN"
v-else
>
<el-input
v-model="form.CityCN"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:CityCN')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:EducationalExperience:form:Country')"
prop="Country"
v-if="isEN"
>
<el-input
v-model="form.Country"
clearable
:placeholder="
$t('curriculumVitae:EducationalExperience:placeholder:Country')
"
:maxlength="400"
></el-input>
</el-form-item>
<el-form-item
prop="CountryCN"
:label="$t('curriculumVitae:EducationalExperience:form:Country')"
v-else
>
<el-input
v-model="form.CountryCN"
clearable
:placeholder="
$t(
'curriculumVitae:EducationalExperience:placeholder:CountryCN'
)
"
:maxlength="400"
></el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { addOrUpdateEducationInfo, deleteEducationInfo } from '@/api/reviewers'
const defaultForm = () => {
return {
BeginDate: '',
EndDate: '',
Degree: '',
Major: '',
MajorCN: '',
Organization: '',
OrganizationCN: '',
City: '',
CityCN: '',
Country: '',
CountryCN: '',
}
}
export default {
name: 'EducationalExperience',
components: { BaseModel },
props: {
DATA: {
type: Array,
required: true,
default: () => {
return []
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
model_cfg: {
visible: false,
showClose: true,
width: '600px',
title: this.$t('curriculumVitae:EducationalExperience:form:title'),
appendToBody: true,
},
form: defaultForm(),
rules: {
BeginDate: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
EndDate: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
Degree: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
],
Major: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
MajorCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Organization: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
OrganizationCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
City: [
{ required: true, message:this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
CityCN: [
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Country: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
CountryCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
},
loading: false,
daterange: [],
}
},
methods: {
openEdit(row) {
this.form = defaultForm()
this.daterange = []
if (row) {
Object.keys(this.form).forEach((key) => {
if (row[key]) {
this.form[key] = row[key]
}
})
if (this.form.BeginDate && this.form.EndDate) {
this.daterange = [this.form.BeginDate, this.form.EndDate]
}
if (this.form.Degree) {
this.form.Degree = Number(this.form.Degree)
}
this.form.Id = row.Id
}
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.daterange = []
this.model_cfg.visible = false
},
async handleSave() {
try {
let validate = await this.$refs.EducationalExperienceFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.DoctorId = this.reviewerId
}
this.loading = true
let res = await addOrUpdateEducationInfo(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
async handleDel(row) {
try {
let confirm = await this.$confirm(
this.$t('trials:trials-list:table:isDeleted')
)
if (!confirm) return false
this.loading = true
let res = await deleteEducationInfo(row.Id)
this.loading = false
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
this.$emit('getInfo')
}
} catch (err) {
this.loading = false
console.log(err)
}
},
changeTimeList() {
if (this.daterange && this.daterange.length === 2) {
this.form.BeginDate = this.daterange[0]
this.form.EndDate = this.daterange[1]
} else {
this.form.BeginDate = null
this.form.EndDate = null
}
},
},
}
</script>
<style lang="scss" scoped>
.EducationalExperience {
min-height: 100px;
.title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
font-weight: bold;
}
}
.el-select,
.el-date-editor {
width: 100%;
}
</style>

View File

@ -1,201 +0,0 @@
<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 {
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() {
this.$emit('update:visible', false)
},
handleAddHoliday() {
if (this.daterange && this.daterange.length > 0) {
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

@ -1,859 +0,0 @@
<template>
<div class="info">
<el-button type="text" class="editBtn" @click.stop="openEdit">
{{ $t('common:button:edit') }}
</el-button>
<template v-if="DATA.FirstName && DATA.LastName">
<div class="userInfo">
<span>{{
isEN ? DATA.LastName + ' / ' + DATA.FirstName : DATA.ChineseName
}}</span>
<span>{{ $fd('Sex', DATA.Sex) }}</span>
<span v-if="isEN">
{{
Array.isArray(DATA.TitleList) && DATA.TitleList.length > 0
? DATA.TitleList.join(', ')
: ''
}}
</span>
<span v-else>
{{
Array.isArray(DATA.TitleCNList) && DATA.TitleCNList.length > 0
? DATA.TitleCNList.join(', ')
: ''
}}
</span>
<span v-if="isEN">{{ DATA.HospitalName }}</span>
<span v-else>{{ DATA.HospitalNameCN }}</span>
</div>
<div class="userTitle">
<span
class="el-icon-first-aid-kit"
v-if="DATA.Department || DATA.DepartmentCN"
>
<span v-if="isEN">{{ DATA.Department }}</span>
<span v-else>{{ DATA.DepartmentCN }}</span>
</span>
<span class="el-icon-first-aid-kit" v-else>
<span v-if="isEN">{{ DATA.DepartmentOther }}</span>
<span v-else>{{ DATA.DepartmentOtherCN }}</span>
</span>
<span class="el-icon-user" v-if="DATA.Rank || DATA.RankCN">
<span v-if="isEN">{{ DATA.Rank }}</span>
<span v-else>{{ DATA.RankCN }}</span>
</span>
</div>
<div class="userTel">
<span class="el-icon-phone-outline">
{{ DATA.Phone }}
</span>
<span class="el-icon-message">{{ DATA.EMail }}</span>
<span class="el-icon-chat-dot-round" v-if="DATA.WeChat">{{
DATA.WeChat
}}</span>
</div>
<div style="display: flex; font-size: 14px">
<span style="display: inline-block; width: 70px; color: #606266">{{
$t('curriculumVitae:info:meessage:partTimeJob')
}}</span>
<span
class="break-word"
style="
white-space: pre-wrap;
width: calc(100% - 80px);
word-wrap: break-word;
"
v-html="isEN ? DATA.WorkPartTimeEn : DATA.WorkPartTime"
></span>
</div>
</template>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<base-model :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="infoFrom"
v-loading="loading"
:model="form"
:rules="rules"
label-width="100px"
size="small"
>
<div class="form_title">
{{ $t('curriculumVitae:info:form:infoTitle') }}
</div>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:surname')"
prop="FirstName"
>
<el-input
v-model="form.FirstName"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:name')"
prop="LastName"
>
<el-input
v-model="form.LastName"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12" v-if="!isEN">
<el-form-item
:label="$t('curriculumVitae:info:form:userNameCN')"
prop="ChineseName"
>
<el-input
v-model="form.ChineseName"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:sex')"
prop="Sex"
>
<el-select v-model="form.Sex" clearable placeholder="">
<el-option
v-for="item in $d.Sex"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:education')"
prop="TitleIds"
>
<el-select v-model="form.TitleIds[0]" clearable placeholder="">
<el-option
v-for="item of dictionaryList.Title"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:phone')"
prop="Phone"
>
<el-input
v-model="form.Phone"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:email')"
prop="EMail"
>
<el-input v-model="form.EMail" clearable disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:wechat')"
prop="WeChat"
>
<el-input
v-model="form.WeChat"
clearable
:maxlength="400"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
:label="$t('curriculumVitae:info:form:country')"
prop="Nation"
>
<el-select v-model="form.Nation" size="small" class="mr">
<el-option
v-for="item of $d.AttendedReviewerType"
:value="item.value"
:label="item.label"
:key="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<div class="form_title">
{{ $t('curriculumVitae:info:form:workTitle') }}
</div>
<el-form-item
:label="$t('curriculumVitae:info:form:hospital')"
prop="HospitalName"
v-if="isEN"
>
<el-autocomplete
clearable
class="inline-input"
style="width: 100%"
v-model="form.HospitalName"
:fetch-suggestions="querySearch"
@select="handleSelect"
placeholder=""
@change="handleChange"
></el-autocomplete>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:hospital')"
prop="HospitalNameCN"
v-else
>
<el-autocomplete
clearable
class="inline-input"
style="width: 100%"
v-model="form.HospitalNameCN"
:fetch-suggestions="querySearch"
@select="handleSelect"
placeholder=""
@change="handleChange"
></el-autocomplete>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:AffiliatedUniversity')"
prop="UniversityAffiliated"
v-if="isEN"
>
<el-input
v-model="form.UniversityAffiliated"
type="textarea"
autosize
size="small"
:maxlength="4000"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:AffiliatedUniversity')"
prop="UniversityAffiliated"
v-else
>
<el-input
v-model="form.UniversityAffiliatedCN"
type="textarea"
autosize
size="small"
:maxlength="4000"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:City')"
v-if="isEN"
>
<el-input v-model="form.City" size="small" />
</el-form-item>
<el-form-item :label="$t('curriculumVitae:info:form:City')" v-else>
<el-input v-model="form.CityCN" size="small" />
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:department')"
prop="DepartmentId"
>
<el-select v-model="form.DepartmentId" clearable placeholder="">
<el-option
v-for="item of dictionaryList.Department"
:key="item.Id"
:label="item.Value"
:value="item.Id"
/>
<el-option
:label="$t('curriculumVitae:selectLabel:Other')"
:value="otherId"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="form.DepartmentId === otherId && isEN"
class="other-item"
prop="DepartmentOther"
>
<el-input
v-model="form.DepartmentOther"
:placeholder="
$t('curriculumVitae:info:form:placeholder:DepartmentOther')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item
v-if="form.DepartmentId === otherId && !isEN"
class="other-item"
prop="DepartmentOtherCN"
>
<el-input
v-model="form.DepartmentOtherCN"
:placeholder="
$t('curriculumVitae:info:form:placeholder:DepartmentOtherCN')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:physician')"
prop="RankId"
>
<el-select v-model="form.RankId" clearable placeholder="">
<el-option
v-for="item in $d.Rank"
:key="item.id"
:label="item.label"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="
$fd('Rank', form.RankId, 'id') ===
$t('curriculumVitae:selectLabel:Other') && isEN
"
class="other-item"
prop="RankOther"
>
<el-input
v-model="form.RankOther"
:placeholder="
$t('curriculumVitae:info:form:placeholder:RankOther')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item
v-if="
$fd('Rank', form.RankId, 'id') ===
$t('curriculumVitae:selectLabel:Other') && !isEN
"
class="other-item"
prop="RankOtherCN"
>
<el-input
v-model="form.RankOtherCN"
:placeholder="
$t('curriculumVitae:info:form:placeholder:RankOtherCN')
"
size="small"
:maxlength="400"
/>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:partTimeJob')"
prop="WorkPartTime"
v-if="!isEN"
>
<el-input
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJob')
"
v-model="form.WorkPartTime"
type="textarea"
:rows="10"
clearable
:maxlength="4000"
></el-input>
</el-form-item>
<el-form-item
:label="$t('curriculumVitae:info:form:partTimeJob')"
prop="WorkPartTimeEn"
v-else
>
<el-input
:placeholder="
$t('curriculumVitae:info:form:placeholder:partTimeJobEN')
"
v-model="form.WorkPartTimeEn"
type="textarea"
:rows="10"
:maxlength="4000"
clearable
></el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
@click="handleSave"
:loading="loading"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
import { addOrUpdateDoctorBasicInfoAndEmployment } from '@/api/reviewers'
import store from '@/store'
import { mapGetters } from 'vuex'
const defaultForm = () => {
return {
FirstName: '',
LastName: '',
ChineseName: '',
Sex: '',
TitleIds: [],
Phone: '',
EMail: '',
WeChat: '',
Nation: 0,
DepartmentId: '',
DepartmentOther: '',
DepartmentOtherCN: '',
RankId: '',
RankOther: '',
RankOtherCN: '',
HospitalId: '',
HospitalName: null,
HospitalNameCN: null,
WorkPartTime: null,
WorkPartTimeEn: null,
UniversityAffiliated: null,
UniversityAffiliatedCN: null,
City: null,
CityCN: null,
}
}
export default {
name: 'info',
components: { BaseModel },
props: {
DATA: {
type: Object,
required: true,
default: () => {
return {}
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
model_cfg: {
visible: false,
showClose: true,
width: '800px',
title: this.$t('curriculumVitae:info:form:title'),
appendToBody: true,
top: '8vh',
bodyStyle: `min-height: 100px; max-height: 650px;overflow-y: auto;padding: 10px;border: 1px solid #e0e0e0;`,
},
form: defaultForm(),
rules: {
FirstName: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
LastName: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
ChineseName: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Sex: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
TitleIds: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
Phone: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{ max: 20, min: 7, message: 'The length is 7 to 20' },
],
EMail: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
type: 'email',
message: this.$t('rules:email'),
trigger: 'blur,change',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
WeChat: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
Nation: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
DepartmentId: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
DepartmentOther: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
,
],
DepartmentOtherCN: [
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
RankId: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: 'blur',
},
],
RankOther: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
RankOtherCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: 'blur',
},
{
max: 400,
message: this.$t('form:rules:maxLength:400'),
trigger: 'blur',
},
],
HospitalName: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
HospitalNameCN: [
{
required: true,
message: this.$t('common:ruleMessage:specify'),
trigger: ['blur', 'change'],
},
],
UniversityAffiliated: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
WorkPartTime: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
WorkPartTimeEn: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
},
loading: false,
dictionaryList: {},
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
hospitalSelectList: [],
}
},
computed: {
...mapGetters(['hospitalList']),
},
watch: {
hospitalList: {
handler() {
if (!Array.isArray(this.hospitalList) || this.hospitalList.length <= 0)
return false
this.hospitalSelectList = []
this.hospitalList.forEach((item) => {
if (this.isEN) {
this.hospitalSelectList.push({
value: item.HospitalName,
...item,
})
} else {
this.hospitalSelectList.push({
value: item.HospitalNameCN,
...item,
})
}
})
},
deep: true,
},
},
mounted() {
this.getDicData()
store.dispatch('global/getHospital')
},
methods: {
handleChange(v) {
if (v) return
this.form.UniversityAffiliated = null
this.form.City = null
this.form.UniversityAffiliatedCN = null
this.form.CityCN = null
},
querySearch(queryString, cb) {
var hospitalList = this.hospitalSelectList
var results = queryString
? hospitalList.filter(this.createFilter(queryString))
: hospitalList
// callback
cb(results)
},
createFilter(queryString) {
return (hospitalList) => {
if (this.isEN) {
return (
hospitalList.HospitalName.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
} else {
return (
hospitalList.HospitalNameCN.toLowerCase().indexOf(
queryString.toLowerCase()
) >= 0
)
}
}
},
openEdit() {
this.form = defaultForm()
Object.keys(this.form).forEach((key) => {
if (this.DATA[key] || this.DATA[key] == 0) {
this.form[key] = this.DATA[key]
}
})
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.model_cfg.visible = false
},
async handleSave() {
try {
let validate = await this.$refs.infoFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.Id = this.reviewerId
}
// console.log(this.form)
let data = Object.assign({}, this.form)
// if (!this.hospitalList.find((item) => item.Id === data.HospitalId)) {
// data.HospitalName = data.HospitalId
// data.HospitalId = null
// }
this.loading = true
let res = await addOrUpdateDoctorBasicInfoAndEmployment(data)
this.loading = false
if (res.IsSuccess) {
this.$emit('update:reviewerId', res.Result.Id)
sessionStorage.setItem('reviewerId', res.Result.Id)
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
getDicData() {
getBasicDataSelects(['Title', 'Department', 'Rank', 'Position'])
.then((res) => {
this.dictionaryList = { ...res.Result }
})
.catch(() => {})
},
handleSelect(value) {
const item = value
if (item) {
this.form.UniversityAffiliated = item.UniversityAffiliated
this.form.City = item.City
this.form.UniversityAffiliatedCN = item.UniversityAffiliatedCN
this.form.CityCN = item.CityCN
} else {
this.form.UniversityAffiliated = null
this.form.City = null
this.form.UniversityAffiliatedCN = null
this.form.CityCN = null
}
},
},
}
</script>
<style lang="scss" scoped>
.info {
position: relative;
min-height: 100px;
.editBtn {
position: absolute;
right: 0;
top: 0px;
}
.userInfo,
.userTitle,
.userTel {
line-height: 30px;
margin-bottom: 15px;
span {
margin-right: 20px;
&:last-child {
margin: 0;
}
}
&:last-child {
margin-bottom: 0;
}
}
.userTitle,
.userTel {
span {
display: inline-block;
min-width: 80px;
border-right: 1px solid #ddd;
padding-right: 10px;
&::before {
margin-right: 5px;
}
&:last-child {
border: none;
}
}
}
}
.el-select {
width: 100%;
}
::v-deep .el-dialog__body {
padding-top: 0 !important;
}
.form_title {
margin: 10px 0;
display: flex;
align-items: center;
&::after {
margin-left: 20px;
display: block;
content: '';
border-top: 1px solid #eee;
flex: 1;
}
}
.noData {
line-height: 100px;
}
</style>

View File

@ -1,198 +0,0 @@
<template>
<div class="other">
<div class="title">
<span>{{ $t('curriculumVitae:other:AH') }}</span>
<el-button
type="text"
class="editBtn"
:disabled="!reviewerId"
@click.stop="openEdit"
>
{{ $t('common:button:edit') }}
</el-button>
</div>
<div class="message" v-if="DATA.AwardsHonors || DATA.AwardsHonorsCN">
<span
style="white-space: pre-wrap"
v-html="isEN ? DATA.AwardsHonors : DATA.AwardsHonorsCN"
></span>
</div>
<div class="noData" v-else>{{ $t('curriculumVitae:noData') }}</div>
<base-model :config="model_cfg">
<template slot="dialog-body">
<el-form
ref="otherFrom"
v-loading="loading"
:model="form"
:rules="rules"
label-width="100px"
size="small"
>
<el-form-item
:label="$t('curriculumVitae:other:form:AH')"
prop="AwardsHonors"
v-if="isEN"
>
<el-input
clearable
v-model="form.AwardsHonors"
style="margin-bottom: 10px"
type="textarea"
:rows="10"
:maxlength="4000"
:placeholder="$t('curriculumVitae:other:placeholder:AHEN')"
></el-input>
</el-form-item>
<el-form-item
prop="AwardsHonorsCN"
:label="$t('curriculumVitae:other:form:AH')"
v-else
>
<el-input
clearable
v-model="form.AwardsHonorsCN"
style="margin-bottom: 10px"
type="textarea"
:rows="10"
:maxlength="4000"
:placeholder="$t('curriculumVitae:other:placeholder:AH')"
></el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button size="small" type="primary" @click="handleCancle">
{{ $t('common:button:cancel') }}
</el-button>
<el-button
size="small"
type="primary"
:loading="loading"
@click="handleSave"
>
{{ $t('common:button:save') }}
</el-button>
</template>
</base-model>
</div>
</template>
<script>
import BaseModel from '@/components/BaseModel'
import { addOrUpdateResearchPublicationInfo } from '@/api/reviewers'
const defaultForm = () => {
return {
Id: null,
AwardsHonors: '',
AwardsHonorsCN: '',
}
}
export default {
name: 'other',
components: { BaseModel },
props: {
DATA: {
type: Object,
required: true,
default: () => {
return {}
},
},
reviewerId: {
type: String,
default: '',
},
isEN: {
type: Boolean,
default: false,
},
},
data() {
return {
model_cfg: {
visible: false,
showClose: true,
width: '800px',
title: this.$t('curriculumVitae:scientificResearchProject:form:title'),
appendToBody: true,
},
form: defaultForm(),
rules: {
AwardsHonors: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
AwardsHonorsCN: [
{
max: 4000,
message: this.$t('form:rules:maxLength:4000'),
trigger: 'blur',
},
],
},
loading: false,
}
},
methods: {
openEdit() {
this.form = defaultForm()
Object.keys(this.form).forEach((key) => {
if (this.DATA[key]) {
this.form[key] = this.DATA[key]
}
})
this.model_cfg.visible = true
},
handleCancle() {
this.form = defaultForm()
this.model_cfg.visible = false
},
async handleSave() {
try {
let validate = await this.$refs.otherFrom.validate()
if (!validate) return false
if (this.reviewerId) {
this.form.DoctorId = this.reviewerId
}
this.loading = true
let res = await addOrUpdateResearchPublicationInfo(this.form)
this.loading = false
if (res.IsSuccess) {
this.$emit('getInfo')
this.model_cfg.visible = false
}
} catch (err) {
this.loading = false
console.log(err)
}
},
},
}
</script>
<style lang="scss" scoped>
.other {
min-height: 100px;
.title {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
font-weight: bold;
}
.message {
margin: auto;
min-height: 100px;
background-color: #eee;
padding: 10px;
line-height: 30px;
border-radius: 5px;
word-wrap: break-word;
}
}
.el-select,
.el-date-editor {
width: 97%;
}
</style>

Some files were not shown because too many files have changed in this diff Show More