Compare commits

..

No commits in common. "53a9b3882dfe736401a5b2bd53c9f4df590ec492" and "671be02d130636af03d62fe02cbbdd7e71871d61" have entirely different histories.

6 changed files with 63 additions and 89 deletions

View File

@ -374,9 +374,7 @@ async function VueInit() {
} }
_vm.$store.dispatch('user/logout').then(res => { _vm.$store.dispatch('user/logout').then(res => {
// window.location.href = `/login` // window.location.href = `/login`
if(_vm.$msgbox){ _vm.$msgbox.close();
_vm.$msgbox.close();
}
isOpen = false isOpen = false
isLock = null isLock = null
zzSessionStorage.removeItem('isLock') zzSessionStorage.removeItem('isLock')

View File

@ -1,10 +1,10 @@
import Vue from 'vue'; import Vue from 'vue';
import store from "@/store";
import { import {
requestPackageAndAnonymizImage, requestPackageAndAnonymizImage,
} from "@/api/load.js"; } from "@/api/load.js";
import streamSaver from "streamsaver"; import streamSaver from "streamsaver";
import "streamsaver/examples/zip-stream.js" import "streamsaver/examples/zip-stream.js"
import store from '@/store';
let flag = {}; let flag = {};
export const resetFlag = () => { export const resetFlag = () => {
flag = {}; flag = {};
@ -13,7 +13,6 @@ export const resetFlag = () => {
clearInterval(store.state.trials.timer); clearInterval(store.state.trials.timer);
store.state.trials.timer = null; store.state.trials.timer = null;
} }
store.dispatch("trials/setUnLock", false);
} }
export const downloadImage = async (id, id2, IsDicom = true) => { export const downloadImage = async (id, id2, IsDicom = true) => {
// if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading')); // if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
@ -25,7 +24,6 @@ export const downloadImage = async (id, id2, IsDicom = true) => {
SubjectVisitId: id2, SubjectVisitId: id2,
IsDicom: IsDicom IsDicom: IsDicom
} }
store.dispatch("trials/setUnLock", true);
let res = await requestPackageAndAnonymizImage(params); let res = await requestPackageAndAnonymizImage(params);
if (res.IsSuccess) { if (res.IsSuccess) {
if (!res.Result) { if (!res.Result) {
@ -88,7 +86,6 @@ let download = async (downloadUrl, downloadFileName, res) => {
const blob = await getBlob(downloadUrl); const blob = await getBlob(downloadUrl);
flag[`${res.id2}_${res.IsDicom}`] = false; flag[`${res.id2}_${res.IsDicom}`] = false;
store.state.trials.uploadTip = null; store.state.trials.uploadTip = null;
store.dispatch("trials/setUnLock", false);
saveAsB(blob, downloadFileName); saveAsB(blob, downloadFileName);
return true; return true;
} }

View File

@ -121,7 +121,7 @@ export default {
// Dicom // Dicom
getNoneDicomList() { getNoneDicomList() {
this.loading = true this.loading = true
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => { getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => {
this.studyList = res.Result this.studyList = res.Result
this.loading = false this.loading = false
const studyIndex = this.studyList.findIndex(item => { const studyIndex = this.studyList.findIndex(item => {

View File

@ -62,7 +62,7 @@ export default {
// Dicom // Dicom
getNoneDicomList() { getNoneDicomList() {
this.loading = true this.loading = true
getNoneDicomStudyList(this.subjectVisitId, '').then(res => { getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => {
this.noneDicomStudyList = res.Result this.noneDicomStudyList = res.Result
this.loading = false this.loading = false
const study = this.noneDicomStudyList.find((item, index) => { const study = this.noneDicomStudyList.find((item, index) => {

View File

@ -313,9 +313,8 @@
</div> </div>
<el-tag type="danger">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag> <el-tag type="danger">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
</el-tooltip> </el-tooltip>
<el-tag v-else-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag> <el-tag v-if="scope.row.RequestReReadingResultEnum === 1" type="primary">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
<el-tag v-else-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag> <el-tag v-if="scope.row.RequestReReadingResultEnum === 0" type="warning">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
<el-tag v-else type="info">{{ $fd('RequestReReadingResult', scope.row.RequestReReadingResultEnum) }}</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -785,7 +784,7 @@ export default {
this.signVisible = false this.signVisible = false
} }
}, },
async confirmReReading(row, type, open, signInfo) { confirmReReading(row, type, open, signInfo) {
if (open) { if (open) {
this.rowData = { ...row } this.rowData = { ...row }
this.ConfirmReReadingVisible = true this.ConfirmReReadingVisible = true
@ -795,41 +794,41 @@ export default {
return return
} }
if (type === 2) { if (type === 2) {
let valid = await this.$refs.reasonForm.validate() this.$refs.reasonForm.validate((valid) => {
if (!valid) return if (!valid) return
var params = { var params = {
data: { data: {
ConfirmReReadingList: [ ConfirmReReadingList: [
{ {
Id: row.Id, Id: row.Id,
OriginalReReadingTaskId: row.OriginalReReadingTaskId, OriginalReReadingTaskId: row.OriginalReReadingTaskId,
RootReReadingTaskId: row.RootReReadingTaskId, RootReReadingTaskId: row.RootReReadingTaskId,
NewReReadingTaskId: row.NewReReadingTaskId NewReReadingTaskId: row.NewReReadingTaskId
} }
], ],
RequestReReadingRejectReason: this.ConfirmReReadingForm.RequestReReadingRejectReason, RequestReReadingRejectReason: this.ConfirmReReadingForm.RequestReReadingRejectReason,
TrialId: this.$route.query.trialId, TrialId: this.$route.query.trialId,
RequestReReadingResultEnum: type RequestReReadingResultEnum: type
}, },
signInfo: signInfo signInfo: signInfo
} }
this.loading = true this.loading = true
this.btnLoading = true this.btnLoading = true
try { confirmReReading(params).then(() => {
await confirmReReading(params) this.loading = false
this.loading = false this.btnLoading = false
this.btnLoading = false // /
// / this.$message.success(`${type === 1 ? this.$t('trials:rereadTrack:message:msg3') : this.$t('trials:rereadTrack:message:msg4')}`)
this.$message.success(`${type === 1 ? this.$t('trials:rereadTrack:message:msg3') : this.$t('trials:rereadTrack:message:msg4')}`) 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(() => {
} catch (e) { this.loading = false
this.loading = false this.$refs['signForm'].btnLoading = false
this.$refs['signForm'].btnLoading = false this.btnLoading = false
this.btnLoading = false })
} })
return return
} }
var params = { var params = {
@ -849,29 +848,21 @@ export default {
} }
this.loading = true this.loading = true
this.btnLoading = true this.btnLoading = true
try { confirmReReading(params).then(() => {
let res = await confirmReReading(params)
this.loading = false this.loading = false
this.btnLoading = false this.btnLoading = false
// this.$message.success(`${type === 1 ? '' : ''}`)
// /
this.$message.success(`${type === 1 ? this.$t('trials:rereadTrack:message:msg3') : this.$t('trials:rereadTrack:message:msg4')}`)
this.ReReadingOrBackVisible = false
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
if (res.ErrorMessage) { this.signVisible = false
let alert = await this.$alert(res.ErrorMessage) this.getList()
if (alert !== "confirm") return }).catch(() => {
this.ReReadingOrBackVisible = false
this.signVisible = false
this.getList()
} else {
// /
this.$message.success(`${type === 1 ? this.$t('trials:rereadTrack:message:msg3') : this.$t('trials:rereadTrack:message:msg4')}`)
this.ReReadingOrBackVisible = false
this.signVisible = false
this.getList()
}
} catch (e) {
this.loading = false this.loading = false
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
this.btnLoading = false this.btnLoading = false
} })
}, },
assignSubjectTaskToDoctor(row, type) { assignSubjectTaskToDoctor(row, type) {
this.rowData = { ...row } this.rowData = { ...row }

View File

@ -412,7 +412,6 @@ import { getToken } from '@/utils/auth'
// import PreviewFiles from './previewFiles' // import PreviewFiles from './previewFiles'
import uploadVideos from '@/components/videos' import uploadVideos from '@/components/videos'
import moment from 'moment' import moment from 'moment'
import store from "@/store";
export default { export default {
name: 'UploadNonDicomFiles', name: 'UploadNonDicomFiles',
components: { uploadVideos }, components: { uploadVideos },
@ -471,8 +470,7 @@ export default {
uploadVideoVisible: false, uploadVideoVisible: false,
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
moment, moment,
BodyPart:{}, BodyPart:{}
studyMonitorId: null
}; };
}, },
async mounted() { async mounted() {
@ -499,12 +497,6 @@ export default {
}); });
} }
}, },
btnLoading(){
store.dispatch("trials/setUnLock", this.btnLoading);
}
},
beforeDestroy(){
store.dispatch("trials/setUnLock", false);
}, },
methods: { methods: {
// Dicom // Dicom
@ -760,20 +752,11 @@ export default {
this.selectArr.forEach(item=>item.status = 0); this.selectArr.forEach(item=>item.status = 0);
let num = this.selectArr.length > 6 ? 6 : this.selectArr.length; let num = this.selectArr.length > 6 ? 6 : this.selectArr.length;
let funArr = []; let funArr = [];
let res = await preArchiveStudy({ for (let i = 0; i < num; i++) {
subjectVisitId: this.subjectVisitId, funArr.push(this.handleUploadTask(this.selectArr, i));
isDicom: false }
}); if (funArr.length > 0) {
if(res.IsSuccess){ let res = await Promise.all(funArr);
this.studyMonitorId = res.Result;
for (let i = 0; i < num; i++) {
funArr.push(this.handleUploadTask(this.selectArr, i));
}
if (funArr.length > 0) {
let res = await Promise.all(funArr);
}
}else{
this.isFail = true;
} }
} }
}, },
@ -831,12 +814,16 @@ export default {
// Dicom // Dicom
submitFile(uploadedFileList){ submitFile(uploadedFileList){
if(!this.uploadVisible) return; if(!this.uploadVisible) return;
preArchiveStudy({
subjectVisitId: this.subjectVisitId,
isDicom: false
}).then(res => {
this.btnLoading = true this.btnLoading = true
var params = { var params = {
trialId: this.trialId, trialId: this.trialId,
subjectVisitId: this.subjectVisitId, subjectVisitId: this.subjectVisitId,
noneDicomStudyId:this.currentRow.Id, noneDicomStudyId:this.currentRow.Id,
studyMonitorId: this.studyMonitorId, studyMonitorId: res.Result,
uploadedFileList: uploadedFileList uploadedFileList: uploadedFileList
} }
uploadNoneDicomFile(params).then(res => { uploadNoneDicomFile(params).then(res => {
@ -846,6 +833,7 @@ export default {
this.$emit('getList') this.$emit('getList')
this.$message.success(this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully')) this.$message.success(this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully'))
}).catch(() => { this.btnLoading = false }) }).catch(() => { this.btnLoading = false })
})
}, },
resetFileDiaolg(){ resetFileDiaolg(){
this.btnLoading = false this.btnLoading = false