项目文档历史记录修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6ea46c076b
commit
fa4c00230f
|
@ -1357,6 +1357,37 @@ export function deleteAttachment(data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-获取历史记录列表
|
||||
export function getTrialHistoryRecordFileList(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/getTrialHistoryRecordFileList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-新增/修改历史记录
|
||||
export function addOrUpdateTrialHistoryRecordFile(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/addOrUpdateTrialHistoryRecordFile`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-批量新增历史记录
|
||||
export function batchAddTrialHistoryRecordFile(data) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/batchAddTrialHistoryRecordFile`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目文档-删除历史记录
|
||||
export function deleteTrialHistoryRecordFile(id) {
|
||||
return request({
|
||||
url: `/TrialHistoryRecordFile/deleteTrialHistoryRecordFile/${id}`,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
// 邮件管理-批量修改邮件
|
||||
export function batchUpdateEmail(data) {
|
||||
return request({
|
||||
|
|
|
@ -4,52 +4,25 @@
|
|||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -58,32 +31,14 @@
|
|||
<!-- 搜索框 -->
|
||||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:search:name')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.FileName"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:name')">
|
||||
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:fileRecord:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -91,134 +46,70 @@
|
|||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:uploadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:uploadFolder') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:downLoadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
:disabled="selectTable.length <= 0"
|
||||
@click.stop="delList"
|
||||
>
|
||||
<el-button type="primary" v-if="hasDel && isManage && !viewStatus" :disabled="selectTable.length <= 0"
|
||||
@click.stop="delList">
|
||||
{{ $t('trials:trialDocument:fileRecord:button:del') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<!--名称-->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:fileRecord:table:name')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.TrialFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Trial')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Trial', ['.pdf'])"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial', ['.pdf'])" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileType"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:fileType')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileType')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.TrialFileRecord">{{
|
||||
scope.row.TrialFileRecord.FileFormat
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="fileType"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:fileSize')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="fileType" :label="$t('trials:trialDocument:fileRecord:table:fileSize')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.TrialFileRecord">{{
|
||||
scope.row.TrialFileRecord.FileSize
|
||||
|
@ -228,133 +119,52 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:fileRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History', ['.zip'])"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:fileRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:disabled="!scope.row.TrialFileRecord"
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch :disabled="!scope.row.TrialFileRecord" v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
|
||||
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:fileRecord:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:fileRecord:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:fileRecord:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:downLoadFile')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:fileRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<upload-files
|
||||
:config="config"
|
||||
:faccept="faccept"
|
||||
:uploadPath="uploadPath"
|
||||
:limitLength="limitLength"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@uplaodFile="uplaodFile"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
|
||||
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateTrialFileType,
|
||||
getTrialNormalRecordList,
|
||||
|
@ -369,6 +179,7 @@ import { deepClone } from '@/utils/index.js'
|
|||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import uploadFiles from '../uploadFiles.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
|
@ -381,7 +192,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'fileRecord',
|
||||
components: { BoxContent, Pagination, uploadFiles },
|
||||
components: { BoxContent, Pagination, uploadFiles, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
|
@ -426,9 +237,25 @@ export default {
|
|||
limitLength: 0,
|
||||
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 新增列表数据
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
|
@ -775,7 +602,7 @@ export default {
|
|||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
@ -823,34 +650,39 @@ export default {
|
|||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.title {
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,324 @@
|
|||
<template>
|
||||
<div v-if="config.visible">
|
||||
<base-model :config="config">
|
||||
<template slot="dialog-body">
|
||||
<el-form ref="form" :model="rowData" label-width="80px" style="width: 80%;display: inline-block;">
|
||||
<el-form-item :label="`${$t('trials:trialDocument:table:Name')}: `">
|
||||
<span class="name text-ellipsis" :title="rowData.Name">{{ rowData.Name }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:historyFileList:button:addFolder') }}</el-button>
|
||||
<div style="float:right;padding: 0 5px;width: 10px;height: 10px;"></div>
|
||||
<el-button size="mini" type="primary" style="float:right" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:historyFileList:button:addFile') }}</el-button>
|
||||
<el-table :data="list" style="width: 100%" max-height="300px" v-loading="loading"
|
||||
@sort-change="handleSortByColumn">
|
||||
<el-table-column type="index" width="60" />
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:historyFileList:FileName')"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="FileFormat" :label="$t('trials:trialDocument:historyFileList:FileType')"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="FileSize" :label="$t('trials:trialDocument:historyFileList:FileSize')"
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.FileSize && scope.row.FileSize > 0
|
||||
? `${(scope.row.FileSize / 1024 / 1024).toFixed(3)}MB`
|
||||
: ''
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:historyFileList:CreateTime')"
|
||||
sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click.stop="preview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="openAudit(scope.row)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" @click.stop="del(scope.row)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</base-model>
|
||||
<viewer ref="picture_perview4" style="margin: 0 10px"
|
||||
v-if="rowDATA.FileFormat && ['png', 'jpg', 'jpeg'].includes(rowDATA.FileFormat.toLowerCase())"
|
||||
:images="[`${OSSclientConfig.basePath}${rowDATA.FilePath}`]" :options="viewerOptions">
|
||||
|
||||
<img v-show="false" :src="`${OSSclientConfig.basePath}${rowDATA.FilePath}`" alt="Image" />
|
||||
</viewer>
|
||||
<upload-files :config="upload_config" :faccept="faccept" :uploadPath="uploadPath" v-if="upload_config.visible"
|
||||
@close="close" @uplaodFile="uplaodFile" />
|
||||
|
||||
<!-- 新增/编辑附件 -->
|
||||
<el-dialog :visible.sync="visible" :close-on-click-modal="false" :append-to-body="true" :title="title"
|
||||
width="500px" custom-class="base-dialog-wrapper">
|
||||
<el-form :model="form" :rules="rules" ref="historyFileForm" label-width="100px" class="demo-ruleForm"
|
||||
v-if="visible">
|
||||
<el-form-item :label="$t('trials:trialDocument:historyFileList:FileName')" prop="FileName">
|
||||
<el-input v-model="form.FileName" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:trialDocument:historyFileList:FileName')" prop="FileName"
|
||||
v-show="false">
|
||||
<el-input v-model="form.FileName" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">{{ $t("common:button:cancel") }}</el-button>
|
||||
<el-button type="primary" @click="save">{{ $t("common:button:save") }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import uploadFiles from './uploadFiles.vue'
|
||||
import { addOrUpdateTrialHistoryRecordFile, batchAddTrialHistoryRecordFile, getTrialHistoryRecordFileList, deleteTrialHistoryRecordFile } from '@/api/dictionary'
|
||||
const defaultSearchData = () => {
|
||||
return {
|
||||
PageIndex: 1,
|
||||
PageSize: 1000,
|
||||
Asc: false,
|
||||
OffLine: null,
|
||||
SortField: null
|
||||
}
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
BaseModel,
|
||||
uploadFiles
|
||||
},
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
rowData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
uploadPath: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchData: defaultSearchData(),
|
||||
visible: false,
|
||||
title: null,
|
||||
list: [],
|
||||
rowDATA: {},
|
||||
loading: false,
|
||||
viewerOptions: {
|
||||
toolbar: {
|
||||
zoomIn: true,
|
||||
zoomOut: true,
|
||||
reset: true,
|
||||
prev: false,
|
||||
next: false,
|
||||
rotateLeft: true,
|
||||
rotateRight: true,
|
||||
flipHorizontal: true,
|
||||
flipVertical: true,
|
||||
}
|
||||
},
|
||||
upload_config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: '800px',
|
||||
title: '',
|
||||
appendToBody: false,
|
||||
isFolder: false,
|
||||
},
|
||||
faccept: ['.jpg',
|
||||
'.jpeg',
|
||||
'.png',
|
||||
'.pdf',
|
||||
'.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx',
|
||||
".mp4",
|
||||
".zip"],
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:audit'),
|
||||
form: {},
|
||||
rules: {
|
||||
FileName: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change'], },
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'rowData.Id': {
|
||||
handler() {
|
||||
if (this.rowData.Id) {
|
||||
console.log(this.rowData)
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.upload_config.visible = false
|
||||
},
|
||||
closeDialog() {
|
||||
this.visible = false
|
||||
},
|
||||
getAllList() {
|
||||
this.getList()
|
||||
this.$emit("getList")
|
||||
},
|
||||
openAudit(row) {
|
||||
this.form = Object.assign({}, row)
|
||||
this.visible = true
|
||||
},
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.historyFileForm.validate()
|
||||
if (!validate) return false
|
||||
let res = await addOrUpdateTrialHistoryRecordFile(this.form)
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.visible = false
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
async del(row) {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("trials:trialDocument:historyFileList:message:del"))
|
||||
if (!confirm) return false
|
||||
this.loading = true
|
||||
let res = await deleteTrialHistoryRecordFile(row.Id)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
try {
|
||||
let arr = []
|
||||
list.forEach(item => {
|
||||
let obj = Object.assign({}, item)
|
||||
obj.TrialFileTypeId = this.rowData.TrialFileTypeId
|
||||
obj.TrialRecordId = this.rowData.Id
|
||||
arr.push(obj)
|
||||
});
|
||||
this.loading = true
|
||||
let res = await batchAddTrialHistoryRecordFile(arr)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getAllList()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
openFile(isFolder = false) {
|
||||
this.upload_config.title = this.$t(
|
||||
'trials:trialDocument:fileRecord:form:title:uploadFile'
|
||||
)
|
||||
this.upload_config.visible = true
|
||||
this.upload_config.isFolder = isFolder
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (!this.rowData.Id) return false
|
||||
this.searchData.TrialRecordId = this.rowData.Id
|
||||
let res = await getTrialHistoryRecordFileList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
preview(data) {
|
||||
// return this.perview_visible = true
|
||||
this.rowDATA = Object.assign({}, data)
|
||||
if (['.ppt',
|
||||
'.pptx',
|
||||
'.doc',
|
||||
'.docx',
|
||||
'.xls',
|
||||
'.xlsx'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$onlyOffice({
|
||||
path: data.FilePath,
|
||||
type: data.FileFormat,
|
||||
title: data.Name
|
||||
})
|
||||
}
|
||||
if (['.jpg',
|
||||
'.jpeg',
|
||||
'.png'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['picture_perview4'].$viewer.show()
|
||||
})
|
||||
}
|
||||
if (['.pdf'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$preview({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'pdf',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
if (['.mp4'].includes(`.${data.FileFormat.toLowerCase()}`)) {
|
||||
this.$video({
|
||||
path: data.Path || data.FilePath,
|
||||
type: 'mp4',
|
||||
title: data.Name,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.name {
|
||||
display: block;
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
|
@ -1,131 +1,64 @@
|
|||
<template>
|
||||
<base-model :config="config">
|
||||
<div slot="dialog-body">
|
||||
<el-form
|
||||
ref="reportDocForm"
|
||||
:model="form"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form ref="reportDocForm" :model="form" label-width="140px" size="small" :rules="rules">
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:name')"
|
||||
prop="Name"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:name')" prop="Name">
|
||||
<el-input v-model="form.Name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:version')"
|
||||
prop="Version"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:version')" prop="Version">
|
||||
<el-input v-model="form.Version" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
|
||||
prop="IsAuthorizedView"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.IsAuthorizedView"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-form-item v-if="!config.upload" :label="$t('trials:trialDocument:reportDoc:form:isAuthorizedView')"
|
||||
prop="IsAuthorizedView">
|
||||
<el-switch v-model="form.IsAuthorizedView" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'PDF'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')"
|
||||
prop="PDFFileRecord"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'PDF')"
|
||||
:on-remove="() => handleRemoveFile('PDF')"
|
||||
:limit="1"
|
||||
accept=".pdf"
|
||||
:file-list="PDFFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
<el-form-item v-if="!config.upload || config.upload === 'PDF'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:pdfFileRecord')" prop="PDFFileRecord">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'PDF', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'PDF')" :on-remove="() => handleRemoveFile('PDF')"
|
||||
:limit="1" accept=".pdf" :file-list="PDFFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.PDFFileRecord && !!form.PDFFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'Word'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Word')"
|
||||
:on-remove="() => handleRemoveFile('Word')"
|
||||
:limit="1"
|
||||
accept=".docx"
|
||||
:file-list="WordFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.WordFileRecord && !!form.WordFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
<el-form-item v-if="!config.upload || config.upload === 'Word'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:wordFileRecord')">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Word', '.docx')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Word')" :on-remove="() => handleRemoveFile('Word')"
|
||||
:limit="1" accept=".docx" :file-list="WordFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.WordFileRecord && !!form.WordFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustDOCX') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!config.upload || config.upload === 'Sign'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')"
|
||||
:prop="
|
||||
rowData.IsConfirmRecord &&
|
||||
(!config.upload || config.upload === 'Sign')
|
||||
<el-form-item v-if="!config.upload || config.upload === 'Sign'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:signFileRecord')" :prop="rowData.IsConfirmRecord &&
|
||||
(!config.upload || config.upload === 'Sign')
|
||||
? 'SignFileRecord'
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Sign')"
|
||||
:on-remove="() => handleRemoveFile('Sign')"
|
||||
:limit="1"
|
||||
accept=".pdf"
|
||||
:file-list="SignFile"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="
|
||||
!!form.SignFileRecord && !!form.SignFileRecord.FilePath
|
||||
"
|
||||
>{{ $t('common:button:upload') }}
|
||||
">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'Sign', '.pdf')"
|
||||
:http-request="(param) => handleUploadFile(param, 'Sign')" :on-remove="() => handleRemoveFile('Sign')"
|
||||
:limit="1" accept=".pdf" :file-list="SignFile">
|
||||
<el-button size="small" type="primary" :disabled="!!form.SignFileRecord && !!form.SignFileRecord.FilePath
|
||||
">{{ $t('common:button:upload') }}
|
||||
</el-button>
|
||||
<span slot="tip" class="el-upload__tip">
|
||||
{{ $t('trials:trialDocument:reportDoc:rule:mustPDF') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
<!-- <el-form-item
|
||||
v-if="!config.upload || config.upload === 'History'"
|
||||
:label="$t('trials:trialDocument:reportDoc:form:historyFileRecord')"
|
||||
>
|
||||
|
@ -151,7 +84,7 @@
|
|||
{{ $t('trials:trialDocument:reportDoc:rule:mustZIP') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -165,7 +98,7 @@
|
|||
</div>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import baseModel from '@/components/BaseModel'
|
||||
import { addOrUpdateTrialFinalRecord } from '@/api/dictionary'
|
||||
export default {
|
||||
|
|
|
@ -4,65 +4,30 @@
|
|||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')"
|
||||
>
|
||||
<el-date-picker
|
||||
:disabled="!isManage || rowBtnStatus === 'edit'"
|
||||
v-model="DATA.FirstFinalDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder=""
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:firstFinalDate')">
|
||||
<el-date-picker :disabled="!isManage || rowBtnStatus === 'edit'" v-model="DATA.FirstFinalDate" type="date"
|
||||
value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -74,32 +39,14 @@
|
|||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:name')">
|
||||
<el-input v-model="searchData.Name" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:search:version')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.Version"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:version')">
|
||||
<el-input v-model="searchData.Version" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:reportDoc:search:isAuthorizedView')"
|
||||
v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -107,321 +54,143 @@
|
|||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:reportDoc:button:downLoadFile') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:name')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Version"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:version')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="Name" :label="$t('trials:trialDocument:reportDoc:table:name')" sortable="custom"
|
||||
show-overflow-tooltip />
|
||||
<el-table-column prop="Version" :label="$t('trials:trialDocument:reportDoc:table:version')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!--定稿PDF-->
|
||||
<el-table-column
|
||||
prop="PDFFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="PDFFileRecord" :label="$t('trials:trialDocument:reportDoc:table:pdfFileRecord')"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.PDFFileRecord && scope.row.PDFFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.PDFFileRecord && scope.row.PDFFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{ scope.row.PDFFileRecord.FileName }}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.PDFFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.PDFFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'PDF')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.PDFFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.PDFFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'PDF')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'PDF')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'PDF')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--定稿WORD-->
|
||||
<el-table-column
|
||||
prop="WordFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="WordFileRecord" :label="$t('trials:trialDocument:reportDoc:table:wordFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.WordFileRecord &&
|
||||
scope.row.WordFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.WordFileRecord &&
|
||||
scope.row.WordFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.WordFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.WordFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Word')"
|
||||
/>
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.WordFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Word')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Word')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Word')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--签字页-->
|
||||
<el-table-column
|
||||
prop="SignFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="SignFileRecord" :label="$t('trials:trialDocument:reportDoc:table:signFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.SignFileRecord &&
|
||||
scope.row.SignFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.SignFileRecord &&
|
||||
scope.row.SignFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.SignFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.SignFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.SignFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Sign')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.SignFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.SignFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Sign')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Sign')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Sign')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:reportDoc:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History')"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:reportDoc:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch v-if="isManage && !viewStatus && hasEdit" v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)" :active-value="true" :inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:reportDoc:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:reportDoc:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:reportDoc:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.PDFFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:download')"
|
||||
circle
|
||||
@click.stop="downLoad(false, scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.PDFFileRecord || !scope.row.PDFFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.PDFFileRecord)" />
|
||||
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:download')" circle
|
||||
@click.stop="downLoad(false, scope.row)" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:reportDoc:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<reportDoc-form
|
||||
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||
:rowData="rowData"
|
||||
:config="config"
|
||||
:data="selectData"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<reportDoc-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="config" :data="selectData"
|
||||
v-if="config.visible" @close="close" @getList="getList" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -437,6 +206,7 @@ import { deepClone } from '@/utils/index.js'
|
|||
import Pagination from '@/components/Pagination'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import reportDocForm from './form.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
|
@ -450,7 +220,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'reportDoc',
|
||||
components: { BoxContent, Pagination, reportDocForm },
|
||||
components: { BoxContent, Pagination, reportDocForm, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
|
@ -491,9 +261,24 @@ export default {
|
|||
},
|
||||
selectData: {},
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.Name,
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 上传单个文件
|
||||
upload(row, key) {
|
||||
this.selectData = deepClone(row)
|
||||
|
@ -771,7 +556,7 @@ export default {
|
|||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
@ -814,9 +599,8 @@ export default {
|
|||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -827,21 +611,27 @@ export default {
|
|||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
|
||||
<!-- <el-form-item v-if="!config.upload || config.upload === 'History'" :label="$t('trials:trialDocument:trainRecord:form:historyFileRecord')
|
||||
">
|
||||
<el-upload class="upload-demo" action :before-upload="(param) => beforeUpload(param, 'History', '.zip')"
|
||||
:http-request="(param) => handleUploadFile(param, 'History')"
|
||||
|
@ -45,7 +45,7 @@
|
|||
{{ $t('trials:trialDocument:trainRecord:rule:mustZIP') }}
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
|
@ -4,52 +4,25 @@
|
|||
{{ TITLE }}
|
||||
</div>
|
||||
<el-form :inline="true" class="base-search-form topForm">
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsConfirmRecord"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isConfirmRecord')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsConfirmRecord" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="DATA.IsEnable"
|
||||
:disabled="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-radio
|
||||
:label="item.value"
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
>{{ item.label }}
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:form:isEnable')"
|
||||
v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-radio-group v-model="DATA.IsEnable" :disabled="rowBtnStatus === 'edit'">
|
||||
<el-radio :label="item.value" v-for="item in $d.YesOrNo" :key="item.id">{{ item.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && hasEdit && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="rowBtnStatus = 'save'"
|
||||
v-if="rowBtnStatus === 'edit'"
|
||||
>
|
||||
<el-button type="primary" @click="rowBtnStatus = 'save'" v-if="rowBtnStatus === 'edit'">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="rowBtnLoading"
|
||||
@click="saveRowData"
|
||||
v-if="rowBtnStatus === 'save'"
|
||||
>
|
||||
<el-button type="primary" :loading="rowBtnLoading" @click="saveRowData" v-if="rowBtnStatus === 'save'">
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -59,371 +32,155 @@
|
|||
<div class="search" style="position: relative">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
<!--培训日期-->
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:TrianingDate')"
|
||||
>
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
v-model="TrianingDate"
|
||||
type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
start-placeholder=""
|
||||
end-placeholder=""
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:TrianingDate')">
|
||||
<el-date-picker style="width: 240px" v-model="TrianingDate" type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:name')"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.FileName"
|
||||
style="width: 100px"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:name')">
|
||||
<el-input v-model="searchData.FileName" style="width: 100px" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="
|
||||
$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
|
||||
"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-select
|
||||
v-if="!viewStatus"
|
||||
v-model="searchData.IsAuthorizedView"
|
||||
style="width: 100px"
|
||||
placeholder=""
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in $d.YesOrNo"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:isAuthorizedView')
|
||||
" v-if="isManage && !viewStatus">
|
||||
<el-select v-if="!viewStatus" v-model="searchData.IsAuthorizedView" style="width: 100px" placeholder=""
|
||||
clearable>
|
||||
<el-option v-for="item in $d.YesOrNo" :key="item.id" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--更新时间-->
|
||||
<el-form-item
|
||||
:label="$t('trials:trialDocument:trainRecord:search:UpdateTime')"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
v-model="UpdateTime"
|
||||
type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
start-placeholder=""
|
||||
end-placeholder=""
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
>
|
||||
<el-form-item :label="$t('trials:trialDocument:trainRecord:search:UpdateTime')" style="margin-bottom: 10px">
|
||||
<el-date-picker style="width: 240px" v-model="UpdateTime" type="daterange"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')" start-placeholder="" end-placeholder=""
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isManage && !viewStatus">
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth"
|
||||
>
|
||||
<el-button type="primary" :disabled="selectTable.length <= 0" v-if="hasAccredit && isManage && !viewStatus"
|
||||
@click.stop="auth">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:accredit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(false)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(false)">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:uploadFile') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
@click.stop="openFile(true)"
|
||||
>
|
||||
<el-button type="primary" v-if="hasEdit && isManage && !viewStatus" @click.stop="openFile(true)">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:uploadFolder') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="hasAdd && isManage && !viewStatus"
|
||||
@click.stop="handleAdd"
|
||||
>
|
||||
<el-button type="primary" v-if="hasAdd && isManage && !viewStatus" @click.stop="handleAdd">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:add') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-bottom"
|
||||
:disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
@click.stop="downLoad"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom" :disabled="selectTable.length <= 0"
|
||||
v-if="hasDownLoad && isManage && !viewStatus" @click.stop="downLoad">
|
||||
{{ $t('trials:trialDocument:trainRecord:button:downLoadFile') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 75 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
v-if="isManage && !viewStatus"
|
||||
/>
|
||||
<el-table v-loading="loading" v-adaptive="{ bottomOffset: 75 }" :data="list" stripe height="100" style="width: 100%"
|
||||
@sort-change="handleSortByColumn" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" v-if="isManage && !viewStatus" />
|
||||
<el-table-column type="index" v-else />
|
||||
|
||||
<el-table-column
|
||||
prop="TrianingDate"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="TrianingDate" :label="$t('trials:trialDocument:trainRecord:table:TrianingDate')"
|
||||
show-overflow-tooltip sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
v-if="!scope.row.TrianingDate"
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')"
|
||||
placement="top"
|
||||
>
|
||||
<i
|
||||
class="el-icon-warning"
|
||||
style="cursor: pointer; color: #f56c6c"
|
||||
></i>
|
||||
<el-tooltip v-if="!scope.row.TrianingDate" class="item" effect="dark"
|
||||
:content="$t('trials:trialDocument:trainRecord:tip:noTrianingDate')" placement="top">
|
||||
<i class="el-icon-warning" style="cursor: pointer; color: #f56c6c"></i>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ scope.row.TrianingDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="TrianingCount"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="TrianingState"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Note"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:Note')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="TrianingCount" :label="$t('trials:trialDocument:trainRecord:table:TrianingCount')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="TrianingState" :label="$t('trials:trialDocument:trainRecord:table:TrianingState')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="Note" :label="$t('trials:trialDocument:trainRecord:table:Note')" show-overflow-tooltip
|
||||
sortable="custom" />
|
||||
<!--文件名称-->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<el-table-column prop="FileName" :label="$t('trials:trialDocument:trainRecord:table:name')" show-overflow-tooltip
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div v-if="
|
||||
scope.row.TrialFileRecord &&
|
||||
scope.row.TrialFileRecord.TrialFileTypeId
|
||||
" style="display: flex; align-items: center">
|
||||
<span class="fileName">{{
|
||||
scope.row.TrialFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-view"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'Trial')"
|
||||
/>
|
||||
<i class="el-icon-view" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<i class="el-icon-download" v-if="hasDownLoad"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<i class="el-icon-delete" v-if="hasDel" @click.stop="delFile(scope.row, 'Trial')" />
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus && hasEdit"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'Trial')"
|
||||
/>
|
||||
<i v-else-if="isManage && !viewStatus && hasEdit" class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff" @click.stop="upload(scope.row, 'Trial')" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--历史记录-->
|
||||
<el-table-column
|
||||
prop="HistoryFileRecord"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="HistoryFileRecord" :label="$t('trials:trialDocument:trainRecord:table:historyFileRecord')"
|
||||
show-overflow-tooltip v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="
|
||||
scope.row.HistoryFileRecord &&
|
||||
scope.row.HistoryFileRecord.TrialFileTypeId
|
||||
"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<span class="fileName">{{
|
||||
scope.row.HistoryFileRecord.FileName
|
||||
}}</span>
|
||||
<div v-if="isManage && !viewStatus" class="fileBtnBox">
|
||||
<i
|
||||
class="el-icon-download"
|
||||
v-if="hasDownLoad"
|
||||
@click.stop="
|
||||
downLoad(false, scope.row.HistoryFileRecord, 'file')
|
||||
"
|
||||
/>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
v-if="hasDel"
|
||||
@click.stop="delFile(scope.row, 'History')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<i
|
||||
v-else-if="isManage && !viewStatus"
|
||||
class="el-icon-upload2"
|
||||
style="cursor: pointer; color: #409eff"
|
||||
@click.stop="upload(scope.row, 'History')"
|
||||
/>
|
||||
<el-button type="text" @click.stop="openHistory(scope.row)">
|
||||
{{ scope.row.HistoryCount }}
|
||||
<i class="el-icon-upload2" />
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="IsAuthorizedView"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="isManage && !viewStatus"
|
||||
>
|
||||
<el-table-column prop="IsAuthorizedView" :label="$t('trials:trialDocument:trainRecord:table:isAuthorizedView')"
|
||||
show-overflow-tooltip sortable="custom" v-if="isManage && !viewStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:disabled="!scope.row.TrianingDate"
|
||||
v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView"
|
||||
@change="(val) => auth(false, scope.row, val)"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
:active-text="$fd('YesOrNo', true)"
|
||||
:inactive-text="$fd('YesOrNo', false)"
|
||||
>
|
||||
<el-switch :disabled="!scope.row.TrianingDate" v-if="isManage && !viewStatus && hasEdit"
|
||||
v-model="scope.row.IsAuthorizedView" @change="(val) => auth(false, scope.row, val)" :active-value="true"
|
||||
:inactive-value="false" :active-text="$fd('YesOrNo', true)" :inactive-text="$fd('YesOrNo', false)">
|
||||
</el-switch>
|
||||
<span v-else>{{ $fd('YesOrNo', scope.row.IsAuthorizedView) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:trialDocument:trainRecord:table:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column prop="UpdateTime" :label="$t('trials:trialDocument:trainRecord:table:updateTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column prop="CreateTime" :label="$t('trials:trialDocument:trainRecord:table:createTime')"
|
||||
show-overflow-tooltip sortable="custom" />
|
||||
<el-table-column :label="$t('common:action:action')" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-view"
|
||||
:title="$t('common:button:view')"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="preview(scope.row.TrialFileRecord)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasEdit && isManage && !viewStatus"
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')"
|
||||
circle
|
||||
@click.stop="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDownLoad && isManage && !viewStatus"
|
||||
icon="el-icon-download"
|
||||
:title="
|
||||
$t('trials:trialDocument:trainRecord:button:downLoadFile')
|
||||
"
|
||||
circle
|
||||
:disabled="
|
||||
!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
"
|
||||
@click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')"
|
||||
/>
|
||||
<el-button
|
||||
v-if="hasDel && isManage && !viewStatus"
|
||||
icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:delete')"
|
||||
circle
|
||||
@click.stop="handleDel(scope.row)"
|
||||
/>
|
||||
<el-button icon="el-icon-view" :title="$t('common:button:view')" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="preview(scope.row.TrialFileRecord)" />
|
||||
<el-button v-if="hasEdit && isManage && !viewStatus" icon="el-icon-edit-outline"
|
||||
:title="$t('common:button:edit')" circle @click.stop="handleEdit(scope.row)" />
|
||||
<el-button v-if="hasDownLoad && isManage && !viewStatus" icon="el-icon-download" :title="$t('trials:trialDocument:trainRecord:button:downLoadFile')
|
||||
" circle :disabled="!scope.row.TrialFileRecord || !scope.row.TrialFileRecord.FilePath
|
||||
" @click.stop="downLoad(false, scope.row.TrialFileRecord, 'file')" />
|
||||
<el-button v-if="hasDel && isManage && !viewStatus" icon="el-icon-delete"
|
||||
:title="$t('trials:trialDocument:trainRecord:button:delete')" circle @click.stop="handleDel(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<upload-files
|
||||
:config="config"
|
||||
:faccept="faccept"
|
||||
:uploadPath="uploadPath"
|
||||
:limitLength="limitLength"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@uplaodFile="uplaodFile"
|
||||
/>
|
||||
<trainRecord-form
|
||||
:ArchiveTypeEnum="ArchiveTypeEnum"
|
||||
:rowData="rowData"
|
||||
:config="update_config"
|
||||
:data="selectData"
|
||||
v-if="update_config.visible"
|
||||
@close="updateClose"
|
||||
@getList="getList"
|
||||
/>
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||
@pagination="getList" />
|
||||
<upload-files :config="config" :faccept="faccept" :uploadPath="uploadPath" :limitLength="limitLength"
|
||||
v-if="config.visible" @close="close" @uplaodFile="uplaodFile" />
|
||||
<trainRecord-form :ArchiveTypeEnum="ArchiveTypeEnum" :rowData="rowData" :config="update_config" :data="selectData"
|
||||
v-if="update_config.visible" @close="updateClose" @getList="getList" />
|
||||
<history-file-list :config="file_config" :rowData="fileData" :uploadPath="uploadPath" @getList="getList" />
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
addOrUpdateTrialFileType,
|
||||
getTrialTrianingRecordList,
|
||||
|
@ -438,6 +195,7 @@ import Pagination from '@/components/Pagination'
|
|||
import BoxContent from '@/components/BoxContent'
|
||||
import uploadFiles from '../uploadFiles.vue'
|
||||
import trainRecordForm from './form.vue'
|
||||
import historyFileList from '../historyFileList.vue'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsAuthorizedView: null,
|
||||
|
@ -454,7 +212,7 @@ const searchDataDefault = () => {
|
|||
}
|
||||
export default {
|
||||
name: 'trainRecord',
|
||||
components: { BoxContent, Pagination, uploadFiles, trainRecordForm },
|
||||
components: { BoxContent, Pagination, uploadFiles, trainRecordForm, historyFileList },
|
||||
props: {
|
||||
viewStatus: {
|
||||
type: Boolean,
|
||||
|
@ -509,9 +267,24 @@ export default {
|
|||
upload: null,
|
||||
},
|
||||
DATA: {},
|
||||
|
||||
fileData: {},
|
||||
file_config: {
|
||||
visible: false,
|
||||
title: this.$t('trials:trialDocument:historyFileList:title'),
|
||||
width: '800px',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openHistory(row) {
|
||||
this.fileData = {
|
||||
Name: row.TrialFileRecord ? row.TrialFileRecord.FileName : '',
|
||||
Id: row.Id,
|
||||
TrialFileTypeId: this.rowData.Id
|
||||
}
|
||||
this.file_config.visible = true
|
||||
},
|
||||
// 新增列表数据
|
||||
async uplaodFile(list) {
|
||||
console.log(list, 'list')
|
||||
|
@ -870,7 +643,7 @@ export default {
|
|||
this.DATA = Object.assign({}, this.rowData)
|
||||
},
|
||||
immediate: true,
|
||||
deep:true
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
@ -918,9 +691,8 @@ export default {
|
|||
])
|
||||
},
|
||||
TITLE() {
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${
|
||||
this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
return `${this.$fd('ArchiveType', this.ArchiveTypeEnum)} — ${this.isEN ? this.rowData.Name : this.rowData.NameCN
|
||||
}`
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -931,21 +703,27 @@ export default {
|
|||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.fileName {
|
||||
display: inline-block;
|
||||
max-width: calc(100% - 60px);
|
||||
white-space: nowrap; /* 文本不换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
white-space: nowrap;
|
||||
/* 文本不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.fileBtnBox {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
margin-right: 3px;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue