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

View File

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