项目列表、培训列表、影像质控列表导出
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b0ce6e0cb8
commit
cd581041b9
|
@ -160,3 +160,30 @@ export function getSubjectProgress_Export(param) {
|
|||
data: param
|
||||
})
|
||||
}
|
||||
// 导出项目列表
|
||||
export function getTrialList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getTrialList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出培训记录
|
||||
export function pMTrainingRecordList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/pMTrainingRecordList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出影像指控
|
||||
export function qCVisitList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/qCVisitList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -5,17 +5,13 @@
|
|||
<el-form :inline="true">
|
||||
<!-- 项目编号 -->
|
||||
<el-form-item :label="$t('trials:trials-list:table:trialId')">
|
||||
<el-input
|
||||
v-model="searchData.Code"
|
||||
style="width:100px;"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="searchData.Code" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<!-- 研究方案号 -->
|
||||
<el-form-item :label="$t('trials:trials-list:table:researchNumber')">
|
||||
<el-input
|
||||
v-model="searchData.ResearchProgramNo"
|
||||
style="width:100px;"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -23,7 +19,7 @@
|
|||
<el-form-item :label="$t('trials:trials-list:table:experimentName')">
|
||||
<el-input
|
||||
v-model="searchData.ExperimentName"
|
||||
style="width:100px;"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -32,11 +28,11 @@
|
|||
<el-form-item :label="$t('trials:trials-list:table:sponsor')">
|
||||
<el-select
|
||||
v-model="searchData.SponsorId"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item) in sponsorList"
|
||||
v-for="item in sponsorList"
|
||||
:key="item.Id"
|
||||
:label="item.SponsorName"
|
||||
:value="item.Id"
|
||||
|
@ -44,14 +40,17 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 阅片标准 -->
|
||||
<el-form-item :label="$t('trials:trials-list:table:IR_ReadingCriterionList')" v-if="hasPermi(['role:ir'])">
|
||||
<el-form-item
|
||||
:label="$t('trials:trials-list:table:IR_ReadingCriterionList')"
|
||||
v-if="hasPermi(['role:ir'])"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.CriterionType"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item) in $d.CriterionType"
|
||||
v-for="item in $d.CriterionType"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
|
@ -59,10 +58,13 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 联系人 -->
|
||||
<el-form-item :label="$t('trials:trials-list:table:IR_PMEmailList')" v-if="hasPermi(['role:ir'])">
|
||||
<el-input
|
||||
<el-form-item
|
||||
:label="$t('trials:trials-list:table:IR_PMEmailList')"
|
||||
v-if="hasPermi(['role:ir'])"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.PM_EMail"
|
||||
style="width:100px;"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -70,26 +72,29 @@
|
|||
<!-- <el-button type="text" @click="isShow = !isShow">More</el-button> -->
|
||||
<!-- Search -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- Reset -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<!-- Export -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-list:export']"
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
:disabled="!(selectArr.length>0)"
|
||||
:loading="exportLoading"
|
||||
@click="handleExportTrial"
|
||||
>
|
||||
{{ $t('common:button:export') }}
|
||||
{{ $t("common:button:export") }}
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<span style="margin-left: auto">
|
||||
<!-- New -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-list:new']"
|
||||
|
@ -97,24 +102,20 @@
|
|||
type="primary"
|
||||
@click="handleNew"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
{{ $t("common:button:new") }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!-- 更多搜索条件 -->
|
||||
<el-drawer
|
||||
:visible.sync="isShow"
|
||||
:with-header="false"
|
||||
size="390px"
|
||||
>
|
||||
<div style="padding:10px;">
|
||||
<el-drawer :visible.sync="isShow" :with-header="false" size="390px">
|
||||
<div style="padding: 10px">
|
||||
<el-form label-width="140px">
|
||||
<el-form-item label="Trial ID">
|
||||
<el-input
|
||||
v-model="searchData.Code"
|
||||
placeholder="Trial ID"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -122,7 +123,7 @@
|
|||
<el-input
|
||||
v-model="searchData.Indication"
|
||||
placeholder="Indication"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
@ -130,7 +131,7 @@
|
|||
<el-select
|
||||
v-model="searchData.CriterionIds"
|
||||
placeholder="Assessment Criteria"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
multiple
|
||||
>
|
||||
|
@ -152,11 +153,11 @@
|
|||
<el-select
|
||||
v-model="searchData.SponsorId"
|
||||
placeholder="Sponsor"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item) in sponsorList"
|
||||
v-for="item in sponsorList"
|
||||
:key="item.Id"
|
||||
:label="item.SponsorName"
|
||||
:value="item.Id"
|
||||
|
@ -164,9 +165,14 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="CRO">
|
||||
<el-select v-model="searchData.CROId" placeholder="CRO" style="width:100%;" clearable>
|
||||
<el-select
|
||||
v-model="searchData.CROId"
|
||||
placeholder="CRO"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item) of croList"
|
||||
v-for="item of croList"
|
||||
:key="item.Id"
|
||||
:label="item.CROName"
|
||||
:value="item.Id"
|
||||
|
@ -177,7 +183,7 @@
|
|||
<el-select
|
||||
v-model="searchData.Phase"
|
||||
placeholder="Phase"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
|
@ -193,7 +199,7 @@
|
|||
<el-select
|
||||
v-model="searchData.ReviewTypeIds"
|
||||
placeholder="ReviewType"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
multiple
|
||||
>
|
||||
|
@ -216,7 +222,7 @@
|
|||
v-model="searchData.ModalityIds"
|
||||
multiple
|
||||
placeholder="Modality"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<!-- <el-option
|
||||
|
@ -234,7 +240,12 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Expedited: ">
|
||||
<el-select v-model="searchData.Expedited" value-key="value" clearable style="width:100%;">
|
||||
<el-select
|
||||
v-model="searchData.Expedited"
|
||||
value-key="value"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in expeditedOption"
|
||||
:key="item.value"
|
||||
|
@ -251,7 +262,7 @@
|
|||
type="date"
|
||||
:picker-options="beginPickerOption"
|
||||
:clearable="false"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="EndDate: ">
|
||||
|
@ -262,7 +273,7 @@
|
|||
type="date"
|
||||
:picker-options="endpickerOption"
|
||||
:clearable="false"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -270,16 +281,23 @@
|
|||
<el-select
|
||||
v-model="searchData.AttendedReviewerType"
|
||||
placeholder="Attended Reviewer Type"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option v-for="item of $d.AttendedReviewerType" :key="item.value" :label="item.label" :value="item.value" />
|
||||
<el-option
|
||||
v-for="item of $d.AttendedReviewerType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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-button type="primary" @click="isShow = false">Back</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -288,7 +306,7 @@
|
|||
<!-- 项目列表 -->
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
stripe
|
||||
|
@ -336,10 +354,26 @@
|
|||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.TrialStatusStr === 'Initializing'" type="info">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TrialStatusStr === 'Ongoing'" type="primary">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TrialStatusStr === 'Completed'" type="warning">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
|
||||
<el-tag v-if="scope.row.TrialStatusStr === 'Stopped'" type="danger">{{ $fd('TrialStatusEnum', scope.row.TrialStatusStr) }}</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.TrialStatusStr === 'Initializing'"
|
||||
type="info"
|
||||
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-if="scope.row.TrialStatusStr === 'Ongoing'"
|
||||
type="primary"
|
||||
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-if="scope.row.TrialStatusStr === 'Completed'"
|
||||
type="warning"
|
||||
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-if="scope.row.TrialStatusStr === 'Stopped'"
|
||||
type="danger"
|
||||
>{{ $fd("TrialStatusEnum", scope.row.TrialStatusStr) }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -406,7 +440,7 @@
|
|||
min-width="160"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.IR_ReadingCriterionList.join(', ')}}
|
||||
{{ scope.row.IR_ReadingCriterionList.join(", ") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -441,7 +475,7 @@
|
|||
min-width="170"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.IR_PMEmailList.join(', ')}}
|
||||
{{ scope.row.IR_PMEmailList.join(", ") }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -519,7 +553,9 @@
|
|||
<el-table-column
|
||||
v-if="hasPermi(['role:spm', 'role:cpm'])"
|
||||
prop="SPM_ReviewerSelectApprovalCount"
|
||||
:label="$t('trials:trials-list:table:SPM_ReviewerSelectApprovalCount')"
|
||||
:label="
|
||||
$t('trials:trials-list:table:SPM_ReviewerSelectApprovalCount')
|
||||
"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
|
@ -543,7 +579,11 @@
|
|||
v-hasPermi="['trials:trials-list:panel']"
|
||||
circle
|
||||
icon="el-icon-info"
|
||||
:disabled="(scope.row.TrialStatusStr === 'Initializing' && !hasPermi(['role:pm'])) || scope.row.IsDeleted"
|
||||
:disabled="
|
||||
(scope.row.TrialStatusStr === 'Initializing' &&
|
||||
!hasPermi(['role:pm'])) ||
|
||||
scope.row.IsDeleted
|
||||
"
|
||||
:title="$t('trials:trials-list:action:panel')"
|
||||
@click.stop="handleDetail(scope.row)"
|
||||
/>
|
||||
|
@ -570,19 +610,22 @@
|
|||
v-hasPermi="['trials:trials-list:abolish']"
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
:disabled="scope.row.IsDeleted || scope.row.TrialStatusStr !== 'Initializing'"
|
||||
:disabled="
|
||||
scope.row.IsDeleted ||
|
||||
scope.row.TrialStatusStr !== 'Initializing'
|
||||
"
|
||||
:title="$t('trials:trials-list:action:abolition')"
|
||||
@click.stop="handleAbandon(scope.row)"
|
||||
/>
|
||||
<!-- 代办详情-->
|
||||
<!-- <el-button-->
|
||||
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
|
||||
<!-- circle-->
|
||||
<!-- icon="el-icon-receiving"-->
|
||||
<!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
|
||||
<!-- :title="$t('trials:trials-list:action:commission')"-->
|
||||
<!-- @click.stop="handleCommission(scope.row)"-->
|
||||
<!-- />-->
|
||||
<!-- 代办详情-->
|
||||
<!-- <el-button-->
|
||||
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
|
||||
<!-- circle-->
|
||||
<!-- icon="el-icon-receiving"-->
|
||||
<!-- :disabled="scope.row.TrialStatusStr === 'Initializing'"-->
|
||||
<!-- :title="$t('trials:trials-list:action:commission')"-->
|
||||
<!-- @click.stop="handleCommission(scope.row)"-->
|
||||
<!-- />-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -606,7 +649,11 @@
|
|||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<TrialForm :trial-id="currentId" @getList="getList" @closeDialog="closeDialog" />
|
||||
<TrialForm
|
||||
:trial-id="currentId"
|
||||
@getList="getList"
|
||||
@closeDialog="closeDialog"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改项目状态 -->
|
||||
|
@ -619,7 +666,11 @@
|
|||
custom-class="base-dialog-wrapper"
|
||||
append-to-body
|
||||
>
|
||||
<TrialStatusForm :data="currentRow" @closeDialog="closeStatusDialog" @getList="getList" />
|
||||
<TrialStatusForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeStatusDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
|
@ -630,51 +681,66 @@
|
|||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<DoneList :trial-id="currentId" @getList="getList" @closeDialog="doneDialogVisible = false" />
|
||||
<DoneList
|
||||
:trial-id="currentId"
|
||||
@getList="getList"
|
||||
@closeDialog="doneDialogVisible = false"
|
||||
/>
|
||||
</el-dialog>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { abandonTrial, ifTrialCanOngoing, getTrialToBeDoneList } from '@/api/trials'
|
||||
import store from '@/store'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Excel from 'exceljs'
|
||||
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'
|
||||
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";
|
||||
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: '',
|
||||
CriterionType:null,
|
||||
PM_EMail:null,
|
||||
}
|
||||
}
|
||||
SortField: "",
|
||||
CriterionType: null,
|
||||
PM_EMail: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'Trials',
|
||||
components: { Pagination, BaseContainer, TrialForm, TrialStatusForm, DoneList },
|
||||
dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'],
|
||||
name: "Trials",
|
||||
components: {
|
||||
Pagination,
|
||||
BaseContainer,
|
||||
TrialForm,
|
||||
TrialStatusForm,
|
||||
DoneList,
|
||||
},
|
||||
dicts: ["ReadingStandard", "ReviewType", "ReadingType"],
|
||||
data() {
|
||||
return {
|
||||
userTypeEnumInt: zzSessionStorage.getItem('userTypeEnumInt') * 1,
|
||||
exportLoading: false,
|
||||
userTypeEnumInt: zzSessionStorage.getItem("userTypeEnumInt") * 1,
|
||||
doneDialogVisible: false,
|
||||
doneTitle: null,
|
||||
selectArr: [],
|
||||
|
@ -684,192 +750,224 @@ 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 => {
|
||||
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 => {
|
||||
disabledDate: (time) => {
|
||||
if (this.searchData.BeginDate) {
|
||||
return time.getTime() > Date.now() || time.getTime() <= new Date(this.searchData.BeginDate).getTime()
|
||||
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
|
||||
.then((res) => {
|
||||
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
|
||||
ifTrialCanOngoing(row.Id).then(res => {
|
||||
this.listLoading = false
|
||||
if (res.Result) {
|
||||
this.currentRow = { ...row }
|
||||
this.statusVisible = true
|
||||
} else {
|
||||
this.$confirm(res.ErrorMessage, {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: action => {}
|
||||
})
|
||||
}
|
||||
}).catch(() => { this.listLoading = false })
|
||||
if (row.TrialStatusStr === "Initializing") {
|
||||
this.listLoading = true;
|
||||
ifTrialCanOngoing(row.Id)
|
||||
.then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.Result) {
|
||||
this.currentRow = { ...row };
|
||||
this.statusVisible = true;
|
||||
} else {
|
||||
this.$confirm(res.ErrorMessage, {
|
||||
type: "warning",
|
||||
showCancelButton: false,
|
||||
callback: (action) => {},
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
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
|
||||
}).then(() => {
|
||||
this.currentRow = { ...row }
|
||||
this.abandonTrial()
|
||||
}).catch(() => {})
|
||||
this.$confirm(this.$t("trials:trials-list:message:abolition"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
.then(() => {
|
||||
this.currentRow = { ...row };
|
||||
this.abandonTrial();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 废除项目
|
||||
abandonTrial() {
|
||||
this.listLoading = true
|
||||
this.listLoading = true;
|
||||
abandonTrial(this.currentRow.Id, true)
|
||||
.then(res => {
|
||||
this.listLoading = false
|
||||
.then((res) => {
|
||||
this.listLoading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success(this.$t('trials:trials-list:message:abolitionSuccessfully'))
|
||||
this.getList();
|
||||
this.$message.success(
|
||||
this.$t("trials:trials-list:message:abolitionSuccessfully")
|
||||
);
|
||||
}
|
||||
}).catch(() => { this.listLoading = false })
|
||||
})
|
||||
.catch(() => {
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
rowClick(row, col) {
|
||||
if (row.TrialStatusStr === 'Initializing' && !this.hasPermi(['role:pm']) || row.IsDeleted) return
|
||||
this.$router.push({ path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}` })
|
||||
if (
|
||||
(row.TrialStatusStr === "Initializing" &&
|
||||
!this.hasPermi(["role:pm"])) ||
|
||||
row.IsDeleted
|
||||
)
|
||||
return;
|
||||
this.$router.push({
|
||||
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}` })
|
||||
this.$router.push({
|
||||
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
|
||||
} if (column.prop === 'Criterion') {
|
||||
this.searchData.SortField = 'CriterionId'
|
||||
} else {
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
if (column.prop === "Criterion") {
|
||||
this.searchData.SortField = "CriterionId";
|
||||
} else {
|
||||
this.searchData.SortField = column.prop;
|
||||
}
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 导出Excel表格
|
||||
handleExportTrial() {
|
||||
this.exportLoading = true;
|
||||
return getTrialList_Export(this.searchData)
|
||||
.then((res) => {
|
||||
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')
|
||||
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.properties.defaultRowHeight = 22;
|
||||
// sheet.columns = [
|
||||
// { key: 'Index', width: 5 },
|
||||
// { key: 'Code', width: 15 },
|
||||
|
@ -885,102 +983,96 @@ export default {
|
|||
// { 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 }
|
||||
]
|
||||
{ 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',
|
||||
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'
|
||||
}
|
||||
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'
|
||||
]
|
||||
"NO.",
|
||||
"Trial ID",
|
||||
"试验名称",
|
||||
"研究方案号",
|
||||
"申办方",
|
||||
"是否废除",
|
||||
"Date Created",
|
||||
];
|
||||
sheet.getRow(4).font = {
|
||||
name: 'SimSun',
|
||||
name: "SimSun",
|
||||
family: 4,
|
||||
size: 11,
|
||||
bold: true
|
||||
}
|
||||
sheet.getRow(4).alignment = { vertical: 'middle', horizontal: 'left' }
|
||||
bold: true,
|
||||
};
|
||||
sheet.getRow(4).alignment = { vertical: "middle", horizontal: "left" };
|
||||
|
||||
sheet.addRows(this.selectArr)
|
||||
sheet.addRows(this.selectArr);
|
||||
|
||||
sheet.eachRow((row, number) => {
|
||||
if (number > 3) {
|
||||
row.eachCell((cell, rowNumber) => {
|
||||
cell.alignment = { vertical: 'center', horizontal: 'left' }
|
||||
cell.alignment = { vertical: "center", horizontal: "left" };
|
||||
cell.border = {
|
||||
top: { style: 'thin' },
|
||||
left: { style: 'thin' },
|
||||
bottom: { style: 'thin' },
|
||||
right: { style: 'thin' }
|
||||
}
|
||||
})
|
||||
top: { style: "thin" },
|
||||
left: { style: "thin" },
|
||||
bottom: { style: "thin" },
|
||||
right: { style: "thin" },
|
||||
};
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
workbook.xlsx
|
||||
.writeBuffer({
|
||||
base64: true
|
||||
base64: true,
|
||||
})
|
||||
.then(function(xls64) {
|
||||
.then(function (xls64) {
|
||||
var data = new Blob([xls64], {
|
||||
type:
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
})
|
||||
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
});
|
||||
|
||||
if ('msSaveOrOpenBlob' in navigator) {
|
||||
if ("msSaveOrOpenBlob" in navigator) {
|
||||
// ie使用的下载方式
|
||||
window.navigator.msSaveOrOpenBlob(
|
||||
data,
|
||||
'Trials' + '.xlsx'
|
||||
)
|
||||
window.navigator.msSaveOrOpenBlob(data, "Trials" + ".xlsx");
|
||||
} else {
|
||||
var a = document.createElement('a')
|
||||
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)
|
||||
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>
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
<el-form :inline="true">
|
||||
<!-- 文件类型 -->
|
||||
<el-form-item :label="$t('trials:signRecords:table:fileType')">
|
||||
<el-select
|
||||
v-model="searchData.FileTypeId"
|
||||
style="width:150px;"
|
||||
>
|
||||
<el-select v-model="searchData.FileTypeId" style="width: 150px">
|
||||
<el-option
|
||||
v-for="item of typeOptions"
|
||||
:key="item.FileTypeId"
|
||||
|
@ -19,19 +16,31 @@
|
|||
</el-form-item>
|
||||
<!-- 文件名称 -->
|
||||
<el-form-item :label="$t('trials:signRecords:table:fileName')">
|
||||
<el-input v-model="searchData.Name" style="width:120px;" />
|
||||
<el-input v-model="searchData.Name" style="width: 120px" />
|
||||
</el-form-item>
|
||||
<!-- 签署人 -->
|
||||
<el-form-item :label="$t('trials:signRecords:table:user')">
|
||||
<el-select v-model="searchData.UserId" clearable filterable style="width:140px;">
|
||||
<el-select
|
||||
v-model="searchData.UserId"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 140px"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item) of userOptions"
|
||||
v-for="item of userOptions"
|
||||
:key="item.UserId"
|
||||
:label="item.RealName"
|
||||
:value="item.UserId"
|
||||
>
|
||||
<span style="float: left">{{ item.RealName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px;margin-left:5px;">
|
||||
<span
|
||||
style="
|
||||
float: right;
|
||||
color: #8492a6;
|
||||
font-size: 13px;
|
||||
margin-left: 5px;
|
||||
"
|
||||
>
|
||||
{{ item.UserName }}
|
||||
</span>
|
||||
</el-option>
|
||||
|
@ -43,7 +52,7 @@
|
|||
v-model="searchData.UserTypeId"
|
||||
clearable
|
||||
filterable
|
||||
style="width:120px;"
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of userTypeOptions"
|
||||
|
@ -57,23 +66,54 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:signRecords:table:isSign')">
|
||||
<el-select v-model="searchData.IsConfirmed" clearable style="width:120px;">
|
||||
<el-option v-for="i of $d.YesOrNo" :key="'IsConfirmed' + i.label" :value="i.value" :label="i.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsConfirmed"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="i of $d.YesOrNo"
|
||||
:key="'IsConfirmed' + i.label"
|
||||
:value="i.value"
|
||||
:label="i.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:signRecords:table:isDeleted')">
|
||||
<el-select v-model="searchData.IsDeleted" clearable style="width:120px;">
|
||||
<el-option v-for="i of $d.YesOrNo" :key="'IsDeleted' + i.label" :value="i.value" :label="i.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsDeleted"
|
||||
clearable
|
||||
style="width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="i of $d.YesOrNo"
|
||||
:key="'IsDeleted' + i.label"
|
||||
:value="i.value"
|
||||
:label="i.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button icon="el-icon-refresh-left" type="primary" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
icon="el-icon-refresh-left"
|
||||
type="primary"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<!-- 导出 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
:loading="exportLoading"
|
||||
@click="handleExport"
|
||||
>
|
||||
{{ $t("common:button:export") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -84,7 +124,7 @@
|
|||
<el-table
|
||||
ref="AttachmentsManagement"
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
|
@ -115,8 +155,12 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{ $fd('IsSystemDoc', scope.row.IsSystemDoc) }}</el-tag>
|
||||
<el-tag v-else type="warning">{{ $fd('IsSystemDoc', scope.row.IsSystemDoc) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{
|
||||
$fd("IsSystemDoc", scope.row.IsSystemDoc)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="warning">{{
|
||||
$fd("IsSystemDoc", scope.row.IsSystemDoc)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否废除 -->
|
||||
|
@ -127,8 +171,12 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 上传时间 -->
|
||||
|
@ -147,8 +195,12 @@
|
|||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag>
|
||||
<el-tag v-else type="danger">{{ $fd('YesOrNo', scope.row.IsConfirmed) }}</el-tag>
|
||||
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsConfirmed)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsConfirmed)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 签署人 -->
|
||||
|
@ -193,7 +245,13 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<!-- 预览文件 -->
|
||||
|
@ -205,32 +263,45 @@
|
|||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" @getList="getList" />
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<PreviewFile
|
||||
v-if="previewVisible"
|
||||
:file-path="currentPath"
|
||||
:file-type="currentType"
|
||||
@getList="getList"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getDocumentConfirmList, getTrialUserSelect, getTrialUserTypeList, getTrialDocAndSystemDocType } from '@/api/trials'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
import store from '@/store'
|
||||
import {
|
||||
getDocumentConfirmList,
|
||||
getTrialUserSelect,
|
||||
getTrialUserTypeList,
|
||||
getTrialDocAndSystemDocType,
|
||||
} from "@/api/trials";
|
||||
import { pMTrainingRecordList_Export } from "@/api/export";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import PreviewFile from "@/components/PreviewFile/index";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeId: '',
|
||||
Name: '',
|
||||
UserId: '',
|
||||
UserTypeId: '',
|
||||
FileTypeId: "",
|
||||
Name: "",
|
||||
UserId: "",
|
||||
UserTypeId: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
IsConfirmed: null,
|
||||
IsDeleted: null
|
||||
}
|
||||
}
|
||||
IsDeleted: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'AttachmentsManagement',
|
||||
name: "AttachmentsManagement",
|
||||
components: { BaseContainer, Pagination, PreviewFile },
|
||||
data() {
|
||||
return {
|
||||
|
@ -239,84 +310,99 @@ export default {
|
|||
list: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
currentPath: '',
|
||||
currentType: '',
|
||||
currentPath: "",
|
||||
currentType: "",
|
||||
previewVisible: false,
|
||||
userOptions: [],
|
||||
userTypeOptions: [],
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
currentUser: zzSessionStorage.getItem("userName"),
|
||||
typeOptions: [],
|
||||
trialId: this.$route.query.trialId
|
||||
}
|
||||
trialId: this.$route.query.trialId,
|
||||
exportLoading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getTypeOptions()
|
||||
this.getUserSelect()
|
||||
this.getUserType()
|
||||
this.getList()
|
||||
this.getTypeOptions();
|
||||
this.getUserSelect();
|
||||
this.getUserType();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleExport() {
|
||||
this.exportLoading = true;
|
||||
pMTrainingRecordList_Export(this.searchData)
|
||||
.then(() => {
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.exportLoading = false;
|
||||
});
|
||||
},
|
||||
// 获取系统文件数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.trialId
|
||||
getDocumentConfirmList(this.searchData).then(async res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
console.log(this.total)
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
this.searchData.TrialId = this.trialId;
|
||||
getDocumentConfirmList(this.searchData)
|
||||
.then(async (res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
console.log(this.total);
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 获取文件类型下拉数据
|
||||
getTypeOptions() {
|
||||
getTrialDocAndSystemDocType(this.trialId).then(res => {
|
||||
this.typeOptions = res.Result
|
||||
})
|
||||
getTrialDocAndSystemDocType(this.trialId).then((res) => {
|
||||
this.typeOptions = res.Result;
|
||||
});
|
||||
},
|
||||
// 获取当前项目下参与者信息
|
||||
getUserSelect() {
|
||||
getTrialUserSelect(this.trialId).then(res => {
|
||||
this.userOptions = res.Result
|
||||
})
|
||||
getTrialUserSelect(this.trialId).then((res) => {
|
||||
this.userOptions = res.Result;
|
||||
});
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
getTrialUserTypeList().then(res => {
|
||||
this.userTypeOptions = res.Result
|
||||
})
|
||||
getTrialUserTypeList().then((res) => {
|
||||
this.userTypeOptions = res.Result;
|
||||
});
|
||||
},
|
||||
// 预览
|
||||
handlePreview(row) {
|
||||
this.currentRow = { ...row }
|
||||
const { Name, FullFilePath } = row
|
||||
this.currentPath = FullFilePath
|
||||
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
|
||||
this.previewVisible = true
|
||||
this.currentRow = { ...row };
|
||||
const { Name, FullFilePath } = row;
|
||||
this.currentPath = FullFilePath;
|
||||
this.currentType = row.Name
|
||||
? Name.substring(Name.lastIndexOf(".") + 1).toLocaleLowerCase()
|
||||
: "";
|
||||
this.previewVisible = true;
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.AttachmentsManagement.clearSort()
|
||||
})
|
||||
this.$refs.AttachmentsManagement.clearSort();
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(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;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue