项目列表详情按钮添加权限控制
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>
<!-- 阅片标准 --> <!-- 阅片标准 -->
<el-form-item <el-form-item
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
v-if="hasPermi(['role:ir'])" v-if="hasPermi(['role:ir'])"
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
> >
<el-select <el-select
v-model="searchData.CriterionType" v-model="searchData.CriterionType"
@ -59,8 +59,8 @@
</el-form-item> </el-form-item>
<!-- 联系人 --> <!-- 联系人 -->
<el-form-item <el-form-item
:label="$t('trials:trials-list:table:IR_PMEmailList')"
v-if="hasPermi(['role:ir'])" v-if="hasPermi(['role:ir'])"
:label="$t('trials:trials-list:table:IR_PMEmailList')"
> >
<el-input <el-input
v-model="searchData.PM_EMail" v-model="searchData.PM_EMail"
@ -293,9 +293,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSelectSearch" <el-button
>Search</el-button type="primary"
> @click="handleSelectSearch"
>Search</el-button>
<el-button type="primary" @click="handleReset">Reset</el-button> <el-button type="primary" @click="handleReset">Reset</el-button>
<el-button type="primary" @click="isShow = false">Back</el-button> <el-button type="primary" @click="isShow = false">Back</el-button>
</el-form-item> </el-form-item>
@ -357,23 +358,19 @@
<el-tag <el-tag
v-if="scope.row.TrialStatusStr === 'Initializing'" v-if="scope.row.TrialStatusStr === 'Initializing'"
type="info" type="info"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag >{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
>
<el-tag <el-tag
v-if="scope.row.TrialStatusStr === 'Ongoing'" v-if="scope.row.TrialStatusStr === 'Ongoing'"
type="primary" type="primary"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag >{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
>
<el-tag <el-tag
v-if="scope.row.TrialStatusStr === 'Completed'" v-if="scope.row.TrialStatusStr === 'Completed'"
type="warning" type="warning"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag >{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
>
<el-tag <el-tag
v-if="scope.row.TrialStatusStr === 'Stopped'" v-if="scope.row.TrialStatusStr === 'Stopped'"
type="danger" type="danger"
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag >{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag>
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -582,7 +579,7 @@
:disabled=" :disabled="
(scope.row.TrialStatusStr === 'Initializing' && (scope.row.TrialStatusStr === 'Initializing' &&
!hasPermi(['role:pm'])) || !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')" :title="$t('trials:trials-list:action:panel')"
@click.stop="handleDetail(scope.row)" @click.stop="handleDetail(scope.row)"
@ -612,7 +609,7 @@
icon="el-icon-delete" icon="el-icon-delete"
:disabled=" :disabled="
scope.row.IsDeleted || scope.row.IsDeleted ||
scope.row.TrialStatusStr !== 'Initializing' scope.row.TrialStatusStr !== 'Initializing'
" "
:title="$t('trials:trials-list:action:abolition')" :title="$t('trials:trials-list:action:abolition')"
@click.stop="handleAbandon(scope.row)" @click.stop="handleAbandon(scope.row)"
@ -693,54 +690,54 @@
import { import {
abandonTrial, abandonTrial,
ifTrialCanOngoing, ifTrialCanOngoing,
getTrialToBeDoneList, getTrialToBeDoneList
} from "@/api/trials"; } from '@/api/trials'
import { getTrialList_Export } from "@/api/export"; import { getTrialList_Export } from '@/api/export'
import store from "@/store"; import store from '@/store'
import { mapGetters } from "vuex"; import { mapGetters } from 'vuex'
import BaseContainer from "@/components/BaseContainer"; import BaseContainer from '@/components/BaseContainer'
import Pagination from "@/components/Pagination"; import Pagination from '@/components/Pagination'
import TrialForm from "./components/TrialForm"; import TrialForm from './components/TrialForm'
import TrialStatusForm from "./components/TrialStatusForm"; import TrialStatusForm from './components/TrialStatusForm'
import DoneList from "./components/DoneList"; import DoneList from './components/DoneList'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
Code: "", Code: '',
CriterionIds: [], CriterionIds: [],
SponsorId: "", SponsorId: '',
ReviewTypeIds: [], ReviewTypeIds: [],
CROId: "", CROId: '',
Expedited: "", Expedited: '',
Indication: "", Indication: '',
Phase: "", Phase: '',
ModalityIds: [], ModalityIds: [],
BeginDate: "", BeginDate: '',
EndDate: "", EndDate: '',
AttendedReviewerType: "", AttendedReviewerType: '',
ResearchProgramNo: "", ResearchProgramNo: '',
ExperimentName: "", ExperimentName: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
Asc: false, Asc: false,
SortField: "", SortField: '',
CriterionType: null, CriterionType: null,
PM_EMail: null, PM_EMail: null
}; }
}; }
export default { export default {
name: "Trials", name: 'Trials',
components: { components: {
Pagination, Pagination,
BaseContainer, BaseContainer,
TrialForm, TrialForm,
TrialStatusForm, TrialStatusForm,
DoneList, DoneList
}, },
dicts: ["ReadingStandard", "ReviewType", "ReadingType"], dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'],
data() { data() {
return { return {
exportLoading: false, exportLoading: false,
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1, userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
doneDialogVisible: false, doneDialogVisible: false,
doneTitle: null, doneTitle: null,
selectArr: [], selectArr: [],
@ -750,26 +747,26 @@ export default {
total: 0, total: 0,
isShow: false, isShow: false,
dialogVisible: false, dialogVisible: false,
title: "", title: '',
currentId: "", currentId: '',
statusVisible: false, statusVisible: false,
currentRow: {}, currentRow: {},
currentUser: zzSessionStorage.getItem("userName"), currentUser: zzSessionStorage.getItem('userName'),
phaseOptions: [ phaseOptions: [
{ value: "I" }, { value: 'I' },
{ value: "II" }, { value: 'II' },
{ value: "III" }, { value: 'III' },
{ value: "IV" }, { value: 'IV' }
], ],
expeditedOption: this.$d.TrialExpeditedState, expeditedOption: this.$d.TrialExpeditedState,
beginPickerOption: { beginPickerOption: {
disabledDate: (time) => { disabledDate: (time) => {
if (this.searchData.EndDate) { if (this.searchData.EndDate) {
return time.getTime() > new Date(this.searchData.EndDate).getTime(); return time.getTime() > new Date(this.searchData.EndDate).getTime()
} else { } else {
return time.getTime() > Date.now(); return time.getTime() > Date.now()
} }
}, }
}, },
endpickerOption: { endpickerOption: {
disabledDate: (time) => { disabledDate: (time) => {
@ -777,306 +774,189 @@ export default {
return ( return (
time.getTime() > Date.now() || time.getTime() > Date.now() ||
time.getTime() <= new Date(this.searchData.BeginDate).getTime() time.getTime() <= new Date(this.searchData.BeginDate).getTime()
); )
} else { } else {
return time.getTime() > Date.now(); return time.getTime() > Date.now()
} }
}, }
}, }
}; }
}, },
computed: { computed: {
...mapGetters(["sponsorList", "croList"]), ...mapGetters(['sponsorList', 'croList'])
}, },
created() { created() {
this.initPage(); this.initPage()
}, },
methods: { methods: {
initPage() { initPage() {
this.getList(); this.getList()
store.dispatch("global/getSponsorList"); store.dispatch('global/getSponsorList')
store.dispatch("global/getCROList"); store.dispatch('global/getCROList')
}, },
// //
getList() { getList() {
this.listLoading = true; this.listLoading = true
getTrialToBeDoneList(this.searchData) getTrialToBeDoneList(this.searchData)
.then((res) => { .then((res) => {
this.list = res.Result.CurrentPageData; this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount; this.total = res.Result.TotalCount
this.listLoading = false; this.listLoading = false
}) })
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false
}); })
}, },
// //
handleSearch() { handleSearch() {
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1
this.getList(); this.getList()
}, },
// //
handleSelectSearch() { handleSelectSearch() {
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1
this.getList(); this.getList()
this.isShow = false; this.isShow = false
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault(); this.searchData = searchDataDefault()
this.getList(); this.getList()
}, },
// //
handleNew() { handleNew() {
// this.$router.push({ name: 'CreateTrial' }) // this.$router.push({ name: 'CreateTrial' })
this.title = this.$t("trials:trials-list:dialogTitle:new"); this.title = this.$t('trials:trials-list:dialogTitle:new')
this.currentId = ""; this.currentId = ''
this.dialogVisible = true; this.dialogVisible = true
}, },
// //
handleEdit(row) { handleEdit(row) {
this.title = this.$t("trials:trials-list:dialogTitle:edit"); this.title = this.$t('trials:trials-list:dialogTitle:edit')
this.currentId = row.Id; this.currentId = row.Id
this.dialogVisible = true; this.dialogVisible = true
}, },
handleCommission(row) { handleCommission(row) {
this.doneTitle = this.$t("trials:trials-list:dialogTitle:doneTitle"); this.doneTitle = this.$t('trials:trials-list:dialogTitle:doneTitle')
this.currentId = row.Id; this.currentId = row.Id
this.doneDialogVisible = true; this.doneDialogVisible = true
}, },
closeDialog() { closeDialog() {
this.dialogVisible = false; this.dialogVisible = false
}, },
// //
handleStatus(row) { handleStatus(row) {
if (row.TrialStatusStr === "Initializing") { if (row.TrialStatusStr === 'Initializing') {
this.listLoading = true; this.listLoading = true
ifTrialCanOngoing(row.Id) ifTrialCanOngoing(row.Id)
.then((res) => { .then((res) => {
this.listLoading = false; this.listLoading = false
if (res.Result) { if (res.Result) {
this.currentRow = { ...row }; this.currentRow = { ...row }
this.statusVisible = true; this.statusVisible = true
} else { } else {
this.$confirm(res.ErrorMessage, { this.$confirm(res.ErrorMessage, {
type: "warning", type: 'warning',
showCancelButton: false, showCancelButton: false,
callback: (action) => {}, callback: (action) => {}
}); })
} }
}) })
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false
}); })
} else { } else {
this.currentRow = { ...row }; this.currentRow = { ...row }
this.statusVisible = true; this.statusVisible = true
} }
}, },
closeStatusDialog() { closeStatusDialog() {
this.statusVisible = false; this.statusVisible = false
}, },
// //
handleAbandon(row) { handleAbandon(row) {
this.$confirm(this.$t("trials:trials-list:message:abolition"), { this.$confirm(this.$t('trials:trials-list:message:abolition'), {
type: "warning", type: 'warning',
distinguishCancelAndClose: true, distinguishCancelAndClose: true
}) })
.then(() => { .then(() => {
this.currentRow = { ...row }; this.currentRow = { ...row }
this.abandonTrial(); this.abandonTrial()
}) })
.catch(() => {}); .catch(() => {})
}, },
// //
abandonTrial() { abandonTrial() {
this.listLoading = true; this.listLoading = true
abandonTrial(this.currentRow.Id, true) abandonTrial(this.currentRow.Id, true)
.then((res) => { .then((res) => {
this.listLoading = false; this.listLoading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.getList(); this.getList()
this.$message.success( this.$message.success(
this.$t("trials:trials-list:message:abolitionSuccessfully") this.$t('trials:trials-list:message:abolitionSuccessfully')
); )
} }
}) })
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false
}); })
}, },
rowClick(row, col) { rowClick(row, col) {
if ( if ((row.TrialStatusStr === 'Initializing' && !this.hasPermi(['role:pm'])) || row.IsDeleted) {
(row.TrialStatusStr === "Initializing" && return
!this.hasPermi(["role:pm"])) || } else if ((row.TrialStatusStr === 'Completed' || row.TrialStatusStr === 'Stopped') && !(this.hasPermi(['role:qa']) || this.hasPermi(['role:ea']) || this.hasPermi(['role:pm']))) {
row.IsDeleted return
) }
return;
this.$router.push({ 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 // panel
handleDetail(row) { handleDetail(row) {
this.$router.push({ 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) { handleSelectChange(val) {
const arr = []; const arr = []
for (let index = 0; index < val.length; index++) { for (let index = 0; index < val.length; index++) {
arr.push(val[index]); arr.push(val[index])
} }
this.selectArr = arr; this.selectArr = arr
}, },
// //
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
} }
if (column.prop === "Criterion") { if (column.prop === 'Criterion') {
this.searchData.SortField = "CriterionId"; this.searchData.SortField = 'CriterionId'
} else { } else {
this.searchData.SortField = column.prop; this.searchData.SortField = column.prop
} }
this.searchData.PageIndex = 1; this.searchData.PageIndex = 1
this.getList(); this.getList()
}, },
// Excel // Excel
handleExportTrial() { handleExportTrial() {
this.exportLoading = true; this.exportLoading = true
let data = { const data = {
...this.searchData, ...this.searchData
}; }
data.TrialIdList = this.selectArr.map((item) => item.Id); data.TrialIdList = this.selectArr.map((item) => item.Id)
return getTrialList_Export(data) return getTrialList_Export(data)
.then((res) => { .then((res) => {
this.exportLoading = false; this.exportLoading = false
}) })
.catch(() => { .catch(() => {
this.exportLoading = false; 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,
}) })
.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> </script>

View File

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