下载记录列表修改
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2024-11-19 16:08:51 +08:00
parent 1491d7ee78
commit d9488e55df
1 changed files with 73 additions and 54 deletions

View File

@ -74,7 +74,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
{{ $t("common:button:search") }}
{{ $t('common:button:search') }}
</el-button>
<!-- 重置 -->
<el-button
@ -82,7 +82,7 @@
icon="el-icon-refresh-left"
@click="handleReset"
>
{{ $t("common:button:reset") }}
{{ $t('common:button:reset') }}
</el-button>
</el-form-item>
</el-form>
@ -148,8 +148,8 @@
show-overflow-tooltip
sortable="custom"
>
<template slot-scope="scope">
{{ $fd("UserType", scope.row.UserTypeEnum) }}
<template slot-scope="scope">
{{ $fd('UserType', scope.row.UserTypeEnum) }}
</template>
</el-table-column>
<!--检查数量--->
@ -186,12 +186,31 @@
</el-table-column>
<!--下载时间--->
<el-table-column
:label="$t('trials:downloadRecord:table:DownloadTime')"
prop="DownloadTime"
min-width="90"
:label="$t('trials:downloadRecord:table:DownloadStartTime')"
prop="DownloadStartTime"
min-width="130"
show-overflow-tooltip
sortable="custom"
/>
<!-- 下载结束时间 -->
<el-table-column
prop="DownloadEndTime"
min-width="130"
:label="$t('trials:downloadRecord:table:downloadEndTime')"
show-overflow-tooltip
sortable="custom"
/>
<!-- 总共用时 -->
<el-table-column
prop="UploadIntervalStr"
min-width="100"
:label="$t('trials:downloadRecord:table:totalTime')"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ scope.row.UploadIntervalStr }}
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
@ -205,25 +224,25 @@
</BaseContainer>
</template>
<script>
import { getUserTypeListByUserType } from "@/api/admin";
import { getTrialSubjectVisitDownloadList } from "@/api/inspection";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
import { getUserTypeListByUserType } from '@/api/admin'
import { getTrialSubjectVisitDownloadList } from '@/api/inspection'
import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination'
const searchDataDefault = () => {
return {
TrialId: "",
TrialId: '',
SubjectCode: null,
IP: "",
VisitName: "",
Name: "",
IP: '',
VisitName: '',
Name: '',
BeginDownloadTime: null,
EndDownloadTime: null,
Asc: false,
SortField: "DownloadTime",
SortField: 'DownloadTime',
PageIndex: 1,
PageSize: 20,
};
};
}
}
export default {
components: { BaseContainer, Pagination },
data() {
@ -234,78 +253,78 @@ export default {
total: 0,
loading: false,
dateValue: [],
};
}
},
mounted() {
this.getList();
this.getUserType();
this.getList()
this.getUserType()
},
methods: {
//
getUserType() {
getUserTypeListByUserType(0).then((res) => {
let arr = [];
if (this.hasPermi(["role:admin"])) {
arr = [1];
let arr = []
if (this.hasPermi(['role:admin'])) {
arr = [1]
}
if (this.hasPermi(["role:oa"])) {
arr = [1, 2];
if (this.hasPermi(['role:oa'])) {
arr = [1, 2]
}
if (this.hasPermi(["role:pm"])) {
arr = [1, 2, 14];
if (this.hasPermi(['role:pm'])) {
arr = [1, 2, 14]
}
this.userTypeOptions = res.Result.map((item) => {
if (!arr.includes(item.UserTypeEnum)) {
return item;
return item
}
}).filter((item) => item);
});
}).filter((item) => item)
})
},
getList() {
this.loading = true;
this.searchData.TrialId = this.$route.query.trialId;
this.loading = true
this.searchData.TrialId = this.$route.query.trialId
if (this.dateValue && this.dateValue[0] && this.dateValue[1]) {
this.searchData.BeginDownloadTime = this.$moment(
this.dateValue[0]
).format("YYYY-MM-DD HH:mm:ss");
).format('YYYY-MM-DD HH:mm:ss')
this.searchData.EndDownloadTime = this.$moment(
this.dateValue[1]
).format("YYYY-MM-DD HH:mm:ss");
).format('YYYY-MM-DD HH:mm:ss')
} else {
this.searchData.BeginDownloadTime = null;
this.searchData.EndDownloadTime = null;
this.searchData.BeginDownloadTime = null
this.searchData.EndDownloadTime = null
}
getTrialSubjectVisitDownloadList(this.searchData)
.then((res) => {
this.loading = false;
this.list = res.Result.CurrentPageData;
this.total = res.Result.TotalCount;
this.loading = false
this.list = res.Result.CurrentPageData
this.total = res.Result.TotalCount
})
.catch(() => {
this.loading = false;
});
this.loading = false
})
},
handleSearch() {
this.searchData.PageIndex = 1;
this.getList();
this.searchData.PageIndex = 1
this.getList()
},
//
handleReset() {
this.searchData = searchDataDefault();
this.dateValue = [];
this.getList();
this.searchData = searchDataDefault()
this.dateValue = []
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.searchData.PageIndex = 1;
this.getList();
this.searchData.SortField = column.prop
this.searchData.PageIndex = 1
this.getList()
},
},
};
}
</script>