重传临床数据取消基线限制
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-06-14 16:12:04 +08:00
parent 6db7229cb2
commit 10a2238cba
3 changed files with 221 additions and 170 deletions

View File

@ -250,7 +250,7 @@ export default {
this.currentRow = { ...row };
this.crc_model.visible = true;
this.userListLoading = true;
getTrialSiteCRCList(this.trialId, this.currentRow.SiteId)
getTrialSiteCRCList(this.trialId, this.currentRow.TrialSiteId)
.then((res) => {
this.userListLoading = false;
this.userList = res.Result;

View File

@ -130,11 +130,18 @@
</el-tab-pane>
<!-- 临床数据采集data.IsBaseLine && -->
<el-tab-pane
v-if="clinicalEnum>0"
v-if="data.IsBaseLine && (otherInfo.IsHaveSubjectClinicalData||otherInfo.IsHaveVisitClinicalData)"
:label="$t('trials:uploadClinicalData:tab:uploadClinicalData')"
name="clinical-data"
>
<upload-clinical-data v-if="activeName==='clinical-data'" :data="data" :subject-id="data.SubjectId" :subject-visit-id="data.Id" :allow-add-or-edit="true" :enum-type="clinicalEnum" @getList="reFreshList" />
<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" />
</el-tab-pane>
<el-tab-pane
v-if="!data.IsBaseLine && otherInfo.IsHaveVisitClinicalData"
:label="$t('trials:uploadClinicalData:tab:uploadClinicalData')"
name="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" />
</el-tab-pane>
</el-tabs>
</div>
@ -158,250 +165,296 @@
</div>
</template>
<script>
import { getCRCVisitChallengeAndDialog, verifyReuploadIsCanJump, addQCChallengeReply, cRCRequestReUpload } from '@/api/trials'
import { setReuploadFinished } from '@/api/trials/visit'
import adminAvatar from '@/assets/Admin.png'
import pmAvatar from '@/assets/PM.png'
import crcAvatar from '@/assets/CRC.png'
import qcAvatar from '@/assets/QC.png'
import UploadDicomFiles from './uploadDicomFiles2'
import UploadNonDicomFiles from './uploadNonDicomFiles'
import UploadClinicalData from './uploadClinicalData'
import SignForm from '@/views/trials/components/newSignForm'
import dicomStore from '@/utils/dicom-store'
import const_ from '@/const/sign-code'
import {
getCRCVisitChallengeAndDialog,
verifyReuploadIsCanJump,
addQCChallengeReply,
cRCRequestReUpload,
} from "@/api/trials";
import { setReuploadFinished } from "@/api/trials/visit";
import adminAvatar from "@/assets/Admin.png";
import pmAvatar from "@/assets/PM.png";
import crcAvatar from "@/assets/CRC.png";
import qcAvatar from "@/assets/QC.png";
import UploadDicomFiles from "./uploadDicomFiles2";
import UploadNonDicomFiles from "./uploadNonDicomFiles";
import UploadClinicalData from "./uploadClinicalData";
import SignForm from "@/views/trials/components/newSignForm";
import dicomStore from "@/utils/dicom-store";
import const_ from "@/const/sign-code";
export default {
name: 'HistoryChat',
components: { UploadDicomFiles, UploadNonDicomFiles, UploadClinicalData, SignForm },
name: "HistoryChat",
components: {
UploadDicomFiles,
UploadNonDicomFiles,
UploadClinicalData,
SignForm,
},
props: {
data: {
type: Object,
default() {
return {}
}
return {};
},
},
otherInfo: {
type: Object,
default() {
return {};
},
},
bodyParts: {
type: String,
default: ''
default: "",
},
modalities: {
type: String,
default: ''
default: "",
},
clinicalEnum: {
type: Number,
default: 0
}
default: 0,
},
},
data() {
return {
list: [],
loading: false,
btnLoading: false,
newMessage: '',
userId: zzSessionStorage.getItem('userId'),
newMessage: "",
userId: zzSessionStorage.getItem("userId"),
trialCode: this.$route.query.trialCode,
adminAvatar,
pmAvatar,
crcAvatar,
qcAvatar,
uploadVisible: false,
activeName: 'dicom',
activeName: "dicom",
currentChallengeIndex: null,
signVisible: false,
signCode: '',
currentUser: zzSessionStorage.getItem('userName'),
signCode: "",
currentUser: zzSessionStorage.getItem("userName"),
trialId: this.$route.query.trialId,
uploadBtnLoading: false,
applyBtnLoading: false,
reuploadedFinishbtnLoading: false
}
reuploadedFinishbtnLoading: false,
};
},
mounted() {
this.initChat()
this.initChat();
},
methods: {
clickTab(tab) {
this.setScrollHeight(tab.index * 1)
this.setScrollHeight(tab.index * 1);
},
//
initChat(index) {
var list = []
this.loading = true
getCRCVisitChallengeAndDialog(this.data.Id, this.data.QCProcessEnum).then(res => {
res.Result.forEach(item => {
var contents = []
if (item.Content && item.Content.indexOf('|') !== -1) {
contents = item.Content.split('|')
} else if (item.Content && item.Content !== '') {
contents.push(item.Content)
}
var li = contents.map(content => { return `<li>${content}</li>` })
const content = `
<div>${this.$t('trials:qcQuality:dialog:qcContent')}
var list = [];
this.loading = true;
getCRCVisitChallengeAndDialog(this.data.Id, this.data.QCProcessEnum)
.then((res) => {
res.Result.forEach((item) => {
var contents = [];
if (item.Content && item.Content.indexOf("|") !== -1) {
contents = item.Content.split("|");
} else if (item.Content && item.Content !== "") {
contents.push(item.Content);
}
var li = contents.map((content) => {
return `<li>${content}</li>`;
});
const content = `
<div>${this.$t("trials:qcQuality:dialog:qcContent")}
<ol>
${li.join('')}
${li.join("")}
</ol>
</div>
<p>
${this.$t('trials:qcQuality:dialogTips:tip')}
${this.$t("trials:qcQuality:dialogTips:tip")}
</p>
<p style='color:red'>${this.$t('trials:qcQuality:dialog:deadline')}: ${item.DeadlineTime ? item.DeadlineTime : this.$t('trials:qcQuality:dialog:none')}</p>`
const userId = zzSessionStorage.getItem('userId')
var recordContent = []
recordContent.push(
{
<p style='color:red'>${this.$t(
"trials:qcQuality:dialog:deadline"
)}: ${
item.DeadlineTime
? item.DeadlineTime
: this.$t("trials:qcQuality:dialog:none")
}</p>`;
const userId = zzSessionStorage.getItem("userId");
var recordContent = [];
recordContent.push({
IsCurrentUser: item.CreateUserId === userId,
TalkContent: content,
CreateTime: item.CreateTime,
CreateUserName: item.CreateUserName,
CreateUserId: item.CreateUserId,
UserTypeEnum: item.UserTypeEnum
}
)
recordContent.push(...item.DialogList)
list.push({ Id: item.Id, ChallengeCode: item.ChallengeCode, IsClosed: item.IsClosed, ReuploadEnum: item.ReuploadEnum * 1, DialogList: recordContent, Content: item.Content, DeadlineTime: item.DeadlineTime, IsOverTime: item.IsOverTime })
this.list = Object.assign({}, list)
this.loading = false
this.setScrollHeight(index || 0)
UserTypeEnum: item.UserTypeEnum,
});
recordContent.push(...item.DialogList);
list.push({
Id: item.Id,
ChallengeCode: item.ChallengeCode,
IsClosed: item.IsClosed,
ReuploadEnum: item.ReuploadEnum * 1,
DialogList: recordContent,
Content: item.Content,
DeadlineTime: item.DeadlineTime,
IsOverTime: item.IsOverTime,
});
this.list = Object.assign({}, list);
this.loading = false;
this.setScrollHeight(index || 0);
});
})
}).catch(() => { this.loading = false })
.catch(() => {
this.loading = false;
});
},
setScrollHeight(index) {
setTimeout(() => {
var container = document.querySelectorAll('.chat-content')[index]
container.scrollTop = container.scrollHeight
}, 100)
var container = document.querySelectorAll(".chat-content")[index];
container.scrollTop = container.scrollHeight;
}, 100);
},
//
handleReply(qcChallengeId, index) {
if (!this.newMessage) return
this.btnLoading = true
if (!this.newMessage) return;
this.btnLoading = true;
var params = {
talkContent: this.newMessage,
qcChallengeId: qcChallengeId,
subjectVisitId: this.data.Id
}
addQCChallengeReply(this.data.TrialId, params).then(res => {
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.initChat(index)
this.newMessage = ''
}
this.btnLoading = false
}).catch(() => { this.btnLoading = false })
subjectVisitId: this.data.Id,
};
addQCChallengeReply(this.data.TrialId, params)
.then((res) => {
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.initChat(index);
this.newMessage = "";
}
this.btnLoading = false;
})
.catch(() => {
this.btnLoading = false;
});
},
//
openUploadDialog(index) {
const qcChallengeId = this.list[index].Id
if (!qcChallengeId) return
this.uploadBtnLoading = true
verifyReuploadIsCanJump(this.trialId, qcChallengeId).then(res => {
this.uploadBtnLoading = false
if (res.IsSuccess) {
dicomStore.studyList = []
this.uploadVisible = true
}
}).catch(() => {
this.initChat(index)
this.$emit('getList')
this.uploadBtnLoading = false
})
const qcChallengeId = this.list[index].Id;
if (!qcChallengeId) return;
this.uploadBtnLoading = true;
verifyReuploadIsCanJump(this.trialId, qcChallengeId)
.then((res) => {
this.uploadBtnLoading = false;
if (res.IsSuccess) {
dicomStore.studyList = [];
this.uploadVisible = true;
}
})
.catch(() => {
this.initChat(index);
this.$emit("getList");
this.uploadBtnLoading = false;
});
},
//
closeUpload() {
this.uploadVisible = false
this.uploadVisible = false;
},
//
reFreshList() {
this.$emit('getList')
this.$emit("getList");
},
//
handleSetUploadFinished(index) {
if (this.clinicalEnum > 0 && this.data.IsBaseLine) {
this.currentChallengeIndex = index
const { ClinicalDataConfirmation } = const_.processSignature
this.signCode = ClinicalDataConfirmation
this.signVisible = true
this.currentChallengeIndex = index;
const { ClinicalDataConfirmation } = const_.processSignature;
this.signCode = ClinicalDataConfirmation;
this.signVisible = true;
} else {
this.$confirm(this.$t('trials:crcQuestion:message:reuploadConfirm'), {
type: 'warning',
distinguishCancelAndClose: true
this.$confirm(this.$t("trials:crcQuestion:message:reuploadConfirm"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.currentChallengeIndex = index
this.setReuploadFinished()
}).catch(() => {})
this.currentChallengeIndex = index;
this.setReuploadFinished();
})
.catch(() => {});
}
},
setReuploadFinished(signInfo) {
this.loading = true
var item = Object.assign({}, this.list[this.currentChallengeIndex])
this.loading = true;
var item = Object.assign({}, this.list[this.currentChallengeIndex]);
var params = {
data: {
QcChallengeId: item.Id,
TrialId: this.trialId,
SetOrCancel: true
SetOrCancel: true,
},
signInfo: signInfo
}
this.loading = true
this.reuploadedFinishbtnLoading = true
signInfo: signInfo,
};
this.loading = true;
this.reuploadedFinishbtnLoading = true;
setReuploadFinished(params)
.then(res => {
this.loading = false
this.reuploadedFinishbtnLoading = false
.then((res) => {
this.loading = false;
this.reuploadedFinishbtnLoading = false;
if (res.IsSuccess) {
if (signInfo) {
this.$refs['signForm'].btnLoading = false
this.signVisible = false
this.$refs["signForm"].btnLoading = false;
this.signVisible = false;
}
this.list[this.currentChallengeIndex].ReuploadEnum = 3
this.initChat()
this.list[this.currentChallengeIndex].ReuploadEnum = 3;
this.initChat();
// this.$message.success(this.$t('common:message:savedSuccessfully'))
this.reFreshList()
this.reFreshList();
}
}).catch(() => {
this.loading = false
this.reuploadedFinishbtnLoading = false
this.$refs['signForm'].btnLoading = false
})
.catch(() => {
this.loading = false;
this.reuploadedFinishbtnLoading = false;
this.$refs["signForm"].btnLoading = false;
});
},
//
closeClinicalDataSignDialog(isSign, signInfo) {
if (isSign) {
this.setReuploadFinished(signInfo)
this.setReuploadFinished(signInfo);
} else {
this.signVisible = false
this.signVisible = false;
}
},
// crc
handleCRCApplyReupload(item) {
this.$confirm(this.$t('trials:crcQuestion:message:applyReupload'), {
type: 'warning',
distinguishCancelAndClose: true
this.$confirm(this.$t("trials:crcQuestion:message:applyReupload"), {
type: "warning",
distinguishCancelAndClose: true,
})
.then(() => {
this.applyBtnLoading = true
this.applyBtnLoading = true;
cRCRequestReUpload(this.trialId, this.data.Id, item.Id)
.then(res => {
this.applyBtnLoading = false
.then((res) => {
this.applyBtnLoading = false;
if (res.IsSuccess) {
item.ReuploadEnum = 1
this.initChat()
item.ReuploadEnum = 1;
this.initChat();
// this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$forceUpdate()
this.reFreshList()
this.$forceUpdate();
this.reFreshList();
}
}).catch(() => { this.applyBtnLoading = false })
}).catch(() => {})
}
}
}
})
.catch(() => {
this.applyBtnLoading = false;
});
})
.catch(() => {});
},
},
};
</script>
<style lang="scss" scoped>
.history-chat{
.history-chat {
height: 500px;
::-webkit-scrollbar {
width: 7px;
@ -411,90 +464,90 @@ export default {
border-radius: 10px;
background: #d0d0d0;
}
/deep/ .el-tabs{
/deep/ .el-tabs__header{
/deep/ .el-tabs {
/deep/ .el-tabs__header {
width: 100px;
margin-right: 10px;
height: 500px;
overflow-y: auto;
}
/deep/ .el-tabs__content{
/deep/ .el-tabs__content {
margin-right: 10px;
height: 500px;
width: calc(100%-120px);
overflow-y: auto;
}
.chat-wrapper{
.chat-wrapper {
background-color: #f5f7fa;
height: 500px;
display: flex;
flex-direction: column !important;
overflow: hidden;
.chat-content{
width:100%;
.chat-content {
width: 100%;
padding: 20px;
// height: 400px;
overflow-y: auto;
flex: 1;
.word{
.word {
display: flex;
margin-bottom: 20px;
img{
width:40px;
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
.info{
.info {
margin-left: 10px;
.user-info{
.user-info {
font-size: 12px;
color:rgba(51,51,51,0.8);
margin:0;
color: rgba(51, 51, 51, 0.8);
margin: 0;
height: 20px;
line-height: 20px;
margin-top: -5px;
}
.info-content{
.info-content {
padding: 10px;
font-size: 14px;
background-color: #ebeef5;
position: relative;
margin-top: 8px;
}
.info-content::before{
.info-content::before {
position: absolute;
left: -8px;
top: 8px;
content: '';
content: "";
border-right: 10px solid #ebeef5;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
}
}
}
.word-my{
.word-my {
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
img{
img {
width: 40px;
height: 40px;
border-radius: 50%;
}
.info{
.info {
width: 90%;
margin-left: 10px;
text-align: right;
.user-info{
.user-info {
font-size: 12px;
color: rgba(51,51,51,0.8);
color: rgba(51, 51, 51, 0.8);
margin: 0;
height: 20px;
line-height: 20px;
margin-top: -5px;
margin-right: 10px;
}
.info-content{
.info-content {
position: relative;
max-width: 70%;
padding: 10px;
@ -506,11 +559,11 @@ export default {
color: #fff;
text-align: left;
}
.info-content::after{
.info-content::after {
position: absolute;
right: -8px;
top: 8px;
content: '';
content: "";
border-left: 10px solid #7574d9;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
@ -518,21 +571,19 @@ export default {
}
}
}
.chat-message{
.chat-message {
height: 100px;
padding: 0 50px;
.function{
.function {
margin-top: 10px;
text-align: right;
}
}
ol{
ol {
margin: 5px;
padding: 0px 10px;
}
}
}
}
</style>

View File

@ -592,7 +592,7 @@
<!-- 历史质疑 -->
<base-model :config="chat_cfg">
<template slot="dialog-body">
<HistoryChat v-if="rowData.Id" :data="rowData" :body-parts="otherInfo.BodyPartTypes" :modalities="otherInfo.Modalitys" :clinical-enum="otherInfo.ClinicalInformationTransmissionEnum" @getList="getList" />
<HistoryChat v-if="rowData.Id" :otherInfo="otherInfo" :data="rowData" :body-parts="otherInfo.BodyPartTypes" :modalities="otherInfo.Modalitys" :clinical-enum="otherInfo.ClinicalInformationTransmissionEnum" @getList="getList" />
</template>
</base-model>