培训文件显示创建时间,不展示更新时间
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c24c98b334
commit
2c0c2e8111
|
@ -104,8 +104,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="上传时间"
|
||||
prop="CreateTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
|
|
@ -456,7 +456,6 @@ export default {
|
|||
},
|
||||
// 输入框输入事件
|
||||
setPassword(val) {
|
||||
console.log(val)
|
||||
if (this.isShowPassword) {
|
||||
this.loginForm.password = val
|
||||
} else {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<box-content style="height: 100%;background: #fff;">
|
||||
<box-content style="height: 100%; background: #fff">
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" class="base-search-form">
|
||||
|
@ -8,7 +8,7 @@
|
|||
<el-select
|
||||
v-model="searchData.FileTypeId"
|
||||
clearable
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Trial_Document"
|
||||
|
@ -20,14 +20,14 @@
|
|||
</el-form-item>
|
||||
<!-- 文件名称 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:fileName')">
|
||||
<el-input v-model="searchData.Name" style="width:100px;" />
|
||||
<el-input v-model="searchData.Name" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<!-- 培训状态 -->
|
||||
<el-form-item :label="$t('trials:attachment:table:isDeleted')">
|
||||
<el-select
|
||||
clearable
|
||||
v-model="searchData.IsDeleted"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.TrainingStatus"
|
||||
|
@ -42,11 +42,18 @@
|
|||
<el-select
|
||||
v-model="searchData.UserTypeId"
|
||||
clearable
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of userTypeOptions"
|
||||
v-show="item.UserTypeEnum !== 1 && item.UserTypeEnum !== 8 && item.UserTypeEnum !== 20 && item.UserTypeEnum !== 26 && item.UserTypeEnum !== 27 && item.UserTypeEnum !== 31"
|
||||
v-show="
|
||||
item.UserTypeEnum !== 1 &&
|
||||
item.UserTypeEnum !== 8 &&
|
||||
item.UserTypeEnum !== 20 &&
|
||||
item.UserTypeEnum !== 26 &&
|
||||
item.UserTypeEnum !== 27 &&
|
||||
item.UserTypeEnum !== 31
|
||||
"
|
||||
:key="item.Id"
|
||||
:label="item.UserTypeShortName"
|
||||
:value="item.Id"
|
||||
|
@ -55,20 +62,23 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</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>
|
||||
<span style="margin-left:auto;">
|
||||
<span style="margin-left: auto">
|
||||
<!-- 新增 -->
|
||||
<el-button
|
||||
v-hasPermi="['trials:trials-panel:setting:attachment:add']"
|
||||
|
@ -85,7 +95,7 @@
|
|||
<el-table
|
||||
ref="attachmentList"
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
|
@ -125,8 +135,12 @@
|
|||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('TrainingStatus', !scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('TrainingStatus', !scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd('TrainingStatus', !scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd('TrainingStatus', !scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 需要签署的用户类型 -->
|
||||
|
@ -137,7 +151,11 @@
|
|||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.NeedConfirmedUserTypes?scope.row.NeedConfirmedUserTypes.join(', '):'' }}
|
||||
{{
|
||||
scope.row.NeedConfirmedUserTypes
|
||||
? scope.row.NeedConfirmedUserTypes.join(', ')
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 描述 -->
|
||||
|
@ -148,14 +166,21 @@
|
|||
min-width="300"
|
||||
/> -->
|
||||
<!-- 更新时间 -->
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('trials:attachment:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
/> -->
|
||||
<!--创建时间-->
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('trials:attachment:table:CreateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="160"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
min-width="140"
|
||||
|
@ -192,7 +217,13 @@
|
|||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
|
@ -203,7 +234,11 @@
|
|||
width="800px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<AttachmentForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
<AttachmentForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 预览文件 -->
|
||||
|
@ -215,16 +250,25 @@
|
|||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<PreviewFile
|
||||
v-if="previewVisible"
|
||||
:file-path="currentPath"
|
||||
:file-type="currentType"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getTrialDocumentList, userAbandonDoc, getTrialUserTypeList } from '@/api/trials'
|
||||
import {
|
||||
getTrialDocumentList,
|
||||
userAbandonDoc,
|
||||
getTrialUserTypeList,
|
||||
} from '@/api/trials'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import AttachmentForm from './components/attachmentForm'
|
||||
|
@ -238,7 +282,7 @@ const searchDataDefault = () => {
|
|||
SortField: '',
|
||||
Asc: false,
|
||||
IsDeleted: null,
|
||||
UserTypeId: null
|
||||
UserTypeId: null,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
|
@ -258,7 +302,7 @@ export default {
|
|||
currentPath: '',
|
||||
currentType: '',
|
||||
trialId: '',
|
||||
userTypeOptions: []
|
||||
userTypeOptions: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -271,31 +315,38 @@ export default {
|
|||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.TrialId = this.trialId
|
||||
getTrialDocumentList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
const { CurrentPageData, TotalCount } = res.Result
|
||||
CurrentPageData.forEach(item => {
|
||||
item.NeedConfirmedUserTypes = []
|
||||
item.NeedConfirmedUserTypeeIds = []
|
||||
item.NeedConfirmedUserTypeList.forEach((i) => {
|
||||
item.NeedConfirmedUserTypes.push(i.UserTypeShortName)
|
||||
item.NeedConfirmedUserTypeeIds.push(i.NeedConfirmUserTypeId)
|
||||
getTrialDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
const { CurrentPageData, TotalCount } = res.Result
|
||||
CurrentPageData.forEach((item) => {
|
||||
item.NeedConfirmedUserTypes = []
|
||||
item.NeedConfirmedUserTypeeIds = []
|
||||
item.NeedConfirmedUserTypeList.forEach((i) => {
|
||||
item.NeedConfirmedUserTypes.push(i.UserTypeShortName)
|
||||
item.NeedConfirmedUserTypeeIds.push(i.NeedConfirmUserTypeId)
|
||||
})
|
||||
})
|
||||
this.list = CurrentPageData
|
||||
this.total = TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.list = CurrentPageData
|
||||
this.total = TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
getTrialUserTypeList().then(res => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeeIds
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
getTrialUserTypeList()
|
||||
.then((res) => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList =
|
||||
this.data.NeedConfirmedUserTypeeIds
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
|
@ -307,7 +358,9 @@ export default {
|
|||
handlePreview(row) {
|
||||
const { Name, FullFilePath } = row
|
||||
this.currentPath = FullFilePath
|
||||
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
|
||||
this.currentType = row.Name
|
||||
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
: ''
|
||||
this.previewVisible = true
|
||||
},
|
||||
// 编辑
|
||||
|
@ -320,19 +373,25 @@ export default {
|
|||
handleRepeal(row) {
|
||||
this.$confirm(this.$t('trials:attachment:message:abolish'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
userAbandonDoc(row.Id, false)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success(this.$t('trials:trials-list:message:abolitionSuccessfully'))
|
||||
this.$message.success(
|
||||
this.$t('trials:trials-list:message:abolitionSuccessfully')
|
||||
)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 关闭编辑弹窗
|
||||
closeDialog() {
|
||||
|
@ -361,7 +420,7 @@ export default {
|
|||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue