项目列表详情按钮添加权限控制
continuous-integration/drone/push Build is running Details

uat_us
caiyiling 2024-09-03 13:11:44 +08:00
parent f0eda2bc66
commit bfe86e6868
2 changed files with 369 additions and 490 deletions

View File

@ -41,8 +41,8 @@
</el-form-item>
<!-- 阅片标准 -->
<el-form-item
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
v-if="hasPermi(['role:ir'])"
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
>
<el-select
v-model="searchData.CriterionType"
@ -59,8 +59,8 @@
</el-form-item>
<!-- 联系人 -->
<el-form-item
:label="$t('trials:trials-list:table:IR_PMEmailList')"
v-if="hasPermi(['role:ir'])"
:label="$t('trials:trials-list:table:IR_PMEmailList')"
>
<el-input
v-model="searchData.PM_EMail"
@ -293,9 +293,10 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSelectSearch"
>Search</el-button
>
<el-button
type="primary"
@click="handleSelectSearch"
>Search</el-button>
<el-button type="primary" @click="handleReset">Reset</el-button>
<el-button type="primary" @click="isShow = false">Back</el-button>
</el-form-item>
@ -357,23 +358,19 @@
<el-tag
v-if="scope.row.TrialStatusStr === 'Initializing'"
type="info"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
<el-tag
v-if="scope.row.TrialStatusStr === 'Ongoing'"
type="primary"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
<el-tag
v-if="scope.row.TrialStatusStr === 'Completed'"
type="warning"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
<el-tag
v-if="scope.row.TrialStatusStr === 'Stopped'"
type="danger"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
>
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
</template>
</el-table-column>
<el-table-column
@ -582,7 +579,7 @@
:disabled="
(scope.row.TrialStatusStr === 'Initializing' &&
!hasPermi(['role:pm'])) ||
scope.row.IsDeleted
scope.row.IsDeleted || ((scope.row.TrialStatusStr === 'Completed' || scope.row.TrialStatusStr === 'Stopped') && !(hasPermi(['role:qa']) || hasPermi(['role:ea']) || hasPermi(['role:pm'])))
"
:title="$t('trials:trials-list:action:panel')"
@click.stop="handleDetail(scope.row)"
@ -612,7 +609,7 @@
icon="el-icon-delete"
:disabled="
scope.row.IsDeleted ||
scope.row.TrialStatusStr !== 'Initializing'
scope.row.TrialStatusStr !== 'Initializing'
"
:title="$t('trials:trials-list:action:abolition')"
@click.stop="handleAbandon(scope.row)"
@ -693,54 +690,54 @@
import {
abandonTrial,
ifTrialCanOngoing,
getTrialToBeDoneList,
} from "@/api/trials";
import { getTrialList_Export } from "@/api/export";
import store from "@/store";
import { mapGetters } from "vuex";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import TrialForm from "./components/TrialForm";
import TrialStatusForm from "./components/TrialStatusForm";
import DoneList from "./components/DoneList";
getTrialToBeDoneList
} from '@/api/trials'
import { getTrialList_Export } from '@/api/export'
import store from '@/store'
import { mapGetters } from 'vuex'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
import TrialForm from './components/TrialForm'
import TrialStatusForm from './components/TrialStatusForm'
import DoneList from './components/DoneList'
const searchDataDefault = () => {
return {
Code: "",
Code: '',
CriterionIds: [],
SponsorId: "",
SponsorId: '',
ReviewTypeIds: [],
CROId: "",
Expedited: "",
Indication: "",
Phase: "",
CROId: '',
Expedited: '',
Indication: '',
Phase: '',
ModalityIds: [],
BeginDate: "",
EndDate: "",
AttendedReviewerType: "",
ResearchProgramNo: "",
ExperimentName: "",
BeginDate: '',
EndDate: '',
AttendedReviewerType: '',
ResearchProgramNo: '',
ExperimentName: '',
PageIndex: 1,
PageSize: 20,
Asc: false,
SortField: "",
SortField: '',
CriterionType: null,
PM_EMail: null,
};
};
PM_EMail: null
}
}
export default {
name: "Trials",
name: 'Trials',
components: {
Pagination,
BaseContainer,
TrialForm,
TrialStatusForm,
DoneList,
DoneList
},
dicts: ["ReadingStandard", "ReviewType", "ReadingType"],
dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'],
data() {
return {
exportLoading: false,
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
doneDialogVisible: false,
doneTitle: null,
selectArr: [],
@ -750,26 +747,26 @@ export default {
total: 0,
isShow: false,
dialogVisible: false,
title: "",
currentId: "",
title: '',
currentId: '',
statusVisible: false,
currentRow: {},
currentUser: zzSessionStorage.getItem("userName"),
currentUser: zzSessionStorage.getItem('userName'),
phaseOptions: [
{ value: "I" },
{ value: "II" },
{ value: "III" },
{ value: "IV" },
{ value: 'I' },
{ value: 'II' },
{ value: 'III' },
{ value: 'IV' }
],
expeditedOption: this.$d.TrialExpeditedState,
beginPickerOption: {
disabledDate: (time) => {
if (this.searchData.EndDate) {
return time.getTime() > new Date(this.searchData.EndDate).getTime();
return time.getTime() > new Date(this.searchData.EndDate).getTime()
} else {
return time.getTime() > Date.now();
return time.getTime() > Date.now()
}
},
}
},
endpickerOption: {
disabledDate: (time) => {
@ -777,306 +774,189 @@ export default {
return (
time.getTime() > Date.now() ||
time.getTime() <= new Date(this.searchData.BeginDate).getTime()
);
)
} else {
return time.getTime() > Date.now();
return time.getTime() > Date.now()
}
},
},
};
}
}
}
},
computed: {
...mapGetters(["sponsorList", "croList"]),
...mapGetters(['sponsorList', 'croList'])
},
created() {
this.initPage();
this.initPage()
},
methods: {
initPage() {
this.getList();
store.dispatch("global/getSponsorList");
store.dispatch("global/getCROList");
this.getList()
store.dispatch('global/getSponsorList')
store.dispatch('global/getCROList')
},
//
getList() {
this.listLoading = true;
this.listLoading = true
getTrialToBeDoneList(this.searchData)
.then((res) => {
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
this.listLoading = false;
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
this.listLoading = false
})
.catch(() => {
this.listLoading = false;
});
this.listLoading = false
})
},
//
handleSearch() {
this.searchData.PageIndex = 1;
this.getList();
this.searchData.PageIndex = 1
this.getList()
},
//
handleSelectSearch() {
this.searchData.PageIndex = 1;
this.getList();
this.isShow = false;
this.searchData.PageIndex = 1
this.getList()
this.isShow = false
},
//
handleReset() {
this.searchData = searchDataDefault();
this.getList();
this.searchData = searchDataDefault()
this.getList()
},
//
handleNew() {
// this.$router.push({ name: 'CreateTrial' })
this.title = this.$t("trials:trials-list:dialogTitle:new");
this.currentId = "";
this.dialogVisible = true;
this.title = this.$t('trials:trials-list:dialogTitle:new')
this.currentId = ''
this.dialogVisible = true
},
//
handleEdit(row) {
this.title = this.$t("trials:trials-list:dialogTitle:edit");
this.currentId = row.Id;
this.dialogVisible = true;
this.title = this.$t('trials:trials-list:dialogTitle:edit')
this.currentId = row.Id
this.dialogVisible = true
},
handleCommission(row) {
this.doneTitle = this.$t("trials:trials-list:dialogTitle:doneTitle");
this.currentId = row.Id;
this.doneDialogVisible = true;
this.doneTitle = this.$t('trials:trials-list:dialogTitle:doneTitle')
this.currentId = row.Id
this.doneDialogVisible = true
},
closeDialog() {
this.dialogVisible = false;
this.dialogVisible = false
},
//
handleStatus(row) {
if (row.TrialStatusStr === "Initializing") {
this.listLoading = true;
if (row.TrialStatusStr === 'Initializing') {
this.listLoading = true
ifTrialCanOngoing(row.Id)
.then((res) => {
this.listLoading = false;
this.listLoading = false
if (res.Result) {
this.currentRow = { ...row };
this.statusVisible = true;
this.currentRow = { ...row }
this.statusVisible = true
} else {
this.$confirm(res.ErrorMessage, {
type: "warning",
type: 'warning',
showCancelButton: false,
callback: (action) => {},
});
callback: (action) => {}
})
}
})
.catch(() => {
this.listLoading = false;
});
this.listLoading = false
})
} else {
this.currentRow = { ...row };
this.statusVisible = true;
this.currentRow = { ...row }
this.statusVisible = true
}
},
closeStatusDialog() {
this.statusVisible = false;
this.statusVisible = false
},
//
handleAbandon(row) {
this.$confirm(this.$t("trials:trials-list:message:abolition"), {
type: "warning",
distinguishCancelAndClose: true,
this.$confirm(this.$t('trials:trials-list:message:abolition'), {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
this.currentRow = { ...row };
this.abandonTrial();
this.currentRow = { ...row }
this.abandonTrial()
})
.catch(() => {});
.catch(() => {})
},
//
abandonTrial() {
this.listLoading = true;
this.listLoading = true
abandonTrial(this.currentRow.Id, true)
.then((res) => {
this.listLoading = false;
this.listLoading = false
if (res.IsSuccess) {
this.getList();
this.getList()
this.$message.success(
this.$t("trials:trials-list:message:abolitionSuccessfully")
);
this.$t('trials:trials-list:message:abolitionSuccessfully')
)
}
})
.catch(() => {
this.listLoading = false;
});
this.listLoading = false
})
},
rowClick(row, col) {
if (
(row.TrialStatusStr === "Initializing" &&
!this.hasPermi(["role:pm"])) ||
row.IsDeleted
)
return;
if ((row.TrialStatusStr === 'Initializing' && !this.hasPermi(['role:pm'])) || row.IsDeleted) {
return
} else if ((row.TrialStatusStr === 'Completed' || row.TrialStatusStr === 'Stopped') && !(this.hasPermi(['role:qa']) || this.hasPermi(['role:ea']) || this.hasPermi(['role:pm']))) {
return
}
this.$router.push({
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
});
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`
})
},
// panel
handleDetail(row) {
this.$router.push({
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
});
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`
})
},
//
handleSelectChange(val) {
const arr = [];
const arr = []
for (let index = 0; index < val.length; index++) {
arr.push(val[index]);
arr.push(val[index])
}
this.selectArr = arr;
this.selectArr = arr
},
//
handleSortChange(column) {
if (column.order === "ascending") {
this.searchData.Asc = true;
if (column.order === 'ascending') {
this.searchData.Asc = true
} else {
this.searchData.Asc = false;
this.searchData.Asc = false
}
if (column.prop === "Criterion") {
this.searchData.SortField = "CriterionId";
if (column.prop === 'Criterion') {
this.searchData.SortField = 'CriterionId'
} else {
this.searchData.SortField = column.prop;
this.searchData.SortField = column.prop
}
this.searchData.PageIndex = 1;
this.getList();
this.searchData.PageIndex = 1
this.getList()
},
// Excel
handleExportTrial() {
this.exportLoading = true;
let data = {
...this.searchData,
};
data.TrialIdList = this.selectArr.map((item) => item.Id);
this.exportLoading = true
const data = {
...this.searchData
}
data.TrialIdList = this.selectArr.map((item) => item.Id)
return getTrialList_Export(data)
.then((res) => {
this.exportLoading = false;
this.exportLoading = false
})
.catch(() => {
this.exportLoading = false;
});
this.selectArr.forEach((element, index) => {
// element.ExpeditedStr = element.Expedited === 0 ? 'No' : element.Expedited === 1 ? '24H' : '48H'
// element.ModalityListStr = element.ModalityList.join(', ')
// element.CreateTimeStr = element.CreateTime
// element.Criterion = element.CriterionList.join(', ')
element.Deleted = element.IsDeleted ? "Yes" : "No";
element.Index = index + 1;
});
var workbook = new Excel.Workbook();
var sheet = workbook.addWorksheet("Trials");
sheet.properties.defaultRowHeight = 22;
// sheet.columns = [
// { key: 'Index', width: 5 },
// { key: 'Code', width: 15 },
// { key: 'ExpeditedStr', width: 13 },
// { key: 'TrialStatusStr', width: 10 },
// { key: 'Indication', width: 25 },
// { key: 'Phase', width: 10 },
// { key: 'ReviewType', width: 20 },
// { key: 'Criterion', width: 15 },
// { key: 'ModalityListStr', width: 30 },
// { key: 'CRO', width: 10 },
// { key: 'Sponsor', width: 20 },
// { key: 'CreateTimeStr', width: 18 }
// ]
sheet.columns = [
{ key: "Index", width: 5 },
{ key: "TrialCode", width: 25 },
{ key: "ExperimentName", width: 25 },
{ key: "ResearchProgramNo", width: 25 },
{ key: "Sponsor", width: 25 },
{ key: "Deleted", width: 10 },
{ key: "CreateTime", width: 25 },
];
//
sheet.mergeCells("A1", "G2");
sheet.getCell("A1").value = "Trials";
sheet.getCell("A1").alignment = {
vertical: "middle",
horizontal: "center",
};
sheet.getCell("A1").font = {
name: "SimSun",
family: 4,
size: 13,
bold: true,
};
sheet.mergeCells("A3", "G3");
var now = new Date();
sheet.getCell("A3").value = now.toLocaleDateString();
sheet.getCell("A3").alignment = {
vertical: "middle",
horizontal: "right",
};
sheet.getRow(4).values = [
"NO.",
"Trial ID",
"试验名称",
"研究方案号",
"申办方",
"是否废除",
"Date Created",
];
sheet.getRow(4).font = {
name: "SimSun",
family: 4,
size: 11,
bold: true,
};
sheet.getRow(4).alignment = { vertical: "middle", horizontal: "left" };
sheet.addRows(this.selectArr);
sheet.eachRow((row, number) => {
if (number > 3) {
row.eachCell((cell, rowNumber) => {
cell.alignment = { vertical: "center", horizontal: "left" };
cell.border = {
top: { style: "thin" },
left: { style: "thin" },
bottom: { style: "thin" },
right: { style: "thin" },
};
});
}
});
workbook.xlsx
.writeBuffer({
base64: true,
this.exportLoading = false
})
.then(function (xls64) {
var data = new Blob([xls64], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
if ("msSaveOrOpenBlob" in navigator) {
// ie使
window.navigator.msSaveOrOpenBlob(data, "Trials" + ".xlsx");
} else {
var a = document.createElement("a");
var url = URL.createObjectURL(data);
a.href = url;
a.download = "Trials" + ".xlsx";
document.body.appendChild(a);
a.click();
setTimeout(function () {
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 0);
}
});
},
},
};
}
}
}
</script>

View File

@ -54,8 +54,8 @@
j.armEnum === 1
? $t('trials:adReview:table:viewR1')
: j.armEnum === 2
? $t('trials:adReview:table:viewR2')
: $fd('ArmEnum', j.armEnum)
? $t('trials:adReview:table:viewR2')
: $fd('ArmEnum', j.armEnum)
"
align="center"
prop=""
@ -81,18 +81,17 @@
scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i]
.DictionaryCode
"
>{{
$fd(
scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[
i
].DictionaryCode,
parseInt(
scope.row.VisitTaskInfoList[j.index]
.JudgeQuestionList[i].Answer
)
>{{
$fd(
scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[
i
].DictionaryCode,
parseInt(
scope.row.VisitTaskInfoList[j.index]
.JudgeQuestionList[i].Answer
)
}}</span
>
)
}}</span>
<span v-else>{{
scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i]
.Answer
@ -321,7 +320,7 @@
alt=""
crossorigin="anonymous"
style="max-width: 100%; max-height: 100%"
/>
>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@ -435,87 +434,87 @@ import {
// uploadJudgeTaskImage,
saveJudgeVisitTaskResult,
submitJudgeVisitTaskResult,
getReadingPastResultList,
} from "@/api/trials";
import { getAutoCutNextTask } from "@/api/user";
import { setSkipReadingCache } from "@/api/reading";
import const_ from "@/const/sign-code";
import { getToken } from "@/utils/auth";
import SignForm from "@/views/trials/components/newSignForm";
import DicomEvent from "@/views/trials/trials-panel/reading/dicoms/components/DicomEvent";
getReadingPastResultList
} from '@/api/trials'
import { getAutoCutNextTask } from '@/api/user'
import { setSkipReadingCache } from '@/api/reading'
import const_ from '@/const/sign-code'
import { getToken } from '@/utils/auth'
import SignForm from '@/views/trials/components/newSignForm'
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
// import store from '@/store'
import { changeURLStatic } from "@/utils/history.js";
import { changeURLStatic } from '@/utils/history.js'
export default {
name: "AdReview",
name: 'AdReview',
components: { SignForm },
props: {
trialId: {
type: String,
required: true,
required: true
},
subjectId: {
type: String,
required: true,
required: true
},
visitTaskId: {
type: String,
required: true,
required: true
},
readingCategory: {
type: Number,
required: true,
required: true
},
subjectCode: {
type: String,
required: true,
required: true
},
taskBlindName: {
type: String,
required: true,
required: true
},
isReadingShowSubjectInfo: {
type: Boolean,
required: true,
required: true
},
isReadingShowPreviousResults: {
type: Boolean,
required: true,
required: true
},
isExistsClinicalData: {
type: Boolean,
required: true,
},
required: true
}
},
data() {
return {
adInfo: {},
judgeQuestion: [],
adForm: {
visitTaskId: "",
judgeResultTaskId: "",
judgeResultRemark: "",
visitTaskId: '',
judgeResultTaskId: '',
judgeResultRemark: '',
// judgeResultImagePath: ''
judgeResultImagePathList: [],
judgeResultImagePathList: []
},
currentUser: zzSessionStorage.getItem("userName"),
currentUser: zzSessionStorage.getItem('userName'),
signVisible: false,
signCode: null,
accept: ".png,.jpg,.jpeg",
accept: '.png,.jpg,.jpeg',
imgVisible: false,
imageUrl: "",
imageUrl: '',
uploadDisabled: false,
fileList: [],
loading: false,
visitTaskArmList: [],
priorADList: [],
priorLoading: false,
judgeResultArmEnum: "",
judgeResultArmEnum: '',
criterionType: null,
openWindow: null,
isFixed: false,
images: [],
remark: "",
};
remark: ''
}
},
// watch: {
// visitTaskId: {
@ -531,260 +530,260 @@ export default {
// }
// },
mounted() {
this.criterionType = parseInt(this.$route.query.criterionType);
this.getAdInfo();
this.criterionType = parseInt(this.$route.query.criterionType)
this.getAdInfo()
if (this.isReadingShowPreviousResults) {
this.getPriorAdList();
this.getPriorAdList()
}
DicomEvent.$on("resetOpenWindow", () => {
DicomEvent.$on('resetOpenWindow', () => {
if (this.openWindow) {
this.openWindow.close();
this.openWindow.close()
}
});
})
},
beforeDestroy() {
DicomEvent.$off("resetOpenWindow");
DicomEvent.$off('resetOpenWindow')
if (this.openWindow) {
this.openWindow.close();
this.openWindow.close()
}
},
methods: {
async getAdInfo() {
this.loading = true;
this.loading = true
try {
const res = await getJudgeReadingInfo({
visitTaskId: this.visitTaskId,
});
visitTaskId: this.visitTaskId
})
if (res.IsSuccess) {
var judgeQS = [];
var judgeQS = []
if (res.Result.VisitInfoList.length > 0) {
res.Result.VisitInfoList[0].VisitTaskInfoList.map((v, index) => {
var qsObj = {
armEnum: v.ArmEnum,
judgeQuestionList: [],
index: index,
};
index: index
}
v.JudgeQuestionList.map((q) => {
if (q.QuestionType === 1) {
qsObj.judgeQuestionList.push(q.QuestionName);
qsObj.judgeQuestionList.push(q.QuestionName)
} else if (q.QuestionType === 3 && this.criterionType === 10) {
qsObj.judgeQuestionList.push(
this.$t("trials:globalReview:table:visitRemark")
);
this.$t('trials:globalReview:table:visitRemark')
)
} else {
qsObj.judgeQuestionList.push(
this.$fd("JudgeReadingQuestionType", q.QuestionType)
);
this.$fd('JudgeReadingQuestionType', q.QuestionType)
)
}
});
judgeQS.push(qsObj);
});
})
judgeQS.push(qsObj)
})
}
this.judgeQuestion = judgeQS;
this.judgeQuestion = judgeQS
this.isFixed =
this.judgeQuestion.length > 0 &&
this.judgeQuestion[0].judgeQuestionList.length > 4;
this.adInfo = res.Result;
this.adForm.judgeResultTaskId = res.Result.JudgeResultTaskId;
this.judgeQuestion[0].judgeQuestionList.length > 4
this.adInfo = res.Result
this.adForm.judgeResultTaskId = res.Result.JudgeResultTaskId
this.fileList = [];
this.fileList = []
if (res.Result.JudgeResultImagePathList) {
res.Result.JudgeResultImagePathList.map((url) => {
if (url) {
this.fileList.push({ name: "", url: url });
this.fileList.push({ name: '', url: url })
}
});
})
this.adForm.judgeResultImagePathList =
res.Result.JudgeResultImagePathList;
res.Result.JudgeResultImagePathList
}
this.visitTaskArmList = res.Result.VisitTaskArmList;
this.visitTaskArmList = res.Result.VisitTaskArmList
var i = this.visitTaskArmList.findIndex(
(i) => i.VisitTaskId === this.adForm.judgeResultTaskId
);
)
if (i > -1) {
// R1
this.judgeResultArmEnum = this.visitTaskArmList[i].ArmEnum;
var msg = "";
this.judgeResultArmEnum = this.visitTaskArmList[i].ArmEnum
var msg = ''
if (this.judgeResultArmEnum === 1) {
msg = this.$t("trials:adReview:title:msg1");
msg = this.$t('trials:adReview:title:msg1')
} else if (this.judgeResultArmEnum === 2) {
msg = this.$t("trials:adReview:title:msg3");
msg = this.$t('trials:adReview:title:msg3')
}
this.remark = msg;
this.adForm.judgeResultRemark = res.Result.JudgeResultRemark;
this.remark = msg
this.adForm.judgeResultRemark = res.Result.JudgeResultRemark
}
}
this.loading = false;
this.loading = false
} catch (e) {
this.loading = false;
this.loading = false
}
},
async getPriorAdList() {
this.priorLoading = true;
this.priorLoading = true
try {
const res = await getReadingPastResultList({
visitTaskId: this.visitTaskId,
});
visitTaskId: this.visitTaskId
})
if (res.IsSuccess) {
this.priorADList = res.Result;
this.priorADList = res.Result
}
this.priorLoading = false;
this.priorLoading = false
} catch (e) {
this.priorLoading = false;
this.priorLoading = false
}
},
handleVisitTaskArmChange(v) {
var i = this.visitTaskArmList.findIndex((i) => i.VisitTaskId === v);
var i = this.visitTaskArmList.findIndex((i) => i.VisitTaskId === v)
if (i > -1) {
// R1
this.judgeResultArmEnum = this.visitTaskArmList[i].ArmEnum;
var msg = "";
this.judgeResultArmEnum = this.visitTaskArmList[i].ArmEnum
var msg = ''
if (this.judgeResultArmEnum === 1) {
msg = this.$t("trials:adReview:title:msg1");
msg = this.$t('trials:adReview:title:msg1')
} else {
msg = this.$t("trials:adReview:title:msg3");
msg = this.$t('trials:adReview:title:msg3')
}
// this.adForm.judgeResultRemark = `${this.$fd('ArmEnum', this.judgeResultArmEnum)}`
this.remark = msg;
this.adForm.judgeResultRemark = "";
this.remark = msg
this.adForm.judgeResultRemark = ''
} else {
this.judgeResultArmEnum = "";
this.remark = "";
this.adForm.judgeResultRemark = "";
this.judgeResultArmEnum = ''
this.remark = ''
this.adForm.judgeResultRemark = ''
}
},
previewCD() {
var token = getToken();
var token = getToken()
const routeData = this.$router.resolve({
path: `/clinicalData?subjectId=${this.subjectId}&trialId=${this.trialId}&visitTaskId=${this.visitTaskId}&TokenKey=${token}`,
});
window.open(routeData.href, "_blank");
path: `/clinicalData?subjectId=${this.subjectId}&trialId=${this.trialId}&visitTaskId=${this.visitTaskId}&TokenKey=${token}`
})
window.open(routeData.href, '_blank')
},
async handleSave() {
const valid = await this.$refs["adForm"].validate();
if (!valid) return;
this.loading = true;
var paths = [];
const valid = await this.$refs['adForm'].validate()
if (!valid) return
this.loading = true
var paths = []
this.fileList.map((file) => {
if (file.url) {
paths.push(file.url);
paths.push(file.url)
}
});
this.adForm.judgeResultImagePathList = paths;
this.adForm.visitTaskId = this.visitTaskId;
})
this.adForm.judgeResultImagePathList = paths
this.adForm.visitTaskId = this.visitTaskId
try {
await saveJudgeVisitTaskResult(this.adForm);
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.loading = false;
await saveJudgeVisitTaskResult(this.adForm)
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.loading = false
} catch (e) {
this.loading = false;
this.loading = false
}
},
async handleSubmit() {
const valid = await this.$refs["adForm"].validate();
if (!valid) return;
const { ImageAssessmentReportConfirmation } = const_.processSignature;
this.signCode = ImageAssessmentReportConfirmation;
this.signVisible = true;
const valid = await this.$refs['adForm'].validate()
if (!valid) return
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
},
//
closeSignDialog(isSign, signInfo) {
if (isSign) {
this.signConfirm(signInfo);
this.signConfirm(signInfo)
} else {
this.signVisible = false;
this.signVisible = false
}
},
//
async signConfirm(signInfo) {
this.loading = true;
var paths = [];
this.loading = true
var paths = []
this.fileList.map((file) => {
paths.push(file.url);
});
paths.push(file.url)
})
var params = {
data: {
visitTaskId: this.visitTaskId,
judgeResultTaskId: this.adForm.judgeResultTaskId,
judgeResultRemark: this.adForm.judgeResultRemark,
judgeResultImagePathList: paths,
judgeResultImagePathList: paths
},
signInfo: signInfo,
};
signInfo: signInfo
}
try {
const res = await submitJudgeVisitTaskResult(params);
const res = await submitJudgeVisitTaskResult(params)
if (res.IsSuccess) {
this.$message.success(this.$t("common:message:savedSuccessfully"));
this.isEdit = false;
this.$refs["signForm"].btnLoading = false;
this.signVisible = false;
this.$message.success(this.$t('common:message:savedSuccessfully'))
this.isEdit = false
this.$refs['signForm'].btnLoading = false
this.signVisible = false
// window.location.reload()
// window.opener.postMessage('refreshTaskList', window.location)
//
this.adInfo.ReadingTaskState = 2;
const res = await getAutoCutNextTask();
var isAutoTask = res.Result.AutoCutNextTask;
this.adInfo.ReadingTaskState = 2
const res = await getAutoCutNextTask()
var isAutoTask = res.Result.AutoCutNextTask
if (isAutoTask) {
// store.dispatch('reading/resetVisitTasks')
window.location.reload();
window.location.reload()
} else {
// ''
const confirm = await this.$confirm(
this.$t("trials:adReview:title:msg2"),
this.$t('trials:adReview:title:msg2'),
{
type: "warning",
distinguishCancelAndClose: true,
type: 'warning',
distinguishCancelAndClose: true
}
);
if (confirm === "confirm") {
)
if (confirm === 'confirm') {
// store.dispatch('reading/resetVisitTasks')
// DicomEvent.$emit('getNextTask')
window.location.reload();
window.location.reload()
} else {
changeURLStatic("visitTaskId", this.visitTaskId);
changeURLStatic('visitTaskId', this.visitTaskId)
}
}
window.opener.postMessage("refreshTaskList", window.location);
window.opener.postMessage('refreshTaskList', window.location)
}
this.loading = false;
this.loading = false
} catch (e) {
this.loading = false;
this.$refs["signForm"].btnLoading = false;
this.loading = false
this.$refs['signForm'].btnLoading = false
}
},
handleViewDetail(visitTaskId) {
if (this.openWindow) {
this.openWindow.close();
this.openWindow.close()
}
var token = getToken();
var criterionType = parseInt(localStorage.getItem("CriterionType"));
var readingTool = this.$router.currentRoute.query.readingTool;
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool);
var token = getToken()
var criterionType = parseInt(localStorage.getItem('CriterionType'))
var readingTool = this.$router.currentRoute.query.readingTool
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool)
var isReadingTaskViewInOrder =
this.$router.currentRoute.query.isReadingTaskViewInOrder;
this.$router.currentRoute.query.isReadingTaskViewInOrder
var trialReadingCriterionId =
this.$router.currentRoute.query.TrialReadingCriterionId;
this.$router.currentRoute.query.TrialReadingCriterionId
var path = "";
var path = ''
if (readingTool === 0) {
path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
}&subjectCode=${this.subjectCode}&subjectId=${
this.subjectId
}&visitTaskId=${visitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&visitTaskId=${visitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
} else {
path = `/noneDicomReading?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
}&subjectCode=${this.subjectCode}&subjectId=${
this.subjectId
}&visitTaskId=${visitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&visitTaskId=${visitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
}
var routeData = this.$router.resolve({ path });
this.openWindow = window.open(routeData.href, "_blank");
var routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank')
},
handleView(row, armEnum) {
if (this.openWindow) {
this.openWindow.close();
this.openWindow.close()
}
// var token = getToken()
// var task = row.VisitTaskInfoList.find(item => item.ArmEnum === armEnum)
@ -792,17 +791,17 @@ export default {
// path: `/readingPage?trialId=${this.trialId}&visitTaskId=${task.VisitTaskId}&TokenKey=${token}&isReadingShowPreviousResults=false`
// })
// window.open(routeData.href, '_blank')
var token = getToken();
var task = row.VisitTaskInfoList.find((item) => item.ArmEnum === armEnum);
var criterionType = this.$router.currentRoute.query.criterionType;
var readingTool = this.$router.currentRoute.query.readingTool;
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool);
var token = getToken()
var task = row.VisitTaskInfoList.find((item) => item.ArmEnum === armEnum)
var criterionType = this.$router.currentRoute.query.criterionType
var readingTool = this.$router.currentRoute.query.readingTool
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool)
var isReadingTaskViewInOrder =
this.$router.currentRoute.query.isReadingTaskViewInOrder;
this.$router.currentRoute.query.isReadingTaskViewInOrder
var trialReadingCriterionId =
this.$router.currentRoute.query.TrialReadingCriterionId;
this.$router.currentRoute.query.TrialReadingCriterionId
var path = "";
var path = ''
if (readingTool === 0) {
path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
@ -810,7 +809,7 @@ export default {
this.subjectId
}&visitTaskId=${
task.VisitTaskId
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
} else {
path = `/noneDicomReading?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
@ -818,26 +817,26 @@ export default {
this.subjectId
}&visitTaskId=${
task.VisitTaskId
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
}
var routeData = this.$router.resolve({ path });
this.openWindow = window.open(routeData.href, "_blank");
var routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank')
},
handleViewGl(row, armEnum) {
if (this.openWindow) {
this.openWindow.close();
this.openWindow.close()
}
var token = getToken();
var task = row.VisitTaskInfoList.find((item) => item.ArmEnum === armEnum);
var criterionType = this.$router.currentRoute.query.criterionType;
var readingTool = this.$router.currentRoute.query.readingTool;
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool);
var token = getToken()
var task = row.VisitTaskInfoList.find((item) => item.ArmEnum === armEnum)
var criterionType = this.$router.currentRoute.query.criterionType
var readingTool = this.$router.currentRoute.query.readingTool
readingTool = isNaN(parseInt(readingTool)) ? null : parseInt(readingTool)
var isReadingTaskViewInOrder =
this.$router.currentRoute.query.isReadingTaskViewInOrder;
this.$router.currentRoute.query.isReadingTaskViewInOrder
var trialReadingCriterionId =
this.$router.currentRoute.query.TrialReadingCriterionId;
this.$router.currentRoute.query.TrialReadingCriterionId
var path = "";
var path = ''
if (readingTool === 0) {
path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
@ -845,7 +844,7 @@ export default {
this.subjectId
}&visitTaskId=${
task.GlobalVisitTaskId
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
} else {
path = `/noneDicomReading?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${
this.trialId
@ -853,10 +852,10 @@ export default {
this.subjectId
}&visitTaskId=${
task.GlobalVisitTaskId
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`;
}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}&key=${new Date().getTime()}`
}
var routeData = this.$router.resolve({ path });
this.openWindow = window.open(routeData.href, "_blank");
var routeData = this.$router.resolve({ path })
this.openWindow = window.open(routeData.href, '_blank')
},
// uploadScreenshot(param) {
// this.loading = true
@ -874,93 +873,93 @@ export default {
// })
// },
async uploadScreenshot(param) {
this.loading = true;
this.uploadDisabled = false;
var trialId = this.$route.query.trialId;
var file = await this.fileToBlob(param.file);
this.loading = true
this.uploadDisabled = false
var trialId = this.$route.query.trialId
var file = await this.fileToBlob(param.file)
const res = await this.OSSclient.put(
`/${trialId}/Read/${this.subjectId}/visit/${param.file.name}`,
file
);
console.log(res);
)
console.log(res)
this.fileList.push({
name: param.file.name,
url: this.$getObjectName(res.url),
});
this.loading = false;
this.uploadDisabled = true;
url: this.$getObjectName(res.url)
})
this.loading = false
this.uploadDisabled = true
},
handleBeforeUpload(file) {
//
if (this.checkFileSuffix(file.name)) {
return true;
return true
} else {
const msg = this.$t("trials:adReview:title:msg4").replace(
"xxx",
const msg = this.$t('trials:adReview:title:msg4').replace(
'xxx',
this.accept
);
this.$alert(msg);
return false;
)
this.$alert(msg)
return false
}
},
checkFileSuffix(fileName) {
var index = fileName.lastIndexOf(".");
var suffix = fileName.substring(index + 1, fileName.length);
var index = fileName.lastIndexOf('.')
var suffix = fileName.substring(index + 1, fileName.length)
if (
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) ===
-1
) {
return false;
return false
} else {
return true;
return true
}
},
//
removeImage() {
this.imageUrl = "";
this.fileList = [];
this.adForm.judgeResultImagePath = "";
this.imageUrl = ''
this.fileList = []
this.adForm.judgeResultImagePath = ''
},
//
handlePictureCardPreview(file) {
this.images = this.fileList.map(
(f) => this.OSSclientConfig.basePath + f.url
);
)
// this.imageUrl = this.OSSclientConfig.basePath + file.url
this.$refs[file.url].$viewer.show();
this.$refs[file.url].$viewer.show()
},
//
handleRemove(file, fileList) {
var idx = this.fileList.findIndex((i) => i.url === file.url);
if (idx === -1) return;
this.fileList.splice(idx, 1);
var idx = this.fileList.findIndex((i) => i.url === file.url)
if (idx === -1) return
this.fileList.splice(idx, 1)
},
async skipTask() {
try {
//
const confirm = await this.$confirm(
this.$t("trials:readingReport:message:skipConfirm"),
this.$t('trials:readingReport:message:skipConfirm'),
{
type: "warning",
distinguishCancelAndClose: true,
type: 'warning',
distinguishCancelAndClose: true
}
);
if (confirm !== "confirm") return;
this.loading = true;
)
if (confirm !== 'confirm') return
this.loading = true
const res = await setSkipReadingCache({
visitTaskId: this.visitTaskId,
});
this.loading = false;
visitTaskId: this.visitTaskId
})
this.loading = false
if (res.IsSuccess) {
window.location.reload();
window.location.reload()
}
} catch (e) {
this.loading = false;
console.log(e);
this.loading = false
console.log(e)
}
}
},
};
}
}
</script>
<style lang="scss" scoped>
.adReview_wrapper {