项目中所有pm角色禁止禁用,所有包含pm账号的禁止退出
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-12-31 10:11:32 +08:00
parent d5c9298aab
commit 3578882ec0
2 changed files with 87 additions and 73 deletions

View File

@ -5,7 +5,11 @@
<el-form :inline="true"> <el-form :inline="true">
<!-- 文件类型 --> <!-- 文件类型 -->
<el-form-item :label="$t('trials:signRecords:table:fileType')"> <el-form-item :label="$t('trials:signRecords:table:fileType')">
<el-select v-model="searchData.FileTypeId" clearable style="width: 150px"> <el-select
v-model="searchData.FileTypeId"
clearable
style="width: 150px"
>
<el-option <el-option
v-for="item of typeOptions" v-for="item of typeOptions"
:key="item.FileTypeId" :key="item.FileTypeId"
@ -96,7 +100,7 @@
<el-form-item> <el-form-item>
<!-- 查询 --> <!-- 查询 -->
<el-button icon="el-icon-search" type="primary" @click="handleSearch"> <el-button icon="el-icon-search" type="primary" @click="handleSearch">
{{ $t("common:button:search") }} {{ $t('common:button:search') }}
</el-button> </el-button>
<!-- 重置 --> <!-- 重置 -->
<el-button <el-button
@ -104,7 +108,7 @@
type="primary" type="primary"
@click="handleReset" @click="handleReset"
> >
{{ $t("common:button:reset") }} {{ $t('common:button:reset') }}
</el-button> </el-button>
<!-- 导出 --> <!-- 导出 -->
<el-button <el-button
@ -113,7 +117,7 @@
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
> >
{{ $t("common:button:export") }} {{ $t('common:button:export') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -156,10 +160,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsSystemDoc" type="primary">{{ <el-tag v-if="scope.row.IsSystemDoc" type="primary">{{
$fd("IsSystemDoc", scope.row.IsSystemDoc) $fd('IsSystemDoc', scope.row.IsSystemDoc)
}}</el-tag> }}</el-tag>
<el-tag v-else type="warning">{{ <el-tag v-else type="warning">{{
$fd("IsSystemDoc", scope.row.IsSystemDoc) $fd('IsSystemDoc', scope.row.IsSystemDoc)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -172,10 +176,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ <el-tag v-if="scope.row.IsDeleted" type="danger">{{
$fd("YesOrNo", scope.row.IsDeleted) $fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
<el-tag v-else type="primary">{{ <el-tag v-else type="primary">{{
$fd("YesOrNo", scope.row.IsDeleted) $fd('YesOrNo', scope.row.IsDeleted)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -196,10 +200,10 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="!scope.row.IsConfirmed" type="primary">{{ <el-tag v-if="!scope.row.IsConfirmed" type="primary">{{
$fd("YesOrNo", scope.row.IsConfirmed) $fd('YesOrNo', scope.row.IsConfirmed)
}}</el-tag> }}</el-tag>
<el-tag v-else type="danger">{{ <el-tag v-else type="danger">{{
$fd("YesOrNo", scope.row.IsConfirmed) $fd('YesOrNo', scope.row.IsConfirmed)
}}</el-tag> }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -219,11 +223,19 @@
/> />
<!-- 用户类型 --> <!-- 用户类型 -->
<el-table-column <el-table-column
prop="UserTypeShortName" prop="UserConfirmedUserTypeList"
:label="$t('trials:signRecords:table:userType')" :label="$t('trials:signRecords:table:userType')"
show-overflow-tooltip show-overflow-tooltip
sortable="custom" >
/> <template slot-scope="scope">
<span>{{
Array.isArray(scope.row.UserConfirmedUserTypeList) &&
scope.row.UserConfirmedUserTypeList.length > 0
? scope.row.UserConfirmedUserTypeList.join(', ')
: ''
}}</span>
</template>
</el-table-column>
<!-- 签署时间 --> <!-- 签署时间 -->
<el-table-column <el-table-column
prop="ConfirmTime" prop="ConfirmTime"
@ -283,25 +295,25 @@ import {
getTrialUserSelect, getTrialUserSelect,
getTrialUserTypeList, getTrialUserTypeList,
getTrialDocAndSystemDocType, getTrialDocAndSystemDocType,
} from "@/api/trials"; } from '@/api/trials'
import { pMTrainingRecordList_Export } from "@/api/export"; import { pMTrainingRecordList_Export } from '@/api/export'
import BaseContainer from "@/components/BaseContainer"; import BaseContainer from '@/components/BaseContainer'
import Pagination from "@/components/Pagination"; import Pagination from '@/components/Pagination'
import PreviewFile from "@/components/PreviewFile/index"; import PreviewFile from '@/components/PreviewFile/index'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
FileTypeId: "", FileTypeId: '',
Name: "", Name: '',
UserId: "", UserId: '',
UserTypeId: "", UserTypeId: '',
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,
IsConfirmed: null, IsConfirmed: null,
IsDeleted: null, IsDeleted: null,
}; }
}; }
export default { export default {
name: "AttachmentsManagement", name: 'AttachmentsManagement',
components: { BaseContainer, Pagination, PreviewFile }, components: { BaseContainer, Pagination, PreviewFile },
data() { data() {
return { return {
@ -310,99 +322,99 @@ export default {
list: [], list: [],
total: 0, total: 0,
currentRow: {}, currentRow: {},
currentPath: "", currentPath: '',
currentType: "", currentType: '',
previewVisible: false, previewVisible: false,
userOptions: [], userOptions: [],
userTypeOptions: [], userTypeOptions: [],
currentUser: zzSessionStorage.getItem("userName"), currentUser: zzSessionStorage.getItem('userName'),
typeOptions: [], typeOptions: [],
trialId: this.$route.query.trialId, trialId: this.$route.query.trialId,
exportLoading: false, exportLoading: false,
}; }
}, },
mounted() { mounted() {
this.getTypeOptions(); this.getTypeOptions()
this.getUserSelect(); this.getUserSelect()
this.getUserType(); this.getUserType()
this.getList(); this.getList()
}, },
methods: { methods: {
handleExport() { handleExport() {
this.exportLoading = true; this.exportLoading = true
pMTrainingRecordList_Export(this.searchData) pMTrainingRecordList_Export(this.searchData)
.then(() => { .then(() => {
this.exportLoading = false; this.exportLoading = false
}) })
.catch((err) => { .catch((err) => {
this.exportLoading = false; this.exportLoading = false
}); })
}, },
// //
getList() { getList() {
this.loading = true; this.loading = true
this.searchData.TrialId = this.trialId; this.searchData.TrialId = this.trialId
getDocumentConfirmList(this.searchData) getDocumentConfirmList(this.searchData)
.then(async (res) => { .then(async (res) => {
this.loading = false; this.loading = false
this.list = res.Result.CurrentPageData; this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount; this.total = res.Result.TotalCount
console.log(this.total); console.log(this.total)
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false
}); })
}, },
// //
getTypeOptions() { getTypeOptions() {
getTrialDocAndSystemDocType(this.trialId).then((res) => { getTrialDocAndSystemDocType(this.trialId).then((res) => {
this.typeOptions = res.Result; this.typeOptions = res.Result
}); })
}, },
// //
getUserSelect() { getUserSelect() {
getTrialUserSelect(this.trialId).then((res) => { getTrialUserSelect(this.trialId).then((res) => {
this.userOptions = res.Result; this.userOptions = res.Result
}); })
}, },
// //
getUserType() { getUserType() {
getTrialUserTypeList().then((res) => { getTrialUserTypeList().then((res) => {
this.userTypeOptions = res.Result; this.userTypeOptions = res.Result
}); })
}, },
// //
handlePreview(row) { handlePreview(row) {
this.currentRow = { ...row }; this.currentRow = { ...row }
const { Name, FullFilePath } = row; const { Name, FullFilePath } = row
this.currentPath = FullFilePath; this.currentPath = FullFilePath
this.currentType = row.Name this.currentType = row.Name
? Name.substring(Name.lastIndexOf(".") + 1).toLocaleLowerCase() ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
: ""; : ''
this.previewVisible = true; this.previewVisible = true
}, },
// //
handleReset() { handleReset() {
this.searchData = searchDataDefault(); this.searchData = searchDataDefault()
this.getList(); this.getList()
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.AttachmentsManagement.clearSort(); this.$refs.AttachmentsManagement.clearSort()
}); })
}, },
// //
handleSearch() { handleSearch() {
this.getList(); this.getList()
}, },
// //
handleSortByColumn(column) { handleSortByColumn(column) {
if (column.order === "ascending") { if (column.order === 'ascending') {
this.searchData.Asc = true; this.searchData.Asc = true
} else { } else {
this.searchData.Asc = false; this.searchData.Asc = false
} }
this.searchData.SortField = column.prop; this.searchData.SortField = column.prop
this.getList(); this.getList()
}, },
}, },
}; }
</script> </script>

View File

@ -247,7 +247,9 @@
:title="$t('trials:staff:action:status')" :title="$t('trials:staff:action:status')"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
:disabled=" :disabled="
hasPermi(['role:pm']) && scope.row.UserTypeEnum * 1 === 1 scope.row.TrialUserRoleList.find(
(item) => item.UserTypeEnum === 1
)
" "
@click="handleStatus(scope.row)" @click="handleStatus(scope.row)"
/> />
@ -388,8 +390,8 @@
min-width="120px" min-width="120px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="!scope.row.IsDeleted"> <span>
{{ scope.row.UpdateTime }} {{ scope.row.CreateTime }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -413,7 +415,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
:disabled="scope.row.IsDeleted" :disabled="scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, true)" @click.stop="changeRoleStatus(scope.row, true)"
> >
{{ $fd('IsEnable', false) }} {{ $fd('IsEnable', false) }}
@ -421,7 +423,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
:disabled="!scope.row.IsDeleted" :disabled="!scope.row.IsDeleted || scope.row.UserTypeEnum === 1"
@click.stop="changeRoleStatus(scope.row, false)" @click.stop="changeRoleStatus(scope.row, false)"
> >
{{ $fd('IsEnable', true) }} {{ $fd('IsEnable', true) }}