Compare commits
No commits in common. "fb7891a2afa9126b109169c829048a7b9d272d76" and "8f43c697c0ade7996e177992ee0b37c2d373ec78" have entirely different histories.
fb7891a2af
...
8f43c697c0
|
@ -160,34 +160,25 @@
|
|||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('trials:staff:tip:userTypeDisabled')"
|
||||
placement="top"
|
||||
style="margin-right: 2px"
|
||||
v-if="
|
||||
Array.isArray(scope.row.TrialUserRoleList) &&
|
||||
scope.row.TrialUserRoleList.length > 0
|
||||
scope.row.TrialUserRoleList.some(
|
||||
(item) => item.IsDeleted || item.IsUserRoleDisabled
|
||||
)
|
||||
"
|
||||
type="text"
|
||||
@click.stop="openRoleList(scope.row)"
|
||||
>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('trials:staff:tip:userTypeDisabled')"
|
||||
placement="top"
|
||||
style="margin-right: 2px"
|
||||
v-if="
|
||||
scope.row.TrialUserRoleList.some(
|
||||
(item) => item.IsDeleted || item.IsUserRoleDisabled
|
||||
)
|
||||
"
|
||||
>
|
||||
<i class="el-icon-warning icon-i"></i>
|
||||
</el-tooltip>
|
||||
<span>{{
|
||||
scope.row.TrialUserRoleList.map(
|
||||
(item) => item.UserTypeShortName
|
||||
).join(', ')
|
||||
}}</span>
|
||||
</el-button>
|
||||
<i class="el-icon-warning icon-i"></i>
|
||||
</el-tooltip>
|
||||
<span>{{
|
||||
scope.row.TrialUserRoleList.map(
|
||||
(item) => item.UserTypeShortName
|
||||
).join(', ')
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -239,89 +230,6 @@
|
|||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 修改参与者人员角色 -->
|
||||
<base-model v-if="role_model.visible" :config="role_model">
|
||||
<template slot="dialog-body">
|
||||
<el-table :data="roleList" style="width: 100%" max-height="300px">
|
||||
<el-table-column type="index" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
"
|
||||
>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('system:retrospect:tip:userTypeSysDisabled')"
|
||||
placement="top"
|
||||
style="margin-right: 3px"
|
||||
v-if="scope.row.IsUserRoleDisabled"
|
||||
>
|
||||
<i
|
||||
v-if="scope.row.IsUserRoleDisabled"
|
||||
class="el-icon-warning icon-i"
|
||||
></i>
|
||||
</el-tooltip>
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UserTypeShortName"
|
||||
:label="
|
||||
$t(
|
||||
'system:retrospect:table:UserTypeShortName'
|
||||
)
|
||||
"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="
|
||||
$t(
|
||||
'system:retrospect:table:IsUserRoleDisabled'
|
||||
)
|
||||
"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span> {{ $fd('IsDisable', scope.row.IsDeleted) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="
|
||||
$t(
|
||||
'system:retrospect:table:enableTime'
|
||||
)
|
||||
"
|
||||
min-width="120px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.CreateTime }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="
|
||||
$t(
|
||||
'system:retrospect:table:forbiddenTime'
|
||||
)
|
||||
"
|
||||
min-width="120px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.IsDeleted">
|
||||
{{ scope.row.UpdateTime }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</base-model>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -331,7 +239,6 @@ import {
|
|||
} from '@/api/admin.js'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialCode: null,
|
||||
|
@ -346,7 +253,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
}
|
||||
export default {
|
||||
components: { BoxContent, Pagination, BaseModel },
|
||||
components: { BoxContent, Pagination },
|
||||
props: {
|
||||
userId: { type: String, default: '' },
|
||||
},
|
||||
|
@ -364,13 +271,6 @@ export default {
|
|||
list: [],
|
||||
total: 0,
|
||||
userTypeOptions: [],
|
||||
|
||||
roleList: [],
|
||||
role_model: {
|
||||
visible: false,
|
||||
title: this.$t('system:retrospect:dialogTitle:role'),
|
||||
width: '800px',
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -378,10 +278,6 @@ export default {
|
|||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
openRoleList(row) {
|
||||
this.roleList = row.TrialUserRoleList
|
||||
this.role_model.visible = true
|
||||
},
|
||||
getUserTypeList() {
|
||||
getUserTypeListByUserType(0).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<!-- <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
|
||||
|
@ -80,7 +80,7 @@
|
|||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t('common:button:reset') }}
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<!-- Export -->
|
||||
<el-button
|
||||
|
@ -90,7 +90,7 @@
|
|||
:loading="exportLoading"
|
||||
@click="handleExportTrial"
|
||||
>
|
||||
{{ $t('common:button:export') }}
|
||||
{{ $t("common:button:export") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -102,7 +102,7 @@
|
|||
type="primary"
|
||||
@click="handleNew"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
{{ $t("common:button:new") }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -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
|
||||
|
@ -440,7 +437,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
|
||||
|
@ -475,7 +472,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
|
||||
|
@ -582,14 +579,7 @@
|
|||
:disabled="
|
||||
(scope.row.TrialStatusStr === 'Initializing' &&
|
||||
!hasPermi(['role:pm'])) ||
|
||||
scope.row.IsDeleted ||
|
||||
((scope.row.TrialStatusStr === 'Completed' ||
|
||||
scope.row.TrialStatusStr === 'Stopped') &&
|
||||
!(
|
||||
hasPermi(['role:qa']) ||
|
||||
hasPermi(['role:ea']) ||
|
||||
hasPermi(['role:pm'])
|
||||
))
|
||||
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)"
|
||||
|
@ -619,22 +609,11 @@
|
|||
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)"
|
||||
/>
|
||||
<el-button
|
||||
v-hasPermi="[
|
||||
'trials:trials-panel:trial-summary:trial-document:inspect',
|
||||
'trials:trials-panel:trial-summary:trial-document:manage',
|
||||
]"
|
||||
circle
|
||||
icon="el-icon-folder-opened"
|
||||
:disabled="scope.row.IsDeleted"
|
||||
:title="$t('trials:trials-list:action:trialDocument')"
|
||||
@click.stop="toTrialDocument(scope.row)"
|
||||
/>
|
||||
<!-- 代办详情-->
|
||||
<!-- <el-button-->
|
||||
<!-- v-hasPermi="['trials:trials-list:abolish']"-->
|
||||
|
@ -711,7 +690,7 @@
|
|||
import {
|
||||
abandonTrial,
|
||||
ifTrialCanOngoing,
|
||||
getTrialToBeDoneList,
|
||||
getTrialToBeDoneList
|
||||
} from '@/api/trials'
|
||||
import { getTrialList_Export } from '@/api/export'
|
||||
import store from '@/store'
|
||||
|
@ -742,7 +721,7 @@ const searchDataDefault = () => {
|
|||
Asc: false,
|
||||
SortField: '',
|
||||
CriterionType: null,
|
||||
PM_EMail: null,
|
||||
PM_EMail: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
|
@ -752,7 +731,7 @@ export default {
|
|||
BaseContainer,
|
||||
TrialForm,
|
||||
TrialStatusForm,
|
||||
DoneList,
|
||||
DoneList
|
||||
},
|
||||
dicts: ['ReadingStandard', 'ReviewType', 'ReadingType'],
|
||||
data() {
|
||||
|
@ -777,7 +756,7 @@ export default {
|
|||
{ value: 'I' },
|
||||
{ value: 'II' },
|
||||
{ value: 'III' },
|
||||
{ value: 'IV' },
|
||||
{ value: 'IV' }
|
||||
],
|
||||
expeditedOption: this.$d.TrialExpeditedState,
|
||||
beginPickerOption: {
|
||||
|
@ -787,7 +766,7 @@ export default {
|
|||
} else {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
endpickerOption: {
|
||||
disabledDate: (time) => {
|
||||
|
@ -799,20 +778,20 @@ export default {
|
|||
} else {
|
||||
return time.getTime() > Date.now()
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sponsorList', 'croList']),
|
||||
...mapGetters(['sponsorList', 'croList'])
|
||||
},
|
||||
created() {
|
||||
this.initPage()
|
||||
},
|
||||
mounted() {
|
||||
this.$EventBus.$on('reload', (data) => {
|
||||
mounted(){
|
||||
this.$EventBus.$on("reload", (data) => {
|
||||
window.location.reload()
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initPage() {
|
||||
|
@ -885,7 +864,7 @@ export default {
|
|||
this.$confirm(res.ErrorMessage, {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
callback: (action) => {},
|
||||
callback: (action) => {}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -904,7 +883,7 @@ export default {
|
|||
handleAbandon(row) {
|
||||
this.$confirm(this.$t('trials:trials-list:message:abolition'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
this.currentRow = { ...row }
|
||||
|
@ -930,37 +909,19 @@ export default {
|
|||
})
|
||||
},
|
||||
rowClick(row, col) {
|
||||
if (
|
||||
(row.TrialStatusStr === 'Initializing' &&
|
||||
!this.hasPermi(['role:pm'])) ||
|
||||
row.IsDeleted
|
||||
) {
|
||||
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'])
|
||||
)
|
||||
) {
|
||||
} 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}`,
|
||||
})
|
||||
},
|
||||
// 跳转至项目文档
|
||||
toTrialDocument(row) {
|
||||
this.$router.push({
|
||||
path: `/trials/trials-panel/trial-summary/trial-document?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`,
|
||||
path: `/trials/trials-panel?trialId=${row.Id}&trialCode=${row.TrialCode}&researchProgramNo=${row.ResearchProgramNo}`
|
||||
})
|
||||
},
|
||||
// 获取已勾选行数据
|
||||
|
@ -990,7 +951,7 @@ export default {
|
|||
handleExportTrial() {
|
||||
this.exportLoading = true
|
||||
const data = {
|
||||
...this.searchData,
|
||||
...this.searchData
|
||||
}
|
||||
data.TrialIdList = this.selectArr.map((item) => item.Id)
|
||||
return getTrialList_Export(data)
|
||||
|
@ -1000,7 +961,7 @@ export default {
|
|||
.catch(() => {
|
||||
this.exportLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="title">
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
|
@ -39,6 +39,7 @@
|
|||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
|
@ -46,6 +47,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
|
@ -54,10 +56,9 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="line"></div>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:search:name')"
|
||||
>
|
||||
|
@ -103,6 +104,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
size="mini"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
|
@ -110,6 +112,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
|
@ -117,6 +120,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
|
@ -125,6 +129,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
|
@ -133,6 +138,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
:disabled="selectTable.length <= 0"
|
||||
@click.stop="delList"
|
||||
|
@ -308,6 +314,7 @@
|
|||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
size="mini"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
|
@ -318,6 +325,7 @@
|
|||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:download')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
|
@ -325,6 +333,7 @@
|
|||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:delete')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<i class="el-icon-folder-opened"></i>
|
||||
<span>{{ $fd('ArchiveType', item.ArchiveTypeEnum) }}</span>
|
||||
<i
|
||||
class="el-icon-circle-plus menuAdd"
|
||||
class="el-icon-circle-plus menuAdd"
|
||||
:title="$t('trials:trialDocument:menu:add')"
|
||||
@click.stop="addMenu(item.ArchiveTypeEnum)"
|
||||
v-if="isManage && hasAdd && !viewStatus && item.ArchiveTypeEnum !== 5"
|
||||
></i>
|
||||
</div>
|
||||
<div
|
||||
:class="{ menu: true, selected: menuId === data.Id }"
|
||||
:class="{ menu: true, selected: Id === data.Id }"
|
||||
v-for="data in item.TrialFileTypeList"
|
||||
:key="data.SysFileTypeId"
|
||||
@click.stop="handleSelect(data, item.ArchiveTypeEnum)"
|
||||
|
@ -126,7 +126,7 @@ export default {
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
menuId: {
|
||||
Id: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
|
@ -218,49 +218,12 @@ export default {
|
|||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.menu = res.Result.TrialFileTypeDataList
|
||||
this.$nextTick(() => {
|
||||
this.defaultSelect()
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
defaultSelect() {
|
||||
if (!this.menu || this.menu.length <= 0) return false
|
||||
if (this.menuId) {
|
||||
let Id = this.menuId
|
||||
let f = this.menu.some((item) => {
|
||||
let flag = false
|
||||
if (item.TrialFileTypeList && item.TrialFileTypeList.length > 0) {
|
||||
flag = item.TrialFileTypeList.some((data) => {
|
||||
if (data.Id === Id) {
|
||||
this.$emit('update:menuId', null)
|
||||
this.$nextTick(() => {
|
||||
this.handleSelect(data, item.ArchiveTypeEnum)
|
||||
})
|
||||
}
|
||||
return data.Id === Id
|
||||
})
|
||||
}
|
||||
return flag
|
||||
})
|
||||
if (!f) {
|
||||
this.$emit('update:menuId', null)
|
||||
this.$nextTick(() => {
|
||||
this.defaultSelect()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.menu.some((item) => {
|
||||
if (item.TrialFileTypeList && item.TrialFileTypeList.length > 0) {
|
||||
this.handleSelect(item.TrialFileTypeList[0], item.ArchiveTypeEnum)
|
||||
}
|
||||
return item.TrialFileTypeList && item.TrialFileTypeList.length > 0
|
||||
})
|
||||
}
|
||||
},
|
||||
// 修改菜单启用
|
||||
async changeIsEnble(val, item) {
|
||||
try {
|
||||
|
@ -279,7 +242,7 @@ export default {
|
|||
},
|
||||
// 选中
|
||||
handleSelect(data, ArchiveTypeEnum) {
|
||||
this.$emit('update:menuId', data.Id)
|
||||
this.$emit('update:Id', data.Id)
|
||||
this.$emit('update:SubIdentificationEnum', data.SubIdentificationEnum)
|
||||
this.$emit('update:ArchiveTypeEnum', ArchiveTypeEnum)
|
||||
this.$emit('update:rowData', data)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="title">
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')"
|
||||
>
|
||||
|
@ -52,6 +52,7 @@
|
|||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
|
@ -59,6 +60,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
|
@ -67,10 +69,9 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="line"></div>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:name')">
|
||||
<el-input v-model="searchData.Name" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
|
@ -119,6 +120,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
size="mini"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
|
@ -126,6 +128,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
|
@ -134,6 +137,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
|
@ -345,7 +349,6 @@
|
|||
:label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
@ -378,6 +381,7 @@
|
|||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
size="mini"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
|
||||
|
@ -388,6 +392,7 @@
|
|||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
|
@ -395,6 +400,7 @@
|
|||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:download')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row)"
|
||||
/>
|
||||
|
@ -402,6 +408,7 @@
|
|||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:delete')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="title">
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:temp:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
|
@ -23,6 +23,7 @@
|
|||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
|
@ -30,6 +31,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
|
@ -38,10 +40,9 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="line"></div>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item :label="$t('trials:trialDocument:temp:search:name')">
|
||||
<el-input
|
||||
v-model="searchData.FileName"
|
||||
|
@ -85,6 +86,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
size="mini"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
|
@ -92,6 +94,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
|
@ -99,6 +102,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
|
@ -107,6 +111,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
|
@ -115,6 +120,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
:disabled="selectTable.length <= 0"
|
||||
@click.stop="delList"
|
||||
|
@ -241,38 +247,23 @@
|
|||
/>
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<viewer
|
||||
:ref="scope.row.TrialFileRecord.FilePath"
|
||||
style="margin: 0 10px;display: inline-block;"
|
||||
:images="[
|
||||
`${OSSclientConfig.basePath}${scope.row.TrialFileRecord.FilePath}`,
|
||||
]"
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord ||
|
||||
!scope.row.TrialFileRecord.FilePath ||
|
||||
(!~scope.row.TrialFileRecord.FileFormat.indexOf('pdf') &&
|
||||
!~scope.row.TrialFileRecord.FileFormat.indexOf('jpg') &&
|
||||
!~scope.row.TrialFileRecord.FileFormat.indexOf('jpeg') &&
|
||||
!~scope.row.TrialFileRecord.FileFormat.indexOf('png'))
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<img
|
||||
v-show="false"
|
||||
crossorigin="anonymous"
|
||||
:src="`${OSSclientConfig.basePath}${scope.row.TrialFileRecord.FilePath}`"
|
||||
alt="Image"
|
||||
/>
|
||||
</viewer>
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
size="mini"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord ||
|
||||
!scope.row.TrialFileRecord.FilePath ||
|
||||
!~scope.row.TrialFileRecord.FileFormat.indexOf('pdf')
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:temp:button:download')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
|
@ -280,6 +271,7 @@
|
|||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:temp:button:delete')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
|
@ -669,15 +661,11 @@ export default {
|
|||
// 预览
|
||||
preview(row) {
|
||||
if (!row.FilePath) return false
|
||||
if (!!~row.FileFormat.indexOf('pdf')) {
|
||||
return this.$preview({
|
||||
path: row.FilePath || row.fullPath,
|
||||
type: 'pdf',
|
||||
title: row.FileName,
|
||||
})
|
||||
}
|
||||
|
||||
this.$refs[row.FilePath].$viewer.show()
|
||||
this.$preview({
|
||||
path: row.FilePath || row.fullPath,
|
||||
type: 'pdf',
|
||||
title: row.FileName,
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.config.visible = false
|
||||
|
@ -798,9 +786,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.topForm {
|
||||
.el-form-item {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -3,7 +3,7 @@
|
|||
<div class="title">
|
||||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
|
@ -39,6 +39,7 @@
|
|||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
|
@ -46,6 +47,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
|
@ -54,10 +56,9 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="line"></div>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<!--培训日期-->
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:TrianingDate')"
|
||||
|
@ -138,6 +139,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
size="mini"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
|
@ -145,6 +147,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
|
@ -152,6 +155,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
|
@ -159,6 +163,7 @@
|
|||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
|
@ -167,6 +172,7 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
|
@ -360,6 +366,7 @@
|
|||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
size="mini"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
|
@ -370,6 +377,7 @@
|
|||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
|
@ -377,6 +385,7 @@
|
|||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:download')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
|
@ -384,6 +393,7 @@
|
|||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:delete')"
|
||||
size="mini"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<Menu
|
||||
ref="Menu"
|
||||
:viewStatus="viewStatus"
|
||||
:menuId.sync="Id"
|
||||
:Id.sync="Id"
|
||||
:SubIdentificationEnum.sync="SubIdentificationEnum"
|
||||
:ArchiveTypeEnum.sync="ArchiveTypeEnum"
|
||||
:rowData.sync="rowData"
|
||||
|
@ -82,7 +82,7 @@ export default {
|
|||
components: { BaseContainer, Menu, reportDoc, fileRecord, trainRecord, temp },
|
||||
data() {
|
||||
return {
|
||||
viewStatus: true,
|
||||
viewStatus: false,
|
||||
Id: null,
|
||||
SubIdentificationEnum: null,
|
||||
ArchiveTypeEnum: null,
|
||||
|
@ -103,7 +103,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleChange() {
|
||||
// this.Id = null
|
||||
this.Id = null
|
||||
this.SubIdentificationEnum = null
|
||||
this.ArchiveTypeEnum = null
|
||||
this.rowData = {}
|
||||
|
@ -157,15 +157,4 @@ export default {
|
|||
padding: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep .topForm {
|
||||
.el-form-item {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
::v-deep .line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
margin: 0 0 22px 0;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue