下载记录添加用户类型字段及查询条件
continuous-integration/drone/push Build is passing Details

main
caiyiling 2024-05-29 17:31:23 +08:00
parent b9086e135f
commit bbf780352a
2 changed files with 53 additions and 1 deletions

View File

@ -116,7 +116,7 @@
</div>
</div>
<div v-if="language === 'zh'" class="login-footer">
<span>Copyright © 2023 上海展影医疗科技有限公司 版权所有</span>
<span>Copyright © 2024 上海展影医疗科技有限公司 版权所有</span>
<span> | </span>
<a target="_blank" href="https://beian.miit.gov.cn/">
<span> 沪ICP备2021037850-2 </span>

View File

@ -43,6 +43,23 @@
style="width: 120px"
/>
</el-form-item>
<el-form-item
:label="$t('trials:downloadRecord:table:userType')"
prop="UserTypeEnum"
>
<el-select
v-model="searchData.UserTypeEnum"
clearable
style="width: 120px"
>
<el-option
v-for="item of userTypeOptions"
:key="item.Id"
:label="item.UserType"
:value="item.UserTypeEnum"
/>
</el-select>
</el-form-item>
<!-- 下载日期 -->
<el-form-item :label="$t('trials:downloadRecord:table:DownloadTime')">
<el-date-picker
@ -123,6 +140,18 @@
show-overflow-tooltip
sortable="custom"
/>
<!--用户类型--->
<el-table-column
:label="$t('trials:downloadRecord:table:userType')"
prop="UserTypeEnum"
min-width="90"
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd("UserType", scope.row.UserTypeEnum) }}
</template>
</el-table-column>
<!--检查数量--->
<el-table-column
:label="$t('trials:downloadRecord:table:StudyCount')"
@ -176,6 +205,7 @@
</BaseContainer>
</template>
<script>
import { getUserTypeListByUserType } from "@/api/admin";
import { getTrialSubjectVisitDownloadList } from "@/api/inspection";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
@ -198,6 +228,7 @@ export default {
components: { BaseContainer, Pagination },
data() {
return {
userTypeOptions: [],
searchData: searchDataDefault(),
list: [],
total: 0,
@ -207,8 +238,29 @@ export default {
},
mounted() {
this.getList();
this.getUserType();
},
methods: {
//
getUserType() {
getUserTypeListByUserType(0).then((res) => {
let arr = [];
if (this.hasPermi(["role:admin"])) {
arr = [1];
}
if (this.hasPermi(["role:oa"])) {
arr = [1, 2];
}
if (this.hasPermi(["role:pm"])) {
arr = [1, 2, 14];
}
this.userTypeOptions = res.Result.map((item) => {
if (!arr.includes(item.UserTypeEnum)) {
return item;
}
}).filter((item) => item);
});
},
getList() {
this.loading = true;
this.searchData.TrialId = this.$route.query.trialId;