Compare commits

..

No commits in common. "b4fe2a1c06569bebb87db4907790c2013dc19b39" and "74893a51c7a50a90b1f33cdeda91f864cc341f25" have entirely different histories.

3 changed files with 181 additions and 279 deletions

View File

@ -5,7 +5,7 @@
<el-form :inline="true"> <el-form :inline="true">
<!-- 中心编号 --> <!-- 中心编号 -->
<el-form-item :label="$t('trials:reviewAssign:readingTask:table:siteCode')"> <el-form-item :label="$t('trials:reviewAssign:readingTask:table:siteCode')">
<el-select v-model="searchData.TrialSiteId" clearable filterable style="width:120px;"> <el-select v-model="searchData.SiteId" clearable filterable style="width:120px;">
<el-option <el-option
v-for="(item,index) of siteOptions" v-for="(item,index) of siteOptions"
:key="index" :key="index"
@ -526,7 +526,7 @@ const searchDataDefault = () => {
Asc: true, Asc: true,
SortField: '', SortField: '',
TrialId: null, TrialId: null,
TrialSiteId: null, SiteId: null,
SubjectId: null, SubjectId: null,
SubjectCode: null, SubjectCode: null,
IsUrgent: null, IsUrgent: null,
@ -598,7 +598,7 @@ export default {
}, },
mounted() { mounted() {
if (this.$route.query.SiteId) { if (this.$route.query.SiteId) {
this.searchData.TrialSiteId = this.$route.query.SiteId this.searchData.SiteId = this.$route.query.SiteId
this.searchData.SubjectCode = this.$route.query.SubjectCode this.searchData.SubjectCode = this.$route.query.SubjectCode
this.searchData.TaskName = this.$route.query.TaskName this.searchData.TaskName = this.$route.query.TaskName
this.searchData.DoctorUserId = this.$route.query.DoctorUserId this.searchData.DoctorUserId = this.$route.query.DoctorUserId

View File

@ -156,6 +156,10 @@
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<!-- 申请原因 --> <!-- 申请原因 -->
<!-- <el-form-item style="margin-bottom:10px" :label="$t('trials:rereadTrack:table:applyReason')"> <!-- <el-form-item style="margin-bottom:10px" :label="$t('trials:rereadTrack:table:applyReason')">
<el-input <el-input
@ -626,6 +630,7 @@
@pagination="getList" @pagination="getList"
/> />
<el-dialog <el-dialog
v-if="ConfirmReReadingVisible"
:title="$t('trials:rereadTrack:reject:title:reject')" :title="$t('trials:rereadTrack:reject:title:reject')"
:visible.sync="ConfirmReReadingVisible" :visible.sync="ConfirmReReadingVisible"
width="600px" width="600px"
@ -640,7 +645,6 @@
max-height: 650px; max-height: 650px;
overflow-y: auto; overflow-y: auto;
" "
v-if="ConfirmReReadingVisible"
> >
<el-form <el-form
ref="reasonForm" ref="reasonForm"
@ -666,7 +670,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer" v-if="ConfirmReReadingVisible"> <div slot="footer" class="dialog-footer">
<!-- 取消 --> <!-- 取消 -->
<el-button <el-button
:disabled="btnLoading" :disabled="btnLoading"
@ -1205,17 +1209,18 @@ export default {
this.loading = false this.loading = false
this.btnLoading = false this.btnLoading = false
// / // /
let message = this.$message.success(
`${
type === 1 type === 1
? this.$t('trials:rereadTrack:message:msg3') ? this.$t('trials:rereadTrack:message:msg3')
: this.$t('trials:rereadTrack:message:msg4') : this.$t('trials:rereadTrack:message:msg4')
this.$message.success(message) }`
// this.$refs['signForm'].btnLoading = false )
this.$refs['signForm'].btnLoading = false
this.signVisible = false this.signVisible = false
this.getList() this.getList()
this.ConfirmReReadingVisible = false this.ConfirmReReadingVisible = false
} catch (e) { } catch (e) {
console.log(e)
this.loading = false this.loading = false
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
this.btnLoading = false this.btnLoading = false
@ -1252,11 +1257,13 @@ export default {
this.getList() this.getList()
} else { } else {
// / // /
let message = this.$message.success(
`${
type === 1 type === 1
? this.$t('trials:rereadTrack:message:msg3') ? this.$t('trials:rereadTrack:message:msg3')
: this.$t('trials:rereadTrack:message:msg4') : this.$t('trials:rereadTrack:message:msg4')
this.$message.success(message) }`
)
this.ReReadingOrBackVisible = false this.ReReadingOrBackVisible = false
this.signVisible = false this.signVisible = false
this.getList() this.getList()

View File

@ -4,42 +4,20 @@
<el-tab-pane v-for="(item,index) in list" :key="item.Id"> <el-tab-pane v-for="(item,index) in list" :key="item.Id">
<span slot="label"> <span slot="label">
{{ item.ChallengeCode }} {{ item.ChallengeCode }}
<i <i v-show="!item.IsClosed" class="el-icon-message-solid" style="color:red" />
v-show="!item.IsClosed"
class="el-icon-message-solid"
style="color: red"
/>
</span> </span>
<div class="chat-wrapper"> <div class="chat-wrapper">
<div class="chat-content"> <div class="chat-content">
<div v-for="record in item.DialogList" :key="record.Id"> <div v-for="record in item.DialogList" :key="record.Id">
<div v-if="!record.IsCurrentUser" class="word"> <div v-if="!record.IsCurrentUser" class="word">
<!-- <img :src="record.headUrl"> --> <!-- <img :src="record.headUrl"> -->
<img <img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
v-if="record.UserTypeEnum * 1 === 8" <img v-else-if="record.UserTypeEnum*1 === 1" :src="pmAvatar" alt="PM">
:src="adminAvatar" <img v-else-if="record.UserTypeEnum*1 === 2" :src="crcAvatar" alt="CRC">
alt="Admin" <img v-else-if="record.UserTypeEnum*1 === 3" :src="qcAvatar" alt="QC">
/>
<img
v-else-if="record.UserTypeEnum * 1 === 1"
:src="pmAvatar"
alt="PM"
/>
<img
v-else-if="record.UserTypeEnum * 1 === 2"
:src="crcAvatar"
alt="CRC"
/>
<img
v-else-if="record.UserTypeEnum * 1 === 3"
:src="qcAvatar"
alt="QC"
/>
<div class="info"> <div class="info">
<p class="user-info"> <p class="user-info">
<span style="font-weight: 700" <span style="font-weight:700;">{{ record.CreateUserFullName || record.CreateUserName }} </span>
>{{ record.CreateUserFullName || record.CreateUserName }}
</span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="record.TalkContent" />
@ -49,51 +27,32 @@
<div v-else class="word-my"> <div v-else class="word-my">
<div class="info"> <div class="info">
<p class="user-info"> <p class="user-info">
<span style="font-weight: 700" <span style="font-weight:700;">{{ record.CreateUserFullName || record.CreateUserName }} </span>
>{{ record.CreateUserFullName || record.CreateUserName }}
</span>
<span>({{ record.CreateTime }}) </span> <span>({{ record.CreateTime }}) </span>
</p> </p>
<div class="info-content" v-html="record.TalkContent" /> <div class="info-content" v-html="record.TalkContent" />
</div> </div>
<!-- <img :src="record.headUrl"> --> <!-- <img :src="record.headUrl"> -->
<img <img v-if="record.UserTypeEnum*1 === 8" :src="adminAvatar" alt="Admin">
v-if="record.UserTypeEnum * 1 === 8" <img v-else-if="record.UserTypeEnum*1 === 1" :src="pmAvatar" alt="PM">
:src="adminAvatar" <img v-else-if="record.UserTypeEnum*1 === 2" :src="crcAvatar" alt="CRC">
alt="Admin" <img v-else-if="record.UserTypeEnum*1 === 3" :src="qcAvatar" alt="QC">
/>
<img
v-else-if="record.UserTypeEnum * 1 === 1"
:src="pmAvatar"
alt="PM"
/>
<img
v-else-if="record.UserTypeEnum * 1 === 2"
:src="crcAvatar"
alt="CRC"
/>
<img
v-else-if="record.UserTypeEnum * 1 === 3"
:src="qcAvatar"
alt="QC"
/>
</div> </div>
</div> </div>
</div> </div>
<div v-if="!item.IsClosed" class="chat-message"> <div v-if="!item.IsClosed" class="chat-message">
<div <div class="message" v-if="hasPermi(['trials:trials-panel:visit:crc-upload:send'])" >
class="message" <el-input
v-if="hasPermi(['trials:trials-panel:visit:crc-upload:send'])" v-model="newMessage"
> type="textarea"
<el-input v-model="newMessage" type="textarea" :rows="2" /> :rows="2"
/>
</div> </div>
<div class="function"> <div class="function">
<!-- 申请重传 --> <!-- 申请重传 -->
<el-button <el-button
v-show="item.ReuploadEnum === 0 || item.ReuploadEnum === 3" v-show="(item.ReuploadEnum === 0 || item.ReuploadEnum === 3) "
v-hasPermi="[ v-hasPermi="['trials:trials-panel:visit:crc-upload:apply-reupload']"
'trials:trials-panel:visit:crc-upload:apply-reupload',
]"
type="primary" type="primary"
:loading="applyBtnLoading" :loading="applyBtnLoading"
@click="handleCRCApplyReupload(item)" @click="handleCRCApplyReupload(item)"
@ -113,9 +72,7 @@
<!-- 确认重传完成 --> <!-- 确认重传完成 -->
<el-button <el-button
v-show="item.ReuploadEnum === 2" v-show="item.ReuploadEnum === 2"
v-hasPermi="[ v-hasPermi="['trials:trials-panel:visit:crc-upload:set-reupload-finished']"
'trials:trials-panel:visit:crc-upload:set-reupload-finished',
]"
type="primary" type="primary"
:disabled="item.IsReuploaded" :disabled="item.IsReuploaded"
:loading="reuploadedFinishbtnLoading" :loading="reuploadedFinishbtnLoading"
@ -148,39 +105,22 @@
> >
<span slot="title"> <span slot="title">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<label style="float: left; margin-right: 10px">Upload: </label> <label style="float: left;margin-right:10px;">Upload: </label>
<el-breadcrumb-item v-show="trialCode">{{ <el-breadcrumb-item v-show="trialCode">{{ trialCode }}</el-breadcrumb-item>
trialCode <el-breadcrumb-item v-show="data.TrialSiteCode">{{ data.TrialSiteCode }}</el-breadcrumb-item>
}}</el-breadcrumb-item> <el-breadcrumb-item v-show="data.SubjectCode">{{ data.SubjectCode }}</el-breadcrumb-item>
<el-breadcrumb-item v-show="data.TrialSiteCode">{{ <el-breadcrumb-item v-show="data.VisitName">{{ `${data.VisitName} (${data.VisitNum})` }}</el-breadcrumb-item>
data.TrialSiteCode
}}</el-breadcrumb-item>
<el-breadcrumb-item v-show="data.SubjectCode">{{
data.SubjectCode
}}</el-breadcrumb-item>
<el-breadcrumb-item v-show="data.VisitName">{{
`${data.VisitName} (${data.VisitNum})`
}}</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</span> </span>
<div <div class="base-modal-body" style="display: flex;flex-direction: column;">
class="base-modal-body" <el-tabs v-model="activeName" type="border-card" style="flex:1;">
style="display: flex; flex-direction: column"
>
<el-tabs v-model="activeName" type="border-card" style="flex: 1">
<!-- DICOM影像上传 --> <!-- DICOM影像上传 -->
<el-tab-pane <el-tab-pane
:label="$t('trials:uploadedDicoms:tab:uploadDicoms')" :label="$t('trials:uploadedDicoms:tab:uploadDicoms')"
name="dicom" name="dicom"
v-if="[0, 1].includes($store.state.trials.config.CollectImagesEnum)" v-if="[0, 1].includes($store.state.trials.config.CollectImagesEnum)"
> >
<upload-dicom-files <upload-dicom-files :data="data" :subject-id="data.SubjectId" :subject-visit-id="data.Id" @close="closeUpload" @getList="reFreshList" />
:data="data"
:subject-id="data.SubjectId"
:subject-visit-id="data.Id"
@close="closeUpload"
@getList="reFreshList"
/>
</el-tab-pane> </el-tab-pane>
<!-- 非DICOM影像上传 --> <!-- 非DICOM影像上传 -->
<el-tab-pane <el-tab-pane
@ -188,48 +128,22 @@
name="non-dicom" name="non-dicom"
v-if="[0, 2].includes($store.state.trials.config.CollectImagesEnum)" v-if="[0, 2].includes($store.state.trials.config.CollectImagesEnum)"
> >
<upload-non-dicom-files <upload-non-dicom-files v-if="activeName==='non-dicom'" :data="data" :allow-add-or-edit="true" :body-parts="bodyParts" :modalities="modalities" :subject-visit-id="data.Id" @getList="reFreshList" />
v-if="activeName === 'non-dicom'"
:data="data"
:allow-add-or-edit="true"
:body-parts="bodyParts"
:modalities="modalities"
:subject-visit-id="data.Id"
@getList="reFreshList"
/>
</el-tab-pane> </el-tab-pane>
<!-- 临床数据采集data.IsBaseLine && --> <!-- 临床数据采集data.IsBaseLine && -->
<el-tab-pane <el-tab-pane
v-if=" v-if="data.IsBaseLine && (otherInfo.IsHaveSubjectClinicalData||otherInfo.IsHaveVisitClinicalData)"
data.IsBaseLine &&
(otherInfo.IsHaveSubjectClinicalData ||
otherInfo.IsHaveVisitClinicalData)
"
:label="$t('trials:uploadClinicalData:tab:uploadClinicalData')" :label="$t('trials:uploadClinicalData:tab:uploadClinicalData')"
name="clinical-data" name="clinical-data"
> >
<upload-clinical-data <upload-clinical-data v-if="activeName==='clinical-data'" :subject-visit-id="data.Id" :data="data" :enum-type="otherInfo.ClinicalInformationTransmissionEnum" :allow-add-or-edit="true" @getList="reFreshList" />
v-if="activeName === 'clinical-data'"
:subject-visit-id="data.Id"
:data="data"
:enum-type="otherInfo.ClinicalInformationTransmissionEnum"
:allow-add-or-edit="true"
@getList="reFreshList"
/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane
v-if="!data.IsBaseLine && otherInfo.IsHaveVisitClinicalData" v-if="!data.IsBaseLine && otherInfo.IsHaveVisitClinicalData"
:label="$t('trials:uploadClinicalData:tab:uploadClinicalData')" :label="$t('trials:uploadClinicalData:tab:uploadClinicalData')"
name="clinical-data" name="clinical-data"
> >
<upload-clinical-data <upload-clinical-data v-if="activeName==='clinical-data'" :subject-visit-id="data.Id" :data="data" :enum-type="otherInfo.ClinicalInformationTransmissionEnum" :allow-add-or-edit="true" @getList="reFreshList" />
v-if="activeName === 'clinical-data'"
:subject-visit-id="data.Id"
:data="data"
:enum-type="otherInfo.ClinicalInformationTransmissionEnum"
:allow-add-or-edit="true"
@getList="reFreshList"
/>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -245,18 +159,10 @@
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<div slot="title"> <div slot="title">
<span style="font-size: 18px">{{ $t('common:dialogTitle:sign') }}</span> <span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size: 12px; margin-left: 5px">{{ <span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
`(${$t('common:label:sign')}${currentUser})`
}}</span>
</div> </div>
<SignForm <SignForm ref="signForm" :sign-code-enum="signCode" :subject-visit-id="data.Id" @closeDialog="closeClinicalDataSignDialog" />
ref="signForm"
:sign-code-enum="signCode"
:signReplaceText="signReplaceText"
:subject-visit-id="data.Id"
@closeDialog="closeClinicalDataSignDialog"
/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -266,21 +172,20 @@ import {
verifyReuploadIsCanJump, verifyReuploadIsCanJump,
addQCChallengeReply, addQCChallengeReply,
cRCRequestReUpload, cRCRequestReUpload,
getVisitClinicalDataName } from "@/api/trials";
} from '@/api/trials' import { setReuploadFinished } from "@/api/trials/visit";
import { setReuploadFinished } from '@/api/trials/visit' import adminAvatar from "@/assets/Admin.png";
import adminAvatar from '@/assets/Admin.png' import pmAvatar from "@/assets/PM.png";
import pmAvatar from '@/assets/PM.png' import crcAvatar from "@/assets/CRC.png";
import crcAvatar from '@/assets/CRC.png' import qcAvatar from "@/assets/QC.png";
import qcAvatar from '@/assets/QC.png' import UploadDicomFiles from "./uploadDicomFiles2";
import UploadDicomFiles from './uploadDicomFiles2' import UploadNonDicomFiles from "./uploadNonDicomFiles";
import UploadNonDicomFiles from './uploadNonDicomFiles' import UploadClinicalData from "./uploadClinicalData";
import UploadClinicalData from './uploadClinicalData' import SignForm from "@/views/trials/components/newSignForm";
import SignForm from '@/views/trials/components/newSignForm' import dicomStore from "@/utils/dicom-store";
import dicomStore from '@/utils/dicom-store' import const_ from "@/const/sign-code";
import const_ from '@/const/sign-code'
export default { export default {
name: 'HistoryChat', name: "HistoryChat",
components: { components: {
UploadDicomFiles, UploadDicomFiles,
UploadNonDicomFiles, UploadNonDicomFiles,
@ -291,22 +196,22 @@ export default {
data: { data: {
type: Object, type: Object,
default() { default() {
return {} return {};
}, },
}, },
otherInfo: { otherInfo: {
type: Object, type: Object,
default() { default() {
return {} return {};
}, },
}, },
bodyParts: { bodyParts: {
type: String, type: String,
default: '', default: "",
}, },
modalities: { modalities: {
type: String, type: String,
default: '', default: "",
}, },
clinicalEnum: { clinicalEnum: {
type: Number, type: Number,
@ -318,67 +223,66 @@ export default {
list: [], list: [],
loading: false, loading: false,
btnLoading: false, btnLoading: false,
newMessage: '', newMessage: "",
userId: zzSessionStorage.getItem('userId'), userId: zzSessionStorage.getItem("userId"),
trialCode: this.$route.query.trialCode, trialCode: this.$route.query.trialCode,
adminAvatar, adminAvatar,
pmAvatar, pmAvatar,
crcAvatar, crcAvatar,
qcAvatar, qcAvatar,
uploadVisible: false, uploadVisible: false,
activeName: 'dicom', activeName: "dicom",
currentChallengeIndex: null, currentChallengeIndex: null,
signVisible: false, signVisible: false,
signCode: '', signCode: "",
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem("userName"),
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
uploadBtnLoading: false, uploadBtnLoading: false,
applyBtnLoading: false, applyBtnLoading: false,
reuploadedFinishbtnLoading: false, reuploadedFinishbtnLoading: false,
signReplaceText: null, };
}
}, },
mounted() { mounted() {
this.initChat() this.initChat();
}, },
methods: { methods: {
clickTab(tab) { clickTab(tab) {
this.setScrollHeight(tab.index * 1) this.setScrollHeight(tab.index * 1);
}, },
// //
initChat(index) { initChat(index) {
var list = [] var list = [];
this.loading = true this.loading = true;
getCRCVisitChallengeAndDialog(this.data.Id, this.data.QCProcessEnum) getCRCVisitChallengeAndDialog(this.data.Id, this.data.QCProcessEnum)
.then((res) => { .then((res) => {
res.Result.forEach((item) => { res.Result.forEach((item) => {
var contents = [] var contents = [];
if (item.Content && item.Content.indexOf('|') !== -1) { if (item.Content && item.Content.indexOf("|") !== -1) {
contents = item.Content.split('|') contents = item.Content.split("|");
} else if (item.Content && item.Content !== '') { } else if (item.Content && item.Content !== "") {
contents.push(item.Content) contents.push(item.Content);
} }
var li = contents.map((content) => { var li = contents.map((content) => {
return `<li>${content}</li>` return `<li>${content}</li>`;
}) });
const content = ` const content = `
<div>${this.$t('trials:qcQuality:dialog:qcContent')} <div>${this.$t("trials:qcQuality:dialog:qcContent")}
<ol> <ol>
${li.join('')} ${li.join("")}
</ol> </ol>
</div> </div>
<p> <p>
${this.$t('trials:qcQuality:dialogTips:tip')} ${this.$t("trials:qcQuality:dialogTips:tip")}
</p> </p>
<p style='color:red'>${this.$t( <p style='color:red'>${this.$t(
'trials:qcQuality:dialog:deadline' "trials:qcQuality:dialog:deadline"
)}: ${ )}: ${
item.DeadlineTime item.DeadlineTime
? item.DeadlineTime ? item.DeadlineTime
: this.$t('trials:qcQuality:dialog:none') : this.$t("trials:qcQuality:dialog:none")
}</p>` }</p>`;
const userId = zzSessionStorage.getItem('userId') const userId = zzSessionStorage.getItem("userId");
var recordContent = [] var recordContent = [];
recordContent.push({ recordContent.push({
IsCurrentUser: item.CreateUserId === userId, IsCurrentUser: item.CreateUserId === userId,
TalkContent: content, TalkContent: content,
@ -387,8 +291,8 @@ export default {
CreateUserFullName: item.CreateUserFullName, CreateUserFullName: item.CreateUserFullName,
CreateUserId: item.CreateUserId, CreateUserId: item.CreateUserId,
UserTypeEnum: item.UserTypeEnum, UserTypeEnum: item.UserTypeEnum,
}) });
recordContent.push(...item.DialogList) recordContent.push(...item.DialogList);
list.push({ list.push({
Id: item.Id, Id: item.Id,
ChallengeCode: item.ChallengeCode, ChallengeCode: item.ChallengeCode,
@ -398,107 +302,98 @@ export default {
Content: item.Content, Content: item.Content,
DeadlineTime: item.DeadlineTime, DeadlineTime: item.DeadlineTime,
IsOverTime: item.IsOverTime, IsOverTime: item.IsOverTime,
}) });
this.list = Object.assign({}, list) this.list = Object.assign({}, list);
this.loading = false this.loading = false;
this.setScrollHeight(index || 0) this.setScrollHeight(index || 0);
}) });
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
}) });
}, },
setScrollHeight(index) { setScrollHeight(index) {
setTimeout(() => { setTimeout(() => {
var container = document.querySelectorAll('.chat-content')[index] var container = document.querySelectorAll(".chat-content")[index];
container.scrollTop = container.scrollHeight container.scrollTop = container.scrollHeight;
}, 100) }, 100);
}, },
// //
handleReply(qcChallengeId, index) { handleReply(qcChallengeId, index) {
if (!this.newMessage) return if (!this.newMessage) return;
this.btnLoading = true this.btnLoading = true;
var params = { var params = {
talkContent: this.newMessage, talkContent: this.newMessage,
qcChallengeId: qcChallengeId, qcChallengeId: qcChallengeId,
subjectVisitId: this.data.Id, subjectVisitId: this.data.Id,
} };
addQCChallengeReply(this.data.TrialId, params) addQCChallengeReply(this.data.TrialId, params)
.then((res) => { .then((res) => {
if (res.IsSuccess) { if (res.IsSuccess) {
// this.list[index].DialogList.push({ IsCurrentUser: true, TalkContent: this.newMessage, CreateTime: res.Result.CreateTime, CreateUserName: res.Result.CreateUserName, CreateUserId: res.Result.CreateUserId, UserTypeEnum: res.Result.UserTypeEnum }) // this.list[index].DialogList.push({ IsCurrentUser: true, TalkContent: this.newMessage, CreateTime: res.Result.CreateTime, CreateUserName: res.Result.CreateUserName, CreateUserId: res.Result.CreateUserId, UserTypeEnum: res.Result.UserTypeEnum })
this.initChat(index) this.initChat(index);
this.newMessage = '' this.newMessage = "";
} }
this.btnLoading = false this.btnLoading = false;
}) })
.catch(() => { .catch(() => {
this.btnLoading = false this.btnLoading = false;
}) });
}, },
// //
openUploadDialog(index) { openUploadDialog(index) {
const qcChallengeId = this.list[index].Id const qcChallengeId = this.list[index].Id;
if (!qcChallengeId) return if (!qcChallengeId) return;
this.uploadBtnLoading = true this.uploadBtnLoading = true;
verifyReuploadIsCanJump(this.trialId, qcChallengeId) verifyReuploadIsCanJump(this.trialId, qcChallengeId)
.then((res) => { .then((res) => {
this.uploadBtnLoading = false this.uploadBtnLoading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
dicomStore.studyList = [] dicomStore.studyList = [];
if ( if ([0, 1].includes(this.$store.state.trials.config.CollectImagesEnum)) {
[0, 1].includes(this.$store.state.trials.config.CollectImagesEnum)
) {
this.activeName = 'dicom' this.activeName = 'dicom'
} else { } else {
this.activeName = 'non-dicom' this.activeName = 'non-dicom'
} }
this.uploadVisible = true this.uploadVisible = true;
} }
}) })
.catch(() => { .catch(() => {
this.initChat(index) this.initChat(index);
this.$emit('getList') this.$emit("getList");
this.uploadBtnLoading = false this.uploadBtnLoading = false;
}) });
}, },
// //
closeUpload() { closeUpload() {
this.uploadVisible = false this.uploadVisible = false;
}, },
// //
reFreshList() { reFreshList() {
this.$emit('getList') this.$emit("getList");
}, },
// //
handleSetUploadFinished(index) { handleSetUploadFinished(index) {
if (this.clinicalEnum > 0 && this.data.IsBaseLine) { if (this.clinicalEnum > 0 && this.data.IsBaseLine) {
getVisitClinicalDataName({ id: this.data.Id }) this.currentChallengeIndex = index;
.then((res) => { const { ClinicalDataConfirmation } = const_.processSignature;
this.signReplaceText = res.Result.ClinicalDataName this.signCode = ClinicalDataConfirmation;
this.currentChallengeIndex = index this.signVisible = true;
const { ClinicalDataConfirmation } = const_.processSignature
this.signCode = ClinicalDataConfirmation
this.signVisible = true
})
.catch((err) => {
console.log(err)
})
} else { } else {
this.$confirm(this.$t('trials:crcQuestion:message:reuploadConfirm'), { this.$confirm(this.$t("trials:crcQuestion:message:reuploadConfirm"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.currentChallengeIndex = index this.currentChallengeIndex = index;
this.setReuploadFinished() this.setReuploadFinished();
}) })
.catch(() => {}) .catch(() => {});
} }
}, },
setReuploadFinished(signInfo) { setReuploadFinished(signInfo) {
this.loading = true this.loading = true;
var item = Object.assign({}, this.list[this.currentChallengeIndex]) var item = Object.assign({}, this.list[this.currentChallengeIndex]);
var params = { var params = {
data: { data: {
QcChallengeId: item.Id, QcChallengeId: item.Id,
@ -506,65 +401,65 @@ export default {
SetOrCancel: true, SetOrCancel: true,
}, },
signInfo: signInfo, signInfo: signInfo,
} };
this.loading = true this.loading = true;
this.reuploadedFinishbtnLoading = true this.reuploadedFinishbtnLoading = true;
setReuploadFinished(params) setReuploadFinished(params)
.then((res) => { .then((res) => {
this.loading = false this.loading = false;
this.reuploadedFinishbtnLoading = false this.reuploadedFinishbtnLoading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
if (signInfo) { if (signInfo) {
this.$refs['signForm'].btnLoading = false this.$refs["signForm"].btnLoading = false;
this.signVisible = false this.signVisible = false;
} }
this.list[this.currentChallengeIndex].ReuploadEnum = 3 this.list[this.currentChallengeIndex].ReuploadEnum = 3;
this.initChat() this.initChat();
// this.$message.success(this.$t('common:message:savedSuccessfully')) // this.$message.success(this.$t('common:message:savedSuccessfully'))
this.reFreshList() this.reFreshList();
} }
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false;
this.reuploadedFinishbtnLoading = false this.reuploadedFinishbtnLoading = false;
this.$refs['signForm'].btnLoading = false this.$refs["signForm"].btnLoading = false;
}) });
}, },
// //
closeClinicalDataSignDialog(isSign, signInfo) { closeClinicalDataSignDialog(isSign, signInfo) {
if (isSign) { if (isSign) {
this.setReuploadFinished(signInfo) this.setReuploadFinished(signInfo);
} else { } else {
this.signVisible = false this.signVisible = false;
} }
}, },
// crc // crc
handleCRCApplyReupload(item) { handleCRCApplyReupload(item) {
this.$confirm(this.$t('trials:crcQuestion:message:applyReupload'), { this.$confirm(this.$t("trials:crcQuestion:message:applyReupload"), {
type: 'warning', type: "warning",
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
}) })
.then(() => { .then(() => {
this.applyBtnLoading = true this.applyBtnLoading = true;
cRCRequestReUpload(this.trialId, this.data.Id, item.Id) cRCRequestReUpload(this.trialId, this.data.Id, item.Id)
.then((res) => { .then((res) => {
this.applyBtnLoading = false this.applyBtnLoading = false;
if (res.IsSuccess) { if (res.IsSuccess) {
item.ReuploadEnum = 1 item.ReuploadEnum = 1;
this.initChat() this.initChat();
// this.$message.success(this.$t('common:message:savedSuccessfully')) // this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$forceUpdate() this.$forceUpdate();
this.reFreshList() this.reFreshList();
} }
}) })
.catch(() => { .catch(() => {
this.applyBtnLoading = false this.applyBtnLoading = false;
});
}) })
}) .catch(() => {});
.catch(() => {})
}, },
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.history-chat { .history-chat {
@ -631,7 +526,7 @@ export default {
position: absolute; position: absolute;
left: -8px; left: -8px;
top: 8px; top: 8px;
content: ''; content: "";
border-right: 10px solid #ebeef5; border-right: 10px solid #ebeef5;
border-top: 8px solid transparent; border-top: 8px solid transparent;
border-bottom: 8px solid transparent; border-bottom: 8px solid transparent;
@ -676,7 +571,7 @@ export default {
position: absolute; position: absolute;
right: -8px; right: -8px;
top: 8px; top: 8px;
content: ''; content: "";
border-left: 10px solid #7574d9; border-left: 10px solid #7574d9;
border-top: 8px solid transparent; border-top: 8px solid transparent;
border-bottom: 8px solid transparent; border-bottom: 8px solid transparent;